public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/8] resend cciss: disable DMA prefetch on P600
@ 2006-11-03 15:54 Mike Miller (OS Dev)
  2006-11-03 15:58 ` Jens Axboe
  2006-11-03 16:42 ` Arjan van de Ven
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Miller (OS Dev) @ 2006-11-03 15:54 UTC (permalink / raw)
  To: akpm, jens.axboe; +Cc: linux-kernel, linux-scsi

PATCH 5 of 8 resend

This patch unconditionally disables DMA prefetch on the P600 controller. A
bug in the ASIC may result in prefetching either beyond the end of memory
or to fall off into a memory hole.
Please consider this for inclusion.

Thanks,
mikem

Signed-off-by: Mike Miller <mike.miller@hp.com>

 cciss.c     |   13 +++++++++++++
 cciss_cmd.h |    1 +
 2 files changed, 14 insertions(+)
--------------------------------------------------------------------------------
diff -urNp linux-2.6-p00004/drivers/block/cciss.c linux-2.6-p00005/drivers/block/cciss.c
--- linux-2.6-p00004/drivers/block/cciss.c	2006-10-31 15:20:25.000000000 -0600
+++ linux-2.6-p00005/drivers/block/cciss.c	2006-11-03 09:43:55.000000000 -0600
@@ -2997,6 +2997,19 @@ static int cciss_pci_init(ctlr_info_t *c
 	}
 #endif
 
+	{
+		/* Disabling DMA prefetch for the P600
+		 * An ASIC bug may result in a prefetch beyond
+		 * physical memory.
+		 */
+		__u32 dma_prefetch
+		if(board_id == 0x3225103C) {
+			dma_prefetch = readl(c->vaddr + I2O_DMA1_CFG);
+			dma_prefetch |= 0x8000;
+			writel(dma_prefetch, c->vaddr + I2O_DMA1_CFG);
+		}
+	}
+
 #ifdef CCISS_DEBUG
 	printk("Trying to put board into Simple mode\n");
 #endif				/* CCISS_DEBUG */
diff -urNp linux-2.6-p00004/drivers/block/cciss_cmd.h linux-2.6-p00005/drivers/block/cciss_cmd.h
--- linux-2.6-p00004/drivers/block/cciss_cmd.h	2006-10-31 14:31:05.000000000 -0600
+++ linux-2.6-p00005/drivers/block/cciss_cmd.h	2006-10-31 15:43:18.000000000 -0600
@@ -55,6 +55,7 @@
 #define I2O_INT_MASK            0x34
 #define I2O_IBPOST_Q            0x40
 #define I2O_OBPOST_Q            0x44
+#define I2O_DMA1_CFG		0x214
 
 //Configuration Table
 #define CFGTBL_ChangeReq        0x00000001l

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 5/8] resend cciss: disable DMA prefetch on P600
  2006-11-03 15:54 [PATCH 5/8] resend cciss: disable DMA prefetch on P600 Mike Miller (OS Dev)
@ 2006-11-03 15:58 ` Jens Axboe
  2006-11-03 16:42 ` Arjan van de Ven
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2006-11-03 15:58 UTC (permalink / raw)
  To: Mike Miller (OS Dev); +Cc: akpm, linux-kernel, linux-scsi

On Fri, Nov 03 2006, Mike Miller (OS Dev) wrote:
> PATCH 5 of 8 resend
> 
> This patch unconditionally disables DMA prefetch on the P600 controller. A
> bug in the ASIC may result in prefetching either beyond the end of memory
> or to fall off into a memory hole.
> Please consider this for inclusion.
> 
> Thanks,
> mikem
> 
> Signed-off-by: Mike Miller <mike.miller@hp.com>

Acked-by: Jens Axboe <jens.axboe@oracle.com>

When you are done with the review comments, just repost the full series
again so it can be easily included.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 5/8] resend cciss: disable DMA prefetch on P600
  2006-11-03 15:54 [PATCH 5/8] resend cciss: disable DMA prefetch on P600 Mike Miller (OS Dev)
  2006-11-03 15:58 ` Jens Axboe
@ 2006-11-03 16:42 ` Arjan van de Ven
  2006-11-03 16:58   ` Christoph Hellwig
  1 sibling, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2006-11-03 16:42 UTC (permalink / raw)
  To: Mike Miller (OS Dev); +Cc: akpm, jens.axboe, linux-kernel, linux-scsi

On Fri, 2006-11-03 at 09:54 -0600, Mike Miller (OS Dev) wrote:
> PATCH 5 of 8 resend
> 
> This patch unconditionally disables DMA prefetch on the P600 controller. A
> bug in the ASIC may result in prefetching either beyond the end of memory
> or to fall off into a memory hole.
> Please consider this for inclusion.
> 
> Thanks,
> mikem
> 
> Signed-off-by: Mike Miller <mike.miller@hp.com>
> 
>  cciss.c     |   13 +++++++++++++
>  cciss_cmd.h |    1 +
>  2 files changed, 14 insertions(+)
> --------------------------------------------------------------------------------
> diff -urNp linux-2.6-p00004/drivers/block/cciss.c linux-2.6-p00005/drivers/block/cciss.c
> --- linux-2.6-p00004/drivers/block/cciss.c	2006-10-31 15:20:25.000000000 -0600
> +++ linux-2.6-p00005/drivers/block/cciss.c	2006-11-03 09:43:55.000000000 -0600
> @@ -2997,6 +2997,19 @@ static int cciss_pci_init(ctlr_info_t *c
>  	}
>  #endif
>  
> +	{
> +		/* Disabling DMA prefetch for the P600
> +		 * An ASIC bug may result in a prefetch beyond
> +		 * physical memory.
> +		 */
> +		__u32 dma_prefetch
> +		if(board_id == 0x3225103C) {
> +			dma_prefetch = readl(c->vaddr + I2O_DMA1_CFG);
> +			dma_prefetch |= 0x8000;
> +			writel(dma_prefetch, c->vaddr + I2O_DMA1_CFG);
> +		}
> +	}
> +

if you remove the if() you might as well also remove the {}'s ;)

-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 5/8] resend cciss: disable DMA prefetch on P600
  2006-11-03 16:42 ` Arjan van de Ven
@ 2006-11-03 16:58   ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2006-11-03 16:58 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Mike Miller (OS Dev), akpm, jens.axboe, linux-kernel, linux-scsi

On Fri, Nov 03, 2006 at 05:42:15PM +0100, Arjan van de Ven wrote:
> On Fri, 2006-11-03 at 09:54 -0600, Mike Miller (OS Dev) wrote:
> > PATCH 5 of 8 resend
> > 
> > This patch unconditionally disables DMA prefetch on the P600 controller. A
> > bug in the ASIC may result in prefetching either beyond the end of memory
> > or to fall off into a memory hole.
> > Please consider this for inclusion.
> > 
> > Thanks,
> > mikem
> > 
> > Signed-off-by: Mike Miller <mike.miller@hp.com>
> > 
> >  cciss.c     |   13 +++++++++++++
> >  cciss_cmd.h |    1 +
> >  2 files changed, 14 insertions(+)
> > --------------------------------------------------------------------------------
> > diff -urNp linux-2.6-p00004/drivers/block/cciss.c linux-2.6-p00005/drivers/block/cciss.c
> > --- linux-2.6-p00004/drivers/block/cciss.c	2006-10-31 15:20:25.000000000 -0600
> > +++ linux-2.6-p00005/drivers/block/cciss.c	2006-11-03 09:43:55.000000000 -0600
> > @@ -2997,6 +2997,19 @@ static int cciss_pci_init(ctlr_info_t *c
> >  	}
> >  #endif
> >  
> > +	{
> > +		/* Disabling DMA prefetch for the P600
> > +		 * An ASIC bug may result in a prefetch beyond
> > +		 * physical memory.
> > +		 */
> > +		__u32 dma_prefetch
> > +		if(board_id == 0x3225103C) {
> > +			dma_prefetch = readl(c->vaddr + I2O_DMA1_CFG);
> > +			dma_prefetch |= 0x8000;
> > +			writel(dma_prefetch, c->vaddr + I2O_DMA1_CFG);
> > +		}
> > +	}
> > +
> 
> if you remove the if() you might as well also remove the {}'s ;)

And fix the spaces around the if() while we're at it, aka:

	/*
	 * Disable DMA prefetch for the P600.
	 * An ASIC bug may result in a prefetch beyond
	 * physical memory.
	 */
	if (board_id == 0x3225103C) {
		u32 dma_prefetch = readl(c->vaddr + I2O_DMA1_CFG);
		writel(dma_prefetch | 0x8000, c->vaddr + I2O_DMA1_CFG);
	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-03 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03 15:54 [PATCH 5/8] resend cciss: disable DMA prefetch on P600 Mike Miller (OS Dev)
2006-11-03 15:58 ` Jens Axboe
2006-11-03 16:42 ` Arjan van de Ven
2006-11-03 16:58   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox