From 53222b906903fd861dc24ebccfa07ee125941313 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Fri, 20 May 2005 19:15:43 +0100 Subject: [SCSI] sym2 version 2.2.1 sym2 version 2.2.1: - Fix MMIO BAR detection (Thanks to Bob Picco) - Fix odd-sized transfers with a wide bus (Thanks to Larry Stephens) - Write posting fixes (Thanks to Thibaut Varene) - Change one of the GFP_KERNEL allocations back into a GFP_ATOMIC - Make CCB_BA() return a script-endian address - Move range checks and disabling of devices from the queuecommand path to slave_alloc() - Remove a warning in sym_setup_cdb() - Keep a pointer to the scsi_target instead of the scsi_dev in the tcb - Remove a check for the upper layers passing an oversized cmd - Replace CAM_REQ_ constants with the Linux DID_ constants - Replace CAM_DIR_ constants with the Linux DMA_ constants - Inline sym_read_parisc_pdc() on non-parisc systems Signed-off-by: James Bottomley --- drivers/scsi/sym53c8xx_2/sym_hipd.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.h') diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h index a95cbe4b8e3..c55c7a57afa 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.h +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h @@ -444,7 +444,7 @@ struct sym_tcb { */ u_char usrflags; u_short usrtags; - struct scsi_device *sdev; + struct scsi_target *starget; }; /* @@ -754,10 +754,8 @@ struct sym_ccb { int segments; /* Number of SG segments */ u8 order; /* Tag type (if tagged command) */ + unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */ - /* - * Miscellaneous status'. - */ u_char nego_status; /* Negotiation status */ u_char xerr_status; /* Extended error flags */ u32 extra_bytes; /* Extraneous bytes transferred */ @@ -809,7 +807,7 @@ struct sym_ccb { #endif }; -#define CCB_BA(cp,lbl) (cp->ccb_ba + offsetof(struct sym_ccb, lbl)) +#define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl)) #ifdef SYM_OPT_HANDLE_DIR_UNKNOWN #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, * No segments means no data. */ if (!cp->segments) - dir = CAM_DIR_NONE; + dir = DMA_NONE; /* * Set the data pointer. */ switch(dir) { #ifdef SYM_OPT_HANDLE_DIR_UNKNOWN - case CAM_DIR_UNKNOWN: + case DMA_BIDIRECTIONAL: #endif - case CAM_DIR_OUT: + case DMA_TO_DEVICE: goalp = SCRIPTA_BA(np, data_out2) + 8; lastp = goalp - 8 - (cp->segments * (2*4)); #ifdef SYM_OPT_HANDLE_DIR_UNKNOWN cp->wgoalp = cpu_to_scr(goalp); - if (dir != CAM_DIR_UNKNOWN) + if (dir != DMA_BIDIRECTIONAL) break; cp->phys.head.wlastp = cpu_to_scr(lastp); /* fall through */ #else break; #endif - case CAM_DIR_IN: + case DMA_FROM_DEVICE: cp->host_flags |= HF_DATA_IN; goalp = SCRIPTA_BA(np, data_in2) + 8; lastp = goalp - 8 - (cp->segments * (2*4)); break; - case CAM_DIR_NONE: + case DMA_NONE: default: #ifdef SYM_OPT_HANDLE_DIR_UNKNOWN cp->host_flags |= HF_DATA_IN; @@ -1185,7 +1183,7 @@ static inline void sym_setup_data_pointers(struct sym_hcb *np, /* * If direction is unknown, start at data_io. */ - if (dir == CAM_DIR_UNKNOWN) + if (dir == DMA_BIDIRECTIONAL) cp->phys.head.savep = cpu_to_scr(SCRIPTB_BA(np, data_io)); #endif } -- cgit v1.2.3