diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:40 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-31 05:27:40 -0400 |
commit | 3edebac41bab7e146578ad9e723ee7fff71c99c0 (patch) | |
tree | c5f1276f7c0e93b51ad67b12e241b37c05f4f38a /include | |
parent | 5a04bf4befa8bffa012eedc3a0903c158b9131a9 (diff) |
[PATCH] libata-hp-prep: store attached SCSI device
Add device persistent field dev->sdev and store the attached SCSI
device. With hotplug, libata needs to know the attached SCSI device
to offline and detach it, but scsi_device_lookup() cannot be used
because libata will reuse SCSI ID numbers - dead but not gone devices
(due to zombie opens, etc...) interfere with the lookup.
dev->sdev doesn't hold reference to the SCSI device. It's cleared
when the SCSI device goes away.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 10dc235ad8bc..c0513c752751 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -413,6 +413,7 @@ struct ata_device { | |||
413 | struct ata_port *ap; | 413 | struct ata_port *ap; |
414 | unsigned int devno; /* 0 or 1 */ | 414 | unsigned int devno; /* 0 or 1 */ |
415 | unsigned long flags; /* ATA_DFLAG_xxx */ | 415 | unsigned long flags; /* ATA_DFLAG_xxx */ |
416 | struct scsi_device *sdev; /* attached SCSI device */ | ||
416 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 417 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
417 | u64 n_sectors; /* size of device, if ATA */ | 418 | u64 n_sectors; /* size of device, if ATA */ |
418 | unsigned int class; /* ATA_DEV_xxx */ | 419 | unsigned int class; /* ATA_DEV_xxx */ |