Re: [PATCH] scsi: libsas depends on HAS_DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> > ---
> >  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


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux