mirror of https://github.com/ipxe/ipxe.git
[uhci] Use meaningful device names in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/36/head
parent
5832e9ea93
commit
bb6d7bebe9
|
@ -117,7 +117,7 @@ static int uhci_stop ( struct uhci_device *uhci ) {
|
||||||
mdelay ( 1 );
|
mdelay ( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( uhci, "UHCI %p timed out waiting for stop\n", uhci );
|
DBGC ( uhci, "UHCI %s timed out waiting for stop\n", uhci->name );
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ static int uhci_reset ( struct uhci_device *uhci ) {
|
||||||
mdelay ( 1 );
|
mdelay ( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( uhci, "UHCI %p timed out waiting for reset\n", uhci );
|
DBGC ( uhci, "UHCI %s timed out waiting for reset\n", uhci->name );
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ static void uhci_periodic_schedule ( struct uhci_device *uhci ) {
|
||||||
* safely run concurrently with hardware execution of the
|
* safely run concurrently with hardware execution of the
|
||||||
* schedule.
|
* schedule.
|
||||||
*/
|
*/
|
||||||
DBGCP ( uhci, "UHCI %p periodic schedule: ", uhci );
|
DBGCP ( uhci, "UHCI %s periodic schedule: ", uhci->name );
|
||||||
link = end = uhci_link_qh ( uhci->head );
|
link = end = uhci_link_qh ( uhci->head );
|
||||||
list_for_each_entry_reverse ( endpoint, &uhci->periodic, schedule ) {
|
list_for_each_entry_reverse ( endpoint, &uhci->periodic, schedule ) {
|
||||||
queue = endpoint->ring.head;
|
queue = endpoint->ring.head;
|
||||||
|
@ -554,7 +554,7 @@ static void uhci_periodic_schedule ( struct uhci_device *uhci ) {
|
||||||
DBGCP ( uhci, "\n" );
|
DBGCP ( uhci, "\n" );
|
||||||
|
|
||||||
/* Populate periodic frame list */
|
/* Populate periodic frame list */
|
||||||
DBGCP ( uhci, "UHCI %p periodic frame list:", uhci );
|
DBGCP ( uhci, "UHCI %s periodic frame list:", uhci->name );
|
||||||
for ( i = 0 ; i < UHCI_FRAMES ; i++ ) {
|
for ( i = 0 ; i < UHCI_FRAMES ; i++ ) {
|
||||||
|
|
||||||
/* Calculate maximum interval (in microframes) which
|
/* Calculate maximum interval (in microframes) which
|
||||||
|
@ -930,9 +930,10 @@ static void uhci_endpoint_poll ( struct uhci_endpoint *endpoint ) {
|
||||||
* and report the error to the USB core.
|
* and report the error to the USB core.
|
||||||
*/
|
*/
|
||||||
if ( desc->status & UHCI_STATUS_STALLED ) {
|
if ( desc->status & UHCI_STATUS_STALLED ) {
|
||||||
DBGC ( uhci, "UHCI %p %s endpoint %02x completion "
|
DBGC ( uhci, "UHCI %s %s completion %d.%d failed "
|
||||||
"%d.%d failed (status %02x)\n", uhci, usb->name,
|
"(status %02x)\n", usb->name,
|
||||||
ep->address, index, xfer->cons, desc->status );
|
usb_endpoint_name ( ep ), index,
|
||||||
|
xfer->cons, desc->status );
|
||||||
link = UHCI_LINK_TERMINATE;
|
link = UHCI_LINK_TERMINATE;
|
||||||
ring->head->current = cpu_to_le32 ( link );
|
ring->head->current = cpu_to_le32 ( link );
|
||||||
wmb();
|
wmb();
|
||||||
|
@ -1062,8 +1063,8 @@ static int uhci_device_address ( struct usb_device *usb ) {
|
||||||
address = usb_alloc_address ( bus );
|
address = usb_alloc_address ( bus );
|
||||||
if ( address < 0 ) {
|
if ( address < 0 ) {
|
||||||
rc = address;
|
rc = address;
|
||||||
DBGC ( uhci, "UHCI %p %s could not allocate address: %s\n",
|
DBGC ( uhci, "UHCI %s could not allocate address: %s\n",
|
||||||
uhci, usb->name, strerror ( rc ) );
|
usb->name, strerror ( rc ) );
|
||||||
goto err_alloc_address;
|
goto err_alloc_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1184,8 +1185,8 @@ static int uhci_root_enable ( struct usb_hub *hub, struct usb_port *port ) {
|
||||||
mdelay ( 1 );
|
mdelay ( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( uhci, "UHCI %p timed out waiting for port %d to enable "
|
DBGC ( uhci, "UHCI %s-%d timed out waiting for port to enable "
|
||||||
"(status %04x)\n", uhci, port->address, portsc );
|
"(status %04x)\n", uhci->name, port->address, portsc );
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1217,6 +1218,7 @@ static int uhci_root_disable ( struct usb_hub *hub, struct usb_port *port ) {
|
||||||
*/
|
*/
|
||||||
static int uhci_root_speed ( struct usb_hub *hub, struct usb_port *port ) {
|
static int uhci_root_speed ( struct usb_hub *hub, struct usb_port *port ) {
|
||||||
struct uhci_device *uhci = usb_hub_get_drvdata ( hub );
|
struct uhci_device *uhci = usb_hub_get_drvdata ( hub );
|
||||||
|
struct pci_device pci;
|
||||||
uint16_t portsc;
|
uint16_t portsc;
|
||||||
unsigned int speed;
|
unsigned int speed;
|
||||||
|
|
||||||
|
@ -1231,8 +1233,9 @@ static int uhci_root_speed ( struct usb_hub *hub, struct usb_port *port ) {
|
||||||
/* Defer connection detection until companion
|
/* Defer connection detection until companion
|
||||||
* controller has been enumerated.
|
* controller has been enumerated.
|
||||||
*/
|
*/
|
||||||
DBGC ( uhci, "UHCI %p port %d deferring connection\n",
|
pci_init ( &pci, uhci->companion );
|
||||||
uhci, port->address );
|
DBGC ( uhci, "UHCI %s-%d deferring for companion " PCI_FMT "\n",
|
||||||
|
uhci->name, port->address, PCI_ARGS ( &pci ) );
|
||||||
speed = USB_SPEED_NONE;
|
speed = USB_SPEED_NONE;
|
||||||
} else if ( portsc & UHCI_PORTSC_LS ) {
|
} else if ( portsc & UHCI_PORTSC_LS ) {
|
||||||
/* Low-speed device */
|
/* Low-speed device */
|
||||||
|
@ -1263,8 +1266,8 @@ static int uhci_root_clear_tt ( struct usb_hub *hub, struct usb_port *port,
|
||||||
struct uhci_device *uhci = usb_hub_get_drvdata ( hub );
|
struct uhci_device *uhci = usb_hub_get_drvdata ( hub );
|
||||||
|
|
||||||
/* Should never be called; this is a root hub */
|
/* Should never be called; this is a root hub */
|
||||||
DBGC ( uhci, "UHCI %p port %d nonsensical CLEAR_TT for %s endpoint "
|
DBGC ( uhci, "UHCI %s-%d nonsensical CLEAR_TT for %s %s\n", uhci->name,
|
||||||
"%02x\n", uhci, port->address, ep->usb->name, ep->address );
|
port->address, ep->usb->name, usb_endpoint_name ( ep ) );
|
||||||
|
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
@ -1479,6 +1482,7 @@ static int uhci_probe ( struct pci_device *pci ) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_alloc;
|
goto err_alloc;
|
||||||
}
|
}
|
||||||
|
uhci->name = pci->dev.name;
|
||||||
INIT_LIST_HEAD ( &uhci->endpoints );
|
INIT_LIST_HEAD ( &uhci->endpoints );
|
||||||
INIT_LIST_HEAD ( &uhci->async );
|
INIT_LIST_HEAD ( &uhci->async );
|
||||||
INIT_LIST_HEAD ( &uhci->periodic );
|
INIT_LIST_HEAD ( &uhci->periodic );
|
||||||
|
|
|
@ -307,6 +307,8 @@ uhci_ring_remaining ( struct uhci_ring *ring ) {
|
||||||
struct uhci_device {
|
struct uhci_device {
|
||||||
/** Registers */
|
/** Registers */
|
||||||
unsigned long regs;
|
unsigned long regs;
|
||||||
|
/** Name */
|
||||||
|
const char *name;
|
||||||
|
|
||||||
/** EHCI companion controller bus:dev.fn address (if any) */
|
/** EHCI companion controller bus:dev.fn address (if any) */
|
||||||
unsigned int companion;
|
unsigned int companion;
|
||||||
|
|
Loading…
Reference in New Issue