summaryrefslogtreecommitdiff
path: root/packages/ixp425-eth/ixp400-eth-1.5/debug.patch
blob: c684c078d2a9ccb300b6b0519ee39c3215c5efd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
This patch is not necessary but helps when debugging the build

--- ixp400-eth/ixp400_eth.c	1970-01-01 00:00:00.000000000 +0000
+++ ixp400-eth/ixp400_eth.c	1970-01-01 00:00:00.000000000 +0000
@@ -1350,9 +1350,10 @@ static int dev_media_check_thread (void*
 	
 	    if (res != IX_ETH_ACC_SUCCESS)
 	    {
-		P_WARN("ixEthMiiLinkStatus failed on PHY%d.\n"
+		P_WARN("%s: ixEthMiiLinkStatus failed on PHY%d.\n"
 		       "\tCan't determine\nthe auto negotiated parameters. "
 		       "Using default values.\n",
+		       dev->name,
 		       phyNum); 
 		/* something is bad, gracefully stops the loop */
 		priv->maintenanceCheckStopped = TRUE;
@@ -2213,7 +2214,8 @@ static int port_enable(struct net_device
 	   IX_IEEE803_MAC_ADDRESS_SIZE);
     if ((res = ixEthAccPortUnicastMacAddressSet(priv->port_id, &npeMacAddr)))
     {
-        P_VERBOSE("Failed to set MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x for port %d\n",
+        P_VERBOSE("%s: Failed to set MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x for port %d\n",
+	       dev->name,
 	       (unsigned)npeMacAddr.macAddress[0],
 	       (unsigned)npeMacAddr.macAddress[1],
 	       (unsigned)npeMacAddr.macAddress[2],
@@ -2707,8 +2709,8 @@ static int do_dev_ioctl(struct net_devic
 	    down (miiAccessMutex);     /* lock the MII register access mutex */
 	    if ((res = ixEthAccMiiReadRtn (data->phy_id, data->reg_num, &data->val_out)))
 	    {
-		P_ERROR("Error reading MII reg %d on phy %d\n",
-		       data->reg_num, data->phy_id);
+		P_ERROR("%s: Error reading MII reg %d on phy %d\n",
+		       dev->name, data->reg_num, data->phy_id);
 		res = -1;
 	    }
 	    up (miiAccessMutex);	/* release the MII register access mutex */
@@ -2720,8 +2722,8 @@ static int do_dev_ioctl(struct net_devic
 	    down (miiAccessMutex);     /* lock the MII register access mutex */
 	    if ((res = ixEthAccMiiWriteRtn (data->phy_id, data->reg_num, data->val_in)))
 	    {
-		P_ERROR("Error writing MII reg %d on phy %d\n",
-                        data->reg_num, data->phy_id);
+		P_ERROR("%s: Error writing MII reg %d on phy %d\n",
+                        dev->name, data->reg_num, data->phy_id);
 		res = -1;
 	    }
 	    up (miiAccessMutex);	/* release the MII register access mutex */
@@ -3049,7 +3051,8 @@ static int set_mac_address(struct net_de
     /* Set MAC addr in h/w (ethAcc checks for MAC address to be valid) */
     if ((res = ixEthAccPortUnicastMacAddressSet(priv->port_id, &npeMacAddr)))
     {
-        P_VERBOSE("Failed to set MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x for port %d\n",
+        P_VERBOSE("%s: Failed to set MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x for port %d\n",
+	       dev->name,
 	       (unsigned)npeMacAddr.macAddress[0],
 	       (unsigned)npeMacAddr.macAddress[1],
 	       (unsigned)npeMacAddr.macAddress[2],
@@ -3267,6 +3270,8 @@ static int __devinit dev_eth_probe(struc
 	kmalloc(sizeof(struct semaphore), GFP_KERNEL);
     if (!priv->maintenanceCheckThreadComplete)
     {
+	P_ERROR("%s: Failed to allocate maintenance semaphore %d\n",
+		ndev->name, priv->port_id);
 	goto error;
     }
     priv->lock = SPIN_LOCK_UNLOCKED;
@@ -3360,7 +3365,11 @@ static int __devinit dev_eth_probe(struc
 
 #if IS_KERNEL26
     if (register_netdev(ndev))
+    {
+	P_ERROR("%s: Failed to register netdevice %d\n",
+		ndev->name, priv->port_id);
     	goto error;
+    }
 #else
     found_devices++;
 #endif /* IS_KERNEL26 */
@@ -3370,6 +3379,8 @@ static int __devinit dev_eth_probe(struc
     /* register EthAcc callbacks for this port */
     if (dev_rxtxcallback_register(portId, (UINT32)ndev))
     {
+    	P_ERROR("%s: Failed to register callback %d\n",
+		ndev->name, priv->port_id);
     	goto error;
     }
 
@@ -3393,6 +3404,7 @@ static int __devinit dev_eth_probe(struc
 
 /* Error handling: enter here whenever error detected */
 error:
+    P_ERROR("%s: dev_eth_probe fails\n", ndev->name);
     TRACE;
 
 #ifdef CONFIG_IXP400_ETH_QDISC_ENABLED
@@ -3465,21 +3477,21 @@ static int __devexit dev_eth_remove(int 
 	{
 	    if (IX_SUCCESS != ixNpeDlNpeStopAndReset(IX_NPEDL_NPEID_NPEA))
 	    {
-		P_NOTICE("Error Halting NPE for Ethernet port %d!\n", portId);
+		P_NOTICE("%s: Error Halting NPE for Ethernet port %d!\n", ndev->name, portId);
 	    }
 	}
 	if (default_npeImageId[portId] == IX_ETH_NPE_B_IMAGE_ID)
 	{
 	    if (IX_SUCCESS != ixNpeDlNpeStopAndReset(IX_NPEDL_NPEID_NPEB))
 	    {
-		P_NOTICE("Error Halting NPE for Ethernet port %d!\n", portId);
+		P_NOTICE("%s: Error Halting NPE for Ethernet port %d!\n", ndev->name, portId);
 	    }
 	}
 	if (default_npeImageId[portId] == IX_ETH_NPE_C_IMAGE_ID)
 	{
 	    if (IX_SUCCESS != ixNpeDlNpeStopAndReset(IX_NPEDL_NPEID_NPEC))
 	    {
-		P_NOTICE("Error Halting NPE for Ethernet port %d!\n", portId);
+		P_NOTICE("%s: Error Halting NPE for Ethernet port %d!\n", ndev->name, portId);
 	    }
 	}
 
@@ -3528,6 +3540,9 @@ static int __init ixp400_eth_init(void)
     TRACE;
 
     P_INFO("Initializing IXP400 NPE Ethernet driver software v. " MOD_VERSION " \n");
+#ifdef IX_OSAL_ENSURE_ON
+    ixOsalLogLevelSet(IX_OSAL_LOG_LVL_ALL);
+#endif
 
     TRACE;