diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-26 12:53:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-26 13:34:27 -0400 |
commit | c961922b73dab429a759f560952fd4c3f60bd6b3 (patch) | |
tree | cbd6d6424d508fd208ae9992c1cf11b3b8a91fb1 /drivers/ata/pata_mpiix.c | |
parent | 4735ebedf37731160e3d3efc9fc9d4939c66fefa (diff) |
[PATCH] libata-eh: Remove layering violation and duplication when handling absent ports
This removes the layering violation where drivers have to fiddle
directly with EH flags. Instead we now recognize -ENOENT means "no port"
and do the handling in the core code.
This also removes an instance of a call to disable the port, and an
identical printk from each driver doing this. Even better - future rule
changes will be in one place only.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_mpiix.c')
-rw-r--r-- | drivers/ata/pata_mpiix.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index 1958c4ed09a..3c65393c1f0 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * The driver conciously keeps this logic internally to avoid pushing quirky | 18 | * The driver conciously keeps this logic internally to avoid pushing quirky |
19 | * PATA history into the clean libata layer. | 19 | * PATA history into the clean libata layer. |
20 | * | 20 | * |
21 | * Thinkpad specific note: If you boot an MPIIX using thinkpad with a PCMCIA | 21 | * Thinkpad specific note: If you boot an MPIIX using a thinkpad with a PCMCIA |
22 | * hard disk present this driver will not detect it. This is not a bug. In this | 22 | * hard disk present this driver will not detect it. This is not a bug. In this |
23 | * configuration the secondary port of the MPIIX is disabled and the addresses | 23 | * configuration the secondary port of the MPIIX is disabled and the addresses |
24 | * are decoded by the PCMCIA bridge and therefore are for a generic IDE driver | 24 | * are decoded by the PCMCIA bridge and therefore are for a generic IDE driver |
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/libata.h> | 35 | #include <linux/libata.h> |
36 | 36 | ||
37 | #define DRV_NAME "pata_mpiix" | 37 | #define DRV_NAME "pata_mpiix" |
38 | #define DRV_VERSION "0.7.1" | 38 | #define DRV_VERSION "0.7.2" |
39 | 39 | ||
40 | enum { | 40 | enum { |
41 | IDETIM = 0x6C, /* IDE control register */ | 41 | IDETIM = 0x6C, /* IDE control register */ |
@@ -54,11 +54,8 @@ static int mpiix_pre_reset(struct ata_port *ap) | |||
54 | { 0x6F, 1, 0x80, 0x80 } | 54 | { 0x6F, 1, 0x80, 0x80 } |
55 | }; | 55 | }; |
56 | 56 | ||
57 | if (!pci_test_config_bits(pdev, &mpiix_enable_bits[ap->port_no])) { | 57 | if (!pci_test_config_bits(pdev, &mpiix_enable_bits[ap->port_no])) |
58 | ata_port_disable(ap); | 58 | return -ENOENT; |
59 | printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); | ||
60 | return 0; | ||
61 | } | ||
62 | ap->cbl = ATA_CBL_PATA40; | 59 | ap->cbl = ATA_CBL_PATA40; |
63 | return ata_std_prereset(ap); | 60 | return ata_std_prereset(ap); |
64 | } | 61 | } |