Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9519
b: refs/heads/master
c: db2fd66
h: refs/heads/master
i:
  9517: d03afd6
  9515: daacc3c
  9511: 2f1a9c7
  9503: 9f9b728
v: v3
  • Loading branch information
Jody McIntyre authored and Linus Torvalds committed Sep 30, 2005
1 parent 75fc44a commit 42b1d98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e31a127c2f99b9cb9abc99a1ec22b75194890800
refs/heads/master: db2fd664f8ac3664dfd94d624c0a871bee937bd5
32 changes: 10 additions & 22 deletions trunk/drivers/ieee1394/ieee1394_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,23 @@ const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S32
struct class *hpsb_protocol_class;

#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
static void dump_packet(const char *text, quadlet_t *data, int size)
static void dump_packet(const char *text, quadlet_t *data, int size, int speed)
{
int i;

size /= 4;
size = (size > 4 ? 4 : size);

printk(KERN_DEBUG "ieee1394: %s", text);
if (speed > -1 && speed < 6)
printk(" at %s", hpsb_speedto_str[speed]);
printk(":");
for (i = 0; i < size; i++)
printk(" %08x", data[i]);
printk("\n");
}
#else
#define dump_packet(x,y,z)
#define dump_packet(a,b,c,d)
#endif

static void abort_requests(struct hpsb_host *host);
Expand Down Expand Up @@ -544,8 +547,7 @@ int hpsb_send_packet(struct hpsb_packet *packet)
if (packet->data_size)
memcpy(((u8*)data) + packet->header_size, packet->data, packet->data_size);

dump_packet("send packet local:", packet->header,
packet->header_size);
dump_packet("send packet local", packet->header, packet->header_size, -1);

hpsb_packet_sent(host, packet, packet->expect_response ? ACK_PENDING : ACK_COMPLETE);
hpsb_packet_received(host, data, size, 0);
Expand All @@ -561,21 +563,7 @@ int hpsb_send_packet(struct hpsb_packet *packet)
+ NODEID_TO_NODE(packet->node_id)];
}

#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
switch (packet->speed_code) {
case 2:
dump_packet("send packet 400:", packet->header,
packet->header_size);
break;
case 1:
dump_packet("send packet 200:", packet->header,
packet->header_size);
break;
default:
dump_packet("send packet 100:", packet->header,
packet->header_size);
}
#endif
dump_packet("send packet", packet->header, packet->header_size, packet->speed_code);

return host->driver->transmit_packet(host, packet);
}
Expand Down Expand Up @@ -636,7 +624,7 @@ static void handle_packet_response(struct hpsb_host *host, int tcode,

if (packet == NULL) {
HPSB_DEBUG("unsolicited response packet received - no tlabel match");
dump_packet("contents:", data, 16);
dump_packet("contents", data, 16, -1);
spin_unlock_irqrestore(&host->pending_packet_queue.lock, flags);
return;
}
Expand Down Expand Up @@ -677,7 +665,7 @@ static void handle_packet_response(struct hpsb_host *host, int tcode,
if (!tcode_match) {
spin_unlock_irqrestore(&host->pending_packet_queue.lock, flags);
HPSB_INFO("unsolicited response packet received - tcode mismatch");
dump_packet("contents:", data, 16);
dump_packet("contents", data, 16, -1);
return;
}

Expand Down Expand Up @@ -914,7 +902,7 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size,
return;
}

dump_packet("received packet:", data, size);
dump_packet("received packet", data, size, -1);

tcode = (data[0] >> 4) & 0xf;

Expand Down

0 comments on commit 42b1d98

Please sign in to comment.