Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev Pull up following revision(s) (requested by maxv ...



details:   https://anonhg.NetBSD.org/src/rev/07ddb36564aa
branches:  netbsd-7
changeset: 798474:07ddb36564aa
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Oct 30 12:04:46 2014 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #164):
        sys/dev/ieee1394/fwcrom.c: revision 1.15
        sys/dev/ieee1394/fwcrom.c: revision 1.16
        sys/dev/marvell/if_gfe.c: revision 1.43
        sys/dev/usb/stuirda.c: revision 1.16
        sys/dev/pci/cxgb/cxgb_offload.c: revision 1.4
        sys/dev/pci/twa.c: revision 1.51
        sys/dev/pci/twa.c: revision 1.52
Various fixes in dev/: remove dead code and fix two inconsistencies.

diffstat:

 sys/dev/ieee1394/fwcrom.c       |  63 +++++++++++++++++-----------------------
 sys/dev/marvell/if_gfe.c        |   7 ++-
 sys/dev/pci/cxgb/cxgb_offload.c |   5 +-
 sys/dev/pci/twa.c               |   6 +-
 sys/dev/usb/stuirda.c           |   5 +-
 5 files changed, 39 insertions(+), 47 deletions(-)

diffs (218 lines):

diff -r 521fd3a219cb -r 07ddb36564aa sys/dev/ieee1394/fwcrom.c
--- a/sys/dev/ieee1394/fwcrom.c Thu Oct 30 11:51:18 2014 +0000
+++ b/sys/dev/ieee1394/fwcrom.c Thu Oct 30 12:04:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fwcrom.c,v 1.14 2014/03/28 02:16:47 christos Exp $     */
+/*     $NetBSD: fwcrom.c,v 1.14.4.1 2014/10/30 12:04:46 martin Exp $   */
 /*-
  * Copyright (c) 2002-2003
  *     Hidetoshi Shimokawa. All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwcrom.c,v 1.14 2014/03/28 02:16:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwcrom.c,v 1.14.4.1 2014/10/30 12:04:46 martin Exp $");
 
 #include <sys/param.h>
 #ifdef _KERNEL
@@ -551,24 +551,15 @@
 main(void)
 {
        struct crom_src src;
-       struct crom_chunk root, unit1, unit2, unit3;
-       struct crom_chunk text1, text2, text3, text4, text5, text6, text7;
+       struct crom_chunk root, unit[3], text[7];
        uint32_t buf[256], *p;
        int i;
        extern const char ostype[];
 
        memset(&src, 0, sizeof(src));
        memset(&root, 0, sizeof(root));
-       memset(&unit1, 0, sizeof(unit1));
-       memset(&unit2, 0, sizeof(unit2));
-       memset(&unit3, 0, sizeof(unit3));
-       memset(&text1, 0, sizeof(text1));
-       memset(&text2, 0, sizeof(text2));
-       memset(&text3, 0, sizeof(text3));
-       memset(&text3, 0, sizeof(text4));
-       memset(&text3, 0, sizeof(text5));
-       memset(&text3, 0, sizeof(text6));
-       memset(&text3, 0, sizeof(text7));
+       memset(unit, 0, sizeof(unit));
+       memset(text, 0, sizeof(text));
        memset(buf, 0, sizeof(buf));
 
        /* BUS info sample */
@@ -594,37 +585,37 @@
        /* private company_id */
        crom_add_entry(&root, CSRKEY_VENDOR, 0xacde48);
 
-       crom_add_simple_text(&src, &root, &text1, ostype);
+       crom_add_simple_text(&src, &root, &text[0], ostype);
        crom_add_entry(&root, CSRKEY_HW, __NetBSD_Version__);
-       crom_add_simple_text(&src, &root, &text2, OS_VER_STR);
+       crom_add_simple_text(&src, &root, &text[1], OS_VER_STR);
 
        /* SBP unit directory */
-       crom_add_chunk(&src, &root, &unit1, CROM_UDIR);
-       crom_add_entry(&unit1, CSRKEY_SPEC, CSRVAL_ANSIT10);
-       crom_add_entry(&unit1, CSRKEY_VER, CSRVAL_T10SBP2);
-       crom_add_entry(&unit1, CSRKEY_COM_SPEC, CSRVAL_ANSIT10);
-       crom_add_entry(&unit1, CSRKEY_COM_SET, CSRVAL_SCSI);
+       crom_add_chunk(&src, &root, &unit[0], CROM_UDIR);
+       crom_add_entry(&unit[0], CSRKEY_SPEC, CSRVAL_ANSIT10);
+       crom_add_entry(&unit[0], CSRKEY_VER, CSRVAL_T10SBP2);
+       crom_add_entry(&unit[0], CSRKEY_COM_SPEC, CSRVAL_ANSIT10);
+       crom_add_entry(&unit[0], CSRKEY_COM_SET, CSRVAL_SCSI);
        /* management_agent */
-       crom_add_entry(&unit1, CROM_MGM, 0x1000);
-       crom_add_entry(&unit1, CSRKEY_UNIT_CH, (10<<8) | 8);
+       crom_add_entry(&unit[0], CROM_MGM, 0x1000);
+       crom_add_entry(&unit[0], CSRKEY_UNIT_CH, (10<<8) | 8);
        /* Device type and LUN */
-       crom_add_entry(&unit1, CROM_LUN, 0);
-       crom_add_entry(&unit1, CSRKEY_MODEL, 1);
-       crom_add_simple_text(&src, &unit1, &text3, "scsi_target");
+       crom_add_entry(&unit[0], CROM_LUN, 0);
+       crom_add_entry(&unit[0], CSRKEY_MODEL, 1);
+       crom_add_simple_text(&src, &unit[0], &text[2], "scsi_target");
 
        /* RFC2734 IPv4 over IEEE1394 */
-       crom_add_chunk(&src, &root, &unit2, CROM_UDIR);
-       crom_add_entry(&unit2, CSRKEY_SPEC, CSRVAL_IETF);
-       crom_add_simple_text(&src, &unit2, &text4, "IANA");
-       crom_add_entry(&unit2, CSRKEY_VER, 1);
-       crom_add_simple_text(&src, &unit2, &text5, "IPv4");
+       crom_add_chunk(&src, &root, &unit[1], CROM_UDIR);
+       crom_add_entry(&unit[1], CSRKEY_SPEC, CSRVAL_IETF);
+       crom_add_simple_text(&src, &unit[1], &text[3], "IANA");
+       crom_add_entry(&unit[1], CSRKEY_VER, 1);
+       crom_add_simple_text(&src, &unit[1], &text[4], "IPv4");
 
        /* RFC3146 IPv6 over IEEE1394 */
-       crom_add_chunk(&src, &root, &unit3, CROM_UDIR);
-       crom_add_entry(&unit3, CSRKEY_SPEC, CSRVAL_IETF);
-       crom_add_simple_text(&src, &unit3, &text6, "IANA");
-       crom_add_entry(&unit3, CSRKEY_VER, 2);
-       crom_add_simple_text(&src, &unit3, &text7, "IPv6");
+       crom_add_chunk(&src, &root, &unit[2], CROM_UDIR);
+       crom_add_entry(&unit[2], CSRKEY_SPEC, CSRVAL_IETF);
+       crom_add_simple_text(&src, &unit[2], &text[5], "IANA");
+       crom_add_entry(&unit[2], CSRKEY_VER, 2);
+       crom_add_simple_text(&src, &unit[2], &text[6], "IPv6");
 
        crom_load(&src, buf, 256);
        p = buf;
diff -r 521fd3a219cb -r 07ddb36564aa sys/dev/marvell/if_gfe.c
--- a/sys/dev/marvell/if_gfe.c  Thu Oct 30 11:51:18 2014 +0000
+++ b/sys/dev/marvell/if_gfe.c  Thu Oct 30 12:04:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gfe.c,v 1.42 2014/08/10 16:44:35 tls Exp $  */
+/*     $NetBSD: if_gfe.c,v 1.42.2.1 2014/10/30 12:04:46 martin Exp $   */
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.42 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.42.2.1 2014/10/30 12:04:46 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -2018,9 +2018,10 @@
 
        error = gfe_hash_entry_op(sc, GE_HASH_ADD, GE_RXPRIO_HI,
            CLLADDR(sc->sc_ec.ec_if.if_sadl));
-       if (error)
+       if (error) {
                GE_FUNC_EXIT(sc, "!");
                return error;
+       }
 
        sc->sc_flags &= ~GE_ALLMULTI;
        if ((sc->sc_ec.ec_if.if_flags & IFF_PROMISC) == 0)
diff -r 521fd3a219cb -r 07ddb36564aa sys/dev/pci/cxgb/cxgb_offload.c
--- a/sys/dev/pci/cxgb/cxgb_offload.c   Thu Oct 30 11:51:18 2014 +0000
+++ b/sys/dev/pci/cxgb/cxgb_offload.c   Thu Oct 30 12:04:46 2014 +0000
@@ -31,7 +31,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cxgb_offload.c,v 1.3 2014/03/25 16:19:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cxgb_offload.c,v 1.3.4.1 2014/10/30 12:04:46 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -711,7 +711,7 @@
 
     printf("do_hwtid_rpl m=%p\n", m);
     return (0);
-
+#ifdef notyet
 
     hwtid = G_TID(ntohl(p->opcode_tid));
 
@@ -725,6 +725,7 @@
             dev->name, p->opcode);
         return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
     }
+#endif
 }
 
 static int
diff -r 521fd3a219cb -r 07ddb36564aa sys/dev/pci/twa.c
--- a/sys/dev/pci/twa.c Thu Oct 30 11:51:18 2014 +0000
+++ b/sys/dev/pci/twa.c Thu Oct 30 12:04:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: twa.c,v 1.50 2014/07/25 08:10:38 dholland Exp $ */
+/*     $NetBSD: twa.c,v 1.50.2.1 2014/10/30 12:04:46 martin Exp $ */
 /*     $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $        */
 
 /*-
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.50 2014/07/25 08:10:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.50.2.1 2014/10/30 12:04:46 martin Exp $");
 
 //#define TWA_DEBUG
 
@@ -2955,7 +2955,7 @@
        uint32_t                dsize;
        uint8_t                 ports;
 
-       memset(p, sizeof(struct twa_param_9k *), 10);
+       memset(p, 0, sizeof(p));
 
        /* Get the port count. */
        rv |= twa_get_param(sc, TWA_PARAM_CONTROLLER,
diff -r 521fd3a219cb -r 07ddb36564aa sys/dev/usb/stuirda.c
--- a/sys/dev/usb/stuirda.c     Thu Oct 30 11:51:18 2014 +0000
+++ b/sys/dev/usb/stuirda.c     Thu Oct 30 12:04:46 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stuirda.c,v 1.15 2012/06/12 20:25:58 joerg Exp $       */
+/*     $NetBSD: stuirda.c,v 1.15.14.1 2014/10/30 12:04:46 martin Exp $ */
 
 /*
  * Copyright (c) 2001,2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: stuirda.c,v 1.15 2012/06/12 20:25:58 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stuirda.c,v 1.15.14.1 2014/10/30 12:04:46 martin Exp $");
 
 #include <sys/param.h>
 
@@ -175,7 +175,6 @@
        if (rc) {
                printf("%s: Cannot load firmware\n",
                        device_xname(sc->sc_dev));
-               return 0;
                return rc;
        }
        fwsize = firmware_get_size(fh);



Home | Main Index | Thread Index | Old Index