hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/ethernet/xircom/xirc2ps_cs.c
....@@ -288,7 +288,7 @@
288288 */
289289 static netdev_tx_t do_start_xmit(struct sk_buff *skb,
290290 struct net_device *dev);
291
-static void xirc_tx_timeout(struct net_device *dev);
291
+static void xirc_tx_timeout(struct net_device *dev, unsigned int txqueue);
292292 static void xirc2ps_tx_timeout_task(struct work_struct *work);
293293 static void set_addresses(struct net_device *dev);
294294 static void set_multicast_list(struct net_device *dev);
....@@ -503,6 +503,11 @@
503503 xirc2ps_detach(struct pcmcia_device *link)
504504 {
505505 struct net_device *dev = link->priv;
506
+ struct local_info *local = netdev_priv(dev);
507
+
508
+ netif_carrier_off(dev);
509
+ netif_tx_disable(dev);
510
+ cancel_work_sync(&local->tx_timeout_task);
506511
507512 dev_dbg(&link->dev, "detach\n");
508513
....@@ -1203,7 +1208,7 @@
12031208 }
12041209
12051210 static void
1206
-xirc_tx_timeout(struct net_device *dev)
1211
+xirc_tx_timeout(struct net_device *dev, unsigned int txqueue)
12071212 {
12081213 struct local_info *lp = netdev_priv(dev);
12091214 dev->stats.tx_errors++;
....@@ -1434,7 +1439,7 @@
14341439 switch(cmd) {
14351440 case SIOCGMIIPHY: /* Get the address of the PHY in use. */
14361441 data->phy_id = 0; /* we have only this address */
1437
- /* fall through */
1442
+ fallthrough;
14381443 case SIOCGMIIREG: /* Read the specified MII register. */
14391444 data->val_out = mii_rd(ioaddr, data->phy_id & 0x1f,
14401445 data->reg_num & 0x1f);
....@@ -1473,7 +1478,7 @@
14731478 unsigned int ioaddr = dev->base_addr;
14741479 unsigned value;
14751480
1476
- pr_debug("%s: do_reset(%p,%d)\n", dev? dev->name:"eth?", dev, full);
1481
+ pr_debug("%s: do_reset(%p,%d)\n", dev->name, dev, full);
14771482
14781483 hardreset(dev);
14791484 PutByte(XIRCREG_CR, SoftReset); /* set */