From owner-freebsd-wireless@freebsd.org Sun Dec 1 18:03:25 2019 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B73A61B36A7 for ; Sun, 1 Dec 2019 18:03:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47Qx1n25CYz44pG for ; Sun, 1 Dec 2019 18:03:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 45DC91B36A5; Sun, 1 Dec 2019 18:03:25 +0000 (UTC) Delivered-To: wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45A581B36A4 for ; Sun, 1 Dec 2019 18:03:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Qx1k0pXRz44pD; Sun, 1 Dec 2019 18:03:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qk1-x744.google.com with SMTP id c124so25909574qkg.0; Sun, 01 Dec 2019 10:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3nvYZH5yztHTwC7vorTKHhTNjiUXXx/QqRZNJP8oNqU=; b=fiS3zcRmetD6YUpeJsXy7b1xIiW4NhwmKEGWbP/tarowFBLB6E3nzVsEFUOgnQL/p+ evRTCSaHQCaVUhSJnPPDGJaIWIXx02/SQb3S7tUkKmwqzb0mkC9Sy7VXzWNSPI+aSPDU S9wOxfo+v4HDVRYRZdtB3PeboZYcSTIGsvKHCrlfEQYM5EMySsMN8iehW8lLvAWqa3Gy DOlB2qKjguw06/ZW0+vS/1aoTVRT35VIsZEDGyzxCy7oztJC6B8EUyOVszCPdYo/HlKB VeRXs1FQY9pvlTnkAC+TwWiUq7dayPk92pQItLcuFROxVc0oLqAC31OsFdRiV7yBA9je Z3cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3nvYZH5yztHTwC7vorTKHhTNjiUXXx/QqRZNJP8oNqU=; b=ScBv+WzAw7mvcz5/accUVjCDYZW6wx2rOgOB2tUnGIifh3F9Bf/BjF1KycNdK1UmQD zjKMCQsXpQ7y2JpfZd2kUEkQex492SNRDeSVez8IsJXmDHeH736OksgzNaOiC6DCl/DR jFmsg9PjAtg+X4YKzE9yrn1YZ9zGauIQG9rhZXjv7WCF4b8Jf8h9NVZtI3g90aVFqa5s AolhsOZyVsuwlpcSwVJ0P6CMosHnVeqBvcQl71Fcpn3D9AXo3OBB9ADfIDIKLjOxttR/ mhapH++xNhMht7Pmed+R2Y+fwZcADGfOJ/gLQFOM+B3mf2miK9PwWVLmqHqYtctuqn7n AgVw== X-Gm-Message-State: APjAAAV8SelsvzPKJgu0QnZ7daWmAA3mEOkIqIJEvX05Y+UyNzLMJuzi eH29n13/EBP5sgHg83k119oCzL3ubCiPyqpxxLL0xA== X-Google-Smtp-Source: APXvYqzVMlQ3a0PfI6RfHLf11hX/WcpTMI2CYxW2eA0yn64zpZaA8REusTEkLxdpPzbtW8WzTA94DBlHkUvUpYVSlW8= X-Received: by 2002:a37:a20a:: with SMTP id l10mr28025032qke.96.1575223399460; Sun, 01 Dec 2019 10:03:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Adrian Chadd Date: Sun, 1 Dec 2019 10:03:07 -0800 Message-ID: Subject: Re: [Bug 242337] iwm - rate 0 causes iwm panic (and work around) To: bugzilla-noreply@freebsd.org Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47Qx1k0pXRz44pD X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.987,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.29 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, 01 Dec 2019 18:03:25 -0000 Hi! Wait, someone's calling iwn_rate2ridx() with rate=0 ? That's highly bogus and yes will lead to a firmware panic. what's the caller? How's it being called with rate=0 ? It sounds like something in the rate negotiation is failing... -adrian On Sun, 1 Dec 2019 at 05:24, wrote: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242337 > > --- Comment #2 from dirkx@webweaving.org --- > As a workaround - in if_iwm.c -- simply picking the first rate from the table > (the slowest) makes things work again although it emits below error: > > > iwm0: frame 0/230 b800002c UNHANDLED (this should not happen) > tun0: link state changed to UP > > Function changed below. > > static int > iwm_rate2ridx(struct iwm_softc *sc, uint8_t rate) > { > int i; > > for (i = 0; i <= IWM_RIDX_MAX; i++) { > if (iwm_rates[i].rate == rate) > return i; > } > > device_printf(sc->sc_dev, > "%s: WARNING: device rate for %u not found!!\n", > __func__, rate); > > // On KPN Experia ADSL modems - one somehow gets a rate==0; > // just picking the first value from the table works. > if (rate == 0) { > device_printf(sc->sc_dev, > "%s: WARNING: using first rate fom the table.\n", > __func__); > return 0; > }; > return -1; > } > > -- > You are receiving this mail because: > You are the assignee for the bug. > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"