diff options
author | Amit S. Kale <amitkale@netxen.com> | 2006-12-18 05:53:36 -0800 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-26 16:46:05 -0500 |
commit | 6c5866441669ab71f6297556ea281a6bcbfd13db (patch) | |
tree | 6deccde9df7c483d8c2a0172b3a45b76d836c249 /drivers/net/netxen/netxen_nic_main.c | |
parent | d2378e89720f364ccf3a57b26f1827923d3464f2 (diff) | |
download | kernel_samsung_smdk4412-6c5866441669ab71f6297556ea281a6bcbfd13db.zip kernel_samsung_smdk4412-6c5866441669ab71f6297556ea281a6bcbfd13db.tar.gz kernel_samsung_smdk4412-6c5866441669ab71f6297556ea281a6bcbfd13db.tar.bz2 |
NetXen: work queue fixes.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>
netxen_nic.h | 3 +--
netxen_nic_init.c | 2 +-
netxen_nic_main.c | 15 +++++++--------
3 files changed, 9 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 926ead7..bc08d21 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -424,8 +424,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->dev_addr); } } - adapter->netdev = netdev; - INIT_WORK(&adapter->tx_timeout_task, netxen_tx_timeout_task); + INIT_WORK(&port->tx_timeout_task, netxen_tx_timeout_task); netif_carrier_off(netdev); netif_stop_queue(netdev); @@ -966,23 +965,23 @@ static void netxen_tx_timeout(struct net_device *netdev) { struct netxen_port *port = (struct netxen_port *)netdev_priv(netdev); - SCHEDULE_WORK(&port->adapter->tx_timeout_task); + SCHEDULE_WORK(&port->tx_timeout_task); } static void netxen_tx_timeout_task(struct work_struct *work) { - struct netxen_adapter *adapter = - container_of(work, struct netxen_adapter, tx_timeout_task); - struct net_device *netdev = adapter->netdev; + struct netxen_port *port = + container_of(work, struct netxen_port, tx_timeout_task); + struct net_device *netdev = port->netdev; unsigned long flags; printk(KERN_ERR "%s %s: transmit timeout, resetting.\n", netxen_nic_driver_name, netdev->name); - spin_lock_irqsave(&adapter->lock, flags); + spin_lock_irqsave(&port->adapter->lock, flags); netxen_nic_close(netdev); netxen_nic_open(netdev); - spin_unlock_irqrestore(&adapter->lock, flags); + spin_unlock_irqrestore(&port->adapter->lock, flags); netdev->trans_start = jiffies; netif_wake_queue(netdev); } |