From c961922b73dab429a759f560952fd4c3f60bd6b3 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 26 Sep 2006 17:53:38 +0100 Subject: [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 Signed-off-by: Jeff Garzik --- drivers/ata/pata_sl82c105.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/ata/pata_sl82c105.c') diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index f8499786917a..b3bc607f0293 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c @@ -19,7 +19,7 @@ #include #define DRV_NAME "pata_sl82c105" -#define DRV_VERSION "0.2.2" +#define DRV_VERSION "0.2.3" enum { /* @@ -49,11 +49,8 @@ static int sl82c105_pre_reset(struct ata_port *ap) }; struct pci_dev *pdev = to_pci_dev(ap->host->dev); - if (ap->port_no && !pci_test_config_bits(pdev, &sl82c105_enable_bits[ap->port_no])) { - ata_port_disable(ap); - dev_printk(KERN_INFO, &pdev->dev, "port disabled. ignoring.\n"); - return 0; - } + if (ap->port_no && !pci_test_config_bits(pdev, &sl82c105_enable_bits[ap->port_no])) + return -ENOENT; ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); } -- cgit v1.2.3