From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH] tty: omap-serial: Keep the wakeup mechanism enabled by default Date: Fri, 20 Apr 2012 10:13:49 +0100 Message-ID: <20120420101349.357dac72@pyramind.ukuu.org.uk> References: <1334579407-16970-1-git-send-email-govindraj.raja@ti.com> <87vckyq6ti.fsf@ti.com> <87mx69nms2.fsf@ti.com> <20120418200833.24ef25ff@pyramind.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: "Raja, Govindraj" Cc: Kevin Hilman , linux-omap@vger.kernel.org, Paul Walmsley , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org List-Id: linux-serial@vger.kernel.org On Thu, 19 Apr 2012 20:00:12 +0530 "Raja, Govindraj" wrote: > On Thu, Apr 19, 2012 at 12:38 AM, Alan Cox wrote: > >> The point is that wakeups should be enabled whenever driver is in use, > >> and disabled when the driver is not in use. > > > > > > Which is the tty_port methods for initialisation and shutdown, which are > > mutex protected against each other and hang up. > > > > Not sure how the uart layer glue exposes that. > > Is it okay to read the port flags to identify the port state in > driver whether the serial port shutdown ops is called from > port_suspend or due to port closure. > > Since port_shutdown gets called even from uart_suspend_port That sounds like someone needs to fix the uart code to avoid muddling up suspend/resume/open/close then, or at least pass the needed information down. Don't rely on port->flags ideally, they may well go away in part as they cease to be needed by the lock changes. Alan