Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208303
b: refs/heads/master
c: bfd63ee
h: refs/heads/master
i:
  208301: 553c82e
  208299: 5b31d5c
  208295: 62d6728
  208287: ddd5afe
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Aug 7, 2010
1 parent 32429ed commit d0c20b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 322e304c4d71b79b3950ca560db4868cc3e04ee6
refs/heads/master: bfd63ee571ed2a1ab7af99544e326483f84c0544
37 changes: 19 additions & 18 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -4120,6 +4120,24 @@ static inline void cciss_enable_scsi_prefetch(ctlr_info_t *h)
#endif
}

/* Disable DMA prefetch for the P600. Otherwise an ASIC bug may result
* in a prefetch beyond physical memory.
*/
static inline void cciss_p600_dma_prefetch_quirk(ctlr_info_t *h)
{
u32 dma_prefetch;
__u32 dma_refetch;

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);
pci_read_config_dword(h->pdev, PCI_COMMAND_PARITY, &dma_refetch);
dma_refetch |= 0x1;
pci_write_config_dword(h->pdev, PCI_COMMAND_PARITY, dma_refetch);
}

static int __devinit cciss_pci_init(ctlr_info_t *c)
{
int prod_index, err;
Expand Down Expand Up @@ -4182,24 +4200,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c)
goto err_out_free_res;
}
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
* kernels revealed a bug in the refetch if dom0 resides on a P600.
*/
if (c->board_id == 0x3225103C) {
__u32 dma_prefetch;
__u32 dma_refetch;
dma_prefetch = readl(c->vaddr + I2O_DMA1_CFG);
dma_prefetch |= 0x8000;
writel(dma_prefetch, c->vaddr + I2O_DMA1_CFG);
pci_read_config_dword(c->pdev, PCI_COMMAND_PARITY,
&dma_refetch);
dma_refetch |= 0x1;
pci_write_config_dword(c->pdev, PCI_COMMAND_PARITY,
dma_refetch);
}

cciss_p600_dma_prefetch_quirk(c);
#ifdef CCISS_DEBUG
printk(KERN_WARNING "Trying to put board into Performant mode\n");
#endif /* CCISS_DEBUG */
Expand Down

0 comments on commit d0c20b0

Please sign in to comment.