[uClinux-dev] SCSI problem for USB mass storage devices

David McCullough davidm at snapgear.com
Tue Oct 18 18:32:34 EDT 2005


Jivin Erwin Authried lays it down ...
> Am Die, den 18.10.2005 schrieb Abhijith K S um 12:08:
> > Hi,
> > 
> > While trying to interface a USB host controller driver with our custom target (MCF5270) running on  uClinux 2.4.27-uc1, on enabling SCSI support for the USB mass storage driver, it used to give the foll.  error:
> > 
> > ----------------------------------------------------------------
> > SCSI subsystem driver Revision: 1.00
> > __alloc_pages: 0-order allocation failed (gfp=0x21/0)
> > scsi::init_module: failed, out of memory
> > ----------------------------------------------------------------
> > 
> > We traced this error to __get_free_pages(...) with GFP_DMA option or kmalloc(...) with GFP_DMA option.  We found that if we don't specify GFP_DMA option in the function calls, the error is not generated and  the module seems to be initialized properly (changes made in scsi_dma.c).
> > 
> > Is the GFP_DMA option supported in 527X architecture? And if yes, is there anything that has to be done to properly enable this option?
> > 
> > Any help is appreciated.
> > 
> > Regards,
> > Abhijith
> Hi,
> 
> there's no dma zone in uClinux. I think that can be solved quite easy by
> forcing the DMA flag to 0 in include/linux/mm.h. There may still be
> other problems with cache coherency if you are using DMA.

I am pretty sure that uClinux is able to handle DMA zones,  obviously
the platform is not setting any up.  The only case that doesn't handle
DMA zones IIRC is kmalloc2/page_alloc2/whatever you want to call it :-)

If a platform supports DMA, then it should setup the DMA zone
appropriately.

Cheers,
Davidm


> #ifdef CONFIG_UCLINUX
> #define  __GFP_DMA 0
> #else
> #define __GFP_DMA       0x01
> #endif
> 
> Regards,
> Erwin
> 
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

-- 
David McCullough, davidm at cyberguard.com.au, Custom Embedded Solutions + Security
Ph:+61 734352815 Fx:+61 738913630 http://www.uCdot.org http://www.cyberguard.com



More information about the uClinux-dev mailing list