diff options
author | Joel Stanley <joel@jms.id.au> | 2017-11-14 04:30:59 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2017-11-14 05:22:58 +0300 |
commit | 52b6b7101c82f596b8b993d5f3151570bce18793 (patch) | |
tree | 7f47c6eda466d22388d6f5932c22a2159e9b2eb0 | |
parent | 67f0843b79e7adf0218f4846f4b330452b8f0f9c (diff) | |
download | linux-52b6b7101c82f596b8b993d5f3151570bce18793.tar.xz |
Revert "net/ncsi: General state debugging"
This reverts commit 61f3b32bd16707a18c2ff8ed23c8dafa7706fc6f.
We will take the upstream version of this patch.
OpenBMC-Staging-Count: 1
Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r-- | net/ncsi/ncsi-aen.c | 15 | ||||
-rw-r--r-- | net/ncsi/ncsi-manage.c | 52 | ||||
-rw-r--r-- | net/ncsi/ncsi-rsp.c | 10 |
3 files changed, 9 insertions, 68 deletions
diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c index 67e708e98ccf..f135938bf781 100644 --- a/net/ncsi/ncsi-aen.c +++ b/net/ncsi/ncsi-aen.c @@ -73,9 +73,6 @@ 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"); - chained = !list_empty(&nc->link); state = nc->state; spin_unlock_irqrestore(&nc->lock, flags); @@ -148,8 +145,6 @@ static int ncsi_aen_handler_hncdsc(struct ncsi_dev_priv *ndp, ncm = &nc->modes[NCSI_MODE_LINK]; hncdsc = (struct ncsi_aen_hncdsc_pkt *)h; ncm->data[3] = ntohl(hncdsc->status); - netdev_info(ndp->ndev.dev, "NCSI: HNCDSC AEN - channel %u state %s\n", - nc->id, ncm->data[3] & 0x3 ? "up" : "down"); if (!list_empty(&nc->link) || nc->state != NCSI_CHANNEL_ACTIVE) { spin_unlock_irqrestore(&nc->lock, flags); @@ -217,18 +212,10 @@ int ncsi_aen_handler(struct ncsi_dev_priv *ndp, struct sk_buff *skb) } ret = ncsi_validate_aen_pkt(h, nah->payload); - if (ret) { - netdev_warn(ndp->ndev.dev, - "NCSI: 'bad' packet ignored for AEN type 0x%x\n", - h->type); + if (ret) goto out; - } ret = nah->handler(ndp, h); - if (ret) - netdev_err(ndp->ndev.dev, - "NCSI: Handler for AEN type 0x%x returned %d\n", - h->type, ret); out: consume_skb(skb); return ret; diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index 97b76f26bde7..8cae2f233272 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c @@ -226,8 +226,6 @@ static void ncsi_channel_monitor(unsigned long data) case NCSI_CHANNEL_MONITOR_WAIT ... NCSI_CHANNEL_MONITOR_WAIT_MAX: break; default: - netdev_err(ndp->ndev.dev, "NCSI Channel %d timed out!\n", - nc->id); if (!(ndp->flags & NCSI_DEV_HWA)) { ncsi_report_link(ndp, true); ndp->flags |= NCSI_DEV_RESHUFFLE; @@ -771,11 +769,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) nca.package = np->id; nca.channel = NCSI_RESERVED_CHANNEL; ret = ncsi_xmit_cmd(&nca); - if (ret) { - netdev_err(ndp->ndev.dev, - "NCSI: Failed to transmit CMD_SP\n"); + if (ret) goto error; - } nd->state = ncsi_dev_state_config_cis; break; @@ -787,11 +782,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) nca.package = np->id; nca.channel = nc->id; ret = ncsi_xmit_cmd(&nca); - if (ret) { - netdev_err(ndp->ndev.dev, - "NCSI: Failed to transmit CMD_CIS\n"); + if (ret) goto error; - } nd->state = ncsi_dev_state_config_clear_vids; break; @@ -888,16 +880,10 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) } ret = ncsi_xmit_cmd(&nca); - if (ret) { - netdev_err(ndp->ndev.dev, - "NCSI: Failed to transmit CMD %x\n", - nca.type); + if (ret) goto error; - } break; case ncsi_dev_state_config_done: - netdev_printk(KERN_DEBUG, 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 @@ -925,9 +911,6 @@ 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); } spin_unlock_irqrestore(&nc->lock, flags); @@ -940,8 +923,8 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp) ncsi_process_next_channel(ndp); break; default: - netdev_alert(dev, "Wrong NCSI state 0x%x in config\n", - nd->state); + netdev_warn(dev, "Wrong NCSI state 0x%x in config\n", + nd->state); } return; @@ -993,17 +976,10 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp) } if (!found) { - netdev_warn(ndp->ndev.dev, - "NCSI: No channel found with link\n"); ncsi_report_link(ndp, true); return -ENODEV; } - 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"); - out: spin_lock_irqsave(&ndp->lock, flags); list_add_tail_rcu(&found->link, &ndp->channel_queue); @@ -1065,8 +1041,6 @@ static int ncsi_enable_hwa(struct ncsi_dev_priv *ndp) /* We can have no channels in extremely case */ if (list_empty(&ndp->channel_queue)) { - netdev_err(ndp->ndev.dev, - "NCSI: No available channels for HWA\n"); ncsi_report_link(ndp, false); return -ENOENT; } @@ -1235,9 +1209,6 @@ static void ncsi_probe_channel(struct ncsi_dev_priv *ndp) return; error: - netdev_err(ndp->ndev.dev, - "NCSI: Failed to transmit cmd 0x%x during probe\n", - nca.type); ncsi_report_link(ndp, true); } @@ -1291,14 +1262,10 @@ 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); 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); ncsi_suspend_channel(ndp); break; default: @@ -1318,8 +1285,6 @@ out: 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; } @@ -1601,12 +1566,10 @@ int ncsi_start_dev(struct ncsi_dev *nd) return 0; } - if (ndp->flags & NCSI_DEV_HWA) { - netdev_info(ndp->ndev.dev, "NCSI: Enabling HWA mode\n"); + if (ndp->flags & NCSI_DEV_HWA) ret = ncsi_enable_hwa(ndp); - } else { + else ret = ncsi_choose_active_channel(ndp); - } return ret; } @@ -1637,7 +1600,6 @@ void ncsi_stop_dev(struct ncsi_dev *nd) } } - netdev_printk(KERN_DEBUG, ndp->ndev.dev, "NCSI: Stopping device\n"); ncsi_report_link(ndp, true); } EXPORT_SYMBOL_GPL(ncsi_stop_dev); diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c index 58186c4102f0..927dad4759d1 100644 --- a/net/ncsi/ncsi-rsp.c +++ b/net/ncsi/ncsi-rsp.c @@ -1032,19 +1032,11 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev, if (payload < 0) payload = ntohs(hdr->length); ret = ncsi_validate_rsp_pkt(nr, payload); - if (ret) { - netdev_warn(ndp->ndev.dev, - "NCSI: 'bad' packet ignored for type 0x%x\n", - hdr->type); + if (ret) goto out; - } /* Process the packet */ ret = nrh->handler(nr); - if (ret) - netdev_err(ndp->ndev.dev, - "NCSI: Handler for packet type 0x%x returned %d\n", - hdr->type, ret); out: ncsi_free_request(nr); return ret; |