Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2250666imm; Wed, 3 Oct 2018 00:30:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Jx4RgZtEKwJoNA9MMqmfT3c6gDC5ow5T6htSPh0Dq5mcn6Fk3i65uw9w++NC/UYRR3fCj X-Received: by 2002:a17:902:bf42:: with SMTP id u2-v6mr220671pls.13.1538551838605; Wed, 03 Oct 2018 00:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538551838; cv=none; d=google.com; s=arc-20160816; b=UAqpR7CnbOmCyV0EdhsB5syz+5nNnnyIjv7wJRdLvQG6fjRBsnEvV3EsLKXpx2qCp7 Sgjg8H8+96fLeHvNXOYlTsQzUROT0RqbYPl22500TMB/QI621A49BhMrqPMhuOXsGCPT Ms8vkC/Rp2VHzfKbfE7OVndyLxyt8wMlMGEaXtYo92EhGO18QkxY6tmsK90eTYClbZDg c0kuZpAOI71HCVzgZlkaCi0QGYtnvHArwKiCKMbsrThEdhXOK1DXIep+0TOFcV7HJvYP ZWvqrOFwadKvSLnYVpPdURO9SFsdlZy5gq2vWSeMkhxgmzut+ZeZpUHRJHyZP73FJKek 6qAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=22wrp42nv39BT3NsKBT7iy67Dytzr8zmrjug9iNU144=; b=JL2ykGIYljmlFWfy/HRh2mhBPrC38QoMbfYACubNIxzlR6bLhr3595pSE1fUl3n8xo KUN+3o7x146MKi8mq5NhQ5ZkhnscwA4MDX444Y6odT50fDVIpTV3eqdayEL/KkyU7UDS rDhUTvIF8To8U0x7RCd/jWsECfUsGGkSeaM5qoSLnTopyZt315sEHx1d9zm0lN59q7LV NZgPHHRWcOElmCMoV4O1M9KqWiEwpLLpFWOdT0p1hdHeQwhoFf8MM6EN6gvzFteDlgwE KjxpLRJlmZgm9dyidoRCfQm3HBgQvgMVKLeOLfSVvmSGequXfQIo1IzQPb3CAPcvdb7S Yd+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XV1JBSMw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16-v6si564806pgw.208.2018.10.03.00.30.23; Wed, 03 Oct 2018 00:30:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XV1JBSMw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727092AbeJCORT (ORCPT + 99 others); Wed, 3 Oct 2018 10:17:19 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44488 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbeJCORS (ORCPT ); Wed, 3 Oct 2018 10:17:18 -0400 Received: by mail-lf1-f65.google.com with SMTP id m18-v6so3352938lfl.11; Wed, 03 Oct 2018 00:30:07 -0700 (PDT) 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:content-transfer-encoding; bh=22wrp42nv39BT3NsKBT7iy67Dytzr8zmrjug9iNU144=; b=XV1JBSMwWiYTrTlIw1fDK420hUDWQ81qgSX2Rar1LD30uyNq0JwG1pJEwq+qNZUyk4 byDom+r/S6kkYrpDhpaSxVnjpLPv/Ikg/zd8FYdLfxFeZt9hQkTKY1bg4rDOqdrdHIdH QPARo+6JEStqx2vgMMDxqCXfZQdnAoHn+4BLHW7L6JQTSDbqiGOC5IdBcKWISYNxoizi 3ZzVEiyISjZuhPiLfxJNIL/WGOze3JvhyGZTfmNBvoILXfC6WFMyPa52qlTRgeuLG9Fc J7so1ScIHNprBigOHpmB09PBj+aIe9V7RbkIWtCHruGXjziugHzKmtYMad/1VTSLjMJB XChw== 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:content-transfer-encoding; bh=22wrp42nv39BT3NsKBT7iy67Dytzr8zmrjug9iNU144=; b=Ly7+g19bbfj2OZ6We1n1zRCksX37zh9GCZsXxSuMPS8/+5nxcvHsTHotHtbB9XMsly TyU0NVtQUIxWTJy1qKQH1OQGxiruzNtBLjpWBHIfXZZoGGpOLfRaVUaER9qFs37tbyE+ qGGT9Kf9uFHFyB1tN620Y6QpwvIWqSac/VMetBY0Mlw9VMqj2Pf2/1HLANbect+b5mF9 GddU6zzMi25b+F9TJ4wJUnX3LFIZRUeSR3BEc4D1p1PVMDRcacwIkKJ5yAhCpfqCv2xR 8ou/FlwynkiU3AJS6SLW6wvScgx42Zi6ChjWLesE2ePHWmbh9bxpeQNYZl+LGofM0Ali QuiQ== X-Gm-Message-State: ABuFfojqnVALMjrK5s2Qmw2gQcax8AWTfW6wLdG8CIrBroFg6eUooI1Q Ez9EMsHRphCbDmfxs+NlnHWt9HtdiqgK4G4XOpd/J9Q1eZc= X-Received: by 2002:a19:e44b:: with SMTP id b72-v6mr148711lfh.77.1538551805841; Wed, 03 Oct 2018 00:30:05 -0700 (PDT) MIME-Version: 1.0 References: <20181003071513.13004-3-kai.heng.feng@canonical.com> <2787bccf20b6f647de9f4cafae5fd223e771b167.camel@intel.com> <81B978A9-270E-4C0B-BE67-D05899B1BC3B@canonical.com> In-Reply-To: <81B978A9-270E-4C0B-BE67-D05899B1BC3B@canonical.com> From: Matt Chen Date: Wed, 3 Oct 2018 15:29:52 +0800 Message-ID: Subject: Re: [PATCH 3/3] iwlwifi: Load firmware exclusively for Intel WiFi To: kai.heng.feng@canonical.com Cc: luciano.coelho@intel.com, LKML , johannes.berg@intel.com, "Grumbach, Emmanuel" , linuxwifi@intel.com, Kalle Valo , David Miller , linux-wireless , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I think Canonical were facing some wifi fw load error from some 8260 earlier module during the BT still loading the fw. I believe we had later 8260 sku that fixed this issue. Hi Kai-Heng, Can you check with OEM for which SKU they are reporting the issue ? Kai Heng Feng =E6=96=BC 2018=E5=B9=B410=E6=9C= =883=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=883:28=E5=AF=AB=E9=81=93= =EF=BC=9A > > > > > On Oct 3, 2018, at 3:24 PM, Luciano Coelho w= rote: > > > > On Wed, 2018-10-03 at 15:15 +0800, Kai-Heng Feng wrote: > >> To avoid the firmware loading race between Bluetooth and WiFi on Intel > >> 8260, load firmware exclusively when BT_INTEL is enabled. > >> > >> Signed-off-by: Kai-Heng Feng > >> --- > > > > Where is this coming from? Can you explain what "the firmware loading > > race" is? > > Looks like the patch is not correctly threaded. I=E2=80=99ll resend the s= eries. > > > > > > >> .../net/wireless/intel/iwlwifi/pcie/trans.c | 37 ++++++++++++++++++- > >> 1 file changed, 36 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers= /net/wireless/intel/iwlwifi/pcie/trans.c > >> index cc8c53dc0ab6..c30d3989e2a8 100644 > >> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c > >> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c > >> @@ -71,6 +71,7 @@ > >> #include > >> #include > >> #include > >> +#include > > > > I don't see this upstream. Is it something that was recently added? > > Looks odd... > > > > Regardless, this should also be protected on CONFIG_BT_INTEL. > > Thanks, I=E2=80=99ll update this one. > > > > > > >> #include "iwl-drv.h" > >> #include "iwl-trans.h" > >> @@ -1335,6 +1336,10 @@ static int iwl_trans_pcie_start_fw(struct iwl_t= rans *trans, > >> bool hw_rfkill; > >> int ret; > >> > >> +#if IS_ENABLED(CONFIG_BT_INTEL) > >> + void (*firmware_lock_func)(void); > >> + void (*firmware_unlock_func)(void); > >> +#endif > >> /* This may fail if AMT took ownership of the device */ > >> if (iwl_pcie_prepare_card_hw(trans)) { > >> IWL_WARN(trans, "Exit HW not ready\n"); > >> @@ -1394,6 +1399,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_tr= ans *trans, > >> * RF-Kill switch is toggled, we will find out after having loade= d > >> * the firmware and return the proper value to the caller. > >> */ > >> + > > > > Stray empty line. > > > >> iwl_enable_fw_load_int(trans); > >> > >> /* really make sure rfkill handshake bits are cleared */ > >> @@ -1401,8 +1407,37 @@ static int iwl_trans_pcie_start_fw(struct iwl_t= rans *trans, > >> iwl_write32(trans, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL= ); > >> > >> /* Load the given image to the HW */ > >> - if (trans->cfg->device_family >=3D IWL_DEVICE_FAMILY_8000) > >> + if (trans->cfg->device_family >=3D IWL_DEVICE_FAMILY_8000) { > >> +#if IS_ENABLED(CONFIG_BT_INTEL) > >> + firmware_lock_func =3D symbol_request(btintel_firmware_lo= ck); > >> + firmware_unlock_func =3D symbol_request(btintel_firmware_= unlock); > >> + if (!firmware_lock_func || !firmware_unlock_func) { > >> + if (firmware_lock_func) { > >> + symbol_put(btintel_firmware_lock); > >> + firmware_lock_func =3D NULL; > >> + } > >> + > >> + if (firmware_unlock_func) { > >> + symbol_put(btintel_firmware_unlock); > >> + firmware_unlock_func =3D NULL; > >> + } > >> + } > >> + > >> + if (firmware_lock_func) > >> + firmware_lock_func(); > >> +#endif > >> ret =3D iwl_pcie_load_given_ucode_8000(trans, fw); > >> + > >> +#if IS_ENABLED(CONFIG_BT_INTEL) > >> + if (firmware_unlock_func) { > >> + firmware_unlock_func(); > >> + symbol_put(btintel_firmware_lock); > >> + firmware_lock_func =3D NULL; > >> + symbol_put(btintel_firmware_unlock); > >> + firmware_unlock_func =3D NULL; > >> + } > >> +#endif > >> + } > >> else > >> ret =3D iwl_pcie_load_given_ucode(trans, fw); > >> > > > > I'm not sure I like adding this BT-specific stuff here, especially not > > without a detailed explanation. > > > > Did you also send the other patches in this series to linux-wireless? I > > can't see them=E2=80=A6 > > I=E2=80=99ll resend one soon. > > Thanks! > > Kai-Heng > > > > > -- > > Cheers, > > Luca. >