Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
nsp_cs.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/major.h>
#include <linux/blkdev.h>
#include <linux/stat.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <../drivers/scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#include "nsp_cs.h"
#include "nsp_io.h"
#include "nsp_message.c"

Go to the source code of this file.

Data Structures

struct  nsp_sync_table
 

Macros

#define NSP_DEBUG_MASK   0x000000
 
#define nsp_msg(type, args...)   nsp_cs_message("", 0, (type), args)
 
#define nsp_dbg(mask, args...)   /* */
 
#define NSP_DEBUG_QUEUECOMMAND   BIT(0)
 
#define NSP_DEBUG_REGISTER   BIT(1)
 
#define NSP_DEBUG_AUTOSCSI   BIT(2)
 
#define NSP_DEBUG_INTR   BIT(3)
 
#define NSP_DEBUG_SGLIST   BIT(4)
 
#define NSP_DEBUG_BUSFREE   BIT(5)
 
#define NSP_DEBUG_CDB_CONTENTS   BIT(6)
 
#define NSP_DEBUG_RESELECTION   BIT(7)
 
#define NSP_DEBUG_MSGINOCCUR   BIT(8)
 
#define NSP_DEBUG_EEPROM   BIT(9)
 
#define NSP_DEBUG_MSGOUTOCCUR   BIT(10)
 
#define NSP_DEBUG_BUSRESET   BIT(11)
 
#define NSP_DEBUG_RESTART   BIT(12)
 
#define NSP_DEBUG_SYNC   BIT(13)
 
#define NSP_DEBUG_WAIT   BIT(14)
 
#define NSP_DEBUG_TARGETFLAG   BIT(15)
 
#define NSP_DEBUG_PROC   BIT(16)
 
#define NSP_DEBUG_INIT   BIT(17)
 
#define NSP_DEBUG_DATA_IO   BIT(18)
 
#define NSP_SPECIAL_PRINT_REGISTER   BIT(20)
 
#define NSP_DEBUG_BUF_LEN   150
 
#define RFIFO_CRIT   64
 
#define WFIFO_CRIT   64
 
#define SPRINTF(args...)
 

Functions

 MODULE_AUTHOR ("YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>")
 
 MODULE_DESCRIPTION ("WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI host adapter module")
 
 MODULE_SUPPORTED_DEVICE ("sd,sr,sg,st")
 
 module_param (nsp_burst_mode, int, 0)
 
 MODULE_PARM_DESC (nsp_burst_mode,"Burst transfer mode (0=io8, 1=io32, 2=mem32(default))")
 
 module_param (free_ports, bool, 0)
 
 MODULE_PARM_DESC (free_ports,"Release IO ports after configuration? (default: 0 (=no))")
 
 MODULE_DEVICE_TABLE (pcmcia, nsp_cs_ids)
 

Macro Definition Documentation

#define nsp_dbg (   mask,
  args... 
)    /* */

Definition at line 103 of file nsp_cs.c.

#define NSP_DEBUG_AUTOSCSI   BIT(2)

Definition at line 114 of file nsp_cs.c.

#define NSP_DEBUG_BUF_LEN   150

Definition at line 133 of file nsp_cs.c.

#define NSP_DEBUG_BUSFREE   BIT(5)

Definition at line 117 of file nsp_cs.c.

#define NSP_DEBUG_BUSRESET   BIT(11)

Definition at line 123 of file nsp_cs.c.

#define NSP_DEBUG_CDB_CONTENTS   BIT(6)

Definition at line 118 of file nsp_cs.c.

#define NSP_DEBUG_DATA_IO   BIT(18)

Definition at line 130 of file nsp_cs.c.

#define NSP_DEBUG_EEPROM   BIT(9)

Definition at line 121 of file nsp_cs.c.

#define NSP_DEBUG_INIT   BIT(17)

Definition at line 129 of file nsp_cs.c.

#define NSP_DEBUG_INTR   BIT(3)

Definition at line 115 of file nsp_cs.c.

#define NSP_DEBUG_MASK   0x000000

Definition at line 101 of file nsp_cs.c.

#define NSP_DEBUG_MSGINOCCUR   BIT(8)

Definition at line 120 of file nsp_cs.c.

#define NSP_DEBUG_MSGOUTOCCUR   BIT(10)

Definition at line 122 of file nsp_cs.c.

#define NSP_DEBUG_PROC   BIT(16)

Definition at line 128 of file nsp_cs.c.

#define NSP_DEBUG_QUEUECOMMAND   BIT(0)

Definition at line 112 of file nsp_cs.c.

#define NSP_DEBUG_REGISTER   BIT(1)

Definition at line 113 of file nsp_cs.c.

#define NSP_DEBUG_RESELECTION   BIT(7)

Definition at line 119 of file nsp_cs.c.

#define NSP_DEBUG_RESTART   BIT(12)

Definition at line 124 of file nsp_cs.c.

#define NSP_DEBUG_SGLIST   BIT(4)

Definition at line 116 of file nsp_cs.c.

#define NSP_DEBUG_SYNC   BIT(13)

Definition at line 125 of file nsp_cs.c.

#define NSP_DEBUG_TARGETFLAG   BIT(15)

Definition at line 127 of file nsp_cs.c.

#define NSP_DEBUG_WAIT   BIT(14)

Definition at line 126 of file nsp_cs.c.

#define nsp_msg (   type,
  args... 
)    nsp_cs_message("", 0, (type), args)

Definition at line 102 of file nsp_cs.c.

#define NSP_SPECIAL_PRINT_REGISTER   BIT(20)

Definition at line 131 of file nsp_cs.c.

#define RFIFO_CRIT   64

Definition at line 712 of file nsp_cs.c.

#define SPRINTF (   args...)
Value:
do { \
if(length > (pos - buffer)) { \
pos += snprintf(pos, length - (pos - buffer) + 1, ## args); \
nsp_dbg(NSP_DEBUG_PROC, "buffer=0x%p pos=0x%p length=%d %d\n", buffer, pos, length, length - (pos - buffer));\
} \
} while(0)

Definition at line 1368 of file nsp_cs.c.

#define WFIFO_CRIT   64

Definition at line 713 of file nsp_cs.c.

Function Documentation

MODULE_AUTHOR ( "YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>"  )
MODULE_DESCRIPTION ( "WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI host adapter module"  )
MODULE_DEVICE_TABLE ( pcmcia  ,
nsp_cs_ids   
)
module_param ( nsp_burst_mode  ,
int  ,
 
)
module_param ( free_ports  ,
bool  ,
 
)
MODULE_PARM_DESC ( nsp_burst_mode  ,
"Burst transfer mode (0=io8, 1=io32, 2=mem32(default))"   
)
MODULE_PARM_DESC ( free_ports  ,
"Release IO ports after configuration? (default: 0 (=no))"   
)
MODULE_SUPPORTED_DEVICE ( sd,
sr  ,
sg  ,
st  
)