aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-11-06 19:00:26 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-06 19:00:26 -0500
commita1f5313cc4325a1e0feb3dd1a20fca1844dce72b (patch)
treebfda906e32b1522b4d1c051cf207adb6ca7138f8
parent6b798d70d07a38e9ba0a32316f76495f9dcfc343 (diff)
parentf5eecbbef0b7d28b171b3b873e1e4a69aabd7b58 (diff)
Merge branch 'amd-xgbe-next'
Tom Lendacky says: ==================== amd-xgbe: AMD XGBE driver updates 2014-11-06 The following series of patches fixes a couple of bugs that slipped through my last series. - Free channel structure after freeing the per channel interrupts - If an skb error allocation occurs during receive processing check whether more descriptors are associated with the packet or whether to start on a new packet This patch series is based on net-next. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-drv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index ced9f52eb45b..0544931329d1 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1369,9 +1369,6 @@ static int xgbe_close(struct net_device *netdev)
1369 /* Free the ring descriptors and buffers */ 1369 /* Free the ring descriptors and buffers */
1370 desc_if->free_ring_resources(pdata); 1370 desc_if->free_ring_resources(pdata);
1371 1371
1372 /* Free the channel and ring structures */
1373 xgbe_free_channels(pdata);
1374
1375 /* Release the interrupts */ 1372 /* Release the interrupts */
1376 devm_free_irq(pdata->dev, pdata->dev_irq, pdata); 1373 devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
1377 if (pdata->per_channel_irq) { 1374 if (pdata->per_channel_irq) {
@@ -1380,6 +1377,9 @@ static int xgbe_close(struct net_device *netdev)
1380 devm_free_irq(pdata->dev, channel->dma_irq, channel); 1377 devm_free_irq(pdata->dev, channel->dma_irq, channel);
1381 } 1378 }
1382 1379
1380 /* Free the channel and ring structures */
1381 xgbe_free_channels(pdata);
1382
1383 /* Disable the clocks */ 1383 /* Disable the clocks */
1384 clk_disable_unprepare(pdata->ptpclk); 1384 clk_disable_unprepare(pdata->ptpclk);
1385 clk_disable_unprepare(pdata->sysclk); 1385 clk_disable_unprepare(pdata->sysclk);
@@ -1908,7 +1908,7 @@ read_again:
1908 skb = xgbe_create_skb(pdata, rdata, &put_len); 1908 skb = xgbe_create_skb(pdata, rdata, &put_len);
1909 if (!skb) { 1909 if (!skb) {
1910 error = 1; 1910 error = 1;
1911 goto read_again; 1911 goto skip_data;
1912 } 1912 }
1913 } 1913 }
1914 1914
@@ -1926,10 +1926,10 @@ read_again:
1926 } 1926 }
1927 } 1927 }
1928 1928
1929skip_data:
1929 if (incomplete || context_next) 1930 if (incomplete || context_next)
1930 goto read_again; 1931 goto read_again;
1931 1932
1932 /* Stray Context Descriptor? */
1933 if (!skb) 1933 if (!skb)
1934 goto next_packet; 1934 goto next_packet;
1935 1935