linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/17] usb: xhci-mtk: remove or operator for setting schedule parameters
@ 2021-03-05  9:02 Chunfeng Yun
  2021-03-05  9:02 ` [PATCH 02/17] usb: xhci-mtk: improve bandwidth scheduling with TT Chunfeng Yun
                   ` (15 more replies)
  0 siblings, 16 replies; 26+ messages in thread
From: Chunfeng Yun @ 2021-03-05  9:02 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman, Ikjoon Jang
  Cc: Chunfeng Yun, Matthias Brugger, linux-usb, linux-arm-kernel,
	linux-mediatek, linux-kernel, Nicolas Boichat, Eddie Hung,
	stable

Side effect may happen if use or operator to set schedule parameters
when the parameters are already set before. Set them directly due to
other bits are reserved.

Fixes: 54f6a8af3722 ("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci-mtk-sch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
index b45e5bf08997..5891f56c64da 100644
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -643,7 +643,7 @@ int xhci_mtk_add_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev,
 		 */
 		if (usb_endpoint_xfer_int(&ep->desc)
 			|| usb_endpoint_xfer_isoc(&ep->desc))
-			ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(1));
+			ep_ctx->reserved[0] = cpu_to_le32(EP_BPKTS(1));
 
 		return 0;
 	}
@@ -730,10 +730,10 @@ int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
 		list_move_tail(&sch_ep->endpoint, &sch_bw->bw_ep_list);
 
 		ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
-		ep_ctx->reserved[0] |= cpu_to_le32(EP_BPKTS(sch_ep->pkts)
+		ep_ctx->reserved[0] = cpu_to_le32(EP_BPKTS(sch_ep->pkts)
 			| EP_BCSCOUNT(sch_ep->cs_count)
 			| EP_BBM(sch_ep->burst_mode));
-		ep_ctx->reserved[1] |= cpu_to_le32(EP_BOFFSET(sch_ep->offset)
+		ep_ctx->reserved[1] = cpu_to_le32(EP_BOFFSET(sch_ep->offset)
 			| EP_BREPEAT(sch_ep->repeat));
 
 		xhci_dbg(xhci, " PKTS:%x, CSCOUNT:%x, BM:%x, OFFSET:%x, REPEAT:%x\n",
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-03-08 11:12 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  9:02 [PATCH 01/17] usb: xhci-mtk: remove or operator for setting schedule parameters Chunfeng Yun
2021-03-05  9:02 ` [PATCH 02/17] usb: xhci-mtk: improve bandwidth scheduling with TT Chunfeng Yun
2021-03-05  9:02 ` [PATCH 03/17] usb: xhci-mtk: get the microframe boundary for ESIT Chunfeng Yun
2021-03-05  9:13   ` Sergei Shtylyov
2021-03-05  9:16     ` Greg Kroah-Hartman
2021-03-08  1:57     ` Chunfeng Yun
2021-03-05  9:02 ` [PATCH 04/17] usb: xhci-mtk: add only one extra CS for FS/LS INTR Chunfeng Yun
2021-03-05  9:02 ` [PATCH 05/17] usb: xhci-mtk: use @sch_tt to check whether need do TT schedule Chunfeng Yun
2021-03-05  9:02 ` [PATCH 06/17] usb: xhci-mtk: add a function to (un)load bandwidth info Chunfeng Yun
2021-03-05  9:02 ` [PATCH 07/17] usb: xhci-mtk: add a function to get bandwidth boundary Chunfeng Yun
2021-03-05  9:02 ` [PATCH 08/17] usb: xhci-mtk: remove unnecessary members of mu3h_sch_tt struct Chunfeng Yun
2021-03-05  9:02 ` [PATCH 09/17] usb: xhci-mtk: use clear type instead of void Chunfeng Yun
2021-03-05  9:02 ` [PATCH 10/17] usb: xhci-mtk: add a member @speed in mu3h_sch_ep_info struct Chunfeng Yun
2021-03-05  9:02 ` [PATCH 11/17] usb: xhci-mtk: use @tt_info to check the FS/LS device is under a HS hub Chunfeng Yun
2021-03-05  9:02 ` [PATCH 12/17] usb: xhci-mtk: rebuild the way to get bandwidth domain Chunfeng Yun
2021-03-05  9:02 ` [PATCH 13/17] usb: xhci-mtk: add some schedule error number Chunfeng Yun
2021-03-05  9:02 ` [PATCH 14/17] usb: xhci-mtk: remove declaration of xhci_mtk_setup() Chunfeng Yun
2021-03-05  9:02 ` [PATCH 15/17] usb: xhci-mtk: support to build xhci-mtk-hcd.ko Chunfeng Yun
2021-03-07 16:00   ` Greg Kroah-Hartman
2021-03-08 11:13     ` Mathias Nyman
2021-03-05  9:02 ` [PATCH 16/17] usb: common: add function to get interval expressed in us unit Chunfeng Yun
2021-03-05 15:33   ` Alan Stern
2021-03-05 15:47     ` Greg Kroah-Hartman
2021-03-08  2:02       ` Chunfeng Yun
2021-03-08  1:58     ` Chunfeng Yun
2021-03-05  9:02 ` [PATCH 17/17] usb: xhci-mtk: print debug info of endpoint interval Chunfeng Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).