Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

This commit is contained in:
Linus Torvalds
2006-01-14 12:16:07 -08:00
103 changed files with 5185 additions and 3312 deletions
+1
View File
@@ -181,6 +181,7 @@
#define PCI_DEVICE_ID_LSI_FC929X 0x0626
#define PCI_DEVICE_ID_LSI_FC939X 0x0642
#define PCI_DEVICE_ID_LSI_FC949X 0x0640
#define PCI_DEVICE_ID_LSI_FC949ES 0x0646
#define PCI_DEVICE_ID_LSI_FC919X 0x0628
#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701
#define PCI_DEVICE_ID_LSI_61C102 0x0901
+2
View File
@@ -31,9 +31,11 @@ enum raid_level {
RAID_LEVEL_LINEAR,
RAID_LEVEL_0,
RAID_LEVEL_1,
RAID_LEVEL_10,
RAID_LEVEL_3,
RAID_LEVEL_4,
RAID_LEVEL_5,
RAID_LEVEL_50,
RAID_LEVEL_6,
};
+6
View File
@@ -168,6 +168,12 @@ typedef uint64_t iscsi_connh_t; /* iSCSI Data-Path connection handle */
#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle)
#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr)
#define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata))
/**
* iscsi_hostdata - get LLD hostdata from scsi_host
* @_hostdata: pointer to scsi host's hostdata
**/
#define iscsi_hostdata(_hostdata) ((void*)_hostdata + sizeof(unsigned long))
/*
+6
View File
@@ -31,6 +31,12 @@ extern const unsigned char scsi_command_size[8];
#define MAX_SCSI_DEVICE_CODE 15
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
/*
* Special value for scanning to specify scanning or rescanning of all
* possible channels, (target) ids, or luns on a given shost.
*/
#define SCAN_WILD_CARD ~0
/*
* SCSI opcodes
*/
-1
View File
@@ -151,6 +151,5 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
extern void scsi_put_command(struct scsi_cmnd *);
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int);
extern void scsi_finish_command(struct scsi_cmnd *cmd);
extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd);
#endif /* _SCSI_SCSI_CMND_H */
+2 -1
View File
@@ -5,6 +5,7 @@
#include <linux/list.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
struct block_device;
struct completion;
@@ -469,7 +470,7 @@ struct Scsi_Host {
spinlock_t default_lock;
spinlock_t *host_lock;
struct semaphore scan_mutex;/* serialize scanning activity */
struct mutex scan_mutex;/* serialize scanning activity */
struct list_head eh_cmd_q;
struct task_struct * ehandler; /* Error recovery thread. */
+2 -5
View File
@@ -30,12 +30,9 @@ struct scsi_transport_template {
struct transport_container device_attrs;
/*
* If set, call target_parent prior to allocating a scsi_target,
* so we get the appropriate parent for the target. This function
* is required for transports like FC and iSCSI that do not put the
* scsi_target under scsi_host.
* If set, called from sysfs and legacy procfs rescanning code.
*/
struct device *(*target_parent)(struct Scsi_Host *, int, uint);
int (*user_scan)(struct Scsi_Host *, uint, uint, uint);
/* The size of the specific transport attribute structure (a
* space of this size will be left at the end of the
+4
View File
@@ -303,6 +303,7 @@ struct fc_host_attrs {
/* Fixed Attributes */
u64 node_name;
u64 port_name;
u64 permanent_port_name;
u32 supported_classes;
u8 supported_fc4s[FC_FC4_LIST_SIZE];
char symbolic_name[FC_SYMBOLIC_NAME_SIZE];
@@ -338,6 +339,8 @@ struct fc_host_attrs {
(((struct fc_host_attrs *)(x)->shost_data)->node_name)
#define fc_host_port_name(x) \
(((struct fc_host_attrs *)(x)->shost_data)->port_name)
#define fc_host_permanent_port_name(x) \
(((struct fc_host_attrs *)(x)->shost_data)->permanent_port_name)
#define fc_host_supported_classes(x) \
(((struct fc_host_attrs *)(x)->shost_data)->supported_classes)
#define fc_host_supported_fc4s(x) \
@@ -426,6 +429,7 @@ struct fc_function_template {
/* host fixed attributes */
unsigned long show_host_node_name:1;
unsigned long show_host_port_name:1;
unsigned long show_host_permanent_port_name:1;
unsigned long show_host_supported_classes:1;
unsigned long show_host_supported_fc4s:1;
unsigned long show_host_symbolic_name:1;
+67 -8
View File
@@ -23,8 +23,14 @@
#ifndef SCSI_TRANSPORT_ISCSI_H
#define SCSI_TRANSPORT_ISCSI_H
#include <linux/device.h>
#include <scsi/iscsi_if.h>
struct scsi_transport_template;
struct Scsi_Host;
struct mempool_zone;
struct iscsi_cls_conn;
/**
* struct iscsi_transport - iSCSI Transport template
*
@@ -48,23 +54,31 @@ struct iscsi_transport {
char *name;
unsigned int caps;
struct scsi_host_template *host_template;
/* LLD session/scsi_host data size */
int hostdata_size;
/* LLD iscsi_host data size */
int ihostdata_size;
/* LLD connection data size */
int conndata_size;
int max_lun;
unsigned int max_conn;
unsigned int max_cmd_len;
iscsi_sessionh_t (*create_session) (uint32_t initial_cmdsn,
struct Scsi_Host *shost);
void (*destroy_session) (iscsi_sessionh_t session);
iscsi_connh_t (*create_conn) (iscsi_sessionh_t session, uint32_t cid);
struct Scsi_Host *(*create_session) (struct scsi_transport_template *t,
uint32_t initial_cmdsn);
void (*destroy_session) (struct Scsi_Host *shost);
struct iscsi_cls_conn *(*create_conn) (struct Scsi_Host *shost,
uint32_t cid);
int (*bind_conn) (iscsi_sessionh_t session, iscsi_connh_t conn,
uint32_t transport_fd, int is_leading);
int (*start_conn) (iscsi_connh_t conn);
void (*stop_conn) (iscsi_connh_t conn, int flag);
void (*destroy_conn) (iscsi_connh_t conn);
void (*destroy_conn) (struct iscsi_cls_conn *conn);
int (*set_param) (iscsi_connh_t conn, enum iscsi_param param,
uint32_t value);
int (*get_param) (iscsi_connh_t conn, enum iscsi_param param,
uint32_t *value);
int (*get_conn_param) (void *conndata, enum iscsi_param param,
uint32_t *value);
int (*get_session_param) (struct Scsi_Host *shost,
enum iscsi_param param, uint32_t *value);
int (*send_pdu) (iscsi_connh_t conn, struct iscsi_hdr *hdr,
char *data, uint32_t data_size);
void (*get_stats) (iscsi_connh_t conn, struct iscsi_stats *stats);
@@ -73,7 +87,7 @@ struct iscsi_transport {
/*
* transport registration upcalls
*/
extern int iscsi_register_transport(struct iscsi_transport *tt);
extern struct scsi_transport_template *iscsi_register_transport(struct iscsi_transport *tt);
extern int iscsi_unregister_transport(struct iscsi_transport *tt);
/*
@@ -83,4 +97,49 @@ extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error);
extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr,
char *data, uint32_t data_size);
struct iscsi_cls_conn {
struct list_head conn_list; /* item in connlist */
void *dd_data; /* LLD private data */
struct iscsi_transport *transport;
iscsi_connh_t connh;
int active; /* must be accessed with the connlock */
struct device dev; /* sysfs transport/container device */
struct mempool_zone *z_error;
struct mempool_zone *z_pdu;
struct list_head freequeue;
};
#define iscsi_dev_to_conn(_dev) \
container_of(_dev, struct iscsi_cls_conn, dev)
struct iscsi_cls_session {
struct list_head list; /* item in session_list */
struct iscsi_transport *transport;
struct device dev; /* sysfs transport/container device */
};
#define iscsi_dev_to_session(_dev) \
container_of(_dev, struct iscsi_cls_session, dev)
#define iscsi_session_to_shost(_session) \
dev_to_shost(_session->dev.parent)
/*
* session and connection functions that can be used by HW iSCSI LLDs
*/
extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
struct iscsi_transport *t);
extern int iscsi_destroy_session(struct iscsi_cls_session *session);
extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
uint32_t cid);
extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
/*
* session functions used by software iscsi
*/
extern struct Scsi_Host *
iscsi_transport_create_session(struct scsi_transport_template *scsit,
struct iscsi_transport *transport);
extern int iscsi_transport_destroy_session(struct Scsi_Host *shost);
#endif
+1 -1
View File
@@ -54,7 +54,7 @@ struct spi_transport_attrs {
unsigned int support_qas; /* supports quick arbitration and selection */
/* Private Fields */
unsigned int dv_pending:1; /* Internal flag */
struct semaphore dv_sem; /* semaphore to serialise dv */
struct mutex dv_mutex; /* semaphore to serialise dv */
};
enum spi_signal_type {