From 32429ed3d695d0ffb2bcd323d6479c0de95cf502 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Mon, 19 Jul 2010 13:45:41 -0500 Subject: [PATCH] --- yaml --- r: 208302 b: refs/heads/master c: 322e304c4d71b79b3950ca560db4868cc3e04ee6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/block/cciss.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index eb00805fb990..36d119abae71 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 501b92cd6b394ba56bb978fd55606b5639b4d3fb +refs/heads/master: 322e304c4d71b79b3950ca560db4868cc3e04ee6 diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 9a4869572a0b..b4264bcda618 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -4108,6 +4108,18 @@ static inline bool CISS_signature_present(ctlr_info_t *h) return true; } +/* Need to enable prefetch in the SCSI core for 6400 in x86 */ +static inline void cciss_enable_scsi_prefetch(ctlr_info_t *h) +{ +#ifdef CONFIG_X86 + u32 prefetch; + + prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); + prefetch |= 0x100; + writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); +#endif +} + static int __devinit cciss_pci_init(ctlr_info_t *c) { int prod_index, err; @@ -4169,16 +4181,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c) err = -ENODEV; goto err_out_free_res; } -#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 - + cciss_enable_scsi_prefetch(c); /* Disabling DMA prefetch and refetch for the P600. * An ASIC bug may result in accesses to invalid memory addresses. * We've disabled prefetch for some time now. Testing with XEN