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>
This commit is contained in:
David S. Miller 2014-11-06 19:00:26 -05:00
commit a1f5313cc4

View File

@ -1369,9 +1369,6 @@ static int xgbe_close(struct net_device *netdev)
/* Free the ring descriptors and buffers */ /* Free the ring descriptors and buffers */
desc_if->free_ring_resources(pdata); desc_if->free_ring_resources(pdata);
/* Free the channel and ring structures */
xgbe_free_channels(pdata);
/* Release the interrupts */ /* Release the interrupts */
devm_free_irq(pdata->dev, pdata->dev_irq, pdata); devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
if (pdata->per_channel_irq) { if (pdata->per_channel_irq) {
@ -1380,6 +1377,9 @@ static int xgbe_close(struct net_device *netdev)
devm_free_irq(pdata->dev, channel->dma_irq, channel); devm_free_irq(pdata->dev, channel->dma_irq, channel);
} }
/* Free the channel and ring structures */
xgbe_free_channels(pdata);
/* Disable the clocks */ /* Disable the clocks */
clk_disable_unprepare(pdata->ptpclk); clk_disable_unprepare(pdata->ptpclk);
clk_disable_unprepare(pdata->sysclk); clk_disable_unprepare(pdata->sysclk);
@ -1908,7 +1908,7 @@ read_again:
skb = xgbe_create_skb(pdata, rdata, &put_len); skb = xgbe_create_skb(pdata, rdata, &put_len);
if (!skb) { if (!skb) {
error = 1; error = 1;
goto read_again; goto skip_data;
} }
} }
@ -1926,10 +1926,10 @@ read_again:
} }
} }
skip_data:
if (incomplete || context_next) if (incomplete || context_next)
goto read_again; goto read_again;
/* Stray Context Descriptor? */
if (!skb) if (!skb)
goto next_packet; goto next_packet;