From patchwork Wed Apr 23 14:58:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 28898 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EE012203AC for ; Wed, 23 Apr 2014 15:01:35 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id i50sf809440qgf.5 for ; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=2Kt58GKyeIQvS8lzSKTRJYO+FeKvJ5mlomTCHy1w72U=; b=Hz7uPDg+Enk6cTA4kca5RcPu4oWAYAkkCUa3hyX+aHmUG3lzeBeZZFvl59XqMHP4dw dyprxyaU7f3AKoifaQp3kDOTL1nbGnhgOl6QF6ty5+nAzLLB4atM5tU+F8UQWqS/4CRk znJq3S64AJLj5d4UUfqlJpD40xfJNXPOhf6cJ2+e1HRTPt7o5l6nwa1rNSFt97WtDfxo FkUykJxFWtaPIq1hBeHrDEfMYmPtv1dEEF3Mor78EIDCVNtkYmRg4w5wSZ/++sscHhNY Z+5qOYpfjVRKNQeEdsoN/TzmkiMYcprn23rpCbOrMJ45kuOR/gTL37QyS3sEY2X7DvOG EhJg== X-Gm-Message-State: ALoCoQmwUUWqA2rzdwu793AXQ8GhD8sQyMH/xis4vKrOAj48pYhNllmICgqG8irmkpMTD5Mx7ujM X-Received: by 10.224.13.12 with SMTP id z12mr24142500qaz.7.1398265295297; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls701618qgf.84.gmail; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) X-Received: by 10.220.69.4 with SMTP id x4mr151983vci.74.1398265295102; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id fa16si209838veb.136.2014.04.23.08.01.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 08:01:35 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so1243121veb.40 for ; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) X-Received: by 10.220.5.129 with SMTP id 1mr289446vcv.71.1398265295008; Wed, 23 Apr 2014 08:01:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp110605vcb; Wed, 23 Apr 2014 08:01:34 -0700 (PDT) X-Received: by 10.182.250.200 with SMTP id ze8mr1639291obc.72.1398265294232; Wed, 23 Apr 2014 08:01:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pn4si757791pac.421.2014.04.23.08.01.33; Wed, 23 Apr 2014 08:01:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757355AbaDWPBS (ORCPT + 27 others); Wed, 23 Apr 2014 11:01:18 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:49062 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753686AbaDWPBJ (ORCPT ); Wed, 23 Apr 2014 11:01:09 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3NF126l003993; Wed, 23 Apr 2014 10:01:02 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3NF12vR021559; Wed, 23 Apr 2014 10:01:02 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 23 Apr 2014 10:01:01 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3NF11f0027677; Wed, 23 Apr 2014 10:01:01 -0500 From: Felipe Balbi To: Greg KH CC: , , , , , Linux Kernel Mailing List , , , , Linux OMAP Mailing List , Tony Lindgren , Felipe Balbi Subject: [PATCH 03/13] Revert "serial: omap: unlock the port lock" Date: Wed, 23 Apr 2014 09:58:27 -0500 Message-ID: <1398265117-11793-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.2.459.g68773ac In-Reply-To: <1398265117-11793-1-git-send-email-balbi@ti.com> References: <1398265117-11793-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This reverts commit 0324a821029e1f54e7a7f8fed48693cfce42dc0e. That commit tried to fix a deadlock problem when using hci_ldisc, but it turns out the bug was in hci_ldsic all along where it was calling ->write() from within ->write_wakeup() callback. The problem is that ->write_wakeup() was called with port lock held and ->write() tried to grab the same port lock. Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 08b6b94..837f6c1 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -398,11 +398,8 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr) break; } while (--count > 0); - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) { - spin_unlock(&up->port.lock); + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&up->port); - spin_lock(&up->port.lock); - } if (uart_circ_empty(xmit)) serial_omap_stop_tx(&up->port);