From owner-freebsd-wireless@freebsd.org Sun Sep 4 08:38:24 2016 Return-Path: Delivered-To: freebsd-wireless@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 9E0CABCE54D; Sun, 4 Sep 2016 08:38:24 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.93]) (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 621F3D7E; Sun, 4 Sep 2016 08:38:23 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from [78.51.164.111] (helo=localhost) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1bgSvg-0007DH-K9; Sun, 04 Sep 2016 10:37:28 +0200 Date: Sun, 4 Sep 2016 10:37:19 +0200 From: Marcus von Appen To: Andriy Voskoboinyk Cc: "freebsd-wireless@freebsd.org" , "freebsd-current@freebsd.org" Subject: Re: urtwn(4) / rtwn(4) drivers are merged - call for testing (Was: RTL8812AU / RTL8821AU driver) Message-ID: <20160904083718.GA1605@athena.sysfault.org> Reply-To: Marcus von Appen Mail-Followup-To: Andriy Voskoboinyk , "freebsd-wireless@freebsd.org" , "freebsd-current@freebsd.org" References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Df-Sender: MTEyNTc0Mg== X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 08:38:24 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On, Thu Sep 01, 2016, Andriy Voskoboinyk wrote: > Hi everyone, > > rtwn(4), urtwn(4) and urtwm (from previous emails) drivers were merged > into a > single rtwn driver (plus rtwn_usb / rtwn_pci device glue); the code is > available on https://github.com/s3erios/rtwn repository. Among bugfixes / > code deduplication, there some new features too: > > 1) multi-vap support (one any wireless interface + one STA interface + > any number of monitor mode interfaces). > 2) few new sysctls: > * dev.rtwn.#.crypto - controls how to use hardware crypto acceleration > * dev.rtwn.#.ratectl_selected > * dev.rtwn.#.ratectl - selects current 'rate control' algorithm > (currently only 'none' and 'net80211' are supported; RTL8192CE needs > testing > with the last). I got a RTL8192CE - what should I look for, when using net80211? Cheers Marcus --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlfL3TkACgkQi68/ErJnpkeuJACeLS14oHvH+LCSG+yBMUqzZ6iU JdoAoKcK5jVZxU2/CTGOjHBPob+ebZQG =Je9X -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-freebsd-wireless@freebsd.org Sun Sep 4 21:00:21 2016 Return-Path: Delivered-To: freebsd-wireless@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 B0502B716D9 for ; Sun, 4 Sep 2016 21:00:21 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 A5FF47EE for ; Sun, 4 Sep 2016 21:00:21 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u84L01qV021693 for ; Sun, 4 Sep 2016 21:00:21 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201609042100.u84L01qV021693@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-wireless@FreeBSD.org Subject: Problem reports for freebsd-wireless@FreeBSD.org that need special attention Date: Sun, 04 Sep 2016 21:00:21 +0000 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 21:00:21 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- New | 206801 | iwn(4) page fault on netif restart Open | 154598 | [ath] Atheros 5424/2424 can't connect to WPA netw Open | 163312 | [panic] [ath] kernel panic: page fault with ath0 Open | 166190 | [ath] TX hangs and frames stuck in TX queue Open | 166357 | [ath] 802.11n TX stall when the first frame in th Open | 169362 | [ath] AR5416: radar pulse PHY errors sometimes in Open | 169433 | [iwn] iwn(4) doesn't support 6235 chip. Open | 211689 | panic with lagg failover wireless ath and iwm 8 problems total for which you should take action. From owner-freebsd-wireless@freebsd.org Sun Sep 4 21:18:29 2016 Return-Path: Delivered-To: freebsd-wireless@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 7711FB71F57 for ; Sun, 4 Sep 2016 21:18:29 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (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 3B65266A for ; Sun, 4 Sep 2016 21:18:29 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qk0-x234.google.com with SMTP id z190so175863080qkc.0 for ; Sun, 04 Sep 2016 14:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=ebwVzSb4WbxfT2bms9783Bn1Q6z67h8ue/vs4tNo6A4=; b=QBag56Y6eMpXKvEUkjLqnneZQTbi/0Hb68ziXV8MRsmzpmALwUG4ufxBXdqi0REpB0 yL4AKslnz9HuZ8edXUq7V45zJH6daAavquF7BojsEg0+AADRdDjRwtVZc52zuYEms23H FdhdDidKnXE1ifqWAfCzDTgeYxbNot/wzcBao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=ebwVzSb4WbxfT2bms9783Bn1Q6z67h8ue/vs4tNo6A4=; b=jgCLG4WnlEORZzq7sO15hyMwb2ir4Vt/ZeENe8oxdRbUQBXbH1Nug8tqiduiI2Jdch +fwUlOJvXidSXRasdouC3cbwKCjdGgpVVLRWmmHWob3Lc0zco5Hxiri8ix118yZVaJZj QDlbTG71S7vKg5+UMQh/sHq7Cmmmv8iEKk0aScY2+kQPGyfbgS+9rvLt2qJ3ZxGB6N+3 JFvivYa5lRsHGYjbHPJxUeVt6Wo1wQKi2yUVjiafU7Rlcr33Cy5/2h4F6hjosGgS5FlH 8YElVGC50ATqHQj/byM3g0+YDEbXqG2AB1sdi5wPo06jkoJdu32CxKx2dZJcr6qMH6t6 Ecog== X-Gm-Message-State: AE9vXwOM2oT/CtM1bb6eVcMuMItP2F/iJQ/uROkmA1+m23gHkYo2wL1xnY5gYZ8SSg65CQ== X-Received: by 10.55.74.14 with SMTP id x14mr34732531qka.102.1473023908008; Sun, 04 Sep 2016 14:18:28 -0700 (PDT) Received: from [192.168.0.11] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id v68sm12881409qkd.9.2016.09.04.14.18.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Sep 2016 14:18:27 -0700 (PDT) To: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Subject: Small example program shut down urtwn Message-ID: Date: Sun, 4 Sep 2016 18:18:09 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 21:18:29 -0000 Dears I wrote these two small programs to help debug a problem that I think I have found when using urtwn driver in a baglebone black. The problem is 100% reproducible. In a server machine I run: serverUDP 2508 In beaglebone black I run: ./clientUDP servername 2508 9216 0 All the times, after some packages be sent the urtwn interface do not respond from ping and stops send others packages. Some times this error message appears: % urtwn0: device timeout I have tested with RTL8192CU and RTL8188CUS The problem do no occurs in my notebook. Following the server and client #include #include #include #include #include #include #include #include #define BUFFER_LEN 1024*1024 void diep(char *s) { perror(s); exit(1); } int main(int argc, char **argv) { int lidos; struct sockaddr_in si_me, si_other; int s, i, slen=sizeof(si_other); char buf[BUFFER_LEN]; int aux; if(argc != 2){ fprintf(stderr, "Voce deve usar %s \n", argv[0]); exit(1); } if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) diep("socket"); memset((char *) &si_me, 0, sizeof(si_me)); si_me.sin_family = AF_INET; si_me.sin_port = htons(strtol(argv[1], (char **)NULL, 10)); si_me.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(s, (struct sockaddr *)&si_me, sizeof(si_me))==-1) diep("bind"); i = 1; do { if ((lidos = recvfrom(s, buf, BUFFER_LEN, 0, (struct sockaddr *)&si_other, (socklen_t *)&slen))==-1) diep("recvfrom()"); aux = ntohl(*(int*)&buf[0]); printf("Perdidos %d pacotes (%0.2f%%)\n", aux - i, 100*((float)(aux - i))/((float)aux)); printf("Sequencia %0000d Recebidos %d bytes\n", aux, lidos); i++; }while(lidos>0); close(s); return 0; } #include #include #include #include #include #include #include #include #include #include #include #include #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 #define SRV_IP "127.0.0.1" void diep(char *s) { perror(s); exit(1); } int main(int argc, char **argv) { struct sockaddr_in si_other; int s, i, slen=sizeof(si_other); char *buf; int tamanho; int npack; struct addrinfo *result = NULL, *ptr = NULL, hints; int iResult, aux; fd_set fdset; if(argc != 5){ fprintf(stderr,"Voce deve usar %s \n", argv[0]); exit(1); } tamanho = (int)strtol(argv[3], (char **)NULL, 10); npack = (int)strtol(argv[4], (char **)NULL, 10); buf = malloc(tamanho); bzero(&hints, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; iResult = getaddrinfo(argv[1], argv[2], &hints, &result); if ( iResult != 0 ) { printf("getaddrinfo failed with error: %d\n", iResult); return 1; } // Attempt to connect to an address until one succeeds for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) { // Create a SOCKET for connecting to server s = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol); if (s < 0){ perror("socket"); return 1; } // Connect to server. iResult = connect(s, ptr->ai_addr, (int)ptr->ai_addrlen); if (iResult == SOCKET_ERROR) { close(s); s = INVALID_SOCKET; continue; } break; } freeaddrinfo(result); FD_ZERO(&fdset); FD_SET(s, &fdset); for (i=1; i<=npack || npack==0; i++) { aux = htonl(i); memcpy(&buf[0], &aux, sizeof(aux)); aux = htonl(npack); memcpy(&buf[0+sizeof(i)], &aux, sizeof(aux)); do{ if(select(s+1, NULL, &fdset, NULL, NULL )<0) diep("select()"); }while(!FD_ISSET(s, &fdset)); if (send(s, buf, tamanho, 0)==-1) diep("sendto()"); } printf("Enviados %d pacotes de %d bytes\n", npack, tamanho); close(s); return 0; } From owner-freebsd-wireless@freebsd.org Sun Sep 4 21:29:01 2016 Return-Path: Delivered-To: freebsd-wireless@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 F147DB761D3; Sun, 4 Sep 2016 21:29:00 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) (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 6C6199C2; Sun, 4 Sep 2016 21:28:57 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f42.google.com with SMTP id g62so115381181lfe.3; Sun, 04 Sep 2016 14:28:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:to:subject:cc:mime-version :content-transfer-encoding:from:message-id:user-agent; bh=4K3qBq4JOFZClFoxL5mpmORZ4PdTZDK7HfqDzZLje+A=; b=km03it4Ohf9SK3Dx38KJ2nZp/X7iw3ZsL5kB+4ApDGhHNiuhyloNQyHkbLbYuUZqtZ bREOGW7ovfpZEv3t6HtXpDJtGIs0mYZY4kUKex/ZX8UhZ/NLjLC3ItuADF4QbYEKMPMZ RjXmuh77qf/+LeDevC9s34izpnvmJ+2vEkvI9BJLamPu5jmqtXavX7mmjtSnDVk+j0Y9 /gJogk2PrGvSeDcy8pRZT2+x+kXSR++MaeU8zdOrSxEPHrXyV8JeTqwCbN5E/KQQ3ZqC EZnggHkp6Ry7kC8Tk5BkdiimvgpZS2fFrHROfQOoLTpAVjHUTv28hsa9M8ZUKXNHIncx 9DUQ== X-Gm-Message-State: AE9vXwOYLyMMHaZe2/BxGILlbvzkj98D5ScZ/18kIqa0DhB5QULno1+I25HjqtWUs6v/FQ== X-Received: by 10.25.83.198 with SMTP id h189mr9683728lfb.130.1473024042233; Sun, 04 Sep 2016 14:20:42 -0700 (PDT) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id s82sm4212181lja.14.2016.09.04.14.20.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 04 Sep 2016 14:20:41 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Date: Mon, 05 Sep 2016 00:20:25 +0300 To: "Adrian Chadd" , "Hans Petter Selasky" Subject: Deadlock between device_detach() and usbd_do_request_flags() Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Andriy Voskoboinyk" Message-ID: User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 21:29:01 -0000 There is a rare, but reproducible deadlock for wlan(4) drivers: Thread 1: * uhub_explore_handle_re_enumerate() (obtains enum_sx lock) * usbd_set_config_index() * usb_unconfigure() * usb_detach_device() * usb_detach_device_sub() * typically is executed here (prevents another possible deadlock?) * ieee80211_ifdetach() * ieee80211_vap_destroy() * ic_vap_delete> * ieee80211_vap_detach() here it calls ieee80211_stop() and waits for -> INIT state transition Thread 2 (started from thread 1): * ieee80211_newstate_cb() * vap->iv_newstate() here: if the driver will try to call usbd_do_request_flags() (typically via / ) it will hang (because enum_sx lock is already held by thread 1). Another way: execute some periodical task that will try to access some registers (urtwn_temp_calib(), rum_ratectl_task(), run_ratectl_cb()) while thread 1 is running - deadlock is here too, since will wait for them indefinitely (via ieee80211_draintask()) Right now the most obvious (and, probably, wrong) way is to just detect & release all locks (usbd_enum_unlock()) for ieee80211_ifdetach() / ieee80211_draintask() and re-acquire them later (not tested yet). Any ideas? From owner-freebsd-wireless@freebsd.org Sun Sep 4 23:30:48 2016 Return-Path: Delivered-To: freebsd-wireless@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 8F2C9B71B27; Sun, 4 Sep 2016 23:30:48 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (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 20226354; Sun, 4 Sep 2016 23:30:47 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id p41so97882928lfi.1; Sun, 04 Sep 2016 16:30:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=TgYrVKt1pGkMwn/WgSn57oYQ567LLz2bK+S3uqu+EQo=; b=EvSOxr/bSKrRD5z5hzOlvhZor9XDxyzhFS1vgNTkrEr/fgCCDah7hnWUmWFFc6R00M 2vPiX3BrJk0mxtH1bJHkhXX912snD9STAb8NXp4eXeRMi+4Zt0Omt6wgDB2WiMgUrGiA /AbMU/snQj3oJV9qfOZq/CbWmGd6YaxAXsNowQJA+OsouHOomm1VX/o1SMNtTDLoYpkU mNlaMOitOXY/2fLzp+CZDgoIo37E6J38atpIo5O7be/TRiGOcvbwRoREdbJvZtcnzyjC JSdOOaDozt6N2CH5yVtLrA31KrqaW9eTHdSS0gQEXO+RvHvO+4GSBYBxzCJ9BEZuGkei /e+w== X-Gm-Message-State: AE9vXwOcHnRQq8nFzpZIVy29u5fZ2WxA0sC3bRyBEXBYo6xduxn4mmjlGaxehaChmvU1Hw== X-Received: by 10.25.196.202 with SMTP id u193mr374593lff.77.1473031839392; Sun, 04 Sep 2016 16:30:39 -0700 (PDT) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id f4sm4317388lji.41.2016.09.04.16.30.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 04 Sep 2016 16:30:38 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Marcus von Appen" Cc: "freebsd-wireless@freebsd.org" , "freebsd-current@freebsd.org" Subject: Re: urtwn(4) / rtwn(4) drivers are merged - call for testing (Was: RTL8812AU / RTL8821AU driver) References: <20160904083718.GA1605@athena.sysfault.org> Date: Mon, 05 Sep 2016 02:30:22 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <20160904083718.GA1605@athena.sysfault.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2016 23:30:48 -0000 Sun, 04 Sep 2016 11:37:19 +0300 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Marcus von Appen = : Try to add your vendor / device into sys/dev/rtwn/pci/rtwn_pci_attach.h (sys/dev/rtwn/if_rtwn.c for current driver in HEAD): { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, + { , , "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE }, { 0, 0, NULL, RTWN_CHIP_MAX_PCI } > On, Thu Sep 01, 2016, Andriy Voskoboinyk wrote: > >> Hi everyone, >> >> rtwn(4), urtwn(4) and urtwm (from previous emails) drivers were merge= d >> into a >> single rtwn driver (plus rtwn_usb / rtwn_pci device glue); the code i= s >> available on https://github.com/s3erios/rtwn repository. Among bugfix= es = >> / >> code deduplication, there some new features too: >> >> 1) multi-vap support (one any wireless interface + one STA interface = + >> any number of monitor mode interfaces). >> 2) few new sysctls: >> * dev.rtwn.#.crypto - controls how to use hardware crypto accelerat= ion >> * dev.rtwn.#.ratectl_selected >> * dev.rtwn.#.ratectl - selects current 'rate control' algorithm >> (currently only 'none' and 'net80211' are supported; RTL8192CE needs >> testing >> with the last). > > I got a RTL8192CE - what should I look for, when using net80211? > > Cheers > Marcus From owner-freebsd-wireless@freebsd.org Mon Sep 5 07:48:29 2016 Return-Path: Delivered-To: freebsd-wireless@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 7DE76B718C7; Mon, 5 Sep 2016 07:48:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 3F9605E2; Mon, 5 Sep 2016 07:48:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 5DCC91FE022; Mon, 5 Sep 2016 09:48:21 +0200 (CEST) Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() To: Andriy Voskoboinyk , Adrian Chadd , Hans Petter Selasky References: Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" From: Hans Petter Selasky Message-ID: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> Date: Mon, 5 Sep 2016 09:53:03 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 07:48:29 -0000 On 09/04/16 23:20, Andriy Voskoboinyk wrote: > There is a rare, but reproducible deadlock for wlan(4) drivers: > > Thread 1: > * uhub_explore_handle_re_enumerate() (obtains enum_sx lock) > * usbd_set_config_index() > * usb_unconfigure() > * usb_detach_device() > * usb_detach_device_sub() > * > typically is executed here (prevents > another possible deadlock?) > * ieee80211_ifdetach() > * ieee80211_vap_destroy() > * ic_vap_delete> > * ieee80211_vap_detach() > here it calls ieee80211_stop() and waits for -> INIT state > transition > > Thread 2 (started from thread 1): > * ieee80211_newstate_cb() > * vap->iv_newstate() > here: if the driver will try to call usbd_do_request_flags() > (typically via / ) it will hang > (because enum_sx lock is already held by thread 1). > > > Another way: execute some periodical task that will try to access > some registers (urtwn_temp_calib(), rum_ratectl_task(), > run_ratectl_cb()) while thread 1 is running - deadlock is > here too, since will wait for them indefinitely > (via ieee80211_draintask()) > > Right now the most obvious (and, probably, wrong) way is to just > detect & release all locks (usbd_enum_unlock()) for > ieee80211_ifdetach() / ieee80211_draintask() and re-acquire them > later (not tested yet). > Hi, I think the right solution is to let usbd_do_request_flags() use its own SX lock for synchronization, instead of re-using the enumeration SX lock. What do you think about that? --HPS From owner-freebsd-wireless@freebsd.org Mon Sep 5 08:41:33 2016 Return-Path: Delivered-To: freebsd-wireless@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 C3F90A9D5E6; Mon, 5 Sep 2016 08:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 8DD52D71; Mon, 5 Sep 2016 08:41:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 294021FE022; Mon, 5 Sep 2016 10:41:31 +0200 (CEST) Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() To: Andriy Voskoboinyk , Adrian Chadd References: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" From: Hans Petter Selasky Message-ID: <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> Date: Mon, 5 Sep 2016 10:46:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 08:41:33 -0000 On 09/05/16 09:53, Hans Petter Selasky wrote: > > Hi, > > I think the right solution is to let usbd_do_request_flags() use its own > SX lock for synchronization, instead of re-using the enumeration SX > lock. What do you think about that? > > --HPS > Hi, Another approach which will work is to setup your own USB control endpoint xfer, and use that. I'll have a look and see what can be done. --HPS From owner-freebsd-wireless@freebsd.org Mon Sep 5 09:05:54 2016 Return-Path: Delivered-To: freebsd-wireless@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 B6D15A9DD7A; Mon, 5 Sep 2016 09:05:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 69FDF9F7; Mon, 5 Sep 2016 09:05:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 C47B11FE022; Mon, 5 Sep 2016 11:05:52 +0200 (CEST) Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() To: Andriy Voskoboinyk , Adrian Chadd References: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" From: Hans Petter Selasky Message-ID: <67777201-e078-b519-566a-7a2a29363eee@selasky.org> Date: Mon, 5 Sep 2016 11:10:34 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> Content-Type: multipart/mixed; boundary="------------42EA583F81AFB157F5F19237" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 09:05:54 -0000 This is a multi-part message in MIME format. --------------42EA583F81AFB157F5F19237 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, Can you test the attached patch? Does it solve your issue? --HPS --------------42EA583F81AFB157F5F19237 Content-Type: text/x-patch; name="usb_fix_deadlock.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usb_fix_deadlock.diff" Index: sys/dev/usb/usb_device.c =================================================================== --- sys/dev/usb/usb_device.c (revision 304569) +++ sys/dev/usb/usb_device.c (working copy) @@ -1585,6 +1585,7 @@ /* initialise our SX-lock */ sx_init_flags(&udev->enum_sx, "USB config SX lock", SX_DUPOK); sx_init_flags(&udev->sr_sx, "USB suspend and resume SX lock", SX_NOWITNESS); + sx_init_flags(&udev->ctrl_sx, "USB control transfer SX lock", SX_DUPOK); cv_init(&udev->ctrlreq_cv, "WCTRL"); cv_init(&udev->ref_cv, "UGONE"); @@ -2195,6 +2196,7 @@ sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); + sx_destroy(&udev->ctrl_sx); cv_destroy(&udev->ctrlreq_cv); cv_destroy(&udev->ref_cv); Index: sys/dev/usb/usb_device.h =================================================================== --- sys/dev/usb/usb_device.h (revision 304569) +++ sys/dev/usb/usb_device.h (working copy) @@ -183,6 +183,7 @@ struct usb_udev_msg cs_msg[2]; struct sx enum_sx; struct sx sr_sx; + struct sx ctrl_sx; struct mtx device_mtx; struct cv ctrlreq_cv; struct cv ref_cv; Index: sys/dev/usb/usb_request.c =================================================================== --- sys/dev/usb/usb_request.c (revision 304569) +++ sys/dev/usb/usb_request.c (working copy) @@ -418,7 +418,6 @@ uint16_t length; uint16_t temp; uint16_t acttemp; - uint8_t do_unlock; if (timeout < 50) { /* timeout is too small */ @@ -460,16 +459,16 @@ } /* - * Grab the USB device enumeration SX-lock serialization is - * achieved when multiple threads are involved: + * Serialize access to this function: */ - do_unlock = usbd_enum_lock(udev); + sx_xlock(&udev->ctrl_sx); /* * We need to allow suspend and resume at this point, else the * control transfer will timeout if the device is suspended! */ - usbd_sr_unlock(udev); + if (usbd_enum_is_locked(udev)) + usbd_sr_unlock(udev); hr_func = usbd_get_hr_func(udev); @@ -713,10 +712,10 @@ USB_XFER_UNLOCK(xfer); done: - usbd_sr_lock(udev); + sx_xunlock(&udev->ctrl_sx); - if (do_unlock) - usbd_enum_unlock(udev); + if (usbd_enum_is_locked(udev)) + usbd_sr_lock(udev); if ((mtx != NULL) && (mtx != &Giant)) mtx_lock(mtx); --------------42EA583F81AFB157F5F19237-- From owner-freebsd-wireless@freebsd.org Mon Sep 5 10:29:35 2016 Return-Path: Delivered-To: freebsd-wireless@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 AA7A1B96807; Mon, 5 Sep 2016 10:29:35 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) (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 37195882; Mon, 5 Sep 2016 10:29:34 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lf0-f50.google.com with SMTP id l131so30034392lfl.2; Mon, 05 Sep 2016 03:29:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=3/pRTMfZH4zdC13X0Jxu0seEJ5YWZS3uEnJSVuMdT1U=; b=EcdLxpdmPgSCzFXf0b75rsa+iWMRaFQlaIh7UcFiN4rjEk9gnI2v+hWA7lKFCuUuUw uvkHWmxVDeSw4FoWIPm09ebqeRK3dO+N04AdvGKfH386aAyOeUYHVX9/iNt59DQSP0W+ e69Z7NU4lneHfwh+75rj1e0nYv1YkTDW1Aamra2CLg/BdbYj07nG0WpPWbZXdVU9ackc FIrGFkseRYCQWxieyvHNysUBZhjWL4I2pSgO31o9SQYh8uDUbnqgPUDHdNh778YgnsQR JA1Q2dpr0qXe+g8WZPYOb7WLMdxNdNj2Sx5S5rANhkoP2AAiZpvp6v27YDB4rvlNdzht S3Ag== X-Gm-Message-State: AE9vXwOLCDUHKm55wM1JjeC0I4UVvTImPyBrrEl6RRQ/M+t66OXLs87R/GZQNkhQojcDUQ== X-Received: by 10.25.88.145 with SMTP id m139mr8296775lfb.19.1473070884454; Mon, 05 Sep 2016 03:21:24 -0700 (PDT) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id 28sm2204880lfr.35.2016.09.05.03.21.23 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 05 Sep 2016 03:21:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Adrian Chadd" , "Hans Petter Selasky" Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() References: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> <67777201-e078-b519-566a-7a2a29363eee@selasky.org> Date: Mon, 05 Sep 2016 13:21:08 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <67777201-e078-b519-566a-7a2a29363eee@selasky.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 10:29:35 -0000 Mon, 05 Sep 2016 12:10:34 +0300 =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 = : Works fine, thanks! P.S. Reliable test case: 1) ifconfig wlan1 create wlandev 2) wpa_supplicant -i wlan1 -c /etc/wpa_supplicant.conf & * wait for CTRL-EVENT-CONNECTED event 3) usbconfig -d . power_off > Hi, > > Can you test the attached patch? Does it solve your issue? > > --HPS From owner-freebsd-wireless@freebsd.org Mon Sep 5 16:05:02 2016 Return-Path: Delivered-To: freebsd-wireless@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 8DC1EA9DB8D; Mon, 5 Sep 2016 16:05:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 58B52226; Mon, 5 Sep 2016 16:05:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 CC1F41FE022; Mon, 5 Sep 2016 18:04:59 +0200 (CEST) Subject: Re: Deadlock between device_detach() and usbd_do_request_flags() To: Andriy Voskoboinyk , Adrian Chadd References: <4cf378ff-63e1-7cdc-6120-9578fceec20d@selasky.org> <55cff8ce-6132-53ec-3419-d27286dce622@selasky.org> <67777201-e078-b519-566a-7a2a29363eee@selasky.org> Cc: "freebsd-wireless@freebsd.org" , "freebsd-usb@freebsd.org" From: Hans Petter Selasky Message-ID: <89377ebb-2286-25c7-05ca-34eba41dcd8b@selasky.org> Date: Mon, 5 Sep 2016 18:09:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 16:05:02 -0000 On 09/05/16 12:21, Andriy Voskoboinyk wrote: > Mon, 05 Sep 2016 12:10:34 +0300 було написано Hans Petter Selasky > : > > Works fine, thanks! > > P.S. Reliable test case: > 1) ifconfig wlan1 create wlandev > 2) wpa_supplicant -i wlan1 -c /etc/wpa_supplicant.conf & > * wait for CTRL-EVENT-CONNECTED event > 3) usbconfig -d . power_off > >> Hi, >> >> Can you test the attached patch? Does it solve your issue? >> >> --HPS > FYI: https://svnweb.freebsd.org/changeset/base/305421 --HPS From owner-freebsd-wireless@freebsd.org Tue Sep 6 04:47:59 2016 Return-Path: Delivered-To: freebsd-wireless@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 8FE6CA9DA6B; Tue, 6 Sep 2016 04:47:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 58DD9CB8; Tue, 6 Sep 2016 04:47:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x22f.google.com with SMTP id i184so175132912itf.1; Mon, 05 Sep 2016 21:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=WHmIMEzxliCPWVnhCKCyQJ4YDGqYItd50ETBhHnfE5U=; b=Al+S2sdBhB+3bngqkFU5S5uiv9mCe5jl0sOSygrPi8EFdpFMSjXgVsOtT+mV1ATaS9 8R/eD7dGn9VO9/2cPBGIuSlBMX6k5wsNBuP1uffaYujjrwLAcbU0nBzkwsCOlH4JXI+p 9y+1Lrbl7qayoeAB3pKDA5k155H4khvDbxMrdhT9GxvW17itM2OeMMmC+JsE6yVz6E8A iFj+R3iSnBSQkDixlhkc07HjGutt0UskwmiBFiRFcySkhHLTlB4LAAfp/8MYf15cbIEW DMOApiLrvNUhalpQFNoIB+VlmUcjW3jEfbKIDg+aQ4gXr/4yDGm0peY8AatD8nVIKv6l GqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=WHmIMEzxliCPWVnhCKCyQJ4YDGqYItd50ETBhHnfE5U=; b=QkU8uT3TdwD5Z0aShMSpkB++DJ6ioxm/aSBeBzKsf123Ff+DpxyU5LyFXcwbhOl3XE jv1T/e6wTbHj15ccVuxtS4VQ+e5w2Lzq1JhFNZGk5vqrzdoQVOXvcPj0ogfdxMPC/4Aw o425oQg+s8pruBzIuI4khG4XvImABFBW6MYjr77+h6rgPgpOnBq6+Uv7ACnMQZ1i6cAx xpNIrrH8xbp0k+oBupcRhZK/xU8o8ZZAVqaL4slQ950RUWodp2PmyJ+TXe6pHp6DeC3U N/MbVKbS7hHPDJh3EsJobuHdtki+3Lve8M5hd5wHvsGGatbHupu/EVVrzUjl6Yufv63Z heAw== X-Gm-Message-State: AE9vXwM1qq6IZ+aKtiQVv6B9bqMGZCgvY2Bb8t9q5UZwcZ0SSaXyd2QRW3gGPF8a+dSxrZ1W82cIiI3AsTojPQ== X-Received: by 10.107.164.76 with SMTP id n73mr2654649ioe.165.1473137278603; Mon, 05 Sep 2016 21:47:58 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Mon, 5 Sep 2016 21:47:57 -0700 (PDT) In-Reply-To: References: From: Adrian Chadd Date: Mon, 5 Sep 2016 21:47:57 -0700 X-Google-Sender-Auth: 8lvnxnmnjYKk-VDntQD1wdILqJ8 Message-ID: Subject: Re: Small example program shut down urtwn To: =?UTF-8?B?T3RhY8OtbGlv?= Cc: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 04:47:59 -0000 hm, interesting! I wonder if urtwn and/or usb is missing some bus barriers for ARM or something? -a On 4 September 2016 at 14:18, Otac=C3=ADlio wrot= e: > Dears > > I wrote these two small programs to help debug a problem that I think I h= ave > found when using urtwn driver in a baglebone black. The problem is 100% > reproducible. > > In a server machine I run: > > serverUDP 2508 > > In beaglebone black I run: > > ./clientUDP servername 2508 9216 0 > > All the times, after some packages be sent the urtwn interface do not > respond from ping and stops send others packages. Some times this error > message appears: > > % urtwn0: device timeout > > I have tested with RTL8192CU and RTL8188CUS > > The problem do no occurs in my notebook. > > Following the server and client > > #include > #include > #include > #include > #include > #include > #include > #include > > #define BUFFER_LEN 1024*1024 > > void diep(char *s) > { > perror(s); > exit(1); > } > > int main(int argc, char **argv) > { > int lidos; > struct sockaddr_in si_me, si_other; > int s, i, slen=3Dsizeof(si_other); > char buf[BUFFER_LEN]; > int aux; > > if(argc !=3D 2){ > fprintf(stderr, "Voce deve usar %s \n", argv[0]); > exit(1); > } > > if ((s=3Dsocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))=3D=3D-1) > diep("socket"); > > memset((char *) &si_me, 0, sizeof(si_me)); > si_me.sin_family =3D AF_INET; > si_me.sin_port =3D htons(strtol(argv[1], (char **)NULL, 10)); > si_me.sin_addr.s_addr =3D htonl(INADDR_ANY); > if (bind(s, (struct sockaddr *)&si_me, sizeof(si_me))=3D=3D-1) > diep("bind"); > > i =3D 1; > do { > if ((lidos =3D recvfrom(s, buf, BUFFER_LEN, 0, (struct sockaddr > *)&si_other, (socklen_t *)&slen))=3D=3D-1) > diep("recvfrom()"); > aux =3D ntohl(*(int*)&buf[0]); > printf("Perdidos %d pacotes (%0.2f%%)\n", aux - i, 100*((float)(a= ux > - i))/((float)aux)); > printf("Sequencia %0000d Recebidos %d bytes\n", aux, lidos); > i++; > }while(lidos>0); > > close(s); > return 0; > } > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #define SOCKET_ERROR -1 > #define INVALID_SOCKET -1 > > #define SRV_IP "127.0.0.1" > > void diep(char *s) > { > perror(s); > exit(1); > } > > > int main(int argc, char **argv) > { > struct sockaddr_in si_other; > int s, i, slen=3Dsizeof(si_other); > char *buf; > int tamanho; > int npack; > struct addrinfo *result =3D NULL, > *ptr =3D NULL, > hints; > int iResult, aux; > fd_set fdset; > > if(argc !=3D 5){ > fprintf(stderr,"Voce deve usar %s de pacotes>\n", argv[0]); > exit(1); > } > > tamanho =3D (int)strtol(argv[3], (char **)NULL, 10); > npack =3D (int)strtol(argv[4], (char **)NULL, 10); > > buf =3D malloc(tamanho); > > bzero(&hints, sizeof(hints)); > hints.ai_family =3D AF_UNSPEC; > hints.ai_socktype =3D SOCK_DGRAM; > hints.ai_protocol =3D IPPROTO_UDP; > > iResult =3D getaddrinfo(argv[1], argv[2], &hints, &result); > if ( iResult !=3D 0 ) { > printf("getaddrinfo failed with error: %d\n", iResult); > return 1; > } > > // Attempt to connect to an address until one succeeds > for(ptr=3Dresult; ptr !=3D NULL ;ptr=3Dptr->ai_next) { > > // Create a SOCKET for connecting to server > s =3D socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol); > if (s < 0){ > perror("socket"); > return 1; > } > > // Connect to server. > iResult =3D connect(s, ptr->ai_addr, (int)ptr->ai_addrlen); > if (iResult =3D=3D SOCKET_ERROR) { > close(s); > s =3D INVALID_SOCKET; > continue; > } > > break; > } > > freeaddrinfo(result); > FD_ZERO(&fdset); > FD_SET(s, &fdset); > for (i=3D1; i<=3Dnpack || npack=3D=3D0; i++) { > aux =3D htonl(i); > memcpy(&buf[0], &aux, sizeof(aux)); > aux =3D htonl(npack); > memcpy(&buf[0+sizeof(i)], &aux, sizeof(aux)); > do{ > if(select(s+1, NULL, &fdset, NULL, NULL )<0) > diep("select()"); > }while(!FD_ISSET(s, &fdset)); > if (send(s, buf, tamanho, 0)=3D=3D-1) > diep("sendto()"); > } > printf("Enviados %d pacotes de %d bytes\n", npack, tamanho); > > close(s); > return 0; > } > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g" From owner-freebsd-wireless@freebsd.org Tue Sep 6 07:39:30 2016 Return-Path: Delivered-To: freebsd-wireless@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 7F774B96C90; Tue, 6 Sep 2016 07:39:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 43E459DA; Tue, 6 Sep 2016 07:39:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 0F25A1FE022; Tue, 6 Sep 2016 09:39:27 +0200 (CEST) Subject: Re: Small example program shut down urtwn To: Adrian Chadd , =?UTF-8?B?T3RhY8OtbGlv?= References: Cc: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" From: Hans Petter Selasky Message-ID: <65f68e6c-a1cc-73ec-f3f0-048d4f339ad8@selasky.org> Date: Tue, 6 Sep 2016 09:44:08 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 07:39:30 -0000 On 09/06/16 06:47, Adrian Chadd wrote: > missing some bus > barriers for ARM or something? FYI: Most of the USB control and data memory is coherently allocated and don't need barriers. You can try capturing a trace using usbdump, of the traffic on your device, and see where it hangs: usbdump -i usbusX -f Y -s 65536 --HPS From owner-freebsd-wireless@freebsd.org Tue Sep 6 16:38:50 2016 Return-Path: Delivered-To: freebsd-wireless@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 551BBBC79AE for ; Tue, 6 Sep 2016 16:38:50 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (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 167587D7 for ; Tue, 6 Sep 2016 16:38:49 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qk0-x233.google.com with SMTP id z190so223783695qkc.0 for ; Tue, 06 Sep 2016 09:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=5E3Z8hmN+MmQoIvzf5FvP6d7y9A04MtTpeWbskh2IgU=; b=WmZSSmhfDzlTL2tGiJaPPKiLtauEdhTLEvbWbvH7ttiHX4CH1b7uJHQQTW/7ZIhJSY nZAHbuAQRCRzw9PfFTaC9/Ev597wfwCm8IWexzYD9gRFDsNCG/Z7Ht2NA/p5R4LsgooS K4lH4elFy1TM9D4SGIP2XEC0knfTmFkwYMeas= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5E3Z8hmN+MmQoIvzf5FvP6d7y9A04MtTpeWbskh2IgU=; b=k5JNwObFYDY/Ju3JL9O00H36optJo1uH+m37HXqaU5nlNWJFsGbk2GAvPIfIOu4iTw VcvfWkNM9eOF+H3R+lAe/WCilYN8Qi05H8EpwF2a8BUPPnQer0NNfqS1aZ4m8T9TQ7Sc PeitUiKuXOvIJXBQdW1LneG/S69xNYcUBbxWRNln6qUKNpvSl1EFX4Rz+0GzZVy/4Z8a OwlMnlLQg258VHkR8bCzjioc03y1RJyTx/hMfGon3hN5I0GlS3iXk2hR/fmraeqs7ZtH u9OhiyvnTHOerbqunMgMSVY4xBA6xS1fzKDWkn/B8EmrR9e9YBLPcaHhMmUU48mpf0jT 4KQA== X-Gm-Message-State: AE9vXwNVN8sScEJ+Xcahjb1emVEcrMYXtVJ2t1Mg4nk/qIh7NHqlQWhE053/yf3+g3iw2A== X-Received: by 10.55.54.15 with SMTP id d15mr43022466qka.262.1473179929151; Tue, 06 Sep 2016 09:38:49 -0700 (PDT) Received: from [192.168.0.11] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id n128sm18352065qkn.21.2016.09.06.09.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 09:38:48 -0700 (PDT) Subject: Re: Small example program shut down urtwn To: Hans Petter Selasky , Adrian Chadd References: <65f68e6c-a1cc-73ec-f3f0-048d4f339ad8@selasky.org> Cc: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <44440370-dfc1-f781-e69b-97fbcbc582b2@bsd.com.br> Date: Tue, 6 Sep 2016 13:38:26 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <65f68e6c-a1cc-73ec-f3f0-048d4f339ad8@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 16:38:50 -0000 Em 06/09/2016 04:44, Hans Petter Selasky escreveu: > On 09/06/16 06:47, Adrian Chadd wrote: >> missing some bus >> barriers for ARM or something? > > FYI: Most of the USB control and data memory is coherently allocated > and don't need barriers. You can try capturing a trace using usbdump, > of the traffic on your device, and see where it hangs: > > usbdump -i usbusX -f Y -s 65536 > > --HPS I did and after a lot of messages this error appears. If you need I can send the all log file. 13:04:30.421645 usbus1.2 DONE-CTRL-EP=00000080,SPD=HIGH,NFR=2,SLEN=4,IVAL=0,ERR=0 13:04:30.486012 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:30.486026 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 13:04:30.684198 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:30.684215 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 13:04:30.785275 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:30.785290 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 13:04:30.886512 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:30.886524 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 13:04:30.899415 usbus1.2 DONE-BULK-EP=00000003,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 13:04:30.959399 usbus1.2 SUBM-CTRL-EP=00000000,SPD=HIGH,NFR=1,SLEN=8,IVAL=50 13:04:30.959469 usbus1.2 DONE-CTRL-EP=00000000,SPD=HIGH,NFR=1,SLEN=0,IVAL=50,ERR=0 13:04:30.959484 usbus1.2 SUBM-BULK-EP=00000003,SPD=HIGH,NFR=1,SLEN=1576,IVAL=0 13:04:30.991390 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:30.991404 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 13:04:31.093821 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 After a lot of messages this appears: 13:04:40.000436 usbus1.2 DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 13:04:40.000447 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 urtwn0: device timeout From owner-freebsd-wireless@freebsd.org Tue Sep 6 17:56:33 2016 Return-Path: Delivered-To: freebsd-wireless@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 5CEAFBC7FC4; Tue, 6 Sep 2016 17:56:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 24969C04; Tue, 6 Sep 2016 17:56:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.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 265A11FE022; Tue, 6 Sep 2016 19:56:30 +0200 (CEST) Subject: Re: Small example program shut down urtwn To: =?UTF-8?B?T3RhY8OtbGlv?= , Adrian Chadd References: <65f68e6c-a1cc-73ec-f3f0-048d4f339ad8@selasky.org> <44440370-dfc1-f781-e69b-97fbcbc582b2@bsd.com.br> Cc: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" From: Hans Petter Selasky Message-ID: <9a18fa9c-040b-908a-3c99-7e61357553b4@selasky.org> Date: Tue, 6 Sep 2016 20:01:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <44440370-dfc1-f781-e69b-97fbcbc582b2@bsd.com.br> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 17:56:33 -0000 On 09/06/16 18:38, Otacílio wrote: > After a lot of messages this appears: > > 13:04:40.000436 usbus1.2 > DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 > 13:04:40.000447 usbus1.2 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 > urtwn0: device timeout Hi, A USB analyzer would tell for sure. Most likely the USB dongle has stopped responding and is NAKing the 0x03 BULK OUT endpoint, which leads to the USB_ERR_TIMEOUT. You can try to set .interval = 1, in "struct usb_config", to nice the USB OUT transfers. --HPS From owner-freebsd-wireless@freebsd.org Tue Sep 6 19:23:01 2016 Return-Path: Delivered-To: freebsd-wireless@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 118ACBC6087 for ; Tue, 6 Sep 2016 19:23:01 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (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 BD280F8F for ; Tue, 6 Sep 2016 19:23:00 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qt0-x229.google.com with SMTP id 11so98770115qtc.0 for ; Tue, 06 Sep 2016 12:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=N6ncrVWRCgNV/OSF35pKCkJJQcJ0eCHLD+UkJ5mzGZY=; b=Smp+7G9A7HKmlQ32nIqcetPOqVa3QxB18bTtMRD/KnAuf8H7GklYSeE+03p5A0rb44 nZ6xZ1llJN4t5y16Zib94Omp+vhm0WWQqOBRgnM6NqP+qoDCTr62OYITltKq8EGZZTmc R4U49TtLmZxmMK6oIZZSRFWcJxNd+ye775iG4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=N6ncrVWRCgNV/OSF35pKCkJJQcJ0eCHLD+UkJ5mzGZY=; b=iTCGhzUjt6aQrtJOnBHMtT94Wy78IpGxY0rVM6piYr+b+X3C/o56S0X+Pvt7jw1cwe UJqxvu2B7owZxUgBMwKnsBniOgDqlpPr5xBy7nAAMVGleDo9jPMX/ojjtbp318JfHhCq xorhFDyMkG1HB5s3B79QpTTVqAJP4y9aZU0KoQATSYBUHd/nvOdD8yCj1A5ZemHlnuJe MtTSq84pViZn3r+ea6C/utJqIPdZ2WHL+ufeFdkwsqScpLFbJytFEdIvgJG/JlDsjjGE wiGQlfWmcJe71bujyab2jzpubhzMKX1hyb15etq4p3jqrmAysHXLjOCb3fAjuT5uBRl3 phAw== X-Gm-Message-State: AE9vXwMDLpMOE+0ze2rmnj4j9nIjpU0PjGJXgwqMni/lSqjNk7x33/c4htTJNFtg82XC1A== X-Received: by 10.237.37.198 with SMTP id y6mr18590406qtc.119.1473189779684; Tue, 06 Sep 2016 12:22:59 -0700 (PDT) Received: from [10.50.214.212] ([177.20.152.129]) by smtp.googlemail.com with ESMTPSA id l189sm18777114qke.27.2016.09.06.12.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 12:22:58 -0700 (PDT) Subject: Re: Small example program shut down urtwn To: Hans Petter Selasky , Adrian Chadd References: <65f68e6c-a1cc-73ec-f3f0-048d4f339ad8@selasky.org> <44440370-dfc1-f781-e69b-97fbcbc582b2@bsd.com.br> <9a18fa9c-040b-908a-3c99-7e61357553b4@selasky.org> Cc: "freebsd-arm@freebsd.org" , "freebsd-wireless@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <0a905787-f371-ca44-bbfc-24303d954a3e@bsd.com.br> Date: Tue, 6 Sep 2016 16:22:26 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <9a18fa9c-040b-908a-3c99-7e61357553b4@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 19:23:01 -0000 Em 06/09/2016 15:01, Hans Petter Selasky escreveu: > On 09/06/16 18:38, Otacílio wrote: >> After a lot of messages this appears: >> >> 13:04:40.000436 usbus1.2 >> DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=384,IVAL=0,ERR=0 >> 13:04:40.000447 usbus1.2 >> SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 >> urtwn0: device timeout > > Hi, > > A USB analyzer would tell for sure. Most likely the USB dongle has > stopped responding and is NAKing the 0x03 BULK OUT endpoint, which > leads to the USB_ERR_TIMEOUT. You can try to set .interval = 1, in > "struct usb_config", to nice the USB OUT transfers. > > --HPS This means that the dongle is broken? Because I have two different models doing this. []'s -Otacílio From owner-freebsd-wireless@freebsd.org Thu Sep 8 03:07:29 2016 Return-Path: Delivered-To: freebsd-wireless@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 D1CB7BD1EDA for ; Thu, 8 Sep 2016 03:07:29 +0000 (UTC) (envelope-from jhdoubleoseven@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (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 86A7618F2 for ; Thu, 8 Sep 2016 03:07:29 +0000 (UTC) (envelope-from jhdoubleoseven@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id m184so29374110qkb.1 for ; Wed, 07 Sep 2016 20:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=AIT4nM3G3yfVUPsD0MhQ86LHH9yR+0r0gpCWt6jHxYs=; b=mhWHOPgzmRLKwwX4Jcnqf1Gy9AQb2h7JmpVtkGrk2X4kCwERTFZvt8cij+mv5cNEfy qeIj1RM5fro1So+BQCF2rKdTtry0bq82IOd/jmeKRn4JHd4Yg/mnMInX9Pqbm3knGy93 r1EFHumbNIcUGzVo981HJUcQaiXI9lMkwL33oB/wfoREJlUpMsVkDkrULqRkjNJ6P5cg qEy6w7R18VZiWDN9PGZ5gPe9GzQqanDiqGcyvF4kzhtYcZbaLUxbE2h59TE7csXLrr7g Q3KALBZSXqoSNEg2m1cGCkmEdc2kNyV+EUqo2EjOXBHY9Ztjz3stYxroJ6/ZvRJWaRr8 +E2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AIT4nM3G3yfVUPsD0MhQ86LHH9yR+0r0gpCWt6jHxYs=; b=D9Ss1GZaYZ+TmO7QOzqdpM5fCEt2wt3ogjQ4dSQNHmHESlmGfaZ2nMsLrQDOKgpl31 pwOQB94fQDUfsxbuZBP/951saA0q6AVV3SOLJPAGIpACxRdq+fHZPqlc3LWvxYyJuVAK ja5yYy4v834sQHIQQAsUHtf1CU3dkikHbUjuCk6Hpj2fTpuRF/hFlJxvC7L+8IzcWWi5 nqKlP++ZXEbg01QeAmahIW86bcnV0OXM1V11SlaRxGwQDNWraVYyE8sST/tmtQmGsz8P HK6jrx9yu4NSpl5mSc/H+v2B3Y6M3wcJ6ZsQUH7kl7wBAhGR5NVc88m9PQ8LwH0WiABz kGQA== X-Gm-Message-State: AE9vXwMbfgcNHJR2hLkcqnN9s1COYDVEK5tiyJVx361PtBaiYepvsKFN7nSdftAQPVw31p/09lmfslhH8ngKAQ== X-Received: by 10.55.17.132 with SMTP id 4mr54362838qkr.67.1473304048601; Wed, 07 Sep 2016 20:07:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.212.17 with HTTP; Wed, 7 Sep 2016 20:07:08 -0700 (PDT) From: Jim Heald Date: Wed, 7 Sep 2016 20:07:08 -0700 Message-ID: Subject: FreeBSD 11.0 8026 Support To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 03:07:29 -0000 Hello, I have FreeBSD 11.0-RC2 installed and my wifi doesn't work. However, I noticed this commit and also that FreeBSD 11.0 should be released pretty soon (like in the next few weeks). Therefore, I'm curious first off if the Intel 8026 chipset will be supported in 11.0 and if not how (if possible) I can compile and install the updated driver to get wifi working. Thanks! Jim From owner-freebsd-wireless@freebsd.org Thu Sep 8 23:22:13 2016 Return-Path: Delivered-To: freebsd-wireless@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 F4170BD2177 for ; Thu, 8 Sep 2016 23:22:12 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (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 C302A982 for ; Thu, 8 Sep 2016 23:22:12 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: by mail-oi0-x22c.google.com with SMTP id s131so96825167oie.2 for ; Thu, 08 Sep 2016 16:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xkArsuI4cpn6vymsZ6zifCT0+PS3Inm/WjGb6FWTc1Y=; b=fOd0nKIkb1NRNsq6vEDm4DTbq/DTTTTLilTwafuRHiLqdVpq5Onj7YAAeaB8AaB5K7 knygUv0Lax8fv+cyzXF+F0Ul9HxLNSd190bCXL51EjBoi2JvuvTBrvGtbCWh9iuM7Lpf 8lxctw9i6nV3uyGxjAy2sA609iNniKdXdXM72ckXvTPAzgv7WsXcO/eG+rLjD08tOGyU Tq04rcp+6pMdizp1seZ98yQW0AAplhp0+PesAz15A2DbYZmPYcVXUCbBA3gDlCrglvZb r8IVX1qBszZgoQIByeE3bbjWGcSj7Bjpxv7o35euYJCygykvxAJU+hWtwAVn8VNO4SUr K99A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xkArsuI4cpn6vymsZ6zifCT0+PS3Inm/WjGb6FWTc1Y=; b=TyKGuXMurrBXJrPZVUa0tUAxfzUzz0ElrIra/oQV5tyesfnGDWOvaS9CFJEl/NSKay AZiFF9Ot/k967aqED1Lev/FHc70eV47mSX1A7BvT9JKzOM0yJxdaEJn7Ng3Gu0wMRjSa WiW0WzQrwXi68A9J6mLcaentBDDuewSXA9xM3d4eZBiCksiNnE8vfhFi5g9aAV6c9u5M 2CX3TWRwH98nOoGRzynKvc1kV/N5QlWhInt5i3LCy6czmuSi/7BdBWuyOQ37/Ff2VVw2 xkFhML6xqg+5+Gg8/XJWlDFLrDeE+jaIrcuG27Tt1JuVdy/9EFiba/OyEI6lo1SSbZKj VwPw== X-Gm-Message-State: AE9vXwMSriATKS+N4n2Uocf0SPsv9w7n0TT5rc+gBKa2z1En7dbVfhUu+T7vy3tkk2/6KtbBc1FXCHTBhWuKlA== X-Received: by 10.157.11.161 with SMTP id 30mr725296oth.113.1473376932050; Thu, 08 Sep 2016 16:22:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.26.3 with HTTP; Thu, 8 Sep 2016 16:22:11 -0700 (PDT) In-Reply-To: References: From: Ben Woods Date: Fri, 9 Sep 2016 07:22:11 +0800 Message-ID: Subject: Re: FreeBSD 11.0 8026 Support To: Jim Heald Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 23:22:13 -0000 On Thursday, 8 September 2016, Jim Heald wrote: > Hello, > > I have FreeBSD 11.0-RC2 installed and my wifi doesn't work. However, I > noticed this commit > and > also that FreeBSD 11.0 should be released pretty soon (like in the next few > weeks). Therefore, I'm curious first off if the Intel 8026 chipset will be > supported in 11.0 and if not how (if possible) I can compile and install > the updated driver to get wifi working. > > Thanks! > > Jim > Do you mean the Intel 8260 chipset (rather than 8026)? My understanding is that yes, it is supported by FreeBSD 11. However, the driver is young; and not without problems. In saying that, you should be able to use you wifi! https://www.freebsd.org/cgi/man.cgi?query=iwm&apropos=0&sektion=0&manpath=FreeBSD+11.0-RELEASE&arch=default&format=html Regards, Ben -- -- From: Benjamin Woods woodsb02@gmail.com