From owner-p4-projects@FreeBSD.ORG Fri Feb 8 08:07:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A51A116A421; Fri, 8 Feb 2008 08:07:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 526C616A418 for ; Fri, 8 Feb 2008 08:07:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4660813C469 for ; Fri, 8 Feb 2008 08:07:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m18871NA002102 for ; Fri, 8 Feb 2008 08:07:01 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m188710G002099 for perforce@freebsd.org; Fri, 8 Feb 2008 08:07:01 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 8 Feb 2008 08:07:01 GMT Message-Id: <200802080807.m188710G002099@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135020 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 08:07:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=135020 Change 135020 by kmacy@kmacy:storage:toehead on 2008/02/08 08:06:33 make sure ppod_map is zeroed confirm that KTR is logging Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tom.c#7 (text+ko) ==== @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -140,7 +141,7 @@ { struct toepcb *toep; - toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT); + toep = malloc(sizeof(struct toepcb), M_DEVBUF, M_NOWAIT|M_ZERO); if (toep == NULL) return (NULL); @@ -152,7 +153,6 @@ void toepcb_init(struct toepcb *toep) { - bzero(toep, sizeof(*toep)); toep->tp_refcount = 1; cv_init(&toep->tp_cv, "toep cv"); } @@ -203,9 +203,6 @@ struct toedev *tdev; struct adap_ports *port_info; - printf("%s called\n", __FUNCTION__); - - t = malloc(sizeof(*t), M_CXGB, M_NOWAIT|M_ZERO); if (t == NULL) @@ -353,6 +350,10 @@ t3_init_tunables(t); mtx_init(&t->listen_lock, "tom data listeners", NULL, MTX_DEF); + + printf("KTR_TOM=0x%x ktr_mask=0x%x KTR_COMPILE=0x%x doing test KTR entry now\n", KTR_TOM, ktr_mask, KTR_COMPILE); + CTR2(KTR_TOM, "t3_toe_attach dev=%p entry=%p", dev, entry); + /* Adjust TOE activation for this module */ t->conf.activated = activated; @@ -379,7 +380,7 @@ t->rx_page_size = rx_page_info.page_size; /* OK if this fails, we just can't do DDP */ t->nppods = (ddp.ulimit + 1 - ddp.llimit) / PPOD_SIZE; - t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK); + t->ppod_map = malloc(t->nppods, M_DEVBUF, M_WAITOK|M_ZERO); mtx_init(&t->ppod_map_lock, "ppod map", NULL, MTX_DEF); @@ -440,19 +441,7 @@ t3_tom_init(void) { -#if 0 - struct socket *sock; - err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); - if (err < 0) { - printk(KERN_ERR "Could not create TCP socket, error %d\n", err); - return err; - } - t3_def_state_change = sock->sk->sk_state_change; - t3_def_data_ready = sock->sk->sk_data_ready; - t3_def_error_report = sock->sk->sk_error_report; - sock_release(sock); -#endif init_cpl_handlers(); if (t3_init_cpl_io() < 0) return -1;