From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B06E1C46499 for ; Fri, 5 Jul 2019 10:53:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82961216E3 for ; Fri, 5 Jul 2019 10:53:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OA2PnFR3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728334AbfGEKxI (ORCPT ); Fri, 5 Jul 2019 06:53:08 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41721 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727311AbfGEKxH (ORCPT ); Fri, 5 Jul 2019 06:53:07 -0400 Received: by mail-lj1-f196.google.com with SMTP id 205so8840379ljj.8; Fri, 05 Jul 2019 03:53:06 -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; bh=8gIVLlJGyzOZpvjymn0qndBI/DyFM3MnfYbrUU7cLfg=; b=OA2PnFR3Tq37k/UFYwFzRwjmKtHHjpPm1KOu2EZ2zfy4XJnDqIUxkz6TOSv87f2Cm2 VvNvXX3OmA6EWINmFxVXk7cy5aD1jRGNTtL5WUQGgU5JQDB02djNhsXceZWYcul0YJ7W 3t93vxkqdYwTlXk5I9xpGcairN+6Cx1cdRea/kRYjym8eDKer0rE1VvNV5RcCP9UZKx1 7Q5Atd62ugXFb3LXMZkjz0ZsE1ZEFNXRvtkQYTCnn/oWN/MW3jzIHgbdDjLRzJ8YXffs czIcA/nPmtcENuDAkJQikgmcb2XbWTZXplSszq7+28y/hT3+u+K3026w4pVDrv4O+2GJ tWtw== 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=8gIVLlJGyzOZpvjymn0qndBI/DyFM3MnfYbrUU7cLfg=; b=I6RFra5dq1JxB3sBO/56jGgyfVhEV6+NN4Ei9L6WswswGWloW6p3Oi/ENsWP3iS/rY 0T10rjLvXodAjwvomyWC0QPn0S1LpyH8Z0Vz96iFZpsCoXmCTmKZZSSH7ngIdm0YRCla TpCzbpT81jW+ONu7G8NyFe5UOEH9bz6gL5Rjs8G7g6TCeQjlB5k8tOH/KCwn3kusi5Aw y++N6zg4v3gKaC8v6aG+TkVt6Z8faJjYYe1q6UvPGWRDv5s61qYbMP1s4BrbTx8wD3Mk Yy8kyaLMoNs3k+MvVazosOd1A5Y+AvAwHaeWNPuI1KaIOvVGB6Tf7OVTCsTNRuTPJT9U FuAA== X-Gm-Message-State: APjAAAVqZybHgtseNPJ9f/o6McB2NVGkJavCsWbO5MIx+Cy9MDVGpKHh SvfpabR1InuW7leajZwFvN+eojYyyl8fLFMe0kU= X-Google-Smtp-Source: APXvYqz6ZY+WPH/vHYMs8HE/XsQEqzjygvkCpC2gpWEDQgnwjxE3DGgLoRNh6dulgUEU0YsKTi8QZAHzKJNR45mtFGA= X-Received: by 2002:a2e:3013:: with SMTP id w19mr1811339ljw.73.1562323985628; Fri, 05 Jul 2019 03:53:05 -0700 (PDT) MIME-Version: 1.0 References: <20190705095800.43534-1-mika.westerberg@linux.intel.com> <20190705095800.43534-3-mika.westerberg@linux.intel.com> In-Reply-To: <20190705095800.43534-3-mika.westerberg@linux.intel.com> From: Yehezkel Bernat Date: Fri, 5 Jul 2019 13:52:49 +0300 Message-ID: Subject: Re: [PATCH 2/8] thunderbolt: Move NVM upgrade support flag to struct icm To: Mika Westerberg Cc: LKML , Andreas Noever , Michael Jamet , "Rafael J . Wysocki" , Len Brown , Lukas Wunner , Mario Limonciello , Anthony Wong , linux-acpi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Fri, Jul 5, 2019 at 12:58 PM Mika Westerberg wrote: > > @@ -1913,12 +1915,7 @@ static int icm_start(struct tb *tb) > if (IS_ERR(tb->root_switch)) > return PTR_ERR(tb->root_switch); > > - /* > - * NVM upgrade has not been tested on Apple systems and they > - * don't provide images publicly either. To be on the safe side > - * prevent root switch NVM upgrade on Macs for now. > - */ > - tb->root_switch->no_nvm_upgrade = x86_apple_machine; > + tb->root_switch->no_nvm_upgrade = !icm->can_upgrade_nvm; > tb->root_switch->rpm = icm->rpm; > > ret = tb_switch_add(tb->root_switch); > @@ -2021,6 +2018,7 @@ struct tb *icm_probe(struct tb_nhi *nhi) > switch (nhi->pdev->device) { > case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_NHI: > case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI: > + icm->can_upgrade_nvm = true; > icm->is_supported = icm_fr_is_supported; > icm->get_route = icm_fr_get_route; > icm->save_devices = icm_fr_save_devices; > @@ -2038,6 +2036,13 @@ struct tb *icm_probe(struct tb_nhi *nhi) > case PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_NHI: > case PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_NHI: > icm->max_boot_acl = ICM_AR_PREBOOT_ACL_ENTRIES; > + /* > + * NVM upgrade has not been tested on Apple systems and > + * they don't provide images publicly either. To be on > + * the safe side prevent root switch NVM upgrade on Macs > + * for now. > + */ > + icm->can_upgrade_nvm = !x86_apple_machine; > icm->is_supported = icm_ar_is_supported; > icm->cio_reset = icm_ar_cio_reset; > icm->get_mode = icm_ar_get_mode; > @@ -2054,6 +2059,7 @@ struct tb *icm_probe(struct tb_nhi *nhi) > case PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_NHI: > case PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_NHI: > icm->max_boot_acl = ICM_AR_PREBOOT_ACL_ENTRIES; > + icm->can_upgrade_nvm = true; Shouldn't this be also !x86_apple_machine just like AR? (For FR, we don't use ICM on Apple machines, as much as I remember, so it's fine to enable it there unconditionally for ICM code path.) > icm->is_supported = icm_ar_is_supported; > icm->cio_reset = icm_tr_cio_reset; > icm->get_mode = icm_ar_get_mode; > -- > 2.20.1 >