Re: [PATCH #upstream-fixes 2/3] pata_hpt366: fix cable detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Alan Cox wrote:

	pci_read_config_byte(pdev, 0x5A, &ata66);
-	if (ata66 & (1 << ap->port_no))
+	if (ata66 & (2 >> ap->port_no))

  HPT36x are single channel per function, so the shift can be removed.

In the case of two channels are you sure the bits appear as bit 2 in both
cases ?

Oops, they don't. The cable select register (0x5a) seems to be shared by both functions (with function 0 representing "primary" and the function 1 "secondary" channel). But in this case, the logic remains broken -- I don't think that function #1 has its ap->port_no set to 1. The IDE driver appears broken as well then. Damn Highpoint for their brain damaged design...

Alan

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux