lkml.org 
[lkml]   [2008]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 01/28] PNP: add detail to debug resource dump
In the debug resource dump, decode the flags and indicate when
a resource is disabled or has been automatically assigned.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work10/drivers/pnp/support.c
===================================================================
--- work10.orig/drivers/pnp/support.c 2008-05-02 11:18:50.000000000 -0600
+++ work10/drivers/pnp/support.c 2008-05-05 09:39:03.000000000 -0600
@@ -63,28 +63,46 @@ void dbg_pnp_show_resources(struct pnp_d
for (i = 0; i < PNP_MAX_IRQ; i++) {
res = pnp_get_resource(dev, IORESOURCE_IRQ, i);
if (res && !(res->flags & IORESOURCE_UNSET))
- dev_dbg(&dev->dev, " irq %lld flags %#lx\n",
- (unsigned long long) res->start, res->flags);
+ dev_dbg(&dev->dev, " irq %lld flags %#lx%s%s\n",
+ (unsigned long long) res->start, res->flags,
+ res->flags & IORESOURCE_DISABLED ?
+ " DISABLED" : "",
+ res->flags & IORESOURCE_AUTO ?
+ " AUTO" : "");
}
for (i = 0; i < PNP_MAX_DMA; i++) {
res = pnp_get_resource(dev, IORESOURCE_DMA, i);
if (res && !(res->flags & IORESOURCE_UNSET))
- dev_dbg(&dev->dev, " dma %lld flags %#lx\n",
- (unsigned long long) res->start, res->flags);
+ dev_dbg(&dev->dev, " dma %lld flags %#lx%s%s\n",
+ (unsigned long long) res->start, res->flags,
+ res->flags & IORESOURCE_DISABLED ?
+ " DISABLED" : "",
+ res->flags & IORESOURCE_AUTO ?
+ " AUTO" : "");
}
for (i = 0; i < PNP_MAX_PORT; i++) {
res = pnp_get_resource(dev, IORESOURCE_IO, i);
if (res && !(res->flags & IORESOURCE_UNSET))
- dev_dbg(&dev->dev, " io %#llx-%#llx flags %#lx\n",
+ dev_dbg(&dev->dev, " io %#llx-%#llx flags %#lx"
+ "%s%s\n",
(unsigned long long) res->start,
- (unsigned long long) res->end, res->flags);
+ (unsigned long long) res->end, res->flags,
+ res->flags & IORESOURCE_DISABLED ?
+ " DISABLED" : "",
+ res->flags & IORESOURCE_AUTO ?
+ " AUTO" : "");
}
for (i = 0; i < PNP_MAX_MEM; i++) {
res = pnp_get_resource(dev, IORESOURCE_MEM, i);
if (res && !(res->flags & IORESOURCE_UNSET))
- dev_dbg(&dev->dev, " mem %#llx-%#llx flags %#lx\n",
+ dev_dbg(&dev->dev, " mem %#llx-%#llx flags %#lx"
+ "%s%s\n",
(unsigned long long) res->start,
- (unsigned long long) res->end, res->flags);
+ (unsigned long long) res->end, res->flags,
+ res->flags & IORESOURCE_DISABLED ?
+ " DISABLED" : "",
+ res->flags & IORESOURCE_AUTO ?
+ " AUTO" : "");
}
#endif
}
--


\
 
 \ /
  Last update: 2008-06-18 01:03    [W:0.142 / U:1.412 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site