Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2673818ybl; Sun, 11 Aug 2019 06:32:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/5dxYvSGueEzCw4kqLPDaxZXt6zlne7ZCwWcVUzKXoO8sL1yxc/hFejUNNtY2JfUxgeKE X-Received: by 2002:aa7:8e10:: with SMTP id c16mr30567251pfr.124.1565530359514; Sun, 11 Aug 2019 06:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565530359; cv=none; d=google.com; s=arc-20160816; b=le0wlBgUFQSRV2T5J+7lMmJnzo1x3+Th9CPlaxe2PtThew3jOMGNMx9GX0QIGMYV/v HmkkgTJm2OFFRekCYuyVY0g55XS1GvhZn+ET4FL0yy4F4RY+3hvjZvgSjDaPQnWcCdvj /L+GDZg40WzrVxLh6/Sup4WZWR/I69RJOG2I3MzzMhTdN8PocZFNHhh9oyb9I1IMZ02Q ECA3VBqd0YpqbiNmZ96tkicv/bVUcYzIWsLztJNWHxCDwg+qCFk5a3/TwUNMPsSaxvKv +D20FRj5T03B30hOQMwz91+ZG8e4gPq7Yrgc4fK/LdQYVhy8uj0kiZhrTDll3oigKruY YKQQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0XuxfIYYRk8+4ocDr9gT6eQtT+jsWzzCKFgtnUKmWXA=; b=WGsj83nqMmQYBQ7oOs0UMLU1Ko9Uv9a4USL5dzv+GiCJ3dJDfpMXSJFDI9rp+XUVBw KWnar3rEER8AATfHgJr5LZv0JO9WOqMVFDeEbbl8ZCvTWtB03U+xfd3hhfKnUltn6aCx embWe9yQBlsHCgXMPtgHoXKIYv9Vbmd2TEO3rhh1jFQRqMBL915Xhr70ewNGu+7gtz4J BReND4VnBnS5eYJKZvFURM3pE9TdUSZCt8M59u64M7vjtXsBK42Vt1HXNXwZSdxUQmmc ff5kFIQ+CJTkuR5+JQFwPxfrlg7Z3POlOFwSwcXeGgIHKWmOtaAYfnfa/OvZQUAt1h4R sgPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si57273604pla.88.2019.08.11.06.32.24; Sun, 11 Aug 2019 06:32:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbfHKNaG (ORCPT + 99 others); Sun, 11 Aug 2019 09:30:06 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:34796 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbfHKNaF (ORCPT ); Sun, 11 Aug 2019 09:30:05 -0400 Received: by mail-wr1-f48.google.com with SMTP id 31so102336680wrm.1; Sun, 11 Aug 2019 06:30:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0XuxfIYYRk8+4ocDr9gT6eQtT+jsWzzCKFgtnUKmWXA=; b=UHwIe2eSav6BqbGz/rgeTHVAUpo5nT5l0P9MP/hsMlhL9jRjs7c1shkmMLCZtntPfK bLgUN/utCdqDAsjTNNUet1vXRYDU+DuoxEYHHHuuL9upJWUI2+TZ9Pi9KvV1lRE9E2LF d36V2pmOZrR0LRV1qboLPrKjW9Yv9/8RWXH29KtFkTjmG8zTJ5dtAR+6tQbSEP+e0xMl 2ioJ5D6B3ks4zIX7dQebKfXfMSxPThmDE0KbOzsROmYMYqp6vSST22Le42WExPJHxJ06 MeuKKLUkjf+ZpYl0Y2lqpM++EwhP2oFxwLGq8NPv+gW9KGHKWM+Kh3UWO6yvxa+mFYIW Xamw== X-Gm-Message-State: APjAAAWCHte/8nQTBC9eIyjgbT/JccDVkMReeZ3FosGSGAjp2DsKHgkI gixuPvM18RQ6iEPF0+lR/7BXPIiB X-Received: by 2002:adf:f404:: with SMTP id g4mr8001499wro.290.1565530203502; Sun, 11 Aug 2019 06:30:03 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id o16sm13781463wrp.23.2019.08.11.06.30.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Aug 2019 06:30:03 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Denis Efremov Subject: [PATCH 3/4] PCI: pciehp: Replace pciehp_set_attention_status() Date: Sun, 11 Aug 2019 16:29:44 +0300 Message-Id: <20190811132945.12426-4-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190811132945.12426-1-efremov@linux.com> References: <20190811132945.12426-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch replaces pciehp_set_attention_status() with pciehp_set_indicators(). Signed-off-by: Denis Efremov --- drivers/pci/hotplug/pciehp.h | 4 +++- drivers/pci/hotplug/pciehp_hpc.c | 25 ------------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 92ff65132711..01ea095aa533 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -182,7 +182,6 @@ void pciehp_get_power_status(struct controller *ctrl, u8 *status); void pciehp_set_indicators(struct controller *ctrl, enum pciehp_indicator pwr, enum pciehp_indicator attn); -void pciehp_set_attention_status(struct controller *ctrl, u8 status); void pciehp_get_latch_status(struct controller *ctrl, u8 *status); int pciehp_query_power_fault(struct controller *ctrl); void pciehp_green_led_on(struct controller *ctrl); @@ -201,6 +200,9 @@ int pciehp_get_attention_status(struct hotplug_slot *hotplug_slot, u8 *status); int pciehp_set_raw_indicator_status(struct hotplug_slot *h_slot, u8 status); int pciehp_get_raw_indicator_status(struct hotplug_slot *h_slot, u8 *status); +#define pciehp_set_attention_status(crtl, status) \ + pciehp_set_indicators(ctrl, PWR_NONE, status) + static inline const char *slot_name(struct controller *ctrl) { return hotplug_slot_name(&ctrl->hotplug_slot); diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index e90cb2152e8f..beff1120afef 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -418,31 +418,6 @@ int pciehp_set_raw_indicator_status(struct hotplug_slot *hotplug_slot, return 0; } -void pciehp_set_attention_status(struct controller *ctrl, u8 value) -{ - u16 slot_cmd; - - if (!ATTN_LED(ctrl)) - return; - - switch (value) { - case 0: /* turn off */ - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_OFF; - break; - case 1: /* turn on */ - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_ON; - break; - case 2: /* turn blink */ - slot_cmd = PCI_EXP_SLTCTL_ATTN_IND_BLINK; - break; - default: - return; - } - pcie_write_cmd_nowait(ctrl, slot_cmd, PCI_EXP_SLTCTL_AIC); - ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, - pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, slot_cmd); -} - void pciehp_set_indicators(struct controller *ctrl, enum pciehp_indicator pwr, enum pciehp_indicator attn) -- 2.21.0