diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-09-19 21:12:19 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-09-19 21:12:19 +0000 |
commit | df6baa426c8022150f3bcf31f5207c7bcb2c2461 (patch) | |
tree | 5faa965ea65c61c1b7c530d8e3d70c13e6c2f266 /sys/dev/cxgb | |
parent | 40389ddc0408f61035afc11ebe0aa6b46dda5a54 (diff) | |
download | FreeBSD-src-df6baa426c8022150f3bcf31f5207c7bcb2c2461.zip FreeBSD-src-df6baa426c8022150f3bcf31f5207c7bcb2c2461.tar.gz |
Fix issue with tom loading by moving cxgb_log_tcb in to tom
MFC after: 3 days
Diffstat (limited to 'sys/dev/cxgb')
-rw-r--r-- | sys/dev/cxgb/cxgb_osdep.h | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_defs.h | 1 | ||||
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_tom.c | 29 |
3 files changed, 30 insertions, 1 deletions
diff --git a/sys/dev/cxgb/cxgb_osdep.h b/sys/dev/cxgb/cxgb_osdep.h index 8f5404e..96072bb 100644 --- a/sys/dev/cxgb/cxgb_osdep.h +++ b/sys/dev/cxgb/cxgb_osdep.h @@ -92,7 +92,6 @@ struct t3_mbuf_hdr { #define m_get_socket(m) ((m)->m_pkthdr.header) #define KTR_CXGB KTR_SPARE2 -void cxgb_log_tcb(struct adapter *sc, unsigned int tid); #define MT_DONTFREE 128 diff --git a/sys/dev/cxgb/ulp/tom/cxgb_defs.h b/sys/dev/cxgb/ulp/tom/cxgb_defs.h index 8c14f5a..758f024 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_defs.h +++ b/sys/dev/cxgb/ulp/tom/cxgb_defs.h @@ -49,6 +49,7 @@ $FreeBSD$ struct toepcb; struct listen_ctx; +void cxgb_log_tcb(struct adapter *sc, unsigned int tid); typedef void (*defer_handler_t)(struct toedev *dev, struct mbuf *m); void t3tom_register_cpl_handler(unsigned int opcode, cxgb_cpl_handler_func h); diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tom.c b/sys/dev/cxgb/ulp/tom/cxgb_tom.c index 9c0b012..590394b 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_tom.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_tom.c @@ -145,6 +145,35 @@ struct cxgb_client t3c_tom_client = { .redirect = NULL }; +void +cxgb_log_tcb(struct adapter *sc, unsigned int tid) +{ + + char buf[TCB_SIZE]; + uint64_t *tcb = (uint64_t *)buf; + int i, error; + struct mc7 *mem = &sc->cm; + + error = t3_mc7_bd_read(mem, tid*TCB_SIZE/8, TCB_SIZE/8, tcb); + if (error) + printf("cxgb_tcb_log failed\n"); + + + CTR1(KTR_CXGB, "TCB tid=%u", tid); + for (i = 0; i < TCB_SIZE / 32; i++) { + + CTR5(KTR_CXGB, "%1d: %08x %08x %08x %08x", + i, (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), + (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); + + tcb += 2; + CTR4(KTR_CXGB, " %08x %08x %08x %08x", + (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), + (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); + tcb += 2; + } +} + /* * Add an skb to the deferred skb queue for processing from process context. */ |