linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pata_hpt366: Enable bits are unreliable so don't use them
@ 2007-05-21 13:52 Alan Cox
  2007-05-22  0:02 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-05-21 13:52 UTC (permalink / raw)
  To: jeff, akpm, linux-ide

Various people had problems with both old and new IDE when hpt366 enable
bits started getting honoured. It turns out they are not reliable so
don't rely on them

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.22-rc1-mm1/drivers/ata/pata_hpt366.c linux-2.6.22-rc1-mm1/drivers/ata/pata_hpt366.c
--- linux.vanilla-2.6.22-rc1-mm1/drivers/ata/pata_hpt366.c	2007-05-18 16:21:46.000000000 +0100
+++ linux-2.6.22-rc1-mm1/drivers/ata/pata_hpt366.c	2007-05-18 17:15:23.000000000 +0100
@@ -220,32 +220,6 @@
 	return ATA_CBL_PATA80;
 }
 
-static int hpt36x_pre_reset(struct ata_port *ap, unsigned long deadline)
-{
-	static const struct pci_bits hpt36x_enable_bits[] = {
-		{ 0x50, 1, 0x04, 0x04 },
-		{ 0x54, 1, 0x04, 0x04 }
-	};
-	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-
-	if (!pci_test_config_bits(pdev, &hpt36x_enable_bits[ap->port_no]))
-		return -ENOENT;
-
-	return ata_std_prereset(ap, deadline);
-}
-
-/**
- *	hpt36x_error_handler	-	reset the hpt36x bus
- *	@ap: ATA port to reset
- *
- *	Perform the reset handling for the 366/368
- */
-
-static void hpt36x_error_handler(struct ata_port *ap)
-{
-	ata_bmdma_drive_eh(ap, hpt36x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
 /**
  *	hpt366_set_piomode		-	PIO setup
  *	@ap: ATA interface
@@ -351,7 +325,7 @@
 
 	.freeze		= ata_bmdma_freeze,
 	.thaw		= ata_bmdma_thaw,
-	.error_handler	= hpt36x_error_handler,
+	.error_handler	= ata_bmdma_error_handler,
 	.post_internal_cmd = ata_bmdma_post_internal_cmd,
 	.cable_detect	= hpt36x_cable_detect,
 

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

* Re: [PATCH] pata_hpt366: Enable bits are unreliable so don't use them
  2007-05-21 13:52 [PATCH] pata_hpt366: Enable bits are unreliable so don't use them Alan Cox
@ 2007-05-22  0:02 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-05-22  0:02 UTC (permalink / raw)
  To: Alan Cox; +Cc: akpm, linux-ide

Alan Cox wrote:
> Various people had problems with both old and new IDE when hpt366 enable
> bits started getting honoured. It turns out they are not reliable so
> don't rely on them
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

applied



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

end of thread, other threads:[~2007-05-22  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 13:52 [PATCH] pata_hpt366: Enable bits are unreliable so don't use them Alan Cox
2007-05-22  0:02 ` 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).