Lines Matching +full:autosuspend +full:- +full:period

1 /* SPDX-License-Identifier: GPL-2.0 */
8 #include <linux/blk-mq.h>
49 * originate in the mid-layer) */
86 /* put union of data structures, for non-simple event types,
92 * struct scsi_vpd - SCSI Vital Product Data
107 /* the next two are protected by the host->host_lock */
122 unsigned long queue_ramp_up_period; /* ramp up period in jiffies */
130 * vendor-specific cmd's */
133 void *hostdata; /* available to low-level driver */
163 * If true, let the high-level device driver (sd) manage the device
170 * If true, let the high-level device driver (sd) manage the device
176 * If true, let the high-level device driver (sd) manage the device
182 * If set and if the device is runtime suspended, ask the high-level
199 unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */
205 unsigned use_10_for_rw:1; /* first try 10-byte read / write */
206 unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
238 unsigned rpm_autosuspend:1; /* Enable runtime autosuspend at device
292 to_scsi_device(class_dev->parent)
295 dev_dbg(&(sdev)->sdev_gendev, fmt, ##a)
315 if (__rq->q->disk) \
316 sdev_dbg((scmd)->device, "[%s] " fmt, \
317 __rq->q->disk->disk_name, ##a); \
319 sdev_dbg((scmd)->device, fmt, ##a); \
369 void *hostdata; /* available to low-level driver */
377 return to_scsi_target(sdev->sdev_gendev.parent); in scsi_target()
380 to_scsi_target(class_dev->parent)
383 dev_printk(prefix, &(starget)->dev, fmt, ##a)
418 * shost_for_each_device - iterate over all devices of a host
432 * __shost_for_each_device - iterate over all devices of a host (UNLOCKED)
438 * protected by shost->host_lock.
445 list_for_each_entry((sdev), &((shost)->__devices), siblings)
510 #define SCMD_FAILURE_NO_LIMIT -1
568 return device_reprobe(&sdev->sdev_gendev); in scsi_device_reprobe()
573 return sdev->channel; in sdev_channel()
578 return sdev->id; in sdev_id()
581 #define scmd_id(scmd) sdev_id((scmd)->device)
582 #define scmd_channel(scmd) sdev_channel((scmd)->device)
589 return (sdev->sdev_state != SDEV_OFFLINE && in scsi_device_online()
590 sdev->sdev_state != SDEV_TRANSPORT_OFFLINE && in scsi_device_online()
591 sdev->sdev_state != SDEV_DEL); in scsi_device_online()
595 return sdev->sdev_state == SDEV_BLOCK || in scsi_device_blocked()
596 sdev->sdev_state == SDEV_CREATED_BLOCK; in scsi_device_blocked()
600 return sdev->sdev_state == SDEV_CREATED || in scsi_device_created()
601 sdev->sdev_state == SDEV_CREATED_BLOCK; in scsi_device_created()
611 return sdev->sdtr; in scsi_device_sync()
615 return sdev->wdtr; in scsi_device_wide()
619 return sdev->ppr; in scsi_device_dt()
623 if (sdev->inquiry_len < 57) in scsi_device_dt_only()
625 return (sdev->inquiry[56] & 0x0c) == 0x04; in scsi_device_dt_only()
629 if (sdev->inquiry_len < 57) in scsi_device_ius()
631 return sdev->inquiry[56] & 0x01; in scsi_device_ius()
635 if (sdev->inquiry_len < 57) in scsi_device_qas()
637 return sdev->inquiry[56] & 0x02; in scsi_device_qas()
641 return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1; in scsi_device_enclosure()
646 if (sdev->no_dif) in scsi_device_protection()
649 return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); in scsi_device_protection()
654 return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0; in scsi_device_tpgs()
658 * scsi_device_supports_vpd - test if a device supports VPD pages
663 * SCSI level is at least SPC-3 and 'skip_vpd_pages' is not set.
670 if (sdev->try_vpd_pages) in scsi_device_supports_vpd()
673 * Although VPD inquiries can go to SCSI-2 type devices, in scsi_device_supports_vpd()
675 * we currently ask for are mandatory for SPC-2 and beyond in scsi_device_supports_vpd()
677 if (sdev->scsi_level >= SCSI_SPC_2 && !sdev->skip_vpd_pages) in scsi_device_supports_vpd()
684 return sbitmap_weight(&sdev->budget_map); in scsi_device_busy()
688 MODULE_ALIAS("scsi:t-" __stringify(type) "*")
689 #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"