From owner-svn-src-head@freebsd.org Tue Jan 10 00:04:15 2017 Return-Path: Delivered-To: svn-src-head@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 AF30DCA89C3; Tue, 10 Jan 2017 00:04:15 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 607781D5F; Tue, 10 Jan 2017 00:04:15 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f65.google.com with SMTP id q89so7082389lfi.1; Mon, 09 Jan 2017 16:04:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=NYbOCOXs0dFlQ4zdzfLIb+4RqOiUB8STOAM5cFLSSmQ=; b=VMAA4m7cpJDWKsz2opaNE4SfNlrmB1SMCCv0cPmsm+DU/6t8x55u2WCnq4YzhFmG/a LuCZ/POkyWwu/BnIBSpirr1RM2bGu9+en1xv1tXYpsw45gJv9qZVMohTU+OIsBJifmvV 3WVwgTLl1gq2CQHoi3jK7AAapsPOQ5aio+LHdnbzPiJqItUlTbDFDh7TM5jpZJYbNcrz o2xSGD2NDNRXU6VSQgNMwOHUi8V2rCD8sQk52Qxs4Gspas4i3HSp7TJChi5P9XHN2hu5 38YwUkq281hfjngGUNVNW0CDzx96L8UI1CLzD8WyR2Te+IL69aQPHkTy89OzKl1pYGNr 1jmA== X-Gm-Message-State: AIkVDXJX69HJ6WmJaOLMhHoMpkeTjBJXj7TBWYN+HhuAmHkMahrLQXa3NxN2NEu51sGd/Q== X-Received: by 10.25.40.211 with SMTP id o202mr69952lfo.183.1484006163710; Mon, 09 Jan 2017 15:56:03 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id s127sm17225lja.31.2017.01.09.15.56.02 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Jan 2017 15:56:03 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Hans Petter Selasky" Subject: Re: svn commit: r311707 - in head/sys/dev/rtwn: . usb References: <201701082341.v08NfH4O046808@repo.freebsd.org> <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> Date: Tue, 10 Jan 2017 01:56:10 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <83881095-b47e-facb-6bbe-a79f8e54209d@selasky.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 00:04:15 -0000 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 = : 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