Browse Source

[xhci] Use meaningful device names in debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
91a4ad2466
2 changed files with 124 additions and 119 deletions
  1. 122
    119
      src/drivers/usb/xhci.c
  2. 2
    0
      src/drivers/usb/xhci.h

+ 122
- 119
src/drivers/usb/xhci.c View File

279
 	xhci->op = ( xhci->cap + caplength );
279
 	xhci->op = ( xhci->cap + caplength );
280
 	xhci->run = ( xhci->cap + rtsoff );
280
 	xhci->run = ( xhci->cap + rtsoff );
281
 	xhci->db = ( xhci->cap + dboff );
281
 	xhci->db = ( xhci->cap + dboff );
282
-	DBGC2 ( xhci, "XHCI %p cap %08lx op %08lx run %08lx db %08lx\n",
283
-		xhci, virt_to_phys ( xhci->cap ), virt_to_phys ( xhci->op ),
284
-		virt_to_phys ( xhci->run ), virt_to_phys ( xhci->db ) );
282
+	DBGC2 ( xhci, "XHCI %s cap %08lx op %08lx run %08lx db %08lx\n",
283
+		xhci->name, virt_to_phys ( xhci->cap ),
284
+		virt_to_phys ( xhci->op ), virt_to_phys ( xhci->run ),
285
+		virt_to_phys ( xhci->db ) );
285
 
286
 
286
 	/* Read structural parameters 1 */
287
 	/* Read structural parameters 1 */
287
 	hcsparams1 = readl ( xhci->cap + XHCI_CAP_HCSPARAMS1 );
288
 	hcsparams1 = readl ( xhci->cap + XHCI_CAP_HCSPARAMS1 );
288
 	xhci->slots = XHCI_HCSPARAMS1_SLOTS ( hcsparams1 );
289
 	xhci->slots = XHCI_HCSPARAMS1_SLOTS ( hcsparams1 );
289
 	xhci->intrs = XHCI_HCSPARAMS1_INTRS ( hcsparams1 );
290
 	xhci->intrs = XHCI_HCSPARAMS1_INTRS ( hcsparams1 );
290
 	xhci->ports = XHCI_HCSPARAMS1_PORTS ( hcsparams1 );
291
 	xhci->ports = XHCI_HCSPARAMS1_PORTS ( hcsparams1 );
291
-	DBGC ( xhci, "XHCI %p has %d slots %d intrs %d ports\n",
292
-	       xhci, xhci->slots, xhci->intrs, xhci->ports );
292
+	DBGC ( xhci, "XHCI %s has %d slots %d intrs %d ports\n",
293
+	       xhci->name, xhci->slots, xhci->intrs, xhci->ports );
293
 
294
 
294
 	/* Read structural parameters 2 */
295
 	/* Read structural parameters 2 */
295
 	hcsparams2 = readl ( xhci->cap + XHCI_CAP_HCSPARAMS2 );
296
 	hcsparams2 = readl ( xhci->cap + XHCI_CAP_HCSPARAMS2 );
296
 	xhci->scratchpads = XHCI_HCSPARAMS2_SCRATCHPADS ( hcsparams2 );
297
 	xhci->scratchpads = XHCI_HCSPARAMS2_SCRATCHPADS ( hcsparams2 );
297
-	DBGC2 ( xhci, "XHCI %p needs %d scratchpads\n",
298
-		xhci, xhci->scratchpads );
298
+	DBGC2 ( xhci, "XHCI %s needs %d scratchpads\n",
299
+		xhci->name, xhci->scratchpads );
299
 
300
 
300
 	/* Read capability parameters 1 */
301
 	/* Read capability parameters 1 */
301
 	hccparams1 = readl ( xhci->cap + XHCI_CAP_HCCPARAMS1 );
302
 	hccparams1 = readl ( xhci->cap + XHCI_CAP_HCCPARAMS1 );
308
 	xhci->pagesize = XHCI_PAGESIZE ( pagesize );
309
 	xhci->pagesize = XHCI_PAGESIZE ( pagesize );
309
 	assert ( xhci->pagesize != 0 );
310
 	assert ( xhci->pagesize != 0 );
310
 	assert ( ( ( xhci->pagesize ) & ( xhci->pagesize - 1 ) ) == 0 );
311
 	assert ( ( ( xhci->pagesize ) & ( xhci->pagesize - 1 ) ) == 0 );
311
-	DBGC2 ( xhci, "XHCI %p page size %zd bytes\n",
312
-		xhci, xhci->pagesize );
312
+	DBGC2 ( xhci, "XHCI %s page size %zd bytes\n",
313
+		xhci->name, xhci->pagesize );
313
 }
314
 }
314
 
315
 
315
 /**
316
 /**
371
 	 * address is outside the 32-bit address space, then fail.
372
 	 * address is outside the 32-bit address space, then fail.
372
 	 */
373
 	 */
373
 	if ( ( value & ~0xffffffffULL ) && ! xhci->addr64 ) {
374
 	if ( ( value & ~0xffffffffULL ) && ! xhci->addr64 ) {
374
-		DBGC ( xhci, "XHCI %p cannot access address %lx\n",
375
-		       xhci, value );
375
+		DBGC ( xhci, "XHCI %s cannot access address %lx\n",
376
+		       xhci->name, value );
376
 		return -ENOTSUP;
377
 		return -ENOTSUP;
377
 	}
378
 	}
378
 
379
 
452
 
453
 
453
 	/* Dump USBCMD */
454
 	/* Dump USBCMD */
454
 	usbcmd = readl ( xhci->op + XHCI_OP_USBCMD );
455
 	usbcmd = readl ( xhci->op + XHCI_OP_USBCMD );
455
-	DBGC ( xhci, "XHCI %p USBCMD %08x%s%s\n", xhci, usbcmd,
456
+	DBGC ( xhci, "XHCI %s USBCMD %08x%s%s\n", xhci->name, usbcmd,
456
 	       ( ( usbcmd & XHCI_USBCMD_RUN ) ? " run" : "" ),
457
 	       ( ( usbcmd & XHCI_USBCMD_RUN ) ? " run" : "" ),
457
 	       ( ( usbcmd & XHCI_USBCMD_HCRST ) ? " hcrst" : "" ) );
458
 	       ( ( usbcmd & XHCI_USBCMD_HCRST ) ? " hcrst" : "" ) );
458
 
459
 
459
 	/* Dump USBSTS */
460
 	/* Dump USBSTS */
460
 	usbsts = readl ( xhci->op + XHCI_OP_USBSTS );
461
 	usbsts = readl ( xhci->op + XHCI_OP_USBSTS );
461
-	DBGC ( xhci, "XHCI %p USBSTS %08x%s\n", xhci, usbsts,
462
+	DBGC ( xhci, "XHCI %s USBSTS %08x%s\n", xhci->name, usbsts,
462
 	       ( ( usbsts & XHCI_USBSTS_HCH ) ? " hch" : "" ) );
463
 	       ( ( usbsts & XHCI_USBSTS_HCH ) ? " hch" : "" ) );
463
 
464
 
464
 	/* Dump PAGESIZE */
465
 	/* Dump PAGESIZE */
465
 	pagesize = readl ( xhci->op + XHCI_OP_PAGESIZE );
466
 	pagesize = readl ( xhci->op + XHCI_OP_PAGESIZE );
466
-	DBGC ( xhci, "XHCI %p PAGESIZE %08x\n", xhci, pagesize );
467
+	DBGC ( xhci, "XHCI %s PAGESIZE %08x\n", xhci->name, pagesize );
467
 
468
 
468
 	/* Dump DNCTRL */
469
 	/* Dump DNCTRL */
469
 	dnctrl = readl ( xhci->op + XHCI_OP_DNCTRL );
470
 	dnctrl = readl ( xhci->op + XHCI_OP_DNCTRL );
470
-	DBGC ( xhci, "XHCI %p DNCTRL %08x\n", xhci, dnctrl );
471
+	DBGC ( xhci, "XHCI %s DNCTRL %08x\n", xhci->name, dnctrl );
471
 
472
 
472
 	/* Dump CONFIG */
473
 	/* Dump CONFIG */
473
 	config = readl ( xhci->op + XHCI_OP_CONFIG );
474
 	config = readl ( xhci->op + XHCI_OP_CONFIG );
474
-	DBGC ( xhci, "XHCI %p CONFIG %08x\n", xhci, config );
475
+	DBGC ( xhci, "XHCI %s CONFIG %08x\n", xhci->name, config );
475
 }
476
 }
476
 
477
 
477
 /**
478
 /**
493
 
494
 
494
 	/* Dump PORTSC */
495
 	/* Dump PORTSC */
495
 	portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port ) );
496
 	portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port ) );
496
-	DBGC ( xhci, "XHCI %p port %d PORTSC %08x%s%s%s%s psiv=%d\n",
497
-	       xhci, port, portsc,
497
+	DBGC ( xhci, "XHCI %s-%d PORTSC %08x%s%s%s%s psiv=%d\n",
498
+	       xhci->name, port, portsc,
498
 	       ( ( portsc & XHCI_PORTSC_CCS ) ? " ccs" : "" ),
499
 	       ( ( portsc & XHCI_PORTSC_CCS ) ? " ccs" : "" ),
499
 	       ( ( portsc & XHCI_PORTSC_PED ) ? " ped" : "" ),
500
 	       ( ( portsc & XHCI_PORTSC_PED ) ? " ped" : "" ),
500
 	       ( ( portsc & XHCI_PORTSC_PR ) ? " pr" : "" ),
501
 	       ( ( portsc & XHCI_PORTSC_PR ) ? " pr" : "" ),
503
 
504
 
504
 	/* Dump PORTPMSC */
505
 	/* Dump PORTPMSC */
505
 	portpmsc = readl ( xhci->op + XHCI_OP_PORTPMSC ( port ) );
506
 	portpmsc = readl ( xhci->op + XHCI_OP_PORTPMSC ( port ) );
506
-	DBGC ( xhci, "XHCI %p port %d PORTPMSC %08x\n", xhci, port, portpmsc );
507
+	DBGC ( xhci, "XHCI %s-%d PORTPMSC %08x\n", xhci->name, port, portpmsc );
507
 
508
 
508
 	/* Dump PORTLI */
509
 	/* Dump PORTLI */
509
 	portli = readl ( xhci->op + XHCI_OP_PORTLI ( port ) );
510
 	portli = readl ( xhci->op + XHCI_OP_PORTLI ( port ) );
510
-	DBGC ( xhci, "XHCI %p port %d PORTLI %08x\n", xhci, port, portli );
511
+	DBGC ( xhci, "XHCI %s-%d PORTLI %08x\n", xhci->name, port, portli );
511
 
512
 
512
 	/* Dump PORTHLPMC */
513
 	/* Dump PORTHLPMC */
513
 	porthlpmc = readl ( xhci->op + XHCI_OP_PORTHLPMC ( port ) );
514
 	porthlpmc = readl ( xhci->op + XHCI_OP_PORTHLPMC ( port ) );
514
-	DBGC ( xhci, "XHCI %p port %d PORTHLPMC %08x\n",
515
-	       xhci, port, porthlpmc );
515
+	DBGC ( xhci, "XHCI %s-%d PORTHLPMC %08x\n",
516
+	       xhci->name, port, porthlpmc );
516
 }
517
 }
517
 
518
 
518
 /******************************************************************************
519
 /******************************************************************************
538
 	legacy = xhci_extended_capability ( xhci, XHCI_XECP_ID_LEGACY, 0 );
539
 	legacy = xhci_extended_capability ( xhci, XHCI_XECP_ID_LEGACY, 0 );
539
 	if ( ! legacy ) {
540
 	if ( ! legacy ) {
540
 		/* Not an error; capability may not be present */
541
 		/* Not an error; capability may not be present */
541
-		DBGC ( xhci, "XHCI %p has no USB legacy support capability\n",
542
-		       xhci );
542
+		DBGC ( xhci, "XHCI %s has no USB legacy support capability\n",
543
+		       xhci->name );
543
 		return;
544
 		return;
544
 	}
545
 	}
545
 
546
 
547
 	bios = readb ( xhci->cap + legacy + XHCI_USBLEGSUP_BIOS );
548
 	bios = readb ( xhci->cap + legacy + XHCI_USBLEGSUP_BIOS );
548
 	if ( ! ( bios & XHCI_USBLEGSUP_BIOS_OWNED ) ) {
549
 	if ( ! ( bios & XHCI_USBLEGSUP_BIOS_OWNED ) ) {
549
 		/* Not an error; already owned by OS */
550
 		/* Not an error; already owned by OS */
550
-		DBGC ( xhci, "XHCI %p USB legacy support already disabled\n",
551
-		       xhci );
551
+		DBGC ( xhci, "XHCI %s USB legacy support already disabled\n",
552
+		       xhci->name );
552
 		return;
553
 		return;
553
 	}
554
 	}
554
 
555
 
580
 		/* Check if BIOS has released ownership */
581
 		/* Check if BIOS has released ownership */
581
 		bios = readb ( xhci->cap + xhci->legacy + XHCI_USBLEGSUP_BIOS );
582
 		bios = readb ( xhci->cap + xhci->legacy + XHCI_USBLEGSUP_BIOS );
582
 		if ( ! ( bios & XHCI_USBLEGSUP_BIOS_OWNED ) ) {
583
 		if ( ! ( bios & XHCI_USBLEGSUP_BIOS_OWNED ) ) {
583
-			DBGC ( xhci, "XHCI %p claimed ownership from BIOS\n",
584
-			       xhci );
584
+			DBGC ( xhci, "XHCI %s claimed ownership from BIOS\n",
585
+			       xhci->name );
585
 			ctlsts = readl ( xhci->cap + xhci->legacy +
586
 			ctlsts = readl ( xhci->cap + xhci->legacy +
586
 					 XHCI_USBLEGSUP_CTLSTS );
587
 					 XHCI_USBLEGSUP_CTLSTS );
587
 			if ( ctlsts ) {
588
 			if ( ctlsts ) {
588
-				DBGC ( xhci, "XHCI %p warning: BIOS retained "
589
-				       "SMIs: %08x\n", xhci, ctlsts );
589
+				DBGC ( xhci, "XHCI %s warning: BIOS retained "
590
+				       "SMIs: %08x\n", xhci->name, ctlsts );
590
 			}
591
 			}
591
 			return;
592
 			return;
592
 		}
593
 		}
598
 	/* BIOS did not release ownership.  Claim it forcibly by
599
 	/* BIOS did not release ownership.  Claim it forcibly by
599
 	 * disabling all SMIs.
600
 	 * disabling all SMIs.
600
 	 */
601
 	 */
601
-	DBGC ( xhci, "XHCI %p could not claim ownership from BIOS: forcibly "
602
-	       "disabling SMIs\n", xhci );
602
+	DBGC ( xhci, "XHCI %s could not claim ownership from BIOS: forcibly "
603
+	       "disabling SMIs\n", xhci->name );
603
 	writel ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_CTLSTS );
604
 	writel ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_CTLSTS );
604
 }
605
 }
605
 
606
 
616
 
617
 
617
 	/* Do nothing if releasing ownership is prevented */
618
 	/* Do nothing if releasing ownership is prevented */
618
 	if ( xhci_legacy_prevent_release ) {
619
 	if ( xhci_legacy_prevent_release ) {
619
-		DBGC ( xhci, "XHCI %p not releasing ownership to BIOS\n", xhci);
620
+		DBGC ( xhci, "XHCI %s not releasing ownership to BIOS\n",
621
+		       xhci->name );
620
 		return;
622
 		return;
621
 	}
623
 	}
622
 
624
 
623
 	/* Release ownership */
625
 	/* Release ownership */
624
 	writeb ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_OS );
626
 	writeb ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_OS );
625
-	DBGC ( xhci, "XHCI %p released ownership to BIOS\n", xhci );
627
+	DBGC ( xhci, "XHCI %s released ownership to BIOS\n", xhci->name );
626
 }
628
 }
627
 
629
 
628
 /******************************************************************************
630
 /******************************************************************************
683
 			return supported;
685
 			return supported;
684
 	}
686
 	}
685
 
687
 
686
-	DBGC ( xhci, "XHCI %p port %d has no supported protocol\n",
687
-	       xhci, port );
688
+	DBGC ( xhci, "XHCI %s-%d has no supported protocol\n",
689
+	       xhci->name, port );
688
 	return 0;
690
 	return 0;
689
 }
691
 }
690
 
692
 
727
 		name.text[4] = '\0';
729
 		name.text[4] = '\0';
728
 		slot = readl ( xhci->cap + supported + XHCI_SUPPORTED_SLOT );
730
 		slot = readl ( xhci->cap + supported + XHCI_SUPPORTED_SLOT );
729
 		type = XHCI_SUPPORTED_SLOT_TYPE ( slot );
731
 		type = XHCI_SUPPORTED_SLOT_TYPE ( slot );
730
-		DBGC2 ( xhci, "XHCI %p port %d %sv%04x type %d",
731
-			xhci, port, name.text, protocol, type );
732
+		DBGC2 ( xhci, "XHCI %s-%d %sv%04x type %d",
733
+			xhci->name, port, name.text, protocol, type );
732
 		ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
734
 		ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
733
 		psic = XHCI_SUPPORTED_PORTS_PSIC ( ports );
735
 		psic = XHCI_SUPPORTED_PORTS_PSIC ( ports );
734
 		if ( psic ) {
736
 		if ( psic ) {
805
 		case XHCI_SPEED_HIGH :	return USB_SPEED_HIGH;
807
 		case XHCI_SPEED_HIGH :	return USB_SPEED_HIGH;
806
 		case XHCI_SPEED_SUPER :	return USB_SPEED_SUPER;
808
 		case XHCI_SPEED_SUPER :	return USB_SPEED_SUPER;
807
 		default:
809
 		default:
808
-			DBGC ( xhci, "XHCI %p port %d non-standard PSI value "
809
-			       "%d\n", xhci, port, psiv );
810
+			DBGC ( xhci, "XHCI %s-%d non-standard PSI value %d\n",
811
+			       xhci->name, port, psiv );
810
 			return -ENOTSUP;
812
 			return -ENOTSUP;
811
 		}
813
 		}
812
 	}
814
 	}
822
 		}
824
 		}
823
 	}
825
 	}
824
 
826
 
825
-	DBGC ( xhci, "XHCI %p port %d spurious PSI value %d\n",
826
-	       xhci, port, psiv );
827
+	DBGC ( xhci, "XHCI %s-%d spurious PSI value %d\n",
828
+	       xhci->name, port, psiv );
827
 	return -ENOENT;
829
 	return -ENOENT;
828
 }
830
 }
829
 
831
 
862
 		case USB_SPEED_HIGH :	return XHCI_SPEED_HIGH;
864
 		case USB_SPEED_HIGH :	return XHCI_SPEED_HIGH;
863
 		case USB_SPEED_SUPER :	return XHCI_SPEED_SUPER;
865
 		case USB_SPEED_SUPER :	return XHCI_SPEED_SUPER;
864
 		default:
866
 		default:
865
-			DBGC ( xhci, "XHCI %p port %d non-standad speed %d\n",
866
-			       xhci, port, speed );
867
+			DBGC ( xhci, "XHCI %s-%d non-standad speed %d\n",
868
+			       xhci->name, port, speed );
867
 			return -ENOTSUP;
869
 			return -ENOTSUP;
868
 		}
870
 		}
869
 	}
871
 	}
879
 		}
881
 		}
880
 	}
882
 	}
881
 
883
 
882
-	DBGC ( xhci, "XHCI %p port %d unrepresentable speed %#x\n",
883
-	       xhci, port, speed );
884
+	DBGC ( xhci, "XHCI %s-%d unrepresentable speed %#x\n",
885
+	       xhci->name, port, speed );
884
 	return -ENOENT;
886
 	return -ENOENT;
885
 }
887
 }
886
 
888
 
910
 	len = ( ( xhci->slots + 1 ) * sizeof ( xhci->dcbaa[0] ) );
912
 	len = ( ( xhci->slots + 1 ) * sizeof ( xhci->dcbaa[0] ) );
911
 	xhci->dcbaa = malloc_dma ( len, xhci_align ( len ) );
913
 	xhci->dcbaa = malloc_dma ( len, xhci_align ( len ) );
912
 	if ( ! xhci->dcbaa ) {
914
 	if ( ! xhci->dcbaa ) {
913
-		DBGC ( xhci, "XHCI %p could not allocate DCBAA\n", xhci );
915
+		DBGC ( xhci, "XHCI %s could not allocate DCBAA\n", xhci->name );
914
 		rc = -ENOMEM;
916
 		rc = -ENOMEM;
915
 		goto err_alloc;
917
 		goto err_alloc;
916
 	}
918
 	}
922
 				  xhci->op + XHCI_OP_DCBAAP ) ) != 0 )
924
 				  xhci->op + XHCI_OP_DCBAAP ) ) != 0 )
923
 		goto err_writeq;
925
 		goto err_writeq;
924
 
926
 
925
-	DBGC2 ( xhci, "XHCI %p DCBAA at [%08lx,%08lx)\n",
926
-		xhci, dcbaap, ( dcbaap + len ) );
927
+	DBGC2 ( xhci, "XHCI %s DCBAA at [%08lx,%08lx)\n",
928
+		xhci->name, dcbaap, ( dcbaap + len ) );
927
 	return 0;
929
 	return 0;
928
 
930
 
929
  err_writeq:
931
  err_writeq:
981
 	len = ( xhci->scratchpads * xhci->pagesize );
983
 	len = ( xhci->scratchpads * xhci->pagesize );
982
 	xhci->scratchpad = umalloc ( len );
984
 	xhci->scratchpad = umalloc ( len );
983
 	if ( ! xhci->scratchpad ) {
985
 	if ( ! xhci->scratchpad ) {
984
-		DBGC ( xhci, "XHCI %p could not allocate scratchpad buffers\n",
985
-		       xhci );
986
+		DBGC ( xhci, "XHCI %s could not allocate scratchpad buffers\n",
987
+		       xhci->name );
986
 		rc = -ENOMEM;
988
 		rc = -ENOMEM;
987
 		goto err_alloc;
989
 		goto err_alloc;
988
 	}
990
 	}
993
 	xhci->scratchpad_array =
995
 	xhci->scratchpad_array =
994
 		malloc_dma ( array_len, xhci_align ( array_len ) );
996
 		malloc_dma ( array_len, xhci_align ( array_len ) );
995
 	if ( ! xhci->scratchpad_array ) {
997
 	if ( ! xhci->scratchpad_array ) {
996
-		DBGC ( xhci, "XHCI %p could not allocate scratchpad buffer "
997
-		       "array\n", xhci );
998
+		DBGC ( xhci, "XHCI %s could not allocate scratchpad buffer "
999
+		       "array\n", xhci->name );
998
 		rc = -ENOMEM;
1000
 		rc = -ENOMEM;
999
 		goto err_alloc_array;
1001
 		goto err_alloc_array;
1000
 	}
1002
 	}
1009
 	assert ( xhci->dcbaa != NULL );
1011
 	assert ( xhci->dcbaa != NULL );
1010
 	xhci->dcbaa[0] = cpu_to_le64 ( virt_to_phys ( xhci->scratchpad_array ));
1012
 	xhci->dcbaa[0] = cpu_to_le64 ( virt_to_phys ( xhci->scratchpad_array ));
1011
 
1013
 
1012
-	DBGC2 ( xhci, "XHCI %p scratchpad [%08lx,%08lx) array [%08lx,%08lx)\n",
1013
-		xhci, user_to_phys ( xhci->scratchpad, 0 ),
1014
+	DBGC2 ( xhci, "XHCI %s scratchpad [%08lx,%08lx) array [%08lx,%08lx)\n",
1015
+		xhci->name, user_to_phys ( xhci->scratchpad, 0 ),
1014
 		user_to_phys ( xhci->scratchpad, len ),
1016
 		user_to_phys ( xhci->scratchpad, len ),
1015
 		virt_to_phys ( xhci->scratchpad_array ),
1017
 		virt_to_phys ( xhci->scratchpad_array ),
1016
 		( virt_to_phys ( xhci->scratchpad_array ) + array_len ) );
1018
 		( virt_to_phys ( xhci->scratchpad_array ) + array_len ) );
1103
 		mdelay ( 1 );
1105
 		mdelay ( 1 );
1104
 	}
1106
 	}
1105
 
1107
 
1106
-	DBGC ( xhci, "XHCI %p timed out waiting for stop\n", xhci );
1108
+	DBGC ( xhci, "XHCI %s timed out waiting for stop\n", xhci->name );
1107
 	return -ETIMEDOUT;
1109
 	return -ETIMEDOUT;
1108
 }
1110
 }
1109
 
1111
 
1141
 		mdelay ( 1 );
1143
 		mdelay ( 1 );
1142
 	}
1144
 	}
1143
 
1145
 
1144
-	DBGC ( xhci, "XHCI %p timed out waiting for reset\n", xhci );
1146
+	DBGC ( xhci, "XHCI %s timed out waiting for reset\n", xhci->name );
1145
 	return -ETIMEDOUT;
1147
 	return -ETIMEDOUT;
1146
 }
1148
 }
1147
 
1149
 
1416
 				  xhci->op + XHCI_OP_CRCR ) ) != 0 )
1418
 				  xhci->op + XHCI_OP_CRCR ) ) != 0 )
1417
 		goto err_writeq;
1419
 		goto err_writeq;
1418
 
1420
 
1419
-	DBGC2 ( xhci, "XHCI %p CRCR at [%08lx,%08lx)\n",
1420
-		xhci, crp, ( crp + xhci->command.len ) );
1421
+	DBGC2 ( xhci, "XHCI %s CRCR at [%08lx,%08lx)\n",
1422
+		xhci->name, crp, ( crp + xhci->command.len ) );
1421
 	return 0;
1423
 	return 0;
1422
 
1424
 
1423
  err_writeq:
1425
  err_writeq:
1485
 				  xhci->run + XHCI_RUN_ERSTBA ( 0 ) ) ) != 0 )
1487
 				  xhci->run + XHCI_RUN_ERSTBA ( 0 ) ) ) != 0 )
1486
 		goto err_writeq_erstba;
1488
 		goto err_writeq_erstba;
1487
 
1489
 
1488
-	DBGC2 ( xhci, "XHCI %p event ring [%08lx,%08lx) table [%08lx,%08lx)\n",
1489
-		xhci, virt_to_phys ( event->trb ),
1490
+	DBGC2 ( xhci, "XHCI %s event ring [%08lx,%08lx) table [%08lx,%08lx)\n",
1491
+		xhci->name, virt_to_phys ( event->trb ),
1490
 		( virt_to_phys ( event->trb ) + len ),
1492
 		( virt_to_phys ( event->trb ) + len ),
1491
 		virt_to_phys ( event->segment ),
1493
 		virt_to_phys ( event->segment ),
1492
 		( virt_to_phys ( event->segment ) +
1494
 		( virt_to_phys ( event->segment ) +
1547
 	/* Identify slot */
1549
 	/* Identify slot */
1548
 	if ( ( trb->slot > xhci->slots ) ||
1550
 	if ( ( trb->slot > xhci->slots ) ||
1549
 	     ( ( slot = xhci->slot[trb->slot] ) == NULL ) ) {
1551
 	     ( ( slot = xhci->slot[trb->slot] ) == NULL ) ) {
1550
-		DBGC ( xhci, "XHCI %p transfer event invalid slot %d:\n",
1551
-		       xhci, trb->slot );
1552
+		DBGC ( xhci, "XHCI %s transfer event invalid slot %d:\n",
1553
+		       xhci->name, trb->slot );
1552
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1554
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1553
 		return;
1555
 		return;
1554
 	}
1556
 	}
1556
 	/* Identify endpoint */
1558
 	/* Identify endpoint */
1557
 	if ( ( trb->endpoint > XHCI_CTX_END ) ||
1559
 	if ( ( trb->endpoint > XHCI_CTX_END ) ||
1558
 	     ( ( endpoint = slot->endpoint[trb->endpoint] ) == NULL ) ) {
1560
 	     ( ( endpoint = slot->endpoint[trb->endpoint] ) == NULL ) ) {
1559
-		DBGC ( xhci, "XHCI %p slot %d transfer event invalid epid "
1560
-		       "%d:\n", xhci, slot->id, trb->endpoint );
1561
+		DBGC ( xhci, "XHCI %s slot %d transfer event invalid epid "
1562
+		       "%d:\n", xhci->name, slot->id, trb->endpoint );
1561
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1563
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1562
 		return;
1564
 		return;
1563
 	}
1565
 	}
1572
 
1574
 
1573
 		/* Construct error */
1575
 		/* Construct error */
1574
 		rc = -ECODE ( trb->code );
1576
 		rc = -ECODE ( trb->code );
1575
-		DBGC ( xhci, "XHCI %p slot %d ctx %d failed (code %d): %s\n",
1576
-		       xhci, slot->id, endpoint->ctx, trb->code,
1577
+		DBGC ( xhci, "XHCI %s slot %d ctx %d failed (code %d): %s\n",
1578
+		       xhci->name, slot->id, endpoint->ctx, trb->code,
1577
 		       strerror ( rc ) );
1579
 		       strerror ( rc ) );
1578
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1580
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1579
 
1581
 
1610
 
1612
 
1611
 	/* Ignore "command ring stopped" notifications */
1613
 	/* Ignore "command ring stopped" notifications */
1612
 	if ( trb->code == XHCI_CMPLT_CMD_STOPPED ) {
1614
 	if ( trb->code == XHCI_CMPLT_CMD_STOPPED ) {
1613
-		DBGC2 ( xhci, "XHCI %p command ring stopped\n", xhci );
1615
+		DBGC2 ( xhci, "XHCI %s command ring stopped\n", xhci->name );
1614
 		return;
1616
 		return;
1615
 	}
1617
 	}
1616
 
1618
 
1617
 	/* Ignore unexpected completions */
1619
 	/* Ignore unexpected completions */
1618
 	if ( ! xhci->pending ) {
1620
 	if ( ! xhci->pending ) {
1619
 		rc = -ECODE ( trb->code );
1621
 		rc = -ECODE ( trb->code );
1620
-		DBGC ( xhci, "XHCI %p unexpected completion (code %d): %s\n",
1621
-		       xhci, trb->code, strerror ( rc ) );
1622
+		DBGC ( xhci, "XHCI %s unexpected completion (code %d): %s\n",
1623
+		       xhci->name, trb->code, strerror ( rc ) );
1622
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1624
 		DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1623
 		return;
1625
 		return;
1624
 	}
1626
 	}
1671
 
1673
 
1672
 	/* Construct error */
1674
 	/* Construct error */
1673
 	rc = -ECODE ( trb->code );
1675
 	rc = -ECODE ( trb->code );
1674
-	DBGC ( xhci, "XHCI %p host controller event (code %d): %s\n",
1675
-	       xhci, trb->code, strerror ( rc ) );
1676
+	DBGC ( xhci, "XHCI %s host controller event (code %d): %s\n",
1677
+	       xhci->name, trb->code, strerror ( rc ) );
1676
 }
1678
 }
1677
 
1679
 
1678
 /**
1680
 /**
1721
 			break;
1723
 			break;
1722
 
1724
 
1723
 		default:
1725
 		default:
1724
-			DBGC ( xhci, "XHCI %p unrecognised event %#x\n:",
1725
-			       xhci, event->cons );
1726
+			DBGC ( xhci, "XHCI %s unrecognised event %#x\n:",
1727
+			       xhci->name, event->cons );
1726
 			DBGC_HDA ( xhci, virt_to_phys ( trb ),
1728
 			DBGC_HDA ( xhci, virt_to_phys ( trb ),
1727
 				   trb, sizeof ( *trb ) );
1729
 				   trb, sizeof ( *trb ) );
1728
 			break;
1730
 			break;
1749
 	physaddr_t crp;
1751
 	physaddr_t crp;
1750
 
1752
 
1751
 	/* Abort the command */
1753
 	/* Abort the command */
1752
-	DBGC2 ( xhci, "XHCI %p aborting command\n", xhci );
1754
+	DBGC2 ( xhci, "XHCI %s aborting command\n", xhci->name );
1753
 	xhci_writeq ( xhci, XHCI_CRCR_CA, xhci->op + XHCI_OP_CRCR );
1755
 	xhci_writeq ( xhci, XHCI_CRCR_CA, xhci->op + XHCI_OP_CRCR );
1754
 
1756
 
1755
 	/* Allow time for command to abort */
1757
 	/* Allow time for command to abort */
1802
 		if ( ! xhci->pending ) {
1804
 		if ( ! xhci->pending ) {
1803
 			if ( complete->code != XHCI_CMPLT_SUCCESS ) {
1805
 			if ( complete->code != XHCI_CMPLT_SUCCESS ) {
1804
 				rc = -ECODE ( complete->code );
1806
 				rc = -ECODE ( complete->code );
1805
-				DBGC ( xhci, "XHCI %p command failed (code "
1806
-				       "%d): %s\n", xhci, complete->code,
1807
+				DBGC ( xhci, "XHCI %s command failed (code "
1808
+				       "%d): %s\n", xhci->name, complete->code,
1807
 				       strerror ( rc ) );
1809
 				       strerror ( rc ) );
1808
 				DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1810
 				DBGC_HDA ( xhci, 0, trb, sizeof ( *trb ) );
1809
 				return rc;
1811
 				return rc;
1816
 	}
1818
 	}
1817
 
1819
 
1818
 	/* Timeout */
1820
 	/* Timeout */
1819
-	DBGC ( xhci, "XHCI %p timed out waiting for completion\n", xhci );
1821
+	DBGC ( xhci, "XHCI %s timed out waiting for completion\n", xhci->name );
1820
 	rc = -ETIMEDOUT;
1822
 	rc = -ETIMEDOUT;
1821
 
1823
 
1822
 	/* Abort command */
1824
 	/* Abort command */
1872
 
1874
 
1873
 	/* Issue command and wait for completion */
1875
 	/* Issue command and wait for completion */
1874
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
1876
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
1875
-		DBGC ( xhci, "XHCI %p could not enable new slot: %s\n",
1876
-		       xhci, strerror ( rc ) );
1877
+		DBGC ( xhci, "XHCI %s could not enable new slot: %s\n",
1878
+		       xhci->name, strerror ( rc ) );
1877
 		return rc;
1879
 		return rc;
1878
 	}
1880
 	}
1879
 
1881
 
1880
 	/* Extract slot number */
1882
 	/* Extract slot number */
1881
 	slot = enabled->slot;
1883
 	slot = enabled->slot;
1882
 
1884
 
1883
-	DBGC2 ( xhci, "XHCI %p slot %d enabled\n", xhci, slot );
1885
+	DBGC2 ( xhci, "XHCI %s slot %d enabled\n", xhci->name, slot );
1884
 	return slot;
1886
 	return slot;
1885
 }
1887
 }
1886
 
1888
 
1904
 
1906
 
1905
 	/* Issue command and wait for completion */
1907
 	/* Issue command and wait for completion */
1906
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
1908
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
1907
-		DBGC ( xhci, "XHCI %p could not disable slot %d: %s\n",
1908
-		       xhci, slot, strerror ( rc ) );
1909
+		DBGC ( xhci, "XHCI %s could not disable slot %d: %s\n",
1910
+		       xhci->name, slot, strerror ( rc ) );
1909
 		return rc;
1911
 		return rc;
1910
 	}
1912
 	}
1911
 
1913
 
1912
-	DBGC2 ( xhci, "XHCI %p slot %d disabled\n", xhci, slot );
1914
+	DBGC2 ( xhci, "XHCI %s slot %d disabled\n", xhci->name, slot );
1913
 	return 0;
1915
 	return 0;
1914
 }
1916
 }
1915
 
1917
 
2028
 	slot_ctx = ( slot->context +
2030
 	slot_ctx = ( slot->context +
2029
 		     xhci_device_context_offset ( xhci, XHCI_CTX_SLOT ) );
2031
 		     xhci_device_context_offset ( xhci, XHCI_CTX_SLOT ) );
2030
 	usb->address = slot_ctx->address;
2032
 	usb->address = slot_ctx->address;
2031
-	DBGC2 ( xhci, "XHCI %p assigned address %d to %s\n",
2032
-		xhci, usb->address, usb->name );
2033
+	DBGC2 ( xhci, "XHCI %s assigned address %d to %s\n",
2034
+		xhci->name, usb->address, usb->name );
2033
 
2035
 
2034
 	return 0;
2036
 	return 0;
2035
 }
2037
 }
2092
 				   xhci_configure_endpoint_input ) ) != 0 )
2094
 				   xhci_configure_endpoint_input ) ) != 0 )
2093
 		return rc;
2095
 		return rc;
2094
 
2096
 
2095
-	DBGC2 ( xhci, "XHCI %p slot %d ctx %d configured\n",
2096
-		xhci, slot->id, endpoint->ctx );
2097
+	DBGC2 ( xhci, "XHCI %s slot %d ctx %d configured\n",
2098
+		xhci->name, slot->id, endpoint->ctx );
2097
 	return 0;
2099
 	return 0;
2098
 }
2100
 }
2099
 
2101
 
2143
 				   xhci_deconfigure_endpoint_input ) ) != 0 )
2145
 				   xhci_deconfigure_endpoint_input ) ) != 0 )
2144
 		return rc;
2146
 		return rc;
2145
 
2147
 
2146
-	DBGC2 ( xhci, "XHCI %p slot %d ctx %d deconfigured\n",
2147
-		xhci, slot->id, endpoint->ctx );
2148
+	DBGC2 ( xhci, "XHCI %s slot %d ctx %d deconfigured\n",
2149
+		xhci->name, slot->id, endpoint->ctx );
2148
 	return 0;
2150
 	return 0;
2149
 }
2151
 }
2150
 
2152
 
2198
 				   xhci_evaluate_context_input ) ) != 0 )
2200
 				   xhci_evaluate_context_input ) ) != 0 )
2199
 		return rc;
2201
 		return rc;
2200
 
2202
 
2201
-	DBGC2 ( xhci, "XHCI %p slot %d ctx %d (re-)evaluated\n",
2202
-		xhci, slot->id, endpoint->ctx );
2203
+	DBGC2 ( xhci, "XHCI %s slot %d ctx %d (re-)evaluated\n",
2204
+		xhci->name, slot->id, endpoint->ctx );
2203
 	return 0;
2205
 	return 0;
2204
 }
2206
 }
2205
 
2207
 
2226
 
2228
 
2227
 	/* Issue command and wait for completion */
2229
 	/* Issue command and wait for completion */
2228
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2230
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2229
-		DBGC ( xhci, "XHCI %p slot %d ctx %d could not reset endpoint "
2230
-		       "in state %d: %s\n", xhci, slot->id, endpoint->ctx,
2231
+		DBGC ( xhci, "XHCI %s slot %d ctx %d could not reset endpoint "
2232
+		       "in state %d: %s\n", xhci->name, slot->id, endpoint->ctx,
2231
 		       endpoint->context->state, strerror ( rc ) );
2233
 		       endpoint->context->state, strerror ( rc ) );
2232
 		return rc;
2234
 		return rc;
2233
 	}
2235
 	}
2258
 
2260
 
2259
 	/* Issue command and wait for completion */
2261
 	/* Issue command and wait for completion */
2260
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2262
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2261
-		DBGC ( xhci, "XHCI %p slot %d ctx %d could not stop endpoint "
2262
-		       "in state %d: %s\n", xhci, slot->id, endpoint->ctx,
2263
+		DBGC ( xhci, "XHCI %s slot %d ctx %d could not stop endpoint "
2264
+		       "in state %d: %s\n", xhci->name, slot->id, endpoint->ctx,
2263
 		       endpoint->context->state, strerror ( rc ) );
2265
 		       endpoint->context->state, strerror ( rc ) );
2264
 		return rc;
2266
 		return rc;
2265
 	}
2267
 	}
2302
 
2304
 
2303
 	/* Issue command and wait for completion */
2305
 	/* Issue command and wait for completion */
2304
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2306
 	if ( ( rc = xhci_command ( xhci, &trb ) ) != 0 ) {
2305
-		DBGC ( xhci, "XHCI %p slot %d ctx %d could not set TR dequeue "
2306
-		       "pointer in state %d: %s\n", xhci, slot->id,
2307
+		DBGC ( xhci, "XHCI %s slot %d ctx %d could not set TR dequeue "
2308
+		       "pointer in state %d: %s\n", xhci->name, slot->id,
2307
 		       endpoint->ctx, endpoint->context->state, strerror ( rc));
2309
 		       endpoint->ctx, endpoint->context->state, strerror ( rc));
2308
 		return rc;
2310
 		return rc;
2309
 	}
2311
 	}
2380
 	     ( ( rc = xhci_configure_endpoint ( xhci, slot, endpoint ) ) != 0 ))
2382
 	     ( ( rc = xhci_configure_endpoint ( xhci, slot, endpoint ) ) != 0 ))
2381
 		goto err_configure_endpoint;
2383
 		goto err_configure_endpoint;
2382
 
2384
 
2383
-	DBGC2 ( xhci, "XHCI %p slot %d ctx %d ring [%08lx,%08lx)\n",
2384
-		xhci, slot->id, ctx, virt_to_phys ( endpoint->ring.trb ),
2385
+	DBGC2 ( xhci, "XHCI %s slot %d ctx %d ring [%08lx,%08lx)\n",
2386
+		xhci->name, slot->id, ctx, virt_to_phys ( endpoint->ring.trb ),
2385
 		( virt_to_phys ( endpoint->ring.trb ) + endpoint->ring.len ) );
2387
 		( virt_to_phys ( endpoint->ring.trb ) + endpoint->ring.len ) );
2386
 	return 0;
2388
 	return 0;
2387
 
2389
 
2446
 	/* Ring doorbell to resume processing */
2448
 	/* Ring doorbell to resume processing */
2447
 	xhci_doorbell ( &endpoint->ring );
2449
 	xhci_doorbell ( &endpoint->ring );
2448
 
2450
 
2449
-	DBGC ( xhci, "XHCI %p slot %d ctx %d reset\n",
2450
-	       xhci, slot->id, endpoint->ctx );
2451
+	DBGC ( xhci, "XHCI %s slot %d ctx %d reset\n",
2452
+	       xhci->name, slot->id, endpoint->ctx );
2451
 	return 0;
2453
 	return 0;
2452
 }
2454
 }
2453
 
2455
 
2609
 	type = xhci_port_slot_type ( xhci, usb->port->address );
2611
 	type = xhci_port_slot_type ( xhci, usb->port->address );
2610
 	if ( type < 0 ) {
2612
 	if ( type < 0 ) {
2611
 		rc = type;
2613
 		rc = type;
2612
-		DBGC ( xhci, "XHCI %p port %d has no slot type\n",
2613
-		       xhci, usb->port->address );
2614
+		DBGC ( xhci, "XHCI %s-%d has no slot type\n",
2615
+		       xhci->name, usb->port->address );
2614
 		goto err_type;
2616
 		goto err_type;
2615
 	}
2617
 	}
2616
 
2618
 
2652
 	assert ( xhci->dcbaa[id] == 0 );
2654
 	assert ( xhci->dcbaa[id] == 0 );
2653
 	xhci->dcbaa[id] = cpu_to_le64 ( virt_to_phys ( slot->context ) );
2655
 	xhci->dcbaa[id] = cpu_to_le64 ( virt_to_phys ( slot->context ) );
2654
 
2656
 
2655
-	DBGC2 ( xhci, "XHCI %p slot %d device context [%08lx,%08lx) for %s\n",
2656
-		xhci, slot->id, virt_to_phys ( slot->context ),
2657
+	DBGC2 ( xhci, "XHCI %s slot %d device context [%08lx,%08lx) for %s\n",
2658
+		xhci->name, slot->id, virt_to_phys ( slot->context ),
2657
 		( virt_to_phys ( slot->context ) + len ), usb->name );
2659
 		( virt_to_phys ( slot->context ) + len ), usb->name );
2658
 	return 0;
2660
 	return 0;
2659
 
2661
 
2691
 		 * has been re-enabled, then some assertions will be
2693
 		 * has been re-enabled, then some assertions will be
2692
 		 * triggered.
2694
 		 * triggered.
2693
 		 */
2695
 		 */
2694
-		DBGC ( xhci, "XHCI %p slot %d leaking context memory\n",
2695
-		      xhci, slot->id );
2696
+		DBGC ( xhci, "XHCI %s slot %d leaking context memory\n",
2697
+		       xhci->name, slot->id );
2696
 		slot->context = NULL;
2698
 		slot->context = NULL;
2697
 	}
2699
 	}
2698
 
2700
 
2978
 		mdelay ( 1 );
2980
 		mdelay ( 1 );
2979
 	}
2981
 	}
2980
 
2982
 
2981
-	DBGC ( xhci, "XHCI %p timed out waiting for port %d to enable\n",
2982
-	       xhci, port->address );
2983
+	DBGC ( xhci, "XHCI %s-%d timed out waiting for port to enable\n",
2984
+	       xhci->name, port->address );
2983
 	return -ETIMEDOUT;
2985
 	return -ETIMEDOUT;
2984
 }
2986
 }
2985
 
2987
 
3022
 
3024
 
3023
 	/* Read port status */
3025
 	/* Read port status */
3024
 	portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port->address ) );
3026
 	portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port->address ) );
3025
-	DBGC2 ( xhci, "XHCI %p port %d status is %08x\n",
3026
-		xhci, port->address, portsc );
3027
+	DBGC2 ( xhci, "XHCI %s-%d status is %08x\n",
3028
+		xhci->name, port->address, portsc );
3027
 	ccs = ( portsc & XHCI_PORTSC_CCS );
3029
 	ccs = ( portsc & XHCI_PORTSC_CCS );
3028
 	ped = ( portsc & XHCI_PORTSC_PED );
3030
 	ped = ( portsc & XHCI_PORTSC_PED );
3029
 	csc = ( portsc & XHCI_PORTSC_CSC );
3031
 	csc = ( portsc & XHCI_PORTSC_CSC );
3069
  */
3071
  */
3070
 static int xhci_root_clear_tt ( struct usb_hub *hub, struct usb_port *port,
3072
 static int xhci_root_clear_tt ( struct usb_hub *hub, struct usb_port *port,
3071
 				struct usb_endpoint *ep ) {
3073
 				struct usb_endpoint *ep ) {
3072
-	struct ehci_device *ehci = usb_hub_get_drvdata ( hub );
3074
+	struct xhci_device *xhci = usb_hub_get_drvdata ( hub );
3073
 
3075
 
3074
 	/* Should never be called; this is a root hub */
3076
 	/* Should never be called; this is a root hub */
3075
-	DBGC ( ehci, "XHCI %p port %d nonsensical CLEAR_TT for %s endpoint "
3076
-	       "%02x\n", ehci, port->address, ep->usb->name, ep->address );
3077
+	DBGC ( xhci, "XHCI %s-%d nonsensical CLEAR_TT for %s %s\n", xhci->name,
3078
+	       port->address, ep->usb->name, usb_endpoint_name ( ep ) );
3077
 
3079
 
3078
 	return -ENOTSUP;
3080
 	return -ENOTSUP;
3079
 }
3081
 }
3138
 	pci_read_config_dword ( pci, XHCI_PCH_USB3PSSEN, &usb3pssen );
3140
 	pci_read_config_dword ( pci, XHCI_PCH_USB3PSSEN, &usb3pssen );
3139
 	pci_read_config_dword ( pci, XHCI_PCH_USB3PRM, &usb3prm );
3141
 	pci_read_config_dword ( pci, XHCI_PCH_USB3PRM, &usb3prm );
3140
 	if ( usb3prm & ~usb3pssen ) {
3142
 	if ( usb3prm & ~usb3pssen ) {
3141
-		DBGC ( xhci, "XHCI %p enabling SuperSpeed on ports %08x\n",
3142
-		       xhci, ( usb3prm & ~usb3pssen ) );
3143
+		DBGC ( xhci, "XHCI %s enabling SuperSpeed on ports %08x\n",
3144
+		       xhci->name, ( usb3prm & ~usb3pssen ) );
3143
 	}
3145
 	}
3144
 	pch->usb3pssen = usb3pssen;
3146
 	pch->usb3pssen = usb3pssen;
3145
 	usb3pssen |= usb3prm;
3147
 	usb3pssen |= usb3prm;
3149
 	pci_read_config_dword ( pci, XHCI_PCH_XUSB2PR, &xusb2pr );
3151
 	pci_read_config_dword ( pci, XHCI_PCH_XUSB2PR, &xusb2pr );
3150
 	pci_read_config_dword ( pci, XHCI_PCH_XUSB2PRM, &xusb2prm );
3152
 	pci_read_config_dword ( pci, XHCI_PCH_XUSB2PRM, &xusb2prm );
3151
 	if ( xusb2prm & ~xusb2pr ) {
3153
 	if ( xusb2prm & ~xusb2pr ) {
3152
-		DBGC ( xhci, "XHCI %p routing ports %08x from EHCI to xHCI\n",
3153
-		       xhci, ( xusb2prm & ~xusb2pr ) );
3154
+		DBGC ( xhci, "XHCI %s routing ports %08x from EHCI to xHCI\n",
3155
+		       xhci->name, ( xusb2prm & ~xusb2pr ) );
3154
 	}
3156
 	}
3155
 	pch->xusb2pr = xusb2pr;
3157
 	pch->xusb2pr = xusb2pr;
3156
 	xusb2pr |= xusb2prm;
3158
 	xusb2pr |= xusb2prm;
3193
 		rc = -ENOMEM;
3195
 		rc = -ENOMEM;
3194
 		goto err_alloc;
3196
 		goto err_alloc;
3195
 	}
3197
 	}
3198
+	xhci->name = pci->dev.name;
3196
 
3199
 
3197
 	/* Fix up PCI device */
3200
 	/* Fix up PCI device */
3198
 	adjust_pci_device ( pci );
3201
 	adjust_pci_device ( pci );

+ 2
- 0
src/drivers/usb/xhci.h View File

1036
 struct xhci_device {
1036
 struct xhci_device {
1037
 	/** Registers */
1037
 	/** Registers */
1038
 	void *regs;
1038
 	void *regs;
1039
+	/** Name */
1040
+	const char *name;
1039
 
1041
 
1040
 	/** Capability registers */
1042
 	/** Capability registers */
1041
 	void *cap;
1043
 	void *cap;

Loading…
Cancel
Save