diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
commit | 116674acc97ba75a720329996877077d988443a2 (patch) | |
tree | 6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /drivers/atm | |
parent | 71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff) |
Merge with Linux 2.4.2.
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/Config.in | 4 | ||||
-rw-r--r-- | drivers/atm/firestream.c | 2 | ||||
-rw-r--r-- | drivers/atm/fore200e.c | 4 | ||||
-rw-r--r-- | drivers/atm/iphase.c | 23 | ||||
-rw-r--r-- | drivers/atm/iphase.h | 2 | ||||
-rw-r--r-- | drivers/atm/nicstar.c | 4 | ||||
-rw-r--r-- | drivers/atm/nicstar.h | 2 |
7 files changed, 26 insertions, 15 deletions
diff --git a/drivers/atm/Config.in b/drivers/atm/Config.in index 2f82a75e8..75bcf95b1 100644 --- a/drivers/atm/Config.in +++ b/drivers/atm/Config.in @@ -56,7 +56,7 @@ if [ "$CONFIG_PCI" = "y" -o "$CONFIG_SBUS" = "y" ]; then tristate 'FORE Systems 200E-series' CONFIG_ATM_FORE200E_MAYBE if [ "$CONFIG_ATM_FORE200E_MAYBE" != "n" ]; then if [ "$CONFIG_PCI" = "y" ]; then - bool ' PCA-200E support' CONFIG_ATM_FORE200E_PCA y + bool ' PCA-200E support' CONFIG_ATM_FORE200E_PCA if [ "$CONFIG_ATM_FORE200E_PCA" = "y" ]; then bool ' Use default PCA-200E firmware (normally enabled)' CONFIG_ATM_FORE200E_PCA_DEFAULT_FW if [ "$CONFIG_ATM_FORE200E_PCA_DEFAULT_FW" = "n" ]; then @@ -65,7 +65,7 @@ if [ "$CONFIG_PCI" = "y" -o "$CONFIG_SBUS" = "y" ]; then fi fi if [ "$CONFIG_SBUS" = "y" ]; then - bool ' SBA-200E support' CONFIG_ATM_FORE200E_SBA y + bool ' SBA-200E support' CONFIG_ATM_FORE200E_SBA if [ "$CONFIG_ATM_FORE200E_SBA" = "y" ]; then bool ' Use default SBA-200E firmware (normally enabled)' CONFIG_ATM_FORE200E_SBA_DEFAULT_FW if [ "$CONFIG_ATM_FORE200E_SBA_DEFAULT_FW" = "n" ]; then diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 7671afd9d..1e2a6b9ea 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -1441,7 +1441,7 @@ static inline int nr_buffers_in_freepool (struct fs_dev *dev, struct freepool *f /* Check if this gets going again if a pool ever runs out. -- Yes, it - does. I've seen "recieve abort: no buffers" and things started + does. I've seen "receive abort: no buffers" and things started working again after that... -- REW */ static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags) diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 4d51e762b..cf24ef71e 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -28,7 +28,7 @@ #include <linux/version.h> #include <linux/config.h> #include <linux/kernel.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/init.h> #include <linux/capability.h> #include <linux/sched.h> @@ -2020,6 +2020,8 @@ fore200e_get_esi(struct fore200e* fore200e) struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); int ok, i; + if (!prom) + return -ENOMEM; ok = fore200e->bus->prom_read(fore200e, prom); if (ok < 0) return -EBUSY; diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index e2300a845..a5345ad85 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -6,7 +6,7 @@ ******************************************************************************* This software may be used and distributed according to the terms - of the GNU Public License (GPL), incorporated herein by reference. + of the GNU General Public License (GPL), incorporated herein by reference. Drivers based on this skeleton fall under the GPL and must retain the authorship (implicit copyright) notice. @@ -78,8 +78,8 @@ struct suni_priv { static unsigned char ia_phy_get(struct atm_dev *dev, unsigned long addr); -static IADEV *ia_dev[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; -static struct atm_dev *_ia_dev[8] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; +static IADEV *ia_dev[8]; +static struct atm_dev *_ia_dev[8]; static int iadev_count = 0; static void ia_led_timer(unsigned long arg); static struct timer_list ia_timer = { function: ia_led_timer }; @@ -951,7 +951,7 @@ void ia_suni_pm7345_init (IADEV *iadev) SUNI_PM7345_PLB); #ifdef __SNMP__ suni_pm7345->suni_rxcp_intr_en_sts |= SUNI_OOCDE; -#endif __SNMP__ +#endif /* __SNMP__ */ return; } @@ -2130,6 +2130,8 @@ static int tx_init(struct atm_dev *dev) memset((caddr_t)evc, 0, sizeof(struct ext_vc)); iadev->testTable[i] = (struct testTable_t *) kmalloc(sizeof(struct testTable_t), GFP_KERNEL); + if (!iadev->testTable[i]) + return -ENOMEM; iadev->testTable[i]->lastTime = 0; iadev->testTable[i]->fract = 0; iadev->testTable[i]->vc_status = VC_UBR; @@ -2376,7 +2378,10 @@ __initfunc(static int ia_init(struct atm_dev *dev)) /* lets try reading the MAC address */ error = get_esi(dev); - if (error) return error; + if (error) { + iounmap((void *) iadev->base); + return error; + } printk("IA: "); for (i=0; i < ESI_LEN; i++) printk("%s%02X",i ? "-" : "",dev->esi[i]); @@ -2384,6 +2389,7 @@ __initfunc(static int ia_init(struct atm_dev *dev)) /* reset SAR */ if (reset_sar(dev)) { + iounmap((void *) iadev->base); printk("IA: reset SAR fail, please try again\n"); return 1; } @@ -2869,8 +2875,11 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { iavcc = INPH_IA_VCC(vcc); if (!iavcc->txing) { printk("discard packet on closed VC\n"); - if (vcc->pop) vcc->pop(vcc, skb); - else dev_kfree_skb_any(skb); + if (vcc->pop) + vcc->pop(vcc, skb); + else + dev_kfree_skb_any(skb); + return 0; } if (skb->len > iadev->tx_buf_sz - 8) { diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index 2c0bd221f..d3fbd40c7 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h @@ -7,7 +7,7 @@ ******************************************************************************* This software may be used and distributed according to the terms - of the GNU Public License (GPL), incorporated herein by reference. + of the GNU General Public License (GPL), incorporated herein by reference. Drivers based on this skeleton fall under the GPL and must retain the authorship (implicit copyright) notice. diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 7e9dc5ee2..28d14ee08 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -121,7 +121,7 @@ #define ALIGN_ADDRESS(addr, alignment) \ bus_to_virt(ALIGN_BUS_ADDR(virt_to_bus(addr), alignment)) -#undef CEIL(d) +#undef CEIL #ifndef ATM_SKB #define ATM_SKB(s) (&(s)->atm) @@ -1360,7 +1360,7 @@ static void ns_irq_handler(int irq, void *dev_id, struct pt_regs *regs) printk("nicstar%d: Raw cell received and no support yet...\n", card->index); #endif /* RCQ_SUPPORT */ - /* NOTE: the following procedure may keep a raw cell pending untill the + /* NOTE: the following procedure may keep a raw cell pending until the next interrupt. As this preliminary support is only meant to avoid buffer leakage, this is not an issue. */ while (readl(card->membase + RAWCT) != card->rawch) diff --git a/drivers/atm/nicstar.h b/drivers/atm/nicstar.h index 7dfa9ec6f..169f47d53 100644 --- a/drivers/atm/nicstar.h +++ b/drivers/atm/nicstar.h @@ -613,7 +613,7 @@ enum ns_regs #define NS_CFG_SMBUFSIZE NS_CFG_SMBUFSIZE_48 #elif (NS_SMBUFSIZE == 96) #define NS_CFG_SMBUFSIZE NS_CFG_SMBUFSIZE_96 -#eliif (NS_SMBUFSIZE == 240) +#elif (NS_SMBUFSIZE == 240) #define NS_CFG_SMBUFSIZE NS_CFG_SMBUFSIZE_240 #elif (NS_SMBUFSIZE == 2048) #define NS_CFG_SMBUFSIZE NS_CFG_SMBUFSIZE_2048 |