Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes

Changed files
+12 -6
Documentation
drivers
+6 -2
Documentation/scsi/scsi_eh.txt
··· 263 263 264 264 3. scmd recovered 265 265 ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd 266 - - shost->host_failed-- 267 266 - clear scmd->eh_eflags 268 267 - scsi_setup_cmd_retry() 269 268 - move from local eh_work_q to local eh_done_q 270 269 LOCKING: none 270 + CONCURRENCY: at most one thread per separate eh_work_q to 271 + keep queue manipulation lockless 271 272 272 273 4. EH completes 273 274 ACTION: scsi_eh_flush_done_q() retries scmds or notifies upper 274 - layer of failure. 275 + layer of failure. May be called concurrently but must have 276 + a no more than one thread per separate eh_work_q to 277 + manipulate the queue locklessly 275 278 - scmd is removed from eh_done_q and scmd->eh_entry is cleared 276 279 - if retry is necessary, scmd is requeued using 277 280 scsi_queue_insert() 278 281 - otherwise, scsi_finish_command() is invoked for scmd 282 + - zero shost->host_failed 279 283 LOCKING: queue or finish function performs appropriate locking 280 284 281 285
+1 -1
drivers/ata/libata-eh.c
··· 606 606 ata_scsi_port_error_handler(host, ap); 607 607 608 608 /* finish or retry handled scmd's and clean up */ 609 - WARN_ON(host->host_failed || !list_empty(&eh_work_q)); 609 + WARN_ON(!list_empty(&eh_work_q)); 610 610 611 611 DPRINTK("EXIT\n"); 612 612 }
+2 -2
drivers/scsi/53c700.c
··· 1122 1122 } else { 1123 1123 struct scsi_cmnd *SCp; 1124 1124 1125 - SCp = scsi_host_find_tag(SDp->host, SCSI_NO_TAG); 1125 + SCp = SDp->current_cmnd; 1126 1126 if(unlikely(SCp == NULL)) { 1127 1127 sdev_printk(KERN_ERR, SDp, 1128 1128 "no saved request for untagged cmd\n"); ··· 1826 1826 slot->tag, slot); 1827 1827 } else { 1828 1828 slot->tag = SCSI_NO_TAG; 1829 - /* must populate current_cmnd for scsi_host_find_tag to work */ 1829 + /* save current command for reselection */ 1830 1830 SCp->device->current_cmnd = SCp; 1831 1831 } 1832 1832 /* sanity check: some of the commands generated by the mid-layer
+3 -1
drivers/scsi/scsi_error.c
··· 1128 1128 */ 1129 1129 void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q) 1130 1130 { 1131 - scmd->device->host->host_failed--; 1132 1131 scmd->eh_eflags = 0; 1133 1132 list_move_tail(&scmd->eh_entry, done_q); 1134 1133 } ··· 2225 2226 shost->transportt->eh_strategy_handler(shost); 2226 2227 else 2227 2228 scsi_unjam_host(shost); 2229 + 2230 + /* All scmds have been handled */ 2231 + shost->host_failed = 0; 2228 2232 2229 2233 /* 2230 2234 * Note - if the above fails completely, the action is to take