PCI: use dev_info rather than dev_err for rom validation
PATCH 1/1 PCI: use dev_info rather than dev_err for rom validation
On AMD GPUs, we use several mechanisms to fetch the vbios rom depending on the platform. We try to read the rom back via the rom BAR and fall back to other methods in some cases. This leads to spurious error messages from the pci rom code which are harmless in our case. This leads to bugs being files, etc. Change these to dev_info rather than dev_err to avoid that.
--- drivers/pci/rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/rom.c +2 -2
@@ -92,14 +92,14 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)void __iomem *pds;/* Standard PCI ROMs start out with these bytes 55 AA */ if (readw (image) !=0xAA55 ) { -dev_err (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" ,readw (image));break ; }/* get the PCI data structure and check its "PCIR" signature */ pds = image +readw (image +24 );if (readl (pds) !=0x52494350 ) { -dev_err (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" ,readl (pds));break ; }
Signature · 1 line
2.13.6
Am 27.11.2017 um 18:21 schrieb Alex Deucher:
Quoted 9 lines
On AMD GPUs, we use several mechanisms to fetch the vbios rom depending on the platform. We try to read the rom back via the rom BAR and fall back to other methods in some cases. This leads to spurious error messages from the pci rom code which are harmless in our case. This leads to bugs being files, etc. Change these to
dev_inforather thandev_errto avoid that.Signed-off-by Alex Deucher <[email protected]>
Quoted 25 lines
--- drivers/pci/rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/rom.c +2
-2@@ -92,14 +92,14 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)void __iomem *pds;/* Standard PCI ROMs start out with these bytes 55 AA */ if (readw (image) !=0xAA55 ) { -dev_err (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" ,readw (image));break ; }/* get the PCI data structure and check its "PCIR" signature */ pds = image +readw (image +24 );if (readl (pds) !=0x52494350 ) { -dev_err (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" ,readl (pds));break ; }
Quoted 7 lines · Alex Deucher
On AMD GPUs, we use several mechanisms to fetch the vbios rom depending on the platform. We try to read the rom back via the rom BAR and fall back to other methods in some cases. This leads to spurious error messages from the pci rom code which are harmless in our case. This leads to bugs being files, etc. Change these to
dev_inforather thandev_errto avoid that.
Does dev_info still print the message by default though? If so, I wonder if this will change anything in practice...
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer
On Mon, Nov 27, 2017 at 1:00 PM, Michel D=C3=A4nzer <[email protected]> wr= ote:
Quoted 11 lines · Alex Deucher
Quoted 7 lines
On AMD GPUs, we use several mechanisms to fetch the vbios rom depending on the platform. We try to read the rom back via the rom BAR and fall back to other methods in some cases. This leads to spurious error messages from the pci rom code which are harmless in our case. This leads to bugs being files, etc. Change these to
dev_inforather thandev_errto avoid that.Does
dev_infostill print the message by default though? If so, I wonder if this will change anything in practice...
It will still show up, just not as an error so if you are filtering on errors, you won't see it.
Alex
Quoted 9 lines · Alex Deucher
On AMD GPUs, we use several mechanisms to fetch the vbios rom depending on the platform. We try to read the rom back via the rom BAR and fall back to other methods in some cases. This leads to spurious error messages from the pci rom code which are harmless in our case. This leads to bugs being files, etc. Change these to
dev_inforather thandev_errto avoid that.Signed-off-by Alex Deucher <[email protected]>
Applied with Christian's reviewed-by to pci/resource for v4.16, thanks! I also added links to several of the bug reports.
Quoted 28 lines
--- drivers/pci/rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/rom.c +2
-2@@ -92,14 +92,14 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)void __iomem *pds;/* Standard PCI ROMs start out with these bytes 55 AA */ if (readw (image) !=0xAA55 ) { -dev_err (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM header signature: expecting 0xaa55, got %#06x\n" ,readw (image));break ; }/* get the PCI data structure and check its "PCIR" signature */ pds = image +readw (image +24 );if (readl (pds) !=0x52494350 ) { -dev_err (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" , +dev_info (&pdev->dev,"Invalid PCI ROM data signature: expecting 0x52494350, got %#010x\n" ,readl (pds));break ; }Signature · 1 line
2.13.6