diff options
Diffstat (limited to 'drivers/atm/he.c')
-rw-r--r-- | drivers/atm/he.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index ffc4a5a41946..ea495b21f916 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -1542,7 +1542,8 @@ he_start(struct atm_dev *dev) | |||
1542 | /* initialize framer */ | 1542 | /* initialize framer */ |
1543 | 1543 | ||
1544 | #ifdef CONFIG_ATM_HE_USE_SUNI | 1544 | #ifdef CONFIG_ATM_HE_USE_SUNI |
1545 | suni_init(he_dev->atm_dev); | 1545 | if (he_isMM(he_dev)) |
1546 | suni_init(he_dev->atm_dev); | ||
1546 | if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start) | 1547 | if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start) |
1547 | he_dev->atm_dev->phy->start(he_dev->atm_dev); | 1548 | he_dev->atm_dev->phy->start(he_dev->atm_dev); |
1548 | #endif /* CONFIG_ATM_HE_USE_SUNI */ | 1549 | #endif /* CONFIG_ATM_HE_USE_SUNI */ |
@@ -1554,6 +1555,7 @@ he_start(struct atm_dev *dev) | |||
1554 | val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM); | 1555 | val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM); |
1555 | val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT); | 1556 | val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT); |
1556 | he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM); | 1557 | he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM); |
1558 | he_phy_put(he_dev->atm_dev, SUNI_TACP_IUCHP_CLP, SUNI_TACP_IUCHP); | ||
1557 | } | 1559 | } |
1558 | 1560 | ||
1559 | /* 5.1.12 enable transmit and receive */ | 1561 | /* 5.1.12 enable transmit and receive */ |
@@ -2844,10 +2846,15 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg) | |||
2844 | if (copy_from_user(®, arg, | 2846 | if (copy_from_user(®, arg, |
2845 | sizeof(struct he_ioctl_reg))) | 2847 | sizeof(struct he_ioctl_reg))) |
2846 | return -EFAULT; | 2848 | return -EFAULT; |
2847 | 2849 | ||
2848 | spin_lock_irqsave(&he_dev->global_lock, flags); | 2850 | spin_lock_irqsave(&he_dev->global_lock, flags); |
2849 | switch (reg.type) { | 2851 | switch (reg.type) { |
2850 | case HE_REGTYPE_PCI: | 2852 | case HE_REGTYPE_PCI: |
2853 | if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) { | ||
2854 | err = -EINVAL; | ||
2855 | break; | ||
2856 | } | ||
2857 | |||
2851 | reg.val = he_readl(he_dev, reg.addr); | 2858 | reg.val = he_readl(he_dev, reg.addr); |
2852 | break; | 2859 | break; |
2853 | case HE_REGTYPE_RCM: | 2860 | case HE_REGTYPE_RCM: |