Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ene_ub6250.c File Reference
#include <linux/jiffies.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <linux/firmware.h>
#include "usb.h"
#include "transport.h"
#include "protocol.h"
#include "debug.h"
#include "unusual_ene_ub6250.h"

Go to the source code of this file.

Data Structures

struct  SD_STATUS
 
struct  MS_STATUS
 
struct  SM_STATUS
 
struct  ms_bootblock_cis
 
struct  ms_bootblock_idi
 
struct  ms_bootblock_sysent_rec
 
struct  ms_bootblock_sysent
 
struct  ms_bootblock_sysinf
 
struct  ms_bootblock_header
 
struct  ms_bootblock_page0
 
struct  ms_bootblock_cis_idi
 
struct  ms_lib_type_extdat
 
struct  ms_lib_ctrl
 
struct  ene_ub6250_info
 

Macros

#define SD_INIT1_FIRMWARE   "ene-ub6250/sd_init1.bin"
 
#define SD_INIT2_FIRMWARE   "ene-ub6250/sd_init2.bin"
 
#define SD_RW_FIRMWARE   "ene-ub6250/sd_rdwr.bin"
 
#define MS_INIT_FIRMWARE   "ene-ub6250/ms_init.bin"
 
#define MSP_RW_FIRMWARE   "ene-ub6250/msp_rdwr.bin"
 
#define MS_RW_FIRMWARE   "ene-ub6250/ms_rdwr.bin"
 
#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, vendorName, productName, useProtocol, useTransport, initFunction, flags)
 
#define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, vendor_name, product_name, use_protocol, use_transport, init_function, Flags)
 
#define ENE_BIN_CODE_LEN   0x800
 
#define REG_CARD_STATUS   0xFF83
 
#define REG_HW_TRAP1   0xFF89
 
#define SS_SUCCESS   0x00 /* No Sense */
 
#define SS_NOT_READY   0x02
 
#define SS_MEDIUM_ERR   0x03
 
#define SS_HW_ERR   0x04
 
#define SS_ILLEGAL_REQUEST   0x05
 
#define SS_UNIT_ATTENTION   0x06
 
#define SD_INIT1_PATTERN   1
 
#define SD_INIT2_PATTERN   2
 
#define SD_RW_PATTERN   3
 
#define MS_INIT_PATTERN   4
 
#define MSP_RW_PATTERN   5
 
#define MS_RW_PATTERN   6
 
#define SM_INIT_PATTERN   7
 
#define SM_RW_PATTERN   8
 
#define FDIR_WRITE   0
 
#define FDIR_READ   1
 
#define MS_REG_ST1_MB   0x80 /* media busy */
 
#define MS_REG_ST1_FB1   0x40 /* flush busy 1 */
 
#define MS_REG_ST1_DTER   0x20 /* error on data(corrected) */
 
#define MS_REG_ST1_UCDT   0x10 /* unable to correct data */
 
#define MS_REG_ST1_EXER   0x08 /* error on extra(corrected) */
 
#define MS_REG_ST1_UCEX   0x04 /* unable to correct extra */
 
#define MS_REG_ST1_FGER   0x02 /* error on overwrite flag(corrected) */
 
#define MS_REG_ST1_UCFG   0x01 /* unable to correct overwrite flag */
 
#define MS_REG_ST1_DEFAULT   (MS_REG_ST1_MB | MS_REG_ST1_FB1 | MS_REG_ST1_DTER | MS_REG_ST1_UCDT | MS_REG_ST1_EXER | MS_REG_ST1_UCEX | MS_REG_ST1_FGER | MS_REG_ST1_UCFG)
 
#define MS_REG_OVR_BKST   0x80 /* block status */
 
#define MS_REG_OVR_BKST_OK   MS_REG_OVR_BKST /* OK */
 
#define MS_REG_OVR_BKST_NG   0x00 /* NG */
 
#define MS_REG_OVR_PGST0   0x40 /* page status */
 
#define MS_REG_OVR_PGST1   0x20
 
#define MS_REG_OVR_PGST_MASK   (MS_REG_OVR_PGST0 | MS_REG_OVR_PGST1)
 
#define MS_REG_OVR_PGST_OK   (MS_REG_OVR_PGST0 | MS_REG_OVR_PGST1) /* OK */
 
#define MS_REG_OVR_PGST_NG   MS_REG_OVR_PGST1 /* NG */
 
#define MS_REG_OVR_PGST_DATA_ERROR   0x00 /* data error */
 
#define MS_REG_OVR_UDST   0x10 /* update status */
 
#define MS_REG_OVR_UDST_UPDATING   0x00 /* updating */
 
#define MS_REG_OVR_UDST_NO_UPDATE   MS_REG_OVR_UDST
 
#define MS_REG_OVR_RESERVED   0x08
 
#define MS_REG_OVR_DEFAULT   (MS_REG_OVR_BKST_OK | MS_REG_OVR_PGST_OK | MS_REG_OVR_UDST_NO_UPDATE | MS_REG_OVR_RESERVED)
 
#define MS_REG_MNG_SCMS0   0x20 /* serial copy management system */
 
#define MS_REG_MNG_SCMS1   0x10
 
#define MS_REG_MNG_SCMS_MASK   (MS_REG_MNG_SCMS0 | MS_REG_MNG_SCMS1)
 
#define MS_REG_MNG_SCMS_COPY_OK   (MS_REG_MNG_SCMS0 | MS_REG_MNG_SCMS1)
 
#define MS_REG_MNG_SCMS_ONE_COPY   MS_REG_MNG_SCMS1
 
#define MS_REG_MNG_SCMS_NO_COPY   0x00
 
#define MS_REG_MNG_ATFLG   0x08 /* address transfer table flag */
 
#define MS_REG_MNG_ATFLG_OTHER   MS_REG_MNG_ATFLG /* other */
 
#define MS_REG_MNG_ATFLG_ATTBL   0x00 /* address transfer table */
 
#define MS_REG_MNG_SYSFLG   0x04 /* system flag */
 
#define MS_REG_MNG_SYSFLG_USER   MS_REG_MNG_SYSFLG /* user block */
 
#define MS_REG_MNG_SYSFLG_BOOT   0x00 /* system block */
 
#define MS_REG_MNG_RESERVED   0xc3
 
#define MS_REG_MNG_DEFAULT   (MS_REG_MNG_SCMS_COPY_OK | MS_REG_MNG_ATFLG_OTHER | MS_REG_MNG_SYSFLG_USER | MS_REG_MNG_RESERVED)
 
#define MS_MAX_PAGES_PER_BLOCK   32
 
#define MS_MAX_INITIAL_ERROR_BLOCKS   10
 
#define MS_LIB_BITS_PER_BYTE   8
 
#define MS_SYSINF_FORMAT_FAT   1
 
#define MS_SYSINF_USAGE_GENERAL   0
 
#define MS_SYSINF_MSCLASS_TYPE_1   1
 
#define MS_SYSINF_PAGE_SIZE   MS_BYTES_PER_PAGE /* fixed */
 
#define MS_SYSINF_CARDTYPE_RDONLY   1
 
#define MS_SYSINF_CARDTYPE_RDWR   2
 
#define MS_SYSINF_CARDTYPE_HYBRID   3
 
#define MS_SYSINF_SECURITY   0x01
 
#define MS_SYSINF_SECURITY_NO_SUPPORT   MS_SYSINF_SECURITY
 
#define MS_SYSINF_SECURITY_SUPPORT   0
 
#define MS_SYSINF_RESERVED1   1
 
#define MS_SYSINF_RESERVED2   1
 
#define MS_SYSENT_TYPE_INVALID_BLOCK   0x01
 
#define MS_SYSENT_TYPE_CIS_IDI   0x0a /* CIS/IDI */
 
#define SIZE_OF_KIRO   1024
 
#define BYTE_MASK   0xff
 
#define MS_STATUS_WRITE_PROTECT   0x0106
 
#define MS_STATUS_SUCCESS   0x0000
 
#define MS_ERROR_FLASH_READ   0x8003
 
#define MS_ERROR_FLASH_ERASE   0x8005
 
#define MS_LB_ERROR   0xfff0
 
#define MS_LB_BOOT_BLOCK   0xfff1
 
#define MS_LB_INITIAL_ERROR   0xfff2
 
#define MS_STATUS_SUCCESS_WITH_ECC   0xfff3
 
#define MS_LB_ACQUIRED_ERROR   0xfff4
 
#define MS_LB_NOT_USED_ERASED   0xfff5
 
#define MS_NOCARD_ERROR   0xfff8
 
#define MS_NO_MEMORY_ERROR   0xfff9
 
#define MS_STATUS_INT_ERROR   0xfffa
 
#define MS_STATUS_ERROR   0xfffe
 
#define MS_LB_NOT_USED   0xffff
 
#define MS_REG_MNG_SYSFLG   0x04 /* system flag */
 
#define MS_REG_MNG_SYSFLG_USER   MS_REG_MNG_SYSFLG /* user block */
 
#define MS_BOOT_BLOCK_ID   0x0001
 
#define MS_BOOT_BLOCK_FORMAT_VERSION   0x0100
 
#define MS_BOOT_BLOCK_DATA_ENTRIES   2
 
#define MS_NUMBER_OF_SYSTEM_ENTRY   4
 
#define MS_NUMBER_OF_BOOT_BLOCK   2
 
#define MS_BYTES_PER_PAGE   512
 
#define MS_LOGICAL_BLOCKS_PER_SEGMENT   496
 
#define MS_LOGICAL_BLOCKS_IN_1ST_SEGMENT   494
 
#define MS_PHYSICAL_BLOCKS_PER_SEGMENT   0x200 /* 512 */
 
#define MS_PHYSICAL_BLOCKS_PER_SEGMENT_MASK   0x1ff
 
#define MS_REG_OVR_BKST   0x80 /* block status */
 
#define MS_REG_OVR_BKST_OK   MS_REG_OVR_BKST /* OK */
 
#define MS_REG_OVR_BKST_NG   0x00 /* NG */
 
#define MS_REG_ST1_DTER   0x20 /* error on data(corrected) */
 
#define MS_REG_ST1_EXER   0x08 /* error on extra(corrected) */
 
#define MS_REG_ST1_FGER   0x02 /* error on overwrite flag(corrected) */
 
#define MS_REG_ST0_WP   0x01 /* write protected */
 
#define MS_REG_ST0_WP_ON   MS_REG_ST0_WP
 
#define MS_LIB_CTRL_RDONLY   0
 
#define MS_LIB_CTRL_WRPROTECT   1
 
#define ms_libconv_to_logical(pdx, PhyBlock)   (((PhyBlock) >= (pdx)->MS_Lib.NumberOfPhyBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Phy2LogMap[PhyBlock])
 
#define ms_libconv_to_physical(pdx, LogBlock)   (((LogBlock) >= (pdx)->MS_Lib.NumberOfLogBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Log2PhyMap[LogBlock])
 
#define ms_lib_ctrl_set(pdx, Flag)   ((pdx)->MS_Lib.flags |= (1 << (Flag)))
 
#define ms_lib_ctrl_reset(pdx, Flag)   ((pdx)->MS_Lib.flags &= ~(1 << (Flag)))
 
#define ms_lib_ctrl_check(pdx, Flag)   ((pdx)->MS_Lib.flags & (1 << (Flag)))
 
#define ms_lib_iswritable(pdx)   ((ms_lib_ctrl_check((pdx), MS_LIB_CTRL_RDONLY) == 0) && (ms_lib_ctrl_check(pdx, MS_LIB_CTRL_WRPROTECT) == 0))
 
#define ms_lib_clear_pagemap(pdx)   memset((pdx)->MS_Lib.pagemap, 0, sizeof((pdx)->MS_Lib.pagemap))
 
#define memstick_logaddr(logadr1, logadr0)   ((((u16)(logadr1)) << 8) | (logadr0))
 
#define MS_IDI_GENERAL_CONF   0x848A
 
#define SD_BLOCK_LEN   9
 
#define ene_ub6250_resume   NULL
 
#define ene_ub6250_reset_resume   NULL
 

Functions

 MODULE_DESCRIPTION ("Driver for ENE UB6250 reader")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (SD_INIT1_FIRMWARE)
 
 MODULE_FIRMWARE (SD_INIT2_FIRMWARE)
 
 MODULE_FIRMWARE (SD_RW_FIRMWARE)
 
 MODULE_FIRMWARE (MS_INIT_FIRMWARE)
 
 MODULE_FIRMWARE (MSP_RW_FIRMWARE)
 
 MODULE_FIRMWARE (MS_RW_FIRMWARE)
 
 MODULE_DEVICE_TABLE (usb, ene_ub6250_usb_ids)
 
 module_usb_driver (ene_ub6250_driver)
 

Macro Definition Documentation

#define BYTE_MASK   0xff

Definition at line 185 of file ene_ub6250.c.

#define ENE_BIN_CODE_LEN   0x800

Definition at line 89 of file ene_ub6250.c.

#define ene_ub6250_reset_resume   NULL

Definition at line 2403 of file ene_ub6250.c.

#define ene_ub6250_resume   NULL

Definition at line 2402 of file ene_ub6250.c.

#define FDIR_READ   1

Definition at line 113 of file ene_ub6250.c.

#define FDIR_WRITE   0

Definition at line 112 of file ene_ub6250.c.

#define memstick_logaddr (   logadr1,
  logadr0 
)    ((((u16)(logadr1)) << 8) | (logadr0))

Definition at line 248 of file ene_ub6250.c.

#define MS_BOOT_BLOCK_DATA_ENTRIES   2

Definition at line 209 of file ene_ub6250.c.

#define MS_BOOT_BLOCK_FORMAT_VERSION   0x0100

Definition at line 208 of file ene_ub6250.c.

#define MS_BOOT_BLOCK_ID   0x0001

Definition at line 207 of file ene_ub6250.c.

#define MS_BYTES_PER_PAGE   512

Definition at line 213 of file ene_ub6250.c.

#define MS_ERROR_FLASH_ERASE   0x8005

Definition at line 191 of file ene_ub6250.c.

#define MS_ERROR_FLASH_READ   0x8003

Definition at line 190 of file ene_ub6250.c.

#define MS_IDI_GENERAL_CONF   0x848A

Definition at line 304 of file ene_ub6250.c.

#define MS_INIT_FIRMWARE   "ene-ub6250/ms_init.bin"

Definition at line 35 of file ene_ub6250.c.

#define MS_INIT_PATTERN   4

Definition at line 106 of file ene_ub6250.c.

#define MS_LB_ACQUIRED_ERROR   0xfff4

Definition at line 196 of file ene_ub6250.c.

#define MS_LB_BOOT_BLOCK   0xfff1

Definition at line 193 of file ene_ub6250.c.

#define MS_LB_ERROR   0xfff0

Definition at line 192 of file ene_ub6250.c.

#define MS_LB_INITIAL_ERROR   0xfff2

Definition at line 194 of file ene_ub6250.c.

#define MS_LB_NOT_USED   0xffff

Definition at line 202 of file ene_ub6250.c.

#define MS_LB_NOT_USED_ERASED   0xfff5

Definition at line 197 of file ene_ub6250.c.

#define MS_LIB_BITS_PER_BYTE   8

Definition at line 163 of file ene_ub6250.c.

#define ms_lib_clear_pagemap (   pdx)    memset((pdx)->MS_Lib.pagemap, 0, sizeof((pdx)->MS_Lib.pagemap))

Definition at line 247 of file ene_ub6250.c.

#define ms_lib_ctrl_check (   pdx,
  Flag 
)    ((pdx)->MS_Lib.flags & (1 << (Flag)))

Definition at line 244 of file ene_ub6250.c.

#define MS_LIB_CTRL_RDONLY   0

Definition at line 235 of file ene_ub6250.c.

#define ms_lib_ctrl_reset (   pdx,
  Flag 
)    ((pdx)->MS_Lib.flags &= ~(1 << (Flag)))

Definition at line 243 of file ene_ub6250.c.

#define ms_lib_ctrl_set (   pdx,
  Flag 
)    ((pdx)->MS_Lib.flags |= (1 << (Flag)))

Definition at line 242 of file ene_ub6250.c.

#define MS_LIB_CTRL_WRPROTECT   1

Definition at line 236 of file ene_ub6250.c.

#define ms_lib_iswritable (   pdx)    ((ms_lib_ctrl_check((pdx), MS_LIB_CTRL_RDONLY) == 0) && (ms_lib_ctrl_check(pdx, MS_LIB_CTRL_WRPROTECT) == 0))

Definition at line 246 of file ene_ub6250.c.

#define ms_libconv_to_logical (   pdx,
  PhyBlock 
)    (((PhyBlock) >= (pdx)->MS_Lib.NumberOfPhyBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Phy2LogMap[PhyBlock])

Definition at line 239 of file ene_ub6250.c.

#define ms_libconv_to_physical (   pdx,
  LogBlock 
)    (((LogBlock) >= (pdx)->MS_Lib.NumberOfLogBlock) ? MS_STATUS_ERROR : (pdx)->MS_Lib.Log2PhyMap[LogBlock])

Definition at line 240 of file ene_ub6250.c.

#define MS_LOGICAL_BLOCKS_IN_1ST_SEGMENT   494

Definition at line 215 of file ene_ub6250.c.

#define MS_LOGICAL_BLOCKS_PER_SEGMENT   496

Definition at line 214 of file ene_ub6250.c.

#define MS_MAX_INITIAL_ERROR_BLOCKS   10

Definition at line 162 of file ene_ub6250.c.

#define MS_MAX_PAGES_PER_BLOCK   32

Definition at line 161 of file ene_ub6250.c.

#define MS_NO_MEMORY_ERROR   0xfff9

Definition at line 199 of file ene_ub6250.c.

#define MS_NOCARD_ERROR   0xfff8

Definition at line 198 of file ene_ub6250.c.

#define MS_NUMBER_OF_BOOT_BLOCK   2

Definition at line 212 of file ene_ub6250.c.

#define MS_NUMBER_OF_SYSTEM_ENTRY   4

Definition at line 211 of file ene_ub6250.c.

#define MS_PHYSICAL_BLOCKS_PER_SEGMENT   0x200 /* 512 */

Definition at line 217 of file ene_ub6250.c.

#define MS_PHYSICAL_BLOCKS_PER_SEGMENT_MASK   0x1ff

Definition at line 218 of file ene_ub6250.c.

#define MS_REG_MNG_ATFLG   0x08 /* address transfer table flag */

Definition at line 151 of file ene_ub6250.c.

#define MS_REG_MNG_ATFLG_ATTBL   0x00 /* address transfer table */

Definition at line 153 of file ene_ub6250.c.

#define MS_REG_MNG_ATFLG_OTHER   MS_REG_MNG_ATFLG /* other */

Definition at line 152 of file ene_ub6250.c.

Definition at line 158 of file ene_ub6250.c.

#define MS_REG_MNG_RESERVED   0xc3

Definition at line 157 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS0   0x20 /* serial copy management system */

Definition at line 145 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS1   0x10

Definition at line 146 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS_COPY_OK   (MS_REG_MNG_SCMS0 | MS_REG_MNG_SCMS1)

Definition at line 148 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS_MASK   (MS_REG_MNG_SCMS0 | MS_REG_MNG_SCMS1)

Definition at line 147 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS_NO_COPY   0x00

Definition at line 150 of file ene_ub6250.c.

#define MS_REG_MNG_SCMS_ONE_COPY   MS_REG_MNG_SCMS1

Definition at line 149 of file ene_ub6250.c.

#define MS_REG_MNG_SYSFLG   0x04 /* system flag */

Definition at line 204 of file ene_ub6250.c.

#define MS_REG_MNG_SYSFLG   0x04 /* system flag */

Definition at line 204 of file ene_ub6250.c.

#define MS_REG_MNG_SYSFLG_BOOT   0x00 /* system block */

Definition at line 156 of file ene_ub6250.c.

#define MS_REG_MNG_SYSFLG_USER   MS_REG_MNG_SYSFLG /* user block */

Definition at line 205 of file ene_ub6250.c.

#define MS_REG_MNG_SYSFLG_USER   MS_REG_MNG_SYSFLG /* user block */

Definition at line 205 of file ene_ub6250.c.

#define MS_REG_OVR_BKST   0x80 /* block status */

Definition at line 221 of file ene_ub6250.c.

#define MS_REG_OVR_BKST   0x80 /* block status */

Definition at line 221 of file ene_ub6250.c.

#define MS_REG_OVR_BKST_NG   0x00 /* NG */

Definition at line 223 of file ene_ub6250.c.

#define MS_REG_OVR_BKST_NG   0x00 /* NG */

Definition at line 223 of file ene_ub6250.c.

#define MS_REG_OVR_BKST_OK   MS_REG_OVR_BKST /* OK */

Definition at line 222 of file ene_ub6250.c.

#define MS_REG_OVR_BKST_OK   MS_REG_OVR_BKST /* OK */

Definition at line 222 of file ene_ub6250.c.

Definition at line 142 of file ene_ub6250.c.

#define MS_REG_OVR_PGST0   0x40 /* page status */

Definition at line 132 of file ene_ub6250.c.

#define MS_REG_OVR_PGST1   0x20

Definition at line 133 of file ene_ub6250.c.

#define MS_REG_OVR_PGST_DATA_ERROR   0x00 /* data error */

Definition at line 137 of file ene_ub6250.c.

#define MS_REG_OVR_PGST_MASK   (MS_REG_OVR_PGST0 | MS_REG_OVR_PGST1)

Definition at line 134 of file ene_ub6250.c.

#define MS_REG_OVR_PGST_NG   MS_REG_OVR_PGST1 /* NG */

Definition at line 136 of file ene_ub6250.c.

#define MS_REG_OVR_PGST_OK   (MS_REG_OVR_PGST0 | MS_REG_OVR_PGST1) /* OK */

Definition at line 135 of file ene_ub6250.c.

#define MS_REG_OVR_RESERVED   0x08

Definition at line 141 of file ene_ub6250.c.

#define MS_REG_OVR_UDST   0x10 /* update status */

Definition at line 138 of file ene_ub6250.c.

#define MS_REG_OVR_UDST_NO_UPDATE   MS_REG_OVR_UDST

Definition at line 140 of file ene_ub6250.c.

#define MS_REG_OVR_UDST_UPDATING   0x00 /* updating */

Definition at line 139 of file ene_ub6250.c.

#define MS_REG_ST0_WP   0x01 /* write protected */

Definition at line 232 of file ene_ub6250.c.

#define MS_REG_ST0_WP_ON   MS_REG_ST0_WP

Definition at line 233 of file ene_ub6250.c.

Definition at line 126 of file ene_ub6250.c.

#define MS_REG_ST1_DTER   0x20 /* error on data(corrected) */

Definition at line 226 of file ene_ub6250.c.

#define MS_REG_ST1_DTER   0x20 /* error on data(corrected) */

Definition at line 226 of file ene_ub6250.c.

#define MS_REG_ST1_EXER   0x08 /* error on extra(corrected) */

Definition at line 227 of file ene_ub6250.c.

#define MS_REG_ST1_EXER   0x08 /* error on extra(corrected) */

Definition at line 227 of file ene_ub6250.c.

#define MS_REG_ST1_FB1   0x40 /* flush busy 1 */

Definition at line 119 of file ene_ub6250.c.

#define MS_REG_ST1_FGER   0x02 /* error on overwrite flag(corrected) */

Definition at line 228 of file ene_ub6250.c.

#define MS_REG_ST1_FGER   0x02 /* error on overwrite flag(corrected) */

Definition at line 228 of file ene_ub6250.c.

#define MS_REG_ST1_MB   0x80 /* media busy */

Definition at line 118 of file ene_ub6250.c.

#define MS_REG_ST1_UCDT   0x10 /* unable to correct data */

Definition at line 121 of file ene_ub6250.c.

#define MS_REG_ST1_UCEX   0x04 /* unable to correct extra */

Definition at line 123 of file ene_ub6250.c.

#define MS_REG_ST1_UCFG   0x01 /* unable to correct overwrite flag */

Definition at line 125 of file ene_ub6250.c.

#define MS_RW_FIRMWARE   "ene-ub6250/ms_rdwr.bin"

Definition at line 37 of file ene_ub6250.c.

#define MS_RW_PATTERN   6

Definition at line 108 of file ene_ub6250.c.

#define MS_STATUS_ERROR   0xfffe

Definition at line 201 of file ene_ub6250.c.

#define MS_STATUS_INT_ERROR   0xfffa

Definition at line 200 of file ene_ub6250.c.

#define MS_STATUS_SUCCESS   0x0000

Definition at line 189 of file ene_ub6250.c.

#define MS_STATUS_SUCCESS_WITH_ECC   0xfff3

Definition at line 195 of file ene_ub6250.c.

#define MS_STATUS_WRITE_PROTECT   0x0106

Definition at line 188 of file ene_ub6250.c.

#define MS_SYSENT_TYPE_CIS_IDI   0x0a /* CIS/IDI */

Definition at line 182 of file ene_ub6250.c.

#define MS_SYSENT_TYPE_INVALID_BLOCK   0x01

Definition at line 181 of file ene_ub6250.c.

#define MS_SYSINF_CARDTYPE_HYBRID   3

Definition at line 173 of file ene_ub6250.c.

#define MS_SYSINF_CARDTYPE_RDONLY   1

Definition at line 171 of file ene_ub6250.c.

#define MS_SYSINF_CARDTYPE_RDWR   2

Definition at line 172 of file ene_ub6250.c.

#define MS_SYSINF_FORMAT_FAT   1

Definition at line 165 of file ene_ub6250.c.

#define MS_SYSINF_MSCLASS_TYPE_1   1

Definition at line 168 of file ene_ub6250.c.

#define MS_SYSINF_PAGE_SIZE   MS_BYTES_PER_PAGE /* fixed */

Definition at line 169 of file ene_ub6250.c.

#define MS_SYSINF_RESERVED1   1

Definition at line 178 of file ene_ub6250.c.

#define MS_SYSINF_RESERVED2   1

Definition at line 179 of file ene_ub6250.c.

#define MS_SYSINF_SECURITY   0x01

Definition at line 174 of file ene_ub6250.c.

#define MS_SYSINF_SECURITY_NO_SUPPORT   MS_SYSINF_SECURITY

Definition at line 175 of file ene_ub6250.c.

#define MS_SYSINF_SECURITY_SUPPORT   0

Definition at line 176 of file ene_ub6250.c.

#define MS_SYSINF_USAGE_GENERAL   0

Definition at line 166 of file ene_ub6250.c.

#define MSP_RW_FIRMWARE   "ene-ub6250/msp_rdwr.bin"

Definition at line 36 of file ene_ub6250.c.

#define MSP_RW_PATTERN   5

Definition at line 107 of file ene_ub6250.c.

#define REG_CARD_STATUS   0xFF83

Definition at line 91 of file ene_ub6250.c.

#define REG_HW_TRAP1   0xFF89

Definition at line 92 of file ene_ub6250.c.

#define SD_BLOCK_LEN   9

Definition at line 443 of file ene_ub6250.c.

#define SD_INIT1_FIRMWARE   "ene-ub6250/sd_init1.bin"

Definition at line 32 of file ene_ub6250.c.

#define SD_INIT1_PATTERN   1

Definition at line 103 of file ene_ub6250.c.

#define SD_INIT2_FIRMWARE   "ene-ub6250/sd_init2.bin"

Definition at line 33 of file ene_ub6250.c.

#define SD_INIT2_PATTERN   2

Definition at line 104 of file ene_ub6250.c.

#define SD_RW_FIRMWARE   "ene-ub6250/sd_rdwr.bin"

Definition at line 34 of file ene_ub6250.c.

#define SD_RW_PATTERN   3

Definition at line 105 of file ene_ub6250.c.

#define SIZE_OF_KIRO   1024

Definition at line 184 of file ene_ub6250.c.

#define SM_INIT_PATTERN   7

Definition at line 109 of file ene_ub6250.c.

#define SM_RW_PATTERN   8

Definition at line 110 of file ene_ub6250.c.

#define SS_HW_ERR   0x04

Definition at line 98 of file ene_ub6250.c.

#define SS_ILLEGAL_REQUEST   0x05

Definition at line 99 of file ene_ub6250.c.

#define SS_MEDIUM_ERR   0x03

Definition at line 97 of file ene_ub6250.c.

#define SS_NOT_READY   0x02

Definition at line 96 of file ene_ub6250.c.

#define SS_SUCCESS   0x00 /* No Sense */

Definition at line 95 of file ene_ub6250.c.

#define SS_UNIT_ATTENTION   0x06

Definition at line 100 of file ene_ub6250.c.

#define UNUSUAL_DEV (   id_vendor,
  id_product,
  bcdDeviceMin,
  bcdDeviceMax,
  vendorName,
  productName,
  useProtocol,
  useTransport,
  initFunction,
  flags 
)
Value:
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
.driver_info = (flags)}

Definition at line 68 of file ene_ub6250.c.

#define UNUSUAL_DEV (   idVendor,
  idProduct,
  bcdDeviceMin,
  bcdDeviceMax,
  vendor_name,
  product_name,
  use_protocol,
  use_transport,
  init_function,
  Flags 
)
Value:
{ \
.vendorName = vendor_name, \
.productName = product_name, \
.useProtocol = use_protocol, \
.useTransport = use_transport, \
.initFunction = init_function, \
}

Definition at line 68 of file ene_ub6250.c.

Function Documentation

MODULE_DESCRIPTION ( "Driver for ENE UB6250 reader"  )
MODULE_DEVICE_TABLE ( usb  ,
ene_ub6250_usb_ids   
)
MODULE_FIRMWARE ( SD_INIT1_FIRMWARE  )
MODULE_FIRMWARE ( SD_INIT2_FIRMWARE  )
MODULE_FIRMWARE ( SD_RW_FIRMWARE  )
MODULE_FIRMWARE ( MS_INIT_FIRMWARE  )
MODULE_FIRMWARE ( MSP_RW_FIRMWARE  )
MODULE_FIRMWARE ( MS_RW_FIRMWARE  )
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( ene_ub6250_driver  )