diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
commit | d790d4d583aeaed9fc6f8a9f4d9f8ce6b1c15c7f (patch) | |
tree | 854ab394486288d40fa8179cbfaf66e8bdc44b0f /drivers/net/netxen | |
parent | 73b2c7165b76b20eb1290e7efebc33cfd21db1ca (diff) | |
parent | 3a09b1be53d23df780a0cd0e4087a05e2ca4a00c (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ctx.c | 3 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 13 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c index f26e54716c88..3a41b6a84a68 100644 --- a/drivers/net/netxen/netxen_nic_ctx.c +++ b/drivers/net/netxen/netxen_nic_ctx.c | |||
@@ -629,7 +629,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
629 | if (addr == NULL) { | 629 | if (addr == NULL) { |
630 | dev_err(&pdev->dev, "%s: failed to allocate tx desc ring\n", | 630 | dev_err(&pdev->dev, "%s: failed to allocate tx desc ring\n", |
631 | netdev->name); | 631 | netdev->name); |
632 | return -ENOMEM; | 632 | err = -ENOMEM; |
633 | goto err_out_free; | ||
633 | } | 634 | } |
634 | 635 | ||
635 | tx_ring->desc_head = (struct cmd_desc_type0 *)addr; | 636 | tx_ring->desc_head = (struct cmd_desc_type0 *)addr; |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 5c496f8d7c49..29d7b93d0493 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -1159,9 +1159,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off) | |||
1159 | 1159 | ||
1160 | window = CRB_HI(off); | 1160 | window = CRB_HI(off); |
1161 | 1161 | ||
1162 | if (adapter->ahw.crb_win == window) | ||
1163 | return; | ||
1164 | |||
1165 | writel(window, addr); | 1162 | writel(window, addr); |
1166 | if (readl(addr) != window) { | 1163 | if (readl(addr) != window) { |
1167 | if (printk_ratelimit()) | 1164 | if (printk_ratelimit()) |
@@ -1169,7 +1166,6 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong off) | |||
1169 | "failed to set CRB window to %d off 0x%lx\n", | 1166 | "failed to set CRB window to %d off 0x%lx\n", |
1170 | window, off); | 1167 | window, off); |
1171 | } | 1168 | } |
1172 | adapter->ahw.crb_win = window; | ||
1173 | } | 1169 | } |
1174 | 1170 | ||
1175 | static void __iomem * | 1171 | static void __iomem * |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 045a7c8f5bdf..c865dda2adf1 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -218,7 +218,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
218 | if (cmd_buf_arr == NULL) { | 218 | if (cmd_buf_arr == NULL) { |
219 | dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n", | 219 | dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n", |
220 | netdev->name); | 220 | netdev->name); |
221 | return -ENOMEM; | 221 | goto err_out; |
222 | } | 222 | } |
223 | memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); | 223 | memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); |
224 | tx_ring->cmd_buf_arr = cmd_buf_arr; | 224 | tx_ring->cmd_buf_arr = cmd_buf_arr; |
@@ -230,7 +230,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
230 | if (rds_ring == NULL) { | 230 | if (rds_ring == NULL) { |
231 | dev_err(&pdev->dev, "%s: failed to allocate rds ring struct\n", | 231 | dev_err(&pdev->dev, "%s: failed to allocate rds ring struct\n", |
232 | netdev->name); | 232 | netdev->name); |
233 | return -ENOMEM; | 233 | goto err_out; |
234 | } | 234 | } |
235 | recv_ctx->rds_rings = rds_ring; | 235 | recv_ctx->rds_rings = rds_ring; |
236 | 236 | ||
@@ -1805,9 +1805,10 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, | |||
1805 | netxen_ctx_msg msg = 0; | 1805 | netxen_ctx_msg msg = 0; |
1806 | struct list_head *head; | 1806 | struct list_head *head; |
1807 | 1807 | ||
1808 | spin_lock(&rds_ring->lock); | ||
1809 | |||
1808 | producer = rds_ring->producer; | 1810 | producer = rds_ring->producer; |
1809 | 1811 | ||
1810 | spin_lock(&rds_ring->lock); | ||
1811 | head = &rds_ring->free_list; | 1812 | head = &rds_ring->free_list; |
1812 | while (!list_empty(head)) { | 1813 | while (!list_empty(head)) { |
1813 | 1814 | ||
@@ -1829,7 +1830,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, | |||
1829 | 1830 | ||
1830 | producer = get_next_index(producer, rds_ring->num_desc); | 1831 | producer = get_next_index(producer, rds_ring->num_desc); |
1831 | } | 1832 | } |
1832 | spin_unlock(&rds_ring->lock); | ||
1833 | 1833 | ||
1834 | if (count) { | 1834 | if (count) { |
1835 | rds_ring->producer = producer; | 1835 | rds_ring->producer = producer; |
@@ -1853,6 +1853,8 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid, | |||
1853 | NETXEN_RCV_PRODUCER_OFFSET), msg); | 1853 | NETXEN_RCV_PRODUCER_OFFSET), msg); |
1854 | } | 1854 | } |
1855 | } | 1855 | } |
1856 | |||
1857 | spin_unlock(&rds_ring->lock); | ||
1856 | } | 1858 | } |
1857 | 1859 | ||
1858 | static void | 1860 | static void |
@@ -1864,10 +1866,11 @@ netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, | |||
1864 | int producer, count = 0; | 1866 | int producer, count = 0; |
1865 | struct list_head *head; | 1867 | struct list_head *head; |
1866 | 1868 | ||
1867 | producer = rds_ring->producer; | ||
1868 | if (!spin_trylock(&rds_ring->lock)) | 1869 | if (!spin_trylock(&rds_ring->lock)) |
1869 | return; | 1870 | return; |
1870 | 1871 | ||
1872 | producer = rds_ring->producer; | ||
1873 | |||
1871 | head = &rds_ring->free_list; | 1874 | head = &rds_ring->free_list; |
1872 | while (!list_empty(head)) { | 1875 | while (!list_empty(head)) { |
1873 | 1876 | ||