* [PATCH net-next] bnx2x: Remove open coded carrier check
@ 2017-05-16 12:20 Leon Romanovsky
2017-05-16 12:54 ` Mintz, Yuval
2017-05-16 19:49 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Leon Romanovsky @ 2017-05-16 12:20 UTC (permalink / raw)
To: Yuval Mintz, David S . Miller; +Cc: netdev, Leon Romanovsky
From: Leon Romanovsky <leonro@mellanox.com>
There is inline function to test if carrier present,
so it makes open-coded solution redundant.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index a851f95c307a..7414ffd70c90 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10303,7 +10303,7 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work)
}
if (test_and_clear_bit(BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN,
&bp->sp_rtnl_state)){
- if (!test_bit(__LINK_STATE_NOCARRIER, &bp->dev->state)) {
+ if (netif_carrier_ok(bp->dev)) {
bnx2x_tx_disable(bp);
BNX2X_ERR("PF indicated channel is not servicable anymore. This means this VF device is no longer operational\n");
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] bnx2x: Remove open coded carrier check
2017-05-16 12:20 [PATCH net-next] bnx2x: Remove open coded carrier check Leon Romanovsky
@ 2017-05-16 12:54 ` Mintz, Yuval
2017-05-16 19:49 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Mintz, Yuval @ 2017-05-16 12:54 UTC (permalink / raw)
To: Leon Romanovsky, David S . Miller; +Cc: netdev@vger.kernel.org, Leon Romanovsky
> There is inline function to test if carrier present, so it makes open-coded
> solution redundant.
>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Thanks Leon.
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bnx2x: Remove open coded carrier check
2017-05-16 12:20 [PATCH net-next] bnx2x: Remove open coded carrier check Leon Romanovsky
2017-05-16 12:54 ` Mintz, Yuval
@ 2017-05-16 19:49 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-05-16 19:49 UTC (permalink / raw)
To: leon; +Cc: Yuval.Mintz, netdev, leonro
From: Leon Romanovsky <leon@kernel.org>
Date: Tue, 16 May 2017 15:20:56 +0300
> From: Leon Romanovsky <leonro@mellanox.com>
>
> There is inline function to test if carrier present,
> so it makes open-coded solution redundant.
>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-16 19:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16 12:20 [PATCH net-next] bnx2x: Remove open coded carrier check Leon Romanovsky
2017-05-16 12:54 ` Mintz, Yuval
2017-05-16 19:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).