Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
speedtch.c File Reference
#include <asm/page.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/firmware.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/usb/ch9.h>
#include <linux/workqueue.h>
#include "usbatm.h"

Go to the source code of this file.

Data Structures

struct  speedtch_params
 
struct  speedtch_instance_data
 

Macros

#define DRIVER_AUTHOR   "Johan Verrept, Duncan Sands <[email protected]>"
 
#define DRIVER_VERSION   "1.10"
 
#define DRIVER_DESC   "Alcatel SpeedTouch USB driver version " DRIVER_VERSION
 
#define CTRL_TIMEOUT   2000 /* milliseconds */
 
#define DATA_TIMEOUT   2000 /* milliseconds */
 
#define OFFSET_7   0 /* size 1 */
 
#define OFFSET_b   1 /* size 8 */
 
#define OFFSET_d   9 /* size 4 */
 
#define OFFSET_e   13 /* size 1 */
 
#define OFFSET_f   14 /* size 1 */
 
#define SIZE_7   1
 
#define SIZE_b   8
 
#define SIZE_d   4
 
#define SIZE_e   1
 
#define SIZE_f   1
 
#define MIN_POLL_DELAY   5000 /* milliseconds */
 
#define MAX_POLL_DELAY   60000 /* milliseconds */
 
#define RESUBMIT_DELAY   1000 /* milliseconds */
 
#define DEFAULT_BULK_ALTSETTING   1
 
#define DEFAULT_ISOC_ALTSETTING   3
 
#define DEFAULT_DL_512_FIRST   0
 
#define DEFAULT_ENABLE_ISOC   0
 
#define DEFAULT_SW_BUFFERING   0
 
#define DEFAULT_B_MAX_DSL   8128
 
#define DEFAULT_MODEM_MODE   11
 
#define MODEM_OPTION_LENGTH   16
 
#define INTERFACE_DATA   1
 
#define ENDPOINT_INT   0x81
 
#define ENDPOINT_BULK_DATA   0x07
 
#define ENDPOINT_ISOC_DATA   0x07
 
#define ENDPOINT_FIRMWARE   0x05
 

Functions

 module_param (altsetting, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (altsetting,"Alternative setting for data interface (bulk_default: "__MODULE_STRING(DEFAULT_BULK_ALTSETTING)"; isoc_default: "__MODULE_STRING(DEFAULT_ISOC_ALTSETTING)")")
 
 module_param (dl_512_first, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (dl_512_first,"Read 512 bytes before sending firmware (default: "__MODULE_STRING(DEFAULT_DL_512_FIRST)")")
 
 module_param (enable_isoc, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (enable_isoc,"Use isochronous transfers if available (default: "__MODULE_STRING(DEFAULT_ENABLE_ISOC)")")
 
 module_param (sw_buffering, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (sw_buffering,"Enable software buffering (default: "__MODULE_STRING(DEFAULT_SW_BUFFERING)")")
 
 module_param (BMaxDSL, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (BMaxDSL,"default: "__MODULE_STRING(DEFAULT_B_MAX_DSL))
 
 module_param (ModemMode, byte, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ModemMode,"default: "__MODULE_STRING(DEFAULT_MODEM_MODE))
 
 module_param_array (ModemOption, byte,&num_ModemOption, S_IRUGO)
 
 MODULE_PARM_DESC (ModemOption,"default: 0x10,0x00,0x00,0x00,0x20")
 
 MODULE_DEVICE_TABLE (usb, speedtch_usb_ids)
 
 module_usb_driver (speedtch_usb_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRIVER_VERSION)
 

Macro Definition Documentation

#define CTRL_TIMEOUT   2000 /* milliseconds */

Definition at line 49 of file speedtch.c.

#define DATA_TIMEOUT   2000 /* milliseconds */

Definition at line 50 of file speedtch.c.

#define DEFAULT_B_MAX_DSL   8128

Definition at line 80 of file speedtch.c.

#define DEFAULT_BULK_ALTSETTING   1

Definition at line 69 of file speedtch.c.

#define DEFAULT_DL_512_FIRST   0

Definition at line 71 of file speedtch.c.

#define DEFAULT_ENABLE_ISOC   0

Definition at line 72 of file speedtch.c.

#define DEFAULT_ISOC_ALTSETTING   3

Definition at line 70 of file speedtch.c.

#define DEFAULT_MODEM_MODE   11

Definition at line 81 of file speedtch.c.

#define DEFAULT_SW_BUFFERING   0

Definition at line 73 of file speedtch.c.

#define DRIVER_AUTHOR   "Johan Verrept, Duncan Sands <[email protected]>"

Definition at line 43 of file speedtch.c.

#define DRIVER_DESC   "Alcatel SpeedTouch USB driver version " DRIVER_VERSION

Definition at line 45 of file speedtch.c.

#define DRIVER_VERSION   "1.10"

Definition at line 44 of file speedtch.c.

#define ENDPOINT_BULK_DATA   0x07

Definition at line 126 of file speedtch.c.

#define ENDPOINT_FIRMWARE   0x05

Definition at line 128 of file speedtch.c.

#define ENDPOINT_INT   0x81

Definition at line 125 of file speedtch.c.

#define ENDPOINT_ISOC_DATA   0x07

Definition at line 127 of file speedtch.c.

#define INTERFACE_DATA   1

Definition at line 124 of file speedtch.c.

#define MAX_POLL_DELAY   60000 /* milliseconds */

Definition at line 65 of file speedtch.c.

#define MIN_POLL_DELAY   5000 /* milliseconds */

Definition at line 64 of file speedtch.c.

#define MODEM_OPTION_LENGTH   16

Definition at line 82 of file speedtch.c.

#define OFFSET_7   0 /* size 1 */

Definition at line 52 of file speedtch.c.

#define OFFSET_b   1 /* size 8 */

Definition at line 53 of file speedtch.c.

#define OFFSET_d   9 /* size 4 */

Definition at line 54 of file speedtch.c.

#define OFFSET_e   13 /* size 1 */

Definition at line 55 of file speedtch.c.

#define OFFSET_f   14 /* size 1 */

Definition at line 56 of file speedtch.c.

#define RESUBMIT_DELAY   1000 /* milliseconds */

Definition at line 67 of file speedtch.c.

#define SIZE_7   1

Definition at line 58 of file speedtch.c.

#define SIZE_b   8

Definition at line 59 of file speedtch.c.

#define SIZE_d   4

Definition at line 60 of file speedtch.c.

#define SIZE_e   1

Definition at line 61 of file speedtch.c.

#define SIZE_f   1

Definition at line 62 of file speedtch.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
speedtch_usb_ids   
)
MODULE_LICENSE ( "GPL"  )
module_param ( altsetting  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( dl_512_first  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( enable_isoc  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( sw_buffering  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( BMaxDSL  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( ModemMode  ,
byte  ,
S_IRUGO S_IWUSR 
)
module_param_array ( ModemOption  ,
byte  ,
num_ModemOption,
S_IRUGO   
)
MODULE_PARM_DESC ( altsetting  ,
"Alternative setting for data interface (bulk_default: "__MODULE_STRING(DEFAULT_BULK_ALTSETTING)"; isoc_default: "__MODULE_STRING(DEFAULT_ISOC_ALTSETTING)")"   
)
MODULE_PARM_DESC ( dl_512_first  ,
"Read 512 bytes before sending firmware (default: "__MODULE_STRING(DEFAULT_DL_512_FIRST)")"   
)
MODULE_PARM_DESC ( enable_isoc  ,
"Use isochronous transfers if available (default: "__MODULE_STRING(DEFAULT_ENABLE_ISOC)")"   
)
MODULE_PARM_DESC ( sw_buffering  ,
"Enable software buffering (default: "__MODULE_STRING(DEFAULT_SW_BUFFERING)")"   
)
MODULE_PARM_DESC ( BMaxDSL  ,
"default: "  __MODULE_STRINGDEFAULT_B_MAX_DSL 
)
MODULE_PARM_DESC ( ModemMode  ,
"default: "  __MODULE_STRINGDEFAULT_MODEM_MODE 
)
MODULE_PARM_DESC ( ModemOption  ,
"default:  0x10,
0x00  ,
0x00  ,
0x00  ,
0x20"   
)
module_usb_driver ( speedtch_usb_driver  )
MODULE_VERSION ( DRIVER_VERSION  )