net/ncsi: Use netdev_dbg for debug messages
This moves all of the netdev_printk(KERN_DEBUG, ...) messages over to netdev_dbg. As Joe explains: > netdev_dbg is not included in object code unless > DEBUG is defined or CONFIG_DYNAMIC_DEBUG is set. > And then, it is not emitted into the log unless > DEBUG is set or this specific netdev_dbg is enabled > via the dynamic debug control file. Which is what we're after in this case. Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: David S. Miller <davem@davemloft.net>hifive-unleashed-5.1
parent
5d3b146736
commit
6e42a3f5cd
|
@ -148,7 +148,7 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp,
|
||||||
hncdsc = (struct ncsi_aen_hncdsc_pkt *)h;
|
hncdsc = (struct ncsi_aen_hncdsc_pkt *)h;
|
||||||
ncm->data[3] = ntohl(hncdsc->status);
|
ncm->data[3] = ntohl(hncdsc->status);
|
||||||
spin_unlock_irqrestore(&nc->lock, flags);
|
spin_unlock_irqrestore(&nc->lock, flags);
|
||||||
netdev_printk(KERN_DEBUG, ndp->ndev.dev,
|
netdev_dbg(ndp->ndev.dev,
|
||||||
"NCSI: host driver %srunning on channel %u\n",
|
"NCSI: host driver %srunning on channel %u\n",
|
||||||
ncm->data[3] & 0x1 ? "" : "not ", nc->id);
|
ncm->data[3] & 0x1 ? "" : "not ", nc->id);
|
||||||
|
|
||||||
|
|
|
@ -788,8 +788,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ncsi_dev_state_config_done:
|
case ncsi_dev_state_config_done:
|
||||||
netdev_printk(KERN_DEBUG, ndp->ndev.dev,
|
netdev_dbg(ndp->ndev.dev, "NCSI: channel %u config done\n",
|
||||||
"NCSI: channel %u config done\n", nc->id);
|
nc->id);
|
||||||
spin_lock_irqsave(&nc->lock, flags);
|
spin_lock_irqsave(&nc->lock, flags);
|
||||||
if (nc->reconfigure_needed) {
|
if (nc->reconfigure_needed) {
|
||||||
/* This channel's configuration has been updated
|
/* This channel's configuration has been updated
|
||||||
|
@ -804,8 +804,7 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
|
||||||
list_add_tail_rcu(&nc->link, &ndp->channel_queue);
|
list_add_tail_rcu(&nc->link, &ndp->channel_queue);
|
||||||
spin_unlock_irqrestore(&ndp->lock, flags);
|
spin_unlock_irqrestore(&ndp->lock, flags);
|
||||||
|
|
||||||
netdev_printk(KERN_DEBUG, dev,
|
netdev_dbg(dev, "Dirty NCSI channel state reset\n");
|
||||||
"Dirty NCSI channel state reset\n");
|
|
||||||
ncsi_process_next_channel(ndp);
|
ncsi_process_next_channel(ndp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -908,7 +907,7 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp)
|
||||||
}
|
}
|
||||||
|
|
||||||
ncm = &found->modes[NCSI_MODE_LINK];
|
ncm = &found->modes[NCSI_MODE_LINK];
|
||||||
netdev_printk(KERN_DEBUG, ndp->ndev.dev,
|
netdev_dbg(ndp->ndev.dev,
|
||||||
"NCSI: Channel %u added to queue (link %s)\n",
|
"NCSI: Channel %u added to queue (link %s)\n",
|
||||||
found->id, ncm->data[2] & 0x1 ? "up" : "down");
|
found->id, ncm->data[2] & 0x1 ? "up" : "down");
|
||||||
|
|
||||||
|
@ -1316,7 +1315,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
|
||||||
if ((ndp->ndev.state & 0xff00) ==
|
if ((ndp->ndev.state & 0xff00) ==
|
||||||
ncsi_dev_state_config ||
|
ncsi_dev_state_config ||
|
||||||
!list_empty(&nc->link)) {
|
!list_empty(&nc->link)) {
|
||||||
netdev_printk(KERN_DEBUG, nd->dev,
|
netdev_dbg(nd->dev,
|
||||||
"NCSI: channel %p marked dirty\n",
|
"NCSI: channel %p marked dirty\n",
|
||||||
nc);
|
nc);
|
||||||
nc->reconfigure_needed = true;
|
nc->reconfigure_needed = true;
|
||||||
|
@ -1336,8 +1335,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
|
||||||
list_add_tail_rcu(&nc->link, &ndp->channel_queue);
|
list_add_tail_rcu(&nc->link, &ndp->channel_queue);
|
||||||
spin_unlock_irqrestore(&ndp->lock, flags);
|
spin_unlock_irqrestore(&ndp->lock, flags);
|
||||||
|
|
||||||
netdev_printk(KERN_DEBUG, nd->dev,
|
netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc);
|
||||||
"NCSI: kicked channel %p\n", nc);
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1368,8 +1366,8 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
|
||||||
list_for_each_entry_rcu(vlan, &ndp->vlan_vids, list) {
|
list_for_each_entry_rcu(vlan, &ndp->vlan_vids, list) {
|
||||||
n_vids++;
|
n_vids++;
|
||||||
if (vlan->vid == vid) {
|
if (vlan->vid == vid) {
|
||||||
netdev_printk(KERN_DEBUG, dev,
|
netdev_dbg(dev, "NCSI: vid %u already registered\n",
|
||||||
"NCSI: vid %u already registered\n", vid);
|
vid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1388,7 +1386,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
|
||||||
vlan->vid = vid;
|
vlan->vid = vid;
|
||||||
list_add_rcu(&vlan->list, &ndp->vlan_vids);
|
list_add_rcu(&vlan->list, &ndp->vlan_vids);
|
||||||
|
|
||||||
netdev_printk(KERN_DEBUG, dev, "NCSI: Added new vid %u\n", vid);
|
netdev_dbg(dev, "NCSI: Added new vid %u\n", vid);
|
||||||
|
|
||||||
found = ncsi_kick_channels(ndp) != 0;
|
found = ncsi_kick_channels(ndp) != 0;
|
||||||
|
|
||||||
|
@ -1417,8 +1415,7 @@ int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
|
||||||
/* Remove the VLAN id from our internal list */
|
/* Remove the VLAN id from our internal list */
|
||||||
list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list)
|
list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list)
|
||||||
if (vlan->vid == vid) {
|
if (vlan->vid == vid) {
|
||||||
netdev_printk(KERN_DEBUG, dev,
|
netdev_dbg(dev, "NCSI: vid %u found, removing\n", vid);
|
||||||
"NCSI: vid %u found, removing\n", vid);
|
|
||||||
list_del_rcu(&vlan->list);
|
list_del_rcu(&vlan->list);
|
||||||
found = true;
|
found = true;
|
||||||
kfree(vlan);
|
kfree(vlan);
|
||||||
|
@ -1545,7 +1542,7 @@ void ncsi_stop_dev(struct ncsi_dev *nd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
netdev_printk(KERN_DEBUG, ndp->ndev.dev, "NCSI: Stopping device\n");
|
netdev_dbg(ndp->ndev.dev, "NCSI: Stopping device\n");
|
||||||
ncsi_report_link(ndp, true);
|
ncsi_report_link(ndp, true);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ncsi_stop_dev);
|
EXPORT_SYMBOL_GPL(ncsi_stop_dev);
|
||||||
|
|
Loading…
Reference in New Issue