patch-2.4.21 linux-2.4.21/drivers/scsi/dpt_i2o.c
Next file: linux-2.4.21/drivers/scsi/eata_generic.h
Previous file: linux-2.4.21/drivers/scsi/cyberstormII.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
2003-06-13 07:51:36.000000000 -0700
- Orig file:
linux-2.4.20/drivers/scsi/dpt_i2o.c
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/scsi/dpt_i2o.c linux-2.4.21/drivers/scsi/dpt_i2o.c
@@ -1318,7 +1318,9 @@
while(*status == 0){
if(time_after(jiffies,timeout)){
printk(KERN_WARNING"%s: IOP Reset Timeout\n",pHba->name);
- kfree(status);
+ /* We loose 4 bytes of "status" here, but we cannot
+ free these because controller may awake and corrupt
+ those bytes at any time */
return -ETIMEDOUT;
}
rmb();
@@ -1336,6 +1338,9 @@
}
if(time_after(jiffies,timeout)){
printk(KERN_ERR "%s:Timeout waiting for IOP Reset.\n",pHba->name);
+ /* We loose 4 bytes of "status" here, but we cannot
+ free these because controller may awake and corrupt
+ those bytes at any time */
return -ETIMEDOUT;
}
} while (m == EMPTY_QUEUE);
@@ -1498,7 +1503,7 @@
pDev->next_lun; pDev = pDev->next_lun){
}
pDev->next_lun = kmalloc(sizeof(struct adpt_device),GFP_KERNEL);
- if(pDev == NULL) {
+ if(pDev->next_lun == NULL) {
return -ENOMEM;
}
memset(pDev->next_lun,0,sizeof(struct adpt_device));
@@ -2560,7 +2565,7 @@
if(pHba->initialized ) {
if (adpt_i2o_status_get(pHba) < 0) {
- if((rcode = adpt_i2o_reset_hba(pHba) != 0)){
+ if((rcode = adpt_i2o_reset_hba(pHba)) != 0){
printk(KERN_WARNING"%s: Could NOT reset.\n", pHba->name);
return rcode;
}
@@ -2586,7 +2591,7 @@
}
}
} else {
- if((rcode = adpt_i2o_reset_hba(pHba) != 0)){
+ if((rcode = adpt_i2o_reset_hba(pHba)) != 0){
printk(KERN_WARNING"%s: Could NOT reset.\n", pHba->name);
return rcode;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)