* [PATCH 0/4] Slience NCSI logging
@ 2018-06-18 7:19 Joel Stanley
2018-06-18 7:19 ` [PATCH 1/4] net/ncsi: Silence debug messages Joel Stanley
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Joel Stanley @ 2018-06-18 7:19 UTC (permalink / raw)
To: Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
Here are three changes to silence unnecessary warnings in the ncsi code.
The final patch adds Sam as the maintainer for NCSI.
Joel Stanley (4):
net/ncsi: Silence debug messages
net/ncsi: Drop no more channels message
net/ncsi: Use netdev_dbg for debug messages
MAINTAINERS: Add Sam as the maintainer for NCSI
MAINTAINERS | 5 +++
drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
net/ncsi/ncsi-aen.c | 10 ++---
net/ncsi/ncsi-manage.c | 49 +++++++++++-------------
4 files changed, 33 insertions(+), 33 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] net/ncsi: Silence debug messages
2018-06-18 7:19 [PATCH 0/4] Slience NCSI logging Joel Stanley
@ 2018-06-18 7:19 ` Joel Stanley
2018-06-18 20:49 ` Joe Perches
2018-06-18 7:19 ` [PATCH 2/4] net/ncsi: Drop no more channels message Joel Stanley
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Joel Stanley @ 2018-06-18 7:19 UTC (permalink / raw)
To: Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
In normal operation we see this series of messages as the host drives
the network device:
ftgmac100 1e660000.ethernet eth0: NCSI: LSC AEN - channel 0 state down
ftgmac100 1e660000.ethernet eth0: NCSI: suspending channel 0
ftgmac100 1e660000.ethernet eth0: NCSI: configuring channel 0
ftgmac100 1e660000.ethernet eth0: NCSI: channel 0 link down after config
ftgmac100 1e660000.ethernet eth0: NCSI interface down
ftgmac100 1e660000.ethernet eth0: NCSI: LSC AEN - channel 0 state up
ftgmac100 1e660000.ethernet eth0: NCSI: configuring channel 0
ftgmac100 1e660000.ethernet eth0: NCSI interface up
ftgmac100 1e660000.ethernet eth0: NCSI: LSC AEN - channel 0 state down
ftgmac100 1e660000.ethernet eth0: NCSI: suspending channel 0
ftgmac100 1e660000.ethernet eth0: NCSI: configuring channel 0
ftgmac100 1e660000.ethernet eth0: NCSI: channel 0 link down after config
ftgmac100 1e660000.ethernet eth0: NCSI interface down
ftgmac100 1e660000.ethernet eth0: NCSI: LSC AEN - channel 0 state up
ftgmac100 1e660000.ethernet eth0: NCSI: configuring channel 0
ftgmac100 1e660000.ethernet eth0: NCSI interface up
This makes all of these messages netdev_dbg. They are still useful to
debug eg. misbehaving network device firmware, but we do not need them
filling up the kernel logs in normal operation.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
net/ncsi/ncsi-aen.c | 4 ++--
net/ncsi/ncsi-manage.c | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 78db8e62a83f..a78413d5bfde 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1735,7 +1735,7 @@ static void ftgmac100_ncsi_handler(struct ncsi_dev *nd)
if (unlikely(nd->state != ncsi_dev_state_functional))
return;
- netdev_info(nd->dev, "NCSI interface %s\n",
+ netdev_dbg(nd->dev, "NCSI interface %s\n",
nd->link_up ? "up" : "down");
}
diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
index e7b05de1e6d1..f899ed61bb57 100644
--- a/net/ncsi/ncsi-aen.c
+++ b/net/ncsi/ncsi-aen.c
@@ -73,8 +73,8 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
ncm->data[2] = data;
ncm->data[4] = ntohl(lsc->oem_status);
- netdev_info(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n",
- nc->id, data & 0x1 ? "up" : "down");
+ netdev_dbg(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n",
+ nc->id, data & 0x1 ? "up" : "down");
chained = !list_empty(&nc->link);
state = nc->state;
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5561e221b71f..616441c2b54f 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -816,9 +816,9 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
} else {
hot_nc = NULL;
nc->state = NCSI_CHANNEL_INACTIVE;
- netdev_warn(ndp->ndev.dev,
- "NCSI: channel %u link down after config\n",
- nc->id);
+ netdev_dbg(ndp->ndev.dev,
+ "NCSI: channel %u link down after config\n",
+ nc->id);
}
spin_unlock_irqrestore(&nc->lock, flags);
@@ -1199,14 +1199,14 @@ int ncsi_process_next_channel(struct ncsi_dev_priv *ndp)
switch (old_state) {
case NCSI_CHANNEL_INACTIVE:
ndp->ndev.state = ncsi_dev_state_config;
- netdev_info(ndp->ndev.dev, "NCSI: configuring channel %u\n",
- nc->id);
+ netdev_dbg(ndp->ndev.dev, "NCSI: configuring channel %u\n",
+ nc->id);
ncsi_configure_channel(ndp);
break;
case NCSI_CHANNEL_ACTIVE:
ndp->ndev.state = ncsi_dev_state_suspend;
- netdev_info(ndp->ndev.dev, "NCSI: suspending channel %u\n",
- nc->id);
+ netdev_dbg(ndp->ndev.dev, "NCSI: suspending channel %u\n",
+ nc->id);
ncsi_suspend_channel(ndp);
break;
default:
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] net/ncsi: Drop no more channels message
2018-06-18 7:19 [PATCH 0/4] Slience NCSI logging Joel Stanley
2018-06-18 7:19 ` [PATCH 1/4] net/ncsi: Silence debug messages Joel Stanley
@ 2018-06-18 7:19 ` Joel Stanley
2018-06-18 7:19 ` [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages Joel Stanley
2018-06-18 7:19 ` [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI Joel Stanley
3 siblings, 0 replies; 9+ messages in thread
From: Joel Stanley @ 2018-06-18 7:19 UTC (permalink / raw)
To: Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
This does not provide useful information. As the ncsi maintainer said:
> either we get a channel or broadcom has gone out to lunch
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
net/ncsi/ncsi-manage.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 616441c2b54f..716493a61ba6 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -1226,8 +1226,6 @@ int ncsi_process_next_channel(struct ncsi_dev_priv *ndp)
return ncsi_choose_active_channel(ndp);
}
- netdev_printk(KERN_DEBUG, ndp->ndev.dev,
- "NCSI: No more channels to process\n");
ncsi_report_link(ndp, false);
return -ENODEV;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages
2018-06-18 7:19 [PATCH 0/4] Slience NCSI logging Joel Stanley
2018-06-18 7:19 ` [PATCH 1/4] net/ncsi: Silence debug messages Joel Stanley
2018-06-18 7:19 ` [PATCH 2/4] net/ncsi: Drop no more channels message Joel Stanley
@ 2018-06-18 7:19 ` Joel Stanley
2018-06-18 20:53 ` Joe Perches
2018-06-18 7:19 ` [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI Joel Stanley
3 siblings, 1 reply; 9+ messages in thread
From: Joel Stanley @ 2018-06-18 7:19 UTC (permalink / raw)
To: Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
This moves all of the netdev_printk(KERN_DEBUG, ...) messages over to
netdev_dbg. There is no change in behaviour.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
net/ncsi/ncsi-aen.c | 6 +++---
net/ncsi/ncsi-manage.c | 33 +++++++++++++++------------------
2 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
index f899ed61bb57..25e483e8278b 100644
--- a/net/ncsi/ncsi-aen.c
+++ b/net/ncsi/ncsi-aen.c
@@ -148,9 +148,9 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp,
hncdsc = (struct ncsi_aen_hncdsc_pkt *)h;
ncm->data[3] = ntohl(hncdsc->status);
spin_unlock_irqrestore(&nc->lock, flags);
- netdev_printk(KERN_DEBUG, ndp->ndev.dev,
- "NCSI: host driver %srunning on channel %u\n",
- ncm->data[3] & 0x1 ? "" : "not ", nc->id);
+ netdev_dbg(ndp->ndev.dev,
+ "NCSI: host driver %srunning on channel %u\n",
+ ncm->data[3] & 0x1 ? "" : "not ", nc->id);
return 0;
}
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 716493a61ba6..091284760d21 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -788,8 +788,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
}
break;
case ncsi_dev_state_config_done:
- netdev_printk(KERN_DEBUG, ndp->ndev.dev,
- "NCSI: channel %u config done\n", nc->id);
+ netdev_dbg(ndp->ndev.dev, "NCSI: channel %u config done\n",
+ nc->id);
spin_lock_irqsave(&nc->lock, flags);
if (nc->reconfigure_needed) {
/* 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);
spin_unlock_irqrestore(&ndp->lock, flags);
- netdev_printk(KERN_DEBUG, dev,
- "Dirty NCSI channel state reset\n");
+ netdev_dbg(dev, "Dirty NCSI channel state reset\n");
ncsi_process_next_channel(ndp);
break;
}
@@ -908,9 +907,9 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp)
}
ncm = &found->modes[NCSI_MODE_LINK];
- netdev_printk(KERN_DEBUG, ndp->ndev.dev,
- "NCSI: Channel %u added to queue (link %s)\n",
- found->id, ncm->data[2] & 0x1 ? "up" : "down");
+ netdev_dbg(ndp->ndev.dev,
+ "NCSI: Channel %u added to queue (link %s)\n",
+ found->id, ncm->data[2] & 0x1 ? "up" : "down");
out:
spin_lock_irqsave(&ndp->lock, flags);
@@ -1316,9 +1315,9 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
if ((ndp->ndev.state & 0xff00) ==
ncsi_dev_state_config ||
!list_empty(&nc->link)) {
- netdev_printk(KERN_DEBUG, nd->dev,
- "NCSI: channel %p marked dirty\n",
- nc);
+ netdev_dbg(nd->dev,
+ "NCSI: channel %p marked dirty\n",
+ nc);
nc->reconfigure_needed = true;
}
spin_unlock_irqrestore(&nc->lock, flags);
@@ -1336,8 +1335,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
list_add_tail_rcu(&nc->link, &ndp->channel_queue);
spin_unlock_irqrestore(&ndp->lock, flags);
- netdev_printk(KERN_DEBUG, nd->dev,
- "NCSI: kicked channel %p\n", nc);
+ netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc);
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) {
n_vids++;
if (vlan->vid == vid) {
- netdev_printk(KERN_DEBUG, dev,
- "NCSI: vid %u already registered\n", vid);
+ netdev_dbg(dev, "NCSI: vid %u already registered\n",
+ vid);
return 0;
}
}
@@ -1388,7 +1386,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
vlan->vid = vid;
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;
@@ -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 */
list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list)
if (vlan->vid == vid) {
- netdev_printk(KERN_DEBUG, dev,
- "NCSI: vid %u found, removing\n", vid);
+ netdev_dbg(dev, "NCSI: vid %u found, removing\n", vid);
list_del_rcu(&vlan->list);
found = true;
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);
}
EXPORT_SYMBOL_GPL(ncsi_stop_dev);
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI
2018-06-18 7:19 [PATCH 0/4] Slience NCSI logging Joel Stanley
` (2 preceding siblings ...)
2018-06-18 7:19 ` [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages Joel Stanley
@ 2018-06-18 7:19 ` Joel Stanley
2018-06-19 0:48 ` Samuel Mendoza-Jonas
3 siblings, 1 reply; 9+ messages in thread
From: Joel Stanley @ 2018-06-18 7:19 UTC (permalink / raw)
To: Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
Sam has been handing the maintenance of NCSI for a number release cycles
now.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
MAINTAINERS | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9d5eeff51b5f..44851f7c46fc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9756,6 +9756,11 @@ L: linux-scsi@vger.kernel.org
S: Maintained
F: drivers/scsi/NCR_D700.*
+NCSI LIBRARY:
+M: Samuel Mendoza-Jonas <sam@mendozajonas.com>
+S: Maintained
+F: net/ncsi/
+
NCT6775 HARDWARE MONITOR DRIVER
M: Guenter Roeck <linux@roeck-us.net>
L: linux-hwmon@vger.kernel.org
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] net/ncsi: Silence debug messages
2018-06-18 7:19 ` [PATCH 1/4] net/ncsi: Silence debug messages Joel Stanley
@ 2018-06-18 20:49 ` Joe Perches
0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2018-06-18 20:49 UTC (permalink / raw)
To: Joel Stanley, Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
On Mon, 2018-06-18 at 16:49 +0930, Joel Stanley wrote:
> In normal operation we see this series of messages as the host drives
> the network device:
>
> ftgmac100 1e660000.ethernet eth0: NCSI: LSC AEN - channel 0 state down
> ftgmac100 1e660000.ethernet eth0: NCSI: suspending channel 0
[...]
> This makes all of these messages netdev_dbg. They are still useful to
> debug eg. misbehaving network device firmware, but we do not need them
> filling up the kernel logs in normal operation.
trivia:
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
[]
> @@ -1735,7 +1735,7 @@ static void ftgmac100_ncsi_handler(struct ncsi_dev *nd)
> if (unlikely(nd->state != ncsi_dev_state_functional))
> return;
>
> - netdev_info(nd->dev, "NCSI interface %s\n",
> + netdev_dbg(nd->dev, "NCSI interface %s\n",
> nd->link_up ? "up" : "down");
It's nicer to realign the multiple line statements
to the open parenthesis
> diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
[]
> @@ -73,8 +73,8 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
> ncm->data[2] = data;
> ncm->data[4] = ntohl(lsc->oem_status);
>
> - netdev_info(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n",
> - nc->id, data & 0x1 ? "up" : "down");
> + netdev_dbg(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n",
> + nc->id, data & 0x1 ? "up" : "down");
as was done for the rest of these...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages
2018-06-18 7:19 ` [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages Joel Stanley
@ 2018-06-18 20:53 ` Joe Perches
2018-06-19 0:47 ` Samuel Mendoza-Jonas
0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2018-06-18 20:53 UTC (permalink / raw)
To: Joel Stanley, Samuel Mendoza-Jonas, David S . Miller; +Cc: netdev
On Mon, 2018-06-18 at 16:49 +0930, Joel Stanley wrote:
> This moves all of the netdev_printk(KERN_DEBUG, ...) messages over to
> netdev_dbg. There is no change in behaviour.
Not quite, but I think the patch is fine anyway.
netdev_printk(KERN_DEBUG ... is always emitted as
long as the console level includes debug output.
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.
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> net/ncsi/ncsi-aen.c | 6 +++---
> net/ncsi/ncsi-manage.c | 33 +++++++++++++++------------------
> 2 files changed, 18 insertions(+), 21 deletions(-)
>
> diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
> index f899ed61bb57..25e483e8278b 100644
> --- a/net/ncsi/ncsi-aen.c
> +++ b/net/ncsi/ncsi-aen.c
> @@ -148,9 +148,9 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp,
> hncdsc = (struct ncsi_aen_hncdsc_pkt *)h;
> ncm->data[3] = ntohl(hncdsc->status);
> spin_unlock_irqrestore(&nc->lock, flags);
> - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> - "NCSI: host driver %srunning on channel %u\n",
> - ncm->data[3] & 0x1 ? "" : "not ", nc->id);
> + netdev_dbg(ndp->ndev.dev,
> + "NCSI: host driver %srunning on channel %u\n",
> + ncm->data[3] & 0x1 ? "" : "not ", nc->id);
>
> return 0;
> }
> diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
> index 716493a61ba6..091284760d21 100644
> --- a/net/ncsi/ncsi-manage.c
> +++ b/net/ncsi/ncsi-manage.c
> @@ -788,8 +788,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
> }
> break;
> case ncsi_dev_state_config_done:
> - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> - "NCSI: channel %u config done\n", nc->id);
> + netdev_dbg(ndp->ndev.dev, "NCSI: channel %u config done\n",
> + nc->id);
> spin_lock_irqsave(&nc->lock, flags);
> if (nc->reconfigure_needed) {
> /* 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);
> spin_unlock_irqrestore(&ndp->lock, flags);
>
> - netdev_printk(KERN_DEBUG, dev,
> - "Dirty NCSI channel state reset\n");
> + netdev_dbg(dev, "Dirty NCSI channel state reset\n");
> ncsi_process_next_channel(ndp);
> break;
> }
> @@ -908,9 +907,9 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp)
> }
>
> ncm = &found->modes[NCSI_MODE_LINK];
> - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> - "NCSI: Channel %u added to queue (link %s)\n",
> - found->id, ncm->data[2] & 0x1 ? "up" : "down");
> + netdev_dbg(ndp->ndev.dev,
> + "NCSI: Channel %u added to queue (link %s)\n",
> + found->id, ncm->data[2] & 0x1 ? "up" : "down");
>
> out:
> spin_lock_irqsave(&ndp->lock, flags);
> @@ -1316,9 +1315,9 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
> if ((ndp->ndev.state & 0xff00) ==
> ncsi_dev_state_config ||
> !list_empty(&nc->link)) {
> - netdev_printk(KERN_DEBUG, nd->dev,
> - "NCSI: channel %p marked dirty\n",
> - nc);
> + netdev_dbg(nd->dev,
> + "NCSI: channel %p marked dirty\n",
> + nc);
> nc->reconfigure_needed = true;
> }
> spin_unlock_irqrestore(&nc->lock, flags);
> @@ -1336,8 +1335,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
> list_add_tail_rcu(&nc->link, &ndp->channel_queue);
> spin_unlock_irqrestore(&ndp->lock, flags);
>
> - netdev_printk(KERN_DEBUG, nd->dev,
> - "NCSI: kicked channel %p\n", nc);
> + netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc);
> 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) {
> n_vids++;
> if (vlan->vid == vid) {
> - netdev_printk(KERN_DEBUG, dev,
> - "NCSI: vid %u already registered\n", vid);
> + netdev_dbg(dev, "NCSI: vid %u already registered\n",
> + vid);
> return 0;
> }
> }
> @@ -1388,7 +1386,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
> vlan->vid = vid;
> 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;
>
> @@ -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 */
> list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list)
> if (vlan->vid == vid) {
> - netdev_printk(KERN_DEBUG, dev,
> - "NCSI: vid %u found, removing\n", vid);
> + netdev_dbg(dev, "NCSI: vid %u found, removing\n", vid);
> list_del_rcu(&vlan->list);
> found = true;
> 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);
> }
> EXPORT_SYMBOL_GPL(ncsi_stop_dev);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages
2018-06-18 20:53 ` Joe Perches
@ 2018-06-19 0:47 ` Samuel Mendoza-Jonas
0 siblings, 0 replies; 9+ messages in thread
From: Samuel Mendoza-Jonas @ 2018-06-19 0:47 UTC (permalink / raw)
To: Joe Perches, Joel Stanley, David S . Miller; +Cc: netdev
On Mon, 2018-06-18 at 13:53 -0700, Joe Perches wrote:
> On Mon, 2018-06-18 at 16:49 +0930, Joel Stanley wrote:
> > This moves all of the netdev_printk(KERN_DEBUG, ...) messages over to
> > netdev_dbg. There is no change in behaviour.
>
> Not quite, but I think the patch is fine anyway.
>
> netdev_printk(KERN_DEBUG ... is always emitted as
> long as the console level includes debug output.
>
> 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.
Right this is fine for these sort of messages; very noisy and not particularly
critical.
For this and the other logging updates:
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
>
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > ---
> > net/ncsi/ncsi-aen.c | 6 +++---
> > net/ncsi/ncsi-manage.c | 33 +++++++++++++++------------------
> > 2 files changed, 18 insertions(+), 21 deletions(-)
> >
> > diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
> > index f899ed61bb57..25e483e8278b 100644
> > --- a/net/ncsi/ncsi-aen.c
> > +++ b/net/ncsi/ncsi-aen.c
> > @@ -148,9 +148,9 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp,
> > hncdsc = (struct ncsi_aen_hncdsc_pkt *)h;
> > ncm->data[3] = ntohl(hncdsc->status);
> > spin_unlock_irqrestore(&nc->lock, flags);
> > - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> > - "NCSI: host driver %srunning on channel %u\n",
> > - ncm->data[3] & 0x1 ? "" : "not ", nc->id);
> > + netdev_dbg(ndp->ndev.dev,
> > + "NCSI: host driver %srunning on channel %u\n",
> > + ncm->data[3] & 0x1 ? "" : "not ", nc->id);
> >
> > return 0;
> > }
> > diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
> > index 716493a61ba6..091284760d21 100644
> > --- a/net/ncsi/ncsi-manage.c
> > +++ b/net/ncsi/ncsi-manage.c
> > @@ -788,8 +788,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
> > }
> > break;
> > case ncsi_dev_state_config_done:
> > - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> > - "NCSI: channel %u config done\n", nc->id);
> > + netdev_dbg(ndp->ndev.dev, "NCSI: channel %u config done\n",
> > + nc->id);
> > spin_lock_irqsave(&nc->lock, flags);
> > if (nc->reconfigure_needed) {
> > /* 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);
> > spin_unlock_irqrestore(&ndp->lock, flags);
> >
> > - netdev_printk(KERN_DEBUG, dev,
> > - "Dirty NCSI channel state reset\n");
> > + netdev_dbg(dev, "Dirty NCSI channel state reset\n");
> > ncsi_process_next_channel(ndp);
> > break;
> > }
> > @@ -908,9 +907,9 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp)
> > }
> >
> > ncm = &found->modes[NCSI_MODE_LINK];
> > - netdev_printk(KERN_DEBUG, ndp->ndev.dev,
> > - "NCSI: Channel %u added to queue (link %s)\n",
> > - found->id, ncm->data[2] & 0x1 ? "up" : "down");
> > + netdev_dbg(ndp->ndev.dev,
> > + "NCSI: Channel %u added to queue (link %s)\n",
> > + found->id, ncm->data[2] & 0x1 ? "up" : "down");
> >
> > out:
> > spin_lock_irqsave(&ndp->lock, flags);
> > @@ -1316,9 +1315,9 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
> > if ((ndp->ndev.state & 0xff00) ==
> > ncsi_dev_state_config ||
> > !list_empty(&nc->link)) {
> > - netdev_printk(KERN_DEBUG, nd->dev,
> > - "NCSI: channel %p marked dirty\n",
> > - nc);
> > + netdev_dbg(nd->dev,
> > + "NCSI: channel %p marked dirty\n",
> > + nc);
> > nc->reconfigure_needed = true;
> > }
> > spin_unlock_irqrestore(&nc->lock, flags);
> > @@ -1336,8 +1335,7 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
> > list_add_tail_rcu(&nc->link, &ndp->channel_queue);
> > spin_unlock_irqrestore(&ndp->lock, flags);
> >
> > - netdev_printk(KERN_DEBUG, nd->dev,
> > - "NCSI: kicked channel %p\n", nc);
> > + netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc);
> > 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) {
> > n_vids++;
> > if (vlan->vid == vid) {
> > - netdev_printk(KERN_DEBUG, dev,
> > - "NCSI: vid %u already registered\n", vid);
> > + netdev_dbg(dev, "NCSI: vid %u already registered\n",
> > + vid);
> > return 0;
> > }
> > }
> > @@ -1388,7 +1386,7 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
> > vlan->vid = vid;
> > 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;
> >
> > @@ -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 */
> > list_for_each_entry_safe(vlan, tmp, &ndp->vlan_vids, list)
> > if (vlan->vid == vid) {
> > - netdev_printk(KERN_DEBUG, dev,
> > - "NCSI: vid %u found, removing\n", vid);
> > + netdev_dbg(dev, "NCSI: vid %u found, removing\n", vid);
> > list_del_rcu(&vlan->list);
> > found = true;
> > 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);
> > }
> > EXPORT_SYMBOL_GPL(ncsi_stop_dev);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI
2018-06-18 7:19 ` [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI Joel Stanley
@ 2018-06-19 0:48 ` Samuel Mendoza-Jonas
0 siblings, 0 replies; 9+ messages in thread
From: Samuel Mendoza-Jonas @ 2018-06-19 0:48 UTC (permalink / raw)
To: Joel Stanley, David S . Miller; +Cc: netdev
On Mon, 2018-06-18 at 16:49 +0930, Joel Stanley wrote:
> Sam has been handing the maintenance of NCSI for a number release cycles
> now.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
I'm exposed!
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> ---
> MAINTAINERS | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9d5eeff51b5f..44851f7c46fc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9756,6 +9756,11 @@ L: linux-scsi@vger.kernel.org
> S: Maintained
> F: drivers/scsi/NCR_D700.*
>
> +NCSI LIBRARY:
> +M: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> +S: Maintained
> +F: net/ncsi/
> +
> NCT6775 HARDWARE MONITOR DRIVER
> M: Guenter Roeck <linux@roeck-us.net>
> L: linux-hwmon@vger.kernel.org
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-06-19 0:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 7:19 [PATCH 0/4] Slience NCSI logging Joel Stanley
2018-06-18 7:19 ` [PATCH 1/4] net/ncsi: Silence debug messages Joel Stanley
2018-06-18 20:49 ` Joe Perches
2018-06-18 7:19 ` [PATCH 2/4] net/ncsi: Drop no more channels message Joel Stanley
2018-06-18 7:19 ` [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages Joel Stanley
2018-06-18 20:53 ` Joe Perches
2018-06-19 0:47 ` Samuel Mendoza-Jonas
2018-06-18 7:19 ` [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI Joel Stanley
2018-06-19 0:48 ` Samuel Mendoza-Jonas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.