aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic94xx/aic94xx_tmf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_tmf.c')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_tmf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c
index 0add73bdf2a4..50b914ffab94 100644
--- a/drivers/scsi/aic94xx/aic94xx_tmf.c
+++ b/drivers/scsi/aic94xx/aic94xx_tmf.c
@@ -181,7 +181,7 @@ static int asd_clear_nexus_I_T(struct domain_device *dev,
181int asd_I_T_nexus_reset(struct domain_device *dev) 181int asd_I_T_nexus_reset(struct domain_device *dev)
182{ 182{
183 int res, tmp_res, i; 183 int res, tmp_res, i;
184 struct sas_phy *phy = sas_find_local_phy(dev); 184 struct sas_phy *phy = sas_get_local_phy(dev);
185 /* Standard mandates link reset for ATA (type 0) and 185 /* Standard mandates link reset for ATA (type 0) and
186 * hard reset for SSP (type 1) */ 186 * hard reset for SSP (type 1) */
187 int reset_type = (dev->dev_type == SATA_DEV || 187 int reset_type = (dev->dev_type == SATA_DEV ||
@@ -201,7 +201,7 @@ int asd_I_T_nexus_reset(struct domain_device *dev)
201 for (i = 0 ; i < 3; i++) { 201 for (i = 0 ; i < 3; i++) {
202 tmp_res = asd_clear_nexus_I_T(dev, NEXUS_PHASE_RESUME); 202 tmp_res = asd_clear_nexus_I_T(dev, NEXUS_PHASE_RESUME);
203 if (tmp_res == TC_RESUME) 203 if (tmp_res == TC_RESUME)
204 return res; 204 goto out;
205 msleep(500); 205 msleep(500);
206 } 206 }
207 207
@@ -211,7 +211,10 @@ int asd_I_T_nexus_reset(struct domain_device *dev)
211 dev_printk(KERN_ERR, &phy->dev, 211 dev_printk(KERN_ERR, &phy->dev,
212 "Failed to resume nexus after reset 0x%x\n", tmp_res); 212 "Failed to resume nexus after reset 0x%x\n", tmp_res);
213 213
214 return TMF_RESP_FUNC_FAILED; 214 res = TMF_RESP_FUNC_FAILED;
215 out:
216 sas_put_local_phy(phy);
217 return res;
215} 218}
216 219
217static int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun) 220static int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun)