linux/drivers/usb/storage/karma.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Rio Karma
 *
 *   (c) 2006 Bob Copeland <[email protected]>
 *   (c) 2006 Keith Bennett <[email protected]>
 */

#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 "debug.h"
#include "scsiglue.h"

#define DRV_NAME

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_IMPORT_NS();

#define RIO_PREFIX
#define RIO_PREFIX_LEN
#define RIO_SEND_LEN
#define RIO_RECV_LEN

#define RIO_ENTER_STORAGE
#define RIO_LEAVE_STORAGE
#define RIO_RESET

struct karma_data {};

static int rio_karma_init(struct us_data *us);


/*
 * The table of devices
 */
#define UNUSUAL_DEV

static struct usb_device_id karma_usb_ids[] =;
MODULE_DEVICE_TABLE(usb, karma_usb_ids);

#undef UNUSUAL_DEV

/*
 * The flags table
 */
#define UNUSUAL_DEV

static struct us_unusual_dev karma_unusual_dev_list[] =;

#undef UNUSUAL_DEV


/*
 * Send commands to Rio Karma.
 *
 * For each command we send 40 bytes starting 'RIOP\0' followed by
 * the command number and a sequence number, which the device will ack
 * with a 512-byte packet with the high four bits set and everything
 * else null.  Then we send 'RIOP\x80' followed by a zero and the
 * sequence number, until byte 5 in the response repeats the sequence
 * number.
 */
static int rio_karma_send_command(char cmd, struct us_data *us)
{}

/*
 * Trap START_STOP and READ_10 to leave/re-enter storage mode.
 * Everything else is propagated to the normal bulk layer.
 */
static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us)
{}

static void rio_karma_destructor(void *extra)
{}

static int rio_karma_init(struct us_data *us)
{}

static struct scsi_host_template karma_host_template;

static int karma_probe(struct usb_interface *intf,
			 const struct usb_device_id *id)
{}

static struct usb_driver karma_driver =;

module_usb_stor_driver(karma_driver, karma_host_template, DRV_NAME);