提交 30087baf 编写于 作者: V Vasily Averin 提交者: Linus Torvalds

[PATCH] i2o_dump_hrt() output cleanup

This patch fixes i2o_dump_hrt output from dmesg:

iop0: HRT has 1 entries of 16 bytes each.
Adapter 00000012: <7>TID 0000:[<7>H<7>P<7>C<7>*<7>]:<7>PCI 1: Bus 1 Device 22
Function 0<7>
Signed-off-by: NVasily Averin <vvs@sw.ru>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6e692ed3
...@@ -419,58 +419,53 @@ void i2o_dump_hrt(struct i2o_controller *c) ...@@ -419,58 +419,53 @@ void i2o_dump_hrt(struct i2o_controller *c)
d = (u8 *) (rows + 2); d = (u8 *) (rows + 2);
state = p[1] << 8 | p[0]; state = p[1] << 8 | p[0];
printk(KERN_DEBUG "TID %04X:[", state & 0xFFF); printk("TID %04X:[", state & 0xFFF);
state >>= 12; state >>= 12;
if (state & (1 << 0)) if (state & (1 << 0))
printk(KERN_DEBUG "H"); /* Hidden */ printk("H"); /* Hidden */
if (state & (1 << 2)) { if (state & (1 << 2)) {
printk(KERN_DEBUG "P"); /* Present */ printk("P"); /* Present */
if (state & (1 << 1)) if (state & (1 << 1))
printk(KERN_DEBUG "C"); /* Controlled */ printk("C"); /* Controlled */
} }
if (state > 9) if (state > 9)
printk(KERN_DEBUG "*"); /* Hard */ printk("*"); /* Hard */
printk(KERN_DEBUG "]:"); printk("]:");
switch (p[3] & 0xFFFF) { switch (p[3] & 0xFFFF) {
case 0: case 0:
/* Adapter private bus - easy */ /* Adapter private bus - easy */
printk(KERN_DEBUG printk("Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2],
"Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2],
d[1] << 8 | d[0], *(u32 *) (d + 4)); d[1] << 8 | d[0], *(u32 *) (d + 4));
break; break;
case 1: case 1:
/* ISA bus */ /* ISA bus */
printk(KERN_DEBUG printk("ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2],
"ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2],
d[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); d[2], d[1] << 8 | d[0], *(u32 *) (d + 4));
break; break;
case 2: /* EISA bus */ case 2: /* EISA bus */
printk(KERN_DEBUG printk("EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X",
"EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X",
p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4));
break; break;
case 3: /* MCA bus */ case 3: /* MCA bus */
printk(KERN_DEBUG printk("MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2],
"MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2],
d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); d[3], d[1] << 8 | d[0], *(u32 *) (d + 4));
break; break;
case 4: /* PCI bus */ case 4: /* PCI bus */
printk(KERN_DEBUG printk("PCI %d: Bus %d Device %d Function %d", p[2],
"PCI %d: Bus %d Device %d Function %d", p[2],
d[2], d[1], d[0]); d[2], d[1], d[0]);
break; break;
case 0x80: /* Other */ case 0x80: /* Other */
default: default:
printk(KERN_DEBUG "Unsupported bus type."); printk("Unsupported bus type.");
break; break;
} }
printk(KERN_DEBUG "\n"); printk("\n");
rows += length; rows += length;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册