aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_hipd.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.h')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index f76b27f0aa2c..4354571a63ef 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -1026,6 +1026,14 @@ struct sym_hcb {
1026#endif 1026#endif
1027}; 1027};
1028 1028
1029#if SYM_CONF_DMA_ADDRESSING_MODE == 0
1030#define use_dac(np) 0
1031#define set_dac(np) do { } while (0)
1032#else
1033#define use_dac(np) (np)->use_dac
1034#define set_dac(np) (np)->use_dac = 1
1035#endif
1036
1029#define HCB_BA(np, lbl) (np->hcb_ba + offsetof(struct sym_hcb, lbl)) 1037#define HCB_BA(np, lbl) (np->hcb_ba + offsetof(struct sym_hcb, lbl))
1030 1038
1031 1039
@@ -1068,18 +1076,21 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
1068 */ 1076 */
1069 1077
1070#if SYM_CONF_DMA_ADDRESSING_MODE == 0 1078#if SYM_CONF_DMA_ADDRESSING_MODE == 0
1079#define DMA_DAC_MASK DMA_32BIT_MASK
1071#define sym_build_sge(np, data, badd, len) \ 1080#define sym_build_sge(np, data, badd, len) \
1072do { \ 1081do { \
1073 (data)->addr = cpu_to_scr(badd); \ 1082 (data)->addr = cpu_to_scr(badd); \
1074 (data)->size = cpu_to_scr(len); \ 1083 (data)->size = cpu_to_scr(len); \
1075} while (0) 1084} while (0)
1076#elif SYM_CONF_DMA_ADDRESSING_MODE == 1 1085#elif SYM_CONF_DMA_ADDRESSING_MODE == 1
1086#define DMA_DAC_MASK DMA_40BIT_MASK
1077#define sym_build_sge(np, data, badd, len) \ 1087#define sym_build_sge(np, data, badd, len) \
1078do { \ 1088do { \
1079 (data)->addr = cpu_to_scr(badd); \ 1089 (data)->addr = cpu_to_scr(badd); \
1080 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \ 1090 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \
1081} while (0) 1091} while (0)
1082#elif SYM_CONF_DMA_ADDRESSING_MODE == 2 1092#elif SYM_CONF_DMA_ADDRESSING_MODE == 2
1093#define DMA_DAC_MASK DMA_64BIT_MASK
1083int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s); 1094int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s);
1084static __inline void 1095static __inline void
1085sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len) 1096sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len)