.. | .. |
---|
1924 | 1924 | goto drop_rdata_kref; |
---|
1925 | 1925 | } |
---|
1926 | 1926 | |
---|
| 1927 | + spin_lock_irqsave(&fcport->rport_lock, flags); |
---|
1927 | 1928 | if (!test_bit(QEDF_CMD_OUTSTANDING, &io_req->flags) || |
---|
1928 | 1929 | test_bit(QEDF_CMD_IN_CLEANUP, &io_req->flags) || |
---|
1929 | 1930 | test_bit(QEDF_CMD_IN_ABORT, &io_req->flags)) { |
---|
.. | .. |
---|
1931 | 1932 | "io_req xid=0x%x sc_cmd=%p already in cleanup or abort processing or already completed.\n", |
---|
1932 | 1933 | io_req->xid, io_req->sc_cmd); |
---|
1933 | 1934 | rc = 1; |
---|
| 1935 | + spin_unlock_irqrestore(&fcport->rport_lock, flags); |
---|
1934 | 1936 | goto drop_rdata_kref; |
---|
1935 | 1937 | } |
---|
| 1938 | + |
---|
| 1939 | + /* Set the command type to abort */ |
---|
| 1940 | + io_req->cmd_type = QEDF_ABTS; |
---|
| 1941 | + spin_unlock_irqrestore(&fcport->rport_lock, flags); |
---|
1936 | 1942 | |
---|
1937 | 1943 | kref_get(&io_req->refcount); |
---|
1938 | 1944 | |
---|
.. | .. |
---|
1940 | 1946 | qedf->control_requests++; |
---|
1941 | 1947 | qedf->packet_aborts++; |
---|
1942 | 1948 | |
---|
1943 | | - /* Set the command type to abort */ |
---|
1944 | | - io_req->cmd_type = QEDF_ABTS; |
---|
1945 | 1949 | io_req->return_scsi_cmd_on_abts = return_scsi_cmd_on_abts; |
---|
1946 | 1950 | |
---|
1947 | 1951 | set_bit(QEDF_CMD_IN_ABORT, &io_req->flags); |
---|
.. | .. |
---|
2230 | 2234 | refcount, fcport, fcport->rdata->ids.port_id); |
---|
2231 | 2235 | |
---|
2232 | 2236 | /* Cleanup cmds re-use the same TID as the original I/O */ |
---|
| 2237 | + spin_lock_irqsave(&fcport->rport_lock, flags); |
---|
2233 | 2238 | io_req->cmd_type = QEDF_CLEANUP; |
---|
| 2239 | + spin_unlock_irqrestore(&fcport->rport_lock, flags); |
---|
2234 | 2240 | io_req->return_scsi_cmd_on_abts = return_scsi_cmd_on_abts; |
---|
2235 | 2241 | |
---|
2236 | 2242 | init_completion(&io_req->cleanup_done); |
---|