Commit d62c3c1f authored by Justin T. Gibbs's avatar Justin T. Gibbs

Aic79xx Driver Update

 o Change handling 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.
parent 2a11b4ff
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* $FreeBSD$ * $FreeBSD$
*/ */
VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#92 $" VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $"
PATCH_ARG_LIST = "struct ahd_softc *ahd" PATCH_ARG_LIST = "struct ahd_softc *ahd"
PREFIX = "ahd_" PREFIX = "ahd_"
...@@ -261,6 +261,15 @@ fetch_new_scb_done: ...@@ -261,6 +261,15 @@ fetch_new_scb_done:
clr A; clr A;
add CMDS_PENDING, 1; add CMDS_PENDING, 1;
adc CMDS_PENDING[1], A; 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 * The FIFO use count field is shared with the
* tag set by the host so that our SCB dma engine * tag set by the host so that our SCB dma engine
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#191 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#192 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -5722,6 +5722,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) ...@@ -5722,6 +5722,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
next_scb->sg_list = segs; next_scb->sg_list = segs;
next_scb->sense_data = sense_data; next_scb->sense_data = sense_data;
next_scb->sense_busaddr = sense_busaddr; next_scb->sense_busaddr = sense_busaddr;
memset(hscb, 0, sizeof(*hscb));
next_scb->hscb = hscb; next_scb->hscb = hscb;
hscb->hscb_busaddr = ahd_htole32(hscb_busaddr); hscb->hscb_busaddr = ahd_htole32(hscb_busaddr);
...@@ -8279,8 +8280,6 @@ ahd_loadseq(struct ahd_softc *ahd) ...@@ -8279,8 +8280,6 @@ ahd_loadseq(struct ahd_softc *ahd)
download_consts[PKT_OVERRUN_BUFOFFSET] = download_consts[PKT_OVERRUN_BUFOFFSET] =
(ahd->overrun_buf - (uint8_t *)ahd->qoutfifo) / 256; (ahd->overrun_buf - (uint8_t *)ahd->qoutfifo) / 256;
download_consts[SCB_TRANSFER_SIZE] = SCB_TRANSFER_SIZE_1BYTE_LUN; 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; cur_patch = patches;
downloaded = 0; downloaded = 0;
skip_addr = 0; skip_addr = 0;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#48 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#49 $
* *
* $FreeBSD$ * $FreeBSD$
*/ */
...@@ -272,10 +272,6 @@ ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb) ...@@ -272,10 +272,6 @@ ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
if ((scb->flags & SCB_PACKETIZED) != 0) { if ((scb->flags & SCB_PACKETIZED) != 0) {
/* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */ /* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */
scb->hscb->task_attribute= scb->hscb->control & SCB_TAG_TYPE; scb->hscb->task_attribute= scb->hscb->control & SCB_TAG_TYPE;
/*
* For Rev A short lun workaround.
*/
scb->hscb->pkt_long_lun[6] = scb->hscb->lun;
} }
if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#92 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#68 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#68 $
*/ */
typedef int (ahd_reg_print_t)(u_int, u_int *, u_int); 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; ...@@ -3768,5 +3768,5 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
/* Exported Labels */ /* Exported Labels */
#define LABEL_seq_isr 0x270 #define LABEL_seq_isr 0x271
#define LABEL_timer_isr 0x26c #define LABEL_timer_isr 0x26d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* DO NOT EDIT - This file is automatically generated * DO NOT EDIT - This file is automatically generated
* from the following source files: * from the following source files:
* *
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#92 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#68 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#68 $
*/ */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment