diff options
author | Tejun Heo <tj@kernel.org> | 2008-07-31 07:52:40 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-31 01:47:05 -0400 |
commit | 2486fa561a3192bbbec39c7feef87a1e07bd6342 (patch) | |
tree | 4241264273c63714e4c2021e7de69aee8bb2b20c /drivers/ata/libata-core.c | |
parent | bfce5e0179ad059035df28558724ff60af708e09 (diff) |
libata: update atapi disable handling
Global and per-LLD ATAPI disable checks were done in the command issue
path probably because it was left out during EH conversion. On
affected machines, this can cause lots of warning messages. Move them
to where they belong - the probing path.
Reported by Chunbo Luo.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Chunbo Luo <chunbo.luo@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9bef1a84fe3..9cd04f68410 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -120,7 +120,7 @@ static char ata_force_param_buf[PAGE_SIZE] __initdata; module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0); MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); -int atapi_enabled = 1; +static int atapi_enabled = 1; module_param(atapi_enabled, int, 0444); MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); @@ -2142,6 +2142,16 @@ int ata_dev_configure(struct ata_device *dev) return 0; } + if ((!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) && + dev->class == ATA_DEV_ATAPI) { + ata_dev_printk(dev, KERN_WARNING, + "WARNING: ATAPI is %s, device ignored.\n", + atapi_enabled ? "not supported with this driver" + : "disabled"); + ata_dev_disable(dev); + return 0; + } + /* let ACPI work its magic */ rc = ata_acpi_on_devcfg(dev); if (rc) |