diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-13 02:29:45 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-13 02:29:45 -0500 |
commit | 50630195bbdfe1ca775d94cd68a5f18bc1b717e4 (patch) | |
tree | ad1e44e89d714b2785fc33a5800488571db7a7c5 /drivers/scsi/libata-scsi.c | |
parent | be0d9b6c7aeaad1683059c00131cabd4c894c17c (diff) |
[libata] mark certain hardware (or drivers) with a no-atapi flag
Some hardware does not support the PACKET command at all.
Other hardware supports ATAPI, but the driver does something nasty such
as calling BUG() when an ATAPI command is issued.
For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI.
Initial version contributed by Ben Collins.
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 379e87089764..72ddba98f8fb 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -2173,9 +2173,12 @@ ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) | |||
2173 | if (unlikely(!ata_dev_present(dev))) | 2173 | if (unlikely(!ata_dev_present(dev))) |
2174 | return NULL; | 2174 | return NULL; |
2175 | 2175 | ||
2176 | if (!atapi_enabled) { | 2176 | if (!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) { |
2177 | if (unlikely(dev->class == ATA_DEV_ATAPI)) | 2177 | if (unlikely(dev->class == ATA_DEV_ATAPI)) { |
2178 | printk(KERN_WARNING "ata%u(%u): WARNING: ATAPI is %s, device ignored.\n", | ||
2179 | ap->id, dev->devno, atapi_enabled ? "not supported with this driver" : "disabled"); | ||
2178 | return NULL; | 2180 | return NULL; |
2181 | } | ||
2179 | } | 2182 | } |
2180 | 2183 | ||
2181 | return dev; | 2184 | return dev; |