From a76eb92cc2e92fdb5c91570b264241e51a72ab42 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 24 Mar 2016 19:14:16 -0700 Subject: [PATCH] Cr50: Fix subtle USB error in clearing global NAKs We clear global NAKs by writing bits in the USB_DCTL register. However, prior to this CL we were overwriting the entire register, not just touching individual bits. Since we've never actually set any global NAKs, this mistake didn't have any noticeable effects. But we should still do the right thing in case we need it later. BUG=chrome-os-partner:50721 BRANCH=none TEST=make buildall; test on Cr50 No visible change; everything continues to work. Change-Id: Ia25d95dc6211e5460132622ac005723f43b00e24 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/335190 Reviewed-by: Randall Spangler --- chip/g/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chip/g/usb.c b/chip/g/usb.c index f9ce50725e..4912b0d7ad 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -1103,10 +1103,10 @@ void usb_interrupt(void) } if (status & GINTSTS(GOUTNAKEFF)) - GR_USB_DCTL = DCTL_CGOUTNAK; + GR_USB_DCTL |= DCTL_CGOUTNAK; if (status & GINTSTS(GINNAKEFF)) - GR_USB_DCTL = DCTL_CGNPINNAK; + GR_USB_DCTL |= DCTL_CGNPINNAK; GR_USB_GINTSTS = status;