History

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()

Linus Torvalds committed 13 years ago

Commit 67e5b2f2 parents 70a3067 58807a55 files · +21 −22Browse files

Unified · Split

5 files
  1. drivers/scsi/qla2xxx/tcm_qla2xxx.c +5 −1
  2. drivers/target/iscsi/iscsi_target_configfs.c +14 −13
  3. drivers/target/iscsi/iscsi_target_erl0.c +2 −2
  4. drivers/target/iscsi/iscsi_target_login.c +0 −3
  5. drivers/target/iscsi/iscsi_target_nego.c +0 −3
drivers/scsi/qla2xxx/tcm_qla2xxx.c+5−1
@@ -688,8 +688,12 @@ static int tcm_qla2xxx_queue_status(struct se_cmd *se_cmd) · 687 unmodified lines
688688 * For FCP_READ with CHECK_CONDITION status, clear cmd->bufflen
689689 * for qla_tgt_xmit_response LLD code
690690 */
691+ if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) {
692+ se_cmd->se_cmd_flags &= ~SCF_OVERFLOW_BIT;
693+ se_cmd->residual_count = 0;
694+ }
691695 se_cmd->se_cmd_flags |= SCF_UNDERFLOW_BIT;
692− se_cmd->residual_count = se_cmd->data_length;
696+ se_cmd->residual_count += se_cmd->data_length;
693697
694698 cmd->bufflen = 0;
695699 }
drivers/target/iscsi/iscsi_target_configfs.c+14−13
@@ -155,7 +155,7 @@ static ssize_t lio_target_np_store_iser( · 154 unmodified lines
155155 struct iscsi_tpg_np *tpg_np_iser = NULL;
156156 char *endptr;
157157 u32 op;
158− int rc;
158+ int rc = 0;
159159
160160 op = simple_strtoul(page, &endptr, 0);
161161 if ((op != 1) && (op != 0)) {
@@ -174,31 +174,32 @@ static ssize_t lio_target_np_store_iser( · 12 unmodified lines
174174 return -EINVAL;
175175
176176 if (op) {
177− int rc = request_module("ib_isert");
178− if (rc != 0)
177+ rc = request_module("ib_isert");
178+ if (rc != 0) {
179179 pr_warn("Unable to request_module for ib_isert\n");
180+ rc = 0;
181+ }
180182
181183 tpg_np_iser = iscsit_tpg_add_network_portal(tpg, &np->np_sockaddr,
182184 np->np_ip, tpg_np, ISCSI_INFINIBAND);
183− if (!tpg_np_iser || IS_ERR(tpg_np_iser))
185+ if (IS_ERR(tpg_np_iser)) {
186+ rc = PTR_ERR(tpg_np_iser);
184187 goto out;
188+ }
185189 } else {
186190 tpg_np_iser = iscsit_tpg_locate_child_np(tpg_np, ISCSI_INFINIBAND);
187− if (!tpg_np_iser)
188− goto out;
189−
190− rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser);
191− if (rc < 0)
192− goto out;
191+ if (tpg_np_iser) {
192+ rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser);
193+ if (rc < 0)
194+ goto out;
195+ }
193196 }
194197
195− printk("lio_target_np_store_iser() done, op: %d\n", op);
196−
197198 iscsit_put_tpg(tpg);
198199 return count;
199200 out:
200201 iscsit_put_tpg(tpg);
201− return -EINVAL;
202+ return rc;
202203 }
203204
204205 TF_NP_BASE_ATTR(lio_target, iser, S_IRUGO | S_IWUSR);
drivers/target/iscsi/iscsi_target_erl0.c+2−2
@@ -842,11 +842,11 @@ int iscsit_stop_time2retain_timer(struct iscsi_session *sess) · 841 unmodified lines
842842 return 0;
843843
844844 sess->time2retain_timer_flags |= ISCSI_TF_STOP;
845− spin_unlock_bh(&se_tpg->session_lock);
845+ spin_unlock(&se_tpg->session_lock);
846846
847847 del_timer_sync(&sess->time2retain_timer);
848848
849− spin_lock_bh(&se_tpg->session_lock);
849+ spin_lock(&se_tpg->session_lock);
850850 sess->time2retain_timer_flags &= ~ISCSI_TF_RUNNING;
851851 pr_debug("Stopped Time2Retain Timer for SID: %u\n",
852852 sess->sid);
drivers/target/iscsi/iscsi_target_login.c+0−3
@@ -984,8 +984,6 @@ int iscsi_target_setup_login_socket( · 983 unmodified lines
984984 }
985985
986986 np->np_transport = t;
987− printk("Set np->np_transport to %p -> %s\n", np->np_transport,
988− np->np_transport->name);
989987 return 0;
990988 }
991989
@@ -1002,7 +1000,6 @@ int iscsit_accept_np(struct iscsi_np *np, struct iscsi_conn *conn) · 10 unmodified lines
10021000
10031001 conn->sock = new_sock;
10041002 conn->login_family = np->np_sockaddr.ss_family;
1005− printk("iSCSI/TCP: Setup conn->sock from new_sock: %p\n", new_sock);
10061003
10071004 if (np->np_sockaddr.ss_family == AF_INET6) {
10081005 memset(&sock_in6, 0, sizeof(struct sockaddr_in6));
drivers/target/iscsi/iscsi_target_nego.c+0−3
@@ -721,9 +721,6 @@ int iscsi_target_locate_portal( · 720 unmodified lines
721721
722722 start += strlen(key) + strlen(value) + 2;
723723 }
724−
725− printk("i_buf: %s, s_buf: %s, t_buf: %s\n", i_buf, s_buf, t_buf);
726−
727724 /*
728725 * See 5.3. Login Phase.
729726 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t