Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb PR kern/52931 Kernel panics with Atheros usb wir...
details: https://anonhg.NetBSD.org/src/rev/9abf1031cbff
branches: trunk
changeset: 358888:9abf1031cbff
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jan 21 13:57:11 2018 +0000
description:
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
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_bwfm_usb.c | 4 ++--
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 | 8 ++++----
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 +++---
39 files changed, 131 insertions(+), 135 deletions(-)
diffs (truncated from 1153 to 300 lines):
diff -r ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_athn_usb.c
--- a/sys/dev/usb/if_athn_usb.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_athn_usb.c Sun Jan 21 13:57:11 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_athn_usb.c,v 1.24 2017/10/18 16:01:58 jmcneill Exp $ */
+/* $NetBSD: if_athn_usb.c,v 1.25 2018/01/21 13:57:11 skrll 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.24 2017/10/18 16:01:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.25 2018/01/21 13:57:11 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -671,7 +671,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");
@@ -718,7 +718,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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_atu.c Sun Jan 21 13:57:11 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.56 2018/01/21 13:57:11 skrll 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.56 2018/01/21 13:57:11 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_aue.c Sun Jan 21 13:57:11 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.142 2018/01/21 13:57:11 skrll 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.142 2018/01/21 13:57:11 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_axe.c Sun Jan 21 13:57:11 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.83 2017/10/28 00:37:12 pgoyette Exp $ */
+/* $NetBSD: if_axe.c,v 1.84 2018/01/21 13:57:11 skrll 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.83 2017/10/28 00:37:12 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.84 2018/01/21 13:57:11 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_axen.c Sun Jan 21 13:57:11 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.12 2018/01/21 13:57:11 skrll 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.12 2018/01/21 13:57:11 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_bwfm_usb.c
--- a/sys/dev/usb/if_bwfm_usb.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_bwfm_usb.c Sun Jan 21 13:57:11 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_usb.c,v 1.3 2017/10/21 20:36:12 jmcneill Exp $ */
+/* $NetBSD: if_bwfm_usb.c,v 1.4 2018/01/21 13:57:11 skrll Exp $ */
/* $OpenBSD: if_bwfm_usb.c,v 1.2 2017/10/15 14:55:13 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
@@ -492,7 +492,7 @@
data->sc = sc; /* Backpointer for callbacks. */
if (usbd_create_xfer(sc->sc_rx_pipeh, BWFM_RXBUFSZ,
- USBD_SHORT_XFER_OK, 0, &data->xfer) != 0) {
+ 0, 0, &data->xfer) != 0) {
printf("%s: could not create xfer\n",
DEVNAME(sc));
error = ENOMEM;
diff -r ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_cdce.c Sun Jan 21 13:57:11 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.45 2018/01/21 13:57:12 skrll 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.45 2018/01/21 13:57:12 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_cue.c Sun Jan 21 13:57:11 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.77 2018/01/21 13:57:12 skrll 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.77 2018/01/21 13:57:12 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_kue.c Sun Jan 21 13:57:11 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.91 2018/01/21 13:57:12 skrll 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.91 2018/01/21 13:57:12 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_otus.c
--- a/sys/dev/usb/if_otus.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_otus.c Sun Jan 21 13:57:11 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.32 2018/01/21 13:57:12 skrll 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.32 2018/01/21 13:57:12 skrll 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 ade1009cc83a -r 9abf1031cbff sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c Sun Jan 21 11:21:40 2018 +0000
+++ b/sys/dev/usb/if_rum.c Sun Jan 21 13:57:11 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.59 2018/01/21 13:57:12 skrll 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.59 2018/01/21 13:57:12 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -589,7 +589,7 @@
Home |
Main Index |
Thread Index |
Old Index