Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326015
b: refs/heads/master
c: c181bc5
h: refs/heads/master
i:
  326013: 0b84d8c
  326011: ea0844d
  326007: 47f04c2
  325999: 3d78e6e
  325983: fa10887
  325951: 02fd559
  325887: dbd92cc
v: v3
  • Loading branch information
Elric Fu authored and Sarah Sharp committed Sep 13, 2012
1 parent a8377dc commit 8b421aa
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 80 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92931d243b5cafa23de2d693342966bb9133cdbc
refs/heads/master: c181bc5b5d5c79b71203cd10cef97f802fb6f9c1
3 changes: 3 additions & 0 deletions trunk/drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ static inline int room_on_ring(struct xhci_hcd *xhci, struct xhci_ring *ring,
/* Ring the host controller doorbell after placing a command on the ring */
void xhci_ring_cmd_db(struct xhci_hcd *xhci)
{
if (!(xhci->cmd_ring_state & CMD_RING_STATE_RUNNING))
return;

xhci_dbg(xhci, "// Ding dong!\n");
xhci_writel(xhci, DB_VALUE_HOST, &xhci->dba->doorbell[0]);
/* Flush PCI posted writes */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ int xhci_halt(struct xhci_hcd *xhci)

ret = handshake(xhci, &xhci->op_regs->status,
STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
if (!ret)
if (!ret) {
xhci->xhc_state |= XHCI_STATE_HALTED;
else
xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;
} else
xhci_warn(xhci, "Host not halted after %u microseconds.\n",
XHCI_MAX_HALT_USEC);
return ret;
Expand Down Expand Up @@ -485,6 +486,7 @@ static int xhci_run_finished(struct xhci_hcd *xhci)
return -ENODEV;
}
xhci->shared_hcd->state = HC_STATE_RUNNING;
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;

if (xhci->quirks & XHCI_NEC_HOST)
xhci_ring_cmd_db(xhci);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/usb/host/xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,10 @@ struct xhci_hcd {
/* data structures */
struct xhci_device_context_array *dcbaa;
struct xhci_ring *cmd_ring;
unsigned int cmd_ring_state;
#define CMD_RING_STATE_RUNNING (1 << 0)
#define CMD_RING_STATE_ABORTED (1 << 1)
#define CMD_RING_STATE_STOPPED (1 << 2)
unsigned int cmd_ring_reserved_trbs;
struct xhci_ring *event_ring;
struct xhci_erst erst;
Expand Down
17 changes: 9 additions & 8 deletions trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -70,6 +68,8 @@ static int usb_console_setup(struct console *co, char *options)
struct tty_struct *tty = NULL;
struct ktermios dummy;

dbg("%s", __func__);

if (options) {
baud = simple_strtoul(options, NULL, 10);
s = options;
Expand Down Expand Up @@ -113,7 +113,8 @@ static int usb_console_setup(struct console *co, char *options)
serial = usb_serial_get_by_index(co->index);
if (serial == NULL) {
/* no device is connected yet, sorry :( */
pr_err("No USB device connected to ttyUSB%i\n", co->index);
printk(KERN_ERR "No USB device connected to ttyUSB%i\n",
co->index);
return -ENODEV;
}

Expand Down Expand Up @@ -212,10 +213,10 @@ static void usb_console_write(struct console *co,
if (count == 0)
return;

pr_debug("%s - port %d, %d byte(s)\n", __func__, port->number, count);
dbg("%s - port %d, %d byte(s)", __func__, port->number, count);

if (!port->port.console) {
pr_debug("%s - port not opened\n", __func__);
dbg("%s - port not opened", __func__);
return;
}

Expand All @@ -236,7 +237,7 @@ static void usb_console_write(struct console *co,
retval = serial->type->write(NULL, port, buf, i);
else
retval = usb_serial_generic_write(NULL, port, buf, i);
pr_debug("%s - return value : %d\n", __func__, retval);
dbg("%s - return value : %d", __func__, retval);
if (lf) {
/* append CR after LF */
unsigned char cr = 13;
Expand All @@ -246,7 +247,7 @@ static void usb_console_write(struct console *co,
else
retval = usb_serial_generic_write(NULL,
port, &cr, 1);
pr_debug("%s - return value : %d\n", __func__, retval);
dbg("%s - return value : %d", __func__, retval);
}
buf += i;
count -= i;
Expand Down Expand Up @@ -301,7 +302,7 @@ void usb_serial_console_init(int serial_debug, int minor)
* register_console). console_write() is called immediately
* from register_console iff CON_PRINTBUFFER is set in flags.
*/
pr_debug("registering the USB serial console.\n");
dbg("registering the USB serial console.");
register_console(&usbcons);
}
}
Expand Down
Loading

0 comments on commit 8b421aa

Please sign in to comment.