* [PATCH 7/8] NetXen: Fix for PPC machines.
@ 2006-12-18 13:53 Amit S. Kale
2006-12-26 21:49 ` Jeff Garzik
2006-12-27 7:58 ` Christoph Hellwig
0 siblings, 2 replies; 5+ messages in thread
From: Amit S. Kale @ 2006-12-18 13:53 UTC (permalink / raw)
To: netdev; +Cc: amitkale, brazilnut, jeff, netxenproj, rob, sanjeev, wendyx
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
netxen_nic.h | 2 +-
netxen_nic_init.c | 12 ++++++------
netxen_nic_main.c | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 86dcd52..31b2553 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -63,7 +63,7 @@
#include "netxen_nic_hw.h"
-#define NETXEN_NIC_BUILD_NO "2"
+#define NETXEN_NIC_BUILD_NO "3"
#define _NETXEN_NIC_LINUX_MAJOR 3
#define _NETXEN_NIC_LINUX_MINOR 3
#define _NETXEN_NIC_LINUX_SUBVERSION 2
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index c147943..c0cbc30 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -928,7 +928,7 @@ u32 netxen_process_rcv_ring(struct netxe
}
netxen_process_rcv(adapter, ctxid, desc);
netxen_clear_sts_owner(desc);
- netxen_set_sts_owner(desc, STATUS_OWNER_PHANTOM);
+ netxen_set_sts_owner(desc, cpu_to_le16(STATUS_OWNER_PHANTOM));
consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1);
count++;
}
@@ -1138,13 +1138,13 @@ void netxen_post_rx_buffers(struct netxe
*/
dma = pci_map_single(pdev, skb->data, rcv_desc->dma_size,
PCI_DMA_FROMDEVICE);
- pdesc->addr_buffer = dma;
+ pdesc->addr_buffer = cpu_to_le64(dma);
buffer->skb = skb;
buffer->state = NETXEN_BUFFER_BUSY;
buffer->dma = dma;
/* make a rcv descriptor */
- pdesc->reference_handle = buffer->ref_handle;
- pdesc->buffer_length = rcv_desc->dma_size;
+ pdesc->reference_handle = cpu_to_le16(buffer->ref_handle);
+ pdesc->buffer_length = cpu_to_le32(rcv_desc->dma_size);
DPRINTK(INFO, "done writing descripter\n");
producer =
get_next_index(producer, rcv_desc->max_rx_desc_count);
@@ -1232,8 +1232,8 @@ void netxen_post_rx_buffers_nodb(struct
PCI_DMA_FROMDEVICE);
/* make a rcv descriptor */
- pdesc->reference_handle = le16_to_cpu(buffer->ref_handle);
- pdesc->buffer_length = le16_to_cpu(rcv_desc->dma_size);
+ 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);
DPRINTK(INFO, "done writing descripter\n");
producer =
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index bc08d21..aecc07d 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -822,8 +822,8 @@ static int netxen_nic_xmit_frame(struct
/* Take skb->data itself */
pbuf = &adapter->cmd_buf_arr[producer];
if ((netdev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size > 0) {
- pbuf->mss = skb_shinfo(skb)->gso_size;
- hwdesc->mss = skb_shinfo(skb)->gso_size;
+ pbuf->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
+ hwdesc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
} else {
pbuf->mss = 0;
hwdesc->mss = 0;
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 7/8] NetXen: Fix for PPC machines.
2006-12-18 13:53 [PATCH 7/8] NetXen: Fix for PPC machines Amit S. Kale
@ 2006-12-26 21:49 ` Jeff Garzik
2006-12-27 5:46 ` Amit Kale
2006-12-27 7:58 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-12-26 21:49 UTC (permalink / raw)
To: Amit S. Kale; +Cc: netdev, brazilnut, netxenproj, rob, sanjeev, wendyx
Amit S. Kale wrote:
> Signed-off-by: Amit S. Kale <amitkale@netxen.com>
>
> netxen_nic.h | 2 +-
> netxen_nic_init.c | 12 ++++++------
> netxen_nic_main.c | 4 ++--
applied 7-8.
your patch format is also broken: please read
Documentation/SubmittingPatches, in particular:
> 12) The canonical patch format
[...]
> The canonical patch message body contains the following:
[...]
> - A marker line containing simply "---".
The diffstat output should come after the marker line, to avoid getting
pasted into the kernel changelog.
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 7/8] NetXen: Fix for PPC machines.
2006-12-26 21:49 ` Jeff Garzik
@ 2006-12-27 5:46 ` Amit Kale
0 siblings, 0 replies; 5+ messages in thread
From: Amit Kale @ 2006-12-27 5:46 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, brazilnut, netxenproj, rob, sanjeev, wendyx
Thanks a lot for applying.
We'll definitely take care of the patch format problems you've pointed out.
-Amit
On Wednesday 27 December 2006 03:19, Jeff Garzik wrote:
> Amit S. Kale wrote:
> > Signed-off-by: Amit S. Kale <amitkale@netxen.com>
> >
> > netxen_nic.h | 2 +-
> > netxen_nic_init.c | 12 ++++++------
> > netxen_nic_main.c | 4 ++--
>
> applied 7-8.
>
> your patch format is also broken: please read
>
> Documentation/SubmittingPatches, in particular:
> > 12) The canonical patch format
>
> [...]
>
> > The canonical patch message body contains the following:
>
> [...]
>
> > - A marker line containing simply "---".
>
> The diffstat output should come after the marker line, to avoid getting
> pasted into the kernel changelog.
>
> Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 7/8] NetXen: Fix for PPC machines.
2006-12-18 13:53 [PATCH 7/8] NetXen: Fix for PPC machines Amit S. Kale
2006-12-26 21:49 ` Jeff Garzik
@ 2006-12-27 7:58 ` Christoph Hellwig
2006-12-27 8:06 ` Al Viro
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2006-12-27 7:58 UTC (permalink / raw)
To: Amit S. Kale; +Cc: netdev, brazilnut, jeff, netxenproj, rob, sanjeev, wendyx
On Mon, Dec 18, 2006 at 05:53:59AM -0800, Amit S. Kale wrote:
> Signed-off-by: Amit S. Kale <amitkale@netxen.com>
>
> netxen_nic.h | 2 +-
> netxen_nic_init.c | 12 ++++++------
> netxen_nic_main.c | 4 ++--
> 3 files changed, 9 insertions(+), 9 deletions(-)
Please use __le* types for all hardware data structures and use sparse
to verify all your endianess handling is correct.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 7/8] NetXen: Fix for PPC machines.
2006-12-27 7:58 ` Christoph Hellwig
@ 2006-12-27 8:06 ` Al Viro
0 siblings, 0 replies; 5+ messages in thread
From: Al Viro @ 2006-12-27 8:06 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Amit S. Kale, netdev, brazilnut, jeff, netxenproj, rob, sanjeev,
wendyx
On Wed, Dec 27, 2006 at 07:58:54AM +0000, Christoph Hellwig wrote:
> On Mon, Dec 18, 2006 at 05:53:59AM -0800, Amit S. Kale wrote:
> > Signed-off-by: Amit S. Kale <amitkale@netxen.com>
> >
> > netxen_nic.h | 2 +-
> > netxen_nic_init.c | 12 ++++++------
> > netxen_nic_main.c | 4 ++--
> > 3 files changed, 9 insertions(+), 9 deletions(-)
>
> Please use __le* types for all hardware data structures and use sparse
> to verify all your endianess handling is correct.
I have preliminary endianness annotations for that puppy; FWIW, a part of
it consists of _removing_ __le. Folks, readl() returns host-endian and
writel() takes host-endian as argument. They do conversions themselves.
One needs fixed-endian types in data structures shared with device - i.e.
anything in ioremapped area or dma'd to/from device.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-27 8:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 13:53 [PATCH 7/8] NetXen: Fix for PPC machines Amit S. Kale
2006-12-26 21:49 ` Jeff Garzik
2006-12-27 5:46 ` Amit Kale
2006-12-27 7:58 ` Christoph Hellwig
2006-12-27 8:06 ` Al Viro
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).