Skip to contentSkip to conversation

Merge GT/MV642xx Support into MV643xx Driver [5/8]

PATCH In review Steven J. Hill 3 participants 3 messages Jul 19, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Merge GT/MV642xx Support into MV643xx Driver [5/8]

Fix 'mv643xx_eth_tx_timeout_task' function prototype.

---

drivers/net/mv643xx_eth.c +2 -4
@@ -317,11 +315,9 @@
  *
  * Actual routine to reset the adapter when a timeout on Tx has occurred
  */
-static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
+static void mv643xx_eth_tx_timeout_task(struct net_device *dev)
 {
-	struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
-						  tx_timeout_task);
-	struct net_device *dev = mp->mii.dev; /* yuck */
+	struct mv643xx_private *mp = netdev_priv(dev);
 
 	if (!netif_running(dev))
 		return;
#1 lore raw
Quoted 1 line · Steven J. Hill

Fix 'mv643xx_eth_tx_timeout_task' function prototype.

Patches 5-7 look like valid fixes independent of the merge. Please send them out inlined in the mail and with proper subjects so they can be merged independent of the GT/MV642xx support.

#2 lore raw
In reply to Steven J. Hill
Quoted 11 lines · Steven J. Hill

Fix 'mv643xx_eth_tx_timeout_task' function prototype.

---

drivers/net/mv643xx_eth.c +0 -0
@@ -317,11 +315,9 @@
  *
  * Actual routine to reset the adapter when a timeout on Tx has occurred
  */

drivers/net/mv643xx_eth.c line 323

Quoted 10 lines
drivers/net/mv643xx_eth.c +2 -4
-static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
+static void mv643xx_eth_tx_timeout_task(struct net_device *dev)
 {
-	struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
-						  tx_timeout_task);
-	struct net_device *dev = mp->mii.dev; /* yuck */
+	struct mv643xx_private *mp = netdev_priv(dev);
 
 	if (!netif_running(dev))
 		return;

Applying this patch results yields a new compiler warning:
drivers/net/mv643xx_eth.c: In function `mv643xx_eth_probe':
drivers/net/mv643xx_eth.c:1375: warning: assignment from incompatible pointer type

I think we're stuck with the "struct work_struct" argument.

-Dale