Browse Source

Cleaned up some debug messages.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
32a7bbb1e3
2 changed files with 15 additions and 34 deletions
  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 View File

322
  	static uint32_t tid = 0;
322
  	static uint32_t tid = 0;
323
 	int rc;
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
 	/* Allocate I/O buffer */
325
 	/* Allocate I/O buffer */
336
 	iobuf = alloc_iob ( sizeof ( *path_record ) );
326
 	iobuf = alloc_iob ( sizeof ( *path_record ) );
337
 	if ( ! iobuf )
327
 	if ( ! iobuf )
513
 		/* Update path cache */
503
 		/* Update path cache */
514
 		iob_put ( iobuf, completion->len );
504
 		iob_put ( iobuf, completion->len );
515
 		iob_pull ( iobuf, sizeof ( struct ib_global_route_header ) );
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
 		path_record = iobuf->data;
506
 		path_record = iobuf->data;
521
 		path = &ipoib_path_cache[ipoib_path_cache_idx];
507
 		path = &ipoib_path_cache[ipoib_path_cache_idx];
522
 		memcpy ( &path->gid, &path_record->dgid,
508
 		memcpy ( &path->gid, &path_record->dgid,
716
  */
702
  */
717
 void ipoib_remove ( struct ib_device *ibdev ) {
703
 void ipoib_remove ( struct ib_device *ibdev ) {
718
 	struct net_device *netdev = ib_get_ownerdata ( ibdev );
704
 	struct net_device *netdev = ib_get_ownerdata ( ibdev );
705
+	struct ipoib_device *ipoib = netdev->priv;
719
 
706
 
720
 	unregister_netdev ( netdev );
707
 	unregister_netdev ( netdev );
708
+	ipoib_destroy_qset ( ipoib, &ipoib->data );
709
+	ipoib_destroy_qset ( ipoib, &ipoib->meta );
721
 	netdev_nullify ( netdev );
710
 	netdev_nullify ( netdev );
722
 	netdev_put ( netdev );
711
 	netdev_put ( netdev );
723
 }
712
 }

+ 12
- 20
src/drivers/net/mlx_ipoib/mt25218.c View File

138
 	unsigned int i;
138
 	unsigned int i;
139
 	int rc;
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
 	/* Check that HCR is free */
146
 	/* Check that HCR is free */
147
 	if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
147
 	if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
168
 		     opcode, opcode,
168
 		     opcode, opcode,
169
 		     opcode_modifier, op_mod,
169
 		     opcode_modifier, op_mod,
170
 		     go, 1 );
170
 		     go, 1 );
171
-
172
-	DBG_HD ( &hcr, sizeof ( hcr ) );
171
+	DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
173
 	if ( in_len ) {
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
 	/* Issue command */
177
 	/* Issue command */
207
 	hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
203
 	hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
208
 	hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
204
 	hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
209
 	memcpy ( out, out_buffer, out_len );
205
 	memcpy ( out, out_buffer, out_len );
210
-
211
 	if ( out_len ) {
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
 	return 0;
211
 	return 0;
737
 				  union arbelprm_doorbell_register *db_reg,
729
 				  union arbelprm_doorbell_register *db_reg,
738
 				  unsigned int offset ) {
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
 	barrier();
736
 	barrier();
745
 	writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );
737
 	writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );

Loading…
Cancel
Save