All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pata_cmd64x: Restore cable method
@ 2007-03-08 19:28 Alan Cox
  2007-03-09 13:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-03-08 19:28 UTC (permalink / raw)
  To: akpm, linux-ide

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.21-rc3-mm2/drivers/ata/pata_cmd64x.c linux-2.6.21-rc3-mm2/drivers/ata/pata_cmd64x.c
--- linux.vanilla-2.6.21-rc3-mm2/drivers/ata/pata_cmd64x.c	2007-03-08 16:01:10.000000000 +0000
+++ linux-2.6.21-rc3-mm2/drivers/ata/pata_cmd64x.c	2007-03-08 16:45:32.000000000 +0000
@@ -75,13 +75,7 @@
 	DTPR1		= 0x7C
 };
 
-static int cmd64x_pre_reset(struct ata_port *ap, unsigned long deadline)
-{
-	ap->cbl = ATA_CBL_PATA40;
-	return ata_std_prereset(ap, deadline);
-}
-
-static int cmd648_pre_reset(struct ata_port *ap, unsigned long deadline)
+static int cmd648_cable_detect(struct ata_port *ap)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 	u8 r;
@@ -89,21 +83,8 @@
 	/* Check cable detect bits */
 	pci_read_config_byte(pdev, BMIDECSR, &r);
 	if (r & (1 << ap->port_no))
-		ap->cbl = ATA_CBL_PATA80;
-	else
-		ap->cbl = ATA_CBL_PATA40;
-
-	return ata_std_prereset(ap, deadline);
-}
-
-static void cmd64x_error_handler(struct ata_port *ap)
-{
-	return ata_bmdma_drive_eh(ap, cmd64x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
-static void cmd648_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, cmd648_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
+		return ATA_CBL_PATA80;
+	return ATA_CBL_PATA40;
 }
 
 /**
@@ -304,8 +285,9 @@
 
 	.freeze		= ata_bmdma_freeze,
 	.thaw		= ata_bmdma_thaw,
-	.error_handler	= cmd64x_error_handler,
+	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
+	.cable_detect	= ata_cable_40wire,
 
 	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= ata_bmdma_start,
@@ -338,8 +320,9 @@
 
 	.freeze		= ata_bmdma_freeze,
 	.thaw		= ata_bmdma_thaw,
-	.error_handler	= cmd64x_error_handler,
+	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
+	.cable_detect	= ata_cable_40wire,
 
 	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= ata_bmdma_start,
@@ -372,8 +355,9 @@
 
 	.freeze		= ata_bmdma_freeze,
 	.thaw		= ata_bmdma_thaw,
-	.error_handler	= cmd648_error_handler,
+	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
+	.cable_detect	= cmd648_cable_detect,
 
 	.bmdma_setup 	= ata_bmdma_setup,
 	.bmdma_start 	= ata_bmdma_start,

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

* Re: [PATCH] pata_cmd64x: Restore cable method
  2007-03-08 19:28 [PATCH] pata_cmd64x: Restore cable method Alan Cox
@ 2007-03-09 13:26 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-09 13:26 UTC (permalink / raw)
  To: Alan Cox; +Cc: Andrew Morton, linux-ide

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

applied, as part of a jumbo patch.

also applied in the jumbo patch: pata_cs5520, pata_cs5530, pata_hpt3x3, 
pata_isapnp, pata_ixp4xx_cf, pata_legacy, pata_oldpiix


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-08 19:28 [PATCH] pata_cmd64x: Restore cable method Alan Cox
2007-03-09 13:26 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.