diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2012-11-26 05:16:40 -0500 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2012-11-30 20:40:31 -0500 |
| commit | 4f0af69799b0e7b9805c4d174169f5ed7bf315c1 (patch) | |
| tree | cdfe7e938ae3c935b7515d8a6d7cd9706cbdebfe /drivers/infiniband | |
| parent | 948d1e889e5bd6ceffcc31db2beba39331087df3 (diff) | |
IB/srp: Process all error completions
If the RDMA RC connection is closed, tell the SCSI mid-layer to
terminate all pending commands instead of only the first.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
| -rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index c2883307020..f0843ef28e1 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
| @@ -1274,8 +1274,12 @@ static void srp_handle_qp_err(enum ib_wc_status wc_status, | |||
| 1274 | enum ib_wc_opcode wc_opcode, | 1274 | enum ib_wc_opcode wc_opcode, |
| 1275 | struct srp_target_port *target) | 1275 | struct srp_target_port *target) |
| 1276 | { | 1276 | { |
| 1277 | shost_printk(KERN_ERR, target->scsi_host, PFX "failed %s status %d\n", | 1277 | if (!target->qp_in_error) { |
| 1278 | wc_opcode & IB_WC_RECV ? "receive" : "send", wc_status); | 1278 | shost_printk(KERN_ERR, target->scsi_host, |
| 1279 | PFX "failed %s status %d\n", | ||
| 1280 | wc_opcode & IB_WC_RECV ? "receive" : "send", | ||
| 1281 | wc_status); | ||
| 1282 | } | ||
| 1279 | target->qp_in_error = true; | 1283 | target->qp_in_error = true; |
| 1280 | } | 1284 | } |
| 1281 | 1285 | ||
| @@ -1290,7 +1294,6 @@ static void srp_recv_completion(struct ib_cq *cq, void *target_ptr) | |||
| 1290 | srp_handle_recv(target, &wc); | 1294 | srp_handle_recv(target, &wc); |
| 1291 | } else { | 1295 | } else { |
| 1292 | srp_handle_qp_err(wc.status, wc.opcode, target); | 1296 | srp_handle_qp_err(wc.status, wc.opcode, target); |
| 1293 | break; | ||
| 1294 | } | 1297 | } |
| 1295 | } | 1298 | } |
| 1296 | } | 1299 | } |
| @@ -1307,7 +1310,6 @@ static void srp_send_completion(struct ib_cq *cq, void *target_ptr) | |||
| 1307 | list_add(&iu->list, &target->free_tx); | 1310 | list_add(&iu->list, &target->free_tx); |
| 1308 | } else { | 1311 | } else { |
| 1309 | srp_handle_qp_err(wc.status, wc.opcode, target); | 1312 | srp_handle_qp_err(wc.status, wc.opcode, target); |
| 1310 | break; | ||
| 1311 | } | 1313 | } |
| 1312 | } | 1314 | } |
| 1313 | } | 1315 | } |
