Re: 2.6.18-rc7-git1: AHCI not seeing devices on ICH8 mobo (DG965RY)

Tejun Heo
2006-09-18T03:34:51Z

Robin H. Johnson wrote:
> Yes your patch fixes it perfectly - it's a better version of an almost
> working fix I hacked up after my previous email.
>
> Some patch review comments below as well.
>
> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
>
>> @@ -186,9 +187,11 @@ struct ahci_host_priv {
>> unsigned long flags;
>> u32 cap; /* cache of HOST_CAP register */
>> u32 port_map; /* cache of HOST_PORTS_IMPL reg */
>> + int port_tbl[AHCI_MAX_PORTS];
>> };
> maybe u8 instead of int?

Yeah, I like that.

> also a comment - /* mapping of port_idx to the implemented port */

Okay.

>> + if (n_ports == 0) {
>> + dev_printk(KERN_ERR, &pdev->dev, "0 port implemented\n");
>> + return -EINVAL;
>> + }
> Use plural form (0 ports), or negative (No ports) instead.

And, okay.

Jeff, we've been ignoring PI in ahci_host_init()...

for (i = 0; i < probe_ent->n_ports; i++) {
#if 0 /* BIOSen initialize this incorrectly */
if (!(hpriv->port_map & (1 << i)))
continue;
#endif

The comment suggests that some BIOSen initialize PI incorrectly which
will probably result in undetected ports. Is this true? Would it be
dangerous to honor PI on some controllers? If so, PI should be used
only for controllers which does non-linear port mapping.

Thanks.

--
tejun