From patchwork Thu Mar 20 19:30:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 26760 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B028D20143 for ; Thu, 20 Mar 2014 19:35:13 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id lx4sf4595047iec.3 for ; Thu, 20 Mar 2014 12:35:13 -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=rcTdLxg7etehcpWWlRV1ZbZ9WukOk5WosO7FX4Ks1po=; b=mzF2mqUz7qOsm2YvFSlND6C+KZpTmiJiZrEUYZBM1GZFabTUjxFo4NwTJonFRkm2iV 3ml7yUBWD+5JAexInDEuMnV4sb/uujDelSMOW0IWOqu20VuQhfw5FUfuLtfR/bBHE47v bPDUOWxglmv+V9HU+MpmZDI862v1WBZknem3kpIAVeVPl5wyZBrZPApvOyghMVee4wBY pBZLkEsJ65EyM6IsKI3tRkGBmOXQCIj/dvEqT9j9USMfgECn/sBnLtbjWNKAopEtIxfk s6RwpzL2exTt3q8t0yG/sC3VQqJ5Y3UAAsXQ0Vfj8b2Lyw8/wBnYIotCvueFzM6wnhH3 L1eg== X-Gm-Message-State: ALoCoQm+WcVKt3AOlUtxFZ/JrF03tD9WOR36JVj2iIXh4zWpLJ3IzhTPEDfiy2fDwLrxjkAwWOOa X-Received: by 10.182.85.65 with SMTP id f1mr4189079obz.33.1395344113140; Thu, 20 Mar 2014 12:35:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.72 with SMTP id l66ls340473qge.16.gmail; Thu, 20 Mar 2014 12:35:13 -0700 (PDT) X-Received: by 10.58.57.67 with SMTP id g3mr34549439veq.3.1395344113001; Thu, 20 Mar 2014 12:35:13 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id kj3si663996vdb.69.2014.03.20.12.35.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 12:35:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id cz12so1500918veb.35 for ; Thu, 20 Mar 2014 12:35:12 -0700 (PDT) X-Received: by 10.52.161.130 with SMTP id xs2mr1407818vdb.49.1395344112897; Thu, 20 Mar 2014 12:35:12 -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.78.9 with SMTP id i9csp414067vck; Thu, 20 Mar 2014 12:35:12 -0700 (PDT) X-Received: by 10.68.200.74 with SMTP id jq10mr4383473pbc.169.1395344111873; Thu, 20 Mar 2014 12:35:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xn1si2094227pbc.137.2014.03.20.12.35.11; Thu, 20 Mar 2014 12:35:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965149AbaCTTcM (ORCPT + 26 others); Thu, 20 Mar 2014 15:32:12 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:53502 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754341AbaCTTcH (ORCPT ); Thu, 20 Mar 2014 15:32:07 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2KJW4Vf012743; Thu, 20 Mar 2014 14:32:04 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KJW4V3018067; Thu, 20 Mar 2014 14:32:04 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 20 Mar 2014 14:32:04 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KJW4eP029992; Thu, 20 Mar 2014 14:32:04 -0500 From: Felipe Balbi To: Greg KH CC: , , , , , Linux OMAP Mailing List , Linux Kernel Mailing List , Felipe Balbi Subject: [PATCH 10/11] Revert "serial: omap: unlock the port lock" Date: Thu, 20 Mar 2014 14:30:06 -0500 Message-ID: <1395343807-21618-10-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.1.286.g5172cb3 In-Reply-To: <1395343807-21618-1-git-send-email-balbi@ti.com> References: <1395343807-21618-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: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 b092d3d..be10e7e 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -380,11 +380,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);