Skip to content

Commit

Permalink
netxen: drop redudant spinlock
Browse files Browse the repository at this point in the history
Some leftover code that makes use of adapter->lock in tx_timeout function,
which resets the interface under this lock. In close() when the workqueue
is flushed, prints the warning about sleeping with interrupts disabled
(when spinlock debug is enabled). The lock was required with private netxen
IOCTLs, which were removed a while ago.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Dhananjay Phadke authored and Jeff Garzik committed Jul 30, 2007
1 parent e01872a commit 2c6a3f7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adapter->ahw.pdev = pdev;
adapter->ahw.pci_func = pci_func_id;
spin_lock_init(&adapter->tx_lock);
spin_lock_init(&adapter->lock);

/* remap phys address */
mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
Expand Down Expand Up @@ -1228,15 +1227,12 @@ static void netxen_tx_timeout_task(struct work_struct *work)
{
struct netxen_adapter *adapter =
container_of(work, struct netxen_adapter, tx_timeout_task);
unsigned long flags;

printk(KERN_ERR "%s %s: transmit timeout, resetting.\n",
netxen_nic_driver_name, adapter->netdev->name);

spin_lock_irqsave(&adapter->lock, flags);
netxen_nic_close(adapter->netdev);
netxen_nic_open(adapter->netdev);
spin_unlock_irqrestore(&adapter->lock, flags);
adapter->netdev->trans_start = jiffies;
netif_wake_queue(adapter->netdev);
}
Expand Down

0 comments on commit 2c6a3f7

Please sign in to comment.