diff options
author | Elina Pasheva <epasheva@sierrawireless.com> | 2009-04-27 21:41:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:44 -0400 |
commit | 5d44b36120d5b67081419d9307a526a0dfd949fc (patch) | |
tree | 862f949c91e0d79e4664332a74b87c60a97af34b /drivers | |
parent | b748bb71b50fcea991e5c17bb3e10b5f38d21eaa (diff) |
USB: serial: sierra driver debug info visibility improvement
- Version number set to 1.3.5
- Added "\n" at the end of each string in dev_dbg() code to improve the debug
information visibility. Without this change the debug logs are very
difficult to read.
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/sierra.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 9826c85a812d..f75688416b65 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -14,7 +14,7 @@ | |||
14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> | 14 | Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define DRIVER_VERSION "v.1.3.4" | 17 | #define DRIVER_VERSION "v.1.3.5" |
18 | #define DRIVER_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>" | 18 | #define DRIVER_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>" |
19 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" | 19 | #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" |
20 | 20 | ||
@@ -46,7 +46,7 @@ struct sierra_iface_info { | |||
46 | static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) | 46 | static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) |
47 | { | 47 | { |
48 | int result; | 48 | int result; |
49 | dev_dbg(&udev->dev, "%s", __func__); | 49 | dev_dbg(&udev->dev, "%s\n", __func__); |
50 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 50 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
51 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ | 51 | SWIMS_USB_REQUEST_SetPower, /* __u8 request */ |
52 | USB_TYPE_VENDOR, /* __u8 request type */ | 52 | USB_TYPE_VENDOR, /* __u8 request type */ |
@@ -61,7 +61,7 @@ static int sierra_set_power_state(struct usb_device *udev, __u16 swiState) | |||
61 | static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) | 61 | static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) |
62 | { | 62 | { |
63 | int result; | 63 | int result; |
64 | dev_dbg(&udev->dev, "%s", __func__); | 64 | dev_dbg(&udev->dev, "%s\n", __func__); |
65 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 65 | result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
66 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ | 66 | SWIMS_USB_REQUEST_SetNmea, /* __u8 request */ |
67 | USB_TYPE_VENDOR, /* __u8 request type */ | 67 | USB_TYPE_VENDOR, /* __u8 request type */ |
@@ -77,7 +77,7 @@ static int sierra_calc_num_ports(struct usb_serial *serial) | |||
77 | { | 77 | { |
78 | int result; | 78 | int result; |
79 | int *num_ports = usb_get_serial_data(serial); | 79 | int *num_ports = usb_get_serial_data(serial); |
80 | dev_dbg(&serial->dev->dev, "%s", __func__); | 80 | dev_dbg(&serial->dev->dev, "%s\n", __func__); |
81 | 81 | ||
82 | result = *num_ports; | 82 | result = *num_ports; |
83 | 83 | ||
@@ -111,7 +111,7 @@ static int sierra_calc_interface(struct usb_serial *serial) | |||
111 | int interface; | 111 | int interface; |
112 | struct usb_interface *p_interface; | 112 | struct usb_interface *p_interface; |
113 | struct usb_host_interface *p_host_interface; | 113 | struct usb_host_interface *p_host_interface; |
114 | dev_dbg(&serial->dev->dev, "%s", __func__); | 114 | dev_dbg(&serial->dev->dev, "%s\n", __func__); |
115 | 115 | ||
116 | /* Get the interface structure pointer from the serial struct */ | 116 | /* Get the interface structure pointer from the serial struct */ |
117 | p_interface = serial->interface; | 117 | p_interface = serial->interface; |
@@ -136,7 +136,7 @@ static int sierra_probe(struct usb_serial *serial, | |||
136 | u8 ifnum; | 136 | u8 ifnum; |
137 | u8 numendpoints; | 137 | u8 numendpoints; |
138 | 138 | ||
139 | dev_dbg(&serial->dev->dev, "%s", __func__); | 139 | dev_dbg(&serial->dev->dev, "%s\n", __func__); |
140 | 140 | ||
141 | num_ports = kmalloc(sizeof(*num_ports), GFP_KERNEL); | 141 | num_ports = kmalloc(sizeof(*num_ports), GFP_KERNEL); |
142 | if (!num_ports) | 142 | if (!num_ports) |
@@ -289,7 +289,7 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
289 | __u16 interface = 0; | 289 | __u16 interface = 0; |
290 | int val = 0; | 290 | int val = 0; |
291 | 291 | ||
292 | dev_dbg(&port->dev, "%s", __func__); | 292 | dev_dbg(&port->dev, "%s\n", __func__); |
293 | 293 | ||
294 | portdata = usb_get_serial_port_data(port); | 294 | portdata = usb_get_serial_port_data(port); |
295 | 295 | ||
@@ -332,7 +332,7 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
332 | static void sierra_set_termios(struct tty_struct *tty, | 332 | static void sierra_set_termios(struct tty_struct *tty, |
333 | struct usb_serial_port *port, struct ktermios *old_termios) | 333 | struct usb_serial_port *port, struct ktermios *old_termios) |
334 | { | 334 | { |
335 | dev_dbg(&port->dev, "%s", __func__); | 335 | dev_dbg(&port->dev, "%s\n", __func__); |
336 | tty_termios_copy_hw(tty->termios, old_termios); | 336 | tty_termios_copy_hw(tty->termios, old_termios); |
337 | sierra_send_setup(port); | 337 | sierra_send_setup(port); |
338 | } | 338 | } |
@@ -343,7 +343,7 @@ static int sierra_tiocmget(struct tty_struct *tty, struct file *file) | |||
343 | unsigned int value; | 343 | unsigned int value; |
344 | struct sierra_port_private *portdata; | 344 | struct sierra_port_private *portdata; |
345 | 345 | ||
346 | dev_dbg(&port->dev, "%s", __func__); | 346 | dev_dbg(&port->dev, "%s\n", __func__); |
347 | portdata = usb_get_serial_port_data(port); | 347 | portdata = usb_get_serial_port_data(port); |
348 | 348 | ||
349 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | | 349 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | |
@@ -394,14 +394,14 @@ static void sierra_outdat_callback(struct urb *urb) | |||
394 | int status = urb->status; | 394 | int status = urb->status; |
395 | unsigned long flags; | 395 | unsigned long flags; |
396 | 396 | ||
397 | dev_dbg(&port->dev, "%s - port %d", __func__, port->number); | 397 | dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); |
398 | 398 | ||
399 | /* free up the transfer buffer, as usb_free_urb() does not do this */ | 399 | /* free up the transfer buffer, as usb_free_urb() does not do this */ |
400 | kfree(urb->transfer_buffer); | 400 | kfree(urb->transfer_buffer); |
401 | 401 | ||
402 | if (status) | 402 | if (status) |
403 | dev_dbg(&port->dev, "%s - nonzero write bulk status " | 403 | dev_dbg(&port->dev, "%s - nonzero write bulk status " |
404 | "received: %d", __func__, status); | 404 | "received: %d\n", __func__, status); |
405 | 405 | ||
406 | spin_lock_irqsave(&portdata->lock, flags); | 406 | spin_lock_irqsave(&portdata->lock, flags); |
407 | --portdata->outstanding_urbs; | 407 | --portdata->outstanding_urbs; |
@@ -423,7 +423,7 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
423 | 423 | ||
424 | portdata = usb_get_serial_port_data(port); | 424 | portdata = usb_get_serial_port_data(port); |
425 | 425 | ||
426 | dev_dbg(&port->dev, "%s: write (%d chars)", __func__, count); | 426 | dev_dbg(&port->dev, "%s: write (%d chars)\n", __func__, count); |
427 | 427 | ||
428 | spin_lock_irqsave(&portdata->lock, flags); | 428 | spin_lock_irqsave(&portdata->lock, flags); |
429 | if (portdata->outstanding_urbs > N_OUT_URB) { | 429 | if (portdata->outstanding_urbs > N_OUT_URB) { |
@@ -498,7 +498,7 @@ static void sierra_indat_callback(struct urb *urb) | |||
498 | 498 | ||
499 | if (status) { | 499 | if (status) { |
500 | dev_dbg(&port->dev, "%s: nonzero status: %d on" | 500 | dev_dbg(&port->dev, "%s: nonzero status: %d on" |
501 | " endpoint %02x.", __func__, status, endpoint); | 501 | " endpoint %02x\n", __func__, status, endpoint); |
502 | } else { | 502 | } else { |
503 | if (urb->actual_length) { | 503 | if (urb->actual_length) { |
504 | tty = tty_port_tty_get(&port->port); | 504 | tty = tty_port_tty_get(&port->port); |
@@ -508,7 +508,7 @@ static void sierra_indat_callback(struct urb *urb) | |||
508 | tty_kref_put(tty); | 508 | tty_kref_put(tty); |
509 | } else | 509 | } else |
510 | dev_dbg(&port->dev, "%s: empty read urb" | 510 | dev_dbg(&port->dev, "%s: empty read urb" |
511 | " received", __func__); | 511 | " received\n", __func__); |
512 | 512 | ||
513 | /* Resubmit urb so we continue receiving */ | 513 | /* Resubmit urb so we continue receiving */ |
514 | if (port->port.count && status != -ESHUTDOWN && status != -EPERM) { | 514 | if (port->port.count && status != -ESHUTDOWN && status != -EPERM) { |
@@ -529,8 +529,8 @@ static void sierra_instat_callback(struct urb *urb) | |||
529 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 529 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
530 | struct usb_serial *serial = port->serial; | 530 | struct usb_serial *serial = port->serial; |
531 | 531 | ||
532 | dev_dbg(&port->dev, "%s", __func__); | 532 | dev_dbg(&port->dev, "%s\n", __func__); |
533 | dev_dbg(&port->dev, "%s: urb %p port %p has data %p", __func__, | 533 | dev_dbg(&port->dev, "%s: urb %p port %p has data %p\n", __func__, |
534 | urb, port, portdata); | 534 | urb, port, portdata); |
535 | 535 | ||
536 | if (status == 0) { | 536 | if (status == 0) { |
@@ -550,7 +550,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
550 | sizeof(struct usb_ctrlrequest)); | 550 | sizeof(struct usb_ctrlrequest)); |
551 | struct tty_struct *tty; | 551 | struct tty_struct *tty; |
552 | 552 | ||
553 | dev_dbg(&port->dev, "%s: signal x%x", __func__, | 553 | dev_dbg(&port->dev, "%s: signal x%x\n", __func__, |
554 | signals); | 554 | signals); |
555 | 555 | ||
556 | old_dcd_state = portdata->dcd_state; | 556 | old_dcd_state = portdata->dcd_state; |
@@ -565,12 +565,12 @@ static void sierra_instat_callback(struct urb *urb) | |||
565 | tty_hangup(tty); | 565 | tty_hangup(tty); |
566 | tty_kref_put(tty); | 566 | tty_kref_put(tty); |
567 | } else { | 567 | } else { |
568 | dev_dbg(&port->dev, "%s: type %x req %x", | 568 | dev_dbg(&port->dev, "%s: type %x req %x\n", |
569 | __func__, req_pkt->bRequestType, | 569 | __func__, req_pkt->bRequestType, |
570 | req_pkt->bRequest); | 570 | req_pkt->bRequest); |
571 | } | 571 | } |
572 | } else | 572 | } else |
573 | dev_dbg(&port->dev, "%s: error %d", __func__, status); | 573 | dev_dbg(&port->dev, "%s: error %d\n", __func__, status); |
574 | 574 | ||
575 | /* Resubmit urb so we continue receiving IRQ data */ | 575 | /* Resubmit urb so we continue receiving IRQ data */ |
576 | if (status != -ESHUTDOWN) { | 576 | if (status != -ESHUTDOWN) { |
@@ -578,7 +578,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
578 | err = usb_submit_urb(urb, GFP_ATOMIC); | 578 | err = usb_submit_urb(urb, GFP_ATOMIC); |
579 | if (err) | 579 | if (err) |
580 | dev_dbg(&port->dev, "%s: resubmit intr urb " | 580 | dev_dbg(&port->dev, "%s: resubmit intr urb " |
581 | "failed. (%d)", __func__, err); | 581 | "failed. (%d)\n", __func__, err); |
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
@@ -588,7 +588,7 @@ static int sierra_write_room(struct tty_struct *tty) | |||
588 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 588 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
589 | unsigned long flags; | 589 | unsigned long flags; |
590 | 590 | ||
591 | dev_dbg(&port->dev, "%s - port %d", __func__, port->number); | 591 | dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); |
592 | 592 | ||
593 | /* try to give a good number back based on if we have any free urbs at | 593 | /* try to give a good number back based on if we have any free urbs at |
594 | * this point in time */ | 594 | * this point in time */ |
@@ -729,7 +729,7 @@ static int sierra_open(struct tty_struct *tty, | |||
729 | 729 | ||
730 | portdata = usb_get_serial_port_data(port); | 730 | portdata = usb_get_serial_port_data(port); |
731 | 731 | ||
732 | dev_dbg(&port->dev, "%s", __func__); | 732 | dev_dbg(&port->dev, "%s\n", __func__); |
733 | 733 | ||
734 | /* Set some sane defaults */ | 734 | /* Set some sane defaults */ |
735 | portdata->rts_state = 1; | 735 | portdata->rts_state = 1; |
@@ -782,7 +782,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
782 | struct sierra_port_private *portdata; | 782 | struct sierra_port_private *portdata; |
783 | int i; | 783 | int i; |
784 | 784 | ||
785 | dev_dbg(&serial->dev->dev, "%s", __func__); | 785 | dev_dbg(&serial->dev->dev, "%s\n", __func__); |
786 | 786 | ||
787 | /* Set Device mode to D0 */ | 787 | /* Set Device mode to D0 */ |
788 | sierra_set_power_state(serial->dev, 0x0000); | 788 | sierra_set_power_state(serial->dev, 0x0000); |
@@ -797,7 +797,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
797 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); | 797 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); |
798 | if (!portdata) { | 798 | if (!portdata) { |
799 | dev_dbg(&port->dev, "%s: kmalloc for " | 799 | dev_dbg(&port->dev, "%s: kmalloc for " |
800 | "sierra_port_private (%d) failed!.", | 800 | "sierra_port_private (%d) failed!.\n", |
801 | __func__, i); | 801 | __func__, i); |
802 | return -ENOMEM; | 802 | return -ENOMEM; |
803 | } | 803 | } |
@@ -815,7 +815,7 @@ static void sierra_shutdown(struct usb_serial *serial) | |||
815 | struct usb_serial_port *port; | 815 | struct usb_serial_port *port; |
816 | struct sierra_port_private *portdata; | 816 | struct sierra_port_private *portdata; |
817 | 817 | ||
818 | dev_dbg(&serial->dev->dev, "%s", __func__); | 818 | dev_dbg(&serial->dev->dev, "%s\n", __func__); |
819 | 819 | ||
820 | for (i = 0; i < serial->num_ports; ++i) { | 820 | for (i = 0; i < serial->num_ports; ++i) { |
821 | port = serial->port[i]; | 821 | port = serial->port[i]; |