Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
esp_scsi.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/completion.h>
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/irqreturn.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_transport_spi.h>
#include "esp_scsi.h"

Go to the source code of this file.

Macros

#define DRV_MODULE_NAME   "esp"
 
#define PFX   DRV_MODULE_NAME ": "
 
#define DRV_VERSION   "2.000"
 
#define DRV_MODULE_RELDATE   "April 19, 2007"
 
#define ESP_DEBUG_INTR   0x00000001
 
#define ESP_DEBUG_SCSICMD   0x00000002
 
#define ESP_DEBUG_RESET   0x00000004
 
#define ESP_DEBUG_MSGIN   0x00000008
 
#define ESP_DEBUG_MSGOUT   0x00000010
 
#define ESP_DEBUG_CMDDONE   0x00000020
 
#define ESP_DEBUG_DISCONNECT   0x00000040
 
#define ESP_DEBUG_DATASTART   0x00000080
 
#define ESP_DEBUG_DATADONE   0x00000100
 
#define ESP_DEBUG_RECONNECT   0x00000200
 
#define ESP_DEBUG_AUTOSENSE   0x00000400
 
#define esp_log_intr(f, a...)
 
#define esp_log_reset(f, a...)
 
#define esp_log_msgin(f, a...)
 
#define esp_log_msgout(f, a...)
 
#define esp_log_cmddone(f, a...)
 
#define esp_log_disconnect(f, a...)
 
#define esp_log_datastart(f, a...)
 
#define esp_log_datadone(f, a...)
 
#define esp_log_reconnect(f, a...)
 
#define esp_log_autosense(f, a...)
 
#define esp_read8(REG)   esp->ops->esp_read8(esp, REG)
 
#define esp_write8(VAL, REG)   esp->ops->esp_write8(esp, VAL, REG)
 

Functions

void scsi_esp_cmd (struct esp *esp, u8 val)
 
 EXPORT_SYMBOL (scsi_esp_cmd)
 
irqreturn_t scsi_esp_intr (int irq, void *dev_id)
 
 EXPORT_SYMBOL (scsi_esp_intr)
 
int scsi_esp_register (struct esp *esp, struct device *dev)
 
 EXPORT_SYMBOL (scsi_esp_register)
 
void scsi_esp_unregister (struct esp *esp)
 
 EXPORT_SYMBOL (scsi_esp_unregister)
 
 EXPORT_SYMBOL (scsi_esp_template)
 
 MODULE_DESCRIPTION ("ESP SCSI driver core")
 
 MODULE_AUTHOR ("David S. Miller ([email protected])")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 
 module_param (esp_bus_reset_settle, int, 0)
 
 MODULE_PARM_DESC (esp_bus_reset_settle,"ESP scsi bus reset delay in seconds")
 
 module_param (esp_debug, int, 0)
 
 MODULE_PARM_DESC (esp_debug,"ESP bitmapped debugging message enable value:\n"" 0x00000001 Log interrupt events\n"" 0x00000002 Log scsi commands\n"" 0x00000004 Log resets\n"" 0x00000008 Log message in events\n"" 0x00000010 Log message out events\n"" 0x00000020 Log command completion\n"" 0x00000040 Log disconnects\n"" 0x00000080 Log data start\n"" 0x00000100 Log data done\n"" 0x00000200 Log reconnects\n"" 0x00000400 Log auto-sense data\n")
 
 module_init (esp_init)
 
 module_exit (esp_exit)
 

Variables

struct scsi_host_template scsi_esp_template
 

Macro Definition Documentation

#define DRV_MODULE_NAME   "esp"

Definition at line 32 of file esp_scsi.c.

#define DRV_MODULE_RELDATE   "April 19, 2007"

Definition at line 35 of file esp_scsi.c.

#define DRV_VERSION   "2.000"

Definition at line 34 of file esp_scsi.c.

#define ESP_DEBUG_AUTOSENSE   0x00000400

Definition at line 51 of file esp_scsi.c.

#define ESP_DEBUG_CMDDONE   0x00000020

Definition at line 46 of file esp_scsi.c.

#define ESP_DEBUG_DATADONE   0x00000100

Definition at line 49 of file esp_scsi.c.

#define ESP_DEBUG_DATASTART   0x00000080

Definition at line 48 of file esp_scsi.c.

#define ESP_DEBUG_DISCONNECT   0x00000040

Definition at line 47 of file esp_scsi.c.

#define ESP_DEBUG_INTR   0x00000001

Definition at line 41 of file esp_scsi.c.

#define ESP_DEBUG_MSGIN   0x00000008

Definition at line 44 of file esp_scsi.c.

#define ESP_DEBUG_MSGOUT   0x00000010

Definition at line 45 of file esp_scsi.c.

#define ESP_DEBUG_RECONNECT   0x00000200

Definition at line 50 of file esp_scsi.c.

#define ESP_DEBUG_RESET   0x00000004

Definition at line 43 of file esp_scsi.c.

#define ESP_DEBUG_SCSICMD   0x00000002

Definition at line 42 of file esp_scsi.c.

#define esp_log_autosense (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_AUTOSENSE) \
printk(f, ## a); \
} while (0)

Definition at line 98 of file esp_scsi.c.

#define esp_log_cmddone (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_CMDDONE) \
printk(f, ## a); \
} while (0)

Definition at line 73 of file esp_scsi.c.

#define esp_log_datadone (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_DATADONE) \
printk(f, ## a); \
} while (0)

Definition at line 88 of file esp_scsi.c.

#define esp_log_datastart (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_DATASTART) \
printk(f, ## a); \
} while (0)

Definition at line 83 of file esp_scsi.c.

#define esp_log_disconnect (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_DISCONNECT) \
printk(f, ## a); \
} while (0)

Definition at line 78 of file esp_scsi.c.

#define esp_log_intr (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_INTR) \
printk(f, ## a); \
} while (0)

Definition at line 53 of file esp_scsi.c.

#define esp_log_msgin (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_MSGIN) \
printk(f, ## a); \
} while (0)

Definition at line 63 of file esp_scsi.c.

#define esp_log_msgout (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_MSGOUT) \
printk(f, ## a); \
} while (0)

Definition at line 68 of file esp_scsi.c.

#define esp_log_reconnect (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_RECONNECT) \
printk(f, ## a); \
} while (0)

Definition at line 93 of file esp_scsi.c.

#define esp_log_reset (   f,
  a... 
)
Value:
do { if (esp_debug & ESP_DEBUG_RESET) \
printk(f, ## a); \
} while (0)

Definition at line 58 of file esp_scsi.c.

#define esp_read8 (   REG)    esp->ops->esp_read8(esp, REG)

Definition at line 103 of file esp_scsi.c.

#define esp_write8 (   VAL,
  REG 
)    esp->ops->esp_write8(esp, VAL, REG)

Definition at line 104 of file esp_scsi.c.

#define PFX   DRV_MODULE_NAME ": "

Definition at line 33 of file esp_scsi.c.

Function Documentation

EXPORT_SYMBOL ( scsi_esp_cmd  )
EXPORT_SYMBOL ( scsi_esp_intr  )
EXPORT_SYMBOL ( scsi_esp_register  )
EXPORT_SYMBOL ( scsi_esp_unregister  )
EXPORT_SYMBOL ( scsi_esp_template  )
MODULE_AUTHOR ( "David S. Miller ([email protected])"  )
MODULE_DESCRIPTION ( "ESP SCSI driver core )
module_exit ( esp_exit  )
module_init ( esp_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( esp_bus_reset_settle  ,
int  ,
 
)
module_param ( esp_debug  ,
int  ,
 
)
MODULE_PARM_DESC ( esp_bus_reset_settle  ,
"ESP scsi bus reset delay in seconds  
)
MODULE_PARM_DESC ( esp_debug  ,
"ESP bitmapped debugging message enable value:\n"" 0x00000001 Log interrupt events\n"" 0x00000002 Log scsi commands\n"" 0x00000004 Log resets\n"" 0x00000008 Log message in events\n"" 0x00000010 Log message out events\n"" 0x00000020 Log command completion\n"" 0x00000040 Log disconnects\n"" 0x00000080 Log data start\n"" 0x00000100 Log data done\n"" 0x00000200 Log reconnects\n"" 0x00000400 Log auto-sense data\n"   
)
MODULE_VERSION ( DRV_VERSION  )
void scsi_esp_cmd ( struct esp esp,
u8  val 
)

Definition at line 117 of file esp_scsi.c.

irqreturn_t scsi_esp_intr ( int  irq,
void dev_id 
)

Definition at line 2113 of file esp_scsi.c.

int scsi_esp_register ( struct esp esp,
struct device dev 
)

Definition at line 2313 of file esp_scsi.c.

void scsi_esp_unregister ( struct esp esp)

Definition at line 2353 of file esp_scsi.c.

Variable Documentation

struct scsi_host_template scsi_esp_template
Initial value:
= {
.module = THIS_MODULE,
.name = "esp",
.info = esp_info,
.queuecommand = esp_queuecommand,
.target_alloc = esp_target_alloc,
.target_destroy = esp_target_destroy,
.slave_alloc = esp_slave_alloc,
.slave_configure = esp_slave_configure,
.slave_destroy = esp_slave_destroy,
.eh_abort_handler = esp_eh_abort_handler,
.eh_bus_reset_handler = esp_eh_bus_reset_handler,
.eh_host_reset_handler = esp_eh_host_reset_handler,
.can_queue = 7,
.this_id = 7,
.sg_tablesize = SG_ALL,
.use_clustering = ENABLE_CLUSTERING,
.max_sectors = 0xffff,
.skip_settle_delay = 1,
}

Definition at line 2613 of file esp_scsi.c.