Skip to content

Commit

Permalink
Merge branch 'amd-xgbe-next'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Nov 7, 2014
2 parents 6b798d7 + f5eecbb commit a1f5313
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/ethernet/amd/xgbe/xgbe-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,9 +1369,6 @@ static int xgbe_close(struct net_device *netdev)
/* Free the ring descriptors and buffers */
desc_if->free_ring_resources(pdata);

/* Free the channel and ring structures */
xgbe_free_channels(pdata);

/* Release the interrupts */
devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
if (pdata->per_channel_irq) {
Expand All @@ -1380,6 +1377,9 @@ static int xgbe_close(struct net_device *netdev)
devm_free_irq(pdata->dev, channel->dma_irq, channel);
}

/* Free the channel and ring structures */
xgbe_free_channels(pdata);

/* Disable the clocks */
clk_disable_unprepare(pdata->ptpclk);
clk_disable_unprepare(pdata->sysclk);
Expand Down Expand Up @@ -1908,7 +1908,7 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
skb = xgbe_create_skb(pdata, rdata, &put_len);
if (!skb) {
error = 1;
goto read_again;
goto skip_data;
}
}

Expand All @@ -1926,10 +1926,10 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
}
}

skip_data:
if (incomplete || context_next)
goto read_again;

/* Stray Context Descriptor? */
if (!skb)
goto next_packet;

Expand Down

0 comments on commit a1f5313

Please sign in to comment.