Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Apply the following change made 5/26/2003 21:18:48 b...



details:   https://anonhg.NetBSD.org/src/rev/139825801f94
branches:  trunk
changeset: 551087:139825801f94
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Aug 29 00:46:05 2003 +0000

description:
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.

diffstat:

 sys/dev/ic/aic79xx.c                    |   11 +-
 sys/dev/ic/aic79xx_inline.h             |   11 +-
 sys/dev/microcode/aic7xxx/aic79xx.seq   |   15 +-
 sys/dev/microcode/aic7xxx/aic79xx_reg.h |    6 +-
 sys/dev/microcode/aic7xxx/aic79xx_seq.h |  890 ++++++++++++++++---------------
 5 files changed, 473 insertions(+), 460 deletions(-)

diffs (truncated from 1578 to 300 lines):

diff -r 714de5dc07bb -r 139825801f94 sys/dev/ic/aic79xx.c
--- a/sys/dev/ic/aic79xx.c      Fri Aug 29 00:09:59 2003 +0000
+++ b/sys/dev/ic/aic79xx.c      Fri Aug 29 00:46:05 2003 +0000
@@ -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 @@
                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 @@
        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;
diff -r 714de5dc07bb -r 139825801f94 sys/dev/ic/aic79xx_inline.h
--- a/sys/dev/ic/aic79xx_inline.h       Fri Aug 29 00:09:59 2003 +0000
+++ b/sys/dev/ic/aic79xx_inline.h       Fri Aug 29 00:46:05 2003 +0000
@@ -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 @@
        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
diff -r 714de5dc07bb -r 139825801f94 sys/dev/microcode/aic7xxx/aic79xx.seq
--- a/sys/dev/microcode/aic7xxx/aic79xx.seq     Fri Aug 29 00:09:59 2003 +0000
+++ b/sys/dev/microcode/aic7xxx/aic79xx.seq     Fri Aug 29 00:46:05 2003 +0000
@@ -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 @@
        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
diff -r 714de5dc07bb -r 139825801f94 sys/dev/microcode/aic7xxx/aic79xx_reg.h
--- a/sys/dev/microcode/aic7xxx/aic79xx_reg.h   Fri Aug 29 00:09:59 2003 +0000
+++ b/sys/dev/microcode/aic7xxx/aic79xx_reg.h   Fri Aug 29 00:46:05 2003 +0000
@@ -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 @@
 
 
 /* Exported Labels */
-#define        LABEL_seq_isr   0x270
-#define        LABEL_timer_isr 0x26c
+#define        LABEL_seq_isr   0x271
+#define        LABEL_timer_isr 0x26d
diff -r 714de5dc07bb -r 139825801f94 sys/dev/microcode/aic7xxx/aic79xx_seq.h
--- a/sys/dev/microcode/aic7xxx/aic79xx_seq.h   Fri Aug 29 00:09:59 2003 +0000
+++ b/sys/dev/microcode/aic7xxx/aic79xx_seq.h   Fri Aug 29 00:46:05 2003 +0000
@@ -2,30 +2,30 @@
  * 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 $
  */
 static uint8_t seqprog[] = {
        0xff, 0x02, 0x06, 0x78,
-       0x00, 0xea, 0x4e, 0x59,
+       0x00, 0xea, 0x50, 0x59,
        0x01, 0xea, 0x04, 0x30,
        0xff, 0x04, 0x0c, 0x78,
-       0x19, 0xea, 0x4e, 0x59,
+       0x19, 0xea, 0x50, 0x59,
        0x19, 0xea, 0x04, 0x00,
-       0x33, 0xea, 0x42, 0x59,
+       0x33, 0xea, 0x44, 0x59,
        0x33, 0xea, 0x00, 0x00,
        0x60, 0x3a, 0x1a, 0x68,
        0x04, 0x47, 0x1b, 0x68,
        0xff, 0x21, 0x1b, 0x70,
-       0x40, 0x4b, 0x90, 0x69,
-       0x00, 0xe2, 0x52, 0x59,
-       0x40, 0x4b, 0x90, 0x69,
-       0x20, 0x4b, 0x80, 0x69,
+       0x40, 0x4b, 0x92, 0x69,
+       0x00, 0xe2, 0x54, 0x59,
+       0x40, 0x4b, 0x92, 0x69,
+       0x20, 0x4b, 0x82, 0x69,
        0xfc, 0x42, 0x24, 0x78,
        0x10, 0x40, 0x24, 0x78,
-       0x00, 0xe2, 0xd2, 0x5d,
+       0x00, 0xe2, 0xd4, 0x5d,
        0x20, 0x4d, 0x28, 0x78,
-       0x00, 0xe2, 0xd2, 0x5d,
+       0x00, 0xe2, 0xd4, 0x5d,
        0x30, 0x3f, 0xc0, 0x09,
        0x30, 0xe0, 0x30, 0x60,
        0x7f, 0x4a, 0x94, 0x08,
@@ -35,7 +35,7 @@
        0x00, 0xe2, 0x56, 0x58,
        0x00, 0xe2, 0x66, 0x58,
        0x00, 0xe2, 0x06, 0x40,
-       0x33, 0xea, 0x42, 0x59,
+       0x33, 0xea, 0x44, 0x59,
        0x33, 0xea, 0x00, 0x00,
        0x01, 0x52, 0x64, 0x78,
        0x02, 0x58, 0x50, 0x31,
@@ -43,26 +43,26 @@
        0xff, 0xad, 0x4f, 0x78,
        0x50, 0x4b, 0x4a, 0x68,
        0xbf, 0x3a, 0x74, 0x08,
-       0x14, 0xea, 0x4e, 0x59,
+       0x14, 0xea, 0x50, 0x59,
        0x14, 0xea, 0x04, 0x00,
        0x08, 0xa8, 0x51, 0x03,
        0xff, 0xae, 0x3f, 0x68,
-       0x00, 0xe2, 0x50, 0x5b,
+       0x00, 0xe2, 0x52, 0x5b,
        0x00, 0xe2, 0x3e, 0x40,
-       0x00, 0xea, 0x42, 0x59,
+       0x00, 0xea, 0x44, 0x59,
        0x01, 0xea, 0x00, 0x30,
        0x80, 0xf9, 0x5e, 0x68,
-       0x00, 0xe2, 0x40, 0x59,
-       0x11, 0xea, 0x42, 0x59,
+       0x00, 0xe2, 0x42, 0x59,
+       0x11, 0xea, 0x44, 0x59,
        0x11, 0xea, 0x00, 0x00,
-       0x80, 0xf9, 0x40, 0x79,
+       0x80, 0xf9, 0x42, 0x79,
        0xff, 0xea, 0xd4, 0x0d,
-       0x22, 0xea, 0x42, 0x59,
+       0x22, 0xea, 0x44, 0x59,
        0x22, 0xea, 0x00, 0x00,
        0x10, 0x16, 0x70, 0x78,
        0x01, 0x0b, 0xa2, 0x32,
        0x10, 0x16, 0x2c, 0x00,
-       0x18, 0xad, 0xfe, 0x78,
+       0x18, 0xad, 0x00, 0x79,
        0x04, 0xad, 0xca, 0x68,
        0x80, 0xad, 0x64, 0x78,
        0x10, 0xad, 0x98, 0x78,
@@ -71,15 +71,15 @@
        0x02, 0x8c, 0x59, 0x32,
        0x02, 0x28, 0x19, 0x33,
        0x02, 0xa8, 0x50, 0x36,
-       0x33, 0xea, 0x42, 0x59,
+       0x33, 0xea, 0x44, 0x59,
        0x33, 0xea, 0x00, 0x00,
        0x40, 0x3a, 0x64, 0x68,
        0x50, 0x4b, 0x64, 0x68,
-       0x22, 0xea, 0x42, 0x59,
+       0x22, 0xea, 0x44, 0x59,
        0x22, 0xea, 0x00, 0x00,
        0xe7, 0xad, 0x5a, 0x09,
        0x02, 0x8c, 0x59, 0x32,
-       0x1a, 0xea, 0x4e, 0x59,
+       0x1a, 0xea, 0x50, 0x59,
        0x1a, 0xea, 0x04, 0x00,
        0xff, 0xea, 0xd4, 0x0d,
        0xe7, 0xad, 0x5a, 0x09,
@@ -113,29 +113,30 @@
        0xff, 0xea, 0xc0, 0x09,
        0x01, 0x4e, 0x9d, 0x1a,
        0x00, 0x4f, 0x9f, 0x22,
+       0x01, 0xaa, 0x6d, 0x33,
        0x01, 0xea, 0x5c, 0x33,
        0x04, 0xa4, 0x49, 0x32,
        0xff, 0xea, 0x4a, 0x03,
        0xff, 0xea, 0x4e, 0x03,
        0x01, 0x10, 0xd4, 0x31,
-       0x10, 0xa8, 0xf3, 0x68,
+       0x10, 0xa8, 0xf5, 0x68,
        0x3d, 0xa9, 0xc5, 0x29,
        0xfe, 0xe2, 0xc4, 0x09,
        0x01, 0xea, 0xc6, 0x01,
        0x02, 0xe2, 0xc8, 0x31,
        0x02, 0xec, 0x50, 0x31,
        0x02, 0xa0, 0xda, 0x31,
-       0xff, 0xa9, 0xf2, 0x70,
+       0xff, 0xa9, 0xf4, 0x70,
        0x02, 0xa0, 0x48, 0x37,
-       0xff, 0x21, 0xfb, 0x70,
+       0xff, 0x21, 0xfd, 0x70,
        0x02, 0x22, 0x51, 0x31,
        0x02, 0xa0, 0x4c, 0x33,
        0x02, 0xa0, 0x44, 0x36,
        0x02, 0xa0, 0x40, 0x32,
        0x02, 0xa0, 0x44, 0x36,
-       0x04, 0x47, 0x03, 0x69,
-       0x40, 0x16, 0x2e, 0x69,
-       0xff, 0x2d, 0x33, 0x61,
+       0x04, 0x47, 0x05, 0x69,
+       0x40, 0x16, 0x30, 0x69,
+       0xff, 0x2d, 0x35, 0x61,
        0xff, 0x29, 0x65, 0x70,
        0x01, 0x37, 0xc1, 0x31,
        0x02, 0x28, 0x55, 0x32,
@@ -148,20 +149,20 @@
        0x01, 0x50, 0xa1, 0x1a,
        0xff, 0x4e, 0x9d, 0x1a,
        0xff, 0x4f, 0x9f, 0x22,
-       0xff, 0x8d, 0x27, 0x71,
-       0x80, 0xac, 0x26, 0x71,
-       0x20, 0x16, 0x26, 0x69,
+       0xff, 0x8d, 0x29, 0x71,
+       0x80, 0xac, 0x28, 0x71,
+       0x20, 0x16, 0x28, 0x69,
        0x02, 0x8c, 0x51, 0x31,
-       0x00, 0xe2, 0x10, 0x41,
+       0x00, 0xe2, 0x12, 0x41,
        0x01, 0xac, 0x08, 0x31,
        0x09, 0xea, 0x5a, 0x01,
        0x02, 0x8c, 0x51, 0x32,
        0xff, 0xea, 0x1a, 0x07,
        0x04, 0x24, 0xf9, 0x30,



Home | Main Index | Thread Index | Old Index