21 #include <linux/module.h>
22 #include <linux/slab.h>
24 #include <scsi/scsi.h>
36 #define RIO_PREFIX "RIOP\x00"
37 #define RIO_PREFIX_LEN 5
38 #define RIO_SEND_LEN 40
39 #define RIO_RECV_LEN 0x200
41 #define RIO_ENTER_STORAGE 0x1
42 #define RIO_LEAVE_STORAGE 0x2
50 static int rio_karma_init(
struct us_data *us);
56 #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
57 vendorName, productName, useProtocol, useTransport, \
58 initFunction, flags) \
59 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
60 .driver_info = (flags) }
73 #define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
74 vendor_name, product_name, use_protocol, use_transport, \
75 init_function, Flags) \
77 .vendorName = vendor_name, \
78 .productName = product_name, \
79 .useProtocol = use_protocol, \
80 .useTransport = use_transport, \
81 .initFunction = init_function, \
102 static int rio_karma_send_command(
char cmd,
struct us_data *us)
106 static unsigned char seq = 1;
109 US_DEBUGP(
"karma: sending command %04x\n", cmd);
127 if (data->
recv[5] == seq)
142 US_DEBUGP(
"karma: sent command %04x\n", cmd);
145 US_DEBUGP(
"karma: command %04x failed\n", cmd);
171 return rio_karma_send_command(
RIO_RESET, us);
176 static void rio_karma_destructor(
void *
extra)
182 static int rio_karma_init(
struct us_data *us)
210 (
id - karma_usb_ids) + karma_unusual_dev_list);
222 static struct usb_driver karma_driver = {
224 .probe = karma_probe,
231 .id_table = karma_usb_ids,