* [PATCH] scsi: libsas depends on HAS_DMA
[not found] <20090511222702.352192505@arndb.de>
@ 2009-05-11 22:40 ` Arnd Bergmann
2009-05-11 22:50 ` James Bottomley
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2009-05-11 22:40 UTC (permalink / raw)
To: James E.J. Bottomley; +Cc: linux-kernel, linux-scsi
libsas uses the DMA mapping API, so it cannot be
built on architectures that don't support DMA.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/scsi/libsas/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig
index 18f33cd..59e00fa 100644
--- a/drivers/scsi/libsas/Kconfig
+++ b/drivers/scsi/libsas/Kconfig
@@ -24,7 +24,7 @@
config SCSI_SAS_LIBSAS
tristate "SAS Domain Transport Attributes"
- depends on SCSI
+ depends on SCSI && HAS_DMA
select SCSI_SAS_ATTRS
help
This provides transport specific helpers for SAS drivers which
--
1.6.0.4
--
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libsas depends on HAS_DMA
2009-05-11 22:40 ` [PATCH] scsi: libsas depends on HAS_DMA Arnd Bergmann
@ 2009-05-11 22:50 ` James Bottomley
2009-05-11 22:59 ` James Bottomley
0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2009-05-11 22:50 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-scsi
On Mon, 2009-05-11 at 22:40 +0000, Arnd Bergmann wrote:
> libsas uses the DMA mapping API, so it cannot be
> built on architectures that don't support DMA.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/scsi/libsas/Kconfig | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig
> index 18f33cd..59e00fa 100644
> --- a/drivers/scsi/libsas/Kconfig
> +++ b/drivers/scsi/libsas/Kconfig
> @@ -24,7 +24,7 @@
>
> config SCSI_SAS_LIBSAS
> tristate "SAS Domain Transport Attributes"
> - depends on SCSI
> + depends on SCSI && HAS_DMA
Our unfortunate Kconfig system can cause problems if you do this:
SCSI_SAS_LIBSAS is used as a select for drivers that need it, so either
they'd need to select this themselves, or you need some other solution.
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libsas depends on HAS_DMA
2009-05-11 22:50 ` James Bottomley
@ 2009-05-11 22:59 ` James Bottomley
2009-05-11 23:16 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2009-05-11 22:59 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-scsi
On Mon, 2009-05-11 at 22:50 +0000, James Bottomley wrote:
> On Mon, 2009-05-11 at 22:40 +0000, Arnd Bergmann wrote:
> > libsas uses the DMA mapping API, so it cannot be
> > built on architectures that don't support DMA.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > drivers/scsi/libsas/Kconfig | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig
> > index 18f33cd..59e00fa 100644
> > --- a/drivers/scsi/libsas/Kconfig
> > +++ b/drivers/scsi/libsas/Kconfig
> > @@ -24,7 +24,7 @@
> >
> > config SCSI_SAS_LIBSAS
> > tristate "SAS Domain Transport Attributes"
> > - depends on SCSI
> > + depends on SCSI && HAS_DMA
>
> Our unfortunate Kconfig system can cause problems if you do this:
> SCSI_SAS_LIBSAS is used as a select for drivers that need it, so either
> they'd need to select this themselves, or you need some other solution.
Actually, looking at this further, the problem is only in the ata
compatibility layer because of the way libata does dma mapping on behalf
of drivers, so the solution below (just disable SATA support if HAS_DMA
isn't defined) will work without requiring select dependency
modification.
James
---
diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig
index 18f33cd..f462a0e 100644
--- a/drivers/scsi/libsas/Kconfig
+++ b/drivers/scsi/libsas/Kconfig
@@ -33,6 +33,7 @@ config SCSI_SAS_LIBSAS
config SCSI_SAS_ATA
bool "ATA support for libsas (requires libata)"
depends on SCSI_SAS_LIBSAS
+ depends on HAS_DMA
depends on ATA = y || ATA = SCSI_SAS_LIBSAS
help
Builds in ATA support into libsas. Will necessitate
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libsas depends on HAS_DMA
2009-05-11 22:59 ` James Bottomley
@ 2009-05-11 23:16 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2009-05-11 23:16 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-kernel, linux-scsi
On Monday 11 May 2009 22:59:44 James Bottomley wrote:
> Actually, looking at this further, the problem is only in the ata
> compatibility layer because of the way libata does dma mapping on behalf
> of drivers, so the solution below (just disable SATA support if HAS_DMA
> isn't defined) will work without requiring select dependency
> modification.
Ah, in that case, the patch should not be needed at all, because
SCSI_SAS_ATA already depends on ATA, and I also submitted a patch
to make ATA depend on HAS_DMA.
Thanks for looking at it.
Arnd <><
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-11 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090511222702.352192505@arndb.de>
2009-05-11 22:40 ` [PATCH] scsi: libsas depends on HAS_DMA Arnd Bergmann
2009-05-11 22:50 ` James Bottomley
2009-05-11 22:59 ` James Bottomley
2009-05-11 23:16 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).