diff options
Diffstat (limited to 'include/scsi')
| -rw-r--r-- | include/scsi/libiscsi.h | 3 | ||||
| -rw-r--r-- | include/scsi/scsi.h | 3 | ||||
| -rw-r--r-- | include/scsi/scsi_cmnd.h | 4 | ||||
| -rw-r--r-- | include/scsi/scsi_host.h | 24 |
4 files changed, 17 insertions, 17 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 887e57e3e223..a72edd4eceec 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -303,6 +303,7 @@ struct iscsi_session { | |||
| 303 | int cmds_max; /* size of cmds array */ | 303 | int cmds_max; /* size of cmds array */ |
| 304 | struct iscsi_task **cmds; /* Original Cmds arr */ | 304 | struct iscsi_task **cmds; /* Original Cmds arr */ |
| 305 | struct iscsi_pool cmdpool; /* PDU's pool */ | 305 | struct iscsi_pool cmdpool; /* PDU's pool */ |
| 306 | void *dd_data; /* LLD private data */ | ||
| 306 | }; | 307 | }; |
| 307 | 308 | ||
| 308 | enum { | 309 | enum { |
| @@ -363,7 +364,7 @@ extern int iscsi_target_alloc(struct scsi_target *starget); | |||
| 363 | */ | 364 | */ |
| 364 | extern struct iscsi_cls_session * | 365 | extern struct iscsi_cls_session * |
| 365 | iscsi_session_setup(struct iscsi_transport *, struct Scsi_Host *shost, | 366 | iscsi_session_setup(struct iscsi_transport *, struct Scsi_Host *shost, |
| 366 | uint16_t, int, uint32_t, unsigned int); | 367 | uint16_t, int, int, uint32_t, unsigned int); |
| 367 | extern void iscsi_session_teardown(struct iscsi_cls_session *); | 368 | extern void iscsi_session_teardown(struct iscsi_cls_session *); |
| 368 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); | 369 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); |
| 369 | extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | 370 | extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 084478e14d24..34c46ab5c31b 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
| @@ -129,6 +129,9 @@ struct scsi_cmnd; | |||
| 129 | #define MI_REPORT_TARGET_PGS 0x0a | 129 | #define MI_REPORT_TARGET_PGS 0x0a |
| 130 | /* values for maintenance out */ | 130 | /* values for maintenance out */ |
| 131 | #define MO_SET_TARGET_PGS 0x0a | 131 | #define MO_SET_TARGET_PGS 0x0a |
| 132 | /* values for variable length command */ | ||
| 133 | #define READ_32 0x09 | ||
| 134 | #define WRITE_32 0x0b | ||
| 132 | 135 | ||
| 133 | /* Values for T10/04-262r7 */ | 136 | /* Values for T10/04-262r7 */ |
| 134 | #define ATA_16 0x85 /* 16-byte pass-thru */ | 137 | #define ATA_16 0x85 /* 16-byte pass-thru */ |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 3878d1dc7f59..a5e885a111df 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
| @@ -229,10 +229,6 @@ enum scsi_prot_operations { | |||
| 229 | /* OS-HBA: Protected, HBA-Target: Protected */ | 229 | /* OS-HBA: Protected, HBA-Target: Protected */ |
| 230 | SCSI_PROT_READ_PASS, | 230 | SCSI_PROT_READ_PASS, |
| 231 | SCSI_PROT_WRITE_PASS, | 231 | SCSI_PROT_WRITE_PASS, |
| 232 | |||
| 233 | /* OS-HBA: Protected, HBA-Target: Protected, checksum conversion */ | ||
| 234 | SCSI_PROT_READ_CONVERT, | ||
| 235 | SCSI_PROT_WRITE_CONVERT, | ||
| 236 | }; | 232 | }; |
| 237 | 233 | ||
| 238 | static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) | 234 | static inline void scsi_set_prot_op(struct scsi_cmnd *scmd, unsigned char op) |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index b62a097b3ecb..47941fc5aba7 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -797,24 +797,24 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost) | |||
| 797 | 797 | ||
| 798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) | 798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) |
| 799 | { | 799 | { |
| 800 | switch (target_type) { | 800 | static unsigned char cap[] = { 0, |
| 801 | case 1: return shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION; | 801 | SHOST_DIF_TYPE1_PROTECTION, |
| 802 | case 2: return shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION; | 802 | SHOST_DIF_TYPE2_PROTECTION, |
| 803 | case 3: return shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION; | 803 | SHOST_DIF_TYPE3_PROTECTION }; |
| 804 | } | ||
| 805 | 804 | ||
| 806 | return 0; | 805 | return shost->prot_capabilities & cap[target_type] ? target_type : 0; |
| 807 | } | 806 | } |
| 808 | 807 | ||
| 809 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) | 808 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) |
| 810 | { | 809 | { |
| 811 | switch (target_type) { | 810 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
| 812 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; | 811 | static unsigned char cap[] = { SHOST_DIX_TYPE0_PROTECTION, |
| 813 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; | 812 | SHOST_DIX_TYPE1_PROTECTION, |
| 814 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; | 813 | SHOST_DIX_TYPE2_PROTECTION, |
| 815 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; | 814 | SHOST_DIX_TYPE3_PROTECTION }; |
| 816 | } | ||
| 817 | 815 | ||
| 816 | return shost->prot_capabilities & cap[target_type]; | ||
| 817 | #endif | ||
| 818 | return 0; | 818 | return 0; |
| 819 | } | 819 | } |
| 820 | 820 | ||
