Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161140AbbKSTJ6 (ORCPT ); Thu, 19 Nov 2015 14:09:58 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:39806 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbbKSTJ4 convert rfc822-to-8bit (ORCPT ); Thu, 19 Nov 2015 14:09:56 -0500 From: John Youn To: Felipe Balbi , Doug Anderson , "John Youn" CC: Yunzhi Li , =?iso-8859-1?Q?Heiko_St=FCbner?= , "open list:ARM/Rockchip SoC..." , Julius Werner , "Herrero, Gregory" , "Kaukab, Yousaf" , Dinh Nguyen , "Greg Kroah-Hartman" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them Thread-Topic: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them Thread-Index: AQHRFnai8Um1uMkwQEqCFc/AlKfO/A== Date: Thu, 19 Nov 2015 19:09:51 +0000 Message-ID: <2B3535C5ECE8B5419E3ECBE30077290901DC3D79C8@US01WEMBX2.internal.synopsys.com> References: <1446582629-30091-1-git-send-email-dianders@chromium.org> <1446582629-30091-2-git-send-email-dianders@chromium.org> <87wpthnc2e.fsf@saruman.tx.rr.com> <2B3535C5ECE8B5419E3ECBE30077290901DC3D696B@US01WEMBX2.internal.synopsys.com> <877fldg8d9.fsf@saruman.tx.rr.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.161.116] Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1647 Lines: 48 On 11/19/2015 10:19 AM, Felipe Balbi wrote: > > Hi, > > Doug Anderson writes: >>>>> isn't this a regression ? You're first clearing the interrupts and only >>>>> then reading to check what's pending, however, what's pending has just >>>>> been cleared. Seems like this should be: >>>>> >>>>> hprt0 = dwc2_readl(HPRT0); >>>>> dwc2_writeal(PRTINT, GINTSTS); >>>> >>>> Actually, we could probably remove the setting of GINTSTS_PRTINT >>>> completely. The docs I have say that the GINTSTS_PRTINT is read only >>>> and that: >>>> >>>>> The core sets this bit to indicate a change in port status of one of the >>>>> DWC_otg core ports in Host mode. The application must read the >>>>> Host Port Control and Status (HPRT) register to determine the exact >>>>> event that caused this interrupt. The application must clear the >>>>> appropriate status bit in the Host Port Control and Status register to >>>>> clear this bit. >>>> >>>> ...so writing PRTINT is probably useless, but John can confirm. >>>> >>> >>> Yup, it seems it can be removed. >> >> How do you guys want this handled? Should I send up a new version of >> this patch? ...or should I send a followon patch that does this >> removal? > > I'll leave the final decision to John, but my opinion is that a new > version of the patch would be preferrable. > Hi Doug, Could you resend with the change? Regards, John -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/