aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/debug.c
diff options
context:
space:
mode:
authorVasily Averin <vvs@sw.ru>2006-03-25 06:08:03 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:22:58 -0500
commit30087baf8810cd96b0ca2858993f29a89965ffff (patch)
tree08bfc281e539fbb88309784bec3ba9d2460e8027 /drivers/message/i2o/debug.c
parent6e692ed37a507e18d8afe8e5faebd8c4722c5f12 (diff)
[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: Vasily Averin <vvs@sw.ru> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/debug.c')
-rw-r--r--drivers/message/i2o/debug.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c
index 40d4ea898dbc..5a6cca8e8c45 100644
--- a/drivers/message/i2o/debug.c
+++ b/drivers/message/i2o/debug.c
@@ -419,58 +419,53 @@ void i2o_dump_hrt(struct i2o_controller *c)
419 d = (u8 *) (rows + 2); 419 d = (u8 *) (rows + 2);
420 state = p[1] << 8 | p[0]; 420 state = p[1] << 8 | p[0];
421 421
422 printk(KERN_DEBUG "TID %04X:[", state & 0xFFF); 422 printk("TID %04X:[", state & 0xFFF);
423 state >>= 12; 423 state >>= 12;
424 if (state & (1 << 0)) 424 if (state & (1 << 0))
425 printk(KERN_DEBUG "H"); /* Hidden */ 425 printk("H"); /* Hidden */
426 if (state & (1 << 2)) { 426 if (state & (1 << 2)) {
427 printk(KERN_DEBUG "P"); /* Present */ 427 printk("P"); /* Present */
428 if (state & (1 << 1)) 428 if (state & (1 << 1))
429 printk(KERN_DEBUG "C"); /* Controlled */ 429 printk("C"); /* Controlled */
430 } 430 }
431 if (state > 9) 431 if (state > 9)
432 printk(KERN_DEBUG "*"); /* Hard */ 432 printk("*"); /* Hard */
433 433
434 printk(KERN_DEBUG "]:"); 434 printk("]:");
435 435
436 switch (p[3] & 0xFFFF) { 436 switch (p[3] & 0xFFFF) {
437 case 0: 437 case 0:
438 /* Adapter private bus - easy */ 438 /* Adapter private bus - easy */
439 printk(KERN_DEBUG 439 printk("Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2],
440 "Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2],
441 d[1] << 8 | d[0], *(u32 *) (d + 4)); 440 d[1] << 8 | d[0], *(u32 *) (d + 4));
442 break; 441 break;
443 case 1: 442 case 1:
444 /* ISA bus */ 443 /* ISA bus */
445 printk(KERN_DEBUG 444 printk("ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2],
446 "ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2],
447 d[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); 445 d[2], d[1] << 8 | d[0], *(u32 *) (d + 4));
448 break; 446 break;
449 447
450 case 2: /* EISA bus */ 448 case 2: /* EISA bus */
451 printk(KERN_DEBUG 449 printk("EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X",
452 "EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X",
453 p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); 450 p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4));
454 break; 451 break;
455 452
456 case 3: /* MCA bus */ 453 case 3: /* MCA bus */
457 printk(KERN_DEBUG 454 printk("MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2],
458 "MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2],
459 d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); 455 d[3], d[1] << 8 | d[0], *(u32 *) (d + 4));
460 break; 456 break;
461 457
462 case 4: /* PCI bus */ 458 case 4: /* PCI bus */
463 printk(KERN_DEBUG 459 printk("PCI %d: Bus %d Device %d Function %d", p[2],
464 "PCI %d: Bus %d Device %d Function %d", p[2],
465 d[2], d[1], d[0]); 460 d[2], d[1], d[0]);
466 break; 461 break;
467 462
468 case 0x80: /* Other */ 463 case 0x80: /* Other */
469 default: 464 default:
470 printk(KERN_DEBUG "Unsupported bus type."); 465 printk("Unsupported bus type.");
471 break; 466 break;
472 } 467 }
473 printk(KERN_DEBUG "\n"); 468 printk("\n");
474 rows += length; 469 rows += length;
475 } 470 }
476} 471}