Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2008 08:07:01 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 135020 for review
Message-ID:  <200802080807.m188710G002099@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/fcntl.h>
+#include <sys/ktr.h>
 #include <sys/limits.h>
 #include <sys/lock.h>
 #include <sys/eventhandler.h>
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802080807.m188710G002099>