Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: hpt366: fix incorrect mask when checking at cmd_high_time

According to the HPT366 data sheet, PCI config space dword 0x40-0x43
bits 11:8 specify the primary drive cmd_high_time, however,
currently just 3 bits of the 4 are being used because the mask
is 0x700 and not 0x0f00. Fix the mask, allowing for the 40MHz clock
to be detected.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Colin Ian King and committed by
Tejun Heo
a548cc00 29a37ea4

+1 -1
+1 -1
drivers/ata/pata_hpt366.c
··· 368 368 369 369 /* PCI clocking determines the ATA timing values to use */ 370 370 /* info_hpt366 is safe against re-entry so we can scribble on it */ 371 - switch ((reg1 & 0x700) >> 8) { 371 + switch ((reg1 & 0xf00) >> 8) { 372 372 case 9: 373 373 hpriv = &hpt366_40; 374 374 break;