Message ID | 20240214171044.3551032-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1504302dyb; Wed, 14 Feb 2024 13:15:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+Wt1ZqtrfqyciO0LRK8RzoLaK8T5d3fOVuYKmP74j49sTPRNJ7cdkYNPktWyeiWVmtoxIBNHlfbXd+2Sv08jUCD2rlg== X-Google-Smtp-Source: AGHT+IGbwGrscUMqa93mlqothPmtbfK0cBUfghgNtDrfzGLejRP4SNgtynB4CoV4rRPJDxuG3KZm X-Received: by 2002:a0c:e303:0:b0:68c:aeef:d72b with SMTP id s3-20020a0ce303000000b0068caeefd72bmr3654609qvl.13.1707945346691; Wed, 14 Feb 2024 13:15:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707945346; cv=pass; d=google.com; s=arc-20160816; b=v4vVwzZEebFnUFvpXBsvbTLq6badR4MIT97YP/t/ndn8jECDUm/IdHBTER4f1kanRo 5+hwWMaOsy+DVhhTtNx6EiqrcjZlwjWjxXyTwNXamEMarmoi4dyr3k2zbDjdx48E79zF 5MVAl3yTBBPvqqY4aUdQu7kjg5MmBD8GpsBztacQ0kKSd/Lpg7sRzXgQ7KjNUI1Jm+30 3BnrG45uOv4VjdiQaG/sKvIuSVXUpgKUT7hBPkEYDT7R/dIa2xQhoZxjBpr4v87P9sB+ sq7bP7LqZ7Vm4B3paQcvhKEXD1dZstwUTHkgakfKzklVubQMP0+VBDFG/M+hN2nIZ+zv kKfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4yFCMjNmyMWRVWQJv603p0t3bEFW/gLucz4IBkaCGJc=; fh=pGWj8UxgRvi4spmmjMr5HbavWiLJ1AtIYBM55oZR+xs=; b=LGH9rzQPEXP+iCuaLK1UwYwIfVRWDorvCuIE1ppmT1+4HAB0nyWHzkLXBtIqPdWv5H RlIdqil0LdQsyN5SvM3hKdIaXi4tzWVKvTuxFp2zKcl5lMo08TgjS0kw3Y6PF9V9QoqX /mGa28oAgIkReRFiiyS8kNSKNLvnK0CUo7dbjr49P7xOTcBORU+wrzqZRtnd2j2i+BsD 6kzNllirREplWUqKOqUwIn8bPV4hvE25nLzfh9uGR2SQc3bs11Fc7jZ+WgthsOgskF5e 2EBI6LnQ3KDDNv/11zY01FuSS6SRji9fIlFjZ/ar5AlzpMTDH622RJApO0pPFTPKlC9g yLag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jil45KuT; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCWbVk17HbJlD+Mla/Ai2QmSmPYsQ24MPJVCWStkhWGM/NKccY/XIa5Ifkv1Nfq4MRLdeZ7IYOh0EduW1x9HW9d1Gdd+hw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 9-20020ad45b89000000b0068cbf78a4aasi6209627qvp.310.2024.02.14.13.15.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 13:15:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jil45KuT; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65620-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EFAFF1C272C3 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 17:11:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3364D61682; Wed, 14 Feb 2024 17:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jil45KuT" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0583D6088E; Wed, 14 Feb 2024 17:10:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; cv=none; b=olGfz4lvbVNZMXLZznOymKvl/At2ywjZ38//RAeSZuAf9oLg+X19rJN93ptnPoo7nEbnENVBFy7RVi/szbNT2zFLLpNlgagY20SQVxNYDup/k0VQgQgYTTfbSVigym/j0Nz59U71QEn9+wjVM0ZWUP0fznkd44Ikg99oWHWvCbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; c=relaxed/simple; bh=6SSOUnIBqCm1UlIPDdIu3o/LhTRQZBXFqS1PUYB3XUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IvxlkhqysQyIU68Nwjlm9S8G6YFSf2zt+QfanJCOERZea3jStT7MPYp6bBaWZrh4r4tBTpU7976mUw8kxPgsXU94hzYAjHHaQndhDBCFJDCBHQrBj5y47PeDp5haqP5hc7qwO7pTzb/wLae7LeDu/scxHWdZhIF1qhus4KPmkoA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jil45KuT; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707930654; x=1739466654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6SSOUnIBqCm1UlIPDdIu3o/LhTRQZBXFqS1PUYB3XUQ=; b=jil45KuTZP8wEccwSX/Avc2xP4QG07kUPh5aY1NubwKO8S5NFnIsCy9U 45rz8w6SXtvOjZQ+jP6XdktjgzlHgHu7jwuhGk32B1ijJeJ0vsC7yNNzu y8YPSOh6RdVLbOB3okOnDE4DHvXpmGgyBbHqQYi6FRtOAUwxyY8x8PAw+ i+a0aqiKIBazoo9t4VCtD2G4qpIdRktTk/hL7bnTBqcVORmZeOjmPbyOV Nr8boVZvrkeSH2/SjD9wIKCH/ENEgPwVBo9hs0i+S3GTcDFkmoUOiUSHR Wl0Bk4BQIfpzMv8DtHsr5Zirst3dsupMPo0mUjdcqk9RzEFwGG62ZZogW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458023" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458023" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617216" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617216" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A70A6A3; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH v1 1/5] serial: 8250_exar: Clear interrupts before registering handler Date: Wed, 14 Feb 2024 19:09:34 +0200 Message-ID: <20240214171044.3551032-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790910500119171856 X-GMAIL-MSGID: 1790910500119171856 |
Series |
serial: 8250_exar: A few updates to the driver
|
|
Commit Message
Andy Shevchenko
Feb. 14, 2024, 5:09 p.m. UTC
While now there is no issue if IRQ is fired before we clearing
the interrupts as the handler does the same, but strictly speaking
it might be problematic if IRQ handler wants to do something more.
Move clearing interrupt code to be called before registering the
IRQ handler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/tty/serial/8250/8250_exar.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 23366f868ae3..32a56ce626b5 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -713,14 +713,14 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) uart.port.irq = pci_irq_vector(pcidev, 0); uart.port.dev = &pcidev->dev; + /* Clear interrupts */ + exar_misc_clear(priv); + rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler, IRQF_SHARED, "exar_uart", priv); if (rc) return rc; - /* Clear interrupts */ - exar_misc_clear(priv); - for (i = 0; i < nr_ports && i < maxnr; i++) { rc = board->setup(priv, pcidev, &uart, i); if (rc) {