Skip to content
  • Kuo-Jung Su's avatar
    usb: ehci: prevent bad PORTSC register access · 9c6a9d7c
    Kuo-Jung Su authored
    
    
    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: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
    CC: Marek Vasut <marex@denx.de>
    9c6a9d7c