aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorLoren M. Lang <lorenl@alzatex.com>2006-02-03 06:04:59 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-03 11:32:12 -0500
commit9ea244b4b545ecb323d042a0df5c080edefcd1fc (patch)
tree65e219ea529ac8089fa5415d8b350cf0fd3c62e5 /drivers/ide/pci/hpt366.c
parent0c866b5103ad65de04a2a211f8db56820179cb53 (diff)
[PATCH] RocketPoint 1520 [hpt366] fails clock stabilization
I just purchased a HighPoint Rocket 1520 SATA controller. There seems to be no libata driver (yet), but there is an ide driver, hpt366. When the driver gets loaded, it causes a kernel NULL pointer dereference in pci_bus_clock_list. It seems to be because the driver is waiting for clock stabilization in init_hpt37x() which never comes. The driver just continues on with the pci drvdata set to NULL, instead of a valid clock entry. The following patch prevents the NULL dereference from happening, but instead exit with an error. Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 7b589d948bf9..940bdd4c5784 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1288,6 +1288,10 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
1288 goto init_hpt37X_done; 1288 goto init_hpt37X_done;
1289 } 1289 }
1290 } 1290 }
1291 if (!pci_get_drvdata(dev)) {
1292 printk("No Clock Stabilization!!!\n");
1293 return;
1294 }
1291pll_recal: 1295pll_recal:
1292 if (adjust & 1) 1296 if (adjust & 1)
1293 pll -= (adjust >> 1); 1297 pll -= (adjust >> 1);