From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Raja, Govindraj" Subject: Re: Suspend broken on 3.3? Date: Fri, 30 Mar 2012 15:45:19 +0530 Message-ID: References: <87vcloipow.fsf@ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8fb1ef3e51c1d104bc731f62 Return-path: Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:38837 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760655Ab2C3KPl (ORCPT ); Fri, 30 Mar 2012 06:15:41 -0400 Received: by obbwd20 with SMTP id wd20so1013479obb.18 for ; Fri, 30 Mar 2012 03:15:39 -0700 (PDT) In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Joe Woodward Cc: Paul Walmsley , Kevin Hilman , linux-omap@vger.kernel.org, Felipe Balbi , neilb@suse.de --e89a8fb1ef3e51c1d104bc731f62 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Mar 30, 2012 at 2:56 PM, Joe Woodward wrote: > ...[snip]... >> >> Could you please try attached patch and let me know if this solves the >> rx issue as well, >> without using dma mode. >> > > Right, > > I think we've getting closer, but still not quite there... > > Firstly, the patch adds an include to "iomap.h" - but this doesn't exist = in stock 3.3. Simply removing this include seemed to allow the compile to c= omplete > successfully. Sorry I forgot to specify this is needed for latest mainline. > > With this patch applied (and not in DMA mode) I now get the following: > =A0- If I leave wake-from-suspend enabled for the serial port then it wor= ks correctly (i.e. no lost/extra 0x00 characters). > =A0- If I disable wake-from-suspend for the serial port and go through a = suspend cycle (i.e. suspend and then wake), then the serial port starts to = misbehave as > before. > =A0- If I then re-enable wake-from-suspend and go through a suspend cycle= it starts to work correctly again. > > So the problem is still that if wake-from-suspend is disabled for a seria= l port, and a suspend cycle is performed then when woken the serial port wi= ll not function > correctly if operating in interrupt-mode. I tried it on my 3430sdp but strangely I don't see a 0x00 char read after disabling uart wakeups and waking up by keypad press. Probably as a quick try we can try doing uart_insert_char only if data was read from rx fifo (Attached patch) -- Thanks, Govindraj.R --e89a8fb1ef3e51c1d104bc731f62 Content-Type: application/octet-stream; name="rx_fifo_check.patch" Content-Disposition: attachment; filename="rx_fifo_check.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h0f2soe90 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvdHR5L3NlcmlhbC9vbWFwLXNlcmlhbC5jIGIvZHJpdmVycy90 dHkvc2VyaWFsL29tYXAtc2VyaWFsLmMKaW5kZXggMDU2MjBmYi4uMTNhMTVjNiAxMDA2NDQKLS0t IGEvZHJpdmVycy90dHkvc2VyaWFsL29tYXAtc2VyaWFsLmMKKysrIGIvZHJpdmVycy90dHkvc2Vy aWFsL29tYXAtc2VyaWFsLmMKQEAgLTIwNiwxMCArMjA2LDE0IEBAIHN0YXRpYyBpbmxpbmUgdm9p ZCByZWNlaXZlX2NoYXJzKHN0cnVjdCB1YXJ0X29tYXBfcG9ydCAqdXAsCiAJdW5zaWduZWQgaW50 IGZsYWcsIGxzciA9ICpzdGF0dXM7CiAJdW5zaWduZWQgY2hhciBjaCA9IDA7CiAJaW50IG1heF9j b3VudCA9IDI1NjsKKwl1OCByZWNkX2NoID0gZmFsc2U7CiAKIAlkbyB7Ci0JCWlmIChsaWtlbHko bHNyICYgVUFSVF9MU1JfRFIpKQorCQlpZiAobGlrZWx5KGxzciAmIFVBUlRfTFNSX0RSKSkgewog CQkJY2ggPSBzZXJpYWxfaW4odXAsIFVBUlRfUlgpOworCQkJcmVjZF9jaCA9IHRydWU7CisJCX0K KwogCQlmbGFnID0gVFRZX05PUk1BTDsKIAkJdXAtPnBvcnQuaWNvdW50LnJ4Kys7CiAKQEAgLTI1 OCw3ICsyNjIsOSBAQCBzdGF0aWMgaW5saW5lIHZvaWQgcmVjZWl2ZV9jaGFycyhzdHJ1Y3QgdWFy dF9vbWFwX3BvcnQgKnVwLAogCiAJCWlmICh1YXJ0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