Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104875
b: refs/heads/master
c: 6579e57
h: refs/heads/master
i:
  104873: edb0a21
  104871: d1178ea
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Jul 21, 2008
1 parent 474db77 commit ad2739e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7943986ca1138ac99597b1aa4dc893012dcfdc08
refs/heads/master: 6579e57b31d79d31d9b806e41ba48774e73257dc
2 changes: 2 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,8 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
extern int netdev_class_create_file(struct class_attribute *class_attr);
extern void netdev_class_remove_file(struct class_attribute *class_attr);

extern char *netdev_drivername(struct net_device *dev, char *buffer, int len);

extern void linkwatch_run_queue(void);

extern int netdev_compute_features(unsigned long all, unsigned long one);
Expand Down
20 changes: 20 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4686,6 +4686,26 @@ static int __net_init netdev_init(struct net *net)
return -ENOMEM;
}

char *netdev_drivername(struct net_device *dev, char *buffer, int len)
{
struct device_driver *driver;
struct device *parent;

if (len <= 0 || !buffer)
return buffer;
buffer[0] = 0;

parent = dev->dev.parent;

if (!parent)
return buffer;

driver = parent->driver;
if (driver && driver->name)
strlcpy(buffer, driver->name, len);
return buffer;
}

static void __net_exit netdev_exit(struct net *net)
{
kfree(net->dev_name_head);
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ static void dev_watchdog(unsigned long arg)
if (some_queue_stopped &&
time_after(jiffies, (dev->trans_start +
dev->watchdog_timeo))) {
printk(KERN_INFO "NETDEV WATCHDOG: %s: "
"transmit timed out\n",
dev->name);
char drivername[64];
printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n",
dev->name, netdev_drivername(dev, drivername, 64));
dev->tx_timeout(dev);
WARN_ON_ONCE(1);
}
Expand Down

0 comments on commit ad2739e

Please sign in to comment.