Comments
Patch
@@ -3445,6 +3445,8 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
dev->sdev = sdev;
scsi_device_put(sdev);
ata_acpi_bind(dev);
+ if (dev->flags & ATA_DFLAG_DA)
+ sdev->power_off = 1;
} else {
dev->sdev = NULL;
}
@@ -151,6 +151,7 @@ struct scsi_device {
unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */
unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
unsigned is_visible:1; /* is the device visible in sysfs */
+ unsigned power_off:1; /* Device supports runtime power off */
DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
struct list_head event_list; /* asserted events */