Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mesh.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/blkdev.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
#include <linux/spinlock.h>
#include <asm/dbdma.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/prom.h>
#include <asm/irq.h>
#include <asm/hydra.h>
#include <asm/processor.h>
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/pci-bridge.h>
#include <asm/macio.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include "mesh.h"

Go to the source code of this file.

Data Structures

struct  dbglog
 
struct  mesh_target
 
struct  mesh_state
 

Macros

#define KERN_DEBUG   KERN_WARNING
 
#define ALLOW_SYNC(tgt)   ((sync_targets >> (tgt)) & 1)
 
#define ALLOW_RESEL(tgt)   ((resel_targets >> (tgt)) & 1)
 
#define ALLOW_DEBUG(tgt)   ((debug_targets >> (tgt)) & 1)
 
#define DEBUG_TARGET(cmd)   ((cmd) && ALLOW_DEBUG((cmd)->device->id))
 
#define N_DBG_LOG   50
 
#define N_DBG_SLOG   20
 
#define NUM_DBG_EVENTS   13
 
#define MKWORD(a, b, c, d)   (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
 

Enumerations

enum  mesh_phase {
  idle, arbitrating, selecting, commanding,
  dataing, statusing, busfreeing, disconnecting,
  reselecting, sleeping
}
 
enum  msg_phase {
  msg_none, msg_out, msg_out_xxx, msg_out_last,
  msg_in, msg_in_bad
}
 
enum  sdtr_phase { do_sdtr, sdtr_sent, sdtr_done }
 

Functions

 MODULE_AUTHOR ("Paul Mackerras ([email protected])")
 
 MODULE_DESCRIPTION ("PowerMac MESH SCSI driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param (sync_rate, int, 0)
 
 MODULE_PARM_DESC (sync_rate,"Synchronous rate (0..10, 0=async)")
 
 module_param (sync_targets, int, 0)
 
 MODULE_PARM_DESC (sync_targets,"Bitmask of targets allowed to set synchronous")
 
 module_param (resel_targets, int, 0)
 
 MODULE_PARM_DESC (resel_targets,"Bitmask of targets allowed to set disconnect")
 
 module_param (debug_targets, int, 0644)
 
 MODULE_PARM_DESC (debug_targets,"Bitmask of debugged targets")
 
 module_param (init_reset_delay, int, 0)
 
 MODULE_PARM_DESC (init_reset_delay,"Initial bus reset delay (0=no reset)")
 
 MODULE_DEVICE_TABLE (of, mesh_match)
 
 module_init (init_mesh)
 
 module_exit (exit_mesh)
 

Macro Definition Documentation

#define ALLOW_DEBUG (   tgt)    ((debug_targets >> (tgt)) & 1)

Definition at line 83 of file mesh.c.

#define ALLOW_RESEL (   tgt)    ((resel_targets >> (tgt)) & 1)

Definition at line 82 of file mesh.c.

#define ALLOW_SYNC (   tgt)    ((sync_targets >> (tgt)) & 1)

Definition at line 81 of file mesh.c.

#define DEBUG_TARGET (   cmd)    ((cmd) && ALLOW_DEBUG((cmd)->device->id))

Definition at line 84 of file mesh.c.

#define KERN_DEBUG   KERN_WARNING

Definition at line 53 of file mesh.c.

#define MKWORD (   a,
  b,
  c,
  d 
)    (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))

Definition at line 299 of file mesh.c.

#define N_DBG_LOG   50

Definition at line 87 of file mesh.c.

#define N_DBG_SLOG   20

Definition at line 88 of file mesh.c.

#define NUM_DBG_EVENTS   13

Definition at line 89 of file mesh.c.

Enumeration Type Documentation

enum mesh_phase
Enumerator:
idle 
arbitrating 
selecting 
commanding 
dataing 
statusing 
busfreeing 
disconnecting 
reselecting 
sleeping 

Definition at line 102 of file mesh.c.

enum msg_phase
Enumerator:
msg_none 
msg_out 
msg_out_xxx 
msg_out_last 
msg_in 
msg_in_bad 

Definition at line 115 of file mesh.c.

enum sdtr_phase
Enumerator:
do_sdtr 
sdtr_sent 
sdtr_done 

Definition at line 124 of file mesh.c.

Function Documentation

MODULE_AUTHOR ( "Paul Mackerras ([email protected])"  )
MODULE_DESCRIPTION ( "PowerMac MESH SCSI driver )
MODULE_DEVICE_TABLE ( of  ,
mesh_match   
)
module_exit ( exit_mesh  )
module_init ( init_mesh  )
MODULE_LICENSE ( "GPL"  )
module_param ( sync_rate  ,
int  ,
 
)
module_param ( sync_targets  ,
int  ,
 
)
module_param ( resel_targets  ,
int  ,
 
)
module_param ( debug_targets  ,
int  ,
0644   
)
module_param ( init_reset_delay  ,
int  ,
 
)
MODULE_PARM_DESC ( sync_rate  ,
"Synchronous rate (0..10, 0=async)"   
)
MODULE_PARM_DESC ( sync_targets  ,
"Bitmask of targets allowed to set synchronous"   
)
MODULE_PARM_DESC ( resel_targets  ,
"Bitmask of targets allowed to set disconnect  
)
MODULE_PARM_DESC ( debug_targets  ,
"Bitmask of debugged targets"   
)
MODULE_PARM_DESC ( init_reset_delay  ,
"Initial bus reset delay (0=no reset)"   
)