From: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx> hpsa: factor out hpsa_enable_scsi_prefetch Signed-off-by: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx> --- drivers/scsi/hpsa.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 35b47ba..84c0294 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3392,6 +3392,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; @@ -3439,15 +3451,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 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html