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: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix scsi add-single-device
Date: 27 Jan 2003 10:07:40 -0600	[thread overview]
Message-ID: <1043683662.2292.15.camel@mulgrave> (raw)
In-Reply-To: <20030127081535.GA7780@beaverton.ibm.com>

On Mon, 2003-01-27 at 02:15, Mike Anderson wrote:
> James Bottomley [James.Bottomley@steeleye.com] wrote:
> > diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> > --- a/drivers/scsi/scsi_scan.c	Sun Jan 26 11:58:46 2003
> > +++ b/drivers/scsi/scsi_scan.c	Sun Jan 26 11:58:46 2003
> > @@ -1758,7 +1758,7 @@
> >  	shost = scsi_host_hn_get(host);
> >  	if (!shost)
> >  		return -ENODEV;
> > -	if(scsi_find_device(shost, channel, id, lun) != NULL)
> > +	if(scsi_find_device(shost, channel, id, lun) == NULL)
> >  		goto out;
> 
> The previous condition seemed to be correct as you want to exit if
> scsi_find_device finds a scsi_device at the nexus you are trying to add.
> 
> The patch below fixed the interface for me.  Though I only tested in
> with scsi_debug under UML YMMV.

Yes, sorry (long week last week).  It is indeed the semantics of
scsi_find_device() that are broken.

Thanks,

James



      reply	other threads:[~2003-01-27 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-26 18:00 [PATCH] fix scsi add-single-device James Bottomley
2003-01-27  8:15 ` Mike Anderson
2003-01-27 16:07   ` James Bottomley [this message]

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=1043683662.2292.15.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