Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183724
b: refs/heads/master
c: c0456c2
h: refs/heads/master
v: v3
  • Loading branch information
Greg Rose authored and David S. Miller committed Jan 23, 2010
1 parent 15b1f49 commit 1084e13
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9ee25a2b87c8077042ce23d3231f67f026719b0
refs/heads/master: c0456c231a8b2981128cc29e211b7bad1bd997df
24 changes: 20 additions & 4 deletions trunk/drivers/net/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1693,8 +1693,10 @@ static void ixgbevf_clean_rx_ring(struct ixgbevf_adapter *adapter,
unsigned long size;
unsigned int i;

/* Free all the Rx ring sk_buffs */
if (!rx_ring->rx_buffer_info)
return;

/* Free all the Rx ring sk_buffs */
for (i = 0; i < rx_ring->count; i++) {
struct ixgbevf_rx_buffer *rx_buffer_info;

Expand Down Expand Up @@ -1751,6 +1753,9 @@ static void ixgbevf_clean_tx_ring(struct ixgbevf_adapter *adapter,
unsigned long size;
unsigned int i;

if (!tx_ring->tx_buffer_info)
return;

/* Free all the Tx ring sk_buffs */

for (i = 0; i < tx_ring->count; i++) {
Expand Down Expand Up @@ -1843,12 +1848,24 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter)

void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;

WARN_ON(in_interrupt());

while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state))
msleep(1);

ixgbevf_down(adapter);
ixgbevf_up(adapter);
/*
* Check if PF is up before re-init. If not then skip until
* later when the PF is up and ready to service requests from
* the VF via mailbox. If the VF is up and running then the
* watchdog task will continue to schedule reset tasks until
* the PF is up and running.
*/
if (!hw->mac.ops.reset_hw(hw)) {
ixgbevf_down(adapter);
ixgbevf_up(adapter);
}

clear_bit(__IXGBEVF_RESETTING, &adapter->state);
}
Expand Down Expand Up @@ -2423,7 +2440,6 @@ void ixgbevf_free_tx_resources(struct ixgbevf_adapter *adapter,
{
struct pci_dev *pdev = adapter->pdev;


ixgbevf_clean_tx_ring(adapter, tx_ring);

vfree(tx_ring->tx_buffer_info);
Expand Down

0 comments on commit 1084e13

Please sign in to comment.