From: Matthew Wilcox <willy@debian.org>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ryan Bradetich <rbradetich@uswest.net>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: [parisc-linux] Re: zalon/ncr53c720 crashes K460 (parisc port) on bootup.
Date: Sat, 27 Sep 2003 18:23:33 +0100 [thread overview]
Message-ID: <20030927172333.GS24824@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1064677551.2002.20.camel@mulgrave>
On Sat, Sep 27, 2003 at 10:45:50AM -0500, James Bottomley wrote:
> This should fix the panic, but it simply detaches correctly.
Necessary, but not sufficient, I think ... look at ncr_attach().
It doesn't zero hostdata->ncb. Adding that is easy enough ... I'm about
to commit a patch to the parisc tree containing this fix.
> ===== drivers/scsi/ncr53c8xx.c 1.37 vs edited =====
> --- 1.37/drivers/scsi/ncr53c8xx.c Thu Sep 25 20:08:49 2003
> +++ edited/drivers/scsi/ncr53c8xx.c Sat Sep 27 09:44:21 2003
> @@ -8585,12 +8585,17 @@
>
> int ncr53c8xx_release(struct Scsi_Host *host)
> {
> + ncb_p np;
> + struct host_data *host_data;
> +
> #ifdef DEBUG_NCR53C8XX
> -printk("ncr53c8xx : release\n");
> + printk("ncr53c8xx : release\n");
> #endif
> - ncr_detach(((struct host_data *) host->hostdata)->ncb);
> + if((host_data = (struct host_data *)host->hostdata) &&
> + host_data->ncb)
> + ncr_detach(host_data->ncb);
>
> - return 1;
> + return 1;
> }
>
>
> ===== drivers/scsi/zalon.c 1.11 vs edited =====
> --- 1.11/drivers/scsi/zalon.c Thu Sep 25 20:08:51 2003
> +++ edited/drivers/scsi/zalon.c Sat Sep 27 10:31:52 2003
> @@ -146,7 +146,7 @@
>
> host = ncr_attach(&zalon7xx_template, unit, &device);
> if (!host)
> - goto fail;
> + goto out;
>
> if (request_irq(irq, ncr53c8xx_intr, SA_SHIRQ, dev->dev.bus_id, host)) {
> printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
> @@ -169,6 +169,7 @@
> free_irq(irq, host);
> fail:
> ncr53c8xx_release(host);
> + out:
> return error;
> }
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@debian.org>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ryan Bradetich <rbradetich@uswest.net>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: Re: zalon/ncr53c720 crashes K460 (parisc port) on bootup.
Date: Sat, 27 Sep 2003 18:23:33 +0100 [thread overview]
Message-ID: <20030927172333.GS24824@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1064677551.2002.20.camel@mulgrave>
On Sat, Sep 27, 2003 at 10:45:50AM -0500, James Bottomley wrote:
> This should fix the panic, but it simply detaches correctly.
Necessary, but not sufficient, I think ... look at ncr_attach().
It doesn't zero hostdata->ncb. Adding that is easy enough ... I'm about
to commit a patch to the parisc tree containing this fix.
> ===== drivers/scsi/ncr53c8xx.c 1.37 vs edited =====
> --- 1.37/drivers/scsi/ncr53c8xx.c Thu Sep 25 20:08:49 2003
> +++ edited/drivers/scsi/ncr53c8xx.c Sat Sep 27 09:44:21 2003
> @@ -8585,12 +8585,17 @@
>
> int ncr53c8xx_release(struct Scsi_Host *host)
> {
> + ncb_p np;
> + struct host_data *host_data;
> +
> #ifdef DEBUG_NCR53C8XX
> -printk("ncr53c8xx : release\n");
> + printk("ncr53c8xx : release\n");
> #endif
> - ncr_detach(((struct host_data *) host->hostdata)->ncb);
> + if((host_data = (struct host_data *)host->hostdata) &&
> + host_data->ncb)
> + ncr_detach(host_data->ncb);
>
> - return 1;
> + return 1;
> }
>
>
> ===== drivers/scsi/zalon.c 1.11 vs edited =====
> --- 1.11/drivers/scsi/zalon.c Thu Sep 25 20:08:51 2003
> +++ edited/drivers/scsi/zalon.c Sat Sep 27 10:31:52 2003
> @@ -146,7 +146,7 @@
>
> host = ncr_attach(&zalon7xx_template, unit, &device);
> if (!host)
> - goto fail;
> + goto out;
>
> if (request_irq(irq, ncr53c8xx_intr, SA_SHIRQ, dev->dev.bus_id, host)) {
> printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
> @@ -169,6 +169,7 @@
> free_irq(irq, host);
> fail:
> ncr53c8xx_release(host);
> + out:
> return error;
> }
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next prev parent reply other threads:[~2003-09-27 17:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-27 3:43 [parisc-linux] zalon/ncr53c720 crashes K460 (parisc port) on bootup Ryan Bradetich
2003-09-27 3:43 ` Ryan Bradetich
2003-09-27 7:48 ` [parisc-linux] " Matthew Wilcox
2003-09-27 7:48 ` Matthew Wilcox
2003-09-27 13:45 ` [parisc-linux] " James Bottomley
2003-09-27 13:45 ` James Bottomley
2003-09-27 13:45 ` James Bottomley
2003-09-27 15:45 ` [parisc-linux] " James Bottomley
2003-09-27 15:45 ` James Bottomley
2003-09-27 17:23 ` Matthew Wilcox [this message]
2003-09-27 17:23 ` Matthew Wilcox
2003-09-27 17:23 ` [parisc-linux] " Matthew Wilcox
2003-09-27 18:37 ` Matthew Wilcox
2003-09-27 18:37 ` Matthew Wilcox
2003-09-27 18:37 ` Matthew Wilcox
2003-09-27 18:43 ` [parisc-linux] " Christoph Hellwig
2003-09-27 18:43 ` Christoph Hellwig
2003-09-27 18:43 ` Christoph Hellwig
2003-09-27 18:58 ` [parisc-linux] " James Bottomley
2003-09-27 18:58 ` James Bottomley
2003-09-27 18:58 ` James Bottomley
2003-09-27 20:06 ` [parisc-linux] " Matthew Wilcox
2003-09-27 20:06 ` Matthew Wilcox
2003-09-27 20:06 ` [parisc-linux] " Matthew Wilcox
2003-09-27 15:45 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030927172333.GS24824@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=rbradetich@uswest.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.