Fix a reported case of severe data corruption:

aic79xx.h:
aic79xx.reg:
	Return the SCB_TAG field to 16byte alignment.
	It seems that on some PCI systems, SCBs are not
	transferred correctly to the controller with
	the previous placement of the SCB_TAG field.

Approved by:	re (rwatson)
This commit is contained in:
Scott Long 2003-05-30 02:14:22 +00:00
parent edd1f930aa
commit 6ee007e145
2 changed files with 45 additions and 42 deletions

View File

@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#90 $
* $Id: aic79xx.h,v 1.11 2003/05/26 21:10:58 gibbs Exp $
*
* $FreeBSD$
*/
@ -494,21 +494,21 @@ struct hardware_scb {
* transfer.
*/
#define SG_PTR_MASK 0xFFFFFFF8
/*16*/ uint64_t dataptr;
/*24*/ uint32_t datacnt; /* Byte 3 is spare. */
/*28*/ uint32_t sgptr;
/*32*/ uint32_t hscb_busaddr;
/*36*/ uint32_t next_hscb_busaddr;
/*40*/ uint8_t control; /* See SCB_CONTROL in aic79xx.reg for details */
/*41*/ uint8_t scsiid; /*
/*16*/ uint16_t tag; /* Reused by Sequencer. */
/*18*/ uint8_t control; /* See SCB_CONTROL in aic79xx.reg for details */
/*19*/ uint8_t scsiid; /*
* Selection out Id
* Our Id (bits 0-3) Their ID (bits 4-7)
*/
/*42*/ uint8_t lun;
/*43*/ uint8_t task_attribute;
/*44*/ uint8_t cdb_len;
/*45*/ uint8_t task_management;
/*46*/ uint16_t tag; /* Reused by Sequencer. */
/*20*/ uint8_t lun;
/*21*/ uint8_t task_attribute;
/*22*/ uint8_t cdb_len;
/*23*/ uint8_t task_management;
/*24*/ uint64_t dataptr;
/*32*/ uint32_t datacnt; /* Byte 3 is spare. */
/*36*/ uint32_t sgptr;
/*40*/ uint32_t hscb_busaddr;
/*44*/ uint32_t next_hscb_busaddr;
/********** Long lun field only downloaded for full 8 byte lun support ********/
/*48*/ uint8_t pkt_long_lun[8];
/******* Fields below are not Downloaded (Sequencer may use for scratch) ******/

View File

@ -39,7 +39,7 @@
*
* $FreeBSD$
*/
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#69 $"
VERSION = "$Id: aic79xx.reg,v 1.13 2003/05/26 21:26:51 gibbs Exp $"
/*
* This file is processed by the aic7xxx_asm utility for use in assembling
@ -1377,7 +1377,10 @@ register LUNLEN {
address 0x030
access_mode RW
modes M_CFG
mask ILUNLEN 0x0F
mask TLUNLEN 0xF0
}
const LUNLEN_SINGLE_LEVEL_LUN 0xF
/*
* CDB Limit
@ -3797,32 +3800,8 @@ scb {
size 4
alias SCB_NEXT_COMPLETE
}
SCB_DATAPTR {
size 8
}
SCB_DATACNT {
/*
* The last byte is really the high address bits for
* the data address.
*/
size 4
field SG_LAST_SEG 0x80 /* In the fourth byte */
field SG_HIGH_ADDR_BITS 0x7F /* In the fourth byte */
}
SCB_SGPTR {
size 4
field SG_STATUS_VALID 0x04 /* In the first byte */
field SG_FULL_RESID 0x02 /* In the first byte */
field SG_LIST_NULL 0x01 /* In the first byte */
}
SCB_BUSADDR {
size 4
}
SCB_NEXT {
alias SCB_NEXT_SCB_BUSADDR
size 2
}
SCB_NEXT2 {
SCB_TAG {
alias SCB_FIFO_USE_COUNT
size 2
}
SCB_CONTROL {
@ -3859,8 +3838,32 @@ scb {
SCB_TASK_MANAGEMENT {
size 1
}
SCB_TAG {
alias SCB_FIFO_USE_COUNT
SCB_DATAPTR {
size 8
}
SCB_DATACNT {
/*
* The last byte is really the high address bits for
* the data address.
*/
size 4
field SG_LAST_SEG 0x80 /* In the fourth byte */
field SG_HIGH_ADDR_BITS 0x7F /* In the fourth byte */
}
SCB_SGPTR {
size 4
field SG_STATUS_VALID 0x04 /* In the first byte */
field SG_FULL_RESID 0x02 /* In the first byte */
field SG_LIST_NULL 0x01 /* In the first byte */
}
SCB_BUSADDR {
size 4
}
SCB_NEXT {
alias SCB_NEXT_SCB_BUSADDR
size 2
}
SCB_NEXT2 {
size 2
}
SCB_SPARE {