public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
@ 2004-04-16 13:56 Jord Tanner
  0 siblings, 0 replies; 17+ messages in thread
From: Jord Tanner @ 2004-04-16 13:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: brad_mssw, Atulm


On Tue Dec 30 2003 - 16:11:40 EST Brad House wrote:

        Ok, I just ported the 2.00.9 driver to 2.6.0.
        It still has these warnings during compilation as I did not
        attempt to apply my 64bit fixes from before as I've been told
        they are just plain wrong :/
        
        But, I suppose this should work fine in 32bit mode, I would
        greatly appreciate any help in porting it for 64bit platforms.
        
        The patch can be downloaded here :
        http://dev.gentoo.org/~brad_mssw/kernel_patches/megaraid/megaraid-v2.00.9-linux2.6.patch
        And only applies to the source from ftp.lsil.com, it's not a
        kernel-patch
        per-se, but copying the result over to the drivers/scsi will
        compile inplace
        of the current versions.
        
        Please CC me on any replies!
        -Brad House <brad_mssw@xxxxxxxxxx>



This thread has been inactive for a while, but I've not found anything
more relevant to my situation. 

I'm running 2.6.3-gentoo (and 2.6.5-gentoo) with a LSILogic SATA
Megaraid 150-6 raid controller on a dual Opteron system. The entire
system is compiled in 64bit. We are seeing random database corruption
when access very large Postgres tables (more than 10 million rows).
Other than that, the system runs beautifully.

As far as I can tell, no amd64 specific patches have been applied to the
megaraid driver in 2.6.3 (version 2.00.3). Brad House has posted a 2.6
patch for megaraid 2.00.9, but his previous amd64 patches were removed.
LSI tech support has suggested I upgrade to 2.00.9, but the LSI source
is for 2.4.

So my questions are:

        - Could the 2.00.3 driver be responsible for random data
        corruption when running on 2.6.3 in 64bit?
        - Is it safe to run Brad House's 2.6 megaraid 2.00.9 patches in
        64 bit mode on amd64?
        - Are there any patches for megaraid 2.00.9 (or higher, I see
        2.00.10-3 has just been released) that combine patches for 2.6
        and amd64?
        
TIA,


-- 
Jord Tanner <jord@indygecko.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
@ 2004-04-16 19:24 Mukker, Atul
  0 siblings, 0 replies; 17+ messages in thread
From: Mukker, Atul @ 2004-04-16 19:24 UTC (permalink / raw)
  To: 'Jord Tanner', Mukker, Atul; +Cc: linux-kernel, brad_mssw

It is 64-bit safe and tested, to some degree, on 64-bit platforms as well.

Thanks
-Atul Mukker

> -----Original Message-----
> From: Jord Tanner [mailto:jord@indygecko.com]
> Sent: Friday, April 16, 2004 3:22 PM
> To: Mukker, Atul
> Cc: linux-kernel@vger.kernel.org; brad_mssw@gentoo.org
> Subject: RE: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
> 
> 
> 
> Thanks Atul!
> 
> After patching for 2.6.5 the 2.20.0.B2 driver compiled clean and the
> machine in now running with that driver. We are about to run 
> some stress
> tests to see if we can duplicate the previous problems. 
> 
> Given that we are running a 64bit compile, and the previous 
> attempts by
> Brad House to make amd64 modifications were abandonded, could you
> comment on whether you think the newest megaraid code
> (ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-unified
> -2.20.0.B2.04.14.2004)
> is 64bit safe?  
> 
> TIA
> 
> Jord Tanner
> Independent Gecko Consultants
> 
> On Fri, 2004-04-16 at 09:35, Mukker, Atul wrote:
> > Please use the latest driver 2.20.0.B2, about to be 
> released today. Please
> > provide a feedback if you see the same issues.
> > 
> > -Atul Mukker
> > LSI Logic
> > 
> > > -----Original Message-----
> > > From: Jord Tanner [mailto:jord@indygecko.com]
> > > Sent: Friday, April 16, 2004 9:57 AM
> > > To: linux-kernel@vger.kernel.org
> > > Cc: brad_mssw@gentoo.org; Atulm@lsil.com
> > > Subject: Re: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
> > > 
> > > 
> > > 
> > > On Tue Dec 30 2003 - 16:11:40 EST Brad House wrote:
> > > 
> > >         Ok, I just ported the 2.00.9 driver to 2.6.0.
> > >         It still has these warnings during compilation as 
> I did not
> > >         attempt to apply my 64bit fixes from before as 
> I've been told
> > >         they are just plain wrong :/
> > >         
> > >         But, I suppose this should work fine in 32bit 
> mode, I would
> > >         greatly appreciate any help in porting it for 
> 64bit platforms.
> > >         
> > >         The patch can be downloaded here :
> > >         
> > > http://dev.gentoo.org/~brad_mssw/kernel_patches/megaraid/megar
> > > aid-v2.00.9-linux2.6.patch
> > >         And only applies to the source from ftp.lsil.com, 
> it's not a
> > >         kernel-patch
> > >         per-se, but copying the result over to the 
> drivers/scsi will
> > >         compile inplace
> > >         of the current versions.
> > >         
> > >         Please CC me on any replies!
> > >         -Brad House <brad_mssw@xxxxxxxxxx>
> > > 
> > > 
> > > 
> > > This thread has been inactive for a while, but I've not 
> found anything
> > > more relevant to my situation. 
> > > 
> > > I'm running 2.6.3-gentoo (and 2.6.5-gentoo) with a LSILogic SATA
> > > Megaraid 150-6 raid controller on a dual Opteron system. 
> The entire
> > > system is compiled in 64bit. We are seeing random 
> database corruption
> > > when access very large Postgres tables (more than 10 
> million rows).
> > > Other than that, the system runs beautifully.
> > > 
> > > As far as I can tell, no amd64 specific patches have been 
> > > applied to the
> > > megaraid driver in 2.6.3 (version 2.00.3). Brad House has 
> posted a 2.6
> > > patch for megaraid 2.00.9, but his previous amd64 patches 
> > > were removed.
> > > LSI tech support has suggested I upgrade to 2.00.9, but 
> the LSI source
> > > is for 2.4.
> > > 
> > > So my questions are:
> > > 
> > >         - Could the 2.00.3 driver be responsible for random data
> > >         corruption when running on 2.6.3 in 64bit?
> > >         - Is it safe to run Brad House's 2.6 megaraid 2.00.9 
> > > patches in
> > >         64 bit mode on amd64?
> > >         - Are there any patches for megaraid 2.00.9 (or 
> higher, I see
> > >         2.00.10-3 has just been released) that combine 
> patches for 2.6
> > >         and amd64?
> > >         
> > > TIA,
> > > 
> > > 
> > > -- 
> > > Jord Tanner <jord@indygecko.com>
> > > 
> > > -
> > > To unsubscribe from this list: send the line "unsubscribe 
> > > linux-kernel" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at  http://www.tux.org/lkml/
> > > 
> -- 
> Jord Tanner <jord@indygecko.com>
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
@ 2004-04-16 16:35 Mukker, Atul
  2004-04-16 19:21 ` Jord Tanner
  0 siblings, 1 reply; 17+ messages in thread
From: Mukker, Atul @ 2004-04-16 16:35 UTC (permalink / raw)
  To: 'Jord Tanner', linux-kernel; +Cc: brad_mssw, Mukker, Atul

Please use the latest driver 2.20.0.B2, about to be released today. Please
provide a feedback if you see the same issues.

-Atul Mukker
LSI Logic

> -----Original Message-----
> From: Jord Tanner [mailto:jord@indygecko.com]
> Sent: Friday, April 16, 2004 9:57 AM
> To: linux-kernel@vger.kernel.org
> Cc: brad_mssw@gentoo.org; Atulm@lsil.com
> Subject: Re: [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
> 
> 
> 
> On Tue Dec 30 2003 - 16:11:40 EST Brad House wrote:
> 
>         Ok, I just ported the 2.00.9 driver to 2.6.0.
>         It still has these warnings during compilation as I did not
>         attempt to apply my 64bit fixes from before as I've been told
>         they are just plain wrong :/
>         
>         But, I suppose this should work fine in 32bit mode, I would
>         greatly appreciate any help in porting it for 64bit platforms.
>         
>         The patch can be downloaded here :
>         
> http://dev.gentoo.org/~brad_mssw/kernel_patches/megaraid/megar
> aid-v2.00.9-linux2.6.patch
>         And only applies to the source from ftp.lsil.com, it's not a
>         kernel-patch
>         per-se, but copying the result over to the drivers/scsi will
>         compile inplace
>         of the current versions.
>         
>         Please CC me on any replies!
>         -Brad House <brad_mssw@xxxxxxxxxx>
> 
> 
> 
> This thread has been inactive for a while, but I've not found anything
> more relevant to my situation. 
> 
> I'm running 2.6.3-gentoo (and 2.6.5-gentoo) with a LSILogic SATA
> Megaraid 150-6 raid controller on a dual Opteron system. The entire
> system is compiled in 64bit. We are seeing random database corruption
> when access very large Postgres tables (more than 10 million rows).
> Other than that, the system runs beautifully.
> 
> As far as I can tell, no amd64 specific patches have been 
> applied to the
> megaraid driver in 2.6.3 (version 2.00.3). Brad House has posted a 2.6
> patch for megaraid 2.00.9, but his previous amd64 patches 
> were removed.
> LSI tech support has suggested I upgrade to 2.00.9, but the LSI source
> is for 2.4.
> 
> So my questions are:
> 
>         - Could the 2.00.3 driver be responsible for random data
>         corruption when running on 2.6.3 in 64bit?
>         - Is it safe to run Brad House's 2.6 megaraid 2.00.9 
> patches in
>         64 bit mode on amd64?
>         - Are there any patches for megaraid 2.00.9 (or higher, I see
>         2.00.10-3 has just been released) that combine patches for 2.6
>         and amd64?
>         
> TIA,
> 
> 
> -- 
> Jord Tanner <jord@indygecko.com>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <18kst-5Av-1@gated-at.bofh.it>]
* [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64)
@ 2003-12-30  5:10 Brad House
  2003-12-30  5:20 ` Jeff Garzik
  0 siblings, 1 reply; 17+ messages in thread
From: Brad House @ 2003-12-30  5:10 UTC (permalink / raw)
  To: linux-kernel

In an attempt to fix a Gentoo user's problem, and get rid
of compilation warnings for 64bit (on AMD64 mainly) megaraid
compilation, I have created this patch, and needs some
extensive testing.

The only thing I wasn't sure about was what unsigned integer
was guaranteed to be the exact size of a pointer, and it seemed
that looking in include/asm-x86_64/types.h that  dma_addr_t
was the only one that fit the bill.

Anyhow, the patch is inlined below, as well as available
for download here:
http://dev.gentoo.org/~brad_mssw/kernel_patches/2.6.0/megaraid_64bit_patch.diff

Please CC: me on any replies as I am not subscribed to this
list!

-Brad House
brad_mssw@gentoo.org

diff -ruN linux-2.6.0-gentoo-r1.old/drivers/scsi/megaraid.c
linux-2.6.0-gentoo-r1/drivers/scsi/megaraid.c
--- linux-2.6.0-gentoo-r1.old/drivers/scsi/megaraid.c	2003-12-29
23:51:43.000000000 -0500
+++ linux-2.6.0-gentoo-r1/drivers/scsi/megaraid.c	2003-12-29
23:54:01.005469936 -0500
@@ -1292,7 +1292,7 @@

 			/* Calculate Scatter-Gather info */
 			mbox->m_out.numsgelements = mega_build_sglist(adapter, scb,
-					(u32 *)&mbox->m_out.xferaddr, (u32 *)&seg);
+					(dma_addr_t *)&mbox->m_out.xferaddr, (u32 *)&seg);

 			return scb;

@@ -2262,7 +2262,7 @@
  * Note: For 64 bit cards, we need a minimum of one SG element for
read/write
  */
 static int
-mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
+mega_build_sglist(adapter_t *adapter, scb_t *scb, dma_addr_t *buf, u32 *len)
 {
 	struct scatterlist	*sgl;
 	struct page	*page;
@@ -2962,8 +2962,8 @@
 			mbox->m_out.numsectors);
 	len += sprintf(page+len, "  LBA          = 0x%02x\n",
 			mbox->m_out.lba);
-	len += sprintf(page+len, "  DTA          = 0x%08x\n",
-			mbox->m_out.xferaddr);
+	len += sprintf(page+len, "  DTA          = 0x%08lx\n",
+			(unsigned long int)mbox->m_out.xferaddr);
 	len += sprintf(page+len, "  Logical Drive= 0x%02x\n",
 			mbox->m_out.logdrv);
 	len += sprintf(page+len, "  No of SG Elmt= 0x%02x\n",
@@ -4048,7 +4048,7 @@
 	megacmd_t	mc;
 	megastat_t	*ustats;
 	int		num_ldrv;
-	u32		uxferaddr = 0;
+	dma_addr_t	uxferaddr = 0;
 	struct pci_dev	*pdev;

 	ustats = NULL; /* avoid compilation warnings */
diff -ruN linux-2.6.0-gentoo-r1.old/drivers/scsi/megaraid.h
linux-2.6.0-gentoo-r1/drivers/scsi/megaraid.h
--- linux-2.6.0-gentoo-r1.old/drivers/scsi/megaraid.h	2003-12-29
23:51:43.000000000 -0500
+++ linux-2.6.0-gentoo-r1/drivers/scsi/megaraid.h	2003-12-29
23:54:01.005469936 -0500
@@ -125,7 +125,7 @@
 	/* 0x1 */ u8 cmdid;
 	/* 0x2 */ u16 numsectors;
 	/* 0x4 */ u32 lba;
-	/* 0x8 */ u32 xferaddr;
+	/* 0x8 */ dma_addr_t xferaddr;
 	/* 0xC */ u8 logdrv;
 	/* 0xD */ u8 numsgelements;
 	/* 0xE */ u8 resvd;
@@ -173,7 +173,7 @@
 	u8 reqsensearea[MAX_REQ_SENSE_LEN];
 	u8 numsgelements;
 	u8 scsistatus;
-	u32 dataxferaddr;
+	dma_addr_t dataxferaddr;
 	u32 dataxferlen;
 } __attribute__ ((packed)) mega_passthru;

@@ -201,7 +201,7 @@
 	u8 reqsenselen;
 	u8 reqsensearea[MAX_REQ_SENSE_LEN];
 	u8 rsvd4;
-	u32 dataxferaddr;
+	dma_addr_t dataxferaddr;
 	u32 dataxferlen;
 } __attribute__ ((packed)) mega_ext_passthru;

@@ -211,7 +211,7 @@
 } __attribute__ ((packed)) mega_sgl64;

 typedef struct {
-	u32 address;
+	dma_addr_t address;
 	u32 length;
 } __attribute__ ((packed)) mega_sglist;

@@ -561,7 +561,7 @@
 	u8	opcode;
 	u8	subopcode;
 	u32	lba;
-	u32	xferaddr;
+	dma_addr_t	xferaddr;
 	u8	logdrv;
 	u8	rsvd[3];
 	u8	numstatus;
@@ -1016,7 +1016,7 @@
 static int mega_print_inquiry(char *, char *);

 static int mega_build_sglist (adapter_t *adapter, scb_t *scb,
-			      u32 *buffer, u32 *length);
+			      dma_addr_t *buffer, u32 *length);
 static inline int mega_busywait_mbox (adapter_t *);
 static int __mega_busywait_mbox (adapter_t *);
 static void mega_rundoneq (adapter_t *);




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

end of thread, other threads:[~2004-04-22 18:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 13:56 [PATCH 2.6.0] megaraid 64bit fix/cleanup (AMD64) Jord Tanner
  -- strict thread matches above, loose matches on Subject: below --
2004-04-16 19:24 Mukker, Atul
2004-04-16 16:35 Mukker, Atul
2004-04-16 19:21 ` Jord Tanner
     [not found]   ` <A1E28594-9478-11D8-B5AA-000A95CD704C@wagland.net>
2004-04-22 18:22     ` Jord Tanner
2004-04-22 18:37       ` Christoph Hellwig
     [not found] <18kst-5Av-1@gated-at.bofh.it>
2003-12-30  5:26 ` Andi Kleen
2004-01-01 14:08   ` Brad House
2003-12-30  5:10 Brad House
2003-12-30  5:20 ` Jeff Garzik
2003-12-30  6:26   ` Brad House
2003-12-30  6:35     ` Jeff Garzik
2003-12-30 19:43       ` Samuel Flory
2003-12-30 19:49         ` Brad House
2003-12-30 19:54           ` Samuel Flory
2003-12-30 21:09             ` Brad House
2003-12-30 23:11             ` Matt Domsch

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