Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits) [SCSI] iscsi: bidi support for iscsi_tcp [SCSI] iscsi: bidi support at the generic libiscsi level [SCSI] iscsi: extended cdb support [SCSI] zfcp: Fix error handling for blocked unit for send FCP command [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock [SCSI] zfcp: fix 31 bit compile warnings [SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands [SCSI] bsg: remove minor in struct bsg_device [SCSI] bsg: use better helper list functions [SCSI] bsg: replace kobject_get with blk_get_queue [SCSI] bsg: takes a ref to struct device in fops->open [SCSI] qla1280: remove version check [SCSI] libsas: fix endianness bug in sas_ata [SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next) [SCSI] aacraid: Do not describe check_reset parameter with its value [SCSI] aacraid: Fix down_interruptible() to check the return value [SCSI] sun3_scsi_vme: add MODULE_LICENSE [SCSI] st: rename flush_write_buffer() [SCSI] tgt: use KMEM_CACHE macro [SCSI] initio: fix big endian problems for auto request sense ...
This commit is contained in:
@@ -37,7 +37,7 @@ attribute_container_set_no_classdevs(struct attribute_container *atc)
|
||||
}
|
||||
|
||||
int attribute_container_register(struct attribute_container *cont);
|
||||
int attribute_container_unregister(struct attribute_container *cont);
|
||||
int __must_check attribute_container_unregister(struct attribute_container *cont);
|
||||
void attribute_container_create_device(struct device *dev,
|
||||
int (*fn)(struct attribute_container *,
|
||||
struct device *,
|
||||
|
||||
@@ -192,6 +192,7 @@ struct mtpos {
|
||||
#define MT_ST_SCSI2LOGICAL 0x800
|
||||
#define MT_ST_SYSV 0x1000
|
||||
#define MT_ST_NOWAIT 0x2000
|
||||
#define MT_ST_SILI 0x4000
|
||||
|
||||
/* The mode parameters to be controlled. Parameter chosen with bits 20-28 */
|
||||
#define MT_ST_CLEAR_DEFAULT 0xfffff
|
||||
|
||||
@@ -213,6 +213,11 @@ int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, gfp_t,
|
||||
sg_alloc_fn *);
|
||||
int sg_alloc_table(struct sg_table *, unsigned int, gfp_t);
|
||||
|
||||
size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
void *buf, size_t buflen);
|
||||
size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
void *buf, size_t buflen);
|
||||
|
||||
/*
|
||||
* Maximum number of entries that will be allocated in one piece, if
|
||||
* a list larger than this is required then chaining will be utilized.
|
||||
|
||||
@@ -86,9 +86,10 @@ static inline int transport_container_register(struct transport_container *tc)
|
||||
return attribute_container_register(&tc->ac);
|
||||
}
|
||||
|
||||
static inline int transport_container_unregister(struct transport_container *tc)
|
||||
static inline void transport_container_unregister(struct transport_container *tc)
|
||||
{
|
||||
return attribute_container_unregister(&tc->ac);
|
||||
if (unlikely(attribute_container_unregister(&tc->ac)))
|
||||
BUG();
|
||||
}
|
||||
|
||||
int transport_class_register(struct transport_class *);
|
||||
|
||||
@@ -112,6 +112,7 @@ struct iscsi_ahs_hdr {
|
||||
|
||||
#define ISCSI_AHSTYPE_CDB 1
|
||||
#define ISCSI_AHSTYPE_RLENGTH 2
|
||||
#define ISCSI_CDB_SIZE 16
|
||||
|
||||
/* iSCSI PDU Header */
|
||||
struct iscsi_cmd {
|
||||
@@ -125,7 +126,7 @@ struct iscsi_cmd {
|
||||
__be32 data_length;
|
||||
__be32 cmdsn;
|
||||
__be32 exp_statsn;
|
||||
uint8_t cdb[16]; /* SCSI Command Block */
|
||||
uint8_t cdb[ISCSI_CDB_SIZE]; /* SCSI Command Block */
|
||||
/* Additional Data (Command Dependent) */
|
||||
};
|
||||
|
||||
@@ -154,7 +155,8 @@ struct iscsi_ecdb_ahdr {
|
||||
__be16 ahslength; /* CDB length - 15, including reserved byte */
|
||||
uint8_t ahstype;
|
||||
uint8_t reserved;
|
||||
uint8_t ecdb[260 - 16]; /* 4-byte aligned extended CDB spillover */
|
||||
/* 4-byte aligned extended CDB spillover */
|
||||
uint8_t ecdb[260 - ISCSI_CDB_SIZE];
|
||||
};
|
||||
|
||||
/* SCSI Response Header */
|
||||
|
||||
@@ -677,4 +677,6 @@ extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
|
||||
struct ssp_response_iu *iu);
|
||||
struct sas_phy *sas_find_local_phy(struct domain_device *dev);
|
||||
|
||||
int sas_request_addr(struct Scsi_Host *shost, u8 *addr);
|
||||
|
||||
#endif /* _SASLIB_H_ */
|
||||
|
||||
@@ -47,12 +47,12 @@ static inline int dev_is_sata(struct domain_device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int sas_ata_init_host_and_port(struct domain_device *found_dev,
|
||||
static inline int sas_ata_init_host_and_port(struct domain_device *found_dev,
|
||||
struct scsi_target *starget)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void sas_ata_task_abort(struct sas_task *task)
|
||||
static inline void sas_ata_task_abort(struct sas_task *task)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -130,6 +130,9 @@ extern void scsi_release_buffers(struct scsi_cmnd *cmd);
|
||||
extern int scsi_dma_map(struct scsi_cmnd *cmd);
|
||||
extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
|
||||
|
||||
struct scsi_cmnd *scsi_allocate_command(gfp_t gfp_mask);
|
||||
void scsi_free_command(gfp_t gfp_mask, struct scsi_cmnd *cmd);
|
||||
|
||||
static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd)
|
||||
{
|
||||
return cmd->sdb.table.nents;
|
||||
@@ -175,4 +178,18 @@ static inline struct scsi_data_buffer *scsi_out(struct scsi_cmnd *cmd)
|
||||
return &cmd->sdb;
|
||||
}
|
||||
|
||||
static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd,
|
||||
void *buf, int buflen)
|
||||
{
|
||||
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd),
|
||||
buf, buflen);
|
||||
}
|
||||
|
||||
static inline int scsi_sg_copy_to_buffer(struct scsi_cmnd *cmd,
|
||||
void *buf, int buflen)
|
||||
{
|
||||
return sg_copy_to_buffer(scsi_sglist(cmd), scsi_sg_count(cmd),
|
||||
buf, buflen);
|
||||
}
|
||||
|
||||
#endif /* _SCSI_SCSI_CMND_H */
|
||||
|
||||
@@ -57,13 +57,16 @@ extern const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len,
|
||||
|
||||
extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len,
|
||||
u64 * info_out);
|
||||
|
||||
|
||||
extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq);
|
||||
|
||||
/*
|
||||
* Reset request from external source
|
||||
*/
|
||||
#define SCSI_TRY_RESET_DEVICE 1
|
||||
#define SCSI_TRY_RESET_BUS 2
|
||||
#define SCSI_TRY_RESET_HOST 3
|
||||
#define SCSI_TRY_RESET_TARGET 4
|
||||
|
||||
extern int scsi_reset_provider(struct scsi_device *, int);
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ struct scsi_host_template {
|
||||
*/
|
||||
int (* eh_abort_handler)(struct scsi_cmnd *);
|
||||
int (* eh_device_reset_handler)(struct scsi_cmnd *);
|
||||
int (* eh_target_reset_handler)(struct scsi_cmnd *);
|
||||
int (* eh_bus_reset_handler)(struct scsi_cmnd *);
|
||||
int (* eh_host_reset_handler)(struct scsi_cmnd *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user