#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
Go to the source code of this file.
|
| MODULE_AUTHOR (DRIVER_AUTHOR) |
|
| MODULE_DESCRIPTION (DRIVER_DESC) |
|
| MODULE_LICENSE ("GPL") |
|
| module_param (vendor, ushort, 0) |
|
| MODULE_PARM_DESC (vendor,"User specified USB idVendor (required)") |
|
| module_param (product, ushort, 0) |
|
| MODULE_PARM_DESC (product,"User specified USB idProduct (required)") |
|
| module_param (safe, bool, 0) |
|
| MODULE_PARM_DESC (safe,"Turn Safe Encapsulation On/Off") |
|
| module_param (padded, bool, 0) |
|
| MODULE_PARM_DESC (padded,"Pad to full wMaxPacketSize On/Off") |
|
| MODULE_DEVICE_TABLE (usb, id_table) |
|
| module_init (safe_init) |
|
| module_exit (safe_exit) |
|
#define CDC_DEVICE_CLASS 0x02 |
#define CDC_INTERFACE_CLASS 0x02 |
#define CDC_INTERFACE_SUBCLASS 0x06 |
#define CONFIG_USB_SERIAL_SAFE_PADDED 0 |
#define CRC10_FCS |
( |
|
fcs, |
|
|
|
c |
|
) |
| ((((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c)) |
#define CRC10_GOODFCS 0x000 /* Good final FCS value */ |
#define CRC10_INITFCS 0x000 /* Initial FCS value */ |
#define DRIVER_DESC "USB Safe Encapsulated Serial" |
#define LINEO_INTERFACE_CLASS 0xff |
#define LINEO_INTERFACE_SUBCLASS_SAFENET 0x01 |
#define LINEO_INTERFACE_SUBCLASS_SAFESERIAL 0x02 |
#define LINEO_SAFENET_CRC 0x01 |
#define LINEO_SAFENET_CRC_PADDED 0x02 |
#define LINEO_SAFESERIAL_CRC 0x01 |
#define LINEO_SAFESERIAL_CRC_PADDED 0x02 |
#define MY_USB_DEVICE |
( |
|
vend, |
|
|
|
prod, |
|
|
|
dc, |
|
|
|
ic, |
|
|
|
isc |
|
) |
| |
Value:.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
USB_DEVICE_ID_MATCH_DEV_CLASS | \
USB_DEVICE_ID_MATCH_INT_CLASS | \
USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
.idProduct = (prod),\
.bInterfaceSubClass = (
isc),
Definition at line 124 of file safe_serial.c.
#define pr_fmt |
( |
|
fmt | ) |
KBUILD_MODNAME ": " fmt |
MODULE_DEVICE_TABLE |
( |
usb |
, |
|
|
id_table |
|
|
) |
| |
module_exit |
( |
safe_exit |
| ) |
|
module_init |
( |
safe_init |
| ) |
|
module_param |
( |
padded |
, |
|
|
bool |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
safe |
, |
|
|
"Turn Safe Encapsulation On/Off" |
|
|
) |
| |