diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2006-12-13 03:35:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:55 -0500 |
commit | f13c152684a7f99ead26525270ed3e28a1d2467f (patch) | |
tree | d4c89c1870f761ce7df3505bbe74b363856bac16 /drivers/ide | |
parent | 26c068daf089aa21844236c97d05049b9497cc0a (diff) |
[PATCH] HPT37x: read f_CNT saved by BIOS from port
The undocumented register BIOS uses for saving f_CNT seems to only be
mapped to I/O space while all the other HPT3xx regs are dual-mapped. Looks
like another HighPoint's dirty trick. With this patch, the deadly kernel
oops on the cards having the modern HighPoint BIOSes is now at last gone!
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: 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')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 9fd50801d38..08119da06d5 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1035,14 +1035,14 @@ static void __devinit hpt37x_clocking(ide_hwif_t *hwif) | |||
1035 | * First try reading the register in which the HighPoint BIOS | 1035 | * First try reading the register in which the HighPoint BIOS |
1036 | * saves f_CNT value before reprogramming the DPLL from its | 1036 | * saves f_CNT value before reprogramming the DPLL from its |
1037 | * default setting (which differs for the various chips). | 1037 | * default setting (which differs for the various chips). |
1038 | * NOTE: This register is only accessible via I/O space. | ||
1039 | * | ||
1038 | * In case the signature check fails, we'll have to resort to | 1040 | * In case the signature check fails, we'll have to resort to |
1039 | * reading the f_CNT register itself in hopes that nobody has | 1041 | * reading the f_CNT register itself in hopes that nobody has |
1040 | * touched the DPLL yet... | 1042 | * touched the DPLL yet... |
1041 | */ | 1043 | */ |
1042 | pci_read_config_dword(dev, 0x70, &temp); | 1044 | temp = inl(pci_resource_start(dev, 4) + 0x90); |
1043 | if ((temp & 0xFFFFF000) != 0xABCDE000) { | 1045 | if ((temp & 0xFFFFF000) != 0xABCDE000) { |
1044 | int i; | ||
1045 | |||
1046 | printk(KERN_WARNING "HPT37X: no clock data saved by BIOS\n"); | 1046 | printk(KERN_WARNING "HPT37X: no clock data saved by BIOS\n"); |
1047 | 1047 | ||
1048 | /* Calculate the average value of f_CNT */ | 1048 | /* Calculate the average value of f_CNT */ |