Gerhard Dirschl wrote:
Hi,
I stumbled over a bug in the sata_nv swncq code of the current
2.6.23-git kernel. ata_port_info.flags is always initialised with the
ATA_FLAG_NCQ flag set, but nv_swncq_host_init(...) is only called
if "swncq=1" is passed to the driver (default is swncq=0).
I can can observe ata link resets under high load if I don't pass
sata_nv.swncq=1 to my kernel.
Seeing this, are there any guarantees about SWNCQ and MSI compatibility?
I have sata_nv patched to use MSI, and since SWNCQ patch arrived to
the kernel (and I've enabled it to work around Gerhard's problem) my
root filesystem remounts read-only or disk completely disappears every
now and then :-(
--- linux-2.6/drivers/ata/sata_nv.c 2007-10-22 00:07:40.000000000 +0200
+++ linux-2.4.24/drivers/ata/sata_nv.c 2007-10-22 03:40:06.132619662 +0200
@@ -1878,6 +1884,9 @@ static void nv_swncq_host_init(struct at
VPRINTK("HOST_CTL:0x%X\n", tmp);
writel(tmp | NV_CTL_PRI_SWNCQ | NV_CTL_SEC_SWNCQ, mmio + NV_CTL_MCP55);
+ for (i = 0; i < host->n_ports; i++)
+ host->ports[i]->flags |= ATA_FLAG_NCQ;
+
/* enable irq intr */
tmp = readl(mmio + NV_INT_ENABLE_MCP55);
VPRINTK("HOST_ENABLE:0x%X\n", tmp);
I believe that ATA_FLAG_NCQ should be set before call to
ata_pci_prepare_sff_host so you do not play with flags after host was
created. I cannot find any other reason...
Petr
-
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