diff options
author | Dave C Boutcher <sleddog@us.ibm.com> | 2005-11-15 10:53:00 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-07 09:30:01 -0500 |
commit | bb58596f6802a4959c2cea02acd272245e671c1d (patch) | |
tree | e9fc2ebcd34b2301e471820f6cafcfcba96fddc6 /drivers | |
parent | e4f5c82a92c2a546a16af1614114eec19120e40a (diff) |
[SCSI] ibmvscsi kexec fix
This makes ibmvscsi work correctly with the recent set of kexec
patches that went in. This is based on work by Michael Ellerman, who
chased this initially. He validated that it works during kexec.
Handle kexec correctly in ibmvscsi. During kexec the adapter
will not get cleaned up correctly, so we may need to reset it
to make it sane again.
Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.h | 2 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/iseries_vscsi.c | 3 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/rpa_vscsi.c | 8 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h index 8bec0438dc8a..5b0edd1f1921 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.h +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h | |||
@@ -100,7 +100,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, | |||
100 | void ibmvscsi_release_crq_queue(struct crq_queue *queue, | 100 | void ibmvscsi_release_crq_queue(struct crq_queue *queue, |
101 | struct ibmvscsi_host_data *hostdata, | 101 | struct ibmvscsi_host_data *hostdata, |
102 | int max_requests); | 102 | int max_requests); |
103 | void ibmvscsi_reset_crq_queue(struct crq_queue *queue, | 103 | int ibmvscsi_reset_crq_queue(struct crq_queue *queue, |
104 | struct ibmvscsi_host_data *hostdata); | 104 | struct ibmvscsi_host_data *hostdata); |
105 | 105 | ||
106 | void ibmvscsi_handle_crq(struct viosrp_crq *crq, | 106 | void ibmvscsi_handle_crq(struct viosrp_crq *crq, |
diff --git a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c index 1045872b0175..ce15d9e39621 100644 --- a/drivers/scsi/ibmvscsi/iseries_vscsi.c +++ b/drivers/scsi/ibmvscsi/iseries_vscsi.c | |||
@@ -117,9 +117,10 @@ void ibmvscsi_release_crq_queue(struct crq_queue *queue, | |||
117 | * | 117 | * |
118 | * no-op for iSeries | 118 | * no-op for iSeries |
119 | */ | 119 | */ |
120 | void ibmvscsi_reset_crq_queue(struct crq_queue *queue, | 120 | int ibmvscsi_reset_crq_queue(struct crq_queue *queue, |
121 | struct ibmvscsi_host_data *hostdata) | 121 | struct ibmvscsi_host_data *hostdata) |
122 | { | 122 | { |
123 | return 0; | ||
123 | } | 124 | } |
124 | 125 | ||
125 | /** | 126 | /** |
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 8bf5652f1060..75db2f5c545e 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c | |||
@@ -230,6 +230,11 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, | |||
230 | rc = plpar_hcall_norets(H_REG_CRQ, | 230 | rc = plpar_hcall_norets(H_REG_CRQ, |
231 | vdev->unit_address, | 231 | vdev->unit_address, |
232 | queue->msg_token, PAGE_SIZE); | 232 | queue->msg_token, PAGE_SIZE); |
233 | if (rc == H_Resource) | ||
234 | /* maybe kexecing and resource is busy. try a reset */ | ||
235 | rc = ibmvscsi_reset_crq_queue(queue, | ||
236 | hostdata); | ||
237 | |||
233 | if (rc == 2) { | 238 | if (rc == 2) { |
234 | /* Adapter is good, but other end is not ready */ | 239 | /* Adapter is good, but other end is not ready */ |
235 | printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); | 240 | printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); |
@@ -281,7 +286,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, | |||
281 | * @hostdata: ibmvscsi_host_data of host | 286 | * @hostdata: ibmvscsi_host_data of host |
282 | * | 287 | * |
283 | */ | 288 | */ |
284 | void ibmvscsi_reset_crq_queue(struct crq_queue *queue, | 289 | int ibmvscsi_reset_crq_queue(struct crq_queue *queue, |
285 | struct ibmvscsi_host_data *hostdata) | 290 | struct ibmvscsi_host_data *hostdata) |
286 | { | 291 | { |
287 | int rc; | 292 | int rc; |
@@ -309,4 +314,5 @@ void ibmvscsi_reset_crq_queue(struct crq_queue *queue, | |||
309 | printk(KERN_WARNING | 314 | printk(KERN_WARNING |
310 | "ibmvscsi: couldn't register crq--rc 0x%x\n", rc); | 315 | "ibmvscsi: couldn't register crq--rc 0x%x\n", rc); |
311 | } | 316 | } |
317 | return rc; | ||
312 | } | 318 | } |