diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
commit | 8d1413b28033c49c7f1a4d320e815d7a5531acee (patch) | |
tree | b37281abef014cd60803b81c100388d7a475d49e /drivers/net/skge.c | |
parent | ed25ffa16434724f5ed825aa48734c7f3aefa203 (diff) | |
parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) |
Merge branch 'master' into upstream
Conflicts:
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 5513907e8393..b60f0451f6cd 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -1327,10 +1327,11 @@ static void xm_check_link(struct net_device *dev) | |||
1327 | * Since internal PHY is wired to a level triggered pin, can't | 1327 | * Since internal PHY is wired to a level triggered pin, can't |
1328 | * get an interrupt when carrier is detected. | 1328 | * get an interrupt when carrier is detected. |
1329 | */ | 1329 | */ |
1330 | static void xm_link_timer(void *arg) | 1330 | static void xm_link_timer(struct work_struct *work) |
1331 | { | 1331 | { |
1332 | struct net_device *dev = arg; | 1332 | struct skge_port *skge = |
1333 | struct skge_port *skge = netdev_priv(arg); | 1333 | container_of(work, struct skge_port, link_thread.work); |
1334 | struct net_device *dev = skge->netdev; | ||
1334 | struct skge_hw *hw = skge->hw; | 1335 | struct skge_hw *hw = skge->hw; |
1335 | int port = skge->port; | 1336 | int port = skge->port; |
1336 | 1337 | ||
@@ -3072,9 +3073,9 @@ static void skge_error_irq(struct skge_hw *hw) | |||
3072 | * because accessing phy registers requires spin wait which might | 3073 | * because accessing phy registers requires spin wait which might |
3073 | * cause excess interrupt latency. | 3074 | * cause excess interrupt latency. |
3074 | */ | 3075 | */ |
3075 | static void skge_extirq(void *arg) | 3076 | static void skge_extirq(struct work_struct *work) |
3076 | { | 3077 | { |
3077 | struct skge_hw *hw = arg; | 3078 | struct skge_hw *hw = container_of(work, struct skge_hw, phy_work); |
3078 | int port; | 3079 | int port; |
3079 | 3080 | ||
3080 | mutex_lock(&hw->phy_mutex); | 3081 | mutex_lock(&hw->phy_mutex); |
@@ -3456,7 +3457,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, | |||
3456 | skge->port = port; | 3457 | skge->port = port; |
3457 | 3458 | ||
3458 | /* Only used for Genesis XMAC */ | 3459 | /* Only used for Genesis XMAC */ |
3459 | INIT_WORK(&skge->link_thread, xm_link_timer, dev); | 3460 | INIT_DELAYED_WORK(&skge->link_thread, xm_link_timer); |
3460 | 3461 | ||
3461 | if (hw->chip_id != CHIP_ID_GENESIS) { | 3462 | if (hw->chip_id != CHIP_ID_GENESIS) { |
3462 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; | 3463 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; |
@@ -3543,7 +3544,7 @@ static int __devinit skge_probe(struct pci_dev *pdev, | |||
3543 | 3544 | ||
3544 | hw->pdev = pdev; | 3545 | hw->pdev = pdev; |
3545 | mutex_init(&hw->phy_mutex); | 3546 | mutex_init(&hw->phy_mutex); |
3546 | INIT_WORK(&hw->phy_work, skge_extirq, hw); | 3547 | INIT_WORK(&hw->phy_work, skge_extirq); |
3547 | spin_lock_init(&hw->hw_lock); | 3548 | spin_lock_init(&hw->hw_lock); |
3548 | 3549 | ||
3549 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); | 3550 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); |