Commit d6c1d704 authored by Jorge Boncompte [DTI2]'s avatar Jorge Boncompte [DTI2] Committed by David S. Miller

atm: [iphase] doesn't call phy->start due to a bogus #ifndef

This causes the suni driver to oops if you try to use sonetdiag to get
the statistics. Also add the corresponding phy->stop call to fix another
oops if you try to remove the module.
Signed-off-by: default avatarJorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c0ed0b60
...@@ -2562,17 +2562,11 @@ static int __devinit ia_start(struct atm_dev *dev) ...@@ -2562,17 +2562,11 @@ static int __devinit ia_start(struct atm_dev *dev)
error = suni_init(dev); error = suni_init(dev);
if (error) if (error)
goto err_free_rx; goto err_free_rx;
/* if (dev->phy->start) {
* Enable interrupt on loss of signal error = dev->phy->start(dev);
* SUNI_RSOP_CIE - 0x10 if (error)
* SUNI_RSOP_CIE_LOSE - 0x04 goto err_free_rx;
*/ }
ia_phy_put(dev, ia_phy_get(dev, 0x10) | 0x04, 0x10);
#ifndef MODULE
error = dev->phy->start(dev);
if (error)
goto err_free_rx;
#endif
/* Get iadev->carrier_detect status */ /* Get iadev->carrier_detect status */
IaFrontEndIntr(iadev); IaFrontEndIntr(iadev);
} }
...@@ -3238,9 +3232,14 @@ static void __devexit ia_remove_one(struct pci_dev *pdev) ...@@ -3238,9 +3232,14 @@ static void __devexit ia_remove_one(struct pci_dev *pdev)
struct atm_dev *dev = pci_get_drvdata(pdev); struct atm_dev *dev = pci_get_drvdata(pdev);
IADEV *iadev = INPH_IA_DEV(dev); IADEV *iadev = INPH_IA_DEV(dev);
ia_phy_put(dev, ia_phy_get(dev,0x10) & ~(0x4), 0x10); /* Disable phy interrupts */
ia_phy_put(dev, ia_phy_get(dev, SUNI_RSOP_CIE) & ~(SUNI_RSOP_CIE_LOSE),
SUNI_RSOP_CIE);
udelay(1); udelay(1);
if (dev->phy && dev->phy->stop)
dev->phy->stop(dev);
/* De-register device */ /* De-register device */
free_irq(iadev->irq, dev); free_irq(iadev->irq, dev);
iadev_count--; iadev_count--;
......
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