@@ -1904,24 +1904,28 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts)
1904
1904
goto drop_rdata_kref ;
1905
1905
}
1906
1906
1907
+ spin_lock_irqsave (& fcport -> rport_lock , flags );
1907
1908
if (!test_bit (QEDF_CMD_OUTSTANDING , & io_req -> flags ) ||
1908
1909
test_bit (QEDF_CMD_IN_CLEANUP , & io_req -> flags ) ||
1909
1910
test_bit (QEDF_CMD_IN_ABORT , & io_req -> flags )) {
1910
1911
QEDF_ERR (& qedf -> dbg_ctx ,
1911
1912
"io_req xid=0x%x sc_cmd=%p already in cleanup or abort processing or already completed.\n" ,
1912
1913
io_req -> xid , io_req -> sc_cmd );
1913
1914
rc = 1 ;
1915
+ spin_unlock_irqrestore (& fcport -> rport_lock , flags );
1914
1916
goto drop_rdata_kref ;
1915
1917
}
1916
1918
1919
+ /* Set the command type to abort */
1920
+ io_req -> cmd_type = QEDF_ABTS ;
1921
+ spin_unlock_irqrestore (& fcport -> rport_lock , flags );
1922
+
1917
1923
kref_get (& io_req -> refcount );
1918
1924
1919
1925
xid = io_req -> xid ;
1920
1926
qedf -> control_requests ++ ;
1921
1927
qedf -> packet_aborts ++ ;
1922
1928
1923
- /* Set the command type to abort */
1924
- io_req -> cmd_type = QEDF_ABTS ;
1925
1929
io_req -> return_scsi_cmd_on_abts = return_scsi_cmd_on_abts ;
1926
1930
1927
1931
set_bit (QEDF_CMD_IN_ABORT , & io_req -> flags );
@@ -2210,7 +2214,9 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
2210
2214
refcount , fcport , fcport -> rdata -> ids .port_id );
2211
2215
2212
2216
/* Cleanup cmds re-use the same TID as the original I/O */
2217
+ spin_lock_irqsave (& fcport -> rport_lock , flags );
2213
2218
io_req -> cmd_type = QEDF_CLEANUP ;
2219
+ spin_unlock_irqrestore (& fcport -> rport_lock , flags );
2214
2220
io_req -> return_scsi_cmd_on_abts = return_scsi_cmd_on_abts ;
2215
2221
2216
2222
init_completion (& io_req -> cleanup_done );
0 commit comments