If a command is aborted by an abort error handler function in a LLD, and the aborted command comes back from the HBA with a status that indicates it was aborted, what status (in cmd->result, and/or sense data?) is the mid layer expecting in such a case? Just wondering, because in playing around with adding an abort handler to the hpsa driver for controllers which are able to do aborts, I can cause commands to be aborted, and I copy the sense data back to the mid layer, and give it a cmd->result = DID_ABORT << 16. That is, it's hitting this case in hpsa.c: complete_scsi_command() case CMD_ABORTED: cmd->result = DID_ABORT << 16; dev_warn(&h->pdev->dev, "cmd %s was aborted with " "status 0x%x\n", fmtcmd, ei->ScsiStatus); it does not seem to be hitting this case below, (same function). That is, it's not getting a target status/check condition/aborted command.) if (sense_key == ABORTED_COMMAND) { /* Aborted command is retryable */ dev_warn(&h->pdev->dev, "cmd %s " "has check condition: aborted command: " "ASC: 0x%x, ASCQ: 0x%x\n", fmtcmd, asc, ascq); cmd->result = DID_SOFT_ERROR << 16; break; } And, I have a dd running which I think I have aborted one of the commands that was reading data for that dd, and yet the dd proceeds happily along, oblivious. This makes me think I'm not doing the right thing to alert the mid layer that the command got aborted -- or else the midlayer is retrying the command somehow? I didn't see how this would happen, but maybe I missed it. Or, maybe I should be reporting the CMD_ABORTED case back as cmd->result = DID_SOFT_ERROR << 16; -- steve -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html