summaryrefslogtreecommitdiff
path: root/drivers/atm/he.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-23 11:30:23 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-23 11:30:23 +0200
commit1de8644cc7c826e0c41e52825bd5a12e2e31e6ca (patch)
treedf1e884080599facaf70d2675c480e999da953e1 /drivers/atm/he.c
parent6c3df25511c2c51f2dd36cc52a8d22363d731793 (diff)
parent481c5346d0981940ee63037eb53e4e37b0735c10 (diff)
Merge branch 'linus' into sched/develtip-sched-devel-2008-06-23_09.30_Mon
Diffstat (limited to 'drivers/atm/he.c')
-rw-r--r--drivers/atm/he.c11
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)
/* initialize framer */
#ifdef CONFIG_ATM_HE_USE_SUNI
- suni_init(he_dev->atm_dev);
+ if (he_isMM(he_dev))
+ suni_init(he_dev->atm_dev);
if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start)
he_dev->atm_dev->phy->start(he_dev->atm_dev);
#endif /* CONFIG_ATM_HE_USE_SUNI */
@@ -1554,6 +1555,7 @@ he_start(struct atm_dev *dev)
val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM);
val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT);
he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM);
+ he_phy_put(he_dev->atm_dev, SUNI_TACP_IUCHP_CLP, SUNI_TACP_IUCHP);
}
/* 5.1.12 enable transmit and receive */
@@ -2844,10 +2846,15 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg)
if (copy_from_user(&reg, arg,
sizeof(struct he_ioctl_reg)))
return -EFAULT;
-
+
spin_lock_irqsave(&he_dev->global_lock, flags);
switch (reg.type) {
case HE_REGTYPE_PCI:
+ if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) {
+ err = -EINVAL;
+ break;
+ }
+
reg.val = he_readl(he_dev, reg.addr);
break;
case HE_REGTYPE_RCM: