#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include "usb.h"
#include "transport.h"
#include "protocol.h"
#include "debug.h"
#include "scsiglue.h"
#define DRV_NAME …
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);
struct datafab_info { … };
static int datafab_determine_lun(struct us_data *us,
struct datafab_info *info);
#define UNUSUAL_DEV …
static struct usb_device_id datafab_usb_ids[] = …;
MODULE_DEVICE_TABLE(usb, datafab_usb_ids);
#undef UNUSUAL_DEV
#define UNUSUAL_DEV …
static struct us_unusual_dev datafab_unusual_dev_list[] = …;
#undef UNUSUAL_DEV
static inline int
datafab_bulk_read(struct us_data *us, unsigned char *data, unsigned int len) { … }
static inline int
datafab_bulk_write(struct us_data *us, unsigned char *data, unsigned int len) { … }
static int datafab_read_data(struct us_data *us,
struct datafab_info *info,
u32 sector,
u32 sectors)
{ … }
static int datafab_write_data(struct us_data *us,
struct datafab_info *info,
u32 sector,
u32 sectors)
{ … }
static int datafab_determine_lun(struct us_data *us,
struct datafab_info *info)
{ … }
static int datafab_id_device(struct us_data *us,
struct datafab_info *info)
{ … }
static int datafab_handle_mode_sense(struct us_data *us,
struct scsi_cmnd * srb,
int sense_6)
{ … }
static void datafab_info_destructor(void *extra)
{ … }
static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us)
{ … }
static struct scsi_host_template datafab_host_template;
static int datafab_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static struct usb_driver datafab_driver = …;
module_usb_stor_driver(datafab_driver, datafab_host_template, DRV_NAME);