Re: sky2 problem on powerpc

2006-09-05 Thread Benjamin Herrenschmidt
On Tue, 2006-09-05 at 14:36 -0700, Stephen Hemminger wrote: > This is the reduced version of your patch, plus I got rid of the union > in tx_le, it is a nuisance. Thanks. I'll give it a go later today. The remaining nit is the inconsitent swapping of the vlan tag which is manipulated at BE at time

Re: sky2 problem on powerpc

2006-09-05 Thread Stephen Hemminger
This is the reduced version of your patch, plus I got rid of the union in tx_le, it is a nuisance. --- sky2.orig/drivers/net/sky2.c2006-09-05 13:39:34.0 -0700 +++ sky2/drivers/net/sky2.c 2006-09-05 13:57:44.0 -0700 @@ -809,7 +809,7 @@ struct sky2_rx_le *le;

Re: sky2 problem on powerpc

2006-09-05 Thread Benjamin Herrenschmidt
On Mon, 2006-09-04 at 21:15 -0700, Stephen Hemminger wrote: > On Tue, 05 Sep 2006 13:47:52 +1000 > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > > > > It may not need any swapping, it is hard to tell what the hardware > > > will do without experimentation. > > > > Yes... did you have a

Re: sky2 problem on powerpc

2006-09-05 Thread Stephen Hemminger
On Tue, 05 Sep 2006 13:47:52 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > It may not need any swapping, it is hard to tell what the hardware > > will do without experimentation. > > Yes... did you have a chance to test the vlan stuff on LE machines > (x86) ? did it work with the

Re: sky2 problem on powerpc

2006-09-04 Thread Benjamin Herrenschmidt
> It may not need any swapping, it is hard to tell what the hardware > will do without experimentation. Yes... did you have a chance to test the vlan stuff on LE machines (x86) ? did it work with the BE swapping you were doing ? I've purposedly removed in my patches the hardware side swapping of

Re: sky2 problem on powerpc

2006-09-04 Thread Stephen Hemminger
On Mon, 04 Sep 2006 17:42:27 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > This fixes sky2 driver on big endian machines. I choose not to use the > hardware byteswap facility as it would have required to have a different > definition of the various ring data structures and it looks ugl

Re: sky2 problem on powerpc

2006-09-04 Thread Benjamin Herrenschmidt
On Mon, 2006-09-04 at 23:05 +0200, Segher Boessenkool wrote: > > The patch has a couple of places where I reversed 2 assignments, they > > are harmless, it was before I figured out that the chip will > > (apparently) not access a descriptor before it's been told to do so > > via > > MMIO, and thu

Re: sky2 problem on powerpc

2006-09-04 Thread Segher Boessenkool
The patch has a couple of places where I reversed 2 assignments, they are harmless, it was before I figured out that the chip will (apparently) not access a descriptor before it's been told to do so via MMIO, and thus the order of the writes to the descriptors is irrelevant (I was also adding

Re: sky2 problem on powerpc

2006-09-04 Thread Benjamin Herrenschmidt
This fixes sky2 driver on big endian machines. I choose not to use the hardware byteswap facility as it would have required to have a different definition of the various ring data structures and it looks ugly :) On powerpc, there is pretty much no overhead at doing byteswap. The patch has a couple

Re: sky2 problem on powerpc

2006-09-04 Thread Benjamin Herrenschmidt
> Because if you look at the definition for: > > struct sky2_rx_le { > __le32 addr; > __le16 length; > u8 ctrl; > u8 opcode; > } __attribute((packed)); > > (As an example) > > If the chips does LE accesses, then marking "lenght" as being an LE > value isn't e

sky2 problem on powerpc

2006-09-03 Thread Benjamin Herrenschmidt
Hi Stephen ! To try to validate some PCIe code we have around, I got myself a SysKonnect SK-9Exx card (one x1 lane one port and one x4 lanes 2 ports actually, though I've only tested the first one at this point, based on a 88E8061 Marvell chip). I've used the sky2 driver as of a random last week'