diff options
| -rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 16c5094bc86..3356bf36cd9 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
| @@ -802,6 +802,19 @@ int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | |||
| 802 | if (!list_empty(&sata_q)) { | 802 | if (!list_empty(&sata_q)) { |
| 803 | ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata cmd error handler\n"); | 803 | ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata cmd error handler\n"); |
| 804 | ata_scsi_cmd_error_handler(shost, ap, &sata_q); | 804 | ata_scsi_cmd_error_handler(shost, ap, &sata_q); |
| 805 | /* | ||
| 806 | * ata's error handler may leave the cmd on the list | ||
| 807 | * so make sure they don't remain on a stack list | ||
| 808 | * about to go out of scope. | ||
| 809 | * | ||
| 810 | * This looks strange, since the commands are | ||
| 811 | * now part of no list, but the next error | ||
| 812 | * action will be ata_port_error_handler() | ||
| 813 | * which takes no list and sweeps them up | ||
| 814 | * anyway from the ata tag array. | ||
| 815 | */ | ||
| 816 | while (!list_empty(&sata_q)) | ||
| 817 | list_del_init(sata_q.next); | ||
| 805 | } | 818 | } |
| 806 | } while (ap); | 819 | } while (ap); |
| 807 | 820 | ||
