diff options
| -rw-r--r-- | drivers/scsi/libata-core.c | 4 | ||||
| -rw-r--r-- | drivers/scsi/libata-scsi.c | 8 | ||||
| -rw-r--r-- | drivers/scsi/libata.h | 1 | ||||
| -rw-r--r-- | include/linux/libata.h | 1 |
4 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index dee4b12b0342..d824938d05c9 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
| @@ -75,6 +75,10 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc); | |||
| 75 | static unsigned int ata_unique_id = 1; | 75 | static unsigned int ata_unique_id = 1; |
| 76 | static struct workqueue_struct *ata_wq; | 76 | static struct workqueue_struct *ata_wq; |
| 77 | 77 | ||
| 78 | int atapi_enabled = 0; | ||
| 79 | module_param(atapi_enabled, int, 0444); | ||
| 80 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); | ||
| 81 | |||
| 78 | MODULE_AUTHOR("Jeff Garzik"); | 82 | MODULE_AUTHOR("Jeff Garzik"); |
| 79 | MODULE_DESCRIPTION("Library module for ATA devices"); | 83 | MODULE_DESCRIPTION("Library module for ATA devices"); |
| 80 | MODULE_LICENSE("GPL"); | 84 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 346eb36b1e31..55823765425c 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
| @@ -1470,10 +1470,10 @@ ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev) | |||
| 1470 | if (unlikely(!ata_dev_present(dev))) | 1470 | if (unlikely(!ata_dev_present(dev))) |
| 1471 | return NULL; | 1471 | return NULL; |
| 1472 | 1472 | ||
| 1473 | #ifndef ATA_ENABLE_ATAPI | 1473 | if (atapi_enabled) { |
| 1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) | 1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) |
| 1475 | return NULL; | 1475 | return NULL; |
| 1476 | #endif | 1476 | } |
| 1477 | 1477 | ||
| 1478 | return dev; | 1478 | return dev; |
| 1479 | } | 1479 | } |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 809c634afbcd..d608b3a0f6fe 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
| @@ -38,6 +38,7 @@ struct ata_scsi_args { | |||
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | /* libata-core.c */ | 40 | /* libata-core.c */ |
| 41 | extern int atapi_enabled; | ||
| 41 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | 42 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, |
| 42 | struct ata_device *dev); | 43 | struct ata_device *dev); |
| 43 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 44 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index fc05a9899288..1eaba4077e15 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
| 41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
| 42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
| 43 | #undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */ | ||
| 44 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 43 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some |
| 45 | * low-level drivers */ | 44 | * low-level drivers */ |
| 46 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ | 45 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ |
