linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata_piix: Remove ugly layering violation
@ 2007-03-07 16:13 Alan Cox
  2007-03-09 12:29 ` Jeff Garzik
  2007-03-09 12:38 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2007-03-07 16:13 UTC (permalink / raw)
  To: akpm, jgarzik, linux-ide

A while ago I modified the libata code so that drivers can return -ENOENT
for unknown ports not fiddle with the EH flags and print stuff directly.
Somewhere along the line ata_piix didn't get fully converted.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.21-rc2-mm2/drivers/ata/ata_piix.c linux-2.6.21-rc2-mm2/drivers/ata/ata_piix.c
--- linux.vanilla-2.6.21-rc2-mm2/drivers/ata/ata_piix.c	2007-03-06 23:09:46.000000000 +0000
+++ linux-2.6.21-rc2-mm2/drivers/ata/ata_piix.c	2007-03-06 23:33:53.000000000 +0000
@@ -93,7 +93,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME	"ata_piix"
-#define DRV_VERSION	"2.10"
+#define DRV_VERSION	"2.10ac1"
 
 enum {
 	PIIX_IOCFG		= 0x54, /* IDE I/O configuration register */
@@ -667,14 +667,9 @@
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
-	if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) {
-		ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
-		ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
-		return 0;
-	}
-
+	if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no]))
+		return -ENOENT;
 	ich_pata_cbl_detect(ap);
-
 	return ata_std_prereset(ap);
 }
 

 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-09 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-07 16:13 [PATCH] ata_piix: Remove ugly layering violation Alan Cox
2007-03-09 12:29 ` Jeff Garzik
2007-03-09 14:06   ` Alan Cox
2007-03-09 12:38 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).