Commit 04f8ba95 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] part fix the highpoint timing/overclock bug

parent dbc9f2a6
/* /*
* 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> * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2001 Sun Microsystems, Inc.
...@@ -807,7 +807,7 @@ static int __init init_hpt37x(struct pci_dev *dev) ...@@ -807,7 +807,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
} else if (freq < 0xc8) { } else if (freq < 0xc8) {
pll = F_LOW_PCI_50; pll = F_LOW_PCI_50;
if (hpt_minimum_revision(dev,8)) if (hpt_minimum_revision(dev,8))
return -EOPNOTSUPP; pci_set_drvdata(dev, NULL);
else if (hpt_minimum_revision(dev,5)) else if (hpt_minimum_revision(dev,5))
pci_set_drvdata(dev, (void *) fifty_base_hpt372); pci_set_drvdata(dev, (void *) fifty_base_hpt372);
else if (hpt_minimum_revision(dev,4)) else if (hpt_minimum_revision(dev,4))
...@@ -820,7 +820,7 @@ static int __init init_hpt37x(struct pci_dev *dev) ...@@ -820,7 +820,7 @@ static int __init init_hpt37x(struct pci_dev *dev)
if (hpt_minimum_revision(dev,8)) if (hpt_minimum_revision(dev,8))
{ {
printk(KERN_ERR "HPT37x: 66MHz timings are not supported.\n"); printk(KERN_ERR "HPT37x: 66MHz timings are not supported.\n");
return -EOPNOTSUPP; pci_set_drvdata(dev, NULL);
} }
else if (hpt_minimum_revision(dev,5)) else if (hpt_minimum_revision(dev,5))
pci_set_drvdata(dev, (void *) sixty_six_base_hpt372); pci_set_drvdata(dev, (void *) sixty_six_base_hpt372);
...@@ -923,7 +923,7 @@ static int __init init_hpt366 (struct pci_dev *dev) ...@@ -923,7 +923,7 @@ static int __init init_hpt366 (struct pci_dev *dev)
if (!pci_get_drvdata(dev)) if (!pci_get_drvdata(dev))
{ {
printk(KERN_ERR "hpt366: unknown bus timing.\n"); printk(KERN_ERR "hpt366: unknown bus timing.\n");
return -EOPNOTSUPP; pci_set_drvdata(dev, NULL);
} }
return 0; return 0;
} }
...@@ -1062,6 +1062,12 @@ static void __init init_dma_hpt366 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -1062,6 +1062,12 @@ static void __init init_dma_hpt366 (ide_hwif_t *hwif, unsigned long dmabase)
if (!dmabase) if (!dmabase)
return; 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); dma_old = hwif->INB(dmabase+2);
local_irq_save(flags); local_irq_save(flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment