public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Mike Anderson <andmike@us.ibm.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi_host sysfs updates scsi-misc-2.5 [0/2]
Date: 11 May 2003 22:57:22 -0500	[thread overview]
Message-ID: <1052711864.1768.7.camel@mulgrave> (raw)
In-Reply-To: <20030509063321.GA3259@beaverton.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

On Fri, 2003-05-09 at 01:33, Mike Anderson wrote:
> This series of patches is an update to the scsi_host sysfs / ref
> counting patches previously merged into the scsi-misc-2.5 tree. 

I'm still getting an oops in a scsi_register followed by a
scsi_unregister (because of an error in the driver setup).  The problem
occurs because the mid-layer is now dependent on the host_gendev.release
method.  Unfortunately, this isn't set until scsi_host_add, which may be
quite a while after scsi_register.

The quick "fix" is attached below, but I think we need all of this to be
symmetric (i.e. scsi_unregister can be called any time after
scsi_register) so probably the host_gendev.release method should be set
elsewhere.

James


[-- Attachment #2: tmp.diff --]
[-- Type: text/plain, Size: 360 bytes --]

===== hosts.c 1.62 vs edited =====
--- 1.62/drivers/scsi/hosts.c	Thu May  8 19:50:22 2003
+++ edited/hosts.c	Sun May 11 22:38:50 2003
@@ -258,7 +258,10 @@
  **/
 void scsi_unregister(struct Scsi_Host *shost)
 {
-	scsi_host_put(shost);
+	if(shost->host_gendev.release == NULL)
+		scsi_free_shost(shost);
+	else
+		scsi_host_put(shost);
 }
 
 /**

  parent reply	other threads:[~2003-05-12  3:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09  6:33 [PATCH] scsi_host sysfs updates scsi-misc-2.5 [0/2] Mike Anderson
2003-05-09  6:34 ` [PATCH] scsi_host sysfs updates scsi-misc-2.5 [1/2] Mike Anderson
2003-05-09  6:35   ` [PATCH] scsi_host sysfs updates scsi-misc-2.5 [2/2] Mike Anderson
2003-05-09  6:59     ` Christoph Hellwig
2003-05-09  7:50       ` Mike Anderson
2003-05-09  8:21         ` Mike Anderson
2003-05-12  3:57 ` James Bottomley [this message]
2003-05-12  6:38   ` [PATCH] scsi_host sysfs updates scsi-misc-2.5 [0/2] Mike Anderson
2003-05-12 17:50     ` James Bottomley
2003-05-12 17:59       ` James Bottomley
2003-05-12 18:41         ` Mike Anderson
2003-05-12 20:10           ` James Bottomley
2003-05-12 20:35             ` Mike Anderson
2003-05-12 20:42               ` James Bottomley
2003-05-12 20:53                 ` James Bottomley
2003-05-12 21:49                 ` Mike Anderson
2003-05-12 21:50                   ` James Bottomley
2003-05-12 22:15                     ` Mike Anderson
2003-05-14  0:00           ` Patrick Mochel
2003-05-12 18:18       ` Mike Anderson
2003-05-12 15:15 ` Andrew Vasquez
2003-05-13 18:51   ` Mike Anderson

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=1052711864.1768.7.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=andmike@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox