diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-09-07 04:09:58 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-09 16:47:32 -0400 |
commit | 1b4ffcf8432f7945e0bd0571f10a2f2bd1dbd850 (patch) | |
tree | 1b95d1740ed46c89c28501e1d947c3c173f75436 /drivers/pci | |
parent | f15857569613a982568be88d034555d88eead0aa (diff) |
PCI: pcie, aer: init struct aer_err_info for reuse
In case of multiple errors, struct aer_err_info would be reused among
all reported devices. So the info->status should be initialized before
recycled. Otherwise error of one device might be reported as the error
of another device. Also info->flags has similar problem on reporting
TLP header.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index d3f6df40b0d3..4d67db8dd0d0 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -708,6 +708,9 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info) | |||
708 | { | 708 | { |
709 | int pos; | 709 | int pos; |
710 | 710 | ||
711 | info->status = 0; | ||
712 | info->flags &= ~AER_TLP_HEADER_VALID_FLAG; | ||
713 | |||
711 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); | 714 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); |
712 | 715 | ||
713 | /* The device might not support AER */ | 716 | /* The device might not support AER */ |