From 1067372a38ad8cf67c75c4dda094bc2784ffb615 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Thu, 27 May 2010 15:13:38 -0500 Subject: [PATCH] --- yaml --- r: 204060 b: refs/heads/master c: f7c391015ab64c835a9bb403626b38a51d6432cc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/scsi/hpsa.c | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 8c71ec257ca3..05a0808df09b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 76c46e4970f7ee6d8c54220a767e93d67b74cd33 +refs/heads/master: f7c391015ab64c835a9bb403626b38a51d6432cc diff --git a/trunk/drivers/scsi/hpsa.c b/trunk/drivers/scsi/hpsa.c index f2a9af64dfaa..62f9784ecf8f 100644 --- a/trunk/drivers/scsi/hpsa.c +++ b/trunk/drivers/scsi/hpsa.c @@ -3384,6 +3384,18 @@ static inline bool hpsa_CISS_signature_present(struct ctlr_info *h) return true; } +/* Need to enable prefetch in the SCSI core for 6400 in x86 */ +static inline void hpsa_enable_scsi_prefetch(struct ctlr_info *h) +{ +#ifdef CONFIG_X86 + u32 prefetch; + + prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); + prefetch |= 0x100; + writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); +#endif +} + static int __devinit hpsa_pci_init(struct ctlr_info *h) { int i, prod_index, err; @@ -3431,15 +3443,7 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h) 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(&(h->cfgtable->SCSI_Prefetch)); - prefetch |= 0x100; - writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); - } -#endif + hpsa_enable_scsi_prefetch(h); /* Disabling DMA prefetch for the P600 * An ASIC bug may result in a prefetch beyond