public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Dave Boutcher <sleddog@us.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] ibmvscsi driver - fourth version
Date: 11 Mar 2004 17:07:40 -0500	[thread overview]
Message-ID: <1079042865.2820.88.camel@mulgrave> (raw)
In-Reply-To: <opr4pu5kazl6e53g@us.ibm.com>

On Thu, 2004-03-11 at 16:25, Dave Boutcher wrote:
> On 11 Mar 2004 12:43:57 -0500, James Bottomley 
> <James.Bottomley@steeleye.com> wrote:
> > dma_map_single() has no error return currently, what is this trying to
> > do?
> Well, actually in in arch/ppc64/pci_iommu.c it can return 0xFFFFFFFF 
> (actually, it returns NO_TCE, which is ((dma_addr_t)-1)).

Well, OK, put a fixme in there, since eventually there will be a
standard for dma_map_single errors, and it may not be -1.

> 
> > +
> > +	/* Block requests until we get the SRP login back */
> > +	scsi_block_requests(host);
> > +
> > +	if (!scsi_add_host(hostdata->host, hostdata->dev)) {
> > +
> > +		scsi_scan_host(host);
> > +		return hostdata;
> > +	}
> >
> > Er, have you actually tried this ... the block requests will block all
> > requests including the attempt to scan. I assume the unblock is coming
> > from the schedule_work, but you're still hanging the rest of the system
> > waiting for this on a bootup.
> 
> Yes, this works fine, but I don't like it.  The scenario is that until we 
> get the SRP_LOGIN response back from the adapter, we don't know what the 
> queue_limit is (can_queue).  If the mid-layer starts scanning and sending 
> SCSI cmnds, we have to hold them up until we get that response back.  I've 
> tried a number of approaches....originally I kicked off scsi_scan from the 
> bottom half that gets the SRP_LOGIN_RSP.  However:
> - The bottom half is executing in a work queue.  Calling scsi_scan() 
> causes more requests to be sent and responses returned, which would like 
> to execute in the bottom_half workqueue, except that the workqueue is busy 
> because it is executing scsi_scan().
> - I created a second workqueue just to handle scsi_scan(), but that was 
> getting byzantine and Christoph threw up on it.
> 
> The only other approach I have considered is not doing the 
> scsi_block_requests(), but waiting on a completion before issuing 
> scsi_scan() and posting the completion when the SRP_LOGIN_RSP is received.

I don't quite follow this.  SCSI uses a softirq in 2.6, so there are no
bottom half scheduling issues for us at all.

Hanging the boot sequence like this waiting for a login isn't
acceptable.

As I see it, the preferred option would be simply to trigger a scan of
the device from user land using the scsi_host class, so dispense with
the scsi_scan_host() altogether.

James



  reply	other threads:[~2004-03-11 22:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-24  5:34 [PATCH] ibmvscsi driver - third version Dave Boutcher
2004-02-25 13:45 ` Christoph Hellwig
2004-02-25 17:53   ` [PATCH] ibmvscsi driver - fourth version Dave Boutcher
2004-03-11 17:43     ` James Bottomley
2004-03-11 21:25       ` Dave Boutcher
2004-03-11 22:07         ` James Bottomley [this message]
2004-03-12 15:59       ` [PATCH] ibmvscsi driver - fifth version Dave Boutcher
2004-03-31 21:26       ` [PATCH] ibmvscsi driver - sixth version Dave Boutcher
2004-03-31 21:58         ` James Bottomley
2004-03-31 22:37           ` Dave Boutcher
2004-03-31 22:02         ` Jeff Garzik
2004-03-31 23:12           ` Dave Boutcher
2004-03-31 23:39             ` James Bottomley
2004-03-31 23:51               ` Dave Boutcher
2004-04-01  0:10                 ` Jeff Garzik
2004-04-01  6:17               ` [PATCH] qla2xxx: sleep while IRQ disabled fix in eh_abort Andrew Vasquez
2004-04-01 15:04                 ` James Bottomley
2004-04-01  0:16             ` [PATCH] ibmvscsi driver - sixth version Jeff Garzik
2004-04-01  6:03               ` Andrew Vasquez
2004-04-01  7:13                 ` Jeff Garzik

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=1079042865.2820.88.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sleddog@us.ibm.com \
    /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