From patchwork Mon Dec 16 01:15:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3351281 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 22FC09F32E for ; Mon, 16 Dec 2013 01:15:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BAA42035E for ; Mon, 16 Dec 2013 01:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 838D220351 for ; Mon, 16 Dec 2013 01:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987Ab3LPBPZ (ORCPT ); Sun, 15 Dec 2013 20:15:25 -0500 Received: from mail-ie0-f180.google.com ([209.85.223.180]:43126 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908Ab3LPBPY (ORCPT ); Sun, 15 Dec 2013 20:15:24 -0500 Received: by mail-ie0-f180.google.com with SMTP id tp5so5721873ieb.11 for ; Sun, 15 Dec 2013 17:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding; bh=1Qdi7N3enOTquyKLEdnDvLBa9TFFOkaRib/dio0ymTk=; b=B8gCOvbKROZ8cwRxhP4dYH6uIN5bs4/v1UyOZhgWVtImiMKHnjR1lgc6maN8u9e3+0 i25owKIt8SDbXMEmpBevMBjbyP75UG7Orvk5urSpLVsFElGc0dVQk+jMeFpjlE+GJ+XK IaHDc9DctbOhVV+cZNlQbOf1A+fCVXJKal4FaG0OxkbxRShPDeiHUkDuX8PbNfj0BIIS 8FPv1Cip9I7VKsImib7b/V7KFHQBpIAK3K1hIfvaubsCbNW/+9TVb5nmRAE1qQgsaGqq ap/QqQbaJ7Vh5rQiEPVUrAdvqqLDRqPFRCEi3jPjk9ihBbWQfMpcxx2WQDHRBgmorhS9 MK4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=1Qdi7N3enOTquyKLEdnDvLBa9TFFOkaRib/dio0ymTk=; b=Z/9AMREV5xlMAQGxs6h9NrFiChhRkEHrQEp55B28Gu83X7z+UPYD4FHiy6k8vWBL4U OP2GndEf8pAXaa3f9/07f3iZu5OzV4BPxvMaIodH31eLewMajfunvcaQi17NM/wHFRcm J47rUiRVMsi0E5g5UK+ad7d2y9KODlPm3eQAhxSSxc+8uVZXk3evrt1gWawFd2QCjAl7 hUTwAv/823yu2hgiT6AP4mToUjqBR16P5+T9BbWMYDzcUIdkVMD42oe0tWSTITWxvUQ3 uhKQVNTpBnG6xmwx88x1mSR6dGAFYCMbr1ZxACAjXb+tJueCwGxVlocXOoPlsreu0XeG 2w/g== X-Gm-Message-State: ALoCoQmXPwH3VOF4M/q8QXqYXonaLoyQel2HuLwIgAtgDjlAmqiZS240pC6PlHicoa40ALQKBkMmasOIUw9lUNfF4tEAKHfSls86ZWM+HmlGk0joZCBHDKv33lY1td3v8q5KeYSha1wf3ZVY5MLqN84/Kl98uH6kEg9fMOKvMi1SwZ8k+cnTcs+Ps/Sk03unuuido51SnGWKWL2T62RGs3I2VGBpYUNzIDBx6FYYmQECrAY7z3x75hE= X-Received: by 10.50.25.227 with SMTP id f3mr12666365igg.16.1387156524050; Sun, 15 Dec 2013 17:15:24 -0800 (PST) Received: from localhost (173-8-252-97-Colorado.hfc.comcastbusiness.net. [173.8.252.97]) by mx.google.com with ESMTPSA id l7sm13386988igx.2.2013.12.15.17.15.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 15 Dec 2013 17:15:23 -0800 (PST) Subject: [PATCH 4/8] PCI: pciehp: Announce slot capabilities (slot #, button, LEDs, etc) To: linux-pci@vger.kernel.org From: Bjorn Helgaas Date: Sun, 15 Dec 2013 18:15:22 -0700 Message-ID: <20131216011522.7275.36607.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20131216010946.7275.83547.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20131216010946.7275.83547.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We already have the vendor/device IDs from pci_setup_device(), so drop that info and print things that will be more useful for debugging: the slot number and presence of button/indicators/link active reporting/etc. No functional change. Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/pciehp_hpc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 83df74910f9a..55109d6d8a90 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -771,6 +771,8 @@ static inline void dbg_ctrl(struct controller *ctrl) ctrl_info(ctrl, "Slot Control : 0x%04x\n", reg16); } +#define FLAG(x,y) (((x) & (y)) ? '+' : '-') + struct controller *pcie_init(struct pcie_device *dev) { struct controller *ctrl; @@ -811,9 +813,16 @@ struct controller *pcie_init(struct pcie_device *dev) /* Disable software notification */ pcie_disable_notification(ctrl); - ctrl_info(ctrl, "HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", - pdev->vendor, pdev->device, pdev->subsystem_vendor, - pdev->subsystem_device); + ctrl_info(ctrl, "Slot #%d AttnBtn%c AttnInd%c PwrInd%c PwrCtrl%c MRL%c Interlock%c NoCompl%c LLActRep%c\n", + (slot_cap & PCI_EXP_SLTCAP_PSN) >> 19, + FLAG(slot_cap, PCI_EXP_SLTCAP_ABP), + FLAG(slot_cap, PCI_EXP_SLTCAP_AIP), + FLAG(slot_cap, PCI_EXP_SLTCAP_PIP), + FLAG(slot_cap, PCI_EXP_SLTCAP_PCP), + FLAG(slot_cap, PCI_EXP_SLTCAP_MRLSP), + FLAG(slot_cap, PCI_EXP_SLTCAP_EIP), + FLAG(slot_cap, PCI_EXP_SLTCAP_NCCS), + FLAG(link_cap, PCI_EXP_LNKCAP_DLLLARC)); if (pcie_init_slot(ctrl)) goto abort_ctrl;