Lines Matching defs:sd_lun

255 struct sd_lun {  struct
258 struct scsi_device *un_sd;
263 struct buf *un_rqs_bp; /* ptr to request sense bp */
264 struct scsi_pkt *un_rqs_pktp; /* ptr to request sense scsi_pkt */
265 int un_sense_isbusy; /* Busy flag for RQS buf */
272 int un_buf_chain_type;
273 int un_uscsi_chain_type;
274 int un_direct_chain_type;
275 int un_priority_chain_type;
278 struct buf *un_waitq_headp;
279 struct buf *un_waitq_tailp;
282 struct buf *un_retry_bp;
285 void (*un_retry_statp)(kstat_io_t *);
287 void *un_xbuf_attr; /* xbuf attribute struct */
291 uint32_t un_sys_blocksize;
294 uint32_t un_tgt_blocksize;
297 uint32_t un_phy_blocksize;
304 uint64_t un_blockcount;
309 uchar_t un_ctype; /* Controller type */
310 char *un_node_type; /* minor node type */
311 uchar_t un_interconnect_type; /* Interconnect for underlying HBA */
313 uint_t un_notready_retry_count; /* Per disk notready retry count */
314 uint_t un_busy_retry_count; /* Per disk BUSY retry count */
316 uint_t un_retry_count; /* Per disk retry count */
317 uint_t un_victim_retry_count; /* Per disk victim retry count */
320 uint_t un_reset_retry_count; /* max io retries before issuing reset */
321 ushort_t un_reserve_release_time; /* reservation release timeout */
323 uchar_t un_reservation_type; /* SCSI-3 or SCSI-2 */
324 uint_t un_max_xfer_size; /* Maximum DMA transfer size */
325 int un_partial_dma_supported;
326 int un_buf_breakup_supported;
328 int un_mincdb; /* Smallest CDB to use */
329 int un_maxcdb; /* Largest CDB to use */
330 int un_max_hba_cdb; /* Largest CDB supported by HBA */
331 int un_status_len;
332 int un_pkt_flags;
339 ushort_t un_cmd_timeout; /* Timeout for completion */
340 ushort_t un_uscsi_timeout; /* Timeout for USCSI completion */
341 ushort_t un_busy_timeout; /* Timeout for busy retry */
346 uchar_t un_state; /* current state */
347 uchar_t un_last_state; /* last state */
348 uchar_t un_last_pkt_reason; /* used to suppress multiple msgs */
349 int un_tagflags; /* Pkt Flags for Tagged Queueing */
350 short un_resvd_status; /* Reservation Status */
355 long un_ncmds_in_driver; /* number of cmds in driver */
356 short un_ncmds_in_transport; /* number of cmds in transport */
357 short un_throttle; /* max #cmds allowed in transport */
358 short un_saved_throttle; /* saved value of un_throttle */
359 short un_busy_throttle; /* saved un_throttle for BUSY */
360 short un_min_throttle; /* min value of un_throttle */
361 timeout_id_t un_reset_throttle_timeid; /* timeout(9F) handle */
366 opaque_t un_mhd_token; /* scsi watch request */
367 timeout_id_t un_resvd_timeid; /* for resvd recover */
370 ddi_eventcookie_t un_insert_event; /* insert event */
371 ddi_callback_id_t un_insert_cb_id; /* insert callback */
372 ddi_eventcookie_t un_remove_event; /* remove event */
373 ddi_callback_id_t un_remove_cb_id; /* remove callback */
375 uint_t un_start_stop_cycle_page; /* Saves start/stop */
377 timeout_id_t un_dcvb_timeid; /* dlyd cv broadcast */
383 union ocmap un_ocmap; /* open partition map */
384 struct kstat *un_pstats[NSDMAP]; /* partition statistics */
385 struct kstat *un_stats; /* disk statistics */
386 sd_unmapstats_t *un_unmapstats; /* UNMAP stats structure */
387 struct kstat *un_unmapstats_ks; /* UNMAP kstat */
388 kstat_t *un_errstats; /* for error statistics */
389 uint64_t un_exclopen; /* exclusive open bitmask */
390 ddi_devid_t un_devid; /* device id */
391 uint_t un_vpd_page_mask; /* Supported VPD pages */
399 un_f_arq_enabled :1, /* Auto request sense is */
401 un_f_blockcount_is_valid :1, /* The un_blockcount */
403 un_f_tgt_blocksize_is_valid :1, /* The un_tgt_blocksize */
405 un_f_allow_bus_device_reset :1, /* Driver may issue a BDR as */
407 un_f_is_fibre :1, /* The device supports fibre */
409 un_f_sync_cache_supported :1, /* sync cache cmd supported */
411 un_f_format_in_progress :1, /* The device is currently */
413 un_f_opt_queueing :1, /* Enable Command Queuing to */
415 un_f_opt_fab_devid :1, /* Disk has no valid/unique */
417 un_f_opt_disable_cache :1, /* Read/Write disk cache is */
419 un_f_cfg_is_atapi :1, /* This is an ATAPI device. */
420 un_f_write_cache_enabled :1, /* device return success on */
423 un_f_cfg_playmsf_bcd :1, /* Play Audio, BCD params. */
424 un_f_cfg_readsub_bcd :1, /* READ SUBCHANNEL BCD resp. */
425 un_f_cfg_read_toc_trk_bcd :1, /* track # is BCD */
426 un_f_cfg_read_toc_addr_bcd :1, /* address is BCD */
427 un_f_cfg_no_read_header :1, /* READ HEADER not supported */
428 un_f_cfg_read_cd_xd4 :1, /* READ CD opcode is 0xd4 */
429 un_f_mmc_cap :1, /* Device is MMC compliant */
430 un_f_mmc_writable_media :1, /* writable media in device */
431 un_f_dvdram_writable_device :1, /* DVDRAM device is writable */
432 un_f_cfg_cdda :1, /* READ CDDA supported */
433 un_f_cfg_tur_check :1, /* verify un_ncmds before tur */
435 un_f_use_adaptive_throttle :1, /* enable/disable adaptive */
437 un_f_pm_is_enabled :1, /* PM is enabled on this */
439 un_f_watcht_stopped :1, /* media watch thread flag */
440 un_f_pkstats_enabled :1, /* Flag to determine if */
443 un_f_disksort_disabled :1, /* Flag to disable disksort */
444 un_f_lun_reset_enabled :1, /* Set if target supports */
446 un_f_doorlock_supported :1, /* Device supports Doorlock */
447 un_f_start_stop_supported :1, /* device has motor */
448 un_f_reserved1 :1;
451 un_f_mboot_supported :1, /* mboot supported */
452 un_f_is_hotpluggable :1, /* hotpluggable */
453 un_f_has_removable_media :1, /* has removable media */
454 un_f_non_devbsize_supported :1, /* non-512 blocksize */
455 un_f_devid_supported :1, /* device ID supported */
456 un_f_eject_media_supported :1, /* media can be ejected */
457 un_f_chk_wp_open :1, /* check if write-protected */
459 un_f_descr_format_supported :1, /* support descriptor format */
461 un_f_check_start_stop :1, /* needs to check if */
465 un_f_monitor_media_state :1, /* need a watch thread to */
467 un_f_attach_spinup :1, /* spin up once the */
469 un_f_log_sense_supported :1, /* support log sense */
470 un_f_pm_supported :1, /* support power-management */
471 un_f_wcc_inprog :1, /* write cache change in */
473 un_f_ejecting :1, /* media is ejecting */
474 un_f_suppress_cache_flush :1, /* supress flush on */
476 un_f_sync_nv_supported :1, /* SYNC_NV */
478 un_f_sync_cache_required :1, /* flag to check if */
481 un_f_devid_transport_defined :1, /* devid defined by transport */
482 un_f_rmw_type :2, /* RMW type */
483 un_f_power_condition_disabled :1, /* power condition disabled */
485 un_f_power_condition_supported :1, /* support power condition */
487 un_f_pm_log_sense_smart :1, /* log sense support SMART */
489 un_f_is_solid_state :1, /* has solid state media */
490 un_f_is_rotational :1, /* spinning rust */
491 un_f_mmc_gesn_polling :1, /* use GET EVENT STATUS */
493 un_f_enable_rmw :1, /* Force RMW in sd driver */
494 un_f_expnevent :1,
495 un_f_cache_mode_changeable :1, /* can change cache mode */
496 un_f_reserved :2;
499 struct scsi_asq_key_strings *un_additional_codes;
515 kmutex_t un_pm_mutex;
516 int un_pm_count; /* indicates pm state */
517 timeout_id_t un_pm_timeid; /* timeout id for pm */
518 uint_t un_pm_busy;
519 kcondvar_t un_pm_busy_cv;
520 short un_power_level; /* Power Level */
521 uchar_t un_save_state;
522 kcondvar_t un_suspend_cv; /* power management */
523 kcondvar_t un_disk_busy_cv; /* wait for IO completion */
526 kcondvar_t un_state_cv; /* Cond Var on mediastate */
527 enum dkio_state un_mediastate; /* current media state */
528 enum dkio_state un_specified_mediastate; /* expected state */
529 opaque_t un_swr_token; /* scsi_watch request token */
532 struct kmem_cache *un_wm_cache; /* fast alloc in non-512 write case */
533 uint_t un_rmw_count; /* count of read-modify-writes */
534 struct sd_w_map *un_wm; /* head of sd_w_map chain */
535 uint64_t un_rmw_incre_count; /* count I/O */
536 timeout_id_t un_rmw_msg_timeid; /* for RMW message control */
539 uint64_t un_thin_flags;
542 sd_blk_limits_t un_blk_lim;
545 timeout_id_t un_startstop_timeid;
548 timeout_id_t un_direct_priority_timeid;
551 ulong_t un_tran_fatal_count;
553 timeout_id_t un_retry_timeid;
555 hrtime_t un_pm_idle_time;
556 timeout_id_t un_pm_idle_timeid;
561 struct buf *un_failfast_bp;
562 struct buf *un_failfast_headp;
563 struct buf *un_failfast_tailp;
564 uint32_t un_failfast_state;
566 short un_in_callback;
568 kcondvar_t un_wcc_cv; /* synchronize changes to */
575 kmutex_t un_fi_mutex;
576 uint_t sd_fi_buf_len;
577 char sd_fi_log[SD_FI_MAX_BUF];
578 struct sd_fi_pkt *sd_fi_fifo_pkt[SD_FI_MAX_ERROR];
579 struct sd_fi_xb *sd_fi_fifo_xb[SD_FI_MAX_ERROR];
580 struct sd_fi_un *sd_fi_fifo_un[SD_FI_MAX_ERROR];
581 struct sd_fi_arq *sd_fi_fifo_arq[SD_FI_MAX_ERROR];
582 uint_t sd_fi_fifo_start;
583 uint_t sd_fi_fifo_end;
584 uint_t sd_injection_mask;
588 cmlb_handle_t un_cmlbhandle;
594 void *un_fm_private;