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

Erwin Authried eauth at softsys.co.at
Tue Oct 18 14:11:39 EDT 2005


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.


#ifdef CONFIG_UCLINUX
#define  __GFP_DMA 0
#else
#define __GFP_DMA       0x01
#endif

Regards,
Erwin





More information about the uClinux-dev mailing list