From 8f3b8fa9afe75cafc4feb317d305444f6c5271fb Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 11 Jan 2007 14:15:12 -0800 Subject: [SCSI] aic94xx: Don't eat TMF_QUERY_TASK results In this driver, TMF_QUERY_TASK translates to QUERY_SSP_TASK. The sequencer, it seems, is perfectly happy sending us a SSP response, which this function promptly "converts" into TMF_RESP_FUNC_FAILED. This leads to the SAS EH making bad decisions based on bad data, so we should not perform the conversion in this case. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley --- drivers/scsi/aic94xx/aic94xx_tmf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/scsi/aic94xx/aic94xx_tmf.c') diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 6123438..fd5269e 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -566,6 +566,11 @@ static int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun, res = TMF_RESP_FUNC_ESUPP; break; default: + if (tmf == TMF_QUERY_TASK) { + ASD_DPRINTK("%s: QUERY_SSP_TASK response: 0x%x\n", + __FUNCTION__, res); + break; + } ASD_DPRINTK("%s: converting result 0x%x to TMF_RESP_FUNC_FAILED\n", __FUNCTION__, res); res = TMF_RESP_FUNC_FAILED; -- cgit v1.1 From 058e2c474897dc53c88ac9162f9a9b16a879b8cd Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 29 Jan 2007 23:48:22 -0800 Subject: [SCSI] aic94xx: Remove TMF result code munging In asd_initiate_ssp_tmf, the TMF result code is replaced with TMF_RESP_FUNC_FAILED except when the TMF returns a result code immediately. However, TMFs can return result codes via an ESCB... yet these codes are also replaced with "FAILED". The only values that can fall into that case are TMF_* codes anyway, so get rid of this code where COMPLETE and SUCCESS are turned into FAILED. This also lets us propagate those TMF_* codes up to the caller. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley --- drivers/scsi/aic94xx/aic94xx_tmf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers/scsi/aic94xx/aic94xx_tmf.c') diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index fd5269e..9a14a6d 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -566,14 +566,7 @@ static int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun, res = TMF_RESP_FUNC_ESUPP; break; default: - if (tmf == TMF_QUERY_TASK) { - ASD_DPRINTK("%s: QUERY_SSP_TASK response: 0x%x\n", - __FUNCTION__, res); - break; - } - ASD_DPRINTK("%s: converting result 0x%x to TMF_RESP_FUNC_FAILED\n", - __FUNCTION__, res); - res = TMF_RESP_FUNC_FAILED; + /* Allow TMF response codes to propagate upwards */ break; } out_err: -- cgit v1.1