Thanks for that. But the patch dosen't work.
And this time I make the g_file_storage module builed in while compling.
Then make some changes in file_storage.c
/**********************************************************************/
static char *file[MAX_LUNS] = {"/root/back_file", };/* changed*/
static int ro[MAX_LUNS] = {0, };
/**********************************************************************/
but while rebooting, it says unable to open "/root/back_file".
ERROR WHILE REBOOTING:
pxa27x_udc: version 23-Sep-2004
g_file_storage gadget: controller 'pxa27x_udc' not recognized
g_file_storage gadget-lun0: unable to open backing file: /root/back_filethe code related is here:
static int open_backing_file(.............)
{
.......
.......
/* R/W if we can, R/O if we must */
ro = curlun->ro;
if (!ro) {
filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0);
if (-EROFS == PTR_ERR(filp))
ro = 1;
}
if (ro)
filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0);
if (IS_ERR(filp)) {
LINFO(curlun, "unable to open backing file: %s\n", filename);/***/
return PTR_ERR(filp);
}
.......
.......
}
the /root/back_file is created like this:
[root@Bill ~]vi /root/back_file
[root@Bill ~]dd bs=1M count=8 if=/dev/zero of=/root/back_file
[root@Bill ~]fdisk -S 8 -H 16 -C 128 /root/disk
Above is from llinux-usb.org/gadget/file_storage.html
then
[root@Bill ~]chmod 777 /root/back_file
file_storage.c I have changed is attached
I don't know, but a quick google turned up some posts and patches which might be of use:
http://www.nabble.com/pxa27x_udc-fails-w-g...l-t1036446.html
Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=134002\"][{POST_SNAPBACK}][/a][/div]