All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
@ 2017-12-05 12:33 Thomas Bogendoerfer
  2017-12-06 18:49 ` David Miller
  2017-12-06 19:27 ` Michael Chan
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Bogendoerfer @ 2017-12-05 12:33 UTC (permalink / raw)
  To: Michael Chan, netdev, linux-kernel

bnxt driver spams logfiles with

[  541.003065] bnxt_en 0000:5d:00.1 eth5: Link speed -1 no longer supported

if a direct attached cable (DAC) is plugged into the bnxt card and is
unplugged on the other side. This patch removes the code printing this
message, since it doesn't provide any useful information.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 8c1dd60eab6f..8a2319ed79dc 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1701,18 +1701,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
 	/* TODO CHIMP_FW: Define event id's for link change, error etc */
 	switch (event_id) {
 	case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
-		u32 data1 = le32_to_cpu(cmpl->event_data1);
-		struct bnxt_link_info *link_info = &bp->link_info;
-
 		if (BNXT_VF(bp))
 			goto async_event_process_exit;
-		if (data1 & 0x20000) {
-			u16 fw_speed = link_info->force_link_speed;
-			u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
 
-			netdev_warn(bp->dev, "Link speed %d no longer supported\n",
-				    speed);
-		}
 		set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
 		/* fall thru */
 	}
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-05 12:33 [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends Thomas Bogendoerfer
@ 2017-12-06 18:49 ` David Miller
  2017-12-06 19:27 ` Michael Chan
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2017-12-06 18:49 UTC (permalink / raw)
  To: tbogendoerfer; +Cc: michael.chan, netdev, linux-kernel

From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Date: Tue,  5 Dec 2017 13:33:40 +0100

> bnxt driver spams logfiles with
> 
> [  541.003065] bnxt_en 0000:5d:00.1 eth5: Link speed -1 no longer supported
> 
> if a direct attached cable (DAC) is plugged into the bnxt card and is
> unplugged on the other side. This patch removes the code printing this
> message, since it doesn't provide any useful information.
> 
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>

Michael, I really need you to review this.

Thank you.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-05 12:33 [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends Thomas Bogendoerfer
  2017-12-06 18:49 ` David Miller
@ 2017-12-06 19:27 ` Michael Chan
  2017-12-07  9:14   ` Thomas Bogendoerfer
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Chan @ 2017-12-06 19:27 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: Netdev, open list

On Tue, Dec 5, 2017 at 4:33 AM, Thomas Bogendoerfer
<tbogendoerfer@suse.de> wrote:
> bnxt driver spams logfiles with
>
> [  541.003065] bnxt_en 0000:5d:00.1 eth5: Link speed -1 no longer supported
>
> if a direct attached cable (DAC) is plugged into the bnxt card and is
> unplugged on the other side. This patch removes the code printing this
> message, since it doesn't provide any useful information.
>
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 8c1dd60eab6f..8a2319ed79dc 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -1701,18 +1701,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
>         /* TODO CHIMP_FW: Define event id's for link change, error etc */
>         switch (event_id) {
>         case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
> -               u32 data1 = le32_to_cpu(cmpl->event_data1);
> -               struct bnxt_link_info *link_info = &bp->link_info;
> -
>                 if (BNXT_VF(bp))
>                         goto async_event_process_exit;
> -               if (data1 & 0x20000) {
> -                       u16 fw_speed = link_info->force_link_speed;
> -                       u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
>
> -                       netdev_warn(bp->dev, "Link speed %d no longer supported\n",
> -                                   speed);
> -               }

This is supposed to provide useful information to the user under some
conditions.  In your particular situation, it is not useful since the
speed is -1.  Let me try to modify this code a bit to reduce the spam.
I will post a revised patch in the next 2 hours.

Thanks.

>                 set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
>                 /* fall thru */
>         }
> --
> 2.12.3
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-06 19:27 ` Michael Chan
@ 2017-12-07  9:14   ` Thomas Bogendoerfer
  2017-12-07  9:24     ` Michael Chan
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2017-12-07  9:14 UTC (permalink / raw)
  To: Michael Chan; +Cc: Netdev, open list

On Wed, 6 Dec 2017 11:27:31 -0800
Michael Chan <michael.chan@broadcom.com> wrote:

> On Tue, Dec 5, 2017 at 4:33 AM, Thomas Bogendoerfer
> <tbogendoerfer@suse.de> wrote:
> > bnxt driver spams logfiles with
> >
> > [  541.003065] bnxt_en 0000:5d:00.1 eth5: Link speed -1 no longer supported
> >
> > if a direct attached cable (DAC) is plugged into the bnxt card and is
> > unplugged on the other side. This patch removes the code printing this
> > message, since it doesn't provide any useful information.
> >
> > Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> > ---
> >  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > index 8c1dd60eab6f..8a2319ed79dc 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > @@ -1701,18 +1701,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
> >         /* TODO CHIMP_FW: Define event id's for link change, error etc */
> >         switch (event_id) {
> >         case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
> > -               u32 data1 = le32_to_cpu(cmpl->event_data1);
> > -               struct bnxt_link_info *link_info = &bp->link_info;
> > -
> >                 if (BNXT_VF(bp))
> >                         goto async_event_process_exit;
> > -               if (data1 & 0x20000) {
> > -                       u16 fw_speed = link_info->force_link_speed;
> > -                       u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
> >
> > -                       netdev_warn(bp->dev, "Link speed %d no longer supported\n",
> > -                                   speed);
> > -               }
> 
> This is supposed to provide useful information to the user under some
> conditions. 

well, it will print the forced rate, if there is one configured and -1 otherwise,
if the link is lost or will not come up because of a cable problem. I don't see much
value in that...

Thomas.

-- 
SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-07  9:14   ` Thomas Bogendoerfer
@ 2017-12-07  9:24     ` Michael Chan
  2017-12-07  9:39       ` Thomas Bogendoerfer
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Chan @ 2017-12-07  9:24 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: Netdev, open list

On Thu, Dec 7, 2017 at 1:14 AM, Thomas Bogendoerfer
<tbogendoerfer@suse.de> wrote:
> On Wed, 6 Dec 2017 11:27:31 -0800
> Michael Chan <michael.chan@broadcom.com> wrote:
>
>> On Tue, Dec 5, 2017 at 4:33 AM, Thomas Bogendoerfer
>> <tbogendoerfer@suse.de> wrote:
>> > bnxt driver spams logfiles with
>> >
>> > [  541.003065] bnxt_en 0000:5d:00.1 eth5: Link speed -1 no longer supported
>> >
>> > if a direct attached cable (DAC) is plugged into the bnxt card and is
>> > unplugged on the other side. This patch removes the code printing this
>> > message, since it doesn't provide any useful information.
>> >
>> > Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
>> > ---
>> >  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ---------
>> >  1 file changed, 9 deletions(-)
>> >
>> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> > index 8c1dd60eab6f..8a2319ed79dc 100644
>> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
>> > @@ -1701,18 +1701,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
>> >         /* TODO CHIMP_FW: Define event id's for link change, error etc */
>> >         switch (event_id) {
>> >         case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: {
>> > -               u32 data1 = le32_to_cpu(cmpl->event_data1);
>> > -               struct bnxt_link_info *link_info = &bp->link_info;
>> > -
>> >                 if (BNXT_VF(bp))
>> >                         goto async_event_process_exit;
>> > -               if (data1 & 0x20000) {
>> > -                       u16 fw_speed = link_info->force_link_speed;
>> > -                       u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
>> >
>> > -                       netdev_warn(bp->dev, "Link speed %d no longer supported\n",
>> > -                                   speed);
>> > -               }
>>
>> This is supposed to provide useful information to the user under some
>> conditions.
>
> well, it will print the forced rate, if there is one configured and -1 otherwise,
> if the link is lost or will not come up because of a cable problem. I don't see much
> value in that...
>
The main purpose is to tell the user that the speed he selected for a
port is no longer supported due to an incompatible speed configured on
the other port.  This is useful for the user so that he can either
take action to change the speed or do nothing as he sees fit.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-07  9:24     ` Michael Chan
@ 2017-12-07  9:39       ` Thomas Bogendoerfer
  2017-12-07  9:47         ` Michael Chan
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2017-12-07  9:39 UTC (permalink / raw)
  To: Michael Chan; +Cc: Netdev, open list

On Thu, 7 Dec 2017 01:24:43 -0800
Michael Chan <michael.chan@broadcom.com> wrote:

> On Thu, Dec 7, 2017 at 1:14 AM, Thomas Bogendoerfer
> <tbogendoerfer@suse.de> wrote:
> > well, it will print the forced rate, if there is one configured and -1 otherwise,
> > if the link is lost or will not come up because of a cable problem. I don't see much
> > value in that...
> >
> The main purpose is to tell the user that the speed he selected for a
> port is no longer supported due to an incompatible speed configured on
> the other port.  This is useful for the user so that he can either
> take action to change the speed or do nothing as he sees fit.

just out of curiosity what's meant my imcompatible speed on the other port ?
Does the message show up continously like in the problem case I already know ?

Thomas.

-- 
SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends
  2017-12-07  9:39       ` Thomas Bogendoerfer
@ 2017-12-07  9:47         ` Michael Chan
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Chan @ 2017-12-07  9:47 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: Netdev, open list

On Thu, Dec 7, 2017 at 1:39 AM, Thomas Bogendoerfer
<tbogendoerfer@suse.de> wrote:
> On Thu, 7 Dec 2017 01:24:43 -0800
> Michael Chan <michael.chan@broadcom.com> wrote:
>
>> On Thu, Dec 7, 2017 at 1:14 AM, Thomas Bogendoerfer
>> <tbogendoerfer@suse.de> wrote:
>> > well, it will print the forced rate, if there is one configured and -1 otherwise,
>> > if the link is lost or will not come up because of a cable problem. I don't see much
>> > value in that...
>> >
>> The main purpose is to tell the user that the speed he selected for a
>> port is no longer supported due to an incompatible speed configured on
>> the other port.  This is useful for the user so that he can either
>> take action to change the speed or do nothing as he sees fit.
>
> just out of curiosity what's meant my imcompatible speed on the other port ?
> Does the message show up continously like in the problem case I already know ?
>

On some dual-port cards, 10G and 25G are not compatible.  If one port
links up at 25G, for example, the other port will never link up if it
is set to 10G.  In this case the 10G port gets a message from the
firmware and the driver will print the "10G no longer supported"
message.  It's supposed to be a one time message.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-07  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 12:33 [PATCH net-next] bnxt: Don't print message, if DAC isn't connected on both ends Thomas Bogendoerfer
2017-12-06 18:49 ` David Miller
2017-12-06 19:27 ` Michael Chan
2017-12-07  9:14   ` Thomas Bogendoerfer
2017-12-07  9:24     ` Michael Chan
2017-12-07  9:39       ` Thomas Bogendoerfer
2017-12-07  9:47         ` Michael Chan

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.