Commit ebc06eeb authored by Alexander Beregalov's avatar Alexander Beregalov Committed by David S. Miller

skfddi: convert PRINTK() to pr_debug()

Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7b1f4f3
...@@ -159,12 +159,6 @@ MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>"); ...@@ -159,12 +159,6 @@ MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>");
static int num_boards; /* total number of adapters configured */ static int num_boards; /* total number of adapters configured */
#ifdef DRIVERDEBUG
#define PRINTK(s, args...) printk(s, ## args)
#else
#define PRINTK(s, args...)
#endif // DRIVERDEBUG
static const struct net_device_ops skfp_netdev_ops = { static const struct net_device_ops skfp_netdev_ops = {
.ndo_open = skfp_open, .ndo_open = skfp_open,
.ndo_stop = skfp_close, .ndo_stop = skfp_close,
...@@ -213,7 +207,7 @@ static int skfp_init_one(struct pci_dev *pdev, ...@@ -213,7 +207,7 @@ static int skfp_init_one(struct pci_dev *pdev,
void __iomem *mem; void __iomem *mem;
int err; int err;
PRINTK(KERN_INFO "entering skfp_init_one\n"); pr_debug(KERN_INFO "entering skfp_init_one\n");
if (num_boards == 0) if (num_boards == 0)
printk("%s\n", boot_msg); printk("%s\n", boot_msg);
...@@ -389,7 +383,7 @@ static int skfp_driver_init(struct net_device *dev) ...@@ -389,7 +383,7 @@ static int skfp_driver_init(struct net_device *dev)
skfddi_priv *bp = &smc->os; skfddi_priv *bp = &smc->os;
int err = -EIO; int err = -EIO;
PRINTK(KERN_INFO "entering skfp_driver_init\n"); pr_debug(KERN_INFO "entering skfp_driver_init\n");
// set the io address in private structures // set the io address in private structures
bp->base_addr = dev->base_addr; bp->base_addr = dev->base_addr;
...@@ -409,7 +403,7 @@ static int skfp_driver_init(struct net_device *dev) ...@@ -409,7 +403,7 @@ static int skfp_driver_init(struct net_device *dev)
// Determine the required size of the 'shared' memory area. // Determine the required size of the 'shared' memory area.
bp->SharedMemSize = mac_drv_check_space(); bp->SharedMemSize = mac_drv_check_space();
PRINTK(KERN_INFO "Memory for HWM: %ld\n", bp->SharedMemSize); pr_debug(KERN_INFO "Memory for HWM: %ld\n", bp->SharedMemSize);
if (bp->SharedMemSize > 0) { if (bp->SharedMemSize > 0) {
bp->SharedMemSize += 16; // for descriptor alignment bp->SharedMemSize += 16; // for descriptor alignment
...@@ -433,13 +427,13 @@ static int skfp_driver_init(struct net_device *dev) ...@@ -433,13 +427,13 @@ static int skfp_driver_init(struct net_device *dev)
card_stop(smc); // Reset adapter. card_stop(smc); // Reset adapter.
PRINTK(KERN_INFO "mac_drv_init()..\n"); pr_debug(KERN_INFO "mac_drv_init()..\n");
if (mac_drv_init(smc) != 0) { if (mac_drv_init(smc) != 0) {
PRINTK(KERN_INFO "mac_drv_init() failed.\n"); pr_debug(KERN_INFO "mac_drv_init() failed.\n");
goto fail; goto fail;
} }
read_address(smc, NULL); read_address(smc, NULL);
PRINTK(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n", pr_debug(KERN_INFO "HW-Addr: %02x %02x %02x %02x %02x %02x\n",
smc->hw.fddi_canon_addr.a[0], smc->hw.fddi_canon_addr.a[0],
smc->hw.fddi_canon_addr.a[1], smc->hw.fddi_canon_addr.a[1],
smc->hw.fddi_canon_addr.a[2], smc->hw.fddi_canon_addr.a[2],
...@@ -495,7 +489,7 @@ static int skfp_open(struct net_device *dev) ...@@ -495,7 +489,7 @@ static int skfp_open(struct net_device *dev)
struct s_smc *smc = netdev_priv(dev); struct s_smc *smc = netdev_priv(dev);
int err; int err;
PRINTK(KERN_INFO "entering skfp_open\n"); pr_debug(KERN_INFO "entering skfp_open\n");
/* Register IRQ - support shared interrupts by passing device ptr */ /* Register IRQ - support shared interrupts by passing device ptr */
err = request_irq(dev->irq, skfp_interrupt, IRQF_SHARED, err = request_irq(dev->irq, skfp_interrupt, IRQF_SHARED,
dev->name, dev); dev->name, dev);
...@@ -868,12 +862,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) ...@@ -868,12 +862,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev)
/* Enable promiscuous mode, if necessary */ /* Enable promiscuous mode, if necessary */
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
mac_drv_rx_mode(smc, RX_ENABLE_PROMISC); mac_drv_rx_mode(smc, RX_ENABLE_PROMISC);
PRINTK(KERN_INFO "PROMISCUOUS MODE ENABLED\n"); pr_debug(KERN_INFO "PROMISCUOUS MODE ENABLED\n");
} }
/* Else, update multicast address table */ /* Else, update multicast address table */
else { else {
mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); mac_drv_rx_mode(smc, RX_DISABLE_PROMISC);
PRINTK(KERN_INFO "PROMISCUOUS MODE DISABLED\n"); pr_debug(KERN_INFO "PROMISCUOUS MODE DISABLED\n");
// Reset all MC addresses // Reset all MC addresses
mac_clear_multicast(smc); mac_clear_multicast(smc);
...@@ -881,7 +875,7 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) ...@@ -881,7 +875,7 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev)
if (dev->flags & IFF_ALLMULTI) { if (dev->flags & IFF_ALLMULTI) {
mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI);
PRINTK(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); pr_debug(KERN_INFO "ENABLE ALL MC ADDRESSES\n");
} else if (dev->mc_count > 0) { } else if (dev->mc_count > 0) {
if (dev->mc_count <= FPMAX_MULTICAST) { if (dev->mc_count <= FPMAX_MULTICAST) {
/* use exact filtering */ /* use exact filtering */
...@@ -894,12 +888,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) ...@@ -894,12 +888,12 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev)
(struct fddi_addr *)dmi->dmi_addr, (struct fddi_addr *)dmi->dmi_addr,
1); 1);
PRINTK(KERN_INFO "ENABLE MC ADDRESS:"); pr_debug(KERN_INFO "ENABLE MC ADDRESS:");
PRINTK(" %02x %02x %02x ", pr_debug(" %02x %02x %02x ",
dmi->dmi_addr[0], dmi->dmi_addr[0],
dmi->dmi_addr[1], dmi->dmi_addr[1],
dmi->dmi_addr[2]); dmi->dmi_addr[2]);
PRINTK("%02x %02x %02x\n", pr_debug("%02x %02x %02x\n",
dmi->dmi_addr[3], dmi->dmi_addr[3],
dmi->dmi_addr[4], dmi->dmi_addr[4],
dmi->dmi_addr[5]); dmi->dmi_addr[5]);
...@@ -909,11 +903,11 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) ...@@ -909,11 +903,11 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev)
} else { // more MC addresses than HW supports } else { // more MC addresses than HW supports
mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI); mac_drv_rx_mode(smc, RX_ENABLE_ALLMULTI);
PRINTK(KERN_INFO "ENABLE ALL MC ADDRESSES\n"); pr_debug(KERN_INFO "ENABLE ALL MC ADDRESSES\n");
} }
} else { // no MC addresses } else { // no MC addresses
PRINTK(KERN_INFO "DISABLE ALL MC ADDRESSES\n"); pr_debug(KERN_INFO "DISABLE ALL MC ADDRESSES\n");
} }
/* Update adapter filters */ /* Update adapter filters */
...@@ -1067,7 +1061,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev) ...@@ -1067,7 +1061,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev)
struct s_smc *smc = netdev_priv(dev); struct s_smc *smc = netdev_priv(dev);
skfddi_priv *bp = &smc->os; skfddi_priv *bp = &smc->os;
PRINTK(KERN_INFO "skfp_send_pkt\n"); pr_debug(KERN_INFO "skfp_send_pkt\n");
/* /*
* Verify that incoming transmit request is OK * Verify that incoming transmit request is OK
...@@ -1137,13 +1131,13 @@ static void send_queued_packets(struct s_smc *smc) ...@@ -1137,13 +1131,13 @@ static void send_queued_packets(struct s_smc *smc)
int frame_status; // HWM tx frame status. int frame_status; // HWM tx frame status.
PRINTK(KERN_INFO "send queued packets\n"); pr_debug(KERN_INFO "send queued packets\n");
for (;;) { for (;;) {
// send first buffer from queue // send first buffer from queue
skb = skb_dequeue(&bp->SendSkbQueue); skb = skb_dequeue(&bp->SendSkbQueue);
if (!skb) { if (!skb) {
PRINTK(KERN_INFO "queue empty\n"); pr_debug(KERN_INFO "queue empty\n");
return; return;
} // queue empty ! } // queue empty !
...@@ -1174,11 +1168,11 @@ static void send_queued_packets(struct s_smc *smc) ...@@ -1174,11 +1168,11 @@ static void send_queued_packets(struct s_smc *smc)
if ((frame_status & RING_DOWN) != 0) { if ((frame_status & RING_DOWN) != 0) {
// Ring is down. // Ring is down.
PRINTK("Tx attempt while ring down.\n"); pr_debug("Tx attempt while ring down.\n");
} else if ((frame_status & OUT_OF_TXD) != 0) { } else if ((frame_status & OUT_OF_TXD) != 0) {
PRINTK("%s: out of TXDs.\n", bp->dev->name); pr_debug("%s: out of TXDs.\n", bp->dev->name);
} else { } else {
PRINTK("%s: out of transmit resources", pr_debug("%s: out of transmit resources",
bp->dev->name); bp->dev->name);
} }
...@@ -1255,7 +1249,7 @@ static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr) ...@@ -1255,7 +1249,7 @@ static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr)
static void ResetAdapter(struct s_smc *smc) static void ResetAdapter(struct s_smc *smc)
{ {
PRINTK(KERN_INFO "[fddi: ResetAdapter]\n"); pr_debug(KERN_INFO "[fddi: ResetAdapter]\n");
// Stop the adapter. // Stop the adapter.
...@@ -1301,7 +1295,7 @@ void llc_restart_tx(struct s_smc *smc) ...@@ -1301,7 +1295,7 @@ void llc_restart_tx(struct s_smc *smc)
{ {
skfddi_priv *bp = &smc->os; skfddi_priv *bp = &smc->os;
PRINTK(KERN_INFO "[llc_restart_tx]\n"); pr_debug(KERN_INFO "[llc_restart_tx]\n");
// Try to send queued packets // Try to send queued packets
spin_unlock(&bp->DriverLock); spin_unlock(&bp->DriverLock);
...@@ -1331,7 +1325,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size) ...@@ -1331,7 +1325,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)
{ {
void *virt; void *virt;
PRINTK(KERN_INFO "mac_drv_get_space (%d bytes), ", size); pr_debug(KERN_INFO "mac_drv_get_space (%d bytes), ", size);
virt = (void *) (smc->os.SharedMemAddr + smc->os.SharedMemHeap); virt = (void *) (smc->os.SharedMemAddr + smc->os.SharedMemHeap);
if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { 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,9 +1334,9 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)
} }
smc->os.SharedMemHeap += size; // Move heap pointer. smc->os.SharedMemHeap += size; // Move heap pointer.
PRINTK(KERN_INFO "mac_drv_get_space end\n"); pr_debug(KERN_INFO "mac_drv_get_space end\n");
PRINTK(KERN_INFO "virt addr: %lx\n", (ulong) virt); pr_debug(KERN_INFO "virt addr: %lx\n", (ulong) virt);
PRINTK(KERN_INFO "bus addr: %lx\n", (ulong) pr_debug(KERN_INFO "bus addr: %lx\n", (ulong)
(smc->os.SharedMemDMA + (smc->os.SharedMemDMA +
((char *) virt - (char *)smc->os.SharedMemAddr))); ((char *) virt - (char *)smc->os.SharedMemAddr)));
return (virt); return (virt);
...@@ -1372,7 +1366,7 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) ...@@ -1372,7 +1366,7 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)
char *virt; char *virt;
PRINTK(KERN_INFO "mac_drv_get_desc_mem\n"); pr_debug(KERN_INFO "mac_drv_get_desc_mem\n");
// Descriptor memory must be aligned on 16-byte boundary. // Descriptor memory must be aligned on 16-byte boundary.
...@@ -1381,8 +1375,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) ...@@ -1381,8 +1375,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)
size = (u_int) (16 - (((unsigned long) virt) & 15UL)); size = (u_int) (16 - (((unsigned long) virt) & 15UL));
size = size % 16; size = size % 16;
PRINTK("Allocate %u bytes alignment gap ", size); pr_debug("Allocate %u bytes alignment gap ", size);
PRINTK("for descriptor memory.\n"); pr_debug("for descriptor memory.\n");
if (!mac_drv_get_space(smc, size)) { if (!mac_drv_get_space(smc, size)) {
printk("fddi: Unable to align descriptor memory.\n"); 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,11 +1510,11 @@ void mac_drv_tx_complete(struct s_smc *smc, volatile struct s_smt_fp_txd *txd)
{ {
struct sk_buff *skb; struct sk_buff *skb;
PRINTK(KERN_INFO "entering mac_drv_tx_complete\n"); pr_debug(KERN_INFO "entering mac_drv_tx_complete\n");
// Check if this TxD points to a skb // Check if this TxD points to a skb
if (!(skb = txd->txd_os.skb)) { if (!(skb = txd->txd_os.skb)) {
PRINTK("TXD with no skb assigned.\n"); pr_debug("TXD with no skb assigned.\n");
return; return;
} }
txd->txd_os.skb = NULL; 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,7 +1530,7 @@ void mac_drv_tx_complete(struct s_smc *smc, volatile struct s_smt_fp_txd *txd)
// free the skb // free the skb
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
PRINTK(KERN_INFO "leaving mac_drv_tx_complete\n"); pr_debug(KERN_INFO "leaving mac_drv_tx_complete\n");
} // mac_drv_tx_complete } // mac_drv_tx_complete
...@@ -1603,7 +1597,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1603,7 +1597,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
unsigned short ri; unsigned short ri;
u_int RifLength; u_int RifLength;
PRINTK(KERN_INFO "entering mac_drv_rx_complete (len=%d)\n", len); pr_debug(KERN_INFO "entering mac_drv_rx_complete (len=%d)\n", len);
if (frag_count != 1) { // This is not allowed to happen. if (frag_count != 1) { // This is not allowed to happen.
printk("fddi: Multi-fragment receive!\n"); 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,7 +1606,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
} }
skb = rxd->rxd_os.skb; skb = rxd->rxd_os.skb;
if (!skb) { if (!skb) {
PRINTK(KERN_INFO "No skb in rxd\n"); pr_debug(KERN_INFO "No skb in rxd\n");
smc->os.MacStat.gen.rx_errors++; smc->os.MacStat.gen.rx_errors++;
goto RequeueRxd; goto RequeueRxd;
} }
...@@ -1642,7 +1636,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1642,7 +1636,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
else { else {
int n; int n;
// goos: RIF removal has still to be tested // goos: RIF removal has still to be tested
PRINTK(KERN_INFO "RIF found\n"); pr_debug(KERN_INFO "RIF found\n");
// Get RIF length from Routing Control (RC) field. // Get RIF length from Routing Control (RC) field.
cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header. cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header.
...@@ -1687,7 +1681,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1687,7 +1681,7 @@ void mac_drv_rx_complete(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
return; return;
RequeueRxd: RequeueRxd:
PRINTK(KERN_INFO "Rx: re-queue RXD.\n"); pr_debug(KERN_INFO "Rx: re-queue RXD.\n");
mac_drv_requeue_rxd(smc, rxd, frag_count); mac_drv_requeue_rxd(smc, rxd, frag_count);
smc->os.MacStat.gen.rx_errors++; // Count receive packets smc->os.MacStat.gen.rx_errors++; // Count receive packets
// not indicated. // not indicated.
...@@ -1736,7 +1730,7 @@ void mac_drv_requeue_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1736,7 +1730,7 @@ void mac_drv_requeue_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
skb = src_rxd->rxd_os.skb; skb = src_rxd->rxd_os.skb;
if (skb == NULL) { // this should not happen if (skb == NULL) { // this should not happen
PRINTK("Requeue with no skb in rxd!\n"); pr_debug("Requeue with no skb in rxd!\n");
skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC);
if (skb) { if (skb) {
// we got a skb // 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,7 +1745,7 @@ void mac_drv_requeue_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
rxd->rxd_os.dma_addr = b_addr; rxd->rxd_os.dma_addr = b_addr;
} else { } else {
// no skb available, use local buffer // no skb available, use local buffer
PRINTK("Queueing invalid buffer!\n"); pr_debug("Queueing invalid buffer!\n");
rxd->rxd_os.skb = NULL; rxd->rxd_os.skb = NULL;
v_addr = smc->os.LocalRxBuffer; v_addr = smc->os.LocalRxBuffer;
b_addr = smc->os.LocalRxBufferDMA; b_addr = smc->os.LocalRxBufferDMA;
...@@ -1798,7 +1792,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) ...@@ -1798,7 +1792,7 @@ void mac_drv_fill_rxd(struct s_smc *smc)
struct sk_buff *skb; struct sk_buff *skb;
volatile struct s_smt_fp_rxd *rxd; volatile struct s_smt_fp_rxd *rxd;
PRINTK(KERN_INFO "entering mac_drv_fill_rxd\n"); pr_debug(KERN_INFO "entering mac_drv_fill_rxd\n");
// Walk through the list of free receive buffers, passing receive // Walk through the list of free receive buffers, passing receive
// buffers to the HWM as long as RXDs are available. // buffers to the HWM as long as RXDs are available.
...@@ -1806,7 +1800,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) ...@@ -1806,7 +1800,7 @@ void mac_drv_fill_rxd(struct s_smc *smc)
MaxFrameSize = smc->os.MaxFrameSize; MaxFrameSize = smc->os.MaxFrameSize;
// Check if there is any RXD left. // Check if there is any RXD left.
while (HWM_GET_RX_FREE(smc) > 0) { while (HWM_GET_RX_FREE(smc) > 0) {
PRINTK(KERN_INFO ".\n"); pr_debug(KERN_INFO ".\n");
rxd = HWM_GET_CURR_RXD(smc); rxd = HWM_GET_CURR_RXD(smc);
skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC); skb = alloc_skb(MaxFrameSize + 3, GFP_ATOMIC);
...@@ -1826,7 +1820,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) ...@@ -1826,7 +1820,7 @@ void mac_drv_fill_rxd(struct s_smc *smc)
// keep the receiver running in hope of better times. // keep the receiver running in hope of better times.
// Multiple descriptors may point to this local buffer, // Multiple descriptors may point to this local buffer,
// so data in it must be considered invalid. // so data in it must be considered invalid.
PRINTK("Queueing invalid buffer!\n"); pr_debug("Queueing invalid buffer!\n");
v_addr = smc->os.LocalRxBuffer; v_addr = smc->os.LocalRxBuffer;
b_addr = smc->os.LocalRxBufferDMA; b_addr = smc->os.LocalRxBufferDMA;
} }
...@@ -1837,7 +1831,7 @@ void mac_drv_fill_rxd(struct s_smc *smc) ...@@ -1837,7 +1831,7 @@ void mac_drv_fill_rxd(struct s_smc *smc)
hwm_rx_frag(smc, v_addr, b_addr, MaxFrameSize, hwm_rx_frag(smc, v_addr, b_addr, MaxFrameSize,
FIRST_FRAG | LAST_FRAG); FIRST_FRAG | LAST_FRAG);
} }
PRINTK(KERN_INFO "leaving mac_drv_fill_rxd\n"); pr_debug(KERN_INFO "leaving mac_drv_fill_rxd\n");
} // mac_drv_fill_rxd } // mac_drv_fill_rxd
...@@ -1863,7 +1857,7 @@ void mac_drv_clear_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd, ...@@ -1863,7 +1857,7 @@ void mac_drv_clear_rxd(struct s_smc *smc, volatile struct s_smt_fp_rxd *rxd,
struct sk_buff *skb; struct sk_buff *skb;
PRINTK("entering mac_drv_clear_rxd\n"); pr_debug("entering mac_drv_clear_rxd\n");
if (frag_count != 1) // This is not allowed to happen. if (frag_count != 1) // This is not allowed to happen.
...@@ -1919,19 +1913,19 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, ...@@ -1919,19 +1913,19 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc,
{ {
struct sk_buff *skb; struct sk_buff *skb;
PRINTK("entering mac_drv_rx_init(len=%d)\n", len); pr_debug("entering mac_drv_rx_init(len=%d)\n", len);
// "Received" a SMT or NSA frame of the local SMT. // "Received" a SMT or NSA frame of the local SMT.
if (len != la_len || len < FDDI_MAC_HDR_LEN || !look_ahead) { if (len != la_len || len < FDDI_MAC_HDR_LEN || !look_ahead) {
PRINTK("fddi: Discard invalid local SMT frame\n"); pr_debug("fddi: Discard invalid local SMT frame\n");
PRINTK(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n",
len, la_len, (unsigned long) look_ahead); len, la_len, (unsigned long) look_ahead);
return (0); return (0);
} }
skb = alloc_skb(len + 3, GFP_ATOMIC); skb = alloc_skb(len + 3, GFP_ATOMIC);
if (!skb) { if (!skb) {
PRINTK("fddi: Local SMT: skb memory exhausted.\n"); pr_debug("fddi: Local SMT: skb memory exhausted.\n");
return (0); return (0);
} }
skb_reserve(skb, 3); skb_reserve(skb, 3);
...@@ -1981,40 +1975,40 @@ void smt_timer_poll(struct s_smc *smc) ...@@ -1981,40 +1975,40 @@ void smt_timer_poll(struct s_smc *smc)
************************/ ************************/
void ring_status_indication(struct s_smc *smc, u_long status) void ring_status_indication(struct s_smc *smc, u_long status)
{ {
PRINTK("ring_status_indication( "); pr_debug("ring_status_indication( ");
if (status & RS_RES15) if (status & RS_RES15)
PRINTK("RS_RES15 "); pr_debug("RS_RES15 ");
if (status & RS_HARDERROR) if (status & RS_HARDERROR)
PRINTK("RS_HARDERROR "); pr_debug("RS_HARDERROR ");
if (status & RS_SOFTERROR) if (status & RS_SOFTERROR)
PRINTK("RS_SOFTERROR "); pr_debug("RS_SOFTERROR ");
if (status & RS_BEACON) if (status & RS_BEACON)
PRINTK("RS_BEACON "); pr_debug("RS_BEACON ");
if (status & RS_PATHTEST) if (status & RS_PATHTEST)
PRINTK("RS_PATHTEST "); pr_debug("RS_PATHTEST ");
if (status & RS_SELFTEST) if (status & RS_SELFTEST)
PRINTK("RS_SELFTEST "); pr_debug("RS_SELFTEST ");
if (status & RS_RES9) if (status & RS_RES9)
PRINTK("RS_RES9 "); pr_debug("RS_RES9 ");
if (status & RS_DISCONNECT) if (status & RS_DISCONNECT)
PRINTK("RS_DISCONNECT "); pr_debug("RS_DISCONNECT ");
if (status & RS_RES7) if (status & RS_RES7)
PRINTK("RS_RES7 "); pr_debug("RS_RES7 ");
if (status & RS_DUPADDR) if (status & RS_DUPADDR)
PRINTK("RS_DUPADDR "); pr_debug("RS_DUPADDR ");
if (status & RS_NORINGOP) if (status & RS_NORINGOP)
PRINTK("RS_NORINGOP "); pr_debug("RS_NORINGOP ");
if (status & RS_VERSION) if (status & RS_VERSION)
PRINTK("RS_VERSION "); pr_debug("RS_VERSION ");
if (status & RS_STUCKBYPASSS) if (status & RS_STUCKBYPASSS)
PRINTK("RS_STUCKBYPASSS "); pr_debug("RS_STUCKBYPASSS ");
if (status & RS_EVENT) if (status & RS_EVENT)
PRINTK("RS_EVENT "); pr_debug("RS_EVENT ");
if (status & RS_RINGOPCHANGE) if (status & RS_RINGOPCHANGE)
PRINTK("RS_RINGOPCHANGE "); pr_debug("RS_RINGOPCHANGE ");
if (status & RS_RES0) if (status & RS_RES0)
PRINTK("RS_RES0 "); pr_debug("RS_RES0 ");
PRINTK("]\n"); pr_debug("]\n");
} // ring_status_indication } // ring_status_indication
...@@ -2057,17 +2051,17 @@ void smt_stat_counter(struct s_smc *smc, int stat) ...@@ -2057,17 +2051,17 @@ void smt_stat_counter(struct s_smc *smc, int stat)
{ {
// BOOLEAN RingIsUp ; // BOOLEAN RingIsUp ;
PRINTK(KERN_INFO "smt_stat_counter\n"); pr_debug(KERN_INFO "smt_stat_counter\n");
switch (stat) { switch (stat) {
case 0: case 0:
PRINTK(KERN_INFO "Ring operational change.\n"); pr_debug(KERN_INFO "Ring operational change.\n");
break; break;
case 1: case 1:
PRINTK(KERN_INFO "Receive fifo overflow.\n"); pr_debug(KERN_INFO "Receive fifo overflow.\n");
smc->os.MacStat.gen.rx_errors++; smc->os.MacStat.gen.rx_errors++;
break; break;
default: default:
PRINTK(KERN_INFO "Unknown status (%d).\n", stat); pr_debug(KERN_INFO "Unknown status (%d).\n", stat);
break; break;
} }
} // smt_stat_counter } // smt_stat_counter
...@@ -2123,10 +2117,10 @@ void cfm_state_change(struct s_smc *smc, int c_state) ...@@ -2123,10 +2117,10 @@ void cfm_state_change(struct s_smc *smc, int c_state)
s = "SC11_C_WRAP_S"; s = "SC11_C_WRAP_S";
break; break;
default: default:
PRINTK(KERN_INFO "cfm_state_change: unknown %d\n", c_state); pr_debug(KERN_INFO "cfm_state_change: unknown %d\n", c_state);
return; return;
} }
PRINTK(KERN_INFO "cfm_state_change: %s\n", s); pr_debug(KERN_INFO "cfm_state_change: %s\n", s);
#endif // DRIVERDEBUG #endif // DRIVERDEBUG
} // cfm_state_change } // cfm_state_change
...@@ -2181,7 +2175,7 @@ void ecm_state_change(struct s_smc *smc, int e_state) ...@@ -2181,7 +2175,7 @@ void ecm_state_change(struct s_smc *smc, int e_state)
s = "unknown"; s = "unknown";
break; break;
} }
PRINTK(KERN_INFO "ecm_state_change: %s\n", s); pr_debug(KERN_INFO "ecm_state_change: %s\n", s);
#endif //DRIVERDEBUG #endif //DRIVERDEBUG
} // ecm_state_change } // ecm_state_change
...@@ -2236,7 +2230,7 @@ void rmt_state_change(struct s_smc *smc, int r_state) ...@@ -2236,7 +2230,7 @@ void rmt_state_change(struct s_smc *smc, int r_state)
s = "unknown"; s = "unknown";
break; break;
} }
PRINTK(KERN_INFO "[rmt_state_change: %s]\n", s); pr_debug(KERN_INFO "[rmt_state_change: %s]\n", s);
#endif // DRIVERDEBUG #endif // DRIVERDEBUG
} // rmt_state_change } // rmt_state_change
...@@ -2256,7 +2250,7 @@ void rmt_state_change(struct s_smc *smc, int r_state) ...@@ -2256,7 +2250,7 @@ void rmt_state_change(struct s_smc *smc, int r_state)
************************/ ************************/
void drv_reset_indication(struct s_smc *smc) void drv_reset_indication(struct s_smc *smc)
{ {
PRINTK(KERN_INFO "entering drv_reset_indication\n"); pr_debug(KERN_INFO "entering drv_reset_indication\n");
smc->os.ResetRequested = TRUE; // Set flag. smc->os.ResetRequested = TRUE; // Set flag.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment