aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_init.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-01-02 05:39:10 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-31 04:59:08 -0500
commita608ab9cb6a5050394498b2520c6e7c162f4e2cf (patch)
treef22716ac7293bc77bab7fc48f4d8dbd0a2ecd57d /drivers/net/netxen/netxen_nic_init.c
parentf56df2f4db6e4af87fb8e941cff69f4501a111df (diff)
netxen patches
Have fun. >From 24f4a1a77431575a9cdfaae25adda85842099f70 Mon Sep 17 00:00:00 2001 From: Al Viro <viro@zeniv.linux.org.uk> Date: Mon, 1 Jan 2007 15:22:56 -0500 Subject: [PATCH] netxen trivial annotations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index c3e41f368554..973af96337a9 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -690,8 +690,7 @@ int netxen_nic_rx_has_work(struct netxen_adapter *adapter)
690 desc_head = recv_ctx->rcv_status_desc_head; 690 desc_head = recv_ctx->rcv_status_desc_head;
691 desc = &desc_head[consumer]; 691 desc = &desc_head[consumer];
692 692
693 if (((le16_to_cpu(netxen_get_sts_owner(desc))) 693 if (netxen_get_sts_owner(desc) & STATUS_OWNER_HOST)
694 & STATUS_OWNER_HOST))
695 return 1; 694 return 1;
696 } 695 }
697 696
@@ -787,11 +786,11 @@ netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
787 struct netxen_port *port = adapter->port[netxen_get_sts_port(desc)]; 786 struct netxen_port *port = adapter->port[netxen_get_sts_port(desc)];
788 struct pci_dev *pdev = port->pdev; 787 struct pci_dev *pdev = port->pdev;
789 struct net_device *netdev = port->netdev; 788 struct net_device *netdev = port->netdev;
790 int index = le16_to_cpu(netxen_get_sts_refhandle(desc)); 789 int index = netxen_get_sts_refhandle(desc);
791 struct netxen_recv_context *recv_ctx = &(adapter->recv_ctx[ctxid]); 790 struct netxen_recv_context *recv_ctx = &(adapter->recv_ctx[ctxid]);
792 struct netxen_rx_buffer *buffer; 791 struct netxen_rx_buffer *buffer;
793 struct sk_buff *skb; 792 struct sk_buff *skb;
794 u32 length = le16_to_cpu(netxen_get_sts_totallength(desc)); 793 u32 length = netxen_get_sts_totallength(desc);
795 u32 desc_ctx; 794 u32 desc_ctx;
796 struct netxen_rcv_desc_ctx *rcv_desc; 795 struct netxen_rcv_desc_ctx *rcv_desc;
797 int ret; 796 int ret;
@@ -918,16 +917,14 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max)
918 */ 917 */
919 while (count < max) { 918 while (count < max) {
920 desc = &desc_head[consumer]; 919 desc = &desc_head[consumer];
921 if (! 920 if (!(netxen_get_sts_owner(desc) & STATUS_OWNER_HOST)) {
922 (le16_to_cpu(netxen_get_sts_owner(desc)) &
923 STATUS_OWNER_HOST)) {
924 DPRINTK(ERR, "desc %p ownedby %x\n", desc, 921 DPRINTK(ERR, "desc %p ownedby %x\n", desc,
925 netxen_get_sts_owner(desc)); 922 netxen_get_sts_owner(desc));
926 break; 923 break;
927 } 924 }
928 netxen_process_rcv(adapter, ctxid, desc); 925 netxen_process_rcv(adapter, ctxid, desc);
929 netxen_clear_sts_owner(desc); 926 netxen_clear_sts_owner(desc);
930 netxen_set_sts_owner(desc, cpu_to_le16(STATUS_OWNER_PHANTOM)); 927 netxen_set_sts_owner(desc, STATUS_OWNER_PHANTOM);
931 consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1); 928 consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1);
932 count++; 929 count++;
933 } 930 }
@@ -1232,7 +1229,7 @@ void netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, uint32_t ctx,
1232 1229
1233 /* make a rcv descriptor */ 1230 /* make a rcv descriptor */
1234 pdesc->reference_handle = cpu_to_le16(buffer->ref_handle); 1231 pdesc->reference_handle = cpu_to_le16(buffer->ref_handle);
1235 pdesc->buffer_length = cpu_to_le16(rcv_desc->dma_size); 1232 pdesc->buffer_length = cpu_to_le32(rcv_desc->dma_size);
1236 pdesc->addr_buffer = cpu_to_le64(buffer->dma); 1233 pdesc->addr_buffer = cpu_to_le64(buffer->dma);
1237 DPRINTK(INFO, "done writing descripter\n"); 1234 DPRINTK(INFO, "done writing descripter\n");
1238 producer = 1235 producer =