mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
aw_usbphy: Do not error if it's not phy 0
Only phy0 can switch between host/otg, do not error if we request host mode on phy != 0. MFC after: 1 month X-MFC with: r340846
This commit is contained in:
parent
cac83db9b7
commit
198e1deb5f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340971
@ -389,8 +389,11 @@ awusbphy_set_mode(struct phynode *phynode, int mode)
|
||||
phy = phynode_get_id(phynode);
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
if (phy != 0)
|
||||
return (EINVAL);
|
||||
if (phy != 0) {
|
||||
if (mode != PHY_USB_MODE_HOST)
|
||||
return (EINVAL);
|
||||
return (0);
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case PHY_USB_MODE_HOST:
|
||||
|
Loading…
Reference in New Issue
Block a user