From: Boaz Harrosh <bharrosh@panasas.com>
To: David Dillow <dillowda@ornl.gov>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
James.Bottomley@suse.de
Subject: Re: scsi: include linux/scatterlist.h to pick up ARCH_HAS_SG_CHAIN
Date: Mon, 17 Jan 2011 11:43:37 +0200 [thread overview]
Message-ID: <4D340F49.6030604@panasas.com> (raw)
In-Reply-To: <1295208759.2574.14.camel@obelisk.thedillows.org>
On 01/16/2011 10:12 PM, David Dillow wrote:
> If the compiled object doesn't include linux/scatterlist.h before
> scsi/scsi.h, it will get an incorrect definition of
> SCSI_MAX_SG_CHAIN_SEGMENTS.
>
> Signed-off-by: David Dillow <dillowda@ornl.gov>
> --
> This fixes an issue I found while working on the SRP initiator, where
> linux/scatterlist.h was being pulled in by scsi/scsi_device.h. It's not
> clear if I'm supposed to include linux/scatterlist.h myself, or if I'm
> including the scsi headers in the wrong order. It makes sense for me
> that scsi.h would pickup the needed headers itself to prevent confusion.
>
I totally agree. This below is the proper fix!
> Another option is to potentially get rid of the ARCH_HAS_SG_CHAIN define
> as all archs have it save m68knommu.
>
What's preventing m68knommu from chaining? this is pure C manipulations,
what am I missing?
Thanks for catching this. As is, it is vary dangerous. I wonder where
else did it hit unnoticed?
Boaz
>
> diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
> index 648d233..b76d400 100644
> --- a/include/scsi/scsi.h
> +++ b/include/scsi/scsi.h
> @@ -9,6 +9,7 @@
> #define _SCSI_SCSI_H
>
> #include <linux/types.h>
> +#include <linux/scatterlist.h>
>
> struct scsi_cmnd;
>
>
next prev parent reply other threads:[~2011-01-17 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 20:12 scsi: include linux/scatterlist.h to pick up ARCH_HAS_SG_CHAIN David Dillow
2011-01-17 9:43 ` Boaz Harrosh [this message]
2011-01-18 2:50 ` David Dillow
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=4D340F49.6030604@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@suse.de \
--cc=dillowda@ornl.gov \
--cc=linux-kernel@vger.kernel.org \
--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 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.