netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
@ 2007-10-29 21:27 Luis R. Rodriguez
  2007-10-29 22:39 ` Dale Farnsworth
  2007-10-29 22:47 ` Lennert Buytenhek
  0 siblings, 2 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2007-10-29 21:27 UTC (permalink / raw)
  To: netdev, linuxppc-dev
  Cc: Jeff Garzik, Lennert Buytenhek, Tzachi Perelstein,
	Dale Farnsworth

This commit made an incorrect assumption:
--
Author: Lennert Buytenhek <buytenh@wantstofly.org>
 Date:   Fri Oct 19 04:10:10 2007 +0200

    mv643xx_eth: Move ethernet register definitions into private header
    
    Move the mv643xx's ethernet-related register definitions from
    include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
    they aren't of any use outside the ethernet driver.
    
    Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
    Acked-by: Tzachi Perelstein <tzachi@marvell.com>
    Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
--

arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.

mcgrof@pogo:~/devel/wireless-2.6$ git-describe 

v2.6.24-rc1-138-g0119130

This patch fixes this by internalizing 3 defines onto pegasos which are
simply no longer available elsewhere. Without this your compile will fail
whenever you enable 'Common Hardware Reference Platform (CHRP) based machines',
(CONFIG_PPC_CHRP) as the Makefile for chrp adds it always:

obj-y                           += setup.o time.o pegasos_eth.o pci.o

If these defines are platform specific then they should later just be added 
back to include/linux/mv643xx.h.

Compile error:

  CC      arch/powerpc/platforms/chrp/pegasos_eth.o
arch/powerpc/platforms/chrp/pegasos_eth.c: In function 'Enable_SRAM':
arch/powerpc/platforms/chrp/pegasos_eth.c:150: error: 'MV643XX_ETH_BAR_4' 
undeclared (first use in this function)
arch/powerpc/platforms/chrp/pegasos_eth.c:150: error: (Each undeclared 
identifier is reported only once
arch/powerpc/platforms/chrp/pegasos_eth.c:150: error: for each function it 
appears in.)
arch/powerpc/platforms/chrp/pegasos_eth.c:152: error: 
'MV643XX_ETH_SIZE_REG_4' undeclared (first use in this function)
arch/powerpc/platforms/chrp/pegasos_eth.c:154: error: 
'MV643XX_ETH_BASE_ADDR_ENABLE_REG' undeclared (first use in this function)
make[2]: *** [arch/powerpc/platforms/chrp/pegasos_eth.o] Error 1
make[1]: *** [arch/powerpc/platforms/chrp] Error 2
make: *** [arch/powerpc/platforms] Error 2

Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>
---

 arch/powerpc/platforms/chrp/pegasos_eth.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 5bcc58d..1fc9e8c 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -24,6 +24,9 @@
 #define PEGASOS2_SRAM_BASE_ETH0			(PEGASOS2_SRAM_BASE)
 #define PEGASOS2_SRAM_BASE_ETH1			(PEGASOS2_SRAM_BASE_ETH0 + (PEGASOS2_SRAM_SIZE / 2) )
 
+#define PEGASOS2_ETH_BAR_4			0x2220
+#define PEGASOS2_ETH_SIZE_REG_4			0x2224
+#define PEGASOS2_ETH_BASE_ADDR_ENABLE_REG	0x2290
 
 #define PEGASOS2_SRAM_RXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
 #define PEGASOS2_SRAM_TXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
@@ -147,13 +150,13 @@ static int Enable_SRAM(void)
 
 	ALong = 0x02;
 	ALong |= PEGASOS2_SRAM_BASE & 0xffff0000;
-	MV_WRITE(MV643XX_ETH_BAR_4, ALong);
+	MV_WRITE(PEGASOS2_ETH_BAR_4, ALong);
 
-	MV_WRITE(MV643XX_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
+	MV_WRITE(PEGASOS2_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
 
-	MV_READ(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
+	MV_READ(PEGASOS2_ETH_BASE_ADDR_ENABLE_REG, ALong);
 	ALong &= ~(1 << 4);
-	MV_WRITE(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
+	MV_WRITE(PEGASOS2_ETH_BASE_ADDR_ENABLE_REG, ALong);
 
 #ifdef BE_VERBOSE
 	printk("Pegasos II/Marvell MV64361: register unmapped\n");

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-29 21:27 [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines Luis R. Rodriguez
@ 2007-10-29 22:39 ` Dale Farnsworth
  2007-10-30  7:44   ` Luis R. Rodriguez
  2007-10-30 18:32   ` Jeff Garzik
  2007-10-29 22:47 ` Lennert Buytenhek
  1 sibling, 2 replies; 7+ messages in thread
From: Dale Farnsworth @ 2007-10-29 22:39 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: netdev, linuxppc-dev, Jeff Garzik, Lennert Buytenhek,
	Tzachi Perelstein, Dale Farnsworth

On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:
> This commit made an incorrect assumption:
> --
> Author: Lennert Buytenhek <buytenh@wantstofly.org>
>  Date:   Fri Oct 19 04:10:10 2007 +0200
> 
>     mv643xx_eth: Move ethernet register definitions into private header
>     
>     Move the mv643xx's ethernet-related register definitions from
>     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
>     they aren't of any use outside the ethernet driver.
>     
>     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
>     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
>     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> --
> 
> arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
> 
> mcgrof@pogo:~/devel/wireless-2.6$ git-describe 
> 
> v2.6.24-rc1-138-g0119130
> 
> This patch fixes this by internalizing 3 defines onto pegasos which are
> simply no longer available elsewhere. Without this your compile will fail

That compile failure was fixed in commit
30e69bf4cce16d4c2dcfd629a60fcd8e1aba9fee by Al Viro.

However, as I examine that commit, I see that it defines offsets from
the eth block in the chip, rather than the full chip registeri block
as the Pegasos 2 code expects.  So, I think it fixes the compile
failure, but leaves the Pegasos 2 broken.

Luis, do you have Pegasos 2 hardware?  Can you (or anyone) verify that
the following patch is needed for the Pegasos 2?

Thanks,
-Dale

---------------------------------

mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2

In the mv643xx_eth driver, we now use offsets from the ethernet
register block within the chip, but the pegasos 2 platform still
needs offsets from the full chip's register base address.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
---
 include/linux/mv643xx_eth.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index 8df230a..30e11aa 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -8,9 +8,9 @@
 #define MV643XX_ETH_NAME		"mv643xx_eth"
 #define MV643XX_ETH_SHARED_REGS		0x2000
 #define MV643XX_ETH_SHARED_REGS_SIZE	0x2000
-#define MV643XX_ETH_BAR_4	0x220
-#define MV643XX_ETH_SIZE_REG_4	0x224
-#define MV643XX_ETH_BASE_ADDR_ENABLE_REG	0x0290
+#define MV643XX_ETH_BAR_4		0x2220
+#define MV643XX_ETH_SIZE_REG_4		0x2224
+#define MV643XX_ETH_BASE_ADDR_ENABLE_REG	0x2290
 
 struct mv643xx_eth_platform_data {
 	int		port_number;

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-29 21:27 [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines Luis R. Rodriguez
  2007-10-29 22:39 ` Dale Farnsworth
@ 2007-10-29 22:47 ` Lennert Buytenhek
  1 sibling, 0 replies; 7+ messages in thread
From: Lennert Buytenhek @ 2007-10-29 22:47 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: netdev, linuxppc-dev, Jeff Garzik, Tzachi Perelstein,
	Dale Farnsworth

On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:

> This commit made an incorrect assumption:
> --
> Author: Lennert Buytenhek <buytenh@wantstofly.org>
>  Date:   Fri Oct 19 04:10:10 2007 +0200
> 
>     mv643xx_eth: Move ethernet register definitions into private header
>     
>     Move the mv643xx's ethernet-related register definitions from
>     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
>     they aren't of any use outside the ethernet driver.
>     
>     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
>     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
>     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> --
> 
> arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
> 
> mcgrof@pogo:~/devel/wireless-2.6$ git-describe 
> 
> v2.6.24-rc1-138-g0119130
> 
> This patch fixes this by internalizing 3 defines onto pegasos which are
> simply no longer available elsewhere. Without this your compile will fail
> whenever you enable 'Common Hardware Reference Platform (CHRP) based machines',
>
> [...]
> 
> diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
> index 5bcc58d..1fc9e8c 100644
> --- a/arch/powerpc/platforms/chrp/pegasos_eth.c
> +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
> @@ -24,6 +24,9 @@
>  #define PEGASOS2_SRAM_BASE_ETH0			(PEGASOS2_SRAM_BASE)
>  #define PEGASOS2_SRAM_BASE_ETH1			(PEGASOS2_SRAM_BASE_ETH0 + (PEGASOS2_SRAM_SIZE / 2) )
>  
> +#define PEGASOS2_ETH_BAR_4			0x2220
> +#define PEGASOS2_ETH_SIZE_REG_4			0x2224
> +#define PEGASOS2_ETH_BASE_ADDR_ENABLE_REG	0x2290
>  
>  #define PEGASOS2_SRAM_RXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
>  #define PEGASOS2_SRAM_TXRING_SIZE		(PEGASOS2_SRAM_SIZE/4)
> @@ -147,13 +150,13 @@ static int Enable_SRAM(void)
>  
>  	ALong = 0x02;
>  	ALong |= PEGASOS2_SRAM_BASE & 0xffff0000;
> -	MV_WRITE(MV643XX_ETH_BAR_4, ALong);
> +	MV_WRITE(PEGASOS2_ETH_BAR_4, ALong);
>  
> -	MV_WRITE(MV643XX_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
> +	MV_WRITE(PEGASOS2_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
>  
> -	MV_READ(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
> +	MV_READ(PEGASOS2_ETH_BASE_ADDR_ENABLE_REG, ALong);
>  	ALong &= ~(1 << 4);
> -	MV_WRITE(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
> +	MV_WRITE(PEGASOS2_ETH_BASE_ADDR_ENABLE_REG, ALong);
>  
>  #ifdef BE_VERBOSE
>  	printk("Pegasos II/Marvell MV64361: register unmapped\n");

Al Viro sent a patch for this breakage a couple of days ago:

	http://marc.info/?l=linux-kernel&m=119351541706811&w=2

(FWIW, I think that code outside of mv643xx_eth.c should not be poking
into the mv643xx's registers directly.  Ideally, this info should just
be passed by pegasos_eth into mv643xx_eth via platform data, and then
mv643xx_eth can write the relevant hardware registers.)

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-29 22:39 ` Dale Farnsworth
@ 2007-10-30  7:44   ` Luis R. Rodriguez
  2007-10-30  9:36     ` Sven Luther
  2007-10-30 18:32   ` Jeff Garzik
  1 sibling, 1 reply; 7+ messages in thread
From: Luis R. Rodriguez @ 2007-10-30  7:44 UTC (permalink / raw)
  To: Dale Farnsworth
  Cc: netdev, linuxppc-dev, Jeff Garzik, Lennert Buytenhek,
	Tzachi Perelstein

On 10/29/07, Dale Farnsworth <dale@farnsworth.org> wrote:
> On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:
> > This commit made an incorrect assumption:
> > --
> > Author: Lennert Buytenhek <buytenh@wantstofly.org>
> >  Date:   Fri Oct 19 04:10:10 2007 +0200
> >
> >     mv643xx_eth: Move ethernet register definitions into private header
> >
> >     Move the mv643xx's ethernet-related register definitions from
> >     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
> >     they aren't of any use outside the ethernet driver.
> >
> >     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> >     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
> >     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > --
> >
> > arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
> >
> > mcgrof@pogo:~/devel/wireless-2.6$ git-describe
> >
> > v2.6.24-rc1-138-g0119130
> >
> > This patch fixes this by internalizing 3 defines onto pegasos which are
> > simply no longer available elsewhere. Without this your compile will fail
>
> That compile failure was fixed in commit
> 30e69bf4cce16d4c2dcfd629a60fcd8e1aba9fee by Al Viro.
>
> However, as I examine that commit, I see that it defines offsets from
> the eth block in the chip, rather than the full chip registeri block
> as the Pegasos 2 code expects.  So, I think it fixes the compile
> failure, but leaves the Pegasos 2 broken.
>
> Luis, do you have Pegasos 2 hardware?  Can you (or anyone) verify that
> the following patch is needed for the Pegasos 2?

Nope, sorry.

  Luis

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-30  7:44   ` Luis R. Rodriguez
@ 2007-10-30  9:36     ` Sven Luther
  2007-10-30 10:22       ` Dale Farnsworth
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Luther @ 2007-10-30  9:36 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Tzachi Perelstein, Jeff Garzik, linuxppc-dev, netdev,
	Lennert Buytenhek

On Tue, Oct 30, 2007 at 03:44:59AM -0400, Luis R. Rodriguez wrote:
> On 10/29/07, Dale Farnsworth <dale@farnsworth.org> wrote:
> > On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:
> > > This commit made an incorrect assumption:
> > > --
> > > Author: Lennert Buytenhek <buytenh@wantstofly.org>
> > >  Date:   Fri Oct 19 04:10:10 2007 +0200
> > >
> > >     mv643xx_eth: Move ethernet register definitions into private header
> > >
> > >     Move the mv643xx's ethernet-related register definitions from
> > >     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
> > >     they aren't of any use outside the ethernet driver.
> > >
> > >     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> > >     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
> > >     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > > --
> > >
> > > arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
> > >
> > > mcgrof@pogo:~/devel/wireless-2.6$ git-describe
> > >
> > > v2.6.24-rc1-138-g0119130
> > >
> > > This patch fixes this by internalizing 3 defines onto pegasos which are
> > > simply no longer available elsewhere. Without this your compile will fail
> >
> > That compile failure was fixed in commit
> > 30e69bf4cce16d4c2dcfd629a60fcd8e1aba9fee by Al Viro.
> >
> > However, as I examine that commit, I see that it defines offsets from
> > the eth block in the chip, rather than the full chip registeri block
> > as the Pegasos 2 code expects.  So, I think it fixes the compile
> > failure, but leaves the Pegasos 2 broken.
> >
> > Luis, do you have Pegasos 2 hardware?  Can you (or anyone) verify that
> > the following patch is needed for the Pegasos 2?
> 
> Nope, sorry.

I am busy right now, but have various pegasos machines available for
testing. What exactly should i test ? 

Friendly,

Sven Luther

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-30  9:36     ` Sven Luther
@ 2007-10-30 10:22       ` Dale Farnsworth
  0 siblings, 0 replies; 7+ messages in thread
From: Dale Farnsworth @ 2007-10-30 10:22 UTC (permalink / raw)
  To: Sven Luther
  Cc: Luis R. Rodriguez, netdev, Tzachi Perelstein, Lennert Buytenhek,
	Jeff Garzik, linuxppc-dev

On Tue, Oct 30, 2007 at 10:36:06AM +0100, Sven Luther wrote:
> On Tue, Oct 30, 2007 at 03:44:59AM -0400, Luis R. Rodriguez wrote:
> > On 10/29/07, Dale Farnsworth <dale@farnsworth.org> wrote:
> > > On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:
> > > > This commit made an incorrect assumption:
> > > > --
> > > > Author: Lennert Buytenhek <buytenh@wantstofly.org>
> > > >  Date:   Fri Oct 19 04:10:10 2007 +0200
> > > >
> > > >     mv643xx_eth: Move ethernet register definitions into private header
> > > >
> > > >     Move the mv643xx's ethernet-related register definitions from
> > > >     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
> > > >     they aren't of any use outside the ethernet driver.
> > > >
> > > >     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> > > >     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
> > > >     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> > > > --
> > > >
> > > > arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
> > > >
> > > > mcgrof@pogo:~/devel/wireless-2.6$ git-describe
> > > >
> > > > v2.6.24-rc1-138-g0119130
> > > >
> > > > This patch fixes this by internalizing 3 defines onto pegasos which are
> > > > simply no longer available elsewhere. Without this your compile will fail
> > >
> > > That compile failure was fixed in commit
> > > 30e69bf4cce16d4c2dcfd629a60fcd8e1aba9fee by Al Viro.
> > >
> > > However, as I examine that commit, I see that it defines offsets from
> > > the eth block in the chip, rather than the full chip registeri block
> > > as the Pegasos 2 code expects.  So, I think it fixes the compile
> > > failure, but leaves the Pegasos 2 broken.
> > >
> > > Luis, do you have Pegasos 2 hardware?  Can you (or anyone) verify that
> > > the following patch is needed for the Pegasos 2?
> > 
> > Nope, sorry.
> 
> I am busy right now, but have various pegasos machines available for
> testing. What exactly should i test ? 

Thanks Sven.

Test whether an Ethernet port works at all.  I think it's currently
broken, but should work with the patch I supplied.

-Dale

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

* Re: [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines
  2007-10-29 22:39 ` Dale Farnsworth
  2007-10-30  7:44   ` Luis R. Rodriguez
@ 2007-10-30 18:32   ` Jeff Garzik
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2007-10-30 18:32 UTC (permalink / raw)
  To: Dale Farnsworth
  Cc: Luis R. Rodriguez, netdev, linuxppc-dev, Lennert Buytenhek,
	Tzachi Perelstein

Dale Farnsworth wrote:
> On Mon, Oct 29, 2007 at 05:27:29PM -0400, Luis R. Rodriguez wrote:
>> This commit made an incorrect assumption:
>> --
>> Author: Lennert Buytenhek <buytenh@wantstofly.org>
>>  Date:   Fri Oct 19 04:10:10 2007 +0200
>>
>>     mv643xx_eth: Move ethernet register definitions into private header
>>     
>>     Move the mv643xx's ethernet-related register definitions from
>>     include/linux/mv643xx.h into drivers/net/mv643xx_eth.h, since
>>     they aren't of any use outside the ethernet driver.
>>     
>>     Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
>>     Acked-by: Tzachi Perelstein <tzachi@marvell.com>
>>     Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
>> --
>>
>> arch/powerpc/platforms/chrp/pegasos_eth.c made use of a 3 defines there.
>>
>> mcgrof@pogo:~/devel/wireless-2.6$ git-describe 
>>
>> v2.6.24-rc1-138-g0119130
>>
>> This patch fixes this by internalizing 3 defines onto pegasos which are
>> simply no longer available elsewhere. Without this your compile will fail
> 
> That compile failure was fixed in commit
> 30e69bf4cce16d4c2dcfd629a60fcd8e1aba9fee by Al Viro.
> 
> However, as I examine that commit, I see that it defines offsets from
> the eth block in the chip, rather than the full chip registeri block
> as the Pegasos 2 code expects.  So, I think it fixes the compile
> failure, but leaves the Pegasos 2 broken.
> 
> Luis, do you have Pegasos 2 hardware?  Can you (or anyone) verify that
> the following patch is needed for the Pegasos 2?
> 
> Thanks,
> -Dale
> 
> ---------------------------------
> 
> mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2
> 
> In the mv643xx_eth driver, we now use offsets from the ethernet
> register block within the chip, but the pegasos 2 platform still
> needs offsets from the full chip's register base address.
> 
> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> ---
>  include/linux/mv643xx_eth.h |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
> index 8df230a..30e11aa 100644
> --- a/include/linux/mv643xx_eth.h
> +++ b/include/linux/mv643xx_eth.h
> @@ -8,9 +8,9 @@
>  #define MV643XX_ETH_NAME		"mv643xx_eth"
>  #define MV643XX_ETH_SHARED_REGS		0x2000
>  #define MV643XX_ETH_SHARED_REGS_SIZE	0x2000
> -#define MV643XX_ETH_BAR_4	0x220
> -#define MV643XX_ETH_SIZE_REG_4	0x224
> -#define MV643XX_ETH_BASE_ADDR_ENABLE_REG	0x0290
> +#define MV643XX_ETH_BAR_4		0x2220
> +#define MV643XX_ETH_SIZE_REG_4		0x2224
> +#define MV643XX_ETH_BASE_ADDR_ENABLE_REG	0x2290

applied



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

end of thread, other threads:[~2007-10-30 18:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 21:27 [PATCH] pegasos_eth.c: Fix compile error over MV643XX_ defines Luis R. Rodriguez
2007-10-29 22:39 ` Dale Farnsworth
2007-10-30  7:44   ` Luis R. Rodriguez
2007-10-30  9:36     ` Sven Luther
2007-10-30 10:22       ` Dale Farnsworth
2007-10-30 18:32   ` Jeff Garzik
2007-10-29 22:47 ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).