• Home
  • Raw
  • Download

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

1 /* SPDX-License-Identifier: GPL-2.0 */
47 * originate in the mid-layer) */
84 /* put union of data structures, for non-simple event types,
90 * struct scsi_vpd - SCSI Vital Product Data
105 /* the next two are protected by the host->host_lock */
120 unsigned long queue_ramp_up_period; /* ramp up period in jiffies */
128 * vendor-specific cmd's */
131 void *hostdata; /* available to low-level driver */
167 unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */
173 unsigned use_10_for_rw:1; /* first try 10-byte read / write */
174 unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
205 unsigned rpm_autosuspend:1; /* Enable runtime autosuspend at device
249 to_scsi_device(class_dev->parent)
252 dev_dbg(&(sdev)->sdev_gendev, fmt, ##a)
270 if ((scmd)->request->rq_disk) \
271 sdev_dbg((scmd)->device, "[%s] " fmt, \
272 (scmd)->request->rq_disk->disk_name, ##a);\
274 sdev_dbg((scmd)->device, fmt, ##a); \
324 void *hostdata; /* available to low-level driver */
332 return to_scsi_target(sdev->sdev_gendev.parent); in scsi_target()
335 to_scsi_target(class_dev->parent)
338 dev_printk(prefix, &(starget)->dev, fmt, ##a)
371 * shost_for_each_device - iterate over all devices of a host
385 * __shost_for_each_device - iterate over all devices of a host (UNLOCKED)
391 * protected by shost->host_lock.
398 list_for_each_entry((sdev), &((shost)->__devices), siblings)
480 return device_reprobe(&sdev->sdev_gendev); in scsi_device_reprobe()
485 return sdev->channel; in sdev_channel()
490 return sdev->id; in sdev_id()
493 #define scmd_id(scmd) sdev_id((scmd)->device)
494 #define scmd_channel(scmd) sdev_channel((scmd)->device)
501 return (sdev->sdev_state != SDEV_OFFLINE && in scsi_device_online()
502 sdev->sdev_state != SDEV_TRANSPORT_OFFLINE && in scsi_device_online()
503 sdev->sdev_state != SDEV_DEL); in scsi_device_online()
507 return sdev->sdev_state == SDEV_BLOCK || in scsi_device_blocked()
508 sdev->sdev_state == SDEV_CREATED_BLOCK; in scsi_device_blocked()
512 return sdev->sdev_state == SDEV_CREATED || in scsi_device_created()
513 sdev->sdev_state == SDEV_CREATED_BLOCK; in scsi_device_created()
523 return sdev->sdtr; in scsi_device_sync()
527 return sdev->wdtr; in scsi_device_wide()
531 return sdev->ppr; in scsi_device_dt()
535 if (sdev->inquiry_len < 57) in scsi_device_dt_only()
537 return (sdev->inquiry[56] & 0x0c) == 0x04; in scsi_device_dt_only()
541 if (sdev->inquiry_len < 57) in scsi_device_ius()
543 return sdev->inquiry[56] & 0x01; in scsi_device_ius()
547 if (sdev->inquiry_len < 57) in scsi_device_qas()
549 return sdev->inquiry[56] & 0x02; in scsi_device_qas()
553 return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1; in scsi_device_enclosure()
558 if (sdev->no_dif) in scsi_device_protection()
561 return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); in scsi_device_protection()
566 return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0; in scsi_device_tpgs()
570 * scsi_device_supports_vpd - test if a device supports VPD pages
575 * SCSI level is at least SPC-3 and 'skip_vpd_pages' is not set.
582 if (sdev->try_vpd_pages) in scsi_device_supports_vpd()
585 * Although VPD inquiries can go to SCSI-2 type devices, in scsi_device_supports_vpd()
587 * we currently ask for are mandatory for SPC-2 and beyond in scsi_device_supports_vpd()
589 if (sdev->scsi_level >= SCSI_SPC_2 && !sdev->skip_vpd_pages) in scsi_device_supports_vpd()
595 MODULE_ALIAS("scsi:t-" __stringify(type) "*")
596 #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"