From owner-svn-src-all@freebsd.org Mon Jan 9 08:08:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD8CCA6514; Mon, 9 Jan 2017 08:08:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF5C61799; Mon, 9 Jan 2017 08:08:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 328841FE1B5; Mon, 9 Jan 2017 09:08:25 +0100 (CET) Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb To: Andriy Voskoboinyk , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701082341.v08NfH4O046808@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> Date: Mon, 9 Jan 2017 09:08:13 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <201701082341.v08NfH4O046808@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 08:08:54 -0000 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