diff options
author | Dave C Boutcher <sleddog@us.ibm.com> | 2006-01-19 13:34:44 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-26 08:10:08 -0500 |
commit | 2b541f8f77fd339e4c5c5cbe8549b52445012704 (patch) | |
tree | 2df9275132ac1bdaadf6695e4d50132b8b955efd /drivers/scsi/ibmvscsi/rpa_vscsi.c | |
parent | 2dbb04c65561122cc53b22dbea9aa59f9609215b (diff) | |
download | talos-obmc-linux-2b541f8f77fd339e4c5c5cbe8549b52445012704.tar.gz talos-obmc-linux-2b541f8f77fd339e4c5c5cbe8549b52445012704.zip |
[SCSI] ibmvscsi: handle re-enable firmware message
New versions of the Power5 firmware can send a "re-enable" message to
the virtual scsi adapter. This fix makes us handle the message
correctly. Without it, the driver goes catatonic and the system crashes
unpleasantly.
Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/rpa_vscsi.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/rpa_vscsi.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 75db2f5c545e..f47dd87c05e7 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c @@ -281,6 +281,28 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, } /** + * reenable_crq_queue: - reenables a crq after + * @queue: crq_queue to initialize and register + * @hostdata: ibmvscsi_host_data of host + * + */ +int ibmvscsi_reenable_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata) +{ + int rc; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + + /* Re-enable the CRQ */ + do { + rc = plpar_hcall_norets(H_ENABLE_CRQ, vdev->unit_address); + } while ((rc == H_InProgress) || (rc == H_Busy) || (H_isLongBusy(rc))); + + if (rc) + printk(KERN_ERR "ibmvscsi: Error %d enabling adapter\n", rc); + return rc; +} + +/** * reset_crq_queue: - resets a crq after a failure * @queue: crq_queue to initialize and register * @hostdata: ibmvscsi_host_data of host |