Skip to content

Commit

Permalink
Merge branch 'NCSI-silence-warning-messages'
Browse files Browse the repository at this point in the history
Joel Stanley says:

====================
Slience NCSI logging

v2:
  Fix indent issue and commit message based on Joe's feedback
  Add Sam's acks

Here are three changes to silence unnecessary warnings in the ncsi code.

The final patch adds Sam as the maintainer for NCSI.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Jun 19, 2018
2 parents c51818d + 01a2198 commit d1a65e2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
5 changes: 5 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/faraday/ftgmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,8 +1735,8 @@ 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",
nd->link_up ? "up" : "down");
netdev_dbg(nd->dev, "NCSI interface %s\n",
nd->link_up ? "up" : "down");
}

static void ftgmac100_setup_clk(struct ftgmac100 *priv)
Expand Down
10 changes: 5 additions & 5 deletions net/ncsi/ncsi-aen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
49 changes: 22 additions & 27 deletions net/ncsi/ncsi-manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand All @@ -816,9 +815,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);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1199,14 +1198,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:
Expand All @@ -1226,8 +1225,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;
}
Expand Down Expand Up @@ -1318,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);
Expand All @@ -1338,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++;
}
}
Expand Down Expand Up @@ -1370,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;
}
}
Expand All @@ -1390,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;

Expand Down Expand Up @@ -1419,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);
Expand Down Expand Up @@ -1547,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);
Expand Down

0 comments on commit d1a65e2

Please sign in to comment.