Commit 67e5b2fa authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Included is the recent tcm_qla2xxx residual underrun length fix from
  Roland, along with Joern's iscsi-target patch for session_lock
  breakage within iscsit_stop_time2retain_timer() code.  Both are CC'ed
  to stable.

  The remaining two are specific to recent iscsi-target + iser
  conversion changes.  One drops some left-over debug noise, and Andy's
  patch fixes configfs attribute handling during an explicit network
  portal feature bit disable when iser-target is unsupported."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: Remove left over v3.10-rc debug printks
  target/iscsi: Fix op=disable + error handling cases in np_store_iser
  tcm_qla2xxx: Fix residual for underrun commands that fail
  target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()
parents 70a3067d 58807a52
......@@ -688,8 +688,12 @@ static int tcm_qla2xxx_queue_status(struct se_cmd *se_cmd)
* For FCP_READ with CHECK_CONDITION status, clear cmd->bufflen
* for qla_tgt_xmit_response LLD code
*/
if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) {
se_cmd->se_cmd_flags &= ~SCF_OVERFLOW_BIT;
se_cmd->residual_count = 0;
}
se_cmd->se_cmd_flags |= SCF_UNDERFLOW_BIT;
se_cmd->residual_count = se_cmd->data_length;
se_cmd->residual_count += se_cmd->data_length;
cmd->bufflen = 0;
}
......
......@@ -155,7 +155,7 @@ static ssize_t lio_target_np_store_iser(
struct iscsi_tpg_np *tpg_np_iser = NULL;
char *endptr;
u32 op;
int rc;
int rc = 0;
op = simple_strtoul(page, &endptr, 0);
if ((op != 1) && (op != 0)) {
......@@ -174,31 +174,32 @@ static ssize_t lio_target_np_store_iser(
return -EINVAL;
if (op) {
int rc = request_module("ib_isert");
if (rc != 0)
rc = request_module("ib_isert");
if (rc != 0) {
pr_warn("Unable to request_module for ib_isert\n");
rc = 0;
}
tpg_np_iser = iscsit_tpg_add_network_portal(tpg, &np->np_sockaddr,
np->np_ip, tpg_np, ISCSI_INFINIBAND);
if (!tpg_np_iser || IS_ERR(tpg_np_iser))
if (IS_ERR(tpg_np_iser)) {
rc = PTR_ERR(tpg_np_iser);
goto out;
}
} else {
tpg_np_iser = iscsit_tpg_locate_child_np(tpg_np, ISCSI_INFINIBAND);
if (!tpg_np_iser)
goto out;
if (tpg_np_iser) {
rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser);
if (rc < 0)
goto out;
}
printk("lio_target_np_store_iser() done, op: %d\n", op);
}
iscsit_put_tpg(tpg);
return count;
out:
iscsit_put_tpg(tpg);
return -EINVAL;
return rc;
}
TF_NP_BASE_ATTR(lio_target, iser, S_IRUGO | S_IWUSR);
......
......@@ -842,11 +842,11 @@ int iscsit_stop_time2retain_timer(struct iscsi_session *sess)
return 0;
sess->time2retain_timer_flags |= ISCSI_TF_STOP;
spin_unlock_bh(&se_tpg->session_lock);
spin_unlock(&se_tpg->session_lock);
del_timer_sync(&sess->time2retain_timer);
spin_lock_bh(&se_tpg->session_lock);
spin_lock(&se_tpg->session_lock);
sess->time2retain_timer_flags &= ~ISCSI_TF_RUNNING;
pr_debug("Stopped Time2Retain Timer for SID: %u\n",
sess->sid);
......
......@@ -984,8 +984,6 @@ int iscsi_target_setup_login_socket(
}
np->np_transport = t;
printk("Set np->np_transport to %p -> %s\n", np->np_transport,
np->np_transport->name);
return 0;
}
......@@ -1002,7 +1000,6 @@ int iscsit_accept_np(struct iscsi_np *np, struct iscsi_conn *conn)
conn->sock = new_sock;
conn->login_family = np->np_sockaddr.ss_family;
printk("iSCSI/TCP: Setup conn->sock from new_sock: %p\n", new_sock);
if (np->np_sockaddr.ss_family == AF_INET6) {
memset(&sock_in6, 0, sizeof(struct sockaddr_in6));
......
......@@ -721,9 +721,6 @@ int iscsi_target_locate_portal(
start += strlen(key) + strlen(value) + 2;
}
printk("i_buf: %s, s_buf: %s, t_buf: %s\n", i_buf, s_buf, t_buf);
/*
* See 5.3. Login Phase.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment