Fixes ata_sas_queuecmd to properly handle a failure from __ata_scsi_queuecmd. Signed-off-by: Brian King <brking@xxxxxxxxxx> --- libata-dev-bjking1/drivers/ata/libata-scsi.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff -puN drivers/ata/libata-scsi.c~libata_sas_qcmd_response drivers/ata/libata-scsi.c --- libata-dev/drivers/ata/libata-scsi.c~libata_sas_qcmd_response 2006-11-20 13:49:29.000000000 -0600 +++ libata-dev-bjking1/drivers/ata/libata-scsi.c 2006-11-20 13:49:29.000000000 -0600 @@ -3330,20 +3330,23 @@ EXPORT_SYMBOL_GPL(ata_sas_slave_configur * @ap: ATA port to which the command is being sent * * RETURNS: - * Zero. + * Return value from __ata_scsi_queuecmd() if @cmd can be queued, + * 0 otherwise. */ int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), struct ata_port *ap) { + int rc = 0; + ata_scsi_dump_cdb(ap, cmd); if (likely(ata_scsi_dev_enabled(ap->device))) - __ata_scsi_queuecmd(cmd, done, ap->device); + rc = __ata_scsi_queuecmd(cmd, done, ap->device); else { cmd->result = (DID_BAD_TARGET << 16); done(cmd); } - return 0; + return rc; } EXPORT_SYMBOL_GPL(ata_sas_queuecmd); _ - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html