Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
pd.c File Reference
#include <linux/types.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/hdreg.h>
#include <linux/cdrom.h>
#include <linux/blkdev.h>
#include <linux/blkpg.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
#include <linux/workqueue.h>
#include "paride.h"

Go to the source code of this file.

Data Structures

struct  pd_unit
 

Macros

#define PD_VERSION   "1.05"
 
#define PD_MAJOR   45
 
#define PD_NAME   "pd"
 
#define PD_UNITS   4
 
#define PD_BITS   4
 
#define PD_LOG_HEADS   64
 
#define PD_LOG_SECTS   32
 
#define PD_ID_OFF   54
 
#define PD_ID_LEN   14
 
#define PD_MAX_RETRIES   5
 
#define PD_TMO   800 /* interrupt timeout in jiffies */
 
#define PD_SPIN_DEL   50 /* spin delay in micro-seconds */
 
#define PD_SPIN   (1000000*PD_TMO)/(HZ*PD_SPIN_DEL)
 
#define STAT_ERR   0x00001
 
#define STAT_INDEX   0x00002
 
#define STAT_ECC   0x00004
 
#define STAT_DRQ   0x00008
 
#define STAT_SEEK   0x00010
 
#define STAT_WRERR   0x00020
 
#define STAT_READY   0x00040
 
#define STAT_BUSY   0x00080
 
#define ERR_AMNF   0x00100
 
#define ERR_TK0NF   0x00200
 
#define ERR_ABRT   0x00400
 
#define ERR_MCR   0x00800
 
#define ERR_IDNF   0x01000
 
#define ERR_MC   0x02000
 
#define ERR_UNC   0x04000
 
#define ERR_TMO   0x10000
 
#define IDE_READ   0x20
 
#define IDE_WRITE   0x30
 
#define IDE_READ_VRFY   0x40
 
#define IDE_INIT_DEV_PARMS   0x91
 
#define IDE_STANDBY   0x96
 
#define IDE_ACKCHANGE   0xdb
 
#define IDE_DOORLOCK   0xde
 
#define IDE_DOORUNLOCK   0xdf
 
#define IDE_IDENTIFY   0xec
 
#define IDE_EJECT   0xed
 
#define PD_NAMELEN   8
 
#define DBMSG(msg)   ((verbose>1)?(msg):NULL)
 

Enumerations

enum  {
  D_PRT, D_PRO, D_UNI, D_MOD,
  D_GEO, D_SBY, D_DLY, D_SLV
}
 
enum  action { Fail = 0, Ok = 1, Hold, Wait }
 

Functions

 module_param (verbose, bool, 0)
 
 module_param (major, int, 0)
 
 module_param (name, charp, 0)
 
 module_param (cluster, int, 0)
 
 module_param (nice, int, 0)
 
 module_param_array (drive0, int, NULL, 0)
 
 module_param_array (drive1, int, NULL, 0)
 
 module_param_array (drive2, int, NULL, 0)
 
 module_param_array (drive3, int, NULL, 0)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DBMSG (   msg)    ((verbose>1)?(msg):NULL)

Definition at line 296 of file pd.c.

#define ERR_ABRT   0x00400

Definition at line 203 of file pd.c.

#define ERR_AMNF   0x00100

Definition at line 201 of file pd.c.

#define ERR_IDNF   0x01000

Definition at line 205 of file pd.c.

#define ERR_MC   0x02000

Definition at line 206 of file pd.c.

#define ERR_MCR   0x00800

Definition at line 204 of file pd.c.

#define ERR_TK0NF   0x00200

Definition at line 202 of file pd.c.

#define ERR_TMO   0x10000

Definition at line 208 of file pd.c.

#define ERR_UNC   0x04000

Definition at line 207 of file pd.c.

#define IDE_ACKCHANGE   0xdb

Definition at line 215 of file pd.c.

#define IDE_DOORLOCK   0xde

Definition at line 216 of file pd.c.

#define IDE_DOORUNLOCK   0xdf

Definition at line 217 of file pd.c.

#define IDE_EJECT   0xed

Definition at line 219 of file pd.c.

#define IDE_IDENTIFY   0xec

Definition at line 218 of file pd.c.

#define IDE_INIT_DEV_PARMS   0x91

Definition at line 213 of file pd.c.

#define IDE_READ   0x20

Definition at line 210 of file pd.c.

#define IDE_READ_VRFY   0x40

Definition at line 212 of file pd.c.

#define IDE_STANDBY   0x96

Definition at line 214 of file pd.c.

#define IDE_WRITE   0x30

Definition at line 211 of file pd.c.

#define PD_BITS   4

Definition at line 176 of file pd.c.

#define PD_ID_LEN   14

Definition at line 184 of file pd.c.

#define PD_ID_OFF   54

Definition at line 183 of file pd.c.

#define PD_LOG_HEADS   64

Definition at line 180 of file pd.c.

#define PD_LOG_SECTS   32

Definition at line 181 of file pd.c.

#define PD_MAJOR   45

Definition at line 118 of file pd.c.

#define PD_MAX_RETRIES   5

Definition at line 186 of file pd.c.

#define PD_NAME   "pd"

Definition at line 119 of file pd.c.

#define PD_NAMELEN   8

Definition at line 221 of file pd.c.

#define PD_SPIN   (1000000*PD_TMO)/(HZ*PD_SPIN_DEL)

Definition at line 190 of file pd.c.

#define PD_SPIN_DEL   50 /* spin delay in micro-seconds */

Definition at line 188 of file pd.c.

#define PD_TMO   800 /* interrupt timeout in jiffies */

Definition at line 187 of file pd.c.

#define PD_UNITS   4

Definition at line 120 of file pd.c.

#define PD_VERSION   "1.05"

Definition at line 117 of file pd.c.

#define STAT_BUSY   0x00080

Definition at line 199 of file pd.c.

#define STAT_DRQ   0x00008

Definition at line 195 of file pd.c.

#define STAT_ECC   0x00004

Definition at line 194 of file pd.c.

#define STAT_ERR   0x00001

Definition at line 192 of file pd.c.

#define STAT_INDEX   0x00002

Definition at line 193 of file pd.c.

#define STAT_READY   0x00040

Definition at line 198 of file pd.c.

#define STAT_SEEK   0x00010

Definition at line 196 of file pd.c.

#define STAT_WRERR   0x00020

Definition at line 197 of file pd.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
D_PRT 
D_PRO 
D_UNI 
D_MOD 
D_GEO 
D_SBY 
D_DLY 
D_SLV 

Definition at line 143 of file pd.c.

enum u8 action
Enumerator:
Fail 
Ok 
Hold 
Wait 

Definition at line 351 of file pd.c.

Function Documentation

MODULE_LICENSE ( "GPL"  )
module_param ( verbose  ,
bool  ,
 
)
module_param ( major  ,
int  ,
 
)
module_param ( name  ,
charp  ,
 
)
module_param ( cluster  ,
int  ,
 
)
module_param ( nice  ,
int  ,
 
)
module_param_array ( drive0  ,
int  ,
NULL  ,
 
)
module_param_array ( drive1  ,
int  ,
NULL  ,
 
)
module_param_array ( drive2  ,
int  ,
NULL  ,
 
)
module_param_array ( drive3  ,
int  ,
NULL  ,
 
)