From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AD40C7618A for ; Thu, 16 Mar 2023 20:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjCPUVZ (ORCPT ); Thu, 16 Mar 2023 16:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjCPUVV (ORCPT ); Thu, 16 Mar 2023 16:21:21 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1818733A7 for ; Thu, 16 Mar 2023 13:21:19 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id d13so2882449pjh.0 for ; Thu, 16 Mar 2023 13:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1678998079; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q3i1too33EMahveRbuxNasAN0FfHWaolQncNRUeKk3s=; b=R9oM9aXd2Sn6h4bV0qBQKGi1qHrcdBjSrcHuV+y6QBP/Jn6Z911RI6cVBP4wJ1wcul rKxVuPuEEl3ZQBPkJUSgcVFGOOI5sgLW3w8gFyX3MGy9Ic7dOJmAAFMogXNEFs+xSDWW 4zBkSHGamxKFL+TaLmsN3X1dZON4TpUUMMhtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678998079; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q3i1too33EMahveRbuxNasAN0FfHWaolQncNRUeKk3s=; b=BfAHRYRVodrBdMPq3bikjikHEeyZtu1Mx4zxOEsWZYqDxe4hD6qgJuaO6PUKS6MZCL zzDwTqveO0qphYewGBSf+opvTX9NU/9YbT7CrV/ZeJqLtlgNmnuNoBDU6WZJbRfT3k62 KbgLdUzmr+so04BKdRmcalG7Tr3/Eq39nM0b3UlriTI3Hmff+oCBo0ddlpO+M6M+cypo hfzZp0b9bSA6BJ/6vms1Q3iDxHMWOd5e+gpXcfUgkpQCusCNQ6PeSQ/BvgC91vH3Bxee cLpSbsjKkzjmX3EkDC4LAmBSCaMTxusf37Ox5pOWUy8Gjuntxm9A0qv+TAwzbiUWp4XP yXvg== X-Gm-Message-State: AO0yUKX1bK8UNjTrdM9srgFiYSTQeIV6N8AacK3brhc8gLlTg2Zyk9IK zD0ZHw5fvqWgAl42cvETtcQMVw== X-Google-Smtp-Source: AK7set9yssgAFQezxJ/RfIneXy6O9/6hx6IWvENqFQh8FK49jmaaVVUPU6K/d3qqZDHF4VNoOI1Xyg== X-Received: by 2002:a17:90b:350f:b0:23f:35c8:895 with SMTP id ls15-20020a17090b350f00b0023f35c80895mr2925707pjb.32.1678998079225; Thu, 16 Mar 2023 13:21:19 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:4db6:6f23:6ad2:998d]) by smtp.gmail.com with ESMTPSA id b4-20020a17090a5a0400b0023acdac248dsm24114pjd.15.2023.03.16.13.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 13:21:18 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, Jiri Slaby , Bartosz Golaszewski , Daniel Thompson , kgdb-bugreport@lists.sourceforge.net, Konrad Dybcio , linux-serial@vger.kernel.org, Douglas Anderson , Andy Gross , linux-kernel@vger.kernel.org Subject: [RESEND PATCH 0/2] tty: serial: Fix kgdb on qcom-geni-serial when no other UART users Date: Thu, 16 Mar 2023 13:20:55 -0700 Message-Id: <20230316202057.4070382-1-dianders@chromium.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Today to get kgdb to work on qcom-geni-serial devices you need _something_ to init/power on the UART. This could either the kernel console output or an "agetty" running on the port. If nothing else powers the port then you'll end up getting a silent hang when you try to enter kgdb. Let's fix this. The first patch here is for the tty layer to make sure that we power on the port when we init it for polling. This would be important for any drivers similar to qcom-geni-serial that actually need to be powered on. The second patch here hooks up the poll_init() function for qcom-geni-serial, leveraging an existing function in the driver that does everything we need. Originally these two patches were bundled together as pathes 2 and 3 of a 3-patch series. We no longer need the first patch from the orginal series since we landed a similar patch from Johan [1] instead. The second two patches are still useful, though, so I've reposted them alone and added this cover letter. [1] https://lore.kernel.org/r/20230307164405.14218-1-johan+linaro@kernel.org Douglas Anderson (2): serial: uart_poll_init() should power on the UART tty: serial: qcom-geni-serial: Add a poll_init() function drivers/tty/serial/qcom_geni_serial.c | 1 + drivers/tty/serial/serial_core.c | 6 ++++++ 2 files changed, 7 insertions(+) -- 2.40.0.rc1.284.g88254d51c5-goog