aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/ambassador.c2
-rw-r--r--drivers/atm/firestream.c2
-rw-r--r--drivers/atm/fore200e.h4
-rw-r--r--drivers/atm/horizon.c10
-rw-r--r--drivers/atm/idt77252.c2
-rw-r--r--drivers/atm/idt77252.h2
-rw-r--r--drivers/atm/iphase.c6
-rw-r--r--drivers/atm/lanai.c4
-rw-r--r--drivers/atm/solos-pci.c39
9 files changed, 27 insertions, 44 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 9f47e8625266..a5fcb1eb862f 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -497,7 +497,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) {
497 // VC layer stats 497 // VC layer stats
498 atomic_inc(&atm_vcc->stats->rx); 498 atomic_inc(&atm_vcc->stats->rx);
499 __net_timestamp(skb); 499 __net_timestamp(skb);
500 // end of our responsability 500 // end of our responsibility
501 atm_vcc->push (atm_vcc, skb); 501 atm_vcc->push (atm_vcc, skb);
502 return; 502 return;
503 503
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 049650d42c88..ef7a658312a6 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1782,7 +1782,7 @@ static int __devinit fs_init (struct fs_dev *dev)
1782 write_fs (dev, RAS0, RAS0_DCD_XHLT 1782 write_fs (dev, RAS0, RAS0_DCD_XHLT
1783 | (((1 << FS155_VPI_BITS) - 1) * RAS0_VPSEL) 1783 | (((1 << FS155_VPI_BITS) - 1) * RAS0_VPSEL)
1784 | (((1 << FS155_VCI_BITS) - 1) * RAS0_VCSEL)); 1784 | (((1 << FS155_VCI_BITS) - 1) * RAS0_VCSEL));
1785 /* We can chose the split arbitarily. We might be able to 1785 /* We can chose the split arbitrarily. We might be able to
1786 support more. Whatever. This should do for now. */ 1786 support more. Whatever. This should do for now. */
1787 dev->atm_dev->ci_range.vpi_bits = FS155_VPI_BITS; 1787 dev->atm_dev->ci_range.vpi_bits = FS155_VPI_BITS;
1788 dev->atm_dev->ci_range.vci_bits = FS155_VCI_BITS; 1788 dev->atm_dev->ci_range.vci_bits = FS155_VCI_BITS;
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h
index 7f97c09aaea5..ba34a02b717d 100644
--- a/drivers/atm/fore200e.h
+++ b/drivers/atm/fore200e.h
@@ -263,7 +263,7 @@ typedef enum opcode {
263} opcode_t; 263} opcode_t;
264 264
265 265
266/* virtual path / virtual channel identifers */ 266/* virtual path / virtual channel identifiers */
267 267
268typedef struct vpvc { 268typedef struct vpvc {
269 BITFIELD3( 269 BITFIELD3(
@@ -926,7 +926,7 @@ typedef struct fore200e_vcc {
926 926
927#define PCA200E_PCI_LATENCY 0x40 /* maximum slave latenty */ 927#define PCA200E_PCI_LATENCY 0x40 /* maximum slave latenty */
928#define PCA200E_PCI_MASTER_CTRL 0x41 /* master control */ 928#define PCA200E_PCI_MASTER_CTRL 0x41 /* master control */
929#define PCA200E_PCI_THRESHOLD 0x42 /* burst / continous req threshold */ 929#define PCA200E_PCI_THRESHOLD 0x42 /* burst / continuous req threshold */
930 930
931/* PBI master control register */ 931/* PBI master control register */
932 932
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 24761e1d6642..d58e3fcb9db3 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -169,13 +169,13 @@ static inline void __init show_version (void) {
169 Real Time (cdv and max CDT given) 169 Real Time (cdv and max CDT given)
170 170
171 CBR(pcr) pcr bandwidth always available 171 CBR(pcr) pcr bandwidth always available
172 rtVBR(pcr,scr,mbs) scr bandwidth always available, upto pcr at mbs too 172 rtVBR(pcr,scr,mbs) scr bandwidth always available, up to pcr at mbs too
173 173
174 Non Real Time 174 Non Real Time
175 175
176 nrtVBR(pcr,scr,mbs) scr bandwidth always available, upto pcr at mbs too 176 nrtVBR(pcr,scr,mbs) scr bandwidth always available, up to pcr at mbs too
177 UBR() 177 UBR()
178 ABR(mcr,pcr) mcr bandwidth always available, upto pcr (depending) too 178 ABR(mcr,pcr) mcr bandwidth always available, up to pcr (depending) too
179 179
180 mbs is max burst size (bucket) 180 mbs is max burst size (bucket)
181 pcr and scr have associated cdvt values 181 pcr and scr have associated cdvt values
@@ -944,7 +944,7 @@ static void hrz_close_rx (hrz_dev * dev, u16 vc) {
944// to be fixed soon, so do not define TAILRECUSRIONWORKS unless you 944// to be fixed soon, so do not define TAILRECUSRIONWORKS unless you
945// are sure it does as you may otherwise overflow the kernel stack. 945// are sure it does as you may otherwise overflow the kernel stack.
946 946
947// giving this fn a return value would help GCC, alledgedly 947// giving this fn a return value would help GCC, allegedly
948 948
949static void rx_schedule (hrz_dev * dev, int irq) { 949static void rx_schedule (hrz_dev * dev, int irq) {
950 unsigned int rx_bytes; 950 unsigned int rx_bytes;
@@ -1036,7 +1036,7 @@ static void rx_schedule (hrz_dev * dev, int irq) {
1036 // VC layer stats 1036 // VC layer stats
1037 atomic_inc(&vcc->stats->rx); 1037 atomic_inc(&vcc->stats->rx);
1038 __net_timestamp(skb); 1038 __net_timestamp(skb);
1039 // end of our responsability 1039 // end of our responsibility
1040 vcc->push (vcc, skb); 1040 vcc->push (vcc, skb);
1041 } 1041 }
1042 } 1042 }
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index bfb7feee0400..048f99fe6f83 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3495,7 +3495,7 @@ init_card(struct atm_dev *dev)
3495 return -1; 3495 return -1;
3496 } 3496 }
3497 if (dev->phy->ioctl == NULL) { 3497 if (dev->phy->ioctl == NULL) {
3498 printk("%s: LT had no IOCTL funtion defined.\n", card->name); 3498 printk("%s: LT had no IOCTL function defined.\n", card->name);
3499 deinit_card(card); 3499 deinit_card(card);
3500 return -1; 3500 return -1;
3501 } 3501 }
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h
index f53a43ae2bbe..3a82cc23a053 100644
--- a/drivers/atm/idt77252.h
+++ b/drivers/atm/idt77252.h
@@ -766,7 +766,7 @@ struct idt77252_dev
766#define SAR_RCTE_BUFFSTAT_MASK 0x00003000 /* buffer status */ 766#define SAR_RCTE_BUFFSTAT_MASK 0x00003000 /* buffer status */
767#define SAR_RCTE_EFCI 0x00000800 /* EFCI Congestion flag */ 767#define SAR_RCTE_EFCI 0x00000800 /* EFCI Congestion flag */
768#define SAR_RCTE_CLP 0x00000400 /* Cell Loss Priority flag */ 768#define SAR_RCTE_CLP 0x00000400 /* Cell Loss Priority flag */
769#define SAR_RCTE_CRC 0x00000200 /* Recieved CRC Error */ 769#define SAR_RCTE_CRC 0x00000200 /* Received CRC Error */
770#define SAR_RCTE_CELLCNT_MASK 0x000001FF /* cell Count */ 770#define SAR_RCTE_CELLCNT_MASK 0x000001FF /* cell Count */
771 771
772#define SAR_RCTE_AAL0 0x00000000 /* AAL types for ALL field */ 772#define SAR_RCTE_AAL0 0x00000000 /* AAL types for ALL field */
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index d80d51b62a1a..1c674a91f146 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1025,7 +1025,7 @@ static void desc_dbg(IADEV *iadev) {
1025} 1025}
1026 1026
1027 1027
1028/*----------------------------- Recieving side stuff --------------------------*/ 1028/*----------------------------- Receiving side stuff --------------------------*/
1029 1029
1030static void rx_excp_rcvd(struct atm_dev *dev) 1030static void rx_excp_rcvd(struct atm_dev *dev)
1031{ 1031{
@@ -1195,7 +1195,7 @@ static void rx_intr(struct atm_dev *dev)
1195 if (status & RX_PKT_RCVD) 1195 if (status & RX_PKT_RCVD)
1196 { 1196 {
1197 /* do something */ 1197 /* do something */
1198 /* Basically recvd an interrupt for receving a packet. 1198 /* Basically recvd an interrupt for receiving a packet.
1199 A descriptor would have been written to the packet complete 1199 A descriptor would have been written to the packet complete
1200 queue. Get all the descriptors and set up dma to move the 1200 queue. Get all the descriptors and set up dma to move the
1201 packets till the packet complete queue is empty.. 1201 packets till the packet complete queue is empty..
@@ -1855,7 +1855,7 @@ static int open_tx(struct atm_vcc *vcc)
1855 return -EINVAL; 1855 return -EINVAL;
1856 } 1856 }
1857 if (vcc->qos.txtp.max_pcr > iadev->LineRate) { 1857 if (vcc->qos.txtp.max_pcr > iadev->LineRate) {
1858 IF_CBR(printk("PCR is not availble\n");) 1858 IF_CBR(printk("PCR is not available\n");)
1859 return -1; 1859 return -1;
1860 } 1860 }
1861 vc->type = CBR; 1861 vc->type = CBR;
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 52880c8387d8..4e8ba56f75d3 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -1255,7 +1255,7 @@ static inline void lanai_endtx(struct lanai_dev *lanai,
1255 /* 1255 /*
1256 * Since the "butt register" is a shared resounce on the card we 1256 * Since the "butt register" is a shared resounce on the card we
1257 * serialize all accesses to it through this spinlock. This is 1257 * serialize all accesses to it through this spinlock. This is
1258 * mostly just paranoia sicne the register is rarely "busy" anyway 1258 * mostly just paranoia since the register is rarely "busy" anyway
1259 * but is needed for correctness. 1259 * but is needed for correctness.
1260 */ 1260 */
1261 spin_lock(&lanai->endtxlock); 1261 spin_lock(&lanai->endtxlock);
@@ -1990,7 +1990,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai)
1990 1990
1991/* 1991/*
1992 * We _can_ use VCI==0 for normal traffic, but only for UBR (or we'll 1992 * We _can_ use VCI==0 for normal traffic, but only for UBR (or we'll
1993 * get a CBRZERO interrupt), and we can use it only if noone is receiving 1993 * get a CBRZERO interrupt), and we can use it only if no one is receiving
1994 * AAL0 traffic (since they will use the same queue) - according to the 1994 * AAL0 traffic (since they will use the same queue) - according to the
1995 * docs we shouldn't even use it for AAL0 traffic 1995 * docs we shouldn't even use it for AAL0 traffic
1996 */ 1996 */
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 25ef1a4556e6..cd0ff66469b2 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -165,7 +165,6 @@ static uint32_t fpga_tx(struct solos_card *);
165static irqreturn_t solos_irq(int irq, void *dev_id); 165static irqreturn_t solos_irq(int irq, void *dev_id);
166static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); 166static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci);
167static int list_vccs(int vci); 167static int list_vccs(int vci);
168static void release_vccs(struct atm_dev *dev);
169static int atm_init(struct solos_card *, struct device *); 168static int atm_init(struct solos_card *, struct device *);
170static void atm_remove(struct solos_card *); 169static void atm_remove(struct solos_card *);
171static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); 170static int send_command(struct solos_card *card, int dev, const char *buf, size_t size);
@@ -384,7 +383,6 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
384 /* Anything but 'Showtime' is down */ 383 /* Anything but 'Showtime' is down */
385 if (strcmp(state_str, "Showtime")) { 384 if (strcmp(state_str, "Showtime")) {
386 atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST); 385 atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST);
387 release_vccs(card->atmdev[port]);
388 dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str); 386 dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str);
389 return 0; 387 return 0;
390 } 388 }
@@ -697,7 +695,7 @@ void solos_bh(unsigned long card_arg)
697 size); 695 size);
698 } 696 }
699 if (atmdebug) { 697 if (atmdebug) {
700 dev_info(&card->dev->dev, "Received: device %d\n", port); 698 dev_info(&card->dev->dev, "Received: port %d\n", port);
701 dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n", 699 dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
702 size, le16_to_cpu(header->vpi), 700 size, le16_to_cpu(header->vpi),
703 le16_to_cpu(header->vci)); 701 le16_to_cpu(header->vci));
@@ -710,8 +708,8 @@ void solos_bh(unsigned long card_arg)
710 le16_to_cpu(header->vci)); 708 le16_to_cpu(header->vci));
711 if (!vcc) { 709 if (!vcc) {
712 if (net_ratelimit()) 710 if (net_ratelimit())
713 dev_warn(&card->dev->dev, "Received packet for unknown VCI.VPI %d.%d on port %d\n", 711 dev_warn(&card->dev->dev, "Received packet for unknown VPI.VCI %d.%d on port %d\n",
714 le16_to_cpu(header->vci), le16_to_cpu(header->vpi), 712 le16_to_cpu(header->vpi), le16_to_cpu(header->vci),
715 port); 713 port);
716 continue; 714 continue;
717 } 715 }
@@ -830,28 +828,6 @@ static int list_vccs(int vci)
830 return num_found; 828 return num_found;
831} 829}
832 830
833static void release_vccs(struct atm_dev *dev)
834{
835 int i;
836
837 write_lock_irq(&vcc_sklist_lock);
838 for (i = 0; i < VCC_HTABLE_SIZE; i++) {
839 struct hlist_head *head = &vcc_hash[i];
840 struct hlist_node *node, *tmp;
841 struct sock *s;
842 struct atm_vcc *vcc;
843
844 sk_for_each_safe(s, node, tmp, head) {
845 vcc = atm_sk(s);
846 if (vcc->dev == dev) {
847 vcc_release_async(vcc, -EPIPE);
848 sk_del_node_init(s);
849 }
850 }
851 }
852 write_unlock_irq(&vcc_sklist_lock);
853}
854
855 831
856static int popen(struct atm_vcc *vcc) 832static int popen(struct atm_vcc *vcc)
857{ 833{
@@ -1018,8 +994,15 @@ static uint32_t fpga_tx(struct solos_card *card)
1018 994
1019 /* Clean up and free oldskb now it's gone */ 995 /* Clean up and free oldskb now it's gone */
1020 if (atmdebug) { 996 if (atmdebug) {
997 struct pkt_hdr *header = (void *)oldskb->data;
998 int size = le16_to_cpu(header->size);
999
1000 skb_pull(oldskb, sizeof(*header));
1021 dev_info(&card->dev->dev, "Transmitted: port %d\n", 1001 dev_info(&card->dev->dev, "Transmitted: port %d\n",
1022 port); 1002 port);
1003 dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
1004 size, le16_to_cpu(header->vpi),
1005 le16_to_cpu(header->vci));
1023 print_buffer(oldskb); 1006 print_buffer(oldskb);
1024 } 1007 }
1025 1008
@@ -1262,7 +1245,7 @@ static int atm_init(struct solos_card *card, struct device *parent)
1262 card->atmdev[i]->ci_range.vci_bits = 16; 1245 card->atmdev[i]->ci_range.vci_bits = 16;
1263 card->atmdev[i]->dev_data = card; 1246 card->atmdev[i]->dev_data = card;
1264 card->atmdev[i]->phy_data = (void *)(unsigned long)i; 1247 card->atmdev[i]->phy_data = (void *)(unsigned long)i;
1265 atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_UNKNOWN); 1248 atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_FOUND);
1266 1249
1267 skb = alloc_skb(sizeof(*header), GFP_ATOMIC); 1250 skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
1268 if (!skb) { 1251 if (!skb) {