* [PATCH] ibmvscsi kexec fix
@ 2005-11-15 15:53 Dave C Boutcher
2005-12-02 19:28 ` Dave C Boutcher
0 siblings, 1 reply; 3+ messages in thread
From: Dave C Boutcher @ 2005-11-15 15:53 UTC (permalink / raw)
To: linux-scsi; +Cc: Michael Ellerman
James, this is a 2.6.15 candidate...it 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>
--- linux-2.6.15-rc1-orig/drivers/scsi/ibmvscsi/ibmvscsi.h 2005-11-14 14:55:32.000000000 -0600
+++ linux-2.6.15-rc1/drivers/scsi/ibmvscsi/ibmvscsi.h 2005-11-14 21:13:52.000000000 -0600
@@ -100,7 +100,7 @@
void ibmvscsi_release_crq_queue(struct crq_queue *queue,
struct ibmvscsi_host_data *hostdata,
int max_requests);
-void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
+int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
struct ibmvscsi_host_data *hostdata);
void ibmvscsi_handle_crq(struct viosrp_crq *crq,
--- linux-2.6.15-rc1-orig/drivers/scsi/ibmvscsi/rpa_vscsi.c 2005-11-14 14:55:32.000000000 -0600
+++ linux-2.6.15-rc1/drivers/scsi/ibmvscsi/rpa_vscsi.c 2005-11-14 21:13:51.000000000 -0600
@@ -230,6 +230,11 @@
rc = plpar_hcall_norets(H_REG_CRQ,
vdev->unit_address,
queue->msg_token, PAGE_SIZE);
+ if (rc == H_Resource)
+ /* maybe kexecing and resource is busy. try a reset */
+ rc = ibmvscsi_reset_crq_queue(queue,
+ hostdata);
+
if (rc == 2) {
/* Adapter is good, but other end is not ready */
printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n");
@@ -281,7 +286,7 @@
* @hostdata: ibmvscsi_host_data of host
*
*/
-void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
+int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
struct ibmvscsi_host_data *hostdata)
{
int rc;
@@ -309,4 +314,5 @@
printk(KERN_WARNING
"ibmvscsi: couldn't register crq--rc 0x%x\n", rc);
}
+ return rc;
}
--- linux-2.6.15-rc1-orig/drivers/scsi/ibmvscsi/iseries_vscsi.c 2005-11-14 14:56:47.000000000 -0600
+++ linux-2.6.15-rc1/drivers/scsi/ibmvscsi/iseries_vscsi.c 2005-11-14 21:13:53.000000000 -0600
@@ -117,9 +117,10 @@
*
* no-op for iSeries
*/
-void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
+int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
struct ibmvscsi_host_data *hostdata)
{
+ return 0;
}
/**
--
Dave Boutcher
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ibmvscsi kexec fix
2005-11-15 15:53 [PATCH] ibmvscsi kexec fix Dave C Boutcher
@ 2005-12-02 19:28 ` Dave C Boutcher
2005-12-05 2:52 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Dave C Boutcher @ 2005-12-02 19:28 UTC (permalink / raw)
To: linux-scsi, Michael Ellerman
On Tue, Nov 15, 2005 at 09:53:00AM -0600, Dave C Boutcher wrote:
> James, this is a 2.6.15 candidate...it 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>
James, if this doesn't make it into 2.6.15 it won't totally break
my heart, since I'm not sure how many people are using ppc64
kexec, but was there some reason this patch wasn't included in
your 2.6.15 fixes?
--
Dave Boutcher
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ibmvscsi kexec fix
2005-12-02 19:28 ` Dave C Boutcher
@ 2005-12-05 2:52 ` James Bottomley
0 siblings, 0 replies; 3+ messages in thread
From: James Bottomley @ 2005-12-05 2:52 UTC (permalink / raw)
To: boutcher; +Cc: linux-scsi, Michael Ellerman
On Fri, 2005-12-02 at 13:28 -0600, Dave C Boutcher wrote:
> James, if this doesn't make it into 2.6.15 it won't totally break
> my heart, since I'm not sure how many people are using ppc64
> kexec, but was there some reason this patch wasn't included in
> your 2.6.15 fixes?
Because it arrived in the flood of email I had when I got back from
holiday and I missed it, I'm afraid.
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-05 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 15:53 [PATCH] ibmvscsi kexec fix Dave C Boutcher
2005-12-02 19:28 ` Dave C Boutcher
2005-12-05 2:52 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox