Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp390670iob; Mon, 2 May 2022 23:54:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcSg16Pe8M4p8W0V0Ry0R5pv1iFIYZ0HvI814WfFF0Ja273G+buNdo/PrUM5lVSF5SuQ3V X-Received: by 2002:a05:6512:12d4:b0:472:52fd:ca62 with SMTP id p20-20020a05651212d400b0047252fdca62mr10276761lfg.39.1651560878714; Mon, 02 May 2022 23:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651560878; cv=none; d=google.com; s=arc-20160816; b=0/TtORxb5UDb5Iadgc7jsYE34kWYblrbrz5XedFDq3siDKavwyWFvMp/3/L5ZLuHIl XK3j+6qX6KUbjGDlwIa9TbMAOkyFJHz1mXFDARnNPncwvJq84j82+7SnCZ4/8mG9rRql Ugn3piP3eGRhuE+X/0sOQAomMhvMsl5NWSnOnONuyQKg53uGk0xD5fVz6h7zR+OrOfda n5eSIiWBbZq/fs1cLCn80BrjvF9lwI/msruSyZHjqJTJxQZfYccSIPwHdhELFM5q67fP P6YDyfCStubnn6mOU0gDZAA8+pi9bwNGaoAhfLYMem7w5e4JErDdsOBH8So8NXZr56a1 yA0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=v8MmPzwl2lp0qT4RRcx9jpE3gXaEx+C80zfCSbZItmk=; b=BuNyuC6gwLl7csbvwdl6LbPsADe2MlAR4jh4W7ZO/GrFyH86YJKyaRkRb1FnKUswwK wtNKl95sp1z/8H2gFPqiG/HtdiJBiQQCujUzci+bsVbMjP9dlBJbSYui17y7P0Rkr/xw tbmfaSA9/UrpuBnClsEBvPorgPeTAVob6Fa0NFkERN97JUbaSMw265dwHHlsKy+MIbse +rv6m0JsRM4MuiV3g5NIB5+eqGUuvbGY9yQXDmxdz3SHtDCNMTleefa21a8Qrvbu+Vmq C6Vl4RnEEVS14RZDIXOkdONVSuVEUDlWeJNsUJHo8Jihon7naXFU4nh0GRyLbFfVa/ia Xq8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=yZZZ1Yhj; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=CU0X0MZa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a056512308700b00473a2ec5e45si2508889lfd.186.2022.05.02.23.54.11; Mon, 02 May 2022 23:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=yZZZ1Yhj; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=CU0X0MZa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbiECGgG (ORCPT + 99 others); Tue, 3 May 2022 02:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229928AbiECGfC (ORCPT ); Tue, 3 May 2022 02:35:02 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98935381BC; Mon, 2 May 2022 23:31:30 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 55CAA210EE; Tue, 3 May 2022 06:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651559489; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v8MmPzwl2lp0qT4RRcx9jpE3gXaEx+C80zfCSbZItmk=; b=yZZZ1Yhj6WFqcOB3T+dFkHRx2YoQ5v/uB+PvpARHCw993viZeYyyhq3xz4jhtE04+2uN7n El/xQlhJrrLYAag7oux4z4LwaVTcDCpATDil6UwNU5eMlIvy60sgUfo4Jmu5X6UGcSx98d 2yGhv9HZyl43GG0APYfF9Xu8+XtBCaY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651559489; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v8MmPzwl2lp0qT4RRcx9jpE3gXaEx+C80zfCSbZItmk=; b=CU0X0MZaKwV/xK5wQtV1xuEyVMoMa27yyHT1O9L2exNLpphfc/eEeZScW/lrIJJ+P1ZGIA 4mGTJesrWn1SyCCA== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F3BD22C149; Tue, 3 May 2022 06:31:28 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Andrei Pistirica Subject: [PATCH 11/11] serial: pic32: restore disabled irqs in pic32_uart_startup() Date: Tue, 3 May 2022 08:31:22 +0200 Message-Id: <20220503063122.20957-12-jslaby@suse.cz> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220503063122.20957-1-jslaby@suse.cz> References: <20220503063122.20957-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pic32_uart_startup() disables interrupts by local_irq_save(). But the function never enables them. The serial core only holds a mutex, so irqs are not restored. So how could this driver work? This irq handling was already present in the driver's initial commit 157b9394709ed (serial: pic32_uart: Add PIC32 UART driver). So is it a candidate for removal? Anyone has a contact to the author: Andrei Pistirica (I believe the one below -- @microchip.com -- will bounce)? Or to someone else @microchip.com? Cc: Andrei Pistirica Signed-off-by: Jiri Slaby --- drivers/tty/serial/pic32_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index c5584628f8c4..b399aac530fe 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -564,6 +564,8 @@ static int pic32_uart_startup(struct uart_port *port) /* enable all interrupts and eanable uart */ pic32_uart_en_and_unmask(port); + local_irq_restore(flags); + enable_irq(sport->irq_rx); return 0; -- 2.36.0