From 059e3779b59527150e1d1942026ec149192cbf77 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Mon, 16 Jun 2008 17:17:31 -0700 Subject: atm: [he] only support suni driver on multimode interfaces Signed-off-by: Chas Williams Signed-off-by: David S. Miller --- drivers/atm/he.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/atm/he.c') diff --git a/drivers/atm/he.c b/drivers/atm/he.c index ffc4a5a41946..320320e3dfb3 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 */ -- cgit v1.2.3 From 28e84ab3abafb0f9c9573993626abe6ca3fa8eb1 Mon Sep 17 00:00:00 2001 From: "Robert T. Johnson" Date: Mon, 16 Jun 2008 17:20:52 -0700 Subject: atm: [he] limit queries to the device's register space From: "Robert T. Johnson" Signed-off-by: Chas Williams --- drivers/atm/he.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/atm/he.c') diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 320320e3dfb3..fc636a3429cf 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -2845,10 +2845,15 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg) if (copy_from_user(®, 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: -- cgit v1.2.3 From 65c3e4715b1b934f8dcc002d9f46b4371ca7a9b1 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Mon, 16 Jun 2008 17:21:27 -0700 Subject: atm: [he] send idle cells instead of unassigned when in SDH mode Signed-off-by: Chas Williams Signed-off-by: David S. Miller --- drivers/atm/he.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/atm/he.c') diff --git a/drivers/atm/he.c b/drivers/atm/he.c index fc636a3429cf..ea495b21f916 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -1555,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 */ -- cgit v1.2.3