?berfl?ssige Debug-Messages im Treiber-Code entfernt.
authorFlorian Pose <fp@igh-essen.com>
Fri, 18 Nov 2005 10:30:01 +0000
changeset 18 5a42f6d1085c
parent 17 1b5aea4d5147
child 19 a51289e6cb2d
?berfl?ssige Debug-Messages im Treiber-Code entfernt.
drivers/drv_8139too.c
--- a/drivers/drv_8139too.c	Fri Nov 18 09:51:50 2005 +0000
+++ b/drivers/drv_8139too.c	Fri Nov 18 10:30:01 2005 +0000
@@ -775,7 +775,9 @@
 static void rtl8139_chip_reset (void *ioaddr)
 {
 	int i;
-	int succ = 0 ;
+#ifdef ECAT_DEBUG
+	int succ = 0;
+#endif
 	/* Soft reset the chip. */
 	RTL_W8 (ChipCmd, CmdReset);
 
@@ -783,17 +785,20 @@
 	for (i = 1000; i > 0; i--) {
 		barrier();
 		if ((RTL_R8 (ChipCmd) & CmdReset) == 0) {
+#ifdef ECAT_DEBUG
 		    succ = 1;
+#endif
 		    break;
 		}
 		udelay (10);
 	}
+#ifdef ECAT_DEBUG
 	EC_DBG("rtl8139 chipreset");
 	if(succ == 0)
 	    EC_DBG("failed");
 	else
 	    EC_DBG("success at count %d",i);
-
+#endif
 }
 
 
@@ -1379,9 +1384,11 @@
 	void *ioaddr = tp->mmio_addr;
 #endif
 
+	/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
+
+#ifdef ECAT_DEBUG
         EC_DBG(KERN_DEBUG "%s: open\n", dev->name);
-
-	/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
+#endif
 
         if (dev != rtl_ecat_dev.dev)
         {
@@ -1444,10 +1451,12 @@
                     dev->name);
 	}
 
+#ifdef ECAT_DEBUG
+        EC_DBG(KERN_DEBUG "%s: open finished.\n", dev->name);
+#endif
+
 	/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 
-        EC_DBG(KERN_DEBUG "%s: open finished.\n", dev->name);
-
 	return 0;
 }
 
@@ -1471,7 +1480,14 @@
                         (mii_lpa & 0x0180) ? "100mbps " : "10mbps ",
 			tp->mii.full_duplex ? "full" : "half", mii_lpa);
 	}
+
+	/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
+
+#ifdef ECAT_DEBUG
         EC_DBG(KERN_DEBUG "rtl_check_media done.\n");
+#endif
+
+	/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 }
 
 /* Start the hardware at open or resume. */
@@ -1482,7 +1498,13 @@
 	u32 i;
 	u8 tmp;
 
+	/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
+
+#ifdef ECAT_DEBUG
         EC_DBG(KERN_DEBUG "%s: rtl8139_hw_start\n", dev->name);
+#endif
+
+	/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 
 	/* Bring old chips out of low-power mode. */
 	if (rtl_chip_info[tp->chipset].flags & HasHltClk)
@@ -1553,9 +1575,11 @@
           RTL_W16 (IntrMask, 0x0000);
         }
 
+#ifdef ECAT_DEBUG
+        EC_DBG(KERN_DEBUG "%s: rtl8139_hw_start finished.\n", dev->name);
+#endif
+
 	/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
-
-        EC_DBG(KERN_DEBUG "%s: rtl8139_hw_start finished.\n", dev->name);
 }
 
 
@@ -1721,8 +1745,6 @@
 	struct rtl8139_private *tp = dev->priv;
 	unsigned long timeout;
 
-        EC_DBG(KERN_DEBUG "%s: thread\n", dev->name);
-
 	daemonize ();
 	reparent_to_init();
 	spin_lock_irq(&current->sigmask_lock);
@@ -1733,8 +1755,6 @@
 	strncpy (current->comm, dev->name, sizeof(current->comm) - 1);
 	current->comm[sizeof(current->comm) - 1] = '\0';
 
-        EC_DBG(KERN_DEBUG "%s: thread entering loop...\n", dev->name);
-
 	while (1) {
 		timeout = next_tick;
 		do {
@@ -1751,17 +1771,11 @@
 			break;
 
 		rtnl_lock ();
-                EC_DBG(KERN_DEBUG "%s: thread iter\n", dev->name);
 		rtl8139_thread_iter (dev, tp, tp->mmio_addr);
-                EC_DBG(KERN_DEBUG "%s: thread iter finished.\n", dev->name);
 		rtnl_unlock ();
 	}
 
-        EC_DBG(KERN_DEBUG "%s: thread exiting...\n", dev->name);
-
 	complete_and_exit (&tp->thr_exited, 0);
-
-        EC_DBG(KERN_DEBUG "%s: thread exit.\n", dev->name);
 }
 
 
@@ -1782,8 +1796,6 @@
 	u8 tmp8;
 	unsigned long flags;
 
-        EC_DBG(KERN_DEBUG "%s: tx_timeout\n", dev->name);
-
 	DPRINTK ("%s: Transmit timeout, status %2.2x %4.4x "
 		 "media %2.2x.\n", dev->name,
 		 RTL_R8 (ChipCmd),
@@ -1794,6 +1806,8 @@
 
         /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
 
+        EC_DBG(KERN_DEBUG "%s: tx_timeout\n", dev->name);
+
         if (dev == rtl_ecat_dev.dev)
         {
           if (rtl_ecat_dev.state != ECAT_DS_SENT)
@@ -1837,9 +1851,9 @@
 
         if (dev != rtl_ecat_dev.dev) netif_wake_queue (dev);
 
+        EC_DBG(KERN_DEBUG "%s: tx_timeout finished.\n", dev->name);
+
 	/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
-
-        EC_DBG(KERN_DEBUG "%s: tx_timeout finished.\n", dev->name);
 }
 
 static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
@@ -2470,8 +2484,6 @@
 	if (rtl_chip_info[tp->chipset].flags & HasHltClk)
 		RTL_W8 (HltClk, 'H');	/* 'R' would leave the clock running. */
 
-	EC_DBG ("rtl8139: closing done\n");
-
 	return 0;
 }
 
@@ -2786,8 +2798,6 @@
 	void *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
-	EC_DBG("%s: rtl8139 GETSTATS called...",dev->name);
-
         /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
 
 	if (dev == rtl_ecat_dev.dev || netif_running(dev))
@@ -2942,9 +2952,6 @@
 
         EtherCAT_device_init(&rtl_ecat_dev);
 
-        printk(KERN_DEBUG "Driver rtl_ecat_dev has address %X.\n",
-               (unsigned) &rtl_ecat_dev);
-
         /* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 
 	return pci_module_init (&rtl8139_pci_driver);