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.h104
1 files changed, 4 insertions, 100 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 3a264a408216..2456090bb241 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -48,12 +48,6 @@
48 * They may be defined in platform specific headers, if they 48 * They may be defined in platform specific headers, if they
49 * are useful. 49 * are useful.
50 * 50 *
51 * SYM_OPT_HANDLE_DIR_UNKNOWN
52 * When this option is set, the SCRIPTS used by the driver
53 * are able to handle SCSI transfers with direction not
54 * supplied by user.
55 * (set for Linux-2.0.X)
56 *
57 * SYM_OPT_HANDLE_DEVICE_QUEUEING 51 * SYM_OPT_HANDLE_DEVICE_QUEUEING
58 * When this option is set, the driver will use a queue per 52 * When this option is set, the driver will use a queue per
59 * device and handle QUEUE FULL status requeuing internally. 53 * device and handle QUEUE FULL status requeuing internally.
@@ -64,7 +58,6 @@
64 * (set for Linux) 58 * (set for Linux)
65 */ 59 */
66#if 0 60#if 0
67#define SYM_OPT_HANDLE_DIR_UNKNOWN
68#define SYM_OPT_HANDLE_DEVICE_QUEUEING 61#define SYM_OPT_HANDLE_DEVICE_QUEUEING
69#define SYM_OPT_LIMIT_COMMAND_REORDERING 62#define SYM_OPT_LIMIT_COMMAND_REORDERING
70#endif 63#endif
@@ -416,19 +409,6 @@ struct sym_tcb {
416 struct sym_lcb **lunmp; /* Other LCBs [1..MAX_LUN] */ 409 struct sym_lcb **lunmp; /* Other LCBs [1..MAX_LUN] */
417#endif 410#endif
418 411
419 /*
420 * Bitmap that tells about LUNs that succeeded at least
421 * 1 IO and therefore assumed to be a real device.
422 * Avoid useless allocation of the LCB structure.
423 */
424 u32 lun_map[(SYM_CONF_MAX_LUN+31)/32];
425
426 /*
427 * Bitmap that tells about LUNs that haven't yet an LCB
428 * allocated (not discovered or LCB allocation failed).
429 */
430 u32 busy0_map[(SYM_CONF_MAX_LUN+31)/32];
431
432#ifdef SYM_HAVE_STCB 412#ifdef SYM_HAVE_STCB
433 /* 413 /*
434 * O/S specific data structure. 414 * O/S specific data structure.
@@ -454,8 +434,10 @@ struct sym_tcb {
454 * Other user settable limits and options. 434 * Other user settable limits and options.
455 * These limits are read from the NVRAM if present. 435 * These limits are read from the NVRAM if present.
456 */ 436 */
457 u_char usrflags; 437 unsigned char usrflags;
458 u_short usrtags; 438 unsigned char usr_period;
439 unsigned char usr_width;
440 unsigned short usrtags;
459 struct scsi_target *starget; 441 struct scsi_target *starget;
460}; 442};
461 443
@@ -672,9 +654,6 @@ struct sym_ccbh {
672 */ 654 */
673 u32 savep; /* Jump address to saved data pointer */ 655 u32 savep; /* Jump address to saved data pointer */
674 u32 lastp; /* SCRIPTS address at end of data */ 656 u32 lastp; /* SCRIPTS address at end of data */
675#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
676 u32 wlastp;
677#endif
678 657
679 /* 658 /*
680 * Status fields. 659 * Status fields.
@@ -804,9 +783,6 @@ struct sym_ccb {
804 SYM_QUEHEAD link_ccbq; /* Link to free/busy CCB queue */ 783 SYM_QUEHEAD link_ccbq; /* Link to free/busy CCB queue */
805 u32 startp; /* Initial data pointer */ 784 u32 startp; /* Initial data pointer */
806 u32 goalp; /* Expected last data pointer */ 785 u32 goalp; /* Expected last data pointer */
807#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
808 u32 wgoalp;
809#endif
810 int ext_sg; /* Extreme data pointer, used */ 786 int ext_sg; /* Extreme data pointer, used */
811 int ext_ofs; /* to calculate the residual. */ 787 int ext_ofs; /* to calculate the residual. */
812#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING 788#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING
@@ -821,12 +797,6 @@ struct sym_ccb {
821 797
822#define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl)) 798#define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
823 799
824#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
825#define sym_goalp(cp) ((cp->host_flags & HF_DATA_IN) ? cp->goalp : cp->wgoalp)
826#else
827#define sym_goalp(cp) (cp->goalp)
828#endif
829
830typedef struct device *m_pool_ident_t; 800typedef struct device *m_pool_ident_t;
831 801
832/* 802/*
@@ -1077,7 +1047,6 @@ char *sym_driver_name(void);
1077void sym_print_xerr(struct scsi_cmnd *cmd, int x_status); 1047void sym_print_xerr(struct scsi_cmnd *cmd, int x_status);
1078int sym_reset_scsi_bus(struct sym_hcb *np, int enab_int); 1048int sym_reset_scsi_bus(struct sym_hcb *np, int enab_int);
1079struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision); 1049struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision);
1080void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp);
1081#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING 1050#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING
1082void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn); 1051void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn);
1083#endif 1052#endif
@@ -1136,71 +1105,6 @@ bad:
1136#endif 1105#endif
1137 1106
1138/* 1107/*
1139 * Set up data pointers used by SCRIPTS.
1140 * Called from O/S specific code.
1141 */
1142static inline void sym_setup_data_pointers(struct sym_hcb *np,
1143 struct sym_ccb *cp, int dir)
1144{
1145 u32 lastp, goalp;
1146
1147 /*
1148 * No segments means no data.
1149 */
1150 if (!cp->segments)
1151 dir = DMA_NONE;
1152
1153 /*
1154 * Set the data pointer.
1155 */
1156 switch(dir) {
1157#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1158 case DMA_BIDIRECTIONAL:
1159#endif
1160 case DMA_TO_DEVICE:
1161 goalp = SCRIPTA_BA(np, data_out2) + 8;
1162 lastp = goalp - 8 - (cp->segments * (2*4));
1163#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1164 cp->wgoalp = cpu_to_scr(goalp);
1165 if (dir != DMA_BIDIRECTIONAL)
1166 break;
1167 cp->phys.head.wlastp = cpu_to_scr(lastp);
1168 /* fall through */
1169#else
1170 break;
1171#endif
1172 case DMA_FROM_DEVICE:
1173 cp->host_flags |= HF_DATA_IN;
1174 goalp = SCRIPTA_BA(np, data_in2) + 8;
1175 lastp = goalp - 8 - (cp->segments * (2*4));
1176 break;
1177 case DMA_NONE:
1178 default:
1179#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1180 cp->host_flags |= HF_DATA_IN;
1181#endif
1182 lastp = goalp = SCRIPTB_BA(np, no_data);
1183 break;
1184 }
1185
1186 /*
1187 * Set all pointers values needed by SCRIPTS.
1188 */
1189 cp->phys.head.lastp = cpu_to_scr(lastp);
1190 cp->phys.head.savep = cpu_to_scr(lastp);
1191 cp->startp = cp->phys.head.savep;
1192 cp->goalp = cpu_to_scr(goalp);
1193
1194#ifdef SYM_OPT_HANDLE_DIR_UNKNOWN
1195 /*
1196 * If direction is unknown, start at data_io.
1197 */
1198 if (dir == DMA_BIDIRECTIONAL)
1199 cp->phys.head.savep = cpu_to_scr(SCRIPTB_BA(np, data_io));
1200#endif
1201}
1202
1203/*
1204 * MEMORY ALLOCATOR. 1108 * MEMORY ALLOCATOR.
1205 */ 1109 */
1206 1110