linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22-rc4] libata: SiS180 pata support
@ 2007-06-05 23:04 Uwe Koziolek
  2007-06-05 23:08 ` Jeff Garzik
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uwe Koziolek @ 2007-06-05 23:04 UTC (permalink / raw)
  To: Alan, Jeff Garzik; +Cc: linux-ide

the PATA-port of SiS180 controller does not support a drive present status
in the pci configspace like the other SiS PATA controllers, check skipped.

Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>

--- a/drivers/ata/pata_sis.c	2007-06-05 22:17:10.000000000 +0200
+++ b/drivers/ata/pata_sis.c	2007-06-06 00:06:08.000000000 +0200
@@ -130,6 +130,20 @@
 
 
 /**
+ *	sis_enables_supported - Check if enable_bits are supported
+ *	@pdev: pci device
+ *
+ *	The combined PATA/SATA controller SiS180 does not support
+ *	the enable_bits in the PCI configspace
+ */
+
+static inline int sis_enables_supported(struct pci_dev *pdev)
+{
+	return ((pdev->device != 0x0180) && (pdev->device != 0x0181));
+}
+
+
+/**
  *	sis_pre_reset		-	probe begin
  *	@ap: ATA port
  *	@deadline: deadline jiffies for the operation
@@ -146,7 +160,8 @@
 
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
-	if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
+	if (sis_enables_supported(pdev) && 
+	    !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
 		return -ENOENT;
 
 	return ata_std_prereset(ap, deadline);


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

end of thread, other threads:[~2007-06-29 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-05 23:04 [PATCH 2.6.22-rc4] libata: SiS180 pata support Uwe Koziolek
2007-06-05 23:08 ` Jeff Garzik
2007-06-05 23:12 ` Alan Cox
2007-06-05 23:19 ` Jeff Garzik
2007-06-28 21:02   ` Uwe Koziolek
2007-06-28 21:17     ` Jeff Garzik
2007-06-28 21:36       ` Uwe Koziolek
2007-06-29 10:57         ` 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).