Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EE0FC77B7C for ; Fri, 5 May 2023 05:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbjEEF1q (ORCPT ); Fri, 5 May 2023 01:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbjEEF1p (ORCPT ); Fri, 5 May 2023 01:27:45 -0400 Received: from mail.kevlo.org (mail.kevlo.org [220.134.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A54DAA27E for ; Thu, 4 May 2023 22:27:43 -0700 (PDT) Received: from localhost (ns.kevlo.org [local]) by ns.kevlo.org (OpenSMTPD) with ESMTPA id cbebcb91; Fri, 5 May 2023 13:27:39 +0800 (CST) Date: Fri, 5 May 2023 13:27:39 +0800 From: Kevin Lo To: Ping-Ke Shih Cc: Kalle Valo , "linux-wireless@vger.kernel.org" , Bitterblue Smith , Jes Sorensen Subject: Re: [PATCH v2] wifi: rtl8xxxu: 8188f: no need to initialize interrupts Message-ID: References: <87ildgpnsd.fsf@kernel.org> <02a6f536d1a144749d97db5c301ee76c@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02a6f536d1a144749d97db5c301ee76c@realtek.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, May 02, 2023 at 09:10:04AM +0000, Ping-Ke Shih wrote: > > > > > -----Original Message----- > > From: Kevin Lo > > Sent: Friday, April 28, 2023 2:35 PM > > To: Kalle Valo > > Cc: linux-wireless@vger.kernel.org; Bitterblue Smith ; Jes Sorensen > > ; Ping-Ke Shih > > Subject: Re: [PATCH v2] wifi: rtl8xxxu: 8188f: no need to initialize interrupts > > > > On Fri, Apr 28, 2023 at 08:40:34AM +0300, Kalle Valo wrote: > > > > > > Kevin Lo writes: > > > > > > > There's no need to initialize interrupts for RTL8188FTV like the vendor driver. > > > > > > > > Signed-off-by: Kevin Lo > > > > > > Why do this, what's the benefit? Or is this just a theoretical fix. The > > > commit log should explain this. > > > > If I understand correctly, just like rtw88 usb devices, rtl8xxxu has no > > hardware interrupt. > > > > With/without hardware interrupt, it depends on IMR (interrupt mask register) > setting. If it is enabled, driver can receive C2H, PS indicators, and beacon > TBTT events via certain USB endpoint. But, normally vendor driver doesn't > use them neither. > > Why it initializes interrupt in this patch is to reset ISR (interrupt status > register) to avoid unexpected interrupts are received. So, if it doesn't > really enable interrupt by IMR, I suppose it should work well even without > this patch. > > Kevin, could I know the real problem you met? Ping-Ke, many thanks for the clear explanation. I didn't encounter any problems. As you mentioned, while the vendor driver doesn't have IMR settings, there is no harm in initializing interrupts. Please drop this patch, thanks. > Ping-Ke Regards, Kevin