5 * This file contains definition for USB interface.
7 #define CMD_TYPE_REQUEST 0xF00DFACE
8 #define CMD_TYPE_DATA 0xBEADC0DE
9 #define CMD_TYPE_INDICATION 0xBEEFFACE
11 #define IPFIELD_ALIGN_OFFSET 2
13 #define BOOT_CMD_FW_BY_USB 0x01
14 #define BOOT_CMD_FW_IN_EEPROM 0x02
15 #define BOOT_CMD_UPDATE_BOOT2 0x03
16 #define BOOT_CMD_UPDATE_FW 0x04
17 #define BOOT_CMD_MAGIC_NUMBER 0x4C56524D /* M=>0x4D,R=>0x52,V=>0x56,L=>0x4C */
21 __le32 u32magicnumber;
26 #define BOOT_CMD_RESP_OK 0x0001
27 #define BOOT_CMD_RESP_FAIL 0x0000
31 __le32 u32magicnumber;
37 /* read callback private data */
39 struct usb_card_rec *cardp;
43 /** USB card description structure*/
45 struct net_device *eth_dev;
46 struct usb_device *udev;
47 struct urb *rx_urb, *tx_urb;
49 struct read_cb_info rinfo;
52 u8 bulk_in_endpointAddr;
56 u8 bulk_out_endpointAddr;
58 const struct firmware *fw;
84 #define FW_MAX_DATA_BLK_SIZE 600
87 struct fwheader fwheader;
89 u8 data[FW_MAX_DATA_BLK_SIZE];
98 #define FW_HAS_DATA_TO_RECV 0x00000001
99 #define FW_HAS_LAST_BLOCK 0x00000004
101 #define FW_DATA_XMIT_SIZE \
102 sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32)