Date: Mon, 9 Jan 2017 09:08:13 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Andriy Voskoboinyk <avos@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb Message-ID: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> In-Reply-To: <201701082341.v08NfH4O046808@repo.freebsd.org> References: <201701082341.v08NfH4O046808@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/09/17 00:41, Andriy Voskoboinyk wrote:
> Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c
> ==============================================================================
> --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:25:46 2017 (r311706)
> +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jan 8 23:41:17 2017 (r311707)
> @@ -63,7 +63,6 @@ static struct usb_config rtwn_config[RTW
> .type = UE_BULK,
> .endpoint = UE_ADDR_ANY,
> .direction = UE_DIR_IN,
> - .bufsize = RTWN_RXBUFSZ,
> .flags = {
> .pipe_bof = 1,
> .short_xfer_ok = 1
> @@ -222,6 +221,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb
> break;
> }
>
> + rtwn_config[RTWN_BULK_RX].bufsize = sc->rx_dma_size + 1024;
Hi,
You should copy the rtwn_config to the stack/softc, and not write to the
static struct, which should be made "static const" after this change!
This might lead to a race when multiple adapters are connecting at the
same time! Remember USB enumeration is multithreaded.
Else your change looks good.
--HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?83881095-b47e-facb-6bbe-a79f8e54209d>
