Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] ieee1394: fix for debug output

Fix debug code so it prints the correct speed (was defaulting to 100, so
anything > 400 showed only 100).

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Jody McIntyre and committed by
Linus Torvalds
db2fd664 e31a127c

+10 -22
+10 -22
drivers/ieee1394/ieee1394_core.c
··· 70 70 struct class *hpsb_protocol_class; 71 71 72 72 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG 73 - static void dump_packet(const char *text, quadlet_t *data, int size) 73 + static void dump_packet(const char *text, quadlet_t *data, int size, int speed) 74 74 { 75 75 int i; 76 76 ··· 78 78 size = (size > 4 ? 4 : size); 79 79 80 80 printk(KERN_DEBUG "ieee1394: %s", text); 81 + if (speed > -1 && speed < 6) 82 + printk(" at %s", hpsb_speedto_str[speed]); 83 + printk(":"); 81 84 for (i = 0; i < size; i++) 82 85 printk(" %08x", data[i]); 83 86 printk("\n"); 84 87 } 85 88 #else 86 - #define dump_packet(x,y,z) 89 + #define dump_packet(a,b,c,d) 87 90 #endif 88 91 89 92 static void abort_requests(struct hpsb_host *host); ··· 547 544 if (packet->data_size) 548 545 memcpy(((u8*)data) + packet->header_size, packet->data, packet->data_size); 549 546 550 - dump_packet("send packet local:", packet->header, 551 - packet->header_size); 547 + dump_packet("send packet local", packet->header, packet->header_size, -1); 552 548 553 549 hpsb_packet_sent(host, packet, packet->expect_response ? ACK_PENDING : ACK_COMPLETE); 554 550 hpsb_packet_received(host, data, size, 0); ··· 563 561 + NODEID_TO_NODE(packet->node_id)]; 564 562 } 565 563 566 - #ifdef CONFIG_IEEE1394_VERBOSEDEBUG 567 - switch (packet->speed_code) { 568 - case 2: 569 - dump_packet("send packet 400:", packet->header, 570 - packet->header_size); 571 - break; 572 - case 1: 573 - dump_packet("send packet 200:", packet->header, 574 - packet->header_size); 575 - break; 576 - default: 577 - dump_packet("send packet 100:", packet->header, 578 - packet->header_size); 579 - } 580 - #endif 564 + dump_packet("send packet", packet->header, packet->header_size, packet->speed_code); 581 565 582 566 return host->driver->transmit_packet(host, packet); 583 567 } ··· 624 636 625 637 if (packet == NULL) { 626 638 HPSB_DEBUG("unsolicited response packet received - no tlabel match"); 627 - dump_packet("contents:", data, 16); 639 + dump_packet("contents", data, 16, -1); 628 640 spin_unlock_irqrestore(&host->pending_packet_queue.lock, flags); 629 641 return; 630 642 } ··· 665 677 if (!tcode_match) { 666 678 spin_unlock_irqrestore(&host->pending_packet_queue.lock, flags); 667 679 HPSB_INFO("unsolicited response packet received - tcode mismatch"); 668 - dump_packet("contents:", data, 16); 680 + dump_packet("contents", data, 16, -1); 669 681 return; 670 682 } 671 683 ··· 902 914 return; 903 915 } 904 916 905 - dump_packet("received packet:", data, size); 917 + dump_packet("received packet", data, size, -1); 906 918 907 919 tcode = (data[0] >> 4) & 0xf; 908 920