]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
scsi: qedf: Stop sending fipvlan request on unload
authorSaurav Kashyap <skashyap@marvell.com>
Fri, 23 Aug 2019 09:52:32 +0000 (02:52 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Aug 2019 22:44:21 +0000 (18:44 -0400)
 - On some setups fipvlan can be retried for long duration and the
   connection to switch was not there so it was not getting any reply.

 - During unload this thread was hanging.

Problem Resolution:

Check if unload is in progress, then quit from fipvlan thread.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_main.c

index 3e245b08fb1096ee41afc63edf153f747805c0c0..2d69860d1f06d35cc7470078eaa494a7a26ebe50 100644 (file)
@@ -128,6 +128,11 @@ static bool qedf_initiate_fipvlan_req(struct qedf_ctx *qedf)
                        return false;
                }
 
+               if (test_bit(QEDF_UNLOADING, &qedf->flags)) {
+                       QEDF_ERR(&qedf->dbg_ctx, "Driver unloading.\n");
+                       return false;
+               }
+
                if (qedf->vlan_id > 0) {
                        QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_DISC,
                                  "vlan = 0x%x already set.\n", qedf->vlan_id);