From: Michael Buesch <mb@bu3sch.de>
To: wen xiong <wendyx@us.ibm.com>
Cc: Pradeep Dalvi <pradeep@netxen.com>,
netdev@vger.kernel.org, "jeff@garzik.org" <jeff@garzik.org>,
"sanjeev@netxen.com" <sanjeev@netxen.com>,
"unmproj@linsyssoft.com" <unmproj@linsyssoft.com>,
Rob Mapes <rob@netxen.com>,
amitkale@netxen.com
Subject: Re: [PATCH 2.6.17 0/9] NetXen: 1G/10G Ethernet Driver - patch for big-endian systems
Date: Thu, 24 Aug 2006 23:29:10 +0200 [thread overview]
Message-ID: <200608242329.11165.mb@bu3sch.de> (raw)
In-Reply-To: <1156451811.13196.132.camel@wendyx.austin.ibm.com>
On Thursday 24 August 2006 22:36, wen xiong wrote:
>
> Hi All,
>
> This patch brings the NetXen Ethernet driver to work on big-endian
> systems. I have tested this patch on difference platforms including
> little-endian and big-endian systems. The patch included:
> (1)transmit and receive descriptors endian issue fix.
> (2)MAC address endian issue fix.
Next time please inline the patch in the mail.
> diff -Nuar old/drivers/net/netxen/netxen_nic_hw.c
> new/drivers/net/netxen/netxen_nic_hw.c ---
> old/drivers/net/netxen/netxen_nic_hw.c 2006-08-23 12:58:43.000000000 -0500
> +++ new/drivers/net/netxen/netxen_nic_hw.c 2006-08-23 13:15:19.000000000
> -0500 @@ -313,7 +313,8 @@
> }
> }
> CMD_DESC_TCP_HDR_OFFSET_WRT(desc, skb->h.raw - skb->data);
> - desc->ip_hdr_offset = skb->nh.raw - skb->data;
> + desc->length_tcp_hdr=cpu_to_le32(desc->length_tcp_hdr);
^^^
spaces here, please.
> + desc->ip_hdr_offset = skb->nh.raw - skb->data;
^^^^
That's one space too much ;) No need to change that line.
> @@ -832,9 +832,9 @@
> rcv_desc->dma_size,
> PCI_DMA_FROMDEVICE);
> /* make a rcv descriptor */
> - pdesc->reference_handle = __cpu_to_le16(buffer->ref_handle);
> - pdesc->buffer_length = __cpu_to_le16(rcv_desc->dma_size);
> - pdesc->addr_buffer = __cpu_to_le64(buffer->dma);
> + pdesc->reference_handle = le16_to_cpu(buffer->ref_handle);
I think that should be cpu_to_le16()
(although they are technically equal..)
> + pdesc->buffer_length = le16_to_cpu(rcv_desc->dma_size);
dito
> diff -Nuar old/drivers/net/netxen/netxen_nic_niu.c
> new/drivers/net/netxen/netxen_nic_niu.c ---
> old/drivers/net/netxen/netxen_nic_niu.c 2006-08-23 12:58:43.000000000 -0500
> +++ new/drivers/net/netxen/netxen_nic_niu.c 2006-08-23 13:15:19.000000000
> -0500 @@ -712,6 +712,7 @@
> return -EINVAL;
>
> memcpy(&temp, addr, 2);
> + temp=cpu_to_le32(temp);
I think that should be:
temp = le32_to_cpu(temp);
> temp <<= 16;
> if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1,
> &temp, 4))
> @@ -720,6 +721,7 @@
> temp = 0;
>
> memcpy(&temp, ((u8 *) addr) + 2, sizeof(netxen_crbword_t));
> + temp=cpu_to_le32(temp);
dito
> if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_HI,
> &temp, 4))
> return -EIO;
> @@ -760,7 +762,7 @@
> long netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter,
> long port, netxen_niu_prom_mode_t mode)
> {
> - long reg;
> + netxen_crbword_t reg;
>
> if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
> return -EINVAL;
--
Greetings Michael.
next prev parent reply other threads:[~2006-08-24 21:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 14:38 [PATCH 2.6.17 0/9] NetXen: 1G/10G Ethernet Driver Amit S. Kale
2006-08-18 14:44 ` [PATCH 2.6.17 1/9] NetXen: Makefile and driver main file Amit S. Kale
2006-08-18 14:58 ` [PATCH 2.6.17 2/9] NetXen: Hardware access routines Amit S. Kale
2006-08-18 15:16 ` Stephen Hemminger
2006-08-21 8:27 ` Amit S. Kale
2006-08-21 14:03 ` Stephen Hemminger
2006-08-25 18:23 ` Sanjeev Jorapur
2006-08-28 9:52 ` Amit S. Kale
2006-08-21 9:55 ` [PATCH 2.6.17 2/9] NetXen: Hardware access routines (name prefixed) Pradeep Dalvi
2006-08-21 10:01 ` [PATCH 2.6.17 1/9] NetXen: Makefile and driver main file (name prefix change) Pradeep Dalvi
2006-08-18 15:01 ` [PATCH 2.6.17 3/9] NetXen: hw initialization routines Amit S. Kale
2006-08-21 10:04 ` [PATCH 2.6.17 3/9] NetXen: hw initialization routines (name prefix change) Pradeep Dalvi
2006-08-18 15:04 ` [PATCH 2.6.17 4/9] NetXen: intr routines and niu handling Amit S. Kale
2006-08-18 15:22 ` Stephen Hemminger
2006-08-21 8:40 ` Amit S. Kale
2006-08-18 15:06 ` [PATCH 2.6.17 5/9] NetXen: ethtool interface Amit S. Kale
2006-08-18 15:10 ` [PATCH 2.6.17 6/9] NetXen: Main header file Amit S. Kale
2006-08-21 10:05 ` [PATCH 2.6.17 6/9] NetXen: Main header file (Name prefix change) Pradeep Dalvi
2006-08-18 15:12 ` [PATCH 2.6.17 7/9] NetXen: hw access routines header file Amit S. Kale
2006-08-18 15:14 ` [PATCH 2.6.17 8/9] NetXen: Header file and ioctl " Amit S. Kale
2006-08-18 15:17 ` [PATCH 2.6.17 9/9] NetXen: CRB reg defininitions Amit S. Kale
2006-08-22 7:43 ` [PATCH 2.6.17 0/9] NetXen: 1G/10G Ethernet Driver Pradeep Dalvi
2006-08-24 0:04 ` Don Fry
2006-08-25 13:19 ` Amit S. Kale
2006-08-24 20:36 ` [PATCH 2.6.17 0/9] NetXen: 1G/10G Ethernet Driver - patch for big-endian systems wen xiong
2006-08-24 21:29 ` Michael Buesch [this message]
2006-08-24 21:40 ` Francois Romieu
2006-08-25 13:18 ` Amit S. Kale
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608242329.11165.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=amitkale@netxen.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=pradeep@netxen.com \
--cc=rob@netxen.com \
--cc=sanjeev@netxen.com \
--cc=unmproj@linsyssoft.com \
--cc=wendyx@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).