linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22-rc2] libata: sata_sis fixes
@ 2007-05-25  7:48 Uwe Koziolek
  2007-05-25  8:23 ` Jeff Garzik
  2007-05-25 14:32 ` Alan Cox
  0 siblings, 2 replies; 9+ messages in thread
From: Uwe Koziolek @ 2007-05-25  7:48 UTC (permalink / raw)
  To: Jeff Garzik, htejun, alan; +Cc: linux-ide

The sata_sis driver supports SATA and PATA ports. The broken support
of both types in one controller is fixed.

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/sata_sis.c	2007-05-22 11:05:38.000000000 +0200
+++ b/drivers/ata/sata_sis.c	2007-05-23 00:24:28.000000000 +0200
@@ -255,7 +255,7 @@
 {
 	static int printed_version;
 	struct ata_port_info pi = sis_port_info;
-	const struct ata_port_info *ppi[] = { &pi, NULL };
+	const struct ata_port_info *ppi[] = { &pi, &pi };
 	struct ata_host *host;
 	u32 genctl, val;
 	u8 pmr;
--- a/drivers/ata/pata_sis.c	2007-05-22 11:05:38.000000000 +0200
+++ b/drivers/ata/pata_sis.c	2007-05-25 07:50:50.000000000 +0200
@@ -146,7 +146,8 @@
 
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
-	if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
+	if ((pdev->device != 0x0180) && (pdev->device != 0x0181) &&
+	    !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
 		return -ENOENT;
 
 	return ata_std_prereset(ap, deadline);


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 2.6.22-rc2] libata: sata_sis fixes
@ 2007-05-23 23:31 Uwe Koziolek
  2007-05-24  0:22 ` Alan Cox
  2007-05-24  6:09 ` Jeff Garzik
  0 siblings, 2 replies; 9+ messages in thread
From: Uwe Koziolek @ 2007-05-23 23:31 UTC (permalink / raw)
  To: htejun, alan, jeff; +Cc: linux-ide

The sata_sis driver supports SATA and PATA ports. The broken support
of both types in one controller is fixed.

the pata133 sis controllers does not support a drive present status
in the pci configspace like the older sis controllers, check removed.

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

--- a/drivers/ata/sata_sis.c	2007-05-22 11:05:38.000000000 +0200
+++ b/drivers/ata/sata_sis.c	2007-05-23 00:24:28.000000000 +0200
@@ -255,7 +255,7 @@
 {
 	static int printed_version;
 	struct ata_port_info pi = sis_port_info;
-	const struct ata_port_info *ppi[] = { &pi, NULL };
+	const struct ata_port_info *ppi[] = { &pi, &pi };
 	struct ata_host *host;
 	u32 genctl, val;
 	u8 pmr;
--- a/drivers/ata/pata_sis.c	2007-05-22 11:05:38.000000000 +0200
+++ b/drivers/ata/pata_sis.c	2007-05-23 23:10:33.000000000 +0200
@@ -154,6 +154,19 @@
 
 
 /**
+ *	sis_133_error_handler - Probe specified port on PATA host controller
+ *	@ap: Port to probe
+ *
+ *	LOCKING:
+ *	None (inherited from caller).
+ */
+
+static void sis_133_error_handler(struct ata_port *ap)
+{
+	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, NULL, ata_std_postreset);
+}
+
+/**
  *	sis_error_handler - Probe specified port on PATA host controller
  *	@ap: Port to probe
  *
@@ -540,7 +553,7 @@
 
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
-	.error_handler		= sis_error_handler,
+	.error_handler		= sis_133_error_handler,
 	.post_internal_cmd	= ata_bmdma_post_internal_cmd,
 	.cable_detect		= sis_133_cable_detect,
 


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

end of thread, other threads:[~2007-06-04 20:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25  7:48 [PATCH 2.6.22-rc2] libata: sata_sis fixes Uwe Koziolek
2007-05-25  8:23 ` Jeff Garzik
2007-05-25 14:32 ` Alan Cox
2007-05-30  8:20   ` Uwe Koziolek
2007-06-04 15:30     ` Alan Cox
2007-06-04 20:24       ` Uwe Koziolek
  -- strict thread matches above, loose matches on Subject: below --
2007-05-23 23:31 Uwe Koziolek
2007-05-24  0:22 ` Alan Cox
2007-05-24  6:09 ` 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).