diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-05-27 16:13:38 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:09 -0400 |
commit | f7c391015ab64c835a9bb403626b38a51d6432cc (patch) | |
tree | 8d7cfbf3b49927abfb677129ceb80e13fbd65feb /drivers/scsi/hpsa.c | |
parent | 76c46e4970f7ee6d8c54220a767e93d67b74cd33 (diff) |
[SCSI] hpsa: factor out hpsa_enable_scsi_prefetch
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | 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 f2a9af64dfaa..62f9784ecf8f 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -3384,6 +3384,18 @@ static inline bool hpsa_CISS_signature_present(struct ctlr_info *h) | |||
3384 | return true; | 3384 | return true; |
3385 | } | 3385 | } |
3386 | 3386 | ||
3387 | /* Need to enable prefetch in the SCSI core for 6400 in x86 */ | ||
3388 | static inline void hpsa_enable_scsi_prefetch(struct ctlr_info *h) | ||
3389 | { | ||
3390 | #ifdef CONFIG_X86 | ||
3391 | u32 prefetch; | ||
3392 | |||
3393 | prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); | ||
3394 | prefetch |= 0x100; | ||
3395 | writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); | ||
3396 | #endif | ||
3397 | } | ||
3398 | |||
3387 | static int __devinit hpsa_pci_init(struct ctlr_info *h) | 3399 | static int __devinit hpsa_pci_init(struct ctlr_info *h) |
3388 | { | 3400 | { |
3389 | int i, prod_index, err; | 3401 | int i, prod_index, err; |
@@ -3431,15 +3443,7 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h) | |||
3431 | err = -ENODEV; | 3443 | err = -ENODEV; |
3432 | goto err_out_free_res; | 3444 | goto err_out_free_res; |
3433 | } | 3445 | } |
3434 | #ifdef CONFIG_X86 | 3446 | hpsa_enable_scsi_prefetch(h); |
3435 | { | ||
3436 | /* Need to enable prefetch in the SCSI core for 6400 in x86 */ | ||
3437 | u32 prefetch; | ||
3438 | prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); | ||
3439 | prefetch |= 0x100; | ||
3440 | writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); | ||
3441 | } | ||
3442 | #endif | ||
3443 | 3447 | ||
3444 | /* Disabling DMA prefetch for the P600 | 3448 | /* Disabling DMA prefetch for the P600 |
3445 | * An ASIC bug may result in a prefetch beyond | 3449 | * An ASIC bug may result in a prefetch beyond |