]> err.no Git - linux-2.6/commitdiff
[SCSI] iscsi bugfixes: send correct error values to userspace
authorMike Christie <michaelc@cs.wisc.edu>
Mon, 24 Jul 2006 20:47:11 +0000 (15:47 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 28 Jul 2006 16:47:23 +0000 (11:47 -0500)
In the xmit patch we are sending a -EXXX value to iscsi_conn_failure
which is causing userspace to get confused.

We should be sending a ISCSI_ERR_* value that userspace understands.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/iscsi_tcp.c

index 848fb2aa4ca36ba395cee5911a5ec4b446dc50f5..88dafdf45c47010facc229837078b36a484f09dd 100644 (file)
@@ -843,7 +843,7 @@ more:
                       if (rc == -EAGAIN)
                                goto nomore;
                       else {
-                               iscsi_conn_failure(conn, rc);
+                               iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
                                return 0;
                       }
                }
@@ -859,7 +859,7 @@ more:
                        }
                        tcp_conn->in_progress = IN_PROGRESS_DATA_RECV;
                } else if (rc) {
-                       iscsi_conn_failure(conn, rc);
+                       iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
                        return 0;
                }
        }
@@ -897,7 +897,7 @@ more:
                if (rc) {
                        if (rc == -EAGAIN)
                                goto again;
-                       iscsi_conn_failure(conn, rc);
+                       iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
                        return 0;
                }
                tcp_conn->in.copy -= tcp_conn->in.padding;