Skip to content

Commit

Permalink
[PATCH] RocketPoint 1520 [hpt366] fails clock stabilization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Loren M. Lang authored and Linus Torvalds committed Feb 3, 2006
1 parent 0c866b5 commit 9ea244b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,10 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif)
goto init_hpt37X_done;
}
}
if (!pci_get_drvdata(dev)) {
printk("No Clock Stabilization!!!\n");
return;
}
pll_recal:
if (adjust & 1)
pll -= (adjust >> 1);
Expand Down

0 comments on commit 9ea244b

Please sign in to comment.