Skip to contentSkip to conversation

xl: Use proper path for 'do_flr' functionality.

PATCH In review [email protected] 3 participants 3 messages Jul 8, 2014 – Jul 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: Use proper path for 'do_flr' functionality.

From: Konrad Rzeszutek Wilk <[email protected]>

Commit f74035d3b1e827ff6ff1873e2f10feb011a8d0d2 "xl: PCI code cleanups" introduced an regression where it changed the name from:
/sys/bus/pci/drivers/pciback/do_flr
to
libxl_sprintf(ctx, "%s/pciback/do_flr", SYSFS_PCI_DEV);

And SYSFS_PCI_DEV is "/sys/bus/pci/devices", meaning we would do /sys/bus/pci/devices/pciback/do_flr. The proper define should have been SYSFS_PCIBACK_DRIVER, which is what this patch does.

---
[v2: Fix it up per Jan's review]

---
 tools/libxl/libxl_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/libxl/libxl_pci.c +1 -1
index 5a7cc9e..529563d 100644
@@ -965,7 +965,7 @@ static int libxl__device_pci_reset(libxl__gc *gc, unsigned int domain, unsigned
     char *reset;
     int fd, rc;
 
-    reset = libxl__sprintf(gc, "%s/pciback/do_flr", SYSFS_PCI_DEV);
+    reset = libxl__sprintf(gc, "%s/do_flr", SYSFS_PCIBACK_DRIVER);
     fd = open(reset, O_WRONLY);
     if (fd >= 0) {
         char *buf = libxl__sprintf(gc, PCI_BDF, domain, bus, dev, func);
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 8 lines · On Tue, 2014-07-08 at 15:00 -0400, [email protected] wrote:

From: Konrad Rzeszutek Wilk <[email protected]>

Commit f74035d3b1e827ff6ff1873e2f10feb011a8d0d2 "xl: PCI code cleanups" introduced an regression where it changed the name from:
/sys/bus/pci/drivers/pciback/do_flr
to
libxl_sprintf(ctx, "%s/pciback/do_flr", SYSFS_PCI_DEV);

Quoted 5 lines

And SYSFS_PCI_DEV is "/sys/bus/pci/devices", meaning we would do /sys/bus/pci/devices/pciback/do_flr. The proper define should have been SYSFS_PCIBACK_DRIVER, which is what this patch does.

Acked and applied, correcting the title to say libxl.

Ian.

#2 lore raw
Quoted 10 lines · Ian Campbell
Quoted 8 lines · On Tue, 2014-07-08 at 15:00 -0400, [email protected] wrote:

From: Konrad Rzeszutek Wilk <[email protected]>

Commit f74035d3b1e827ff6ff1873e2f10feb011a8d0d2 "xl: PCI code cleanups" introduced an regression where it changed the name from:
/sys/bus/pci/drivers/pciback/do_flr
to
libxl_sprintf(ctx, "%s/pciback/do_flr", SYSFS_PCI_DEV);

Quoted 7 lines
Quoted 5 lines

And SYSFS_PCI_DEV is "/sys/bus/pci/devices", meaning we would do /sys/bus/pci/devices/pciback/do_flr. The proper define should have been SYSFS_PCIBACK_DRIVER, which is what this patch does.

Acked and applied, correcting the title to say libxl.

Duh. Thank and will be more careful in the future.

Quoted 5 lines

Ian.