diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 19:00:22 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 19:00:22 +0400 |
commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
tree | daada742542518b02d7db7c5d32e715eaa5f166d /drivers/scsi/be2iscsi/be_main.c | |
parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
download | linux-4de3a8e101150feaefa1139611a50ff37467f33e.tar.xz |
Merge branch 'master' into fixes
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 379c696dac19..375756fa95cf 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -325,9 +325,9 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf) } -static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) +static umode_t beiscsi_tgt_get_attr_visibility(void *data, int type) { - int rc; + umode_t rc; switch (type) { case ISCSI_BOOT_TGT_NAME: @@ -348,9 +348,9 @@ static mode_t beiscsi_tgt_get_attr_visibility(void *data, int type) return rc; } -static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) +static umode_t beiscsi_ini_get_attr_visibility(void *data, int type) { - int rc; + umode_t rc; switch (type) { case ISCSI_BOOT_INI_INITIATOR_NAME: @@ -364,9 +364,9 @@ static mode_t beiscsi_ini_get_attr_visibility(void *data, int type) } -static mode_t beiscsi_eth_get_attr_visibility(void *data, int type) +static umode_t beiscsi_eth_get_attr_visibility(void *data, int type) { - int rc; + umode_t rc; switch (type) { case ISCSI_BOOT_ETH_FLAGS: @@ -1105,7 +1105,6 @@ be_complete_io(struct beiscsi_conn *beiscsi_conn, struct be_status_bhs *sts_bhs = (struct be_status_bhs *)io_task->cmd_bhs; struct iscsi_conn *conn = beiscsi_conn->conn; - unsigned int sense_len; unsigned char *sense; u32 resid = 0, exp_cmdsn, max_cmdsn; u8 rsp, status, flags; @@ -1153,9 +1152,11 @@ be_complete_io(struct beiscsi_conn *beiscsi_conn, } if (status == SAM_STAT_CHECK_CONDITION) { + u16 sense_len; unsigned short *slen = (unsigned short *)sts_bhs->sense_info; + sense = sts_bhs->sense_info + sizeof(unsigned short); - sense_len = cpu_to_be16(*slen); + sense_len = be16_to_cpu(*slen); memcpy(task->sc->sense_buffer, sense, min_t(u16, sense_len, SCSI_SENSE_BUFFERSIZE)); } |