Merge /spare/repo/linux-2.6/
This commit is contained in:
@@ -28,7 +28,7 @@ extern const unsigned char scsi_command_size[8];
|
||||
* SCSI device types
|
||||
*/
|
||||
|
||||
#define MAX_SCSI_DEVICE_CODE 14
|
||||
#define MAX_SCSI_DEVICE_CODE 15
|
||||
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
|
||||
|
||||
/*
|
||||
@@ -214,8 +214,8 @@ static inline int scsi_status_is_good(int status)
|
||||
* - treated as TYPE_DISK */
|
||||
#define TYPE_MEDIUM_CHANGER 0x08
|
||||
#define TYPE_COMM 0x09 /* Communications device */
|
||||
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
|
||||
#define TYPE_RAID 0x0c
|
||||
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
|
||||
#define TYPE_RBC 0x0e
|
||||
#define TYPE_NO_LUN 0x7f
|
||||
|
||||
|
@@ -31,14 +31,11 @@ struct scsi_cmnd {
|
||||
int sc_magic;
|
||||
|
||||
struct scsi_device *device;
|
||||
unsigned short state;
|
||||
unsigned short owner;
|
||||
struct scsi_request *sc_request;
|
||||
|
||||
struct list_head list; /* scsi_cmnd participates in queue lists */
|
||||
|
||||
struct list_head eh_entry; /* entry for the host eh_cmd_q */
|
||||
int eh_state; /* Used for state tracking in error handlr */
|
||||
int eh_eflags; /* Used by error handlr */
|
||||
void (*done) (struct scsi_cmnd *); /* Mid-level done function */
|
||||
|
||||
@@ -80,8 +77,6 @@ struct scsi_cmnd {
|
||||
* sense info */
|
||||
unsigned short use_sg; /* Number of pieces of scatter-gather */
|
||||
unsigned short sglist_len; /* size of malloc'd scatter-gather list */
|
||||
unsigned short abort_reason; /* If the mid-level code requests an
|
||||
* abort, this is the reason. */
|
||||
unsigned bufflen; /* Size of data buffer */
|
||||
void *buffer; /* Data buffer */
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
struct request_queue;
|
||||
struct scsi_cmnd;
|
||||
struct scsi_mode_data;
|
||||
|
||||
struct scsi_lun;
|
||||
|
||||
/*
|
||||
* sdev state: If you alter this, you also need to alter scsi_sysfs.c
|
||||
@@ -243,6 +243,7 @@ extern void scsi_target_reap(struct scsi_target *);
|
||||
extern void scsi_target_block(struct device *);
|
||||
extern void scsi_target_unblock(struct device *);
|
||||
extern void scsi_remove_target(struct device *);
|
||||
extern void int_to_scsilun(unsigned int, struct scsi_lun *);
|
||||
extern const char *scsi_device_state_name(enum scsi_device_state);
|
||||
extern int scsi_is_sdev_device(const struct device *);
|
||||
extern int scsi_is_target_device(const struct device *);
|
||||
|
@@ -641,12 +641,6 @@ static inline void scsi_assign_lock(struct Scsi_Host *shost, spinlock_t *lock)
|
||||
shost->host_lock = lock;
|
||||
}
|
||||
|
||||
static inline void scsi_set_device(struct Scsi_Host *shost,
|
||||
struct device *dev)
|
||||
{
|
||||
shost->shost_gendev.parent = dev;
|
||||
}
|
||||
|
||||
static inline struct device *scsi_get_device(struct Scsi_Host *shost)
|
||||
{
|
||||
return shost->shost_gendev.parent;
|
||||
|
26
include/scsi/sg_request.h
Normal file
26
include/scsi/sg_request.h
Normal file
@@ -0,0 +1,26 @@
|
||||
typedef struct scsi_request Scsi_Request;
|
||||
|
||||
static Scsi_Request *dummy_cmdp; /* only used for sizeof */
|
||||
|
||||
typedef struct sg_scatter_hold { /* holding area for scsi scatter gather info */
|
||||
unsigned short k_use_sg; /* Count of kernel scatter-gather pieces */
|
||||
unsigned short sglist_len; /* size of malloc'd scatter-gather list ++ */
|
||||
unsigned bufflen; /* Size of (aggregate) data buffer */
|
||||
unsigned b_malloc_len; /* actual len malloc'ed in buffer */
|
||||
void *buffer; /* Data buffer or scatter list (k_use_sg>0) */
|
||||
char dio_in_use; /* 0->indirect IO (or mmap), 1->dio */
|
||||
unsigned char cmd_opcode; /* first byte of command */
|
||||
} Sg_scatter_hold;
|
||||
|
||||
typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */
|
||||
Scsi_Request *my_cmdp; /* != 0 when request with lower levels */
|
||||
struct sg_request *nextrp; /* NULL -> tail request (slist) */
|
||||
struct sg_fd *parentfp; /* NULL -> not in use */
|
||||
Sg_scatter_hold data; /* hold buffer, perhaps scatter list */
|
||||
sg_io_hdr_t header; /* scsi command+info, see <scsi/sg.h> */
|
||||
unsigned char sense_b[sizeof (dummy_cmdp->sr_sense_buffer)];
|
||||
char res_used; /* 1 -> using reserve buffer, 0 -> not ... */
|
||||
char orphan; /* 1 -> drop on sight, 0 -> normal */
|
||||
char sg_io_owned; /* 1 -> packet belongs to SG_IO */
|
||||
volatile char done; /* 0->before bh, 1->before read, 2->read */
|
||||
} Sg_request;
|
Reference in New Issue
Block a user