aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/rpa_vscsi.c
diff options
context:
space:
mode:
authorDave C Boutcher <sleddog@us.ibm.com>2006-01-19 14:34:44 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-26 08:10:08 -0500
commit2b541f8f77fd339e4c5c5cbe8549b52445012704 (patch)
tree2df9275132ac1bdaadf6695e4d50132b8b955efd /drivers/scsi/ibmvscsi/rpa_vscsi.c
parent2dbb04c65561122cc53b22dbea9aa59f9609215b (diff)
[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.c22
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,
281} 281}
282 282
283/** 283/**
284 * reenable_crq_queue: - reenables a crq after
285 * @queue: crq_queue to initialize and register
286 * @hostdata: ibmvscsi_host_data of host
287 *
288 */
289int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
290 struct ibmvscsi_host_data *hostdata)
291{
292 int rc;
293 struct vio_dev *vdev = to_vio_dev(hostdata->dev);
294
295 /* Re-enable the CRQ */
296 do {
297 rc = plpar_hcall_norets(H_ENABLE_CRQ, vdev->unit_address);
298 } while ((rc == H_InProgress) || (rc == H_Busy) || (H_isLongBusy(rc)));
299
300 if (rc)
301 printk(KERN_ERR "ibmvscsi: Error %d enabling adapter\n", rc);
302 return rc;
303}
304
305/**
284 * reset_crq_queue: - resets a crq after a failure 306 * reset_crq_queue: - resets a crq after a failure
285 * @queue: crq_queue to initialize and register 307 * @queue: crq_queue to initialize and register
286 * @hostdata: ibmvscsi_host_data of host 308 * @hostdata: ibmvscsi_host_data of host