]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
usb: ehci: prevent bad PORTSC register access
authorKuo-Jung Su <dantesu@faraday-tech.com>
Wed, 15 May 2013 07:29:20 +0000 (15:29 +0800)
committerMarek Vasut <marex@denx.de>
Wed, 12 Jun 2013 20:22:51 +0000 (22:22 +0200)
commit9c6a9d7c8be40f58cf3faf0a4b8d9d33a21ca4f5
tree30b004ad5a8648dfa97778b709fe958e9d16c97b
parentf6664ba4bcc484a2b924ecfa1052bb729def6685
usb: ehci: prevent bad PORTSC register access

1. The 'index' of ehci_submit_root() is not always > 0.

   e.g.
   While it gets invoked from usb_get_descriptor(),
   the 'index' is always a '0'. (See ch.9 of USB2.0)

2. The PORTSC register is not always required, and thus it
   should only report a port error when necessary.
   It would cause a port scan failure if the ehci_submit_root()
   always gets terminated by a port error.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Marek Vasut <marex@denx.de>
drivers/usb/host/ehci-hcd.c