diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-05-15 06:22:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-18 00:03:47 -0400 |
commit | ebc06eeb7260ecad3bd69202ba6291138691d27b (patch) | |
tree | 211836282f4415428cc033ef5b39588dfa433253 /drivers/net/skfp | |
parent | c7b1f4f376867356ca001c6a81988cf41fa4dc43 (diff) |
skfddi: convert PRINTK() to pr_debug()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skfp')
-rw-r--r-- | drivers/net/skfp/skfddi.c | 156 |
1 files changed, 75 insertions, 81 deletions
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index e14aec0a7333..19d343c42a21 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -159,12 +159,6 @@ MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>"); | |||
159 | 159 | ||
160 | static int num_boards; /* total number of adapters configured */ | 160 | static int num_boards; /* total number of adapters configured */ |
161 | 161 | ||
162 | #ifdef DRIVERDEBUG | ||
163 | #define PRINTK(s, args...) printk(s, ## args) | ||
164 | #else | ||
165 | #define PRINTK(s, args...) | ||
166 | #endif // DRIVERDEBUG | ||
167 | |||
168 | static const struct net_device_ops skfp_netdev_ops = { | 162 | static const struct net_device_ops skfp_netdev_ops = { |
169 | .ndo_open = skfp_open, | 163 | .ndo_open = skfp_open, |
170 | .ndo_stop = skfp_close, | 164 | .ndo_stop = skfp_close, |
@@ -213,7 +207,7 @@ static int skfp_init_one(struct pci_dev *pdev, | |||
213 | void __iomem *mem; | 207 | void __iomem *mem; |
214 | int err; | 208 | int err; |
215 | 209 | ||
216 | PRINTK(KERN_INFO "entering skfp_init_one\n"); | 210 | pr_debug(KERN_INFO "entering skfp_init_one\n"); |
217 | 211 | ||
218 | if (num_boards == 0) | 212 | if (num_boards == 0) |
219 | printk("%s\n", boot_msg); | 213 | printk("%s\n", boot_msg); |
@@ -389,7 +383,7 @@ static int skfp_driver_init(struct net_device *dev) | |||
389 | skfddi_priv *bp = &smc->os; | 383 | skfddi_priv *bp = &smc->os; |
390 | int err = -EIO; | 384 | int err = -EIO; |
391 | 385 | ||
392 | PRINTK(KERN_INFO "entering skfp_driver_init\n"); | 386 | pr_debug(KERN_INFO "entering skfp_driver_init\n"); |
393 | 387 | ||
394 | // set the io address in private structures | 388 | // set the io address in private structures |
395 | bp->base_addr = dev->base_addr; | 389 | bp->base_addr = dev->base_addr; |
@@ -409,7 +403,7 @@ static int skfp_driver_init(struct net_device *dev) | |||
409 | 403 | ||
410 | // Determine the required size of the 'shared' memory area. | 404 | // Determine the required size of the 'shared' memory area. |
411 | bp->SharedMemSize = mac_drv_check_space(); | 405 | bp->SharedMemSize = mac_drv_check_space(); |
412 | PRINTK(KERN_INFO "Memory for HWM: %ld\n", bp->SharedMemSize); | 406 | pr_debug(KERN_INFO "Memory for HWM: %ld\n", bp->SharedMemSize); |
413 | if (bp->SharedMemSize > 0) { | 407 | if (bp->SharedMemSize > 0) { |
414 | bp->SharedMemSize += 16; // for descriptor alignment | 408 | bp->SharedMemSize += 16; // for descriptor alignment |
415 | 409 | ||
@@ -433,13 +427,13 @@ static int skfp_driver_init(struct net_device *dev) | |||
433 | 427 | ||
434 | card_stop(smc); // Reset adapter. | 428 | card_stop(smc); // Reset adapter. |
435 | 429 | ||
436 | PRINTK(KERN_INFO "mac_drv_init()..\n"); | 430 | pr_debug(KERN_INFO "mac_drv_init()..\n"); |
437 | if (mac_drv_init(smc) != 0) { | 431 | if (mac_drv_init(smc) != 0) { |
438 | PRINTK(KERN_INFO "mac_drv_init() failed.\n"); | 432 | pr_debug(KERN_INFO "mac_drv_init() failed.\n"); |
439 | goto fail; | 433 | goto fail; |
440 | } | 434 | } |
441 | read_address(smc, NULL); | 435 | read_address(smc, NULL); |
442 | PRINTK(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", | 436 | pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", |
443 | smc->hw.fddi_canon_addr.a[0], | 437 | smc->hw.fddi_canon_addr.a[0], |
444 | smc->hw.fddi_canon_addr.a[1], | 438 | smc->hw.fddi_canon_addr.a[1], |
445 | smc->hw.fddi_canon_addr.a[2], | 439 | smc->hw.fddi_canon_addr.a[2], |
@@ -495,7 +489,7 @@ static int skfp_open(struct net_device *dev) | |||
495 | struct s_smc *smc = netdev_priv(dev); | 489 | struct s_smc *smc = netdev_priv(dev); |
496 | int err; | 490 | int err; |
497 | 491 | ||
498 | PRINTK(KERN_INFO "entering skfp_open\n"); | 492 | pr_debug(KERN_INFO "entering skfp_open\n"); |
499 | /* Register IRQ - support shared interrupts by passing device ptr */ | 493 | /* Register IRQ - support shared interrupts by passing device ptr */ |
500 | err = request_irq(dev->irq, skfp_interrupt, IRQF_SHARED, | 494 | err = request_irq(dev->irq, skfp_interrupt, IRQF_SHARED, |
501 | dev->name, dev); | 495 | dev->name, dev); |
@@ -868,12 +862,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | |||
868 | /* Enable promiscuous mode, if necessary */ | 862 | /* Enable promiscuous mode, if necessary */ |
869 | if (dev->flags & IFF_PROMISC) { | 863 | if (dev->flags & IFF_PROMISC) { |
870 | mac_drv_rx_mode(smc, RX_ENABLE_PROMISC); | 864 | mac_drv_rx_mode(smc, RX_ENABLE_PROMISC); |
871 | PRINTK(KERN_INFO "PROMISCUOUS MODE ENABLED\n"); | 865 | pr_debug(KERN_INFO "PROMISCUOUS MODE ENABLED\n"); |
872 | } | 866 | } |
873 | /* Else, update multicast address table */ | 867 | /* Else, update multicast address table */ |
874 | else { | 868 | else { |
875 | mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); | 869 | mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); |
876 | PRINTK(KERN_INFO "PROMISCUOUS MODE DISABLED\n"); | 870 | pr_debug(KERN_INFO "PROMISCUOUS MODE DISABLED\n"); |
877 | 871 | ||
878 | // Reset all MC addresses | 872 | // Reset all MC addresses |
879 | mac_clear_multicast(smc); | 873 | mac_clear_multicast(smc); |
@@ -881,7 +875,7 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | |||
881 | 875 | ||
882 | if (dev->flags & IFF_ALLMULTI) { | 876 | if (dev->flags & IFF_ALLMULTI) { |
883 | mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); | 877 | mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); |
884 | PRINTK(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); | 878 | pr_debug(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); |
885 | } else if (dev->mc_count > 0) { | 879 | } else if (dev->mc_count > 0) { |
886 | if (dev->mc_count <= FPMAX_MULTICAST) { | 880 | if (dev->mc_count <= FPMAX_MULTICAST) { |
887 | /* use exact filtering */ | 881 | /* use exact filtering */ |
@@ -894,12 +888,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | |||
894 | (struct fddi_addr *)dmi->dmi_addr, | 888 | (struct fddi_addr *)dmi->dmi_addr, |
895 | 1); | 889 | 1); |
896 | 890 | ||
897 | PRINTK(KERN_INFO "ENABLE MC ADDRESS:"); | 891 | pr_debug(KERN_INFO "ENABLE MC ADDRESS:"); |
898 | PRINTK(" %02x %02x %02x ", | 892 | pr_debug(" %02x %02x %02x ", |
899 | dmi->dmi_addr[0], | 893 | dmi->dmi_addr[0], |
900 | dmi->dmi_addr[1], | 894 | dmi->dmi_addr[1], |
901 | dmi->dmi_addr[2]); | 895 | dmi->dmi_addr[2]); |
902 | PRINTK("%02x %02x %02x\n", | 896 | pr_debug("%02x %02x %02x\n", |
903 | dmi->dmi_addr[3], | 897 | dmi->dmi_addr[3], |
904 | dmi->dmi_addr[4], | 898 | dmi->dmi_addr[4], |
905 | dmi->dmi_addr[5]); | 899 | dmi->dmi_addr[5]); |
@@ -909,11 +903,11 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | |||
909 | } else { // more MC addresses than HW supports | 903 | } else { // more MC addresses than HW supports |
910 | 904 | ||
911 | mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); | 905 | mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); |
912 | PRINTK(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); | 906 | pr_debug(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); |
913 | } | 907 | } |
914 | } else { // no MC addresses | 908 | } else { // no MC addresses |
915 | 909 | ||
916 | PRINTK(KERN_INFO "DISABLE ALL MC ADDRESSES\n"); | 910 | pr_debug(KERN_INFO "DISABLE ALL MC ADDRESSES\n"); |
917 | } | 911 | } |
918 | 912 | ||
919 | /* Update adapter filters */ | 913 | /* Update adapter filters */ |
@@ -1067,7 +1061,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1067 | struct s_smc *smc = netdev_priv(dev); | 1061 | struct s_smc *smc = netdev_priv(dev); |
1068 | skfddi_priv *bp = &smc->os; | 1062 | skfddi_priv *bp = &smc->os; |
1069 | 1063 | ||
1070 | PRINTK(KERN_INFO "skfp_send_pkt\n"); | 1064 | pr_debug(KERN_INFO "skfp_send_pkt\n"); |
1071 | 1065 | ||
1072 | /* | 1066 | /* |
1073 | * Verify that incoming transmit request is OK | 1067 | * Verify that incoming transmit request is OK |
@@ -1137,13 +1131,13 @@ static void send_queued_packets(struct s_smc *smc) | |||
1137 | 1131 | ||
1138 | int frame_status; // HWM tx frame status. | 1132 | int frame_status; // HWM tx frame status. |
1139 | 1133 | ||
1140 | PRINTK(KERN_INFO "send queued packets\n"); | 1134 | pr_debug(KERN_INFO "send queued packets\n"); |
1141 | for (;;) { | 1135 | for (;;) { |
1142 | // send first buffer from queue | 1136 | // send first buffer from queue |
1143 | skb = skb_dequeue(&bp->SendSkbQueue); | 1137 | skb = skb_dequeue(&bp->SendSkbQueue); |
1144 | 1138 | ||
1145 | if (!skb) { | 1139 | if (!skb) { |
1146 | PRINTK(KERN_INFO "queue empty\n"); | 1140 | pr_debug(KERN_INFO "queue empty\n"); |
1147 | return; | 1141 | return; |
1148 | } // queue empty ! | 1142 | } // queue empty ! |
1149 | 1143 | ||
@@ -1174,11 +1168,11 @@ static void send_queued_packets(struct s_smc *smc) | |||
1174 | 1168 | ||
1175 | if ((frame_status & RING_DOWN) != 0) { | 1169 | if ((frame_status & RING_DOWN) != 0) { |
1176 | // Ring is down. | 1170 | // Ring is down. |
1177 | PRINTK("Tx attempt while ring down.\n"); | 1171 | pr_debug("Tx attempt while ring down.\n"); |
1178 | } else if ((frame_status & OUT_OF_TXD) != 0) { | 1172 | } else if ((frame_status & OUT_OF_TXD) != 0) { |
1179 | PRINTK("%s: out of TXDs.\n", bp->dev->name); | 1173 | pr_debug("%s: out of TXDs.\n", bp->dev->name); |
1180 | } else { | 1174 | } else { |
1181 | PRINTK("%s: out of transmit resources", | 1175 | pr_debug("%s: out of transmit resources", |
1182 | bp->dev->name); | 1176 | bp->dev->name); |
1183 | } | 1177 | } |
1184 | 1178 | ||
@@ -1255,7 +1249,7 @@ static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr) | |||
1255 | static void ResetAdapter(struct s_smc *smc) | 1249 | static void ResetAdapter(struct s_smc *smc) |
1256 | { | 1250 | { |
1257 | 1251 | ||
1258 | PRINTK(KERN_INFO "[fddi: ResetAdapter]\n"); | 1252 | pr_debug(KERN_INFO "[fddi: ResetAdapter]\n"); |
1259 | 1253 | ||
1260 | // Stop the adapter. | 1254 | // Stop the adapter. |
1261 | 1255 | ||
@@ -1301,7 +1295,7 @@ void llc_restart_tx(struct s_smc *smc) | |||
1301 | { | 1295 | { |
1302 | skfddi_priv *bp = &smc->os; | 1296 | skfddi_priv *bp = &smc->os; |
1303 | 1297 | ||
1304 | PRINTK(KERN_INFO "[llc_restart_tx]\n"); | 1298 | pr_debug(KERN_INFO "[llc_restart_tx]\n"); |
1305 | 1299 | ||
1306 | // Try to send queued packets | 1300 | // Try to send queued packets |
1307 | spin_unlock(&bp->DriverLock); | 1301 | spin_unlock(&bp->DriverLock); |
@@ -1331,7 +1325,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size) | |||
1331 | { | 1325 | { |
1332 | void *virt; | 1326 | void *virt; |
1333 | 1327 | ||
1334 | PRINTK(KERN_INFO "mac_drv_get_space (%d bytes), ", size); | 1328 | pr_debug(KERN_INFO "mac_drv_get_space (%d bytes), ", size); |
1335 | virt = (void *) (smc->os.SharedMemAddr + smc->os.SharedMemHeap); | 1329 | virt = (void *) (smc->os.SharedMemAddr + smc->os.SharedMemHeap); |
1336 | 1330 | ||
1337 | if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { | 1331 | if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { |
@@ -1340,9 +1334,9 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size) | |||
1340 | } | 1334 | } |
1341 | smc->os.SharedMemHeap += size; // Move heap pointer. | 1335 | smc->os.SharedMemHeap += size; // Move heap pointer. |
1342 | 1336 | ||
1343 | PRINTK(KERN_INFO "mac_drv_get_space end\n"); | 1337 | pr_debug(KERN_INFO "mac_drv_get_space end\n"); |
1344 | PRINTK(KERN_INFO "virt addr: %lx\n", (ulong) virt); | 1338 | pr_debug(KERN_INFO "virt addr: %lx\n", (ulong) virt); |
1345 | PRINTK(KERN_INFO "bus addr: %lx\n", (ulong) | 1339 | pr_debug(KERN_INFO "bus addr: %lx\n", (ulong) |
1346 | (smc->os.SharedMemDMA + | 1340 | (smc->os.SharedMemDMA + |
1347 | ((char *) virt - (char *)smc->os.SharedMemAddr))); | 1341 | ((char *) virt - (char *)smc->os.SharedMemAddr))); |
1348 | return (virt); | 1342 | return (virt); |
@@ -1372,7 +1366,7 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) | |||
1372 | 1366 | ||
1373 | char *virt; | 1367 | char *virt; |
1374 | 1368 | ||
1375 | PRINTK(KERN_INFO "mac_drv_get_desc_mem\n"); | 1369 | pr_debug(KERN_INFO "mac_drv_get_desc_mem\n"); |
1376 | 1370 | ||
1377 | // Descriptor memory must be aligned on 16-byte boundary. | 1371 | // Descriptor memory must be aligned on 16-byte boundary. |
1378 | 1372 | ||
@@ -1381,8 +1375,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) | |||
1381 | size = (u_int) (16 - (((unsigned long) virt) & 15UL)); | 1375 | size = (u_int) (16 - (((unsigned long) virt) & 15UL)); |
1382 | size = size % 16; | 1376 | size = size % 16; |
1383 | 1377 | ||
1384 | PRINTK("Allocate %u bytes alignment gap ", size); | 1378 | pr_debug("Allocate %u bytes alignment gap ", size); |
1385 | PRINTK("for descriptor memory.\n"); | 1379 | pr_debug("for descriptor memory.\n"); |
1386 | 1380 | ||
1387 | if (!mac_drv_get_space(smc, size)) { | 1381 | if (!mac_drv_get_space(smc, size)) { |
1388 | printk("fddi: Unable to align descriptor memory.\n"); | 1382 | printk("fddi: Unable to align descriptor memory.\n"); |
@@ -1516,11 +1510,11 @@ void mac_drv_tx_complete(struct s_smc *smc, volatile struct s_smt_fp_txd *txd) | |||
1516 | { | 1510 | { |
1517 | struct sk_buff *skb; | 1511 | struct sk_buff *skb; |
1518 | 1512 | ||
1519 | PRINTK(KERN_INFO "entering mac_drv_tx_complete\n"); | 1513 | pr_debug(KERN_INFO "entering mac_drv_tx_complete\n"); |
1520 | // Check if this TxD points to a skb | 1514 | // Check if this TxD points to a skb |
1521 | 1515 | ||
1522 | if (!(skb = txd->txd_os.skb)) { | 1516 | if (!(skb = txd->txd_os.skb)) { |
1523 | PRINTK("TXD with no skb assigned.\n"); | 1517 | pr_debug("TXD with no skb assigned.\n"); |
1524 | return; | 1518 | return; |
1525 | } | 1519 | } |
1526 | txd->txd_os.skb = NULL; | 1520 | txd->txd_os.skb = NULL; |
@@ -1536,7 +1530,7 @@ void mac_drv_tx_complete(struct s_smc *smc, volatile struct s_smt_fp_txd *txd) | |||
1536 | // free the skb | 1530 | // free the skb |
1537 | dev_kfree_skb_irq(skb); | 1531 | dev_kfree_skb_irq(skb); |
1538 | 1532 | ||
1539 | PRINTK(KERN_INFO "leaving mac_drv_tx_complete\n"); | 1533 | pr_debug(KERN_INFO "leaving mac_drv_tx_complete\n"); |
1540 | } // mac_drv_tx_complete | 1534 | } // mac_drv_tx_complete |
1541 | 1535 | ||
1542 | 1536 | ||
@@ -1603,7 +1597,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1603 | unsigned short ri; | 1597 | unsigned short ri; |
1604 | u_int RifLength; | 1598 | u_int RifLength; |
1605 | 1599 | ||
1606 | PRINTK(KERN_INFO "entering mac_drv_rx_complete (len=%d)\n", len); | 1600 | pr_debug(KERN_INFO "entering mac_drv_rx_complete (len=%d)\n", len); |
1607 | if (frag_count != 1) { // This is not allowed to happen. | 1601 | if (frag_count != 1) { // This is not allowed to happen. |
1608 | 1602 | ||
1609 | printk("fddi: Multi-fragment receive!\n"); | 1603 | printk("fddi: Multi-fragment receive!\n"); |
@@ -1612,7 +1606,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1612 | } | 1606 | } |
1613 | skb = rxd->rxd_os.skb; | 1607 | skb = rxd->rxd_os.skb; |
1614 | if (!skb) { | 1608 | if (!skb) { |
1615 | PRINTK(KERN_INFO "No skb in rxd\n"); | 1609 | pr_debug(KERN_INFO "No skb in rxd\n"); |
1616 | smc->os.MacStat.gen.rx_errors++; | 1610 | smc->os.MacStat.gen.rx_errors++; |
1617 | goto RequeueRxd; | 1611 | goto RequeueRxd; |
1618 | } | 1612 | } |
@@ -1642,7 +1636,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1642 | else { | 1636 | else { |
1643 | int n; | 1637 | int n; |
1644 | // goos: RIF removal has still to be tested | 1638 | // goos: RIF removal has still to be tested |
1645 | PRINTK(KERN_INFO "RIF found\n"); | 1639 | pr_debug(KERN_INFO "RIF found\n"); |
1646 | // Get RIF length from Routing Control (RC) field. | 1640 | // Get RIF length from Routing Control (RC) field. |
1647 | cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header. | 1641 | cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header. |
1648 | 1642 | ||
@@ -1687,7 +1681,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1687 | return; | 1681 | return; |
1688 | 1682 | ||
1689 | RequeueRxd: | 1683 | RequeueRxd: |
1690 | PRINTK(KERN_INFO "Rx: re-queue RXD.\n"); | 1684 | pr_debug(KERN_INFO "Rx: re-queue RXD.\n"); |
1691 | mac_drv_requeue_rxd(smc, rxd, frag_count); | 1685 | mac_drv_requeue_rxd(smc, rxd, frag_count); |
1692 | smc->os.MacStat.gen.rx_errors++; // Count receive packets | 1686 | smc->os.MacStat.gen.rx_errors++; // Count receive packets |
1693 | // not indicated. | 1687 | // not indicated. |
@@ -1736,7 +1730,7 @@ void mac_drv_requeue_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1736 | skb = src_rxd->rxd_os.skb; | 1730 | skb = src_rxd->rxd_os.skb; |
1737 | if (skb == NULL) { // this should not happen | 1731 | if (skb == NULL) { // this should not happen |
1738 | 1732 | ||
1739 | PRINTK("Requeue with no skb in rxd!\n"); | 1733 | pr_debug("Requeue with no skb in rxd!\n"); |
1740 | skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); | 1734 | skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); |
1741 | if (skb) { | 1735 | if (skb) { |
1742 | // we got a skb | 1736 | // we got a skb |
@@ -1751,7 +1745,7 @@ void mac_drv_requeue_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1751 | rxd->rxd_os.dma_addr = b_addr; | 1745 | rxd->rxd_os.dma_addr = b_addr; |
1752 | } else { | 1746 | } else { |
1753 | // no skb available, use local buffer | 1747 | // no skb available, use local buffer |
1754 | PRINTK("Queueing invalid buffer!\n"); | 1748 | pr_debug("Queueing invalid buffer!\n"); |
1755 | rxd->rxd_os.skb = NULL; | 1749 | rxd->rxd_os.skb = NULL; |
1756 | v_addr = smc->os.LocalRxBuffer; | 1750 | v_addr = smc->os.LocalRxBuffer; |
1757 | b_addr = smc->os.LocalRxBufferDMA; | 1751 | b_addr = smc->os.LocalRxBufferDMA; |
@@ -1798,7 +1792,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) | |||
1798 | struct sk_buff *skb; | 1792 | struct sk_buff *skb; |
1799 | volatile struct s_smt_fp_rxd *rxd; | 1793 | volatile struct s_smt_fp_rxd *rxd; |
1800 | 1794 | ||
1801 | PRINTK(KERN_INFO "entering mac_drv_fill_rxd\n"); | 1795 | pr_debug(KERN_INFO "entering mac_drv_fill_rxd\n"); |
1802 | 1796 | ||
1803 | // Walk through the list of free receive buffers, passing receive | 1797 | // Walk through the list of free receive buffers, passing receive |
1804 | // buffers to the HWM as long as RXDs are available. | 1798 | // buffers to the HWM as long as RXDs are available. |
@@ -1806,7 +1800,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) | |||
1806 | MaxFrameSize = smc->os.MaxFrameSize; | 1800 | MaxFrameSize = smc->os.MaxFrameSize; |
1807 | // Check if there is any RXD left. | 1801 | // Check if there is any RXD left. |
1808 | while (HWM_GET_RX_FREE(smc) > 0) { | 1802 | while (HWM_GET_RX_FREE(smc) > 0) { |
1809 | PRINTK(KERN_INFO ".\n"); | 1803 | pr_debug(KERN_INFO ".\n"); |
1810 | 1804 | ||
1811 | rxd = HWM_GET_CURR_RXD(smc); | 1805 | rxd = HWM_GET_CURR_RXD(smc); |
1812 | skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); | 1806 | skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); |
@@ -1826,7 +1820,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) | |||
1826 | // keep the receiver running in hope of better times. | 1820 | // keep the receiver running in hope of better times. |
1827 | // Multiple descriptors may point to this local buffer, | 1821 | // Multiple descriptors may point to this local buffer, |
1828 | // so data in it must be considered invalid. | 1822 | // so data in it must be considered invalid. |
1829 | PRINTK("Queueing invalid buffer!\n"); | 1823 | pr_debug("Queueing invalid buffer!\n"); |
1830 | v_addr = smc->os.LocalRxBuffer; | 1824 | v_addr = smc->os.LocalRxBuffer; |
1831 | b_addr = smc->os.LocalRxBufferDMA; | 1825 | b_addr = smc->os.LocalRxBufferDMA; |
1832 | } | 1826 | } |
@@ -1837,7 +1831,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) | |||
1837 | hwm_rx_frag(smc, v_addr, b_addr, MaxFrameSize, | 1831 | hwm_rx_frag(smc, v_addr, b_addr, MaxFrameSize, |
1838 | FIRST_FRAG | LAST_FRAG); | 1832 | FIRST_FRAG | LAST_FRAG); |
1839 | } | 1833 | } |
1840 | PRINTK(KERN_INFO "leaving mac_drv_fill_rxd\n"); | 1834 | pr_debug(KERN_INFO "leaving mac_drv_fill_rxd\n"); |
1841 | } // mac_drv_fill_rxd | 1835 | } // mac_drv_fill_rxd |
1842 | 1836 | ||
1843 | 1837 | ||
@@ -1863,7 +1857,7 @@ void mac_drv_clear_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, | |||
1863 | 1857 | ||
1864 | struct sk_buff *skb; | 1858 | struct sk_buff *skb; |
1865 | 1859 | ||
1866 | PRINTK("entering mac_drv_clear_rxd\n"); | 1860 | pr_debug("entering mac_drv_clear_rxd\n"); |
1867 | 1861 | ||
1868 | if (frag_count != 1) // This is not allowed to happen. | 1862 | if (frag_count != 1) // This is not allowed to happen. |
1869 | 1863 | ||
@@ -1919,19 +1913,19 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, | |||
1919 | { | 1913 | { |
1920 | struct sk_buff *skb; | 1914 | struct sk_buff *skb; |
1921 | 1915 | ||
1922 | PRINTK("entering mac_drv_rx_init(len=%d)\n", len); | 1916 | pr_debug("entering mac_drv_rx_init(len=%d)\n", len); |
1923 | 1917 | ||
1924 | // "Received" a SMT or NSA frame of the local SMT. | 1918 | // "Received" a SMT or NSA frame of the local SMT. |
1925 | 1919 | ||
1926 | if (len != la_len || len < FDDI_MAC_HDR_LEN || !look_ahead) { | 1920 | if (len != la_len || len < FDDI_MAC_HDR_LEN || !look_ahead) { |
1927 | PRINTK("fddi: Discard invalid local SMT frame\n"); | 1921 | pr_debug("fddi: Discard invalid local SMT frame\n"); |
1928 | PRINTK(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", | 1922 | pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", |
1929 | len, la_len, (unsigned long) look_ahead); | 1923 | len, la_len, (unsigned long) look_ahead); |
1930 | return (0); | 1924 | return (0); |
1931 | } | 1925 | } |
1932 | skb = alloc_skb(len + 3, GFP_ATOMIC); | 1926 | skb = alloc_skb(len + 3, GFP_ATOMIC); |
1933 | if (!skb) { | 1927 | if (!skb) { |
1934 | PRINTK("fddi: Local SMT: skb memory exhausted.\n"); | 1928 | pr_debug("fddi: Local SMT: skb memory exhausted.\n"); |
1935 | return (0); | 1929 | return (0); |
1936 | } | 1930 | } |
1937 | skb_reserve(skb, 3); | 1931 | skb_reserve(skb, 3); |
@@ -1981,40 +1975,40 @@ void smt_timer_poll(struct s_smc *smc) | |||
1981 | ************************/ | 1975 | ************************/ |
1982 | void ring_status_indication(struct s_smc *smc, u_long status) | 1976 | void ring_status_indication(struct s_smc *smc, u_long status) |
1983 | { | 1977 | { |
1984 | PRINTK("ring_status_indication( "); | 1978 | pr_debug("ring_status_indication( "); |
1985 | if (status & RS_RES15) | 1979 | if (status & RS_RES15) |
1986 | PRINTK("RS_RES15 "); | 1980 | pr_debug("RS_RES15 "); |
1987 | if (status & RS_HARDERROR) | 1981 | if (status & RS_HARDERROR) |
1988 | PRINTK("RS_HARDERROR "); | 1982 | pr_debug("RS_HARDERROR "); |
1989 | if (status & RS_SOFTERROR) | 1983 | if (status & RS_SOFTERROR) |
1990 | PRINTK("RS_SOFTERROR "); | 1984 | pr_debug("RS_SOFTERROR "); |
1991 | if (status & RS_BEACON) | 1985 | if (status & RS_BEACON) |
1992 | PRINTK("RS_BEACON "); | 1986 | pr_debug("RS_BEACON "); |
1993 | if (status & RS_PATHTEST) | 1987 | if (status & RS_PATHTEST) |
1994 | PRINTK("RS_PATHTEST "); | 1988 | pr_debug("RS_PATHTEST "); |
1995 | if (status & RS_SELFTEST) | 1989 | if (status & RS_SELFTEST) |
1996 | PRINTK("RS_SELFTEST "); | 1990 | pr_debug("RS_SELFTEST "); |
1997 | if (status & RS_RES9) | 1991 | if (status & RS_RES9) |
1998 | PRINTK("RS_RES9 "); | 1992 | pr_debug("RS_RES9 "); |
1999 | if (status & RS_DISCONNECT) | 1993 | if (status & RS_DISCONNECT) |
2000 | PRINTK("RS_DISCONNECT "); | 1994 | pr_debug("RS_DISCONNECT "); |
2001 | if (status & RS_RES7) | 1995 | if (status & RS_RES7) |
2002 | PRINTK("RS_RES7 "); | 1996 | pr_debug("RS_RES7 "); |
2003 | if (status & RS_DUPADDR) | 1997 | if (status & RS_DUPADDR) |
2004 | PRINTK("RS_DUPADDR "); | 1998 | pr_debug("RS_DUPADDR "); |
2005 | if (status & RS_NORINGOP) | 1999 | if (status & RS_NORINGOP) |
2006 | PRINTK("RS_NORINGOP "); | 2000 | pr_debug("RS_NORINGOP "); |
2007 | if (status & RS_VERSION) | 2001 | if (status & RS_VERSION) |
2008 | PRINTK("RS_VERSION "); | 2002 | pr_debug("RS_VERSION "); |
2009 | if (status & RS_STUCKBYPASSS) | 2003 | if (status & RS_STUCKBYPASSS) |
2010 | PRINTK("RS_STUCKBYPASSS "); | 2004 | pr_debug("RS_STUCKBYPASSS "); |
2011 | if (status & RS_EVENT) | 2005 | if (status & RS_EVENT) |
2012 | PRINTK("RS_EVENT "); | 2006 | pr_debug("RS_EVENT "); |
2013 | if (status & RS_RINGOPCHANGE) | 2007 | if (status & RS_RINGOPCHANGE) |
2014 | PRINTK("RS_RINGOPCHANGE "); | 2008 | pr_debug("RS_RINGOPCHANGE "); |
2015 | if (status & RS_RES0) | 2009 | if (status & RS_RES0) |
2016 | PRINTK("RS_RES0 "); | 2010 | pr_debug("RS_RES0 "); |
2017 | PRINTK("]\n"); | 2011 | pr_debug("]\n"); |
2018 | } // ring_status_indication | 2012 | } // ring_status_indication |
2019 | 2013 | ||
2020 | 2014 | ||
@@ -2057,17 +2051,17 @@ void smt_stat_counter(struct s_smc *smc, int stat) | |||
2057 | { | 2051 | { |
2058 | // BOOLEAN RingIsUp ; | 2052 | // BOOLEAN RingIsUp ; |
2059 | 2053 | ||
2060 | PRINTK(KERN_INFO "smt_stat_counter\n"); | 2054 | pr_debug(KERN_INFO "smt_stat_counter\n"); |
2061 | switch (stat) { | 2055 | switch (stat) { |
2062 | case 0: | 2056 | case 0: |
2063 | PRINTK(KERN_INFO "Ring operational change.\n"); | 2057 | pr_debug(KERN_INFO "Ring operational change.\n"); |
2064 | break; | 2058 | break; |
2065 | case 1: | 2059 | case 1: |
2066 | PRINTK(KERN_INFO "Receive fifo overflow.\n"); | 2060 | pr_debug(KERN_INFO "Receive fifo overflow.\n"); |
2067 | smc->os.MacStat.gen.rx_errors++; | 2061 | smc->os.MacStat.gen.rx_errors++; |
2068 | break; | 2062 | break; |
2069 | default: | 2063 | default: |
2070 | PRINTK(KERN_INFO "Unknown status (%d).\n", stat); | 2064 | pr_debug(KERN_INFO "Unknown status (%d).\n", stat); |
2071 | break; | 2065 | break; |
2072 | } | 2066 | } |
2073 | } // smt_stat_counter | 2067 | } // smt_stat_counter |
@@ -2123,10 +2117,10 @@ void cfm_state_change(struct s_smc *smc, int c_state) | |||
2123 | s = "SC11_C_WRAP_S"; | 2117 | s = "SC11_C_WRAP_S"; |
2124 | break; | 2118 | break; |
2125 | default: | 2119 | default: |
2126 | PRINTK(KERN_INFO "cfm_state_change: unknown %d\n", c_state); | 2120 | pr_debug(KERN_INFO "cfm_state_change: unknown %d\n", c_state); |
2127 | return; | 2121 | return; |
2128 | } | 2122 | } |
2129 | PRINTK(KERN_INFO "cfm_state_change: %s\n", s); | 2123 | pr_debug(KERN_INFO "cfm_state_change: %s\n", s); |
2130 | #endif // DRIVERDEBUG | 2124 | #endif // DRIVERDEBUG |
2131 | } // cfm_state_change | 2125 | } // cfm_state_change |
2132 | 2126 | ||
@@ -2181,7 +2175,7 @@ void ecm_state_change(struct s_smc *smc, int e_state) | |||
2181 | s = "unknown"; | 2175 | s = "unknown"; |
2182 | break; | 2176 | break; |
2183 | } | 2177 | } |
2184 | PRINTK(KERN_INFO "ecm_state_change: %s\n", s); | 2178 | pr_debug(KERN_INFO "ecm_state_change: %s\n", s); |
2185 | #endif //DRIVERDEBUG | 2179 | #endif //DRIVERDEBUG |
2186 | } // ecm_state_change | 2180 | } // ecm_state_change |
2187 | 2181 | ||
@@ -2236,7 +2230,7 @@ void rmt_state_change(struct s_smc *smc, int r_state) | |||
2236 | s = "unknown"; | 2230 | s = "unknown"; |
2237 | break; | 2231 | break; |
2238 | } | 2232 | } |
2239 | PRINTK(KERN_INFO "[rmt_state_change: %s]\n", s); | 2233 | pr_debug(KERN_INFO "[rmt_state_change: %s]\n", s); |
2240 | #endif // DRIVERDEBUG | 2234 | #endif // DRIVERDEBUG |
2241 | } // rmt_state_change | 2235 | } // rmt_state_change |
2242 | 2236 | ||
@@ -2256,7 +2250,7 @@ void rmt_state_change(struct s_smc *smc, int r_state) | |||
2256 | ************************/ | 2250 | ************************/ |
2257 | void drv_reset_indication(struct s_smc *smc) | 2251 | void drv_reset_indication(struct s_smc *smc) |
2258 | { | 2252 | { |
2259 | PRINTK(KERN_INFO "entering drv_reset_indication\n"); | 2253 | pr_debug(KERN_INFO "entering drv_reset_indication\n"); |
2260 | 2254 | ||
2261 | smc->os.ResetRequested = TRUE; // Set flag. | 2255 | smc->os.ResetRequested = TRUE; // Set flag. |
2262 | 2256 | ||