aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-07-30 18:52:40 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-31 01:47:05 -0400
commit2486fa561a3192bbbec39c7feef87a1e07bd6342 (patch)
tree4241264273c63714e4c2021e7de69aee8bb2b20c /drivers/ata/libata-core.c
parentbfce5e0179ad059035df28558724ff60af708e09 (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.c12
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;
120module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0); 120module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0);
121MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); 121MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)");
122 122
123int atapi_enabled = 1; 123static int atapi_enabled = 1;
124module_param(atapi_enabled, int, 0444); 124module_param(atapi_enabled, int, 0444);
125MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); 125MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)");
126 126
@@ -2142,6 +2142,16 @@ int ata_dev_configure(struct ata_device *dev)
2142 return 0; 2142 return 0;
2143 } 2143 }
2144 2144
2145 if ((!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) &&
2146 dev->class == ATA_DEV_ATAPI) {
2147 ata_dev_printk(dev, KERN_WARNING,
2148 "WARNING: ATAPI is %s, device ignored.\n",
2149 atapi_enabled ? "not supported with this driver"
2150 : "disabled");
2151 ata_dev_disable(dev);
2152 return 0;
2153 }
2154
2145 /* let ACPI work its magic */ 2155 /* let ACPI work its magic */
2146 rc = ata_acpi_on_devcfg(dev); 2156 rc = ata_acpi_on_devcfg(dev);
2147 if (rc) 2157 if (rc)