From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Fwd: BUG in linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c Date: Wed, 25 Jan 2012 16:22:14 -0500 Message-ID: <20120125212214.GA29571@phenom.dumpdata.com> References: <20120125163910.GC23999@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20120125163910.GC23999@phenom.dumpdata.com> Sender: linux-kernel-owner@vger.kernel.org To: =?utf-8?B?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?= Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, Jan 25, 2012 at 11:39:10AM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 25, 2012 at 04:20:26PM +0600, =D0=9C=D0=B0=D1=80=D0=BA =D0= =9A=D0=BE=D1=80=D0=B5=D0=BD=D0=B1=D0=B5=D1=80=D0=B3 wrote: > > First, maintainer's addresses (Ryan Wilson , > > Chris Bookholt ) are wrong (users unknown to > > remote mailsystem), so posting to you: >=20 > Those are the authors ones.. If you do: > konrad@phenom:~/work/linux$ scripts/get_maintainer.pl -f drivers/xen/= xen-pciback/pci_stub.c > Konrad Rzeszutek Wilk (supporter:XEN HYPERVI= SOR IN...,commit_signer:11/11=3D100%) > Jeremy Fitzhardinge (supporter:XEN HYPERVISOR IN...= ,commit_signer:2/11=3D18%) > Jan Beulich (commit_signer:1/11=3D9%) > xen-devel@lists.xensource.com (open list:XEN HYPERVISOR IN...) > virtualization@lists.linux-foundation.org (open list:XEN HYPERVISOR I= N...) > linux-kernel@vger.kernel.org (open list) >=20 > >=20 > > PCI bus format strings are wrong. > >=20 > > "%04x:%02x:%02x.%d" > >=20 > > should be used instead of > >=20 > > "%04x:%02x:%02x.%1x" >=20 > Oh? Would you be willing to come up with a patch with your SOB, pleas= e? Actually I think it is something like this: But we still need something= for the protocol.. =46rom e7d7514133427134d186b58b842ecd6beda3bf03 Mon Sep 17 00:00:00 200= 1 =46rom: Konrad Rzeszutek Wilk Date: Wed, 25 Jan 2012 16:00:00 -0500 Subject: [PATCH] xen/pci[front|back]: Use %d instead of %1x for display= ing PCI devfn. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit =2E. as the rest of the kernel is using that format. Suggested-by: =D0=9C=D0=B0=D1=80=D0=BA =D0=9A=D0=BE=D1=80=D0=B5=D0=BD=D0= =B1=D0=B5=D1=80=D0=B3 Signed-off-by: Konrad Rzeszutek Wilk --- drivers/pci/xen-pcifront.c | 10 +++++----- drivers/xen/xen-pciback/pci_stub.c | 8 ++++---- drivers/xen/xen-pciback/xenbus.c | 7 ++++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7cf3d2f..1620088 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -189,7 +189,7 @@ static int pcifront_bus_read(struct pci_bus *bus, u= nsigned int devfn, =20 if (verbose_request) dev_info(&pdev->xdev->dev, - "read dev=3D%04x:%02x:%02x.%01x - offset %x size %d\n", + "read dev=3D%04x:%02x:%02x.%d - offset %x size %d\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, size); =20 @@ -228,7 +228,7 @@ static int pcifront_bus_write(struct pci_bus *bus, = unsigned int devfn, =20 if (verbose_request) dev_info(&pdev->xdev->dev, - "write dev=3D%04x:%02x:%02x.%01x - " + "write dev=3D%04x:%02x:%02x.%d - " "offset %x size %d val %x\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); @@ -432,7 +432,7 @@ static int __devinit pcifront_scan_bus(struct pcifr= ont_device *pdev, d =3D pci_scan_single_device(b, devfn); if (d) dev_info(&pdev->xdev->dev, "New device on " - "%04x:%02x:%02x.%02x found.\n", domain, bus, + "%04x:%02x:%02x.%d found.\n", domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); } =20 @@ -1041,7 +1041,7 @@ static int pcifront_detach_devices(struct pcifron= t_device *pdev) pci_dev =3D pci_get_slot(pci_bus, PCI_DEVFN(slot, func)); if (!pci_dev) { dev_dbg(&pdev->xdev->dev, - "Cannot get PCI device %04x:%02x:%02x.%02x\n", + "Cannot get PCI device %04x:%02x:%02x.%d\n", domain, bus, slot, func); continue; } @@ -1049,7 +1049,7 @@ static int pcifront_detach_devices(struct pcifron= t_device *pdev) pci_dev_put(pci_dev); =20 dev_dbg(&pdev->xdev->dev, - "PCI device %04x:%02x:%02x.%02x removed.\n", + "PCI device %04x:%02x:%02x.%d removed.\n", domain, bus, slot, func); } =20 diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciba= ck/pci_stub.c index 6f63b9d..097e536 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c @@ -919,7 +919,7 @@ static inline int str_to_quirk(const char *buf, int= *domain, int *bus, int int err; =20 err =3D - sscanf(buf, " %04x:%02x:%02x.%1x-%08x:%1x:%08x", domain, bus, slo= t, + sscanf(buf, " %04x:%02x:%02x.%d-%08x:%1x:%08x", domain, bus, slot= , func, reg, size, mask); if (err =3D=3D 7) return 0; @@ -939,7 +939,7 @@ static int pcistub_device_id_add(int domain, int bu= s, int slot, int func) pci_dev_id->bus =3D bus; pci_dev_id->devfn =3D PCI_DEVFN(slot, func); =20 - pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%01x\n", + pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%d\n", domain, bus, slot, func); =20 spin_lock_irqsave(&device_ids_lock, flags); @@ -969,7 +969,7 @@ static int pcistub_device_id_remove(int domain, int= bus, int slot, int func) =20 err =3D 0; =20 - pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%01x from " + pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%d from " "seize list\n", domain, bus, slot, func); } } @@ -1064,7 +1064,7 @@ static ssize_t pcistub_slot_show(struct device_dr= iver *drv, char *buf) break; =20 count +=3D scnprintf(buf + count, PAGE_SIZE - count, - "%04x:%02x:%02x.%01x\n", + "%04x:%02x:%02x.%d\n", pci_dev_id->domain, pci_dev_id->bus, PCI_SLOT(pci_dev_id->devfn), PCI_FUNC(pci_dev_id->devfn)); diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback= /xenbus.c index d5dcf8d..9b2f705 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c @@ -206,8 +206,9 @@ static int xen_pcibk_publish_pci_dev(struct xen_pci= bk_device *pdev, goto out; } =20 + /* TODO: implement feature-use-decimal-for-devfn */ err =3D xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, - "%04x:%02x:%02x.%02x", domain, bus, + "%04x:%02x:%02x.%1x", domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); =20 out: @@ -229,7 +230,7 @@ static int xen_pcibk_export_device(struct xen_pcibk= _device *pdev, err =3D -EINVAL; xenbus_dev_fatal(pdev->xdev, err, "Couldn't locate PCI device " - "(%04x:%02x:%02x.%01x)! " + "(%04x:%02x:%02x.%d)! " "perhaps already in-use?", domain, bus, slot, func); goto out; @@ -274,7 +275,7 @@ static int xen_pcibk_remove_device(struct xen_pcibk= _device *pdev, if (!dev) { err =3D -EINVAL; dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " - "(%04x:%02x:%02x.%01x)! not owned by this domain\n", + "(%04x:%02x:%02x.%d)! not owned by this domain\n", domain, bus, slot, func); goto out; } --=20 1.7.7.5