Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Driver for Rio Karma
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *   (c) 2006 Bob Copeland <me@bobcopeland.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *   (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <scsi/scsi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <scsi/scsi_cmnd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <scsi/scsi_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include "usb.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include "transport.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include "debug.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include "scsiglue.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define DRV_NAME "ums-karma"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) MODULE_DESCRIPTION("Driver for Rio Karma");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) MODULE_AUTHOR("Bob Copeland <me@bobcopeland.com>, Keith Bennett <keith@mcs.st-and.ac.uk>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) MODULE_LICENSE("GPL");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) MODULE_IMPORT_NS(USB_STORAGE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define RIO_PREFIX "RIOP\x00"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define RIO_PREFIX_LEN 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define RIO_SEND_LEN 40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #define RIO_RECV_LEN 0x200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #define RIO_ENTER_STORAGE 0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #define RIO_LEAVE_STORAGE 0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #define RIO_RESET 0xC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) struct karma_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	int in_storage;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	char *recv;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) static int rio_karma_init(struct us_data *us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)  * The table of devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		    vendorName, productName, useProtocol, useTransport, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		    initFunction, flags) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)   .driver_info = (flags) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) static struct usb_device_id karma_usb_ids[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) #	include "unusual_karma.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	{ }		/* Terminating entry */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) MODULE_DEVICE_TABLE(usb, karma_usb_ids);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) #undef UNUSUAL_DEV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)  * The flags table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) #define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		    vendor_name, product_name, use_protocol, use_transport, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		    init_function, Flags) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	.vendorName = vendor_name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	.productName = product_name,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	.useProtocol = use_protocol,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	.useTransport = use_transport,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	.initFunction = init_function,	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) static struct us_unusual_dev karma_unusual_dev_list[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) #	include "unusual_karma.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	{ }		/* Terminating entry */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) #undef UNUSUAL_DEV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)  * Send commands to Rio Karma.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)  * For each command we send 40 bytes starting 'RIOP\0' followed by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)  * the command number and a sequence number, which the device will ack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)  * with a 512-byte packet with the high four bits set and everything
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)  * else null.  Then we send 'RIOP\x80' followed by a zero and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)  * sequence number, until byte 5 in the response repeats the sequence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)  * number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) static int rio_karma_send_command(char cmd, struct us_data *us)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	int result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	unsigned long timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	static unsigned char seq = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	struct karma_data *data = (struct karma_data *) us->extra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	usb_stor_dbg(us, "sending command %04x\n", cmd);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	memset(us->iobuf, 0, RIO_SEND_LEN);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	memcpy(us->iobuf, RIO_PREFIX, RIO_PREFIX_LEN);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	us->iobuf[5] = cmd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	us->iobuf[6] = seq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	timeout = jiffies + msecs_to_jiffies(6000);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	for (;;) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 			us->iobuf, RIO_SEND_LEN, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		if (result != USB_STOR_XFER_GOOD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 			goto err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 			data->recv, RIO_RECV_LEN, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		if (result != USB_STOR_XFER_GOOD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 			goto err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		if (data->recv[5] == seq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		if (time_after(jiffies, timeout))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 			goto err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		us->iobuf[4] = 0x80;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		us->iobuf[5] = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		msleep(50);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	seq++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	if (seq == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		seq = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	usb_stor_dbg(us, "sent command %04x\n", cmd);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) err:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	usb_stor_dbg(us, "command %04x failed\n", cmd);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	return USB_STOR_TRANSPORT_FAILED;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)  * Trap START_STOP and READ_10 to leave/re-enter storage mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)  * Everything else is propagated to the normal bulk layer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	struct karma_data *data = (struct karma_data *) us->extra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	if (srb->cmnd[0] == READ_10 && !data->in_storage) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		ret = rio_karma_send_command(RIO_ENTER_STORAGE, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 			return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 		data->in_storage = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		return usb_stor_Bulk_transport(srb, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	} else if (srb->cmnd[0] == START_STOP) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		ret = rio_karma_send_command(RIO_LEAVE_STORAGE, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 			return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		data->in_storage = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		return rio_karma_send_command(RIO_RESET, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	return usb_stor_Bulk_transport(srb, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) static void rio_karma_destructor(void *extra)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	struct karma_data *data = (struct karma_data *) extra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	kfree(data->recv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) static int rio_karma_init(struct us_data *us)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	int ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	struct karma_data *data = kzalloc(sizeof(struct karma_data), GFP_NOIO);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	if (!data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	data->recv = kmalloc(RIO_RECV_LEN, GFP_NOIO);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	if (!data->recv) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		kfree(data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	us->extra = data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	us->extra_destructor = rio_karma_destructor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	ret = rio_karma_send_command(RIO_ENTER_STORAGE, us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	data->in_storage = (ret == 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) out:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) static struct scsi_host_template karma_host_template;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static int karma_probe(struct usb_interface *intf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 			 const struct usb_device_id *id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	struct us_data *us;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	int result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	result = usb_stor_probe1(&us, intf, id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 			(id - karma_usb_ids) + karma_unusual_dev_list,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 			&karma_host_template);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	if (result)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 		return result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	us->transport_name = "Rio Karma/Bulk";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	us->transport = rio_karma_transport;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	us->transport_reset = usb_stor_Bulk_reset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	result = usb_stor_probe2(us);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	return result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) static struct usb_driver karma_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	.name =		DRV_NAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	.probe =	karma_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	.disconnect =	usb_stor_disconnect,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	.suspend =	usb_stor_suspend,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	.resume =	usb_stor_resume,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	.reset_resume =	usb_stor_reset_resume,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	.pre_reset =	usb_stor_pre_reset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	.post_reset =	usb_stor_post_reset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	.id_table =	karma_usb_ids,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	.soft_unbind =	1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	.no_dynamic_id = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) module_usb_stor_driver(karma_driver, karma_host_template, DRV_NAME);