mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-17 12:08:43 +00:00
gigaset: correct debugging output selection
Dump payload data consistently only when DEBUG_STREAM_DUMP debug bit is set. Impact: debugging aid Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b5f581d55f
commit
cd7f50e251
1 changed files with 6 additions and 3 deletions
|
@ -429,7 +429,7 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_bytes(DEBUG_STREAM, "snd data", in, count);
|
dump_bytes(DEBUG_STREAM_DUMP, "snd data", in, count);
|
||||||
|
|
||||||
/* bitstuff and checksum input data */
|
/* bitstuff and checksum input data */
|
||||||
fcs = PPP_INITFCS;
|
fcs = PPP_INITFCS;
|
||||||
|
@ -448,7 +448,6 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
|
||||||
/* put closing flag and repeat byte for flag idle */
|
/* put closing flag and repeat byte for flag idle */
|
||||||
isowbuf_putflag(iwb);
|
isowbuf_putflag(iwb);
|
||||||
end = isowbuf_donewrite(iwb);
|
end = isowbuf_donewrite(iwb);
|
||||||
dump_bytes(DEBUG_STREAM_DUMP, "isowbuf", iwb->data, end + 1);
|
|
||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,6 +481,8 @@ static inline int trans_buildframe(struct isowbuf_t *iwb,
|
||||||
}
|
}
|
||||||
|
|
||||||
gig_dbg(DEBUG_STREAM, "put %d bytes", count);
|
gig_dbg(DEBUG_STREAM, "put %d bytes", count);
|
||||||
|
dump_bytes(DEBUG_STREAM_DUMP, "snd data", in, count);
|
||||||
|
|
||||||
write = iwb->write;
|
write = iwb->write;
|
||||||
do {
|
do {
|
||||||
c = bitrev8(*in++);
|
c = bitrev8(*in++);
|
||||||
|
@ -583,7 +584,7 @@ static inline void hdlc_done(struct bc_state *bcs)
|
||||||
procskb->tail -= 2;
|
procskb->tail -= 2;
|
||||||
gig_dbg(DEBUG_ISO, "%s: good frame (%d octets)",
|
gig_dbg(DEBUG_ISO, "%s: good frame (%d octets)",
|
||||||
__func__, procskb->len);
|
__func__, procskb->len);
|
||||||
dump_bytes(DEBUG_STREAM,
|
dump_bytes(DEBUG_STREAM_DUMP,
|
||||||
"rcv data", procskb->data, procskb->len);
|
"rcv data", procskb->data, procskb->len);
|
||||||
bcs->hw.bas->goodbytes += procskb->len;
|
bcs->hw.bas->goodbytes += procskb->len;
|
||||||
gigaset_rcv_skb(procskb, bcs->cs, bcs);
|
gigaset_rcv_skb(procskb, bcs->cs, bcs);
|
||||||
|
@ -878,6 +879,8 @@ static inline void trans_receive(unsigned char *src, unsigned count,
|
||||||
dobytes--;
|
dobytes--;
|
||||||
}
|
}
|
||||||
if (dobytes == 0) {
|
if (dobytes == 0) {
|
||||||
|
dump_bytes(DEBUG_STREAM_DUMP,
|
||||||
|
"rcv data", skb->data, skb->len);
|
||||||
gigaset_rcv_skb(skb, bcs->cs, bcs);
|
gigaset_rcv_skb(skb, bcs->cs, bcs);
|
||||||
bcs->skb = skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN);
|
bcs->skb = skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN);
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue