Fix issue with tom loading by moving cxgb_log_tcb in to tom

MFC after:	3 days
This commit is contained in:
Kip Macy 2008-09-19 21:12:19 +00:00
parent d221204d90
commit 023d231918
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183199
3 changed files with 30 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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.
*/