linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch for IDE hang after resetting quirk drive
@ 2001-07-03 17:22 Dale Farnsworth
  2001-07-05  7:53 ` Andre Hedrick
  0 siblings, 1 reply; 2+ messages in thread
From: Dale Farnsworth @ 2001-07-03 17:22 UTC (permalink / raw)
  To: Andre Hedrick, linux-kernel

I have a Promise PDC20265 ide controller with one of the "quirk" drives,
a Quantum Fireballp LM30.  That drive has a bad sector and accessing
it would result in a DMA timeout.  Unfortunately, after the IDE driver
resets the controller, the drive never responded.

The following patch appears to correct the problem.  It duplicates
the workaround for "quirky" drives found in ide-features.c

-Dale

Dale Farnsworth		dale@farnsworth.org

--- oldlinux-2.4.5/drivers/ide/ide.c	Tue Jul  3 09:35:57 2001
+++ linux-2.4.5/drivers/ide/ide.c	Tue Jul  3 09:23:58 2001
@@ -758,7 +758,10 @@
 	 */
 	OUT_BYTE(drive->ctl|6,IDE_CONTROL_REG);	/* set SRST and nIEN */
 	udelay(10);			/* more than enough time */
-	OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);	/* clear SRST, leave nIEN */
+	if (drive->quirk_list == 2)
+		OUT_BYTE(drive->ctl, IDE_CONTROL_REG); /* clear SRST and nIEN */
+	else
+		OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);	/* clear SRST only */
 	udelay(10);			/* more than enough time */
 	hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
 	ide_set_handler (drive, &reset_pollfunc, HZ/20, NULL);

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

* Re: Patch for IDE hang after resetting quirk drive
  2001-07-03 17:22 Patch for IDE hang after resetting quirk drive Dale Farnsworth
@ 2001-07-05  7:53 ` Andre Hedrick
  0 siblings, 0 replies; 2+ messages in thread
From: Andre Hedrick @ 2001-07-05  7:53 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: linux-kernel


Looks valid will take!

Cheers,

Andre Hedrick
ASL Kernel Development
Linux ATA Development
-----------------------------------------------------------------------------
ASL, Inc.                                     Toll free: 1-877-ASL-3535
1757 Houret Court                             Fax: 1-408-941-2071
Milpitas, CA 95035                            Web: www.aslab.com

On Tue, 3 Jul 2001, Dale Farnsworth wrote:

> I have a Promise PDC20265 ide controller with one of the "quirk" drives,
> a Quantum Fireballp LM30.  That drive has a bad sector and accessing
> it would result in a DMA timeout.  Unfortunately, after the IDE driver
> resets the controller, the drive never responded.
> 
> The following patch appears to correct the problem.  It duplicates
> the workaround for "quirky" drives found in ide-features.c
> 
> -Dale
> 
> Dale Farnsworth		dale@farnsworth.org
> 
> --- oldlinux-2.4.5/drivers/ide/ide.c	Tue Jul  3 09:35:57 2001
> +++ linux-2.4.5/drivers/ide/ide.c	Tue Jul  3 09:23:58 2001
> @@ -758,7 +758,10 @@
>  	 */
>  	OUT_BYTE(drive->ctl|6,IDE_CONTROL_REG);	/* set SRST and nIEN */
>  	udelay(10);			/* more than enough time */
> -	OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);	/* clear SRST, leave nIEN */
> +	if (drive->quirk_list == 2)
> +		OUT_BYTE(drive->ctl, IDE_CONTROL_REG); /* clear SRST and nIEN */
> +	else
> +		OUT_BYTE(drive->ctl|2,IDE_CONTROL_REG);	/* clear SRST only */
>  	udelay(10);			/* more than enough time */
>  	hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE;
>  	ide_set_handler (drive, &reset_pollfunc, HZ/20, NULL);
> 


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

end of thread, other threads:[~2001-07-05  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-03 17:22 Patch for IDE hang after resetting quirk drive Dale Farnsworth
2001-07-05  7:53 ` Andre Hedrick

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).