public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Doug Ledford <dledford@redhat.com>
Cc: linux-scsi mailing list <linux-scsi@vger.kernel.org>
Subject: Re: [Patch] QLogic qla2x00 driver fixes
Date: Thu, 24 Feb 2005 22:46:32 -0800	[thread overview]
Message-ID: <20050225064632.GC19601@plap.qlogic.org> (raw)
In-Reply-To: <1109305293.27139.216.camel@compaq-rhel4.xsintricity.com>

On Thu, 24 Feb 2005, Doug Ledford wrote:

> Don't use cmd->request->nr_hw_segments as it may not be initialized
> (SG_IO in particular bypasses anything that initializes this and just
> uses scsi_do_req to insert a scsi_request directly on the head of the
> queue)
>

I opted to begin to use the nr_hw_segments as a guide following the
following thread on linux-scsi:

http://marc.theaimsgroup.com/?l=linux-scsi&m=107940832718154&w=2

and had inquired about its validaty in usage again in September of
last year:

http://marc.theaimsgroup.com/?l=linux-scsi&m=109580376921554&w=2

seems not all callers (properly?) prepare a request, still...

> and a bogus value here can trip up the checks to make sure that
> the number of segments will fit in the queue ring buffer, resulting in
> commands that are never completed.
> 

Yes, this is an unfortunate side-effect.  Not wanting to labor on the
reasoning behind its usage (the first marc referenced-link goes into
some details), the changes queued up in:

http://marc.theaimsgroup.com/?l=linux-scsi&m=110754501726445&w=2

negate any dependencies on nr_hw_segments.

> Fix up several issues with PCI DMA mapping and failure to check return
> values on the mappings.
> 

Yes, thanks for catching this.

> Make the check for space in the ring buffer happen after the DMA mapping
> is done since any checks done before the mapping has taken place are
> bogus.
> 

I'm hoping once the tree opens up after 2.6.11 is released to begin
making further additions to the qla2xxx driver with the experimentaly
patched driver as a base.

I'll queue-up your changes for my next set of patches.

Thanks again,
Andrew Vasquez

  parent reply	other threads:[~2005-02-25  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-25  4:21 [Patch] QLogic qla2x00 driver fixes Doug Ledford
2005-02-25  4:28 ` Jeff Garzik
2005-02-25  6:46 ` Andrew Vasquez [this message]
2005-02-25  7:43 ` Douglas Gilbert
2005-02-25  7:57 ` Arjan van de Ven
2005-02-25  8:38   ` Jeff Garzik
2005-02-25 11:57     ` Doug Ledford
2005-02-25 17:02       ` Patrick Mansfield
2005-03-01  6:52         ` Doug Ledford
2005-02-25 17:09       ` Luben Tuikov

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=20050225064632.GC19601@plap.qlogic.org \
    --to=andrew.vasquez@qlogic.com \
    --cc=dledford@redhat.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