aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/Kconfig2
-rw-r--r--drivers/atm/Makefile2
-rw-r--r--drivers/atm/firestream.c4
-rw-r--r--drivers/atm/horizon.c6
-rw-r--r--drivers/atm/idt77252.c6
-rw-r--r--drivers/atm/iphase.c8
-rw-r--r--drivers/atm/iphase.h2
-rw-r--r--drivers/atm/solos-pci.c8
8 files changed, 15 insertions, 23 deletions
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index be7461c9a87e..31c60101a69a 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -301,7 +301,7 @@ config ATM_IA
301 control memory (128K-1KVC, 512K-4KVC), the size of the packet 301 control memory (128K-1KVC, 512K-4KVC), the size of the packet
302 memory (128K, 512K, 1M), and the PHY type (Single/Multi mode OC3, 302 memory (128K, 512K, 1M), and the PHY type (Single/Multi mode OC3,
303 UTP155, UTP25, DS3 and E3). Go to: 303 UTP155, UTP25, DS3 and E3). Go to:
304 <http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM> 304 <http://www.iphase.com/>
305 for more info about the cards. Say Y (or M to compile as a module 305 for more info about the cards. Say Y (or M to compile as a module
306 named iphase) here if you have one of these cards. 306 named iphase) here if you have one of these cards.
307 307
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile
index 62c3cc1075ae..c6c9ee9f5da2 100644
--- a/drivers/atm/Makefile
+++ b/drivers/atm/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the Linux network (ATM) device drivers. 2# Makefile for the Linux network (ATM) device drivers.
3# 3#
4 4
5fore_200e-objs := fore200e.o 5fore_200e-y := fore200e.o
6 6
7obj-$(CONFIG_ATM_ZATM) += zatm.o uPD98402.o 7obj-$(CONFIG_ATM_ZATM) += zatm.o uPD98402.o
8obj-$(CONFIG_ATM_NICSTAR) += nicstar.o 8obj-$(CONFIG_ATM_NICSTAR) += nicstar.o
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 8717809787fb..5d86bb803e94 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -444,8 +444,8 @@ static inline void fs_kfree_skb (struct sk_buff * skb)
444#define ROUND_NEAREST 3 444#define ROUND_NEAREST 3
445/********** make rate (not quite as much fun as Horizon) **********/ 445/********** make rate (not quite as much fun as Horizon) **********/
446 446
447static unsigned int make_rate (unsigned int rate, int r, 447static int make_rate(unsigned int rate, int r,
448 u16 * bits, unsigned int * actual) 448 u16 *bits, unsigned int *actual)
449{ 449{
450 unsigned char exp = -1; /* hush gcc */ 450 unsigned char exp = -1; /* hush gcc */
451 unsigned int man = -1; /* hush gcc */ 451 unsigned int man = -1; /* hush gcc */
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 54720baa7363..a95790452a68 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -1645,10 +1645,8 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
1645 unsigned short d = 0; 1645 unsigned short d = 0;
1646 char * s = skb->data; 1646 char * s = skb->data;
1647 if (*s++ == 'D') { 1647 if (*s++ == 'D') {
1648 for (i = 0; i < 4; ++i) { 1648 for (i = 0; i < 4; ++i)
1649 d = (d<<4) | ((*s <= '9') ? (*s - '0') : (*s - 'a' + 10)); 1649 d = (d << 4) | hex_to_bin(*s++);
1650 ++s;
1651 }
1652 PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d); 1650 PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d);
1653 } 1651 }
1654 } 1652 }
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 1679cbf0c584..bce57328ddde 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3152,7 +3152,7 @@ deinit_card(struct idt77252_dev *card)
3152} 3152}
3153 3153
3154 3154
3155static int __devinit 3155static void __devinit
3156init_sram(struct idt77252_dev *card) 3156init_sram(struct idt77252_dev *card)
3157{ 3157{
3158 int i; 3158 int i;
@@ -3298,7 +3298,6 @@ init_sram(struct idt77252_dev *card)
3298 SAR_REG_RXFD); 3298 SAR_REG_RXFD);
3299 3299
3300 IPRINTK("%s: SRAM initialization complete.\n", card->name); 3300 IPRINTK("%s: SRAM initialization complete.\n", card->name);
3301 return 0;
3302} 3301}
3303 3302
3304static int __devinit 3303static int __devinit
@@ -3410,8 +3409,7 @@ init_card(struct atm_dev *dev)
3410 3409
3411 writel(readl(SAR_REG_CFG) | conf, SAR_REG_CFG); 3410 writel(readl(SAR_REG_CFG) | conf, SAR_REG_CFG);
3412 3411
3413 if (init_sram(card) < 0) 3412 init_sram(card);
3414 return -1;
3415 3413
3416/********************************************************************/ 3414/********************************************************************/
3417/* A L L O C R A M A N D S E T V A R I O U S T H I N G S */ 3415/* A L L O C R A M A N D S E T V A R I O U S T H I N G S */
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index ee9ddeb53417..9309d4724e13 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -220,7 +220,7 @@ static u16 get_desc (IADEV *dev, struct ia_vcc *iavcc) {
220 while (!desc_num || (dev->desc_tbl[desc_num -1]).timestamp) { 220 while (!desc_num || (dev->desc_tbl[desc_num -1]).timestamp) {
221 dev->ffL.tcq_rd += 2; 221 dev->ffL.tcq_rd += 2;
222 if (dev->ffL.tcq_rd > dev->ffL.tcq_ed) 222 if (dev->ffL.tcq_rd > dev->ffL.tcq_ed)
223 dev->ffL.tcq_rd = dev->ffL.tcq_st; 223 dev->ffL.tcq_rd = dev->ffL.tcq_st;
224 if (dev->ffL.tcq_rd == dev->host_tcq_wr) 224 if (dev->ffL.tcq_rd == dev->host_tcq_wr)
225 return 0xFFFF; 225 return 0xFFFF;
226 desc_num = *(u_short *)(dev->seg_ram + dev->ffL.tcq_rd); 226 desc_num = *(u_short *)(dev->seg_ram + dev->ffL.tcq_rd);
@@ -3156,7 +3156,6 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3156{ 3156{
3157 struct atm_dev *dev; 3157 struct atm_dev *dev;
3158 IADEV *iadev; 3158 IADEV *iadev;
3159 unsigned long flags;
3160 int ret; 3159 int ret;
3161 3160
3162 iadev = kzalloc(sizeof(*iadev), GFP_KERNEL); 3161 iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
@@ -3188,19 +3187,14 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3188 ia_dev[iadev_count] = iadev; 3187 ia_dev[iadev_count] = iadev;
3189 _ia_dev[iadev_count] = dev; 3188 _ia_dev[iadev_count] = dev;
3190 iadev_count++; 3189 iadev_count++;
3191 spin_lock_init(&iadev->misc_lock);
3192 /* First fixes first. I don't want to think about this now. */
3193 spin_lock_irqsave(&iadev->misc_lock, flags);
3194 if (ia_init(dev) || ia_start(dev)) { 3190 if (ia_init(dev) || ia_start(dev)) {
3195 IF_INIT(printk("IA register failed!\n");) 3191 IF_INIT(printk("IA register failed!\n");)
3196 iadev_count--; 3192 iadev_count--;
3197 ia_dev[iadev_count] = NULL; 3193 ia_dev[iadev_count] = NULL;
3198 _ia_dev[iadev_count] = NULL; 3194 _ia_dev[iadev_count] = NULL;
3199 spin_unlock_irqrestore(&iadev->misc_lock, flags);
3200 ret = -EINVAL; 3195 ret = -EINVAL;
3201 goto err_out_deregister_dev; 3196 goto err_out_deregister_dev;
3202 } 3197 }
3203 spin_unlock_irqrestore(&iadev->misc_lock, flags);
3204 IF_EVENT(printk("iadev_count = %d\n", iadev_count);) 3198 IF_EVENT(printk("iadev_count = %d\n", iadev_count);)
3205 3199
3206 iadev->next_board = ia_boards; 3200 iadev->next_board = ia_boards;
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h
index b2cd20f549cb..077735e0e04b 100644
--- a/drivers/atm/iphase.h
+++ b/drivers/atm/iphase.h
@@ -1022,7 +1022,7 @@ typedef struct iadev_t {
1022 struct dle_q rx_dle_q; 1022 struct dle_q rx_dle_q;
1023 struct free_desc_q *rx_free_desc_qhead; 1023 struct free_desc_q *rx_free_desc_qhead;
1024 struct sk_buff_head rx_dma_q; 1024 struct sk_buff_head rx_dma_q;
1025 spinlock_t rx_lock, misc_lock; 1025 spinlock_t rx_lock;
1026 struct atm_vcc **rx_open; /* list of all open VCs */ 1026 struct atm_vcc **rx_open; /* list of all open VCs */
1027 u16 num_rx_desc, rx_buf_sz, rxing; 1027 u16 num_rx_desc, rx_buf_sz, rxing;
1028 u32 rx_pkt_ram, rx_tmp_cnt; 1028 u32 rx_pkt_ram, rx_tmp_cnt;
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index f916ddf63938..f46138ab38b6 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -444,6 +444,7 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
444 struct atm_dev *atmdev = container_of(dev, struct atm_dev, class_dev); 444 struct atm_dev *atmdev = container_of(dev, struct atm_dev, class_dev);
445 struct solos_card *card = atmdev->dev_data; 445 struct solos_card *card = atmdev->dev_data;
446 struct sk_buff *skb; 446 struct sk_buff *skb;
447 unsigned int len;
447 448
448 spin_lock(&card->cli_queue_lock); 449 spin_lock(&card->cli_queue_lock);
449 skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]); 450 skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]);
@@ -451,11 +452,12 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
451 if(skb == NULL) 452 if(skb == NULL)
452 return sprintf(buf, "No data.\n"); 453 return sprintf(buf, "No data.\n");
453 454
454 memcpy(buf, skb->data, skb->len); 455 len = skb->len;
455 dev_dbg(&card->dev->dev, "len: %d\n", skb->len); 456 memcpy(buf, skb->data, len);
457 dev_dbg(&card->dev->dev, "len: %d\n", len);
456 458
457 kfree_skb(skb); 459 kfree_skb(skb);
458 return skb->len; 460 return len;
459} 461}
460 462
461static int send_command(struct solos_card *card, int dev, const char *buf, size_t size) 463static int send_command(struct solos_card *card, int dev, const char *buf, size_t size)