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.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index a95cbe4b8e39..c55c7a57afa0 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -444,7 +444,7 @@ struct sym_tcb {
444 */ 444 */
445 u_char usrflags; 445 u_char usrflags;
446 u_short usrtags; 446 u_short usrtags;
447 struct scsi_device *sdev; 447 struct scsi_target *starget;
448}; 448};
449 449
450/* 450/*
@@ -754,10 +754,8 @@ struct sym_ccb {
754 int segments; /* Number of SG segments */ 754 int segments; /* Number of SG segments */
755 755
756 u8 order; /* Tag type (if tagged command) */ 756 u8 order; /* Tag type (if tagged command) */
757 unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */
757 758
758 /*
759 * Miscellaneous status'.
760 */
761 u_char nego_status; /* Negotiation status */ 759 u_char nego_status; /* Negotiation status */
762 u_char xerr_status; /* Extended error flags */ 760 u_char xerr_status; /* Extended error flags */
763 u32 extra_bytes; /* Extraneous bytes transferred */ 761 u32 extra_bytes; /* Extraneous bytes transferred */
@@ -809,7 +807,7 @@ struct sym_ccb {
809#endif 807#endif
810}; 808};
811 809
812#define CCB_BA(cp,lbl) (cp->ccb_ba + offsetof(struct sym_ccb, lbl)) 810#define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
813 811
814#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN 812#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
815#define sym_goalp(cp) ((cp->host_flags & HF_DATA_IN) ? cp->goalp : cp->wgoalp) 813#define sym_goalp(cp) ((cp->host_flags & HF_DATA_IN) ? cp->goalp : cp->wgoalp)
@@ -1138,33 +1136,33 @@ static inline void sym_setup_data_pointers(struct sym_hcb *np,
1138 * No segments means no data. 1136 * No segments means no data.
1139 */ 1137 */
1140 if (!cp->segments) 1138 if (!cp->segments)
1141 dir = CAM_DIR_NONE; 1139 dir = DMA_NONE;
1142 1140
1143 /* 1141 /*
1144 * Set the data pointer. 1142 * Set the data pointer.
1145 */ 1143 */
1146 switch(dir) { 1144 switch(dir) {
1147#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN 1145#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1148 case CAM_DIR_UNKNOWN: 1146 case DMA_BIDIRECTIONAL:
1149#endif 1147#endif
1150 case CAM_DIR_OUT: 1148 case DMA_TO_DEVICE:
1151 goalp = SCRIPTA_BA(np, data_out2) + 8; 1149 goalp = SCRIPTA_BA(np, data_out2) + 8;
1152 lastp = goalp - 8 - (cp->segments * (2*4)); 1150 lastp = goalp - 8 - (cp->segments * (2*4));
1153#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN 1151#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1154 cp->wgoalp = cpu_to_scr(goalp); 1152 cp->wgoalp = cpu_to_scr(goalp);
1155 if (dir != CAM_DIR_UNKNOWN) 1153 if (dir != DMA_BIDIRECTIONAL)
1156 break; 1154 break;
1157 cp->phys.head.wlastp = cpu_to_scr(lastp); 1155 cp->phys.head.wlastp = cpu_to_scr(lastp);
1158 /* fall through */ 1156 /* fall through */
1159#else 1157#else
1160 break; 1158 break;
1161#endif 1159#endif
1162 case CAM_DIR_IN: 1160 case DMA_FROM_DEVICE:
1163 cp->host_flags |= HF_DATA_IN; 1161 cp->host_flags |= HF_DATA_IN;
1164 goalp = SCRIPTA_BA(np, data_in2) + 8; 1162 goalp = SCRIPTA_BA(np, data_in2) + 8;
1165 lastp = goalp - 8 - (cp->segments * (2*4)); 1163 lastp = goalp - 8 - (cp->segments * (2*4));
1166 break; 1164 break;
1167 case CAM_DIR_NONE: 1165 case DMA_NONE:
1168 default: 1166 default:
1169#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN 1167#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1170 cp->host_flags |= HF_DATA_IN; 1168 cp->host_flags |= HF_DATA_IN;
@@ -1185,7 +1183,7 @@ static inline void sym_setup_data_pointers(struct sym_hcb *np,
1185 /* 1183 /*
1186 * If direction is unknown, start at data_io. 1184 * If direction is unknown, start at data_io.
1187 */ 1185 */
1188 if (dir == CAM_DIR_UNKNOWN) 1186 if (dir == DMA_BIDIRECTIONAL)
1189 cp->phys.head.savep = cpu_to_scr(SCRIPTB_BA(np, data_io)); 1187 cp->phys.head.savep = cpu_to_scr(SCRIPTB_BA(np, data_io));
1190#endif 1188#endif
1191} 1189}