diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2008-12-15 02:32:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 13:00:08 -0500 |
commit | b9cef6c31913c34fb1065b1d01e04c3b92c59016 (patch) | |
tree | 54f4e7df640ee23aa60d73df269c28411c4ed8e2 /drivers/usb | |
parent | e22b582e9108b94a8bb59010da3e09709bd39746 (diff) |
USB: make printk messages more searchable
USB: make printk messages more searchable
Make USB printk messages long and straightforward. One of these
decorated USB error messages cost me non-trivial efforts to locate.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index fc99ef67761d..5abdc11be1e5 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -107,7 +107,9 @@ MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs"); | |||
107 | /* define initial 64-byte descriptor request timeout in milliseconds */ | 107 | /* define initial 64-byte descriptor request timeout in milliseconds */ |
108 | static int initial_descriptor_timeout = USB_CTRL_GET_TIMEOUT; | 108 | static int initial_descriptor_timeout = USB_CTRL_GET_TIMEOUT; |
109 | module_param(initial_descriptor_timeout, int, S_IRUGO|S_IWUSR); | 109 | module_param(initial_descriptor_timeout, int, S_IRUGO|S_IWUSR); |
110 | MODULE_PARM_DESC(initial_descriptor_timeout, "initial 64-byte descriptor request timeout in milliseconds (default 5000 - 5.0 seconds)"); | 110 | MODULE_PARM_DESC(initial_descriptor_timeout, |
111 | "initial 64-byte descriptor request timeout in milliseconds " | ||
112 | "(default 5000 - 5.0 seconds)"); | ||
111 | 113 | ||
112 | /* | 114 | /* |
113 | * As of 2.6.10 we introduce a new USB device initialization scheme which | 115 | * As of 2.6.10 we introduce a new USB device initialization scheme which |
@@ -1136,8 +1138,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1136 | hdev = interface_to_usbdev(intf); | 1138 | hdev = interface_to_usbdev(intf); |
1137 | 1139 | ||
1138 | if (hdev->level == MAX_TOPO_LEVEL) { | 1140 | if (hdev->level == MAX_TOPO_LEVEL) { |
1139 | dev_err(&intf->dev, "Unsupported bus topology: " | 1141 | dev_err(&intf->dev, |
1140 | "hub nested too deep\n"); | 1142 | "Unsupported bus topology: hub nested too deep\n"); |
1141 | return -E2BIG; | 1143 | return -E2BIG; |
1142 | } | 1144 | } |
1143 | 1145 | ||
@@ -1477,8 +1479,8 @@ static void announce_device(struct usb_device *udev) | |||
1477 | dev_info(&udev->dev, "New USB device found, idVendor=%04x, idProduct=%04x\n", | 1479 | dev_info(&udev->dev, "New USB device found, idVendor=%04x, idProduct=%04x\n", |
1478 | le16_to_cpu(udev->descriptor.idVendor), | 1480 | le16_to_cpu(udev->descriptor.idVendor), |
1479 | le16_to_cpu(udev->descriptor.idProduct)); | 1481 | le16_to_cpu(udev->descriptor.idProduct)); |
1480 | dev_info(&udev->dev, "New USB device strings: Mfr=%d, Product=%d, " | 1482 | dev_info(&udev->dev, |
1481 | "SerialNumber=%d\n", | 1483 | "New USB device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", |
1482 | udev->descriptor.iManufacturer, | 1484 | udev->descriptor.iManufacturer, |
1483 | udev->descriptor.iProduct, | 1485 | udev->descriptor.iProduct, |
1484 | udev->descriptor.iSerialNumber); | 1486 | udev->descriptor.iSerialNumber); |
@@ -1543,7 +1545,7 @@ static int usb_configure_device_otg(struct usb_device *udev) | |||
1543 | * customize to match your product. | 1545 | * customize to match your product. |
1544 | */ | 1546 | */ |
1545 | dev_info(&udev->dev, | 1547 | dev_info(&udev->dev, |
1546 | "can't set HNP mode; %d\n", | 1548 | "can't set HNP mode: %d\n", |
1547 | err); | 1549 | err); |
1548 | bus->b_hnp_enable = 0; | 1550 | bus->b_hnp_enable = 0; |
1549 | } | 1551 | } |
@@ -2047,8 +2049,8 @@ static int finish_port_resume(struct usb_device *udev) | |||
2047 | u16 devstatus; | 2049 | u16 devstatus; |
2048 | 2050 | ||
2049 | /* caller owns the udev device lock */ | 2051 | /* caller owns the udev device lock */ |
2050 | dev_dbg(&udev->dev, "finish %sresume\n", | 2052 | dev_dbg(&udev->dev, "%s\n", |
2051 | udev->reset_resume ? "reset-" : ""); | 2053 | udev->reset_resume ? "finish reset-resume" : "finish resume"); |
2052 | 2054 | ||
2053 | /* usb ch9 identifies four variants of SUSPENDED, based on what | 2055 | /* usb ch9 identifies four variants of SUSPENDED, based on what |
2054 | * state the device resumes to. Linux currently won't see the | 2056 | * state the device resumes to. Linux currently won't see the |
@@ -2100,8 +2102,9 @@ static int finish_port_resume(struct usb_device *udev) | |||
2100 | NULL, 0, | 2102 | NULL, 0, |
2101 | USB_CTRL_SET_TIMEOUT); | 2103 | USB_CTRL_SET_TIMEOUT); |
2102 | if (status) | 2104 | if (status) |
2103 | dev_dbg(&udev->dev, "disable remote " | 2105 | dev_dbg(&udev->dev, |
2104 | "wakeup, status %d\n", status); | 2106 | "disable remote wakeup, status %d\n", |
2107 | status); | ||
2105 | } | 2108 | } |
2106 | status = 0; | 2109 | status = 0; |
2107 | } | 2110 | } |
@@ -2584,9 +2587,9 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2584 | goto fail; | 2587 | goto fail; |
2585 | } | 2588 | } |
2586 | if (r) { | 2589 | if (r) { |
2587 | dev_err(&udev->dev, "device descriptor " | 2590 | dev_err(&udev->dev, |
2588 | "read/%s, error %d\n", | 2591 | "device descriptor read/64, error %d\n", |
2589 | "64", r); | 2592 | r); |
2590 | retval = -EMSGSIZE; | 2593 | retval = -EMSGSIZE; |
2591 | continue; | 2594 | continue; |
2592 | } | 2595 | } |
@@ -2623,9 +2626,9 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2623 | 2626 | ||
2624 | retval = usb_get_device_descriptor(udev, 8); | 2627 | retval = usb_get_device_descriptor(udev, 8); |
2625 | if (retval < 8) { | 2628 | if (retval < 8) { |
2626 | dev_err(&udev->dev, "device descriptor " | 2629 | dev_err(&udev->dev, |
2627 | "read/%s, error %d\n", | 2630 | "device descriptor read/8, error %d\n", |
2628 | "8", retval); | 2631 | retval); |
2629 | if (retval >= 0) | 2632 | if (retval >= 0) |
2630 | retval = -EMSGSIZE; | 2633 | retval = -EMSGSIZE; |
2631 | } else { | 2634 | } else { |
@@ -2652,8 +2655,8 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2652 | 2655 | ||
2653 | retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); | 2656 | retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); |
2654 | if (retval < (signed)sizeof(udev->descriptor)) { | 2657 | if (retval < (signed)sizeof(udev->descriptor)) { |
2655 | dev_err(&udev->dev, "device descriptor read/%s, error %d\n", | 2658 | dev_err(&udev->dev, "device descriptor read/all, error %d\n", |
2656 | "all", retval); | 2659 | retval); |
2657 | if (retval >= 0) | 2660 | if (retval >= 0) |
2658 | retval = -ENOMSG; | 2661 | retval = -ENOMSG; |
2659 | goto fail; | 2662 | goto fail; |
@@ -2721,9 +2724,9 @@ hub_power_remaining (struct usb_hub *hub) | |||
2721 | else | 2724 | else |
2722 | delta = 8; | 2725 | delta = 8; |
2723 | if (delta > hub->mA_per_port) | 2726 | if (delta > hub->mA_per_port) |
2724 | dev_warn(&udev->dev, "%dmA is over %umA budget " | 2727 | dev_warn(&udev->dev, |
2725 | "for port %d!\n", | 2728 | "%dmA is over %umA budget for port %d!\n", |
2726 | delta, hub->mA_per_port, port1); | 2729 | delta, hub->mA_per_port, port1); |
2727 | remaining -= delta; | 2730 | remaining -= delta; |
2728 | } | 2731 | } |
2729 | if (remaining < 0) { | 2732 | if (remaining < 0) { |