Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1676071
| From | Al Cooper <alcooperx@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/8] usb: bdc: fix "xsf for ep not enabled" errror |
| Date | 2017-06-27 20:30 +0200 |
| Message-ID | <tX3pp-4kt-45@gated-at.bofh.it> (permalink) |
| References | <tX3pn-4kt-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch essentially clears the port status change bits at the
correct times. It is necessary because the driver was not handling
the change bits correctly for events during device
connection/disconnection and bus enumeration. So, one of them (PCC)
was left stuck sometimes causing the "xsf for ep not enabled"
error we get on first connection. This was found by the Android team.
This was debugged and fixed by Sasi Kumar.
Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
drivers/usb/gadget/udc/bdc/bdc_udc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/udc/bdc/bdc_udc.c b/drivers/usb/gadget/udc/bdc/bdc_udc.c
index aae7458..c843461 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_udc.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_udc.c
@@ -249,6 +249,7 @@ void bdc_sr_uspc(struct bdc *bdc, struct bdc_sr *sreport)
disconn = true;
else if ((uspc & BDC_PCS) && !BDC_PST(uspc))
connected = true;
+ clear_flags |= BDC_PCC;
}
/* Change in VBus and VBus is present */
@@ -259,16 +260,16 @@ void bdc_sr_uspc(struct bdc *bdc, struct bdc_sr *sreport)
bdc_softconn(bdc);
usb_gadget_set_state(&bdc->gadget, USB_STATE_POWERED);
}
- clear_flags = BDC_VBC;
+ clear_flags |= BDC_VBC;
} else if ((uspc & BDC_PRS) || (uspc & BDC_PRC) || disconn) {
/* Hot reset, warm reset, 2.0 bus reset or disconn */
dev_dbg(bdc->dev, "Port reset or disconn\n");
bdc_uspc_disconnected(bdc, disconn);
- clear_flags = BDC_PCC|BDC_PCS|BDC_PRS|BDC_PRC;
+ clear_flags |= BDC_PRC;
} else if ((uspc & BDC_PSC) && (uspc & BDC_PCS)) {
/* Change in Link state */
handle_link_state_change(bdc, uspc);
- clear_flags = BDC_PSC|BDC_PCS;
+ clear_flags |= BDC_PSC;
}
/*
--
1.9.0.138.g2de3478
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/8] Bugs fixes and improvements to Broadcom BDC driver Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH 6/8] usb: bdc: Add support for suspend/resume Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH 5/8] usb: gadget: bdc: hook a quick Device Tree compatible string Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH] usb: gadget: bdc: fix platform_no_drv_owner.cocci warnings kbuild test robot <lkp@intel.com> - 2017-06-29 01:50 +0200
Re: [PATCH 5/8] usb: gadget: bdc: hook a quick Device Tree compatible string kbuild test robot <lkp@intel.com> - 2017-06-29 01:50 +0200
[PATCH 1/8] usb: gadget: bdc: Fix misleading register names Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH 8/8] usb: bdc: Enable in Kconfig for ARCH_BRCMSTB systems Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH 2/8] usb: bdc: Add Device Tree binding document for Broadcom BDC driver Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
[PATCH 7/8] usb: bdc: fix "xsf for ep not enabled" errror Al Cooper <alcooperx@gmail.com> - 2017-06-27 20:30 +0200
csiph-web