From: James Bottomley <James.Bottomley@suse.de>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-next@vger.kernel.org, akpm <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
LKML <linux-kernel@vger.kernel.org>,
scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH -next] scsi: RAID_ATTRS depends on SCSI
Date: Wed, 03 Mar 2010 11:06:56 +0530 [thread overview]
Message-ID: <1267594617.4383.24.camel@mulgrave.site> (raw)
In-Reply-To: <20100221194636.ef885e5a.rdunlap@xenotime.net>
On Sun, 2010-02-21 at 19:46 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> raid_class uses scsi interfaces, so it should depend on SCSI.
> Otherwise build errors occur when RAID_ATTRS=y and SCSI=m:
>
> ERROR: "raid_class_release" [drivers/scsi/mpt2sas/mpt2sas.ko] undefined!
> ERROR: "raid_class_attach" [drivers/scsi/mpt2sas/mpt2sas.ko] undefined!
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> drivers/scsi/Kconfig | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> --- linux-next-20100219.orig/drivers/scsi/Kconfig
> +++ linux-next-20100219/drivers/scsi/Kconfig
> @@ -1,12 +1,5 @@
> menu "SCSI device support"
>
> -config RAID_ATTRS
> - tristate "RAID Transport Class"
> - default n
> - depends on BLOCK
> - ---help---
> - Provides RAID
> -
> config SCSI
> tristate "SCSI device support"
> depends on BLOCK
> @@ -34,6 +27,13 @@ config SCSI_DMA
> bool
> default n
>
> +config RAID_ATTRS
> + tristate "RAID Transport Class"
> + default n
> + depends on BLOCK && SCSI
> + ---help---
> + Provides RAID
> +
This will fix the error, but it's not quite the right thing to do. the
RAID class should be independent of SCSI, but it wants to do a SCSI
check if SCSI is compiled in the matching routines. This gives us a
nasty dependency, the condition being that the raid class must be m if
SCSI is m.
I think this patch does the right thing. Can someone test it on the
config checker? Or I can just put it in linux-next and have Stephen's
builds do it.
Thanks,
James
---
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 9191d1e..75f2336 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1,9 +1,15 @@
menu "SCSI device support"
+config SCSI_MOD
+ tristate
+ default y if SCSI=n || SCSI=y
+ default m if SCSI=m
+
config RAID_ATTRS
tristate "RAID Transport Class"
default n
depends on BLOCK
+ depends on SCSI_MOD
---help---
Provides RAID
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index bd88349..2c146b4 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -63,6 +63,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev)
* emulated RAID devices, so start with SCSI */
struct raid_internal *i = ac_to_raid_internal(cont);
+#if defined(CONFIG_SCSI) || defined(CONFIG_SCSI_MODULE)
if (scsi_is_sdev_device(dev)) {
struct scsi_device *sdev = to_scsi_device(dev);
@@ -71,6 +72,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev)
return i->f->is_raid(dev);
}
+#endif
/* FIXME: look at other subsystems too */
return 0;
}
next prev parent reply other threads:[~2010-03-03 5:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100219174711.5e7cc7be.sfr@canb.auug.org.au>
2010-02-19 17:21 ` linux-next: Tree for February 19 (scsi/mpt2sas/raid_class) Randy Dunlap
2010-02-22 3:46 ` [PATCH -next] scsi: RAID_ATTRS depends on SCSI Randy Dunlap
2010-03-02 11:26 ` [origin tree build failure] " Ingo Molnar
2010-03-02 23:30 ` Stephen Rothwell
2010-03-03 5:36 ` James Bottomley [this message]
2010-03-03 6:17 ` Stephen Rothwell
2010-03-03 16:56 ` Randy Dunlap
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=1267594617.4383.24.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=sfr@canb.auug.org.au \
/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