Linux Kernel
3.7.1
|
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/cdrom.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include "usb.h"
#include "transport.h"
#include "protocol.h"
#include "debug.h"
#include "unusual_usbat.h"
Go to the source code of this file.
Data Structures | |
struct | usbat_info |
Macros | |
#define | USBAT_DEV_HP8200 0x01 |
#define | USBAT_DEV_FLASH 0x02 |
#define | USBAT_EPP_PORT 0x10 |
#define | USBAT_EPP_REGISTER 0x30 |
#define | USBAT_ATA 0x40 |
#define | USBAT_ISA 0x50 |
#define | USBAT_CMD_READ_REG 0x00 |
#define | USBAT_CMD_WRITE_REG 0x01 |
#define | USBAT_CMD_READ_BLOCK 0x02 |
#define | USBAT_CMD_WRITE_BLOCK 0x03 |
#define | USBAT_CMD_COND_READ_BLOCK 0x04 |
#define | USBAT_CMD_COND_WRITE_BLOCK 0x05 |
#define | USBAT_CMD_WRITE_REGS 0x07 |
#define | USBAT_CMD_EXEC_CMD 0x80 |
#define | USBAT_CMD_SET_FEAT 0x81 |
#define | USBAT_CMD_UIO 0x82 |
#define | USBAT_UIO_READ 1 |
#define | USBAT_UIO_WRITE 0 |
#define | USBAT_QUAL_FCQ 0x20 /* full compare */ |
#define | USBAT_QUAL_ALQ 0x10 /* auto load subcount */ |
#define | USBAT_FLASH_MEDIA_NONE 0 |
#define | USBAT_FLASH_MEDIA_CF 1 |
#define | USBAT_FLASH_MEDIA_SAME 0 |
#define | USBAT_FLASH_MEDIA_CHANGED 1 |
#define | USBAT_ATA_DATA 0x10 /* read/write data (R/W) */ |
#define | USBAT_ATA_FEATURES 0x11 /* set features (W) */ |
#define | USBAT_ATA_ERROR 0x11 /* error (R) */ |
#define | USBAT_ATA_SECCNT 0x12 /* sector count (R/W) */ |
#define | USBAT_ATA_SECNUM 0x13 /* sector number (R/W) */ |
#define | USBAT_ATA_LBA_ME 0x14 /* cylinder low (R/W) */ |
#define | USBAT_ATA_LBA_HI 0x15 /* cylinder high (R/W) */ |
#define | USBAT_ATA_DEVICE 0x16 /* head/device selection (R/W) */ |
#define | USBAT_ATA_STATUS 0x17 /* device status (R) */ |
#define | USBAT_ATA_CMD 0x17 /* device command (W) */ |
#define | USBAT_ATA_ALTSTATUS 0x0E /* status (no clear IRQ) (R) */ |
#define | USBAT_UIO_EPAD 0x80 /* Enable Peripheral Control Signals */ |
#define | USBAT_UIO_CDT 0x40 /* Card Detect (Read Only) */ |
#define | USBAT_UIO_1 0x20 /* I/O 1 */ |
#define | USBAT_UIO_0 0x10 /* I/O 0 */ |
#define | USBAT_UIO_EPP_ATA 0x08 /* 1=EPP mode, 0=ATA mode */ |
#define | USBAT_UIO_UI1 0x04 /* Input 1 */ |
#define | USBAT_UIO_UI0 0x02 /* Input 0 */ |
#define | USBAT_UIO_INTR_ACK 0x01 /* Interrupt (ATA/ISA)/Acknowledge (EPP) */ |
#define | USBAT_UIO_DRVRST 0x80 /* Reset Peripheral */ |
#define | USBAT_UIO_ACKD 0x40 /* Enable Card Detect */ |
#define | USBAT_UIO_OE1 0x20 /* I/O 1 set=output/clr=input */ |
#define | USBAT_UIO_OE0 0x10 /* I/O 0 set=output/clr=input */ |
#define | USBAT_UIO_ADPRST 0x01 /* Reset SCM chip */ |
#define | USBAT_FEAT_ETEN 0x80 /* External trigger enable */ |
#define | USBAT_FEAT_U1 0x08 |
#define | USBAT_FEAT_U0 0x04 |
#define | USBAT_FEAT_ET1 0x02 |
#define | USBAT_FEAT_ET2 0x01 |
#define | short_pack(LSB, MSB) ( ((u16)(LSB)) | ( ((u16)(MSB))<<8 ) ) |
#define | LSB_of(s) ((s)&0xFF) |
#define | MSB_of(s) ((s)>>8) |
#define | UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, vendorName, productName, useProtocol, useTransport, initFunction, flags) |
#define | UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, vendor_name, product_name, use_protocol, use_transport, init_function, Flags) |
Functions | |
MODULE_DESCRIPTION ("Driver for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI cable") | |
MODULE_AUTHOR ("Daniel Drake <[email protected]>, Robert Baruch <[email protected]>") | |
MODULE_LICENSE ("GPL") | |
MODULE_DEVICE_TABLE (usb, usbat_usb_ids) | |
module_usb_driver (usbat_driver) | |
Definition at line 152 of file shuttle_usbat.c.
Definition at line 153 of file shuttle_usbat.c.
Definition at line 151 of file shuttle_usbat.c.
#define UNUSUAL_DEV | ( | id_vendor, | |
id_product, | |||
bcdDeviceMin, | |||
bcdDeviceMax, | |||
vendorName, | |||
productName, | |||
useProtocol, | |||
useTransport, | |||
initFunction, | |||
flags | |||
) |
Definition at line 184 of file shuttle_usbat.c.
#define UNUSUAL_DEV | ( | idVendor, | |
idProduct, | |||
bcdDeviceMin, | |||
bcdDeviceMax, | |||
vendor_name, | |||
product_name, | |||
use_protocol, | |||
use_transport, | |||
init_function, | |||
Flags | |||
) |
Definition at line 184 of file shuttle_usbat.c.
#define USBAT_ATA 0x40 |
Definition at line 67 of file shuttle_usbat.c.
#define USBAT_ATA_ALTSTATUS 0x0E /* status (no clear IRQ) (R) */ |
Definition at line 111 of file shuttle_usbat.c.
#define USBAT_ATA_CMD 0x17 /* device command (W) */ |
Definition at line 110 of file shuttle_usbat.c.
#define USBAT_ATA_DATA 0x10 /* read/write data (R/W) */ |
Definition at line 101 of file shuttle_usbat.c.
#define USBAT_ATA_DEVICE 0x16 /* head/device selection (R/W) */ |
Definition at line 108 of file shuttle_usbat.c.
#define USBAT_ATA_ERROR 0x11 /* error (R) */ |
Definition at line 103 of file shuttle_usbat.c.
#define USBAT_ATA_FEATURES 0x11 /* set features (W) */ |
Definition at line 102 of file shuttle_usbat.c.
#define USBAT_ATA_LBA_HI 0x15 /* cylinder high (R/W) */ |
Definition at line 107 of file shuttle_usbat.c.
#define USBAT_ATA_LBA_ME 0x14 /* cylinder low (R/W) */ |
Definition at line 106 of file shuttle_usbat.c.
#define USBAT_ATA_SECCNT 0x12 /* sector count (R/W) */ |
Definition at line 104 of file shuttle_usbat.c.
#define USBAT_ATA_SECNUM 0x13 /* sector number (R/W) */ |
Definition at line 105 of file shuttle_usbat.c.
#define USBAT_ATA_STATUS 0x17 /* device status (R) */ |
Definition at line 109 of file shuttle_usbat.c.
#define USBAT_CMD_COND_READ_BLOCK 0x04 |
Definition at line 75 of file shuttle_usbat.c.
#define USBAT_CMD_COND_WRITE_BLOCK 0x05 |
Definition at line 76 of file shuttle_usbat.c.
#define USBAT_CMD_EXEC_CMD 0x80 |
Definition at line 80 of file shuttle_usbat.c.
#define USBAT_CMD_READ_BLOCK 0x02 |
Definition at line 73 of file shuttle_usbat.c.
#define USBAT_CMD_READ_REG 0x00 |
Definition at line 71 of file shuttle_usbat.c.
#define USBAT_CMD_SET_FEAT 0x81 |
Definition at line 81 of file shuttle_usbat.c.
#define USBAT_CMD_UIO 0x82 |
Definition at line 82 of file shuttle_usbat.c.
#define USBAT_CMD_WRITE_BLOCK 0x03 |
Definition at line 74 of file shuttle_usbat.c.
#define USBAT_CMD_WRITE_REG 0x01 |
Definition at line 72 of file shuttle_usbat.c.
#define USBAT_CMD_WRITE_REGS 0x07 |
Definition at line 77 of file shuttle_usbat.c.
#define USBAT_DEV_FLASH 0x02 |
Definition at line 63 of file shuttle_usbat.c.
#define USBAT_DEV_HP8200 0x01 |
Definition at line 62 of file shuttle_usbat.c.
#define USBAT_EPP_PORT 0x10 |
Definition at line 65 of file shuttle_usbat.c.
#define USBAT_EPP_REGISTER 0x30 |
Definition at line 66 of file shuttle_usbat.c.
#define USBAT_FEAT_ET1 0x02 |
Definition at line 136 of file shuttle_usbat.c.
#define USBAT_FEAT_ET2 0x01 |
Definition at line 137 of file shuttle_usbat.c.
#define USBAT_FEAT_ETEN 0x80 /* External trigger enable */ |
Definition at line 133 of file shuttle_usbat.c.
#define USBAT_FEAT_U0 0x04 |
Definition at line 135 of file shuttle_usbat.c.
#define USBAT_FEAT_U1 0x08 |
Definition at line 134 of file shuttle_usbat.c.
#define USBAT_FLASH_MEDIA_CF 1 |
Definition at line 94 of file shuttle_usbat.c.
#define USBAT_FLASH_MEDIA_CHANGED 1 |
Definition at line 98 of file shuttle_usbat.c.
#define USBAT_FLASH_MEDIA_NONE 0 |
Definition at line 93 of file shuttle_usbat.c.
#define USBAT_FLASH_MEDIA_SAME 0 |
Definition at line 97 of file shuttle_usbat.c.
#define USBAT_ISA 0x50 |
Definition at line 68 of file shuttle_usbat.c.
#define USBAT_QUAL_ALQ 0x10 /* auto load subcount */ |
Definition at line 90 of file shuttle_usbat.c.
#define USBAT_QUAL_FCQ 0x20 /* full compare */ |
Definition at line 89 of file shuttle_usbat.c.
#define USBAT_UIO_0 0x10 /* I/O 0 */ |
Definition at line 118 of file shuttle_usbat.c.
#define USBAT_UIO_1 0x20 /* I/O 1 */ |
Definition at line 117 of file shuttle_usbat.c.
#define USBAT_UIO_ACKD 0x40 /* Enable Card Detect */ |
Definition at line 126 of file shuttle_usbat.c.
#define USBAT_UIO_ADPRST 0x01 /* Reset SCM chip */ |
Definition at line 130 of file shuttle_usbat.c.
#define USBAT_UIO_CDT 0x40 /* Card Detect (Read Only) */ |
Definition at line 115 of file shuttle_usbat.c.
#define USBAT_UIO_DRVRST 0x80 /* Reset Peripheral */ |
Definition at line 125 of file shuttle_usbat.c.
#define USBAT_UIO_EPAD 0x80 /* Enable Peripheral Control Signals */ |
Definition at line 114 of file shuttle_usbat.c.
#define USBAT_UIO_EPP_ATA 0x08 /* 1=EPP mode, 0=ATA mode */ |
Definition at line 119 of file shuttle_usbat.c.
#define USBAT_UIO_INTR_ACK 0x01 /* Interrupt (ATA/ISA)/Acknowledge (EPP) */ |
Definition at line 122 of file shuttle_usbat.c.
#define USBAT_UIO_OE0 0x10 /* I/O 0 set=output/clr=input */ |
Definition at line 129 of file shuttle_usbat.c.
#define USBAT_UIO_OE1 0x20 /* I/O 1 set=output/clr=input */ |
Definition at line 127 of file shuttle_usbat.c.
#define USBAT_UIO_READ 1 |
Definition at line 85 of file shuttle_usbat.c.
#define USBAT_UIO_UI0 0x02 /* Input 0 */ |
Definition at line 121 of file shuttle_usbat.c.
#define USBAT_UIO_UI1 0x04 /* Input 1 */ |
Definition at line 120 of file shuttle_usbat.c.
#define USBAT_UIO_WRITE 0 |
Definition at line 86 of file shuttle_usbat.c.
MODULE_AUTHOR | ( | "Daniel Drake <[email protected]> | , |
Robert Baruch< autophile @starband.net >" | |||
) |
MODULE_DEVICE_TABLE | ( | usb | , |
usbat_usb_ids | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
module_usb_driver | ( | usbat_driver | ) |