]> git.baikalelectronics.ru Git - kernel.git/commit
xen/pcifront: Process failure for pcifront_(re)scan_root()
authorChen Gang <gang.chen.5i5j@gmail.com>
Mon, 6 Oct 2014 03:04:45 +0000 (11:04 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 6 Nov 2014 04:14:08 +0000 (21:14 -0700)
commit65c72edbd19cab5d5ffd182059e2f4e98abd9362
tree49bae1bd2e35636615f857a3a3e4e23a9f5e70ea
parentcf707b7b48540e4559958bc7587fb506b5c80cc1
xen/pcifront: Process failure for pcifront_(re)scan_root()

When pcifront_try_connect() finds no PCI roots, it falls back to calling
pcifront_scan_root() for 0000:00.  If that fails, it used to switch to
XenbusStateConnected and return success (because xenbus_switch_state()
currently always succeeds).

If pcifront_scan_root() fails, leave the XenbusState unchanged and return
an error code.

Similarly, pcifront_attach_devices() falls back to calling
pcifront_rescan_root() for 0000:00.  If that fails, it used to switch to
XenbusStateConnected and return an error code.

If pcifront_rescan_root() fails, leave the XenbusState unchanged and return
the error code.

[bhelgaas: changelog]
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/pci/xen-pcifront.c