#include <linux/module.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.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(…);
#define ALAUDA_STATUS_ERROR …
#define ALAUDA_STATUS_READY …
#define ALAUDA_GET_XD_MEDIA_STATUS …
#define ALAUDA_GET_SM_MEDIA_STATUS …
#define ALAUDA_ACK_XD_MEDIA_CHANGE …
#define ALAUDA_ACK_SM_MEDIA_CHANGE …
#define ALAUDA_GET_XD_MEDIA_SIG …
#define ALAUDA_GET_SM_MEDIA_SIG …
#define ALAUDA_BULK_CMD …
#define ALAUDA_BULK_GET_REDU_DATA …
#define ALAUDA_BULK_READ_BLOCK …
#define ALAUDA_BULK_ERASE_BLOCK …
#define ALAUDA_BULK_WRITE_BLOCK …
#define ALAUDA_BULK_GET_STATUS2 …
#define ALAUDA_BULK_RESET_MEDIA …
#define ALAUDA_PORT_XD …
#define ALAUDA_PORT_SM …
#define UNDEF …
#define SPARE …
#define UNUSABLE …
struct alauda_media_info { … };
struct alauda_info { … };
#define short_pack(lsb,msb) …
#define LSB_of(s) …
#define MSB_of(s) …
#define MEDIA_PORT(us) …
#define MEDIA_INFO(us) …
#define PBA_LO(pba) …
#define PBA_HI(pba) …
#define PBA_ZONE(pba) …
static int init_alauda(struct us_data *us);
#define UNUSUAL_DEV …
static struct usb_device_id alauda_usb_ids[] = …;
MODULE_DEVICE_TABLE(usb, alauda_usb_ids);
#undef UNUSUAL_DEV
#define UNUSUAL_DEV …
static struct us_unusual_dev alauda_unusual_dev_list[] = …;
#undef UNUSUAL_DEV
struct alauda_card_info { … };
static struct alauda_card_info alauda_card_ids[] = …;
static struct alauda_card_info *alauda_card_find_id(unsigned char id)
{ … }
static unsigned char parity[256];
static unsigned char ecc2[256];
static void nand_init_ecc(void)
{ … }
static void nand_compute_ecc(unsigned char *data, unsigned char *ecc)
{ … }
static int nand_compare_ecc(unsigned char *data, unsigned char *ecc)
{ … }
static void nand_store_ecc(unsigned char *data, unsigned char *ecc)
{ … }
static void alauda_free_maps (struct alauda_media_info *media_info)
{ … }
static int alauda_get_media_status(struct us_data *us, unsigned char *data)
{ … }
static int alauda_ack_media(struct us_data *us)
{ … }
static int alauda_get_media_signature(struct us_data *us, unsigned char *data)
{ … }
static int alauda_reset_media(struct us_data *us)
{ … }
static int alauda_init_media(struct us_data *us)
{ … }
static int alauda_check_media(struct us_data *us)
{ … }
static int alauda_check_status2(struct us_data *us)
{ … }
static int alauda_get_redu_data(struct us_data *us, u16 pba, unsigned char *data)
{ … }
static u16 alauda_find_unused_pba(struct alauda_media_info *info,
unsigned int zone)
{ … }
static int alauda_read_map(struct us_data *us, unsigned int zone)
{ … }
static void alauda_ensure_map_for_zone(struct us_data *us, unsigned int zone)
{ … }
static int alauda_erase_block(struct us_data *us, u16 pba)
{ … }
static int alauda_read_block_raw(struct us_data *us, u16 pba,
unsigned int page, unsigned int pages, unsigned char *data)
{ … }
static int alauda_read_block(struct us_data *us, u16 pba,
unsigned int page, unsigned int pages, unsigned char *data)
{ … }
static int alauda_write_block(struct us_data *us, u16 pba, unsigned char *data)
{ … }
static int alauda_write_lba(struct us_data *us, u16 lba,
unsigned int page, unsigned int pages,
unsigned char *ptr, unsigned char *blockbuffer)
{ … }
static int alauda_read_data(struct us_data *us, unsigned long address,
unsigned int sectors)
{ … }
static int alauda_write_data(struct us_data *us, unsigned long address,
unsigned int sectors)
{ … }
static void alauda_info_destructor(void *extra)
{ … }
static int init_alauda(struct us_data *us)
{ … }
static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us)
{ … }
static struct scsi_host_template alauda_host_template;
static int alauda_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static struct usb_driver alauda_driver = …;
module_usb_stor_driver(alauda_driver, alauda_host_template, DRV_NAME);