Apply the following change made 5/26/2003 21:18:48 by gibbs to the
FreeBSD ahd driver: Change hadling of the Rev. A packetized lun output bug to be more efficient by having the sequencer copy the single byte of valid lun data into the long lun field. aic79xx.c: Memset our hardware SCB to 0 so that untouched fields don't confuse diagnostic output. With the old method for handling the Rev A bug, if the long lun field was not 0, this could result in bogus lun information being sent to drives. Use the same SCB transfer size for all chip types now that the long lun is not DMA'ed to the chip. aic79xx.seq: Add code to copy lun information for Rev.A hardware. aic79xx_inline.h: Remove host update of the long_lun field on every packetized command.
This commit is contained in:
parent
e88c8722b7
commit
1109945598
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic79xx.c,v 1.9 2003/08/29 00:10:03 thorpej Exp $ */
|
||||
/* $NetBSD: aic79xx.c,v 1.10 2003/08/29 00:46:05 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Core routines and tables shareable across OS platforms.
|
||||
@ -39,9 +39,9 @@
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* //depot/aic7xxx/aic7xxx/aic79xx.c#190 $
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx.c#192 $
|
||||
*
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.12 2003/05/04 00:20:07 gibbs Exp $
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.14 2003/05/26 21:18:48 gibbs Exp $
|
||||
*/
|
||||
/*
|
||||
* Ported from FreeBSD by Pascal Renauld, Network Storage Solutions, Inc.
|
||||
@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.9 2003/08/29 00:10:03 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.10 2003/08/29 00:46:05 thorpej Exp $");
|
||||
|
||||
#include <dev/ic/aic79xx_osm.h>
|
||||
#include <dev/ic/aic79xx_inline.h>
|
||||
@ -5560,6 +5560,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
|
||||
next_scb->sg_list = segs;
|
||||
next_scb->sense_data = sense_data;
|
||||
next_scb->sense_busaddr = sense_busaddr;
|
||||
memset(hscb, 0, sizeof(*hscb));
|
||||
next_scb->hscb = hscb;
|
||||
hscb->hscb_busaddr = ahd_htole32(hscb_busaddr);
|
||||
KASSERT((vaddr_t)hscb >= (vaddr_t)hscb_map->vaddr &&
|
||||
@ -8104,8 +8105,6 @@ ahd_loadseq(struct ahd_softc *ahd)
|
||||
download_consts[PKT_OVERRUN_BUFOFFSET] =
|
||||
(ahd->overrun_buf - (uint8_t *)ahd->qoutfifo) / 256;
|
||||
download_consts[SCB_TRANSFER_SIZE] = SCB_TRANSFER_SIZE_1BYTE_LUN;
|
||||
if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0)
|
||||
download_consts[SCB_TRANSFER_SIZE] = SCB_TRANSFER_SIZE_FULL_LUN;
|
||||
cur_patch = patches;
|
||||
downloaded = 0;
|
||||
skip_addr = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic79xx_inline.h,v 1.5 2003/08/29 00:10:03 thorpej Exp $ */
|
||||
/* $NetBSD: aic79xx_inline.h,v 1.6 2003/08/29 00:46:06 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Inline routines shareable across OS platforms.
|
||||
@ -39,9 +39,9 @@
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#48 $
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#49 $
|
||||
*
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx_inline.h,v 1.9 2003/05/04 00:20:07 gibbs Exp $
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx_inline.h,v 1.10 2003/05/26 21:18:48 gibbs Exp $
|
||||
*/
|
||||
/*
|
||||
* Ported from FreeBSD by Pascal Renauld, Network Storage Solutions, Inc. - April 2003
|
||||
@ -267,11 +267,6 @@ ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
|
||||
if ((scb->flags & SCB_PACKETIZED) != 0) {
|
||||
/* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */
|
||||
scb->hscb->task_attribute= scb->hscb->control & SCB_TAG_TYPE;
|
||||
/*
|
||||
* For Rev A short lun workaround.
|
||||
*/
|
||||
memset(scb->hscb->pkt_long_lun, 0, sizeof(scb->hscb->pkt_long_lun));
|
||||
scb->hscb->pkt_long_lun[6] = scb->hscb->lun;
|
||||
}
|
||||
|
||||
if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic79xx.seq,v 1.4 2003/08/29 00:10:01 thorpej Exp $ */
|
||||
/* $NetBSD: aic79xx.seq,v 1.5 2003/08/29 00:46:07 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Adaptec U320 device driver firmware for Linux and FreeBSD.
|
||||
@ -39,10 +39,10 @@
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx.seq,v 1.8 2003/05/04 00:20:07 gibbs Exp $
|
||||
* $FreeBSD: src/sys/dev/aic7xxx/aic79xx.seq,v 1.10 2003/05/26 21:18:48 gibbs Exp $
|
||||
*/
|
||||
|
||||
VERSION = "Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#91 $"
|
||||
VERSION = "Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $"
|
||||
PATCH_ARG_LIST = "struct ahd_softc *ahd"
|
||||
PREFIX = "ahd_"
|
||||
|
||||
@ -263,6 +263,15 @@ fetch_new_scb_done:
|
||||
clr A;
|
||||
add CMDS_PENDING, 1;
|
||||
adc CMDS_PENDING[1], A;
|
||||
if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0) {
|
||||
/*
|
||||
* "Short Luns" are not placed into outgoing LQ
|
||||
* packets in the correct byte order. Use a full
|
||||
* sized lun field instead and fill it with the
|
||||
* one byte of lun information we support.
|
||||
*/
|
||||
mov SCB_PKT_LUN[6], SCB_LUN;
|
||||
}
|
||||
/*
|
||||
* The FIFO use count field is shared with the
|
||||
* tag set by the host so that our SCB dma engine
|
||||
|
@ -2,7 +2,7 @@
|
||||
* DO NOT EDIT - This file is automatically generated
|
||||
* from the following source files:
|
||||
*
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#91 $
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $
|
||||
* Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#67 $
|
||||
*/
|
||||
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
|
||||
@ -3768,5 +3768,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
|
||||
|
||||
|
||||
/* Exported Labels */
|
||||
#define LABEL_seq_isr 0x270
|
||||
#define LABEL_timer_isr 0x26c
|
||||
#define LABEL_seq_isr 0x271
|
||||
#define LABEL_timer_isr 0x26d
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user