linux/drivers/usb/storage/freecom.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Freecom USB/IDE adaptor
 *
 * Freecom v0.1:
 *
 * First release
 *
 * Current development and maintenance by:
 *   (C) 2000 David Brown <[email protected]>
 *
 * This driver was developed with information provided in FREECOM's USB
 * Programmers Reference Guide.  For further information contact Freecom
 * (https://www.freecom.de/)
 */

#include <linux/module.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>

#include "usb.h"
#include "transport.h"
#include "protocol.h"
#include "debug.h"
#include "scsiglue.h"

#define DRV_NAME

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

#ifdef CONFIG_USB_STORAGE_DEBUG
static void pdump(struct us_data *us, void *ibuffer, int length);
#endif

/* Bits of HD_STATUS */
#define ERR_STAT
#define DRQ_STAT

/* All of the outgoing packets are 64 bytes long. */
struct freecom_cb_wrap {};

struct freecom_xfer_wrap {} __attribute__ ((packed));

struct freecom_ide_out {};

struct freecom_ide_in {};

struct freecom_status {};

/*
 * Freecom stuffs the interrupt status in the INDEX_STAT bit of the ide
 * register.
 */
#define FCM_INT_STATUS
#define FCM_STATUS_BUSY

/*
 * These are the packet types.  The low bit indicates that this command
 * should wait for an interrupt.
 */
#define FCM_PACKET_ATAPI
#define FCM_PACKET_STATUS

/*
 * Receive data from the IDE interface.  The ATAPI packet has already
 * waited, so the data should be immediately available.
 */
#define FCM_PACKET_INPUT

/* Send data to the IDE interface. */
#define FCM_PACKET_OUTPUT

/*
 * Write a value to an ide register.  Or the ide register to write after
 * munging the address a bit.
 */
#define FCM_PACKET_IDE_WRITE
#define FCM_PACKET_IDE_READ

/* All packets (except for status) are 64 bytes long. */
#define FCM_PACKET_LENGTH
#define FCM_STATUS_PACKET_LENGTH

static int init_freecom(struct us_data *us);


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

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

#undef UNUSUAL_DEV

/*
 * The flags table
 */
#define UNUSUAL_DEV

static struct us_unusual_dev freecom_unusual_dev_list[] =;

#undef UNUSUAL_DEV

static int
freecom_readdata (struct scsi_cmnd *srb, struct us_data *us,
		unsigned int ipipe, unsigned int opipe, int count)
{}

static int
freecom_writedata (struct scsi_cmnd *srb, struct us_data *us,
		int unsigned ipipe, unsigned int opipe, int count)
{}

/*
 * Transport for the Freecom USB/IDE adaptor.
 *
 */
static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us)
{}

static int init_freecom(struct us_data *us)
{}

static int usb_stor_freecom_reset(struct us_data *us)
{}

#ifdef CONFIG_USB_STORAGE_DEBUG
static void pdump(struct us_data *us, void *ibuffer, int length)
{}
#endif

static struct scsi_host_template freecom_host_template;

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

static struct usb_driver freecom_driver =;

module_usb_stor_driver(freecom_driver, freecom_host_template, DRV_NAME);