Skip to contentSkip to conversation

fix pci related code typos

PATCH In review Chen Fan 3 participants 12 messages Mar 10, 2015 – Mar 12, 2015

lore
Share & tools
lore

Chen Fan

author
#0 lore raw

cover fix pci related code typos

Chen Fan (3):
pcie_aer: fix typos in pcie_aer_inject_error comment
aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register
pci: fix several trivial typos in comment

 hw/pci/pcie_aer.c         | 8 ++++----
 include/hw/pci/pci.h      | 2 +-
 include/hw/pci/pcie_aer.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.3
author
#1 lore raw

PATCH 1/3 pcie_aer: fix typos in pcie_aer_inject_error comment

Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them.

---
 hw/pci/pcie_aer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/pci/pcie_aer.c +3 -3
index 1f4be16..7ca077a 100644
@@ -618,11 +618,11 @@ static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal)
  * non-Function specific error must be recorded in all functions.
  * It is the responsibility of the caller of this function.
  * It is also caller's responsibility to determine which function should
- * report the rerror.
+ * report the error.
  *
  * 6.2.4 Error Logging
- * 6.2.5 Sqeunce of Device Error Signaling and Logging Operations
- * table 6-2: Flowchard Showing Sequence of Device Error Signaling and Logging
+ * 6.2.5 Sequence of Device Error Signaling and Logging Operations
+ * table 6-2: Flowchart Showing Sequence of Device Error Signaling and Logging
  *            Operations
  */
 int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err)
Signature · 1 line
1.9.3
author
#6 lore raw

PATCH 2/3 aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

In reply to Chen Fan
Quoted 1 line

From pcie spec, the bits attributes are RW1CS in Correctable

Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type.

---
 hw/pci/pcie_aer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie_aer.c +1 -1
index 7ca077a..ece1487 100644
@@ -123,7 +123,7 @@ int pcie_aer_init(PCIDevice *dev, uint16_t offset)
                  PCI_ERR_UNC_SUPPORTED);
 
     pci_long_test_and_set_mask(dev->w1cmask + offset + PCI_ERR_COR_STATUS,
-                               PCI_ERR_COR_STATUS);
+                               PCI_ERR_COR_SUPPORTED);
 
     pci_set_long(dev->config + offset + PCI_ERR_COR_MASK,
                  PCI_ERR_COR_MASK_DEFAULT);
Signature · 1 line
1.9.3
author
#8 lore raw

PATCH 3/3 pci: fix several trivial typos in comment

In reply to Chen Fan
---
 include/hw/pci/pci.h      | 2 +-
 include/hw/pci/pcie_aer.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/hw/pci/pci.h +1 -1
index bdee464..b82de15 100644
@@ -137,7 +137,7 @@ enum {
 #define PCI_CONFIG_HEADER_SIZE 0x40
 /* Size of the standard PCI config space */
 #define PCI_CONFIG_SPACE_SIZE 0x100
-/* Size of the standart PCIe config space: 4KB */
+/* Size of the standard PCIe config space: 4KB */
 #define PCIE_CONFIG_SPACE_SIZE  0x1000
 
 #define PCI_NUM_PINS 4 /* A-D */
include/hw/pci/pcie_aer.h +1 -1
index bcac80a..2fb8388 100644
@@ -51,7 +51,7 @@ struct PCIEAERLog {
     PCIEAERErr *log;
 };
 
-/* aer error message: error signaling message has only error sevirity and
+/* aer error message: error signaling message has only error severity and
    source id. See 2.2.8.3 error signaling messages */
 struct PCIEAERMsg {
     /*
Signature · 1 line
1.9.3
author
#10 lore raw
In reply to Chen Fan
Cc qemu-trivial
Quoted 10 lines · Chen Fan

Chen Fan (3):
pcie_aer: fix typos in pcie_aer_inject_error comment
aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register
pci: fix several trivial typos in comment

  hw/pci/pcie_aer.c         | 8 ++++----
  include/hw/pci/pci.h      | 2 +-
  include/hw/pci/pcie_aer.h | 2 +-
  3 files changed, 6 insertions(+), 6 deletions(-)
#2 lore raw

Re: [Qemu-devel] [PATCH 1/3] pcie_aer: fix typos in pcie_aer_inject_error comment

In reply to Chen Fan

10.03.2015 04:49, Chen Fan пишет:

Quoted 15 lines

Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them.

---
 hw/pci/pcie_aer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/pci/pcie_aer.c +0 -0
index 1f4be16..7ca077a 100644
@@ -618,11 +618,11 @@ static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal)
  * non-Function specific error must be recorded in all functions.
  * It is the responsibility of the caller of this function.

hw/pci/pcie_aer.c static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal) · line 626

Quoted 10 lines
hw/pci/pcie_aer.c +3 -3
  * It is also caller's responsibility to determine which function should
- * report the rerror.
+ * report the error.
  *
  * 6.2.4 Error Logging
- * 6.2.5 Sqeunce of Device Error Signaling and Logging Operations
- * table 6-2: Flowchard Showing Sequence of Device Error Signaling and Logging
+ * 6.2.5 Sequence of Device Error Signaling and Logging Operations
+ * table 6-2: Flowchart Showing Sequence of Device Error Signaling and Logging
  *            Operations

this 6-2 is not a table, it is "Figure 6-2" on page 479, unless, ofcourse, you mean "Table 6-2: General PCI Express Error List" on page 481.

I can fix this when applying.

Thanks,

/mjt

Quoted 3 lines
hw/pci/pcie_aer.c +0 -0
  */
 int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err)
Reviewed-by on the v1 series
#11 lore raw
In reply to Chen Fan
Quoted 4 lines · Chen Fan

Chen Fan (3):
pcie_aer: fix typos in pcie_aer_inject_error comment
aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register
pci: fix several trivial typos in comment

Quoted 7 lines
 hw/pci/pcie_aer.c         | 8 ++++----
 include/hw/pci/pci.h      | 2 +-
 include/hw/pci/pcie_aer.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.3
#3 lore raw

Re: [Qemu-devel] [PATCH 1/3] pcie_aer: fix typos in pcie_aer_inject_error comment

In reply to Michael Tokarev
Quoted 30 lines · Michael Tokarev

10.03.2015 04:49, Chen Fan пишет:

Quoted 15 lines

Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them.

---
 hw/pci/pcie_aer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/pci/pcie_aer.c +0 -0
index 1f4be16..7ca077a 100644
@@ -618,11 +618,11 @@ static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal)
  * non-Function specific error must be recorded in all functions.
  * It is the responsibility of the caller of this function.

hw/pci/pcie_aer.c static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal) · line 626

Quoted 10 lines
hw/pci/pcie_aer.c +3 -3
  * It is also caller's responsibility to determine which function should
- * report the rerror.
+ * report the error.
  *
  * 6.2.4 Error Logging
- * 6.2.5 Sqeunce of Device Error Signaling and Logging Operations
- * table 6-2: Flowchard Showing Sequence of Device Error Signaling and Logging
+ * 6.2.5 Sequence of Device Error Signaling and Logging Operations
+ * table 6-2: Flowchart Showing Sequence of Device Error Signaling and Logging
  *            Operations

this 6-2 is not a table, it is "Figure 6-2" on page 479, unless, ofcourse, you mean "Table 6-2: General PCI Express Error List" on page 481.

Quoted 5 lines

I can fix this when applying.

Thanks,

/mjt

OK so you want to take all 3 patches?

Quoted 3 lines
Quoted 3 lines
hw/pci/pcie_aer.c +0 -0
  */
 int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err)
Reviewed-by on v1 1/3
#5 lore raw

Re: [Qemu-devel] [PATCH 1/3] pcie_aer: fix typos in pcie_aer_inject_error comment

In reply to Chen Fan
Quoted 4 lines · Chen Fan

Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them.

Quoted 25 lines
---
 hw/pci/pcie_aer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/pci/pcie_aer.c +3 -3
index 1f4be16..7ca077a 100644
@@ -618,11 +618,11 @@ static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal)
  * non-Function specific error must be recorded in all functions.
  * It is the responsibility of the caller of this function.
  * It is also caller's responsibility to determine which function should
- * report the rerror.
+ * report the error.
  *
  * 6.2.4 Error Logging
- * 6.2.5 Sqeunce of Device Error Signaling and Logging Operations
- * table 6-2: Flowchard Showing Sequence of Device Error Signaling and Logging
+ * 6.2.5 Sequence of Device Error Signaling and Logging Operations
+ * table 6-2: Flowchart Showing Sequence of Device Error Signaling and Logging
  *            Operations
  */
 int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err)
Signature · 1 line
1.9.3
Reviewed-by on v1 2/3
#7 lore raw

Re: [Qemu-devel] [PATCH 2/3] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

In reply to Chen Fan
Quoted 5 lines · Chen Fan
Quoted 1 line

From pcie spec, the bits attributes are RW1CS in Correctable

Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type.

Quoted 19 lines
---
 hw/pci/pcie_aer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie_aer.c +1 -1
index 7ca077a..ece1487 100644
@@ -123,7 +123,7 @@ int pcie_aer_init(PCIDevice *dev, uint16_t offset)
                  PCI_ERR_UNC_SUPPORTED);
 
     pci_long_test_and_set_mask(dev->w1cmask + offset + PCI_ERR_COR_STATUS,
-                               PCI_ERR_COR_STATUS);
+                               PCI_ERR_COR_SUPPORTED);
 
     pci_set_long(dev->config + offset + PCI_ERR_COR_MASK,
                  PCI_ERR_COR_MASK_DEFAULT);
Signature · 1 line
1.9.3
Reviewed-by on v1 3/3
#9 lore raw

Re: [Qemu-devel] [PATCH 3/3] pci: fix several trivial typos in comment

In reply to Chen Fan
Quoted 1 line · Chen Fan
Quoted 33 lines
---
 include/hw/pci/pci.h      | 2 +-
 include/hw/pci/pcie_aer.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/hw/pci/pci.h +1 -1
index bdee464..b82de15 100644
@@ -137,7 +137,7 @@ enum {
 #define PCI_CONFIG_HEADER_SIZE 0x40
 /* Size of the standard PCI config space */
 #define PCI_CONFIG_SPACE_SIZE 0x100
-/* Size of the standart PCIe config space: 4KB */
+/* Size of the standard PCIe config space: 4KB */
 #define PCIE_CONFIG_SPACE_SIZE  0x1000
 
 #define PCI_NUM_PINS 4 /* A-D */
include/hw/pci/pcie_aer.h +1 -1
index bcac80a..2fb8388 100644
@@ -51,7 +51,7 @@ struct PCIEAERLog {
     PCIEAERErr *log;
 };
 
-/* aer error message: error signaling message has only error sevirity and
+/* aer error message: error signaling message has only error severity and
    source id. See 2.2.8.3 error signaling messages */
 struct PCIEAERMsg {
     /*
Signature · 1 line
1.9.3
author
#4 lore raw

Re: [Qemu-devel] [PATCH 1/3] pcie_aer: fix typos in pcie_aer_inject_error comment

In reply to Michael S. Tsirkin
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Michael Tokarev

10.03.2015 04:49, Chen Fan пишет:

Quoted 15 lines

Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them.

---
  hw/pci/pcie_aer.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
hw/pci/pcie_aer.c +0 -0
index 1f4be16..7ca077a 100644
@@ -618,11 +618,11 @@ static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal)
   * non-Function specific error must be recorded in all functions.
   * It is the responsibility of the caller of this function.

hw/pci/pcie_aer.c static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal) · line 626

Quoted 10 lines
hw/pci/pcie_aer.c +3 -3
   * It is also caller's responsibility to determine which function should
- * report the rerror.
+ * report the error.
   *
   * 6.2.4 Error Logging
- * 6.2.5 Sqeunce of Device Error Signaling and Logging Operations
- * table 6-2: Flowchard Showing Sequence of Device Error Signaling and Logging
+ * 6.2.5 Sequence of Device Error Signaling and Logging Operations
+ * table 6-2: Flowchart Showing Sequence of Device Error Signaling and Logging
   *            Operations

this 6-2 is not a table, it is "Figure 6-2" on page 479, unless, ofcourse, you mean "Table 6-2: General PCI Express Error List" on page 481.

Quoted 6 lines
Quoted 5 lines

I can fix this when applying.

Thanks,

/mjt

OK so you want to take all 3 patches?

Hi mjt,

can you check in these patch?

Thanks,
Chen

Quoted 7 lines
Quoted 5 lines

hw/pci/pcie_aer.c static bool pcie_aer_inject_uncor_error(PCIEAERInject *inj, bool is_fatal) · line 628

Quoted 5 lines
hw/pci/pcie_aer.c +0 -0
   */
  int pcie_aer_inject_error(PCIDevice *dev, const PCIEAERErr *err)

.