summaryrefslogtreecommitdiff
path: root/drivers/atm/he.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 12:30:26 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-25 12:30:26 +0200
commit037a6079eb925f7653bddf1501f777abcd4fc91e (patch)
tree2249c4c4852837163e67190bf8bfe06516a65510 /drivers/atm/he.c
parent0754557d72c1fbfc5fcfd5235e7c23ae6f77248c (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into x86/garttip-x86-gart-2008-06-25_10.30_Wed
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: