Message ID | 20200310123615.221930865@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=QSPG=43=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A23AC10F27 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:34:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3388F24681 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 13:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583847247; bh=aAh8HTcpkWTgZrwIhaEle/qErc1CXYXt6Pbh6xGrSBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Mb2w+88mY+gqIVZkiHgNYtsk8kvYchVYRKia6zIvcTxs0IgtLfRXooi+F6ZXJNf2i B/iXTylxMVk3D2m3oUwo6nwB3nG23dXPKnnk9038LiYYo7/d87vjNTNxStsbDgHGlK 1H/oZdXBmtWk1/zTl+kCF5OsWhlzeLUkknO9ybX4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727560AbgCJNeG (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 10 Mar 2020 09:34:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726438AbgCJMrD (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 10 Mar 2020 08:47:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B97772468D; Tue, 10 Mar 2020 12:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844423; bh=aAh8HTcpkWTgZrwIhaEle/qErc1CXYXt6Pbh6xGrSBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tLSZFmkxel7mNUgVEvvwXwKTViYmW/eCSaib2VtUBLMynFsoQ3xuqCzYHmnVgxxNE cDI4j3sUkkUy+iAVilLn/bq7bx0v0rnKW2KXPJYE3AOJU2qc9CBpvywDx3pB5HZhYJ EaW48akSYp+un4Jq6g2uxfnrIjh3PnKPCKsU7TS0= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Li RongQing <lirongqing@baidu.com>, Kurt Kanzenbach <kurt@linutronix.de>, Vikram Pandita <vikram.pandita@ti.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH 4.9 38/88] serial: 8250: Check UPF_IRQ_SHARED in advance Date: Tue, 10 Mar 2020 13:38:46 +0100 Message-Id: <20200310123615.221930865@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -181,7 +181,7 @@ static int serial_link_irq_chain(struct struct hlist_head *h; struct hlist_node *n; struct irq_info *i; - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; + int ret; mutex_lock(&hash_mutex); @@ -216,9 +216,8 @@ static int serial_link_irq_chain(struct INIT_LIST_HEAD(&up->list); i->head = &up->list; spin_unlock_irq(&i->lock); - irq_flags |= up->port.irqflags; ret = request_irq(up->port.irq, serial8250_interrupt, - irq_flags, "serial", i); + up->port.irqflags, "serial", i); if (ret < 0) serial_do_unlink(i, up); } --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2199,6 +2199,10 @@ int serial8250_do_startup(struct uart_po } } + /* Check if we need to have shared IRQs */ + if (port->irq && (up->port.flags & UPF_SHARE_IRQ)) + up->port.irqflags |= IRQF_SHARED; + if (port->irq) { unsigned char iir1; /*