Procházet zdrojové kódy

Cleaned up some debug messages.

tags/v0.9.3
Michael Brown před 17 roky
rodič
revize
32a7bbb1e3
2 změnil soubory, kde provedl 15 přidání a 34 odebrání
  1. 3
    14
      src/drivers/net/ipoib.c
  2. 12
    20
      src/drivers/net/mlx_ipoib/mt25218.c

+ 3
- 14
src/drivers/net/ipoib.c Zobrazit soubor

@@ -322,16 +322,6 @@ static int ipoib_get_path_record ( struct ipoib_device *ipoib,
322 322
  	static uint32_t tid = 0;
323 323
 	int rc;
324 324
 
325
-	int get_path_record(struct ib_gid *dgid, uint16_t *dlid_p,
326
-			    uint8_t *sl_p, uint8_t *rate_p);
327
-	uint16_t tmp_dlid;
328
-	uint8_t tmp_sl;
329
-	uint8_t tmp_rate;
330
-	get_path_record ( gid, &tmp_dlid, &tmp_sl, &tmp_rate );
331
-	DBG ( "get_path_record() gives dlid = %04x, sl = %02x, rate = %02x\n",
332
-	      tmp_dlid, tmp_sl, tmp_rate );
333
-
334
-
335 325
 	/* Allocate I/O buffer */
336 326
 	iobuf = alloc_iob ( sizeof ( *path_record ) );
337 327
 	if ( ! iobuf )
@@ -513,10 +503,6 @@ static void ipoib_meta_complete_recv ( struct ib_device *ibdev __unused,
513 503
 		/* Update path cache */
514 504
 		iob_put ( iobuf, completion->len );
515 505
 		iob_pull ( iobuf, sizeof ( struct ib_global_route_header ) );
516
-
517
-		DBG ( "Metadata RX:\n" );
518
-		DBG_HD ( iobuf->data, iob_len ( iobuf ) );
519
-
520 506
 		path_record = iobuf->data;
521 507
 		path = &ipoib_path_cache[ipoib_path_cache_idx];
522 508
 		memcpy ( &path->gid, &path_record->dgid,
@@ -716,8 +702,11 @@ int ipoib_probe ( struct ib_device *ibdev ) {
716 702
  */
717 703
 void ipoib_remove ( struct ib_device *ibdev ) {
718 704
 	struct net_device *netdev = ib_get_ownerdata ( ibdev );
705
+	struct ipoib_device *ipoib = netdev->priv;
719 706
 
720 707
 	unregister_netdev ( netdev );
708
+	ipoib_destroy_qset ( ipoib, &ipoib->data );
709
+	ipoib_destroy_qset ( ipoib, &ipoib->meta );
721 710
 	netdev_nullify ( netdev );
722 711
 	netdev_put ( netdev );
723 712
 }

+ 12
- 20
src/drivers/net/mlx_ipoib/mt25218.c Zobrazit soubor

@@ -138,10 +138,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
138 138
 	unsigned int i;
139 139
 	int rc;
140 140
 
141
-	DBGC ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
142
-	       arbel, opcode, in_len,
143
-	       ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
144
-	       ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
141
+	DBGC2 ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
142
+		arbel, opcode, in_len,
143
+		( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
144
+		( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
145 145
 
146 146
 	/* Check that HCR is free */
147 147
 	if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
@@ -168,14 +168,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
168 168
 		     opcode, opcode,
169 169
 		     opcode_modifier, op_mod,
170 170
 		     go, 1 );
171
-
172
-	DBG_HD ( &hcr, sizeof ( hcr ) );
171
+	DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
173 172
 	if ( in_len ) {
174
-		size_t dump_len = in_len;
175
-		if ( dump_len > 256 )
176
-			dump_len = 256;
177
-		//		DBG ( "Input:\n" );
178
-		//		DBG_HD ( in, dump_len );
173
+		DBGC2 ( arbel, "Input:\n" );
174
+		DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
179 175
 	}
180 176
 
181 177
 	/* Issue command */
@@ -207,13 +203,9 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
207 203
 	hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
208 204
 	hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
209 205
 	memcpy ( out, out_buffer, out_len );
210
-
211 206
 	if ( out_len ) {
212
-		size_t dump_len = out_len;
213
-		if ( dump_len > 256 )
214
-			dump_len = 256;
215
-		//		DBG ( "Output:\n" );
216
-		//		DBG_HD ( out, dump_len );
207
+		DBGC2 ( arbel, "Output:\n" );
208
+		DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
217 209
 	}
218 210
 
219 211
 	return 0;
@@ -737,9 +729,9 @@ static void arbel_ring_doorbell ( struct arbel *arbel,
737 729
 				  union arbelprm_doorbell_register *db_reg,
738 730
 				  unsigned int offset ) {
739 731
 
740
-	DBG ( "arbel_ring_doorbell %08lx:%08lx to %lx\n",
741
-	      db_reg->dword[0], db_reg->dword[1],
742
-	      virt_to_phys ( arbel->uar + offset ) );
732
+	DBGC2 ( arbel, "Arbel %p ringing doorbell %08lx:%08lx at %lx\n",
733
+		arbel, db_reg->dword[0], db_reg->dword[1],
734
+		virt_to_phys ( arbel->uar + offset ) );
743 735
 
744 736
 	barrier();
745 737
 	writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );

Načítá se…
Zrušit
Uložit