Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/ca460093e944
branches:  netbsd-8
changeset: 434583:ca460093e944
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Jan 31 18:01:54 2018 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #509):
        sys/dev/usb/if_ural.c: revision 1.53
        sys/dev/usb/if_run.c: revision 1.25
        sys/dev/usb/ustir.c: revision 1.39
        sys/dev/usb/irmce.c: revision 1.4
        sys/dev/usb/if_urtwn.c: revision 1.56
        sys/dev/usb/pseye.c: revision 1.24
        sys/dev/usb/if_rum.c: revision 1.59
        sys/dev/usb/if_upl.c: revision 1.61
        sys/dev/usb/ucom.c: revision 1.120
        sys/dev/usb/if_zyd.c: revision 1.45
        sys/dev/usb/if_axen.c: revision 1.12
        sys/dev/usb/umidi.c: revision 1.74
        sys/dev/usb/if_udav.c: revision 1.52
        sys/dev/usb/if_athn_usb.c: revision 1.25
        sys/dev/usb/usscanner.c: revision 1.43
        sys/dev/usb/ualea.c: revision 1.6 - 1.9
        sys/dev/usb/if_upgt.c: revision 1.18
        sys/dev/usb/if_atu.c: revision 1.56
        sys/dev/usb/utoppy.c: revision 1.30
        sys/dev/usb/ubt.c: revision 1.60
        sys/dev/usb/if_urtw.c: revision 1.14
        sys/dev/usb/uirda.c: revision 1.43
        sys/dev/usb/umass.c: revision 1.163
        sys/dev/usb/if_cdce.c: revision 1.45
        sys/dev/usb/if_cue.c: revision 1.77
        sys/dev/usb/if_kue.c: revision 1.91
        sys/dev/usb/uvideo.c: revision 1.46
        sys/dev/usb/uhso.c: revision 1.27
        sys/dev/usb/if_smsc.c: revision 1.33
        sys/dev/usb/ugen.c: revision 1.137
        sys/dev/usb/if_axe.c: revision 1.84
        sys/dev/usb/if_aue.c: revision 1.142
        sys/dev/usb/uscanner.c: revision 1.82
        sys/dev/usb/if_urndis.c: revision 1.17
        sys/dev/usb/udsir.c: revision 1.6
        sys/dev/usb/if_url.c: revision 1.57
        sys/dev/usb/if_otus.c: revision 1.32
        sys/dev/usb/ulpt.c: revision 1.99

PR kern/52931 Kernel panics with Atheros usb wireless interface
Audit the flags to usbd_create_xfer so that USBD_FORCE_SHORT_XFER is
supplied wherever such a transfer is setup.  We can drop
USBD_SHORT_XFER_OK as it has not bearing on number of TDs

ualea: Tidy up a bit.  Fulfil requests completely.
Don't subtract uninitialized pktsize in error path.

diffstat:

 sys/dev/usb/if_athn_usb.c |   8 +-
 sys/dev/usb/if_atu.c      |   8 +-
 sys/dev/usb/if_aue.c      |   6 +-
 sys/dev/usb/if_axe.c      |   6 +-
 sys/dev/usb/if_axen.c     |   7 +-
 sys/dev/usb/if_cdce.c     |   6 +-
 sys/dev/usb/if_cue.c      |   6 +-
 sys/dev/usb/if_kue.c      |   6 +-
 sys/dev/usb/if_otus.c     |   6 +-
 sys/dev/usb/if_rum.c      |   6 +-
 sys/dev/usb/if_run.c      |   6 +-
 sys/dev/usb/if_smsc.c     |   4 +-
 sys/dev/usb/if_udav.c     |   6 +-
 sys/dev/usb/if_upgt.c     |  10 ++--
 sys/dev/usb/if_upl.c      |   6 +-
 sys/dev/usb/if_ural.c     |   6 +-
 sys/dev/usb/if_url.c      |   6 +-
 sys/dev/usb/if_urndis.c   |   6 +-
 sys/dev/usb/if_urtw.c     |   6 +-
 sys/dev/usb/if_urtwn.c    |   6 +-
 sys/dev/usb/if_zyd.c      |   6 +-
 sys/dev/usb/irmce.c       |   6 +-
 sys/dev/usb/pseye.c       |   6 +-
 sys/dev/usb/ualea.c       |  97 ++++++++++++++++++++++++++++++++++------------
 sys/dev/usb/ubt.c         |  12 ++--
 sys/dev/usb/ucom.c        |   6 +-
 sys/dev/usb/udsir.c       |   6 +-
 sys/dev/usb/ugen.c        |  10 +--
 sys/dev/usb/uhso.c        |   6 +-
 sys/dev/usb/uirda.c       |   6 +-
 sys/dev/usb/ulpt.c        |   6 +-
 sys/dev/usb/umass.c       |  16 +++---
 sys/dev/usb/umidi.c       |   6 +-
 sys/dev/usb/uscanner.c    |   6 +-
 sys/dev/usb/usscanner.c   |  11 ++--
 sys/dev/usb/ustir.c       |   6 +-
 sys/dev/usb/utoppy.c      |   6 +-
 sys/dev/usb/uvideo.c      |   6 +-
 38 files changed, 197 insertions(+), 154 deletions(-)

diffs (truncated from 1307 to 300 lines):

diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_athn_usb.c
--- a/sys/dev/usb/if_athn_usb.c Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_athn_usb.c Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_athn_usb.c,v 1.22.2.1 2017/09/28 01:18:55 snj Exp $ */
+/*     $NetBSD: if_athn_usb.c,v 1.22.2.2 2018/01/31 18:01:54 martin Exp $      */
 /*     $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $  */
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.22.2.1 2017/09/28 01:18:55 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.22.2.2 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -670,7 +670,7 @@
                data->sc = usc; /* Backpointer for callbacks. */
 
                error = usbd_create_xfer(usc->usc_rx_data_pipe,
-                   ATHN_USB_RXBUFSZ, USBD_SHORT_XFER_OK, 0, &data->xfer);
+                   ATHN_USB_RXBUFSZ, 0, 0, &data->xfer);
                if (error) {
                        aprint_error_dev(usc->usc_dev,
                            "could not allocate xfer\n");
@@ -717,7 +717,7 @@
                data->sc = usc; /* Backpointer for callbacks. */
 
                error = usbd_create_xfer(usc->usc_tx_data_pipe,
-                   ATHN_USB_TXBUFSZ, USBD_SHORT_XFER_OK, 0, &data->xfer);
+                   ATHN_USB_TXBUFSZ, USBD_FORCE_SHORT_XFER, 0, &data->xfer);
                if (error) {
                        aprint_error_dev(usc->usc_dev,
                            "could not create xfer on TX pipe\n");
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_atu.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_atu.c,v 1.55 2016/11/25 12:56:29 skrll Exp $ */
+/*     $NetBSD: if_atu.c,v 1.55.8.1 2018/01/31 18:01:54 martin Exp $ */
 /*     $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
 /*
  * Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.55 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.55.8.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -317,7 +317,7 @@
        s = splnet();
 
        struct usbd_pipe *pipe0 = usbd_get_pipe0(sc->atu_udev);
-       int error = usbd_create_xfer(pipe0, length, USBD_SHORT_XFER_OK, 0,
+       int error = usbd_create_xfer(pipe0, length, 0, 0,
            &xfer);
        if (error) {
                splx(s);
@@ -1560,7 +1560,7 @@
                c->atu_idx = i;
                if (c->atu_xfer == NULL) {
                        int err = usbd_create_xfer(sc->atu_ep[ATU_ENDPT_RX],
-                           ATU_RX_BUFSZ, USBD_SHORT_XFER_OK, 0, &c->atu_xfer);
+                           ATU_RX_BUFSZ, 0, 0, &c->atu_xfer);
                        if (err)
                                return err;
                        c->atu_buf = usbd_get_buffer(c->atu_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_aue.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.141 2017/01/12 18:26:08 maya Exp $        */
+/*     $NetBSD: if_aue.c,v 1.141.8.1 2018/01/31 18:01:55 martin Exp $  */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.141 2017/01/12 18:26:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.141.8.1 2018/01/31 18:01:55 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1014,7 +1014,7 @@
                        return ENOBUFS;
                if (c->aue_xfer == NULL) {
                        int err = usbd_create_xfer(sc->aue_ep[AUE_ENDPT_RX],
-                           AUE_BUFSZ, USBD_SHORT_XFER_OK, 0, &c->aue_xfer);
+                           AUE_BUFSZ, 0, 0, &c->aue_xfer);
                        if (err) {
                                return err;
                        }
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_axe.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.82.6.1 2017/11/02 21:29:52 snj Exp $      */
+/*     $NetBSD: if_axe.c,v 1.82.6.2 2018/01/31 18:01:55 martin Exp $   */
 /*     $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
 
 /*
@@ -87,7 +87,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.82.6.1 2017/11/02 21:29:52 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.82.6.2 2018/01/31 18:01:55 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1159,7 +1159,7 @@
                c->axe_idx = i;
                if (c->axe_xfer == NULL) {
                        int err = usbd_create_xfer(sc->axe_ep[AXE_ENDPT_RX],
-                           sc->axe_bufsz, USBD_SHORT_XFER_OK, 0, &c->axe_xfer);
+                           sc->axe_bufsz, 0, 0, &c->axe_xfer);
                        if (err)
                                return err;
                        c->axe_buf = usbd_get_buffer(c->axe_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c     Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_axen.c     Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axen.c,v 1.11 2016/12/15 09:28:06 ozaki-r Exp $     */
+/*     $NetBSD: if_axen.c,v 1.11.8.1 2018/01/31 18:01:54 martin Exp $  */
 /*     $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.11 2016/12/15 09:28:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.11.8.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -921,8 +921,7 @@
                c->axen_idx = i;
                if (c->axen_xfer == NULL) {
                        int err = usbd_create_xfer(sc->axen_ep[AXEN_ENDPT_RX],
-                           sc->axen_bufsz, USBD_SHORT_XFER_OK, 0,
-                           &c->axen_xfer);
+                           sc->axen_bufsz, 0, 0, &c->axen_xfer);
                        if (err)
                                return err;
                        c->axen_buf = usbd_get_buffer(c->axen_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c     Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_cdce.c     Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cdce.c,v 1.44 2017/01/12 18:26:08 maya Exp $ */
+/*     $NetBSD: if_cdce.c,v 1.44.8.1 2018/01/31 18:01:54 martin Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.44 2017/01/12 18:26:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.44.8.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -634,7 +634,7 @@
                        return ENOBUFS;
                if (c->cdce_xfer == NULL) {
                        int err = usbd_create_xfer(sc->cdce_bulkin_pipe,
-                           CDCE_BUFSZ, USBD_SHORT_XFER_OK, 0, &c->cdce_xfer);
+                           CDCE_BUFSZ, 0, 0, &c->cdce_xfer);
                        if (err)
                                return err;
                        c->cdce_buf = usbd_get_buffer(c->cdce_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_cue.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cue.c,v 1.76 2017/01/12 18:26:08 maya Exp $ */
+/*     $NetBSD: if_cue.c,v 1.76.8.1 2018/01/31 18:01:54 martin Exp $   */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.76 2017/01/12 18:26:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.76.8.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -679,7 +679,7 @@
                        return ENOBUFS;
                if (c->cue_xfer == NULL) {
                        int error = usbd_create_xfer(sc->cue_ep[CUE_ENDPT_RX],
-                           CUE_BUFSZ, USBD_SHORT_XFER_OK, 0, &c->cue_xfer);
+                           CUE_BUFSZ, 0, 0, &c->cue_xfer);
                        if (error)
                                return error;
                        c->cue_buf = usbd_get_buffer(c->cue_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_kue.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kue.c,v 1.90 2017/06/01 02:45:11 chs Exp $  */
+/*     $NetBSD: if_kue.c,v 1.90.2.1 2018/01/31 18:01:54 martin Exp $   */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.90 2017/06/01 02:45:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.90.2.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -589,7 +589,7 @@
                c->kue_idx = i;
                if (c->kue_xfer == NULL) {
                        int error = usbd_create_xfer(sc->kue_ep[KUE_ENDPT_RX],
-                           KUE_BUFSZ, USBD_SHORT_XFER_OK, 0, &c->kue_xfer);
+                           KUE_BUFSZ, 0, 0, &c->kue_xfer);
                        if (error)
                                return error;
                        c->kue_buf = usbd_get_buffer(c->kue_xfer);
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_otus.c
--- a/sys/dev/usb/if_otus.c     Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_otus.c     Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_otus.c,v 1.31 2017/06/01 02:45:11 chs Exp $ */
+/*     $NetBSD: if_otus.c,v 1.31.2.1 2018/01/31 18:01:55 martin Exp $  */
 /*     $OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $        */
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.31 2017/06/01 02:45:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.31.2.1 2018/01/31 18:01:55 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1181,7 +1181,7 @@
                data->sc = sc;  /* Backpointer for callbacks. */
 
                error = usbd_create_xfer(sc->sc_data_rx_pipe, OTUS_RXBUFSZ,
-                   USBD_SHORT_XFER_OK, 0, &data->xfer);
+                  0, 0, &data->xfer);
 
                if (error) {
                        aprint_error_dev(sc->sc_dev,
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_rum.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $      */
-/*     $NetBSD: if_rum.c,v 1.58 2017/05/23 00:32:47 khorben Exp $      */
+/*     $NetBSD: if_rum.c,v 1.58.2.1 2018/01/31 18:01:54 martin Exp $   */
 
 /*-
  * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.58 2017/05/23 00:32:47 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.58.2.1 2018/01/31 18:01:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -589,7 +589,7 @@
                data->sc = sc;
 
                error = usbd_create_xfer(sc->sc_rx_pipeh, MCLBYTES,
-                   USBD_SHORT_XFER_OK, 0, &data->xfer);
+                   0, 0, &data->xfer);
                if (error) {
                        printf("%s: could not allocate rx xfer\n",
                            device_xname(sc->sc_dev));
diff -r 2246286fff59 -r ca460093e944 sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c      Tue Jan 30 18:22:29 2018 +0000
+++ b/sys/dev/usb/if_run.c      Wed Jan 31 18:01:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_run.c,v 1.22 2017/05/04 14:07:34 hauke Exp $        */
+/*     $NetBSD: if_run.c,v 1.22.2.1 2018/01/31 18:01:54 martin Exp $   */
 /*     $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */
 
 /*-
@@ -23,7 +23,7 @@



Home | Main Index | Thread Index | Old Index