]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/nvme/host/tcp.c
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux.git] / drivers / nvme / host / tcp.c
index 6d43b23a0fc8bc15d2870da5fa850802ac9b8356..49d4373b84eb392531d7ce6f60099a41c042907d 100644 (file)
@@ -422,7 +422,7 @@ static void nvme_tcp_error_recovery(struct nvme_ctrl *ctrl)
        if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING))
                return;
 
-       queue_work(nvme_wq, &to_tcp_ctrl(ctrl)->err_work);
+       queue_work(nvme_reset_wq, &to_tcp_ctrl(ctrl)->err_work);
 }
 
 static int nvme_tcp_process_nvme_cqe(struct nvme_tcp_queue *queue,
@@ -1054,7 +1054,12 @@ static void nvme_tcp_io_work(struct work_struct *w)
                } else if (unlikely(result < 0)) {
                        dev_err(queue->ctrl->ctrl.device,
                                "failed to send request %d\n", result);
-                       if (result != -EPIPE)
+
+                       /*
+                        * Fail the request unless peer closed the connection,
+                        * in which case error recovery flow will complete all.
+                        */
+                       if ((result != -EPIPE) && (result != -ECONNRESET))
                                nvme_tcp_fail_request(queue->request);
                        nvme_tcp_done_send_req(queue);
                        return;