PNP: improve resource assignment debug
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Fri, 27 Jun 2008 22:57:07 +0000 (16:57 -0600)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:06 +0000 (23:27 +0200)
When we fail to assign an I/O or MEM resource, include the min/max
in the debug output to help match it with the options.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/pnp/manager.c

index e758dd2..c706dd2 100644 (file)
@@ -47,7 +47,10 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
                res->start += rule->align;
                res->end = res->start + rule->size - 1;
                if (res->start > rule->max || !rule->align) {
-                       dev_dbg(&dev->dev, "  couldn't assign io %d\n", idx);
+                       dev_dbg(&dev->dev, "  couldn't assign io %d "
+                               "(min %#llx max %#llx)\n", idx,
+                               (unsigned long long) rule->min,
+                               (unsigned long long) rule->max);
                        return 0;
                }
        }
@@ -96,7 +99,10 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
                res->start += rule->align;
                res->end = res->start + rule->size - 1;
                if (res->start > rule->max || !rule->align) {
-                       dev_dbg(&dev->dev, "  couldn't assign mem %d\n", idx);
+                       dev_dbg(&dev->dev, "  couldn't assign mem %d "
+                               "(min %#llx max %#llx)\n", idx,
+                               (unsigned long long) rule->min,
+                               (unsigned long long) rule->max);
                        return 0;
                }
        }