Date: Tue, 10 Jan 2017 01:56:10 +0200 From: "Andriy Voskoboinyk" <avos@freebsd.org> To: "Hans Petter Selasky" <hps@selasky.org> Cc: 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: <op.yttorwvg4dikkl@localhost> In-Reply-To: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> References: <201701082341.v08NfH4O046808@repo.freebsd.org> <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mon, 09 Jan 2017 10:08:13 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Hans Petter Selasky = <hps@selasky.org>: Hi, The race should be fixed in r311838. > On 01/09/17 00:41, Andriy Voskoboinyk wrote: >> Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >> --- 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 =3D UE_BULK, >> .endpoint =3D UE_ADDR_ANY, >> .direction =3D UE_DIR_IN, >> - .bufsize =3D RTWN_RXBUFSZ, >> .flags =3D { >> .pipe_bof =3D 1, >> .short_xfer_ok =3D 1 >> @@ -222,6 +221,7 @@ rtwn_usb_setup_endpoints(struct rtwn_usb >> break; >> } >> >> + rtwn_config[RTWN_BULK_RX].bufsize =3D sc->rx_dma_size + 1024; > > Hi, > > You should copy the rtwn_config to the stack/softc, and not write to t= he = > 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?op.yttorwvg4dikkl>