From 3f8ecd80153a5d88f28bc6f98fb4ea76fd4950cb Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Tue, 13 Dec 2005 02:32:01 -0500 Subject: [PATCH] --- yaml --- r: 29357 b: refs/heads/master c: e8b09428482deff1a9d7a36d371acee364182ec3 h: refs/heads/master i: 29355: dd44bc7980752f29de82accc7ccbc27f92bf53fd v: v3 --- [refs] | 2 +- trunk/drivers/scsi/libata-scsi.c | 7 +++++-- trunk/include/linux/libata.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 700ddb4d1f0b..2aa49d58fcbf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1397f837647d8b6b3c9253a7e713d203f3cbb26 +refs/heads/master: e8b09428482deff1a9d7a36d371acee364182ec3 diff --git a/trunk/drivers/scsi/libata-scsi.c b/trunk/drivers/scsi/libata-scsi.c index 2aef41112c43..f286a6f1c0db 100644 --- a/trunk/drivers/scsi/libata-scsi.c +++ b/trunk/drivers/scsi/libata-scsi.c @@ -2175,9 +2175,12 @@ ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) if (unlikely(!ata_dev_present(dev))) return NULL; - if (!atapi_enabled) { - if (unlikely(dev->class == ATA_DEV_ATAPI)) + if (!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) { + if (unlikely(dev->class == ATA_DEV_ATAPI)) { + printk(KERN_WARNING "ata%u(%u): WARNING: ATAPI is %s, device ignored.\n", + ap->id, dev->devno, atapi_enabled ? "not supported with this driver" : "disabled"); return NULL; + } } return dev; diff --git a/trunk/include/linux/libata.h b/trunk/include/linux/libata.h index b77f156e5768..596858e37cc1 100644 --- a/trunk/include/linux/libata.h +++ b/trunk/include/linux/libata.h @@ -123,6 +123,7 @@ enum { ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD * doesn't handle PIO interrupts */ ATA_FLAG_DEBUGMSG = (1 << 10), + ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */