summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx/aic7xxx.reg
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2003-05-26 21:24:01 +0000
committergibbs <gibbs@FreeBSD.org>2003-05-26 21:24:01 +0000
commit833b47a80aedf9e2affaa9f12fa72893d2294f20 (patch)
treeaf1cf359388311866c7a19d62ca994045c3cb1a5 /sys/dev/aic7xxx/aic7xxx.reg
parentb25cf57baf95e38540324c41d6bc74524c174bf8 (diff)
downloadFreeBSD-src-833b47a80aedf9e2affaa9f12fa72893d2294f20.zip
FreeBSD-src-833b47a80aedf9e2affaa9f12fa72893d2294f20.tar.gz
Correct/Simplify ignore wide residue message handling
aic7xxx.c: In ahc_handle_ign_wide_residue(): o Use SCB_XFERLEN_ODD SCB field to determine transfer "oddness" rather than the DATA_COUNT_ODD logic. SCB_XFERLEN_ODD is toggled on every ignore wide residue message so that multiple ignore wide residue messages for the same transaction are properly supported. o If the sg list has been exausted, the sequencer doesn't bother to update the residual data count since it is known to be zero. Perform the zeroing manually before calculating the remaining data count. o Ensure that SG_LIST_NULL is cleared in the residual sg pointer for "mid-transfer" ignore wide residue cases. o Use multibyte in/out macros instead of shifting/masking by hand. aic7xxx.h: Modify the SCB_GET_LUN() macro to mask the lun hardware SCB field with LID. This leaves two bits in the LUN field that can be used for other purposes. aic7xxx.reg: Change LID to be 0x3F. This is the maximum supported lun size for non-packetized SCSI. Map the top bit of the lun to SCB_XFERLEN_ODD. The host must set this bit whenever a transfer is an odd length. Remove the ODD_SEG bit field that was used to carry the odd transfer length information through the SG cache. This is obviated by SCB_XFERLEN_ODD field. Remove the DATA_COUNT_ODD scratch ram byte that was used dynamicaly compute data transfer oddness. This is obviated by SCB_XFERLEN_ODD field. aic7xxx.seq: Be more careful in our handling of the SCB_LUN field. It must be masked with LID if only lun information is desired. Remove all updates to the DATA_COUNT_ODD scratch ram field. Remove all uses of ODD_SEG. These two save quite a few sequencer instructions. Use SCB_XFERLEN_ODD to validate the end of transfer ignore wide residue message case. aic7xxx_inline.h: In ahc_queue_scb(), setup the SCB_XFERLEN_ODD field. Approved by: RE
Diffstat (limited to 'sys/dev/aic7xxx/aic7xxx.reg')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.reg15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.reg b/sys/dev/aic7xxx/aic7xxx.reg
index 49bc1f2..810ec70 100644
--- a/sys/dev/aic7xxx/aic7xxx.reg
+++ b/sys/dev/aic7xxx/aic7xxx.reg
@@ -39,7 +39,7 @@
*
* $FreeBSD$
*/
-VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $"
+VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#39 $"
/*
* This file is processed by the aic7xxx_asm utility for use in assembling
@@ -1080,7 +1080,8 @@ scb {
mask OID 0x0f
}
SCB_LUN {
- mask LID 0xff
+ field SCB_XFERLEN_ODD 0x80
+ mask LID 0x3f
size 1
}
SCB_TAG {
@@ -1239,7 +1240,6 @@ register SG_CACHE_PRE {
access_mode WO
address 0x0fc
mask SG_ADDR_MASK 0xf8
- field ODD_SEG 0x04
field LAST_SEG 0x02
field LAST_SEG_DONE 0x01
}
@@ -1248,7 +1248,6 @@ register SG_CACHE_SHADOW {
access_mode RO
address 0x0fc
mask SG_ADDR_MASK 0xf8
- field ODD_SEG 0x04
field LAST_SEG 0x02
field LAST_SEG_DONE 0x01
}
@@ -1478,14 +1477,6 @@ scratch_ram {
field ENAUTOATNI 0x04
field ENAUTOATNP 0x02
}
-
- /*
- * Track whether the transfer byte count for
- * the current data phase is odd.
- */
- DATA_COUNT_ODD {
- size 1
- }
}
scratch_ram {
OpenPOWER on IntegriCloud