diff options
Diffstat (limited to 'drivers/net/pcmcia/nmclan_cs.c')
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 148 |
1 files changed, 60 insertions, 88 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 4b96b356d979..a5363483ec6f 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -381,13 +381,6 @@ typedef struct _mace_private { | |||
381 | Private Global Variables | 381 | Private Global Variables |
382 | ---------------------------------------------------------------------------- */ | 382 | ---------------------------------------------------------------------------- */ |
383 | 383 | ||
384 | #ifdef PCMCIA_DEBUG | ||
385 | static char rcsid[] = | ||
386 | "nmclan_cs.c,v 0.16 1995/07/01 06:42:17 rpao Exp rpao"; | ||
387 | static char *version = | ||
388 | DRV_NAME " " DRV_VERSION " (Roger C. Pao)"; | ||
389 | #endif | ||
390 | |||
391 | static const char *if_names[]={ | 384 | static const char *if_names[]={ |
392 | "Auto", "10baseT", "BNC", | 385 | "Auto", "10baseT", "BNC", |
393 | }; | 386 | }; |
@@ -406,12 +399,6 @@ MODULE_LICENSE("GPL"); | |||
406 | /* 0=auto, 1=10baseT, 2 = 10base2, default=auto */ | 399 | /* 0=auto, 1=10baseT, 2 = 10base2, default=auto */ |
407 | INT_MODULE_PARM(if_port, 0); | 400 | INT_MODULE_PARM(if_port, 0); |
408 | 401 | ||
409 | #ifdef PCMCIA_DEBUG | ||
410 | INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG); | ||
411 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) | ||
412 | #else | ||
413 | #define DEBUG(n, args...) | ||
414 | #endif | ||
415 | 402 | ||
416 | /* ---------------------------------------------------------------------------- | 403 | /* ---------------------------------------------------------------------------- |
417 | Function Prototypes | 404 | Function Prototypes |
@@ -462,8 +449,7 @@ static int nmclan_probe(struct pcmcia_device *link) | |||
462 | mace_private *lp; | 449 | mace_private *lp; |
463 | struct net_device *dev; | 450 | struct net_device *dev; |
464 | 451 | ||
465 | DEBUG(0, "nmclan_attach()\n"); | 452 | dev_dbg(&link->dev, "nmclan_attach()\n"); |
466 | DEBUG(1, "%s\n", rcsid); | ||
467 | 453 | ||
468 | /* Create new ethernet device */ | 454 | /* Create new ethernet device */ |
469 | dev = alloc_etherdev(sizeof(mace_private)); | 455 | dev = alloc_etherdev(sizeof(mace_private)); |
@@ -507,7 +493,7 @@ static void nmclan_detach(struct pcmcia_device *link) | |||
507 | { | 493 | { |
508 | struct net_device *dev = link->priv; | 494 | struct net_device *dev = link->priv; |
509 | 495 | ||
510 | DEBUG(0, "nmclan_detach(0x%p)\n", link); | 496 | dev_dbg(&link->dev, "nmclan_detach\n"); |
511 | 497 | ||
512 | if (link->dev_node) | 498 | if (link->dev_node) |
513 | unregister_netdev(dev); | 499 | unregister_netdev(dev); |
@@ -654,23 +640,27 @@ nmclan_config | |||
654 | ethernet device available to the system. | 640 | ethernet device available to the system. |
655 | ---------------------------------------------------------------------------- */ | 641 | ---------------------------------------------------------------------------- */ |
656 | 642 | ||
657 | #define CS_CHECK(fn, ret) \ | ||
658 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | ||
659 | |||
660 | static int nmclan_config(struct pcmcia_device *link) | 643 | static int nmclan_config(struct pcmcia_device *link) |
661 | { | 644 | { |
662 | struct net_device *dev = link->priv; | 645 | struct net_device *dev = link->priv; |
663 | mace_private *lp = netdev_priv(dev); | 646 | mace_private *lp = netdev_priv(dev); |
664 | u8 *buf; | 647 | u8 *buf; |
665 | size_t len; | 648 | size_t len; |
666 | int i, last_ret, last_fn; | 649 | int i, ret; |
667 | unsigned int ioaddr; | 650 | unsigned int ioaddr; |
668 | 651 | ||
669 | DEBUG(0, "nmclan_config(0x%p)\n", link); | 652 | dev_dbg(&link->dev, "nmclan_config\n"); |
653 | |||
654 | ret = pcmcia_request_io(link, &link->io); | ||
655 | if (ret) | ||
656 | goto failed; | ||
657 | ret = pcmcia_request_irq(link, &link->irq); | ||
658 | if (ret) | ||
659 | goto failed; | ||
660 | ret = pcmcia_request_configuration(link, &link->conf); | ||
661 | if (ret) | ||
662 | goto failed; | ||
670 | 663 | ||
671 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | ||
672 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | ||
673 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | ||
674 | dev->irq = link->irq.AssignedIRQ; | 664 | dev->irq = link->irq.AssignedIRQ; |
675 | dev->base_addr = link->io.BasePort1; | 665 | dev->base_addr = link->io.BasePort1; |
676 | 666 | ||
@@ -692,7 +682,7 @@ static int nmclan_config(struct pcmcia_device *link) | |||
692 | sig[0] = mace_read(lp, ioaddr, MACE_CHIPIDL); | 682 | sig[0] = mace_read(lp, ioaddr, MACE_CHIPIDL); |
693 | sig[1] = mace_read(lp, ioaddr, MACE_CHIPIDH); | 683 | sig[1] = mace_read(lp, ioaddr, MACE_CHIPIDH); |
694 | if ((sig[0] == 0x40) && ((sig[1] & 0x0F) == 0x09)) { | 684 | if ((sig[0] == 0x40) && ((sig[1] & 0x0F) == 0x09)) { |
695 | DEBUG(0, "nmclan_cs configured: mace id=%x %x\n", | 685 | dev_dbg(&link->dev, "nmclan_cs configured: mace id=%x %x\n", |
696 | sig[0], sig[1]); | 686 | sig[0], sig[1]); |
697 | } else { | 687 | } else { |
698 | printk(KERN_NOTICE "nmclan_cs: mace id not found: %x %x should" | 688 | printk(KERN_NOTICE "nmclan_cs: mace id not found: %x %x should" |
@@ -728,8 +718,6 @@ static int nmclan_config(struct pcmcia_device *link) | |||
728 | dev->dev_addr); | 718 | dev->dev_addr); |
729 | return 0; | 719 | return 0; |
730 | 720 | ||
731 | cs_failed: | ||
732 | cs_error(link, last_fn, last_ret); | ||
733 | failed: | 721 | failed: |
734 | nmclan_release(link); | 722 | nmclan_release(link); |
735 | return -ENODEV; | 723 | return -ENODEV; |
@@ -743,7 +731,7 @@ nmclan_release | |||
743 | ---------------------------------------------------------------------------- */ | 731 | ---------------------------------------------------------------------------- */ |
744 | static void nmclan_release(struct pcmcia_device *link) | 732 | static void nmclan_release(struct pcmcia_device *link) |
745 | { | 733 | { |
746 | DEBUG(0, "nmclan_release(0x%p)\n", link); | 734 | dev_dbg(&link->dev, "nmclan_release\n"); |
747 | pcmcia_disable_device(link); | 735 | pcmcia_disable_device(link); |
748 | } | 736 | } |
749 | 737 | ||
@@ -794,7 +782,7 @@ static void nmclan_reset(struct net_device *dev) | |||
794 | /* Reset Xilinx */ | 782 | /* Reset Xilinx */ |
795 | reg.Action = CS_WRITE; | 783 | reg.Action = CS_WRITE; |
796 | reg.Offset = CISREG_COR; | 784 | reg.Offset = CISREG_COR; |
797 | DEBUG(1, "nmclan_reset: OrigCorValue=0x%lX, resetting...\n", | 785 | dev_dbg(&link->dev, "nmclan_reset: OrigCorValue=0x%lX, resetting...\n", |
798 | OrigCorValue); | 786 | OrigCorValue); |
799 | reg.Value = COR_SOFT_RESET; | 787 | reg.Value = COR_SOFT_RESET; |
800 | pcmcia_access_configuration_register(link, ®); | 788 | pcmcia_access_configuration_register(link, ®); |
@@ -871,7 +859,7 @@ static int mace_close(struct net_device *dev) | |||
871 | mace_private *lp = netdev_priv(dev); | 859 | mace_private *lp = netdev_priv(dev); |
872 | struct pcmcia_device *link = lp->p_dev; | 860 | struct pcmcia_device *link = lp->p_dev; |
873 | 861 | ||
874 | DEBUG(2, "%s: shutting down ethercard.\n", dev->name); | 862 | dev_dbg(&link->dev, "%s: shutting down ethercard.\n", dev->name); |
875 | 863 | ||
876 | /* Mask off all interrupts from the MACE chip. */ | 864 | /* Mask off all interrupts from the MACE chip. */ |
877 | outb(0xFF, ioaddr + AM2150_MACE_BASE + MACE_IMR); | 865 | outb(0xFF, ioaddr + AM2150_MACE_BASE + MACE_IMR); |
@@ -890,24 +878,8 @@ static void netdev_get_drvinfo(struct net_device *dev, | |||
890 | sprintf(info->bus_info, "PCMCIA 0x%lx", dev->base_addr); | 878 | sprintf(info->bus_info, "PCMCIA 0x%lx", dev->base_addr); |
891 | } | 879 | } |
892 | 880 | ||
893 | #ifdef PCMCIA_DEBUG | ||
894 | static u32 netdev_get_msglevel(struct net_device *dev) | ||
895 | { | ||
896 | return pc_debug; | ||
897 | } | ||
898 | |||
899 | static void netdev_set_msglevel(struct net_device *dev, u32 level) | ||
900 | { | ||
901 | pc_debug = level; | ||
902 | } | ||
903 | #endif /* PCMCIA_DEBUG */ | ||
904 | |||
905 | static const struct ethtool_ops netdev_ethtool_ops = { | 881 | static const struct ethtool_ops netdev_ethtool_ops = { |
906 | .get_drvinfo = netdev_get_drvinfo, | 882 | .get_drvinfo = netdev_get_drvinfo, |
907 | #ifdef PCMCIA_DEBUG | ||
908 | .get_msglevel = netdev_get_msglevel, | ||
909 | .set_msglevel = netdev_set_msglevel, | ||
910 | #endif /* PCMCIA_DEBUG */ | ||
911 | }; | 883 | }; |
912 | 884 | ||
913 | /* ---------------------------------------------------------------------------- | 885 | /* ---------------------------------------------------------------------------- |
@@ -945,7 +917,7 @@ static netdev_tx_t mace_start_xmit(struct sk_buff *skb, | |||
945 | 917 | ||
946 | netif_stop_queue(dev); | 918 | netif_stop_queue(dev); |
947 | 919 | ||
948 | DEBUG(3, "%s: mace_start_xmit(length = %ld) called.\n", | 920 | pr_debug("%s: mace_start_xmit(length = %ld) called.\n", |
949 | dev->name, (long)skb->len); | 921 | dev->name, (long)skb->len); |
950 | 922 | ||
951 | #if (!TX_INTERRUPTABLE) | 923 | #if (!TX_INTERRUPTABLE) |
@@ -1007,7 +979,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) | |||
1007 | int IntrCnt = MACE_MAX_IR_ITERATIONS; | 979 | int IntrCnt = MACE_MAX_IR_ITERATIONS; |
1008 | 980 | ||
1009 | if (dev == NULL) { | 981 | if (dev == NULL) { |
1010 | DEBUG(2, "mace_interrupt(): irq 0x%X for unknown device.\n", | 982 | pr_debug("mace_interrupt(): irq 0x%X for unknown device.\n", |
1011 | irq); | 983 | irq); |
1012 | return IRQ_NONE; | 984 | return IRQ_NONE; |
1013 | } | 985 | } |
@@ -1030,7 +1002,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) | |||
1030 | } | 1002 | } |
1031 | 1003 | ||
1032 | if (!netif_device_present(dev)) { | 1004 | if (!netif_device_present(dev)) { |
1033 | DEBUG(2, "%s: interrupt from dead card\n", dev->name); | 1005 | pr_debug("%s: interrupt from dead card\n", dev->name); |
1034 | return IRQ_NONE; | 1006 | return IRQ_NONE; |
1035 | } | 1007 | } |
1036 | 1008 | ||
@@ -1038,7 +1010,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) | |||
1038 | /* WARNING: MACE_IR is a READ/CLEAR port! */ | 1010 | /* WARNING: MACE_IR is a READ/CLEAR port! */ |
1039 | status = inb(ioaddr + AM2150_MACE_BASE + MACE_IR); | 1011 | status = inb(ioaddr + AM2150_MACE_BASE + MACE_IR); |
1040 | 1012 | ||
1041 | DEBUG(3, "mace_interrupt: irq 0x%X status 0x%X.\n", irq, status); | 1013 | pr_debug("mace_interrupt: irq 0x%X status 0x%X.\n", irq, status); |
1042 | 1014 | ||
1043 | if (status & MACE_IR_RCVINT) { | 1015 | if (status & MACE_IR_RCVINT) { |
1044 | mace_rx(dev, MACE_MAX_RX_ITERATIONS); | 1016 | mace_rx(dev, MACE_MAX_RX_ITERATIONS); |
@@ -1157,7 +1129,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1157 | ) { | 1129 | ) { |
1158 | rx_status = inw(ioaddr + AM2150_RCV); | 1130 | rx_status = inw(ioaddr + AM2150_RCV); |
1159 | 1131 | ||
1160 | DEBUG(3, "%s: in mace_rx(), framecnt 0x%X, rx_status" | 1132 | pr_debug("%s: in mace_rx(), framecnt 0x%X, rx_status" |
1161 | " 0x%X.\n", dev->name, rx_framecnt, rx_status); | 1133 | " 0x%X.\n", dev->name, rx_framecnt, rx_status); |
1162 | 1134 | ||
1163 | if (rx_status & MACE_RCVFS_RCVSTS) { /* Error, update stats. */ | 1135 | if (rx_status & MACE_RCVFS_RCVSTS) { /* Error, update stats. */ |
@@ -1184,7 +1156,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1184 | lp->mace_stats.rfs_rcvcc += inb(ioaddr + AM2150_RCV); | 1156 | lp->mace_stats.rfs_rcvcc += inb(ioaddr + AM2150_RCV); |
1185 | /* rcv collision count */ | 1157 | /* rcv collision count */ |
1186 | 1158 | ||
1187 | DEBUG(3, " receiving packet size 0x%X rx_status" | 1159 | pr_debug(" receiving packet size 0x%X rx_status" |
1188 | " 0x%X.\n", pkt_len, rx_status); | 1160 | " 0x%X.\n", pkt_len, rx_status); |
1189 | 1161 | ||
1190 | skb = dev_alloc_skb(pkt_len+2); | 1162 | skb = dev_alloc_skb(pkt_len+2); |
@@ -1203,7 +1175,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1203 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ | 1175 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ |
1204 | continue; | 1176 | continue; |
1205 | } else { | 1177 | } else { |
1206 | DEBUG(1, "%s: couldn't allocate a sk_buff of size" | 1178 | pr_debug("%s: couldn't allocate a sk_buff of size" |
1207 | " %d.\n", dev->name, pkt_len); | 1179 | " %d.\n", dev->name, pkt_len); |
1208 | lp->linux_stats.rx_dropped++; | 1180 | lp->linux_stats.rx_dropped++; |
1209 | } | 1181 | } |
@@ -1219,28 +1191,28 @@ pr_linux_stats | |||
1219 | ---------------------------------------------------------------------------- */ | 1191 | ---------------------------------------------------------------------------- */ |
1220 | static void pr_linux_stats(struct net_device_stats *pstats) | 1192 | static void pr_linux_stats(struct net_device_stats *pstats) |
1221 | { | 1193 | { |
1222 | DEBUG(2, "pr_linux_stats\n"); | 1194 | pr_debug("pr_linux_stats\n"); |
1223 | DEBUG(2, " rx_packets=%-7ld tx_packets=%ld\n", | 1195 | pr_debug(" rx_packets=%-7ld tx_packets=%ld\n", |
1224 | (long)pstats->rx_packets, (long)pstats->tx_packets); | 1196 | (long)pstats->rx_packets, (long)pstats->tx_packets); |
1225 | DEBUG(2, " rx_errors=%-7ld tx_errors=%ld\n", | 1197 | pr_debug(" rx_errors=%-7ld tx_errors=%ld\n", |
1226 | (long)pstats->rx_errors, (long)pstats->tx_errors); | 1198 | (long)pstats->rx_errors, (long)pstats->tx_errors); |
1227 | DEBUG(2, " rx_dropped=%-7ld tx_dropped=%ld\n", | 1199 | pr_debug(" rx_dropped=%-7ld tx_dropped=%ld\n", |
1228 | (long)pstats->rx_dropped, (long)pstats->tx_dropped); | 1200 | (long)pstats->rx_dropped, (long)pstats->tx_dropped); |
1229 | DEBUG(2, " multicast=%-7ld collisions=%ld\n", | 1201 | pr_debug(" multicast=%-7ld collisions=%ld\n", |
1230 | (long)pstats->multicast, (long)pstats->collisions); | 1202 | (long)pstats->multicast, (long)pstats->collisions); |
1231 | 1203 | ||
1232 | DEBUG(2, " rx_length_errors=%-7ld rx_over_errors=%ld\n", | 1204 | pr_debug(" rx_length_errors=%-7ld rx_over_errors=%ld\n", |
1233 | (long)pstats->rx_length_errors, (long)pstats->rx_over_errors); | 1205 | (long)pstats->rx_length_errors, (long)pstats->rx_over_errors); |
1234 | DEBUG(2, " rx_crc_errors=%-7ld rx_frame_errors=%ld\n", | 1206 | pr_debug(" rx_crc_errors=%-7ld rx_frame_errors=%ld\n", |
1235 | (long)pstats->rx_crc_errors, (long)pstats->rx_frame_errors); | 1207 | (long)pstats->rx_crc_errors, (long)pstats->rx_frame_errors); |
1236 | DEBUG(2, " rx_fifo_errors=%-7ld rx_missed_errors=%ld\n", | 1208 | pr_debug(" rx_fifo_errors=%-7ld rx_missed_errors=%ld\n", |
1237 | (long)pstats->rx_fifo_errors, (long)pstats->rx_missed_errors); | 1209 | (long)pstats->rx_fifo_errors, (long)pstats->rx_missed_errors); |
1238 | 1210 | ||
1239 | DEBUG(2, " tx_aborted_errors=%-7ld tx_carrier_errors=%ld\n", | 1211 | pr_debug(" tx_aborted_errors=%-7ld tx_carrier_errors=%ld\n", |
1240 | (long)pstats->tx_aborted_errors, (long)pstats->tx_carrier_errors); | 1212 | (long)pstats->tx_aborted_errors, (long)pstats->tx_carrier_errors); |
1241 | DEBUG(2, " tx_fifo_errors=%-7ld tx_heartbeat_errors=%ld\n", | 1213 | pr_debug(" tx_fifo_errors=%-7ld tx_heartbeat_errors=%ld\n", |
1242 | (long)pstats->tx_fifo_errors, (long)pstats->tx_heartbeat_errors); | 1214 | (long)pstats->tx_fifo_errors, (long)pstats->tx_heartbeat_errors); |
1243 | DEBUG(2, " tx_window_errors=%ld\n", | 1215 | pr_debug(" tx_window_errors=%ld\n", |
1244 | (long)pstats->tx_window_errors); | 1216 | (long)pstats->tx_window_errors); |
1245 | } /* pr_linux_stats */ | 1217 | } /* pr_linux_stats */ |
1246 | 1218 | ||
@@ -1249,48 +1221,48 @@ pr_mace_stats | |||
1249 | ---------------------------------------------------------------------------- */ | 1221 | ---------------------------------------------------------------------------- */ |
1250 | static void pr_mace_stats(mace_statistics *pstats) | 1222 | static void pr_mace_stats(mace_statistics *pstats) |
1251 | { | 1223 | { |
1252 | DEBUG(2, "pr_mace_stats\n"); | 1224 | pr_debug("pr_mace_stats\n"); |
1253 | 1225 | ||
1254 | DEBUG(2, " xmtsv=%-7d uflo=%d\n", | 1226 | pr_debug(" xmtsv=%-7d uflo=%d\n", |
1255 | pstats->xmtsv, pstats->uflo); | 1227 | pstats->xmtsv, pstats->uflo); |
1256 | DEBUG(2, " lcol=%-7d more=%d\n", | 1228 | pr_debug(" lcol=%-7d more=%d\n", |
1257 | pstats->lcol, pstats->more); | 1229 | pstats->lcol, pstats->more); |
1258 | DEBUG(2, " one=%-7d defer=%d\n", | 1230 | pr_debug(" one=%-7d defer=%d\n", |
1259 | pstats->one, pstats->defer); | 1231 | pstats->one, pstats->defer); |
1260 | DEBUG(2, " lcar=%-7d rtry=%d\n", | 1232 | pr_debug(" lcar=%-7d rtry=%d\n", |
1261 | pstats->lcar, pstats->rtry); | 1233 | pstats->lcar, pstats->rtry); |
1262 | 1234 | ||
1263 | /* MACE_XMTRC */ | 1235 | /* MACE_XMTRC */ |
1264 | DEBUG(2, " exdef=%-7d xmtrc=%d\n", | 1236 | pr_debug(" exdef=%-7d xmtrc=%d\n", |
1265 | pstats->exdef, pstats->xmtrc); | 1237 | pstats->exdef, pstats->xmtrc); |
1266 | 1238 | ||
1267 | /* RFS1--Receive Status (RCVSTS) */ | 1239 | /* RFS1--Receive Status (RCVSTS) */ |
1268 | DEBUG(2, " oflo=%-7d clsn=%d\n", | 1240 | pr_debug(" oflo=%-7d clsn=%d\n", |
1269 | pstats->oflo, pstats->clsn); | 1241 | pstats->oflo, pstats->clsn); |
1270 | DEBUG(2, " fram=%-7d fcs=%d\n", | 1242 | pr_debug(" fram=%-7d fcs=%d\n", |
1271 | pstats->fram, pstats->fcs); | 1243 | pstats->fram, pstats->fcs); |
1272 | 1244 | ||
1273 | /* RFS2--Runt Packet Count (RNTPC) */ | 1245 | /* RFS2--Runt Packet Count (RNTPC) */ |
1274 | /* RFS3--Receive Collision Count (RCVCC) */ | 1246 | /* RFS3--Receive Collision Count (RCVCC) */ |
1275 | DEBUG(2, " rfs_rntpc=%-7d rfs_rcvcc=%d\n", | 1247 | pr_debug(" rfs_rntpc=%-7d rfs_rcvcc=%d\n", |
1276 | pstats->rfs_rntpc, pstats->rfs_rcvcc); | 1248 | pstats->rfs_rntpc, pstats->rfs_rcvcc); |
1277 | 1249 | ||
1278 | /* MACE_IR */ | 1250 | /* MACE_IR */ |
1279 | DEBUG(2, " jab=%-7d babl=%d\n", | 1251 | pr_debug(" jab=%-7d babl=%d\n", |
1280 | pstats->jab, pstats->babl); | 1252 | pstats->jab, pstats->babl); |
1281 | DEBUG(2, " cerr=%-7d rcvcco=%d\n", | 1253 | pr_debug(" cerr=%-7d rcvcco=%d\n", |
1282 | pstats->cerr, pstats->rcvcco); | 1254 | pstats->cerr, pstats->rcvcco); |
1283 | DEBUG(2, " rntpco=%-7d mpco=%d\n", | 1255 | pr_debug(" rntpco=%-7d mpco=%d\n", |
1284 | pstats->rntpco, pstats->mpco); | 1256 | pstats->rntpco, pstats->mpco); |
1285 | 1257 | ||
1286 | /* MACE_MPC */ | 1258 | /* MACE_MPC */ |
1287 | DEBUG(2, " mpc=%d\n", pstats->mpc); | 1259 | pr_debug(" mpc=%d\n", pstats->mpc); |
1288 | 1260 | ||
1289 | /* MACE_RNTPC */ | 1261 | /* MACE_RNTPC */ |
1290 | DEBUG(2, " rntpc=%d\n", pstats->rntpc); | 1262 | pr_debug(" rntpc=%d\n", pstats->rntpc); |
1291 | 1263 | ||
1292 | /* MACE_RCVCC */ | 1264 | /* MACE_RCVCC */ |
1293 | DEBUG(2, " rcvcc=%d\n", pstats->rcvcc); | 1265 | pr_debug(" rcvcc=%d\n", pstats->rcvcc); |
1294 | 1266 | ||
1295 | } /* pr_mace_stats */ | 1267 | } /* pr_mace_stats */ |
1296 | 1268 | ||
@@ -1359,7 +1331,7 @@ static struct net_device_stats *mace_get_stats(struct net_device *dev) | |||
1359 | 1331 | ||
1360 | update_stats(dev->base_addr, dev); | 1332 | update_stats(dev->base_addr, dev); |
1361 | 1333 | ||
1362 | DEBUG(1, "%s: updating the statistics.\n", dev->name); | 1334 | pr_debug("%s: updating the statistics.\n", dev->name); |
1363 | pr_linux_stats(&lp->linux_stats); | 1335 | pr_linux_stats(&lp->linux_stats); |
1364 | pr_mace_stats(&lp->mace_stats); | 1336 | pr_mace_stats(&lp->mace_stats); |
1365 | 1337 | ||
@@ -1426,7 +1398,7 @@ static void BuildLAF(int *ladrf, int *adr) | |||
1426 | ladrf[byte] |= (1 << (hashcode & 7)); | 1398 | ladrf[byte] |= (1 << (hashcode & 7)); |
1427 | 1399 | ||
1428 | #ifdef PCMCIA_DEBUG | 1400 | #ifdef PCMCIA_DEBUG |
1429 | if (pc_debug > 2) | 1401 | if (0) |
1430 | printk(KERN_DEBUG " adr =%pM\n", adr); | 1402 | printk(KERN_DEBUG " adr =%pM\n", adr); |
1431 | printk(KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63] =", hashcode); | 1403 | printk(KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63] =", hashcode); |
1432 | for (i = 0; i < 8; i++) | 1404 | for (i = 0; i < 8; i++) |
@@ -1453,12 +1425,12 @@ static void restore_multicast_list(struct net_device *dev) | |||
1453 | unsigned int ioaddr = dev->base_addr; | 1425 | unsigned int ioaddr = dev->base_addr; |
1454 | int i; | 1426 | int i; |
1455 | 1427 | ||
1456 | DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", | 1428 | pr_debug("%s: restoring Rx mode to %d addresses.\n", |
1457 | dev->name, num_addrs); | 1429 | dev->name, num_addrs); |
1458 | 1430 | ||
1459 | if (num_addrs > 0) { | 1431 | if (num_addrs > 0) { |
1460 | 1432 | ||
1461 | DEBUG(1, "Attempt to restore multicast list detected.\n"); | 1433 | pr_debug("Attempt to restore multicast list detected.\n"); |
1462 | 1434 | ||
1463 | mace_write(lp, ioaddr, MACE_IAC, MACE_IAC_ADDRCHG | MACE_IAC_LOGADDR); | 1435 | mace_write(lp, ioaddr, MACE_IAC, MACE_IAC_ADDRCHG | MACE_IAC_LOGADDR); |
1464 | /* Poll ADDRCHG bit */ | 1436 | /* Poll ADDRCHG bit */ |
@@ -1510,11 +1482,11 @@ static void set_multicast_list(struct net_device *dev) | |||
1510 | struct dev_mc_list *dmi = dev->mc_list; | 1482 | struct dev_mc_list *dmi = dev->mc_list; |
1511 | 1483 | ||
1512 | #ifdef PCMCIA_DEBUG | 1484 | #ifdef PCMCIA_DEBUG |
1513 | if (pc_debug > 1) { | 1485 | { |
1514 | static int old; | 1486 | static int old; |
1515 | if (dev->mc_count != old) { | 1487 | if (dev->mc_count != old) { |
1516 | old = dev->mc_count; | 1488 | old = dev->mc_count; |
1517 | DEBUG(0, "%s: setting Rx mode to %d addresses.\n", | 1489 | pr_debug("%s: setting Rx mode to %d addresses.\n", |
1518 | dev->name, old); | 1490 | dev->name, old); |
1519 | } | 1491 | } |
1520 | } | 1492 | } |
@@ -1545,7 +1517,7 @@ static void restore_multicast_list(struct net_device *dev) | |||
1545 | unsigned int ioaddr = dev->base_addr; | 1517 | unsigned int ioaddr = dev->base_addr; |
1546 | mace_private *lp = netdev_priv(dev); | 1518 | mace_private *lp = netdev_priv(dev); |
1547 | 1519 | ||
1548 | DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name, | 1520 | pr_debug("%s: restoring Rx mode to %d addresses.\n", dev->name, |
1549 | lp->multicast_num_addrs); | 1521 | lp->multicast_num_addrs); |
1550 | 1522 | ||
1551 | if (dev->flags & IFF_PROMISC) { | 1523 | if (dev->flags & IFF_PROMISC) { |
@@ -1566,11 +1538,11 @@ static void set_multicast_list(struct net_device *dev) | |||
1566 | mace_private *lp = netdev_priv(dev); | 1538 | mace_private *lp = netdev_priv(dev); |
1567 | 1539 | ||
1568 | #ifdef PCMCIA_DEBUG | 1540 | #ifdef PCMCIA_DEBUG |
1569 | if (pc_debug > 1) { | 1541 | { |
1570 | static int old; | 1542 | static int old; |
1571 | if (dev->mc_count != old) { | 1543 | if (dev->mc_count != old) { |
1572 | old = dev->mc_count; | 1544 | old = dev->mc_count; |
1573 | DEBUG(0, "%s: setting Rx mode to %d addresses.\n", | 1545 | pr_debug("%s: setting Rx mode to %d addresses.\n", |
1574 | dev->name, old); | 1546 | dev->name, old); |
1575 | } | 1547 | } |
1576 | } | 1548 | } |