]> git.hungrycats.org Git - linux/commitdiff
[PATCH] cciss: disble prefetching in ASIC
authorAndrew Morton <akpm@osdl.org>
Sun, 8 Feb 2004 01:43:12 +0000 (17:43 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 8 Feb 2004 01:43:12 +0000 (17:43 -0800)
From: mikem@beardog.cca.cpqcorp.net

This patch addresses a bug in the ASIC on the 6400 series controllers.  When
prefetching from host memory we grab an extra 750 or so bytes of data.  If
this occurs on a memory boundary the machine will MCA.  This bug affects IPF
and Alpha based platforms.  It is not known to be a problem on x86.

Prefetch will be disabled via the f/w.  We need to enable it on x86 to
address a _big_ performance hit on RAID 1 operations.

It is in the 2.4 tree.

drivers/block/cciss.c
drivers/block/cciss_cmd.h

index 2b4f6ba3a6bb3b6e473750fbd41ad15eeaa62057..b6c0049dd4266a96fbab08bdaa37786e370ef646 100644 (file)
@@ -2277,6 +2277,17 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
                printk("Does not appear to be a valid CISS config table\n");
                return -1;
        }
+
+#ifdef CONFIG_X86
+{
+       /* Need to enable prefetch in the SCSI core for 6400 in x86 */
+       __u32 prefetch;
+       prefetch = readl(&(c->cfgtable->SCSI_Prefetch));
+       prefetch |= 0x100;
+       writel(prefetch, &(c->cfgtable->SCSI_Prefetch));
+}
+#endif
+
 #ifdef CCISS_DEBUG
        printk("Trying to put board into Simple mode\n");
 #endif /* CCISS_DEBUG */ 
index 568c74e44f2d7f056fc2874a77ff518bcccf7fd2..a88a88817623fb34b230141eba5f0ae7d068c95b 100644 (file)
@@ -265,6 +265,7 @@ typedef struct _CfgTable_struct {
   DWORD            Reserved; 
   BYTE             ServerName[16];
   DWORD            HeartBeat;
+  DWORD            SCSI_Prefetch;
 } CfgTable_struct;
 #pragma pack()  
 #endif // CCISS_CMD_H