[WCNCR00158507] usb: Fix write/read error during suspending

[Description]
Fix kalDevRegRead and kalDevRegWrite errors during suspending,

kalWowProcess:(INIT STATE) WoW process done
kalDevRegRead:(HAL ERROR) usb_control_msg() status: -14 retry: 0
kalDevRegRead:(HAL ERROR) usb_control_msg() status: -14 retry: 1
kalDevRegRead:(HAL ERROR) usb_readl() reports error: fffffff2 retry: 2
kalDevRegWrite:(HAL ERROR) usb_control_msg() status: -14 retry: 0
kalDevRegWrite:(HAL ERROR) usb_control_msg() status: -14 retry: 1
kalDevRegWrite:(HAL ERROR) usb_writel() reports error: fffffff2 retry: 2
mtk_usb_suspend:(HAL STATE) mtk_usb_suspend() done!

The caller is glUdmaRxAggEnable() in halDisableInterrupt() where USB state
is "USB_STATE_PRE_SUSPEND_DONE". Then mtk_usb_vendor_request() returns
-EFAULT(-14) due to wrong USB state.

Solution:
Remove "!=USB_STATE_LINK_UP" condition in mtk_usb_vendor_request()
because usb_control_msg() can handle when USB device is really
disconnected or suspended.

Change-Id: I15474987f063b6696d2289a67b8bade677a334c3
CR-Id: WCNCR00158507
Feature: usb
Signed-off-by: ZD Hu <zd.hu@mediatek.com>
1 file changed