Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp414639rdf; Tue, 21 Nov 2023 06:16:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWgSXJTHpiyQjyJFNL+1xn0cl4E0nZoLq2y1ZGeIVIQ0x5IIp9k5sYNH1AWN/9vD5NFqNu X-Received: by 2002:a05:6a20:1612:b0:187:cf88:1a34 with SMTP id l18-20020a056a20161200b00187cf881a34mr14117537pzj.8.1700576204034; Tue, 21 Nov 2023 06:16:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700576204; cv=none; d=google.com; s=arc-20160816; b=krpOtvgDeZd+YQYA6E5FxLGITc7tfZSmGVEVur9qx3co67BC2uOX1Zyo+sNqxlguS6 ojmSdlKL0c3IK5teus9N2CYT6ep/Z9pK3gv8RjC5PdsPMUtM/t1VYbdoYActVP7BNLSr 1p+kct2ZPGwlzBncYtzZfwhE9+1RKFSOeYRGlBB1mG19l4pGvWOHslKKA7YcVmM8qNk+ 09yPCRCaGWzlpA6HtEMUucps3bePbESowxvg+2lTGhncl1UWENh2AnXz13KvXeCtFwPy 2Q1SLWm/6S5PsoR7Cv2+9w08MnV7vCMPd4lkbU2S5HzJubOl8FyT7QqkDjgXbbxn9uRr mNug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=BA1MEMmbOhUZq7h5s/2VoUxLvuKCQXG3k6f9x/2PC1Y=; fh=mgSvdipFEQxjl2JLHLLxAYDkGyEuiyoQb3ITzTSLU/w=; b=h9TNz8G/TT5qCO2z+PBiApf5HSFg67oeA1jEbOHK6coTJgkuSFGz1CQVM9ed4kcQpc hnc7a93Qo4Ass4P3nC5EtwJAi1Rn48upUtqZBrg9LfiFdScAdpne9YEk0fx6Jj1Yd/xV MhIPq72jgRtBZ5QV7tLnL8POT0IH/1bIu9kBa95Khyf6O8K002sNvuvF7XnJZN3bXXJn ymgYL56O8zavaT6M0gJ5kCGxmLoYF2OUWTjQh33j4kwSpMHPOzmCYkEDqCsYPspMyjWy ppEOwbnpehL9ygsaQbbdIz4YQyKxDVG2d3Gd273Dvs5p34VjDz1W8rS7zCRBM8EqtttV tpZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Od1Dap9E; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y18-20020a056a00191200b0068beee4922csi10705853pfi.23.2023.11.21.06.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:16:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Od1Dap9E; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7469D80BB53D; Tue, 21 Nov 2023 06:15:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234045AbjKUOPQ (ORCPT + 54 others); Tue, 21 Nov 2023 09:15:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234018AbjKUOPQ (ORCPT ); Tue, 21 Nov 2023 09:15:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A364D10CB for ; Tue, 21 Nov 2023 06:15:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66D5DC433C8; Tue, 21 Nov 2023 14:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700576112; bh=VIpOQOGT75q7qTgqrJxcxGIVQak8KPvWT/q4sYulLoA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Od1Dap9EpxuEWwLk15GlQThOiAfQ7ea20ehkuZ6bR/xznRaqzSzNPgvxAXQn9BKqc D3CYhPDrDyEEnzcp2Et9SbDtlViZXPJkXbiJ6DFRfzGoFbHzn1UHLm6LIgGgdAQt0W WyIewP5aOrFY5/lMfw6WqVLwTBE3ebKEWY/9gC7DWwkxsqQrisJX2ss9pzzs8LPV+g dw+yooijLfr6epaxIJAGWqkutlwq9IuWuVZzD+uqMsM1jarhZ9qpQl1E4iYRGZFJts zfGQ1YcY0E7okeDCa/n4k37DKA20D4lZRYRUuXTvnnHhzcPrO1F3EOqHFRXZx3pkTd glHRa0PR+nBfg== From: Kalle Valo To: James Prestwood Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: Re: Power save setting while interface is down References: <304ce305-fbe6-420e-ac2a-d61ae5e6ca1a@gmail.com> Date: Tue, 21 Nov 2023 16:15:09 +0200 In-Reply-To: <304ce305-fbe6-420e-ac2a-d61ae5e6ca1a@gmail.com> (James Prestwood's message of "Mon, 20 Nov 2023 09:15:28 -0800") Message-ID: <87msv76vma.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 06:15:16 -0800 (PST) James Prestwood writes: > Hi, > > I've noticed a somewhat rare behavior (<1% of the time) where bringing > an interface up fails after disabling power save. This is done by IWD > when a user-option is enabled, and follows an interface > removal/creation. The sequence is: > > 1. Remove default interface > > 2. Create new interface > > 3. Disable power save on new interface > > 4. Bring up new interface (rarely fails with -110). > > iwd[1286641]: src/netdev.c:netdev_disable_ps_cb() Disabled power save > for ifindex 54 > kernel: ath10k_pci 0000:02:00.0: wmi service ready event not received > iwd[1286641]: Error bringing interface 54 up: Connection timed out > kernel: ath10k_pci 0000:02:00.0: Could not init core: -110 So I guess you have a test setup to reproduce this easily? How long does it take to see this? What hardware and firmware version are you using? > I'm thinking maybe there is a race between creating the fresh > interface and disabling PS, then bringing the interface back up? Yeah, looks like it. If it's relatively easy for you to reproduce this you could try adding delays to suitable spots in ath10k. That might be give more ideas where the race is exactly. > Setting PS after the interface is up (so far) seems to be 100% > reliable and have not yet seen this behavior. Regardless of any kernel > fixes I'll need to reorder the command sequence in IWD to support > existing kernels, but before I work around this issue I wanted to > point it out so its not hidden from view. To me working around this in user space doesn't sound like a good idea. I would rather have a workaround in the kernel (but obviously I hope we can find a proper fix). -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches