From 38d363759787fa6701c4f7a6fe36039452794cac Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Thu, 27 May 2010 15:13:43 -0500 Subject: [PATCH] --- yaml --- r: 204061 b: refs/heads/master c: 3d0eab67cf556db4430a42fbb45dc90ef690d30c h: refs/heads/master i: 204059: 2655b8bdb8bd72c38e1a45cf994a17d57f03733a v: v3 --- [refs] | 2 +- trunk/drivers/scsi/hpsa.c | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 05a0808df09b..ff5bb085805e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7c391015ab64c835a9bb403626b38a51d6432cc +refs/heads/master: 3d0eab67cf556db4430a42fbb45dc90ef690d30c diff --git a/trunk/drivers/scsi/hpsa.c b/trunk/drivers/scsi/hpsa.c index 62f9784ecf8f..9e81e0bcf1e2 100644 --- a/trunk/drivers/scsi/hpsa.c +++ b/trunk/drivers/scsi/hpsa.c @@ -3396,6 +3396,20 @@ static inline void hpsa_enable_scsi_prefetch(struct ctlr_info *h) #endif } +/* Disable DMA prefetch for the P600. Otherwise an ASIC bug may result + * in a prefetch beyond physical memory. + */ +static inline void hpsa_p600_dma_prefetch_quirk(struct ctlr_info *h) +{ + u32 dma_prefetch; + + if (h->board_id != 0x3225103C) + return; + dma_prefetch = readl(h->vaddr + I2O_DMA1_CFG); + dma_prefetch |= 0x8000; + writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); +} + static int __devinit hpsa_pci_init(struct ctlr_info *h) { int i, prod_index, err; @@ -3444,17 +3458,7 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h) goto err_out_free_res; } hpsa_enable_scsi_prefetch(h); - - /* Disabling DMA prefetch for the P600 - * An ASIC bug may result in a prefetch beyond - * physical memory. - */ - if (h->board_id == 0x3225103C) { - u32 dma_prefetch; - dma_prefetch = readl(h->vaddr + I2O_DMA1_CFG); - dma_prefetch |= 0x8000; - writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); - } + hpsa_p600_dma_prefetch_quirk(h); h->max_commands = readl(&(h->cfgtable->CmdsOutMax)); /* Update the field, and then ring the doorbell */