g_file_storage.ko及g_multi.ko参数说明
来源:互联网 发布:nginx代理apache php 编辑:程序博客网 时间:2024/05/02 02:22
[PATCH] USB: g_file_storage: export "stall" parameter
tree 78a96a3c3b33626f168c11418027d316121d7f76parent 76f4af8efc72b6091d230cbe718cedca06d2d79eauthor Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Mon, 18 Apr 2005 20:43:25 -0400committer Greg Kroah-Hartman <gregkh@xxxxxxx> Tue, 28 Jun 2005 04:43:40 -0700[PATCH] USB: g_file_storage: export "stall" parameterThis patch changes the g_file_storage driver to make the "stall" moduleparameter generally available; currently it is available only if thetesting version of the module has been configured. It also fixes a typoin a comment -- thanks, Pat!Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> drivers/usb/gadget/file_storage.c | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-)diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c--- a/drivers/usb/gadget/file_storage.c+++ b/drivers/usb/gadget/file_storage.c@@ -81,6 +81,10 @@ * removable Default false, boolean for removable media * luns=N Default N = number of filenames, number of * LUNs to support+ * stall Default determined according to the type of+ * USB device controller (usually true),+ * boolean to permit the driver to halt+ * bulk endpoints * transport=XXX Default BBB, transport name (CB, CBI, or BBB) * protocol=YYY Default SCSI, protocol name (RBC, 8020 or * ATAPI, QIC, UFI, 8070, or SCSI;@@ -91,14 +95,10 @@ * buflen=N Default N=16384, buffer size used (will be * rounded down to a multiple of * PAGE_CACHE_SIZE)- * stall Default determined according to the type of- * USB device controller (usually true),- * boolean to permit the driver to halt- * bulk endpoints * * If CONFIG_USB_FILE_STORAGE_TEST is not set, only the "file", "ro",- * "removable", and "luns" options are available; default values are used- * for everything else.+ * "removable", "luns", and "stall" options are available; default values+ * are used for everything else. * * The pathnames of the backing files and the ro settings are available in * the attribute files "file" and "ro" in the lun<n> subdirectory of the@@ -342,14 +342,15 @@ static struct { int num_ros; unsigned int nluns; + int removable;+ int can_stall;+ char *transport_parm; char *protocol_parm;- int removable; unsigned short vendor; unsigned short product; unsigned short release; unsigned int buflen;- int can_stall; int transport_type; char *transport_name;@@ -360,11 +361,11 @@ static struct { .transport_parm = "BBB", .protocol_parm = "SCSI", .removable = 0,+ .can_stall = 1, .vendor = DRIVER_VENDOR_ID, .product = DRIVER_PRODUCT_ID, .release = 0xffff, // Use controller chip type .buflen = 16384,- .can_stall = 1, }; @@ -380,6 +381,9 @@ MODULE_PARM_DESC(luns, "number of LUNs") module_param_named(removable, mod_data.removable, bool, S_IRUGO); MODULE_PARM_DESC(removable, "true to simulate removable media"); +module_param_named(stall, mod_data.can_stall, bool, S_IRUGO);+MODULE_PARM_DESC(stall, "false to prevent bulk stalls");+ /* In the non-TEST version, only the module parameters listed above * are available. */@@ -404,9 +408,6 @@ MODULE_PARM_DESC(release, "USB release n module_param_named(buflen, mod_data.buflen, uint, S_IRUGO); MODULE_PARM_DESC(buflen, "I/O buffer size"); -module_param_named(stall, mod_data.can_stall, bool, S_IRUGO);-MODULE_PARM_DESC(stall, "false to prevent bulk stalls");- #endif /* CONFIG_USB_FILE_STORAGE_TEST */ @@ -2657,7 +2658,7 @@ static int check_command(struct fsg_dev } } - /* Check that the LUN values are oonsistent */+ /* Check that the LUN values are consistent */ if (transport_is_bbb()) { if (fsg->lun != lun) DBG(fsg, "using LUN %d from CBW, "-To unsubscribe from this list: send the line "unsubscribe bk-commits-head" inthe body of a message to majordomo@xxxxxxxxxxxxxxxMore majordomo info at http://vger.kernel.org/majordomo-info.html以上参考至:http://www.archivum.info/bk-commits-head@vger.kernel.org/2005-06/01198/(PATCH)-USB-g_file_storage-export-quot-stall-quot-parameter.html通用命令: run modprobe g_multi file=/dev/mmcblk1p1,/mnt/p1/static.img,/dev/mmcblk0p1 luns=3 ro=0,1,1 stall=0,0,0 removable=1,1,1 iSerialNumber=3000111 iProduct=zhdgnss iManufactuy=zhd_survey这里表示的是将linux设备的3个块设备进行PC映射显示,具体的属性设置可看上面的说明;
阅读全文
0 0
- g_file_storage.ko及g_multi.ko参数说明
- ko
- **.ko
- galcore.ko
- printk2glog.ko
- Hello ko
- KO绑定
- ko.mapping.fromJS不同参数导致的不同结果
- ocfs2 and configfs.ko
- 一个回合KO
- LDD3-HELLO world.ko
- .ko编写模板
- 5358 wl.ko
- hi_keypad.ko编译
- 牛刀小试驱动_hello.ko
- ko学习记录记载
- LINUX编译ko文件
- Javascript之KO介绍
- thinkphp5输出执行的sql语句
- AndroidO Launcher3 shortcut悬浮窗设计
- 使用 Azure CLI 管理 Azure 虚拟网络和 Linux 虚拟机
- ActiveMQ学习教程
- hibernate:基于注解一对多双向关联关系外键方式
- g_file_storage.ko及g_multi.ko参数说明
- QT播放器音频笔记
- [易飞]凭证尾行空白显示异常处理
- 走进Spark生态圈:环境的安装与配置
- 自动爬取网站并截图
- Linux上使用IPMITool常用的命令
- 《大话设计模式》java实现之状态模式
- 在 Azure 中备份 Linux 虚拟机
- math.random()、math.floor()、math.round()、math.ceil()函数