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

From: Tejun Heo
Date: Sun Sep 17 2006 - 23:35:13 EST


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@xxxxxxxxxx>

@@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/