Commit 6c23e413 authored by Jan Weitzel's avatar Jan Weitzel Committed by David S. Miller

net/ethernet: ks8851_mll fix irq handling

There a two different irq variables ks->irq and netdev->irq.
Only ks->irq is set on probe, so disabling irq in ks_start_xmit fails.

This patches remove ks->irq from private data and use only netdev->irq.

Tested on a kernel 3.0 based OMAP4430 SMP Board
Signed-off-by: default avatarJan Weitzel <j.weitzel@phytec.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 23711438
...@@ -394,7 +394,6 @@ union ks_tx_hdr { ...@@ -394,7 +394,6 @@ union ks_tx_hdr {
* @msg_enable : The message flags controlling driver output (see ethtool). * @msg_enable : The message flags controlling driver output (see ethtool).
* @frame_cnt : number of frames received. * @frame_cnt : number of frames received.
* @bus_width : i/o bus width. * @bus_width : i/o bus width.
* @irq : irq number assigned to this device.
* @rc_rxqcr : Cached copy of KS_RXQCR. * @rc_rxqcr : Cached copy of KS_RXQCR.
* @rc_txcr : Cached copy of KS_TXCR. * @rc_txcr : Cached copy of KS_TXCR.
* @rc_ier : Cached copy of KS_IER. * @rc_ier : Cached copy of KS_IER.
...@@ -441,7 +440,6 @@ struct ks_net { ...@@ -441,7 +440,6 @@ struct ks_net {
u32 msg_enable; u32 msg_enable;
u32 frame_cnt; u32 frame_cnt;
int bus_width; int bus_width;
int irq;
u16 rc_rxqcr; u16 rc_rxqcr;
u16 rc_txcr; u16 rc_txcr;
...@@ -907,10 +905,10 @@ static int ks_net_open(struct net_device *netdev) ...@@ -907,10 +905,10 @@ static int ks_net_open(struct net_device *netdev)
netif_dbg(ks, ifup, ks->netdev, "%s - entry\n", __func__); netif_dbg(ks, ifup, ks->netdev, "%s - entry\n", __func__);
/* reset the HW */ /* reset the HW */
err = request_irq(ks->irq, ks_irq, KS_INT_FLAGS, DRV_NAME, netdev); err = request_irq(netdev->irq, ks_irq, KS_INT_FLAGS, DRV_NAME, netdev);
if (err) { if (err) {
pr_err("Failed to request IRQ: %d: %d\n", ks->irq, err); pr_err("Failed to request IRQ: %d: %d\n", netdev->irq, err);
return err; return err;
} }
...@@ -955,7 +953,7 @@ static int ks_net_stop(struct net_device *netdev) ...@@ -955,7 +953,7 @@ static int ks_net_stop(struct net_device *netdev)
/* set powermode to soft power down to save power */ /* set powermode to soft power down to save power */
ks_set_powermode(ks, PMECR_PM_SOFTDOWN); ks_set_powermode(ks, PMECR_PM_SOFTDOWN);
free_irq(ks->irq, netdev); free_irq(netdev->irq, netdev);
mutex_unlock(&ks->lock); mutex_unlock(&ks->lock);
return 0; return 0;
} }
...@@ -1545,10 +1543,10 @@ static int __devinit ks8851_probe(struct platform_device *pdev) ...@@ -1545,10 +1543,10 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
if (!ks->hw_addr_cmd) if (!ks->hw_addr_cmd)
goto err_ioremap1; goto err_ioremap1;
ks->irq = platform_get_irq(pdev, 0); netdev->irq = platform_get_irq(pdev, 0);
if (ks->irq < 0) { if (netdev->irq < 0) {
err = ks->irq; err = netdev->irq;
goto err_get_irq; goto err_get_irq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment