Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15209
b: refs/heads/master
c: e5508c1
h: refs/heads/master
i:
  15207: 6f2edf8
v: v3
  • Loading branch information
Salyzyn, Mark authored and Linus Torvalds committed Dec 18, 2005
1 parent 36611af commit 4363234
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87d47d0547631e059c308b392cd2423fe9248c93
refs/heads/master: e5508c13ac25b07585229b144a45cf64a990171e
25 changes: 20 additions & 5 deletions trunk/drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,12 @@ static int adpt_abort(struct scsi_cmnd * cmd)
msg[2] = 0;
msg[3]= 0;
msg[4] = (u32)cmd;
if( (rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER)) != 0){
if (pHba->host)
spin_lock_irq(pHba->host->host_lock);
rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER);
if (pHba->host)
spin_unlock_irq(pHba->host->host_lock);
if (rcode != 0) {
if(rcode == -EOPNOTSUPP ){
printk(KERN_INFO"%s: Abort cmd not supported\n",pHba->name);
return FAILED;
Expand Down Expand Up @@ -697,18 +702,22 @@ static int adpt_device_reset(struct scsi_cmnd* cmd)
msg[2] = 0;
msg[3] = 0;

if (pHba->host)
spin_lock_irq(pHba->host->host_lock);
old_state = d->state;
d->state |= DPTI_DEV_RESET;
if( (rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER)) ){
d->state = old_state;
rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER);
d->state = old_state;
if (pHba->host)
spin_unlock_irq(pHba->host->host_lock);
if (rcode != 0) {
if(rcode == -EOPNOTSUPP ){
printk(KERN_INFO"%s: Device reset not supported\n",pHba->name);
return FAILED;
}
printk(KERN_INFO"%s: Device reset failed\n",pHba->name);
return FAILED;
} else {
d->state = old_state;
printk(KERN_INFO"%s: Device reset successful\n",pHba->name);
return SUCCESS;
}
Expand All @@ -721,6 +730,7 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd)
{
adpt_hba* pHba;
u32 msg[4];
u32 rcode;

pHba = (adpt_hba*)cmd->device->host->hostdata[0];
memset(msg, 0, sizeof(msg));
Expand All @@ -729,7 +739,12 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd)
msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid);
msg[2] = 0;
msg[3] = 0;
if(adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER) ){
if (pHba->host)
spin_lock_irq(pHba->host->host_lock);
rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER);
if (pHba->host)
spin_unlock_irq(pHba->host->host_lock);
if (rcode != 0) {
printk(KERN_WARNING"%s: Bus reset failed.\n",pHba->name);
return FAILED;
} else {
Expand Down

0 comments on commit 4363234

Please sign in to comment.