NetXen: Fix for PPC machines.
authorAmit S. Kale <amitkale@netxen.com>
Mon, 18 Dec 2006 13:53:59 +0000 (05:53 -0800)
committerJeff Garzik <jeff@garzik.org>
Tue, 26 Dec 2006 21:46:39 +0000 (16:46 -0500)
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(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_init.c
drivers/net/netxen/netxen_nic_main.c

index 86dcd52683dacc8a4581c624af5b2804f9fdb860..31b2553072aef0f0f586f8e2aad65225805ed355 100644 (file)
@@ -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
index c147943a9f5459228c7e3477ce4513d1935552a4..c0cbc30964abf02e7ea9fd8aff2b86e5a8c2d9c9 100644 (file)
@@ -928,7 +928,7 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max)
                }
                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 netxen_adapter *adapter, u32 ctx, u32 ringid)
                 */
                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 netxen_adapter *adapter, uint32_t ctx,
                                             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 =
index bc08d21adc47ce70248f5019b73a7e669b889a31..aecc07d5170cc0d8f508f84ce91524fbe8b292b5 100644 (file)
@@ -822,8 +822,8 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
        /* 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;