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 | 15 |
4 files changed, 16 insertions, 9 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..6e728b176904 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -798,9 +798,15 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost) | |||
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 | switch (target_type) { |
801 | case 1: return shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION; | 801 | case 1: |
802 | case 2: return shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION; | 802 | if (shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION) |
803 | case 3: return shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION; | 803 | return target_type; |
804 | case 2: | ||
805 | if (shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION) | ||
806 | return target_type; | ||
807 | case 3: | ||
808 | if (shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION) | ||
809 | return target_type; | ||
804 | } | 810 | } |
805 | 811 | ||
806 | return 0; | 812 | return 0; |
@@ -808,13 +814,14 @@ static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsign | |||
808 | 814 | ||
809 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) | 815 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) |
810 | { | 816 | { |
817 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
811 | switch (target_type) { | 818 | switch (target_type) { |
812 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; | 819 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; |
813 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; | 820 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; |
814 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; | 821 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; |
815 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; | 822 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; |
816 | } | 823 | } |
817 | 824 | #endif | |
818 | return 0; | 825 | return 0; |
819 | } | 826 | } |
820 | 827 | ||