Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2151273ybh; Fri, 13 Mar 2020 13:47:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsKWARVmvMlDLJPZrGQT7dtw3eLjbZJdAag3eSoOr71fxPAxh+7w7dtvTRltSc5mztqEj14 X-Received: by 2002:aca:dc8b:: with SMTP id t133mr8731802oig.98.1584132470517; Fri, 13 Mar 2020 13:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584132470; cv=none; d=google.com; s=arc-20160816; b=zirWAMnme9JOCQ/w0IOGg/234Hcpv0UQ6YtLG0ODGstGfEKJusbEr+3pXrtxKVjZcb 1j1Jm9ye7bLiqezr8gjnm8SoTP1cBMeCiDfcyUN/6+srYBlhmtvvo4ZBdRkdncFAv4L2 u7TP08R9y6p4+9obXZi+UYJdalBODXsYIBmbRUU+drEh6e1IjgIo3arTuz/lCE5leS01 nzx2Ra+xYkNPQLsVRtWII+9FAQfkGRP5Zck36qByY+gdfZfZG0bn/uAkDGFKYUBbG0zE MMIgIYo/GYNM8uAejKB6ba0ioX8mkId3+CxJOaNELMTJJYSGFiXV7iwZ4fglF4jBpm9c hYUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZnKWe5Bitvm6HNCJn4nVCZ5y8dNJJUHTl0yto409qyY=; b=0uKjF3VKNctze8ITsRAvzlzLyrXuQowHVhYpTMpaptylFa6JV9JiEj+S/Se87Rtb40 aXsr6Y72fRdlSB/FeikHv5xIjrAzNXOmkA5mgpulQn1w6s3K1/ryq9QnXGf3P7r/4BTP lMVCmAzpwvMRvDub2Yi4Y314LWcRgeesRAD6gXZSviutWsHeZfjR97ibLANwp8q/ODIz su/Ig5kvw+t1rS1vDzolurrSDFxbA/cYePjr5pt+n8A6zEhpExM0rRS3jvALrHqOdGkk BrNsSzycHjUdnRWc5aMtp6Z0uMJ+bHo4V1VofOJZkjFVIhtK9oywfNmb/axK3wrtmFx/ SeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OLfls09r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si4996952oib.154.2020.03.13.13.47.37; Fri, 13 Mar 2020 13:47:50 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OLfls09r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727357AbgCMUrW (ORCPT + 99 others); Fri, 13 Mar 2020 16:47:22 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44225 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726949AbgCMUrW (ORCPT ); Fri, 13 Mar 2020 16:47:22 -0400 Received: by mail-pl1-f194.google.com with SMTP id d9so4819760plo.11 for ; Fri, 13 Mar 2020 13:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZnKWe5Bitvm6HNCJn4nVCZ5y8dNJJUHTl0yto409qyY=; b=OLfls09rQF1wozKG2lePYqatpiYhqrd+Eq4NXV+WaxGp0AwpkZyKs5j5H9Czd89YJu Lnkds9VKW8VGN7M2OfoTvQEAy8tP8W+TAbAM3dxbO3XCD0fAg3d6VeyauoU1/ZIWL1pr K5CzAYa0jVWTBcascq4e5bUIUdJoyaCCDsJ9Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZnKWe5Bitvm6HNCJn4nVCZ5y8dNJJUHTl0yto409qyY=; b=KmIiI31y3y090LNaF56ijcnz7sHtfaSQGov9VczAjoiIkvrsQVBOCSQcswzwPFrNvC Ak0niyaeih3wd/qWwBwH9eQbAS5l7sYw1TQ/ku/KDvy5SWm6oGPLzn3CUNg7DEeHtBW/ cEAWY6/1xasJOiawSCu7eGGHpHloNvImbpdgkWZKGDfFuC7VDPpYa1qIRV+8MfN9s4Jf 437XFj9VgugN8LJhDgZHZREjyFD7wIgYrx9ynAOhQeOL/Dgy1Urkh+f9zAsatFUEwLgf +GjrR8u6WqhBhXqvTcikMM6E2x+7GNTvGhK88F7XFC+DyTLVa20pI1o02dYZw+E5viZi W2sw== X-Gm-Message-State: ANhLgQ0S3cMjyywcVrF8xmEKKhsqVLuoSPam0ywL2FQBDcpwvC5vmWJ/ unIhSJQYVK+yX5sJkV2y2b+0kA== X-Received: by 2002:a17:90b:3711:: with SMTP id mg17mr10382797pjb.73.1584132440939; Fri, 13 Mar 2020 13:47:20 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id a13sm26532278pfc.24.2020.03.13.13.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 13:47:20 -0700 (PDT) From: Douglas Anderson To: gregkh@linuxfoundation.org Cc: mka@chromium.org, swboyd@chromium.org, ryandcase@chromium.org, bjorn.andersson@linaro.org, akashast@codeaurora.org, skakit@codeaurora.org, rojay@codeaurora.org, mgautam@codeaurora.org, Douglas Anderson , Andy Gross , Doug Anderson , Girish Mahadevan , Jiri Slaby , Karthikeyan Ramasubramanian , Sagar Dharia , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 1/2] tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown Date: Fri, 13 Mar 2020 13:46:51 -0700 Message-Id: <20200313134635.1.Icf54c533065306b02b880c46dfd401d8db34e213@changeid> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On a board using qcom_geni_serial I found that I could no longer interact with kdb if I got a crash after the "agetty" running on the same serial port was killed. This meant that various classes of crashes that happened at reboot time were undebuggable. Reading through the code, I couldn't figure out why qcom_geni_serial felt the need to run so much code at port shutdown time. All we need to do is disable the interrupt. After I make this change then a hardcoded kgdb_breakpoint in some late shutdown code now allows me to interact with the debugger. I also could freely close / re-open the port without problems. Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP") Signed-off-by: Douglas Anderson --- drivers/tty/serial/qcom_geni_serial.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 272bae0eebc7..09d8612517aa 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -827,17 +827,11 @@ static void get_tx_fifo_size(struct qcom_geni_serial_port *port) static void qcom_geni_serial_shutdown(struct uart_port *uport) { - unsigned long flags; - /* Stop the console before stopping the current tx */ if (uart_console(uport)) console_stop(uport->cons); disable_irq(uport->irq); - spin_lock_irqsave(&uport->lock, flags); - qcom_geni_serial_stop_tx(uport); - qcom_geni_serial_stop_rx(uport); - spin_unlock_irqrestore(&uport->lock, flags); } static int qcom_geni_serial_port_setup(struct uart_port *uport) -- 2.25.1.481.gfbce0eb801-goog