linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: part fix the highpoint timing/overclock bug
@ 2003-02-18 18:33 Alan Cox
  2003-02-20  4:18 ` Andre Hedrick
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2003-02-18 18:33 UTC (permalink / raw)
  To: torvalds, linux-kernel

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.61/drivers/ide/pci/hpt366.c linux-2.5.61-ac2/drivers/ide/pci/hpt366.c
--- linux-2.5.61/drivers/ide/pci/hpt366.c	2003-02-10 18:38:43.000000000 +0000
+++ linux-2.5.61-ac2/drivers/ide/pci/hpt366.c	2003-02-18 18:06:19.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/hpt366.c		Version 0.34	Sept 17, 2002
+ * linux/drivers/ide/pci/hpt366.c		Version 0.34	Sept 17, 2002
  *
  * Copyright (C) 1999-2002		Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
@@ -807,7 +807,7 @@
 	} else if (freq < 0xc8) {
 		pll = F_LOW_PCI_50;
 		if (hpt_minimum_revision(dev,8))
-			return -EOPNOTSUPP;
+			pci_set_drvdata(dev, NULL);
 		else if (hpt_minimum_revision(dev,5))
 			pci_set_drvdata(dev, (void *) fifty_base_hpt372);
 		else if (hpt_minimum_revision(dev,4))
@@ -820,7 +820,7 @@
 		if (hpt_minimum_revision(dev,8))
 		{
 			printk(KERN_ERR "HPT37x: 66MHz timings are not supported.\n");
-			return -EOPNOTSUPP;
+			pci_set_drvdata(dev, NULL);
 		}
 		else if (hpt_minimum_revision(dev,5))
 			pci_set_drvdata(dev, (void *) sixty_six_base_hpt372);
@@ -923,7 +923,7 @@
 	if (!pci_get_drvdata(dev))
 	{
 		printk(KERN_ERR "hpt366: unknown bus timing.\n");
-		return -EOPNOTSUPP;
+		pci_set_drvdata(dev, NULL);
 	}
 	return 0;
 }
@@ -1061,6 +1061,12 @@
 
 	if (!dmabase)
 		return;
+		
+	if(pci_get_drvdata(hwif->pci_dev) == NULL)
+	{
+		printk(KERN_WARNING "hpt: no known IDE timings, disabling DMA.\n");
+		return;
+	}
 
 	dma_old = hwif->INB(dmabase+2);
 

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

* Re: PATCH: part fix the highpoint timing/overclock bug
  2003-02-18 18:33 PATCH: part fix the highpoint timing/overclock bug Alan Cox
@ 2003-02-20  4:18 ` Andre Hedrick
  2003-02-20 15:13   ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Hedrick @ 2003-02-20  4:18 UTC (permalink / raw)
  To: Alan Cox; +Cc: torvalds, linux-kernel


That will deadlock it into a death spiral beause PIO is not setup either,
but I like the warning!


Andre Hedrick
LAD Storage Consulting Group

On Tue, 18 Feb 2003, Alan Cox wrote:

> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.61/drivers/ide/pci/hpt366.c linux-2.5.61-ac2/drivers/ide/pci/hpt366.c
> --- linux-2.5.61/drivers/ide/pci/hpt366.c	2003-02-10 18:38:43.000000000 +0000
> +++ linux-2.5.61-ac2/drivers/ide/pci/hpt366.c	2003-02-18 18:06:19.000000000 +0000
> @@ -1,5 +1,5 @@
>  /*
> - * linux/drivers/ide/hpt366.c		Version 0.34	Sept 17, 2002
> + * linux/drivers/ide/pci/hpt366.c		Version 0.34	Sept 17, 2002
>   *
>   * Copyright (C) 1999-2002		Andre Hedrick <andre@linux-ide.org>
>   * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
> @@ -807,7 +807,7 @@
>  	} else if (freq < 0xc8) {
>  		pll = F_LOW_PCI_50;
>  		if (hpt_minimum_revision(dev,8))
> -			return -EOPNOTSUPP;
> +			pci_set_drvdata(dev, NULL);
>  		else if (hpt_minimum_revision(dev,5))
>  			pci_set_drvdata(dev, (void *) fifty_base_hpt372);
>  		else if (hpt_minimum_revision(dev,4))
> @@ -820,7 +820,7 @@
>  		if (hpt_minimum_revision(dev,8))
>  		{
>  			printk(KERN_ERR "HPT37x: 66MHz timings are not supported.\n");
> -			return -EOPNOTSUPP;
> +			pci_set_drvdata(dev, NULL);
>  		}
>  		else if (hpt_minimum_revision(dev,5))
>  			pci_set_drvdata(dev, (void *) sixty_six_base_hpt372);
> @@ -923,7 +923,7 @@
>  	if (!pci_get_drvdata(dev))
>  	{
>  		printk(KERN_ERR "hpt366: unknown bus timing.\n");
> -		return -EOPNOTSUPP;
> +		pci_set_drvdata(dev, NULL);
>  	}
>  	return 0;
>  }
> @@ -1061,6 +1061,12 @@
>  
>  	if (!dmabase)
>  		return;
> +		
> +	if(pci_get_drvdata(hwif->pci_dev) == NULL)
> +	{
> +		printk(KERN_WARNING "hpt: no known IDE timings, disabling DMA.\n");
> +		return;
> +	}
>  
>  	dma_old = hwif->INB(dmabase+2);
>  
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


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

* Re: PATCH: part fix the highpoint timing/overclock bug
  2003-02-20  4:18 ` Andre Hedrick
@ 2003-02-20 15:13   ` Alan Cox
  2003-02-21  7:01     ` Andre Hedrick
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2003-02-20 15:13 UTC (permalink / raw)
  To: Andre Hedrick; +Cc: Linus Torvalds, Linux Kernel Mailing List

On Thu, 2003-02-20 at 04:18, Andre Hedrick wrote:
> That will deadlock it into a death spiral beause PIO is not setup either,
> but I like the warning!

Should be ok. It'll fail to allow DMA modes so will retune the drive unless
Im missing something


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

* Re: PATCH: part fix the highpoint timing/overclock bug
  2003-02-20 15:13   ` Alan Cox
@ 2003-02-21  7:01     ` Andre Hedrick
  0 siblings, 0 replies; 4+ messages in thread
From: Andre Hedrick @ 2003-02-21  7:01 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linus Torvalds, Linux Kernel Mailing List

On 20 Feb 2003, Alan Cox wrote:

> On Thu, 2003-02-20 at 04:18, Andre Hedrick wrote:
> > That will deadlock it into a death spiral beause PIO is not setup either,
> > but I like the warning!
> 
> Should be ok. It'll fail to allow DMA modes so will retune the drive unless
> Im missing something
> 

Recent discoveries showed if one does not tune the basics for pio, it goes
into a lost interrupt spin.  It will run, but each IO suffers 4/5
interrupts lost.  It can take up to 4 hours to boot in some cases.

Cheers,

Andre Hedrick
LAD Storage Consulting Group


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

end of thread, other threads:[~2003-02-21  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-18 18:33 PATCH: part fix the highpoint timing/overclock bug Alan Cox
2003-02-20  4:18 ` Andre Hedrick
2003-02-20 15:13   ` Alan Cox
2003-02-21  7:01     ` 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).