aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/atm/solos-pci.c52
1 files changed, 3 insertions, 49 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index e7691b3328f9..21c73b17d5fd 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -813,8 +813,7 @@ static int popen(struct atm_vcc *vcc)
813 813
814 fpga_queue(card, SOLOS_CHAN(vcc->dev), skb, NULL); 814 fpga_queue(card, SOLOS_CHAN(vcc->dev), skb, NULL);
815 815
816// dev_dbg(&card->dev->dev, "Open for vpi %d and vci %d on interface %d\n", vcc->vpi, vcc->vci, SOLOS_CHAN(vcc->dev)); 816 set_bit(ATM_VF_ADDR, &vcc->flags);
817 set_bit(ATM_VF_ADDR, &vcc->flags); // accept the vpi / vci
818 set_bit(ATM_VF_READY, &vcc->flags); 817 set_bit(ATM_VF_READY, &vcc->flags);
819 list_vccs(0); 818 list_vccs(0);
820 819
@@ -842,8 +841,6 @@ static void pclose(struct atm_vcc *vcc)
842 841
843 fpga_queue(card, SOLOS_CHAN(vcc->dev), skb, NULL); 842 fpga_queue(card, SOLOS_CHAN(vcc->dev), skb, NULL);
844 843
845// dev_dbg(&card->dev->dev, "Close for vpi %d and vci %d on interface %d\n", vcc->vpi, vcc->vci, SOLOS_CHAN(vcc->dev));
846
847 clear_bit(ATM_VF_ADDR, &vcc->flags); 844 clear_bit(ATM_VF_ADDR, &vcc->flags);
848 clear_bit(ATM_VF_READY, &vcc->flags); 845 clear_bit(ATM_VF_READY, &vcc->flags);
849 846
@@ -936,7 +933,7 @@ static uint32_t fpga_tx(struct solos_card *card)
936 933
937 if (skb && !card->using_dma) { 934 if (skb && !card->using_dma) {
938 memcpy_toio(TX_BUF(card, port), skb->data, skb->len); 935 memcpy_toio(TX_BUF(card, port), skb->data, skb->len);
939 tx_started |= 1 << port; //Set TX full flag 936 tx_started |= 1 << port;
940 oldskb = skb; /* We're done with this skb already */ 937 oldskb = skb; /* We're done with this skb already */
941 } else if (skb && card->using_dma) { 938 } else if (skb && card->using_dma) {
942 SKB_CB(skb)->dma_addr = pci_map_single(card->dev, skb->data, 939 SKB_CB(skb)->dma_addr = pci_map_single(card->dev, skb->data,
@@ -965,10 +962,10 @@ static uint32_t fpga_tx(struct solos_card *card)
965 962
966 } 963 }
967 } 964 }
965 /* For non-DMA TX, write the 'TX start' bit for all four ports simultaneously */
968 if (tx_started) 966 if (tx_started)
969 iowrite32(tx_started, card->config_regs + FLAGS_ADDR); 967 iowrite32(tx_started, card->config_regs + FLAGS_ADDR);
970 968
971 out:
972 spin_unlock_irqrestore(&card->tx_lock, flags); 969 spin_unlock_irqrestore(&card->tx_lock, flags);
973 return card_flags; 970 return card_flags;
974} 971}
@@ -979,9 +976,6 @@ static int psend(struct atm_vcc *vcc, struct sk_buff *skb)
979 struct pkt_hdr *header; 976 struct pkt_hdr *header;
980 int pktlen; 977 int pktlen;
981 978
982 //dev_dbg(&card->dev->dev, "psend called.\n");
983 //dev_dbg(&card->dev->dev, "dev,vpi,vci = %d,%d,%d\n",SOLOS_CHAN(vcc->dev),vcc->vpi,vcc->vci);
984
985 pktlen = skb->len; 979 pktlen = skb->len;
986 if (pktlen > (BUF_SIZE - sizeof(*header))) { 980 if (pktlen > (BUF_SIZE - sizeof(*header))) {
987 dev_warn(&card->dev->dev, "Length of PDU is too large. Dropping PDU.\n"); 981 dev_warn(&card->dev->dev, "Length of PDU is too large. Dropping PDU.\n");
@@ -1077,11 +1071,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1077 goto out_unmap_config; 1071 goto out_unmap_config;
1078 } 1072 }
1079 1073
1080// for(i=0;i<64 ;i+=4){
1081// data32=ioread32(card->buffers + i);
1082// dev_dbg(&card->dev->dev, "%08lX\n",(unsigned long)data32);
1083// }
1084
1085 //Fill Config Mem with zeros 1074 //Fill Config Mem with zeros
1086 for(i = 0; i < 128; i += 4) 1075 for(i = 0; i < 128; i += 4)
1087 iowrite32(0, card->config_regs + i); 1076 iowrite32(0, card->config_regs + i);
@@ -1110,33 +1099,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1110 spin_lock_init(&card->param_queue_lock); 1099 spin_lock_init(&card->param_queue_lock);
1111 INIT_LIST_HEAD(&card->param_queue); 1100 INIT_LIST_HEAD(&card->param_queue);
1112 1101
1113/*
1114 // Set Loopback mode
1115 data32 = 0x00010000;
1116 iowrite32(data32,card->config_regs + FLAGS_ADDR);
1117*/
1118/*
1119 // Fill Buffers with zeros
1120 for (i = 0; i < BUF_SIZE * 8; i += 4)
1121 iowrite32(0, card->buffers + i);
1122*/
1123/*
1124 for(i = 0; i < (BUF_SIZE * 1); i += 4)
1125 iowrite32(0x12345678, card->buffers + i + (0*BUF_SIZE));
1126 for(i = 0; i < (BUF_SIZE * 1); i += 4)
1127 iowrite32(0xabcdef98, card->buffers + i + (1*BUF_SIZE));
1128
1129 // Read Config Memory
1130 printk(KERN_DEBUG "Reading Config MEM\n");
1131 i = 0;
1132 for(i = 0; i < 16; i++) {
1133 data32=ioread32(card->buffers + i*(BUF_SIZE/2));
1134 printk(KERN_ALERT "Addr: %lX Data: %08lX\n",
1135 (unsigned long)(addr_start + i*(BUF_SIZE/2)),
1136 (unsigned long)data32);
1137 }
1138*/
1139 //dev_dbg(&card->dev->dev, "Requesting IRQ: %d\n",dev->irq);
1140 err = request_irq(dev->irq, solos_irq, IRQF_SHARED, 1102 err = request_irq(dev->irq, solos_irq, IRQF_SHARED,
1141 "solos-pci", card); 1103 "solos-pci", card);
1142 if (err) { 1104 if (err) {
@@ -1144,7 +1106,6 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1144 goto out_unmap_both; 1106 goto out_unmap_both;
1145 } 1107 }
1146 1108
1147 // Enable IRQs
1148 iowrite32(1, card->config_regs + IRQ_EN_ADDR); 1109 iowrite32(1, card->config_regs + IRQ_EN_ADDR);
1149 1110
1150 if (fpga_upgrade) 1111 if (fpga_upgrade)
@@ -1243,25 +1204,18 @@ static void fpga_remove(struct pci_dev *dev)
1243 1204
1244 atm_remove(card); 1205 atm_remove(card);
1245 1206
1246 dev_vdbg(&dev->dev, "Freeing IRQ\n");
1247 // Disable IRQs from FPGA
1248 iowrite32(0, card->config_regs + IRQ_EN_ADDR); 1207 iowrite32(0, card->config_regs + IRQ_EN_ADDR);
1249 free_irq(dev->irq, card); 1208 free_irq(dev->irq, card);
1250 tasklet_kill(&card->tlet); 1209 tasklet_kill(&card->tlet);
1251 1210
1252 // iowrite32(0x01,pciregs);
1253 dev_vdbg(&dev->dev, "Unmapping PCI resource\n");
1254 pci_iounmap(dev, card->buffers); 1211 pci_iounmap(dev, card->buffers);
1255 pci_iounmap(dev, card->config_regs); 1212 pci_iounmap(dev, card->config_regs);
1256 1213
1257 dev_vdbg(&dev->dev, "Releasing PCI Region\n");
1258 pci_release_regions(dev); 1214 pci_release_regions(dev);
1259 pci_disable_device(dev); 1215 pci_disable_device(dev);
1260 1216
1261 pci_set_drvdata(dev, NULL); 1217 pci_set_drvdata(dev, NULL);
1262 kfree(card); 1218 kfree(card);
1263// dev_dbg(&card->dev->dev, "fpga_remove\n");
1264 return;
1265} 1219}
1266 1220
1267static struct pci_device_id fpga_pci_tbl[] __devinitdata = { 1221static struct pci_device_id fpga_pci_tbl[] __devinitdata = {