- 23 7月, 2020 1 次提交
-
-
由 Amelie Delaunay 提交于
This patch adds support for usb role switch to dwc2, by using overriding control of the PHY voltage valid and ID input signals. iddig signal (ID) can be overridden: - when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1; - when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0. avalid/bvalid/vbusvalid signals can be overridden respectively with: - GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL - GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL - GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL It is possible to determine valid sessions thanks to usb role switch: - if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid - if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid - if USB_ROLE_HOST then avalid && !bvalid && vbusvalid Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NAmelie Delaunay <amelie.delaunay@st.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 15 7月, 2020 2 次提交
-
-
由 Lee Jones 提交于
Commit ec1f9d9f ("usb: dwc2: gadget: parity fix in isochronous mode") moved these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015. The assigned value hasn't been read back since. Let's remove the unnecessary H/W read. Fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’: drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable] 2981 | u32 ctrl; | ^~~~ Cc: Ben Dooks <ben@simtec.co.uk> Signed-off-by: NLee Jones <lee.jones@linaro.org> Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Link: https://lore.kernel.org/r/20200715093209.3165641-3-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lee Jones 提交于
The value obtained from GINTSTS2 should be masked with the GINTMSK2 value. Looks like this has been broken since dwc2_gadget_wkup_alert_handler() was added back in 2018. Also fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’: drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable] 259 | u32 gintmsk2; | ^~~~~~~~ Cc: Ben Dooks <ben@simtec.co.uk> Fixes: 187c5298 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: NLee Jones <lee.jones@linaro.org> Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Link: https://lore.kernel.org/r/20200715093209.3165641-2-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 03 7月, 2020 1 次提交
-
-
由 Lee Jones 提交于
The value of 'maxsize' has not been checked since commit 729cac69 ("usb: dwc2: Change ISOC DDMA flow") back in 2018, so remove the set but unused variable, which fixes the following W=1 kernel build warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_fill_isoc_desc’: drivers/usb/dwc2/gadget.c:885:6: warning: variable ‘maxsize’ set but not used [-Wunused-but-set-variable] 885 | u32 maxsize = 0; | ^~~~~~~ Cc: Minas Harutyunyan <hminas@synopsys.com> Cc: Ben Dooks <ben@simtec.co.uk> Signed-off-by: NLee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200702144625.2533530-11-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 6月, 2020 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
For some reason, the TEST_ defines in the usb/ch9.h files did not have the USB_ prefix on it, making it a bit confusing when reading the file, as well as not the nicest thing to do in a uapi file. So fix that up and add the USB_ prefix on to them, and fix up all in-kernel usages. This included deleting the duplicate copy in the net2272.h file. Cc: Felipe Balbi <balbi@kernel.org> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Mathias Nyman <mathias.nyman@intel.com> Cc: Pawel Laszczak <pawell@cadence.com> Cc: YueHaibing <yuehaibing@huawei.com> Cc: Nathan Chancellor <natechancellor@gmail.com> Cc: Jason Yan <yanaijie@huawei.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: Stephen Boyd <swboyd@chromium.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Jules Irenge <jbi.octave@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Cc: Rob Gill <rrobgill@protonmail.com> Cc: Macpaul Lin <macpaul.lin@mediatek.com> Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Acked-by: NBin Liu <b-liu@ti.com> Acked-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Acked-by: NPeter Chen <peter.chen@nxp.com> Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 6月, 2020 1 次提交
-
-
由 Minas Harutyunyan 提交于
During dwc2 driver probe, after gadget registration to the udc class driver, if exist any builtin function driver it immediately bound to dwc2 and after init host side (dwc2_hcd_init()) stucked in host mode. Patch postpone gadget registration after host side initialization done. Fixes: 117777b2 ("usb: dwc2: Move gadget probe function into platform code") Reported-by: Nkbuild test robot <lkp@intel.com> Tested-by: NMarek Vasut <marex@denx.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Link: https://lore.kernel.org/r/f21cb38fecc72a230b86155d94c7e60c9cb66f58.1591690938.git.hminas@synopsys.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 3月, 2020 1 次提交
-
-
由 John Keeping 提交于
dwc2 always reports as self-powered in response to a device status request. Implement the set_selfpowered() operations so that the gadget can report as bus-powered when appropriate. This is modelled on the dwc3 implementation. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NJohn Keeping <john@metanate.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 11 2月, 2020 2 次提交
-
-
由 Minas Harutyunyan 提交于
SET/CLEAR_FEATURE for Remote Wakeup allowance not handled correctly. GET_STATUS handling provided not correct data on DATA Stage. Issue seen when gadget's dr_mode set to "otg" mode and connected to MacOS. Both are fixed and tested using USBCV Ch.9 tests. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Fixes: fa389a6d ("usb: dwc2: gadget: Add remote_wakeup_allowed flag") Tested-by: NJack Mitchell <ml@embed.me.uk> Cc: stable@vger.kernel.org Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Minas Harutyunyan 提交于
Moved ISOC request length checking from dwc2_hsotg_start_req() function to dwc2_hsotg_ep_queue(). Fixes: 4fca54aa ("usb: gadget: s3c-hsotg: add multi count support") Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 15 1月, 2020 2 次提交
-
-
由 John Keeping 提交于
On chips with fewer FIFOs than endpoints (for example RK3288 which has 9 endpoints, but only 6 which are cabable of input), the DPTXFSIZN registers above the FIFO count may return invalid values. With logging added on startup, I see: dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=1 sz=256 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=2 sz=128 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=3 sz=128 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=4 sz=64 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=5 sz=64 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=6 sz=32 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=7 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=8 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=9 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=10 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=11 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=12 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=13 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=14 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=15 sz=0 but: # cat /sys/kernel/debug/ff580000.usb/fifo Non-periodic FIFOs: RXFIFO: Size 275 NPTXFIFO: Size 16, Start 0x00000113 Periodic TXFIFOs: DPTXFIFO 1: Size 256, Start 0x00000123 DPTXFIFO 2: Size 128, Start 0x00000223 DPTXFIFO 3: Size 128, Start 0x000002a3 DPTXFIFO 4: Size 64, Start 0x00000323 DPTXFIFO 5: Size 64, Start 0x00000363 DPTXFIFO 6: Size 32, Start 0x000003a3 DPTXFIFO 7: Size 0, Start 0x000003e3 DPTXFIFO 8: Size 0, Start 0x000003a3 DPTXFIFO 9: Size 256, Start 0x00000123 so it seems that FIFO 9 is mirroring FIFO 1. Fix the allocation by using the FIFO count instead of the endpoint count when selecting a FIFO for an endpoint. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NJohn Keeping <john@metanate.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Minas Harutyunyan 提交于
Stalling a Non-Isochronous OUT Endpoint flow changed according programming guide. In dwc2_hsotg_ep_sethalt() function for OUT EP should not be set STALL bit. Instead should set SGOUTNAK in DCTL register. Set STALL bit should be set only after GOUTNAKEFF interrupt asserted. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 8月, 2019 1 次提交
-
-
由 John Keeping 提交于
When a gadget is disabled, kill_all_requests() can be called simultaneously from both a user process via dwc2_hsotg_pullup() and from the interrupt handler if the hardware detects disconnection. Since we drop the lock in dwc2_hsotg_complete_request() in order to call the completion handler, this means that the list is modified concurrently and leads to an infinite loop in kill_all_requests(). Replace the foreach loop with a while-not-empty loop in order to remove the danger of this concurrent modification. Note: I observed this with threadirqs, I'm not sure if it can be triggered without threaded interrupts. Signed-off-by: NJohn Keeping <john@metanate.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 06 6月, 2019 2 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
The patch 10209abe usb: dwc2: gadget: Add scatter-gather mode avoided a NULL pointer dereference (hs_ep->req == NULL) by calling dwc2_gadget_fill_nonisoc_xfer_dma_one() directly instead of through the dwc2_gadget_config_nonisoc_xfer_ddma() wrapper, which unconditionally dereferenced the said pointer. However, this was based on an incorrect assumption that in the context of dwc2_hsotg_program_zlp() the pointer is always NULL, which is not the case. The result were SB CV MSC tests failing starting from Test Case 6. Instead, this patch reverts to calling the wrapper and adds a check for the pointer being NULL inside the wrapper. Fixes: 10209abe (usb: dwc2: gadget: Add scatter-gather mode) Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@collabora.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
On ISOC OUT transfer completion, in none DDMA mode, set actual frame number returning to function driver in usb_request. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 03 5月, 2019 8 次提交
-
-
由 Minas Harutyunyan 提交于
Fix calculation of transfer size on completion in function dwc2_gadget_get_xfersize_ddma(). Added increment of descriptor pointer to move to next descriptor in the loop. Fixes: aa3e8bc8 ("usb: dwc2: gadget: DDMA transfer start and complete") Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
On ISOC transfer completion, in DDMA mode, set actual frame number returning to function driver in usb_request. Due to core limitation, returning frame number is 11-bit wide. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Some function drivers queueing more than 128 ISOC requests at a time. To avoid "descriptor chain full" cases, increasing descriptors count from MAX_DMA_DESC_NUM_GENERIC to MAX_DMA_DESC_NUM_HS_ISOC for ISOC's only. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Added delayed status support for Control transfers. Tested in all 3 modes: Slave, BDMA and DDMA. Performed tests: USB CV (Ch9 and MSC), Control Read/Write tests using Synopsys USB test environment function driver. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jules Maselbas 提交于
Most of the phy initialization is shared between host and gadget, this adds the turnaround configuration only used by gadgets to the global phy init. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NJules Maselbas <jmaselbas@kalray.eu> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jules Maselbas 提交于
The phy utmi width information is already set in hsotg params, phyif is only used in few places and I don't see any reason to not use hsotg's params. Moreover the utmi width was being forced to 16 bits by platform initialization which doesn't take in account HW configuration. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NJules Maselbas <jmaselbas@kalray.eu> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jules Maselbas 提交于
The function dwc2_hsotg_init is only called once just before calling dwc2_hsotg_core_init_disconnected which does the same initialization: setting the usbcfg register with turnaround time, timeout calibration and phy width. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NJules Maselbas <jmaselbas@kalray.eu> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Avoiding switch to L1 state in any stage of control transfers. Send NYET handshake to LPM token. Renamed GLPMCFG_LPM_ACCEPT_CTRL_ISOC to GLPMCFG_LPM_REJECT_CTRL_CONTROL because by setting this bit core reject LPM token. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 07 2月, 2019 2 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
This patch adds support for transferring requests, which are non-contiguous in physical memory, i.e. the data buffer is described by a scatter-list. This allows transferring large requests without relying on error-prone contiguous buffer allocations. This way of allocating requests is already implemented in functionfs and TCM USB functions and automatically used if UDC driver advertises scatter-gather suppport. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> [mszyprow: fixed null pointer issue, rewrote commit message] Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
In case when some EP IN is frequently reused, i.e. enabled/disabled by function driver. It is required to clear TxFIFO number field in DIEPCTL register before setting new number. Otherwise there is probability to have same TxFIFO number for different EP's because of OR operator. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 17 1月, 2019 1 次提交
-
-
由 Minas Harutyunyan 提交于
To clear GINTSTS2_WKUP_ALERT_INT bit in GINTSTS2 register require to write 1. This bit is implemented as "Write to clear". Fixes: 187c5298 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 11 12月, 2018 1 次提交
-
-
由 Minas Harutyunyan 提交于
Disabling all EP's allow to reset EP's to initial state. Introduced new function dwc2_hsotg_ep_disable_lock() which before calling dwc2_hsotg_ep_disable() function acquire hsotg->lock and release on exiting. From dwc2_hsotg_ep_disable() function removed acquiring hsotg->lock. In dwc2_hsotg_core_init_disconnected() function when USB reset interrupt asserted disabling all ep’s by dwc2_hsotg_ep_disable() function. This updates eliminating sparse imbalance warnings. Reverted changes in dwc2_hostg_disconnect() function. Introduced new function dwc2_hsotg_ep_disable_lock(). Changed dwc2_hsotg_ep_ops. Now disable point to dwc2_hsotg_ep_disable_lock() function. In functions dwc2_hsotg_udc_stop() and dwc2_hsotg_suspend() dwc2_hsotg_ep_disable() function replaced by dwc2_hsotg_ep_disable_lock() function. In dwc2_hsotg_ep_disable() function removed acquiring of hsotg->lock. Fixes: dccf1bad ("usb: dwc2: Disable all EP's on disconnect") Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 26 11月, 2018 2 次提交
-
-
由 Artur Petrosyan 提交于
Set GLPMCFG_LPM_ACCEPT_CTRL_ISOC bit in GLPMCFG register to accept LPM token during ISOC transfers when TxFIFO is not empty. - Added two definitions. #define GLPMCFG_LPM_ACCEPT_CTRL_CONTROL BIT(21) #define GLPMCFG_LPM_ACCEPT_CTRL_ISOC BIT(22) This patch uses GLPMCFG_LPM_ACCEPT_CTRL_ISOC. GLPMCFG_LPM_ACCEPT_CTRL_CONTROL is defined for further use. - Added setting GLPMCFG_LPM_ACCEPT_CTRL_ISOC bit in GLPMCFG register in dwc2_gadget_init_lpm function. Signed-off-by: NArtur Petrosyan <arturp@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Artur Petrosyan 提交于
According to the databook DCTL_RMTWKUPSIG bit is defined in DCTL register not in DCFG. Updated setting DCTL_RMTWKUPSIG bit to DCTL register. Fixes: 187c5298 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: NArtur Petrosyan <arturp@synopsys.com> Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 02 10月, 2018 7 次提交
-
-
由 Grigor Tovmasyan 提交于
Added interrupt handler for WkupAlert interrupt. This interrupt should initiate Remote Wake up. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
WKUP_ALERT interrupt should be unmask when lpm mode is enabled. This interrupt is asserted when the device is in L1 for the duration mentioned in GREFCLK.SOF_CNN_WKUP_ALERT. This is used to alert SW to initiate Remote wake up so that the device resumes in time in order not to lose sync with the host frame number. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
Added dwc2_gadget_program_ref_clk function to program GREFCLK register in device mode. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
In service interval based scheduling target (u)frame must be set as a last frame in this the service interval. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
Added dwc2_gadget_dec_frame_num_by_one() function in gadget.c. This function will be used to calculate descriptor frame number field value. For service interval mode frame number in descriptor should point to last (u)frame in the interval. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Grigor Tovmasyan 提交于
Added core parameter for service interval based scheduling. Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NGrigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Minas Harutyunyan 提交于
Disabling all EP's allow to reset EP's to initial state. On disconnect disable all EP's instead of just killing all requests. Because of some platform didn't catch disconnect event, same stuff added to dwc2_hsotg_core_init_disconnected() function when USB reset detected on the bus. Changed from version 1: Changed lock acquire flow in dwc2_hsotg_ep_disable() function. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 30 7月, 2018 3 次提交
-
-
由 Minas Harutyunyan 提交于
To start ISOC transfers in handlers dwc2_gadget_handle_nak() and dwc2_gadget_handle_out_token_ep_disabled() driver reads current frame number, based on which, set target frame number to start first ISOC transfer. In case if system's high IRQ latency and multiple EP's asserted interrupt in same frame, there are high probability that when reading current frame number in EP's handlers, actual frame number can be increased. As result for bInterval > 1, starting target frame will be set wrongly and all ISOC packets will be dropped. In patch "usb: dwc2: Change reading of current frame number flow" reading of current frame number done ASAP in common interrupt handler. This frame number stored in frame_number variable which used as starting frame number for ISOC EP's in above mentioned handlers. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Gevorg Sahakyan 提交于
dwc2_readl_rep/dwc2_writel_rep functions using readl/writel in a loop. Signed-off-by: NGevorg Sahakyan <sahakyan@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Gevorg Sahakyan 提交于
Added hsotg argument to dwc2_readl/writel function prototype, and also instead of address pass offset of register. hsotg will contain flag field for endianness. Also customized dwc2_set_bit and dwc2_clear_bit function for dwc2_readl/writel functions. Signed-off-by: NGevorg Sahakyan <sahakyan@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 17 7月, 2018 1 次提交
-
-
由 John Keeping 提交于
For unidirectional endpoints, the endpoint pointer will be NULL for the unused direction. Check that the endpoint is active before dereferencing this pointer. Fixes: 1b4977c7 ("usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function") Fixes: 689efb26 ("usb: dwc2: Update dwc2_handle_incomplete_isoc_out() function") Fixes: d8484552 ("usb: dwc2: Update GINTSTS_GOUTNAKEFF interrupt handling") Signed-off-by: NJohn Keeping <john@metanate.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 19 6月, 2018 1 次提交
-
-
由 Minas Harutyunyan 提交于
PID bitfield in descriptor should be set based on particular request length, not based on EP's mc value. PID value can't be set to 0 even request length is 0. Signed-off-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-