[<prev] [next>] [day] [month] [year] [list]
Message-Id: <888a8efb514cb9ed984253de147b2b212c649dce.1703315854.git.christophe.jaillet@wanadoo.fr>
Date: Sat, 23 Dec 2023 08:18:04 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Saurav Kashyap <skashyap@...vell.com>,
Javed Hasan <jhasan@...vell.com>,
GR-QLogic-Storage-Upstream@...vell.com,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-scsi@...r.kernel.org
Subject: [PATCH] scsi: bnx2fc: Use netif_carrier_ok()
Use netif_carrier_ok() instead of hand-writing it.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 1078c20c5ef6..cf5b58798975 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -784,7 +784,7 @@ static int bnx2fc_link_ok(struct fc_lport *lport)
*/
void bnx2fc_get_link_state(struct bnx2fc_hba *hba)
{
- if (test_bit(__LINK_STATE_NOCARRIER, &hba->phys_dev->state))
+ if (!netif_carrier_ok(hba->phys_dev))
set_bit(ADAPTER_STATE_LINK_DOWN, &hba->adapter_state);
else
clear_bit(ADAPTER_STATE_LINK_DOWN, &hba->adapter_state);
--
2.34.1
Powered by blists - more mailing lists