#include <linux/blkdev.h>
#include <linux/completion.h>
#include <linux/dcache.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/fcntl.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/kref.h>
#include <linux/kthread.h>
#include <linux/limits.h>
#include <linux/module.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/freezer.h>
#include <linux/utsname.h>
#include <linux/usb/composite.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include "gadget_chips.h"
#include "storage_common.c"
Go to the source code of this file.
|
| MODULE_DESCRIPTION (DRIVER_DESC) |
|
| MODULE_AUTHOR ("Alan Stern") |
|
| MODULE_LICENSE ("Dual BSD/GPL") |
|
| module_param_array_named (file, mod_data.file, charp,&mod_data.num_filenames, S_IRUGO) |
|
| MODULE_PARM_DESC (file,"names of backing files or devices") |
|
| module_param_named (serial, mod_data.serial, charp, S_IRUGO) |
|
| MODULE_PARM_DESC (serial,"USB serial number") |
|
| module_param_array_named (ro, mod_data.ro, bool,&mod_data.num_ros, S_IRUGO) |
|
| MODULE_PARM_DESC (ro,"true to force read-only") |
|
| module_param_array_named (nofua, mod_data.nofua, bool,&mod_data.num_nofuas, S_IRUGO) |
|
| MODULE_PARM_DESC (nofua,"true to ignore SCSI WRITE(10,12) FUA bit") |
|
| module_param_named (luns, mod_data.nluns, uint, S_IRUGO) |
|
| 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") |
|
| module_param_named (cdrom, mod_data.cdrom, bool, S_IRUGO) |
|
| MODULE_PARM_DESC (cdrom,"true to emulate cdrom instead of disk") |
|
| module_init (fsg_init) |
|
| module_exit (fsg_cleanup) |
|
#define DRIVER_DESC "File-backed Storage Gadget" |
#define DRIVER_NAME "g_file_storage" |
#define DRIVER_VERSION "1 September 2010" |
#define IGNORE_BULK_OUT 1 |
#define protocol_is_scsi |
( |
| ) |
1 |
#define transport_is_bbb |
( |
| ) |
1 |
#define transport_is_cbi |
( |
| ) |
0 |
MODULE_AUTHOR |
( |
"Alan Stern" |
| ) |
|
module_exit |
( |
fsg_cleanup |
| ) |
|
MODULE_LICENSE |
( |
"Dual BSD/GPL" |
| ) |
|
module_param_array_named |
( |
file |
, |
|
|
mod_data. |
file, |
|
|
charp |
, |
|
|
&mod_data. |
num_filenames, |
|
|
S_IRUGO |
|
|
) |
| |
module_param_array_named |
( |
ro |
, |
|
|
mod_data. |
ro, |
|
|
bool |
, |
|
|
&mod_data. |
num_ros, |
|
|
S_IRUGO |
|
|
) |
| |
module_param_array_named |
( |
nofua |
, |
|
|
mod_data. |
nofua, |
|
|
bool |
, |
|
|
&mod_data. |
num_nofuas, |
|
|
S_IRUGO |
|
|
) |
| |
module_param_named |
( |
serial |
, |
|
|
mod_data. |
serial, |
|
|
charp |
, |
|
|
S_IRUGO |
|
|
) |
| |
module_param_named |
( |
luns |
, |
|
|
mod_data. |
nluns, |
|
|
uint |
, |
|
|
S_IRUGO |
|
|
) |
| |
module_param_named |
( |
stall |
, |
|
|
mod_data. |
can_stall, |
|
|
bool |
, |
|
|
S_IRUGO |
|
|
) |
| |
MODULE_PARM_DESC |
( |
luns |
, |
|
|
"number of LUNs" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
stall |
, |
|
|
"false to prevent bulk stalls" |
|
|
) |
| |
unsigned int num_filenames |