aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index b2949035f66a..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 */
1330static void xm_link_timer(void *arg) 1330static 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
@@ -2154,8 +2155,6 @@ static void yukon_link_down(struct skge_port *skge)
2154 int port = skge->port; 2155 int port = skge->port;
2155 u16 ctrl; 2156 u16 ctrl;
2156 2157
2157 gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0);
2158
2159 ctrl = gma_read16(hw, port, GM_GP_CTRL); 2158 ctrl = gma_read16(hw, port, GM_GP_CTRL);
2160 ctrl &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA); 2159 ctrl &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
2161 gma_write16(hw, port, GM_GP_CTRL, ctrl); 2160 gma_write16(hw, port, GM_GP_CTRL, ctrl);
@@ -2167,7 +2166,6 @@ static void yukon_link_down(struct skge_port *skge)
2167 gm_phy_write(hw, port, PHY_MARV_AUNE_ADV, ctrl); 2166 gm_phy_write(hw, port, PHY_MARV_AUNE_ADV, ctrl);
2168 } 2167 }
2169 2168
2170 yukon_reset(hw, port);
2171 skge_link_down(skge); 2169 skge_link_down(skge);
2172 2170
2173 yukon_init(hw, port); 2171 yukon_init(hw, port);
@@ -2255,6 +2253,7 @@ static void skge_phy_reset(struct skge_port *skge)
2255{ 2253{
2256 struct skge_hw *hw = skge->hw; 2254 struct skge_hw *hw = skge->hw;
2257 int port = skge->port; 2255 int port = skge->port;
2256 struct net_device *dev = hw->dev[port];
2258 2257
2259 netif_stop_queue(skge->netdev); 2258 netif_stop_queue(skge->netdev);
2260 netif_carrier_off(skge->netdev); 2259 netif_carrier_off(skge->netdev);
@@ -2268,6 +2267,8 @@ static void skge_phy_reset(struct skge_port *skge)
2268 yukon_init(hw, port); 2267 yukon_init(hw, port);
2269 } 2268 }
2270 mutex_unlock(&hw->phy_mutex); 2269 mutex_unlock(&hw->phy_mutex);
2270
2271 dev->set_multicast_list(dev);
2271} 2272}
2272 2273
2273/* Basic MII support */ 2274/* Basic MII support */
@@ -2565,7 +2566,7 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
2565 2566
2566 td->csum_offs = 0; 2567 td->csum_offs = 0;
2567 td->csum_start = offset; 2568 td->csum_start = offset;
2568 td->csum_write = offset + skb->csum; 2569 td->csum_write = offset + skb->csum_offset;
2569 } else 2570 } else
2570 control = BMU_CHECK; 2571 control = BMU_CHECK;
2571 2572
@@ -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 */
3075static void skge_extirq(void *arg) 3076static 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);