Skip to content

Commit ed4cb13

Browse files
Arjan van de Vendavem330
authored andcommitted
netdev: uniquify the tx_timeout name
there's several drivers that have use "tx_timeout" for the .. tx timeout function. All fine with that, they're static, however for doing stats on how often which driver hits the timeout it's a tad unfortunate. The patch below gives the ones I found in the kerneloops.org database unique names. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 21ce4ff commit ed4cb13

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

drivers/net/fealnx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static void getlinktype(struct net_device *dev);
431431
static void getlinkstatus(struct net_device *dev);
432432
static void netdev_timer(unsigned long data);
433433
static void reset_timer(unsigned long data);
434-
static void tx_timeout(struct net_device *dev);
434+
static void fealnx_tx_timeout(struct net_device *dev);
435435
static void init_ring(struct net_device *dev);
436436
static int start_tx(struct sk_buff *skb, struct net_device *dev);
437437
static irqreturn_t intr_handler(int irq, void *dev_instance);
@@ -658,7 +658,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
658658
dev->set_multicast_list = &set_rx_mode;
659659
dev->do_ioctl = &mii_ioctl;
660660
dev->ethtool_ops = &netdev_ethtool_ops;
661-
dev->tx_timeout = &tx_timeout;
661+
dev->tx_timeout = &fealnx_tx_timeout;
662662
dev->watchdog_timeo = TX_TIMEOUT;
663663

664664
err = register_netdev(dev);
@@ -1198,7 +1198,7 @@ static void reset_timer(unsigned long data)
11981198
}
11991199

12001200

1201-
static void tx_timeout(struct net_device *dev)
1201+
static void fealnx_tx_timeout(struct net_device *dev)
12021202
{
12031203
struct netdev_private *np = netdev_priv(dev);
12041204
void __iomem *ioaddr = np->mem;

drivers/net/natsemi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static void undo_cable_magic(struct net_device *dev);
612612
static void check_link(struct net_device *dev);
613613
static void netdev_timer(unsigned long data);
614614
static void dump_ring(struct net_device *dev);
615-
static void tx_timeout(struct net_device *dev);
615+
static void ns_tx_timeout(struct net_device *dev);
616616
static int alloc_ring(struct net_device *dev);
617617
static void refill_rx(struct net_device *dev);
618618
static void init_ring(struct net_device *dev);
@@ -920,7 +920,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
920920
dev->set_multicast_list = &set_rx_mode;
921921
dev->change_mtu = &natsemi_change_mtu;
922922
dev->do_ioctl = &netdev_ioctl;
923-
dev->tx_timeout = &tx_timeout;
923+
dev->tx_timeout = &ns_tx_timeout;
924924
dev->watchdog_timeo = TX_TIMEOUT;
925925

926926
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -1875,7 +1875,7 @@ static void dump_ring(struct net_device *dev)
18751875
}
18761876
}
18771877

1878-
static void tx_timeout(struct net_device *dev)
1878+
static void ns_tx_timeout(struct net_device *dev)
18791879
{
18801880
struct netdev_private *np = netdev_priv(dev);
18811881
void __iomem * ioaddr = ns_ioaddr(dev);
@@ -3232,7 +3232,7 @@ static void __devexit natsemi_remove1 (struct pci_dev *pdev)
32323232
* suspend/resume synchronization:
32333233
* entry points:
32343234
* netdev_open, netdev_close, netdev_ioctl, set_rx_mode, intr_handler,
3235-
* start_tx, tx_timeout
3235+
* start_tx, ns_tx_timeout
32363236
*
32373237
* No function accesses the hardware without checking np->hands_off.
32383238
* the check occurs under spin_lock_irq(&np->lock);

drivers/net/pcmcia/xirc2ps_cs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ typedef struct local_info_t {
353353
* Some more prototypes
354354
*/
355355
static int do_start_xmit(struct sk_buff *skb, struct net_device *dev);
356-
static void do_tx_timeout(struct net_device *dev);
356+
static void xirc_tx_timeout(struct net_device *dev);
357357
static void xirc2ps_tx_timeout_task(struct work_struct *work);
358358
static struct net_device_stats *do_get_stats(struct net_device *dev);
359359
static void set_addresses(struct net_device *dev);
@@ -590,7 +590,7 @@ xirc2ps_probe(struct pcmcia_device *link)
590590
dev->open = &do_open;
591591
dev->stop = &do_stop;
592592
#ifdef HAVE_TX_TIMEOUT
593-
dev->tx_timeout = do_tx_timeout;
593+
dev->tx_timeout = xirc_tx_timeout;
594594
dev->watchdog_timeo = TX_TIMEOUT;
595595
INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task);
596596
#endif
@@ -1335,7 +1335,7 @@ xirc2ps_tx_timeout_task(struct work_struct *work)
13351335
}
13361336

13371337
static void
1338-
do_tx_timeout(struct net_device *dev)
1338+
xirc_tx_timeout(struct net_device *dev)
13391339
{
13401340
local_info_t *lp = netdev_priv(dev);
13411341
lp->stats.tx_errors++;

0 commit comments

Comments
 (0)