[PATCH] PCIUtils: support PM No_Soft_Reset bit in lspci

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
---
 lib/header.h |    1 +
 ls-caps.c    |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/header.h b/lib/header.h
index 24b569e..ad8bce6 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -238,6 +238,7 @@
 #define  PCI_PM_CAP_PME_D3_COLD	0x8000	/* PME can be asserted from D3cold */
 #define PCI_PM_CTRL		4	/* PM control and status register */
 #define  PCI_PM_CTRL_STATE_MASK	0x0003	/* Current power state (D0 to D3) */
+#define  PCI_PM_CTRL_NO_SOFT_RST	0x0008	/* No Soft Reset from D3hot to D0 */
 #define  PCI_PM_CTRL_PME_ENABLE	0x0100	/* PME pin enable */
 #define  PCI_PM_CTRL_DATA_SEL_MASK	0x1e00	/* PM table data index */
 #define  PCI_PM_CTRL_DATA_SCALE_MASK	0x6000	/* PM table data scaling factor */
diff --git a/ls-caps.c b/ls-caps.c
index 8b0f820..3e01f2c 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -34,8 +34,9 @@ cap_pm(struct device *d, int where, int cap)
   if (!config_fetch(d, where + PCI_PM_CTRL, PCI_PM_SIZEOF - PCI_PM_CTRL))
     return;
   t = get_conf_word(d, where + PCI_PM_CTRL);
-  printf("\t\tStatus: D%d PME-Enable%c DSel=%d DScale=%d PME%c\n",
+  printf("\t\tStatus: D%d NoSoftRst%c PME-Enable%c DSel=%d DScale=%d PME%c\n",
 	 t & PCI_PM_CTRL_STATE_MASK,
+	 FLAG(t, PCI_PM_CTRL_NO_SOFT_RST),
 	 FLAG(t, PCI_PM_CTRL_PME_ENABLE),
 	 (t & PCI_PM_CTRL_DATA_SEL_MASK) >> 9,
 	 (t & PCI_PM_CTRL_DATA_SCALE_MASK) >> 13,
-- 
1.5.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux