Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1391790lqz; Mon, 1 Apr 2024 05:12:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKDh298JT8ewv4o01xumVawmDDWouDq7w22i2AEmkvIRyRr2zMdaylwaaXxv5udOX07MMcCqwV9S1eyVwfpqmKFVVnxdLfMAMGRD85+A== X-Google-Smtp-Source: AGHT+IHJK2h4gc1tHh/amyq/7kLONo/7OAccoJq5fsS/q9T3/aQNjWELBe0HQiO84PM6OI+XaFV/ X-Received: by 2002:a17:906:1253:b0:a4d:ff5f:98ad with SMTP id u19-20020a170906125300b00a4dff5f98admr5745581eja.37.1711973537098; Mon, 01 Apr 2024 05:12:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711973537; cv=pass; d=google.com; s=arc-20160816; b=KwT0VmCJN6OGPQDhHhogYiY8IflyyV2+4eQAi2Xv/GgthPGXdsNC975MnqrsChSZWZ l8hv3y0ovbAPeKGrwCcsVWZ0PoKqNZHuZjPX2tGGLruGm+1IoKcZ/l7z6WDZvLAr2KgZ 7WEmLGYt+9wAJJzxz902Kk0MvqmsPf8nxPVUoikMUFtzM7Yt2lKFQfrkfY9GqitphzoC Famd7Cqdn2ndYeeJbMe1PWkkm4rkb22MjRJ5gv34kYeZ3HTsBmHYLvHDjqS1qoX1Jg5L QEn/PU8mWz1MGAkXPreSOqNvbCyD7bcOqldDtSD+2GlZ6hSr7qXMsl8FG2R7VifZPMrw u8hQ== 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:message-id:date:subject:cc:to :from:feedback-id:dkim-signature:dkim-signature; bh=3tseEkYxfsWFCYTT9gGvEvDc3BMkqs5rodTIypP9LjI=; fh=6PpVTS2jtjeAASvkyYjo/lh0vjXmIoxYOw0XFwJ+9os=; b=KkmLCisHSKQakT4T+4+Zv6ARIRlgGseqiygXpCl8VrsM7uUWaEGp2YWCs1MQqqsakT S9y5zffPtJf1GzF7WdX+ByswzQr9HkZUOANjRBUX2heeMDRLbcJEhdaN92guXvSUScxd 2cM5X65VtmWSx4SWZFYeJWDfh2BN4/QC8DHijhMSRjSbSY6RhVsQDX7qphpNkplPrkLn WW3GVPcjVPpRGwGEwF7CpOaYF1XOG38g0PfSn4Xk71Y1ZZi41oCg+IrjLiNSrogqNtFA Ci20c5QotpKNe7FAFUStU43p/2MkiCHYsYiS86jXwIOHIwR+TbojbbjpTo97ykzGoTf7 /+lA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=lafkyf0j; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bm5NjL1e; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-126641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hs16-20020a1709073e9000b00a4e4517f1absi2619041ejc.330.2024.04.01.05.12.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 05:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=lafkyf0j; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bm5NjL1e; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-126641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 95E8F1F210E1 for ; Mon, 1 Apr 2024 12:12:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03F033717D; Mon, 1 Apr 2024 12:12:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="lafkyf0j"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bm5NjL1e" Received: from wfhigh3-smtp.messagingengine.com (wfhigh3-smtp.messagingengine.com [64.147.123.154]) (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 793A9219E2 for ; Mon, 1 Apr 2024 12:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711973529; cv=none; b=DZp/LcO5DhzPeYkJgkvegQEMz9exVaVmq/+uNt9k0mJ/xoYnsyYji76QPT0qGHbAitmZJ0iLJ4UlaEisJaylBRD3nae98JRFXNGuhYLGfTDtJzgiHljVYfvEBMXSHYN5fclQ1Qn3B91dB3qw9QXdnhpIq95aZimf78i3sdI3eKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711973529; c=relaxed/simple; bh=pXfRUsFt3Rus79YAuj06EctgrL+T3J750KmiRrYlJkY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q2bloEQPahFiauUnAJzn3XIuPACzuMd6LaXntDPkKzTfgs0Qfy2ACcDB2EYreHgpNCJS8FCMzSUaLHxeEfQDe36j2Vvz46NDjnz4nYIhVtBNufZBwEiwNKKD16p+P45qa9rFtRXiGY0r/FBSqNViuTnMRASDiE2DD0p0Kg8hOmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=lafkyf0j; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=bm5NjL1e; arc=none smtp.client-ip=64.147.123.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 496E31800100; Mon, 1 Apr 2024 08:12:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 01 Apr 2024 08:12:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1711973524; x=1712059924; bh=3tseEkYxfs WFCYTT9gGvEvDc3BMkqs5rodTIypP9LjI=; b=lafkyf0jIT9O8ms5H0O8IY+JYF Hc87jDnB4UuuPy/g3uEJlcyEShPl0RZHvrk0tzMi6jUs9sfNT2bs3CUklf46pG/V HR3ElwJK1MDHCcmr4oZ+whp1CsUh3rDk3gf6HWivF5dbHDktXdUL3VonkKPLshRT grugrPXyR15nV4UXymEOPHsN+roK+fvHa2WMtMSdkDafhGAxwH0vQg47ZsRpYUj9 hFU0071+77kR48jk8o1QAOCO6tN4fY/jqxXkB7sFnBm2VZldxSUMJRaU14mc4Z65 Bunu2q3rzaE5pFgH1uLBZuLStv0a729hOshNsHMKMvmbPlaq2jkhpuTW/qrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711973524; x=1712059924; bh=3tseEkYxfsWFCYTT9gGvEvDc3BMk qs5rodTIypP9LjI=; b=bm5NjL1eq1+aDlNI3foz8RqPIRfnx5MOHYFtxhzJ27xf UAXyBH5P3+9gppWf9AerxyyrGxZXPhqICTyZQL/ZV3C3x8WLHpNYSd6jo5zWaRa6 gIeOTw8CjlpucEUEJAkn7+mgKyviZSl5+l2r7f88uJPIcrfgrgMxIre9BW4/TR1m kiMyHpHQdAQtxyqG+Gl8inoXVLzk91ICT7iuGM+p4Vhvhb3W1pkkR6x24Bk4XnF2 GA866IYM6Ai/HD8Z33pw62j9HlD6mDiJ3cbPn6xzj0TZaRGP3T+xW+7mDU9sfK3e s8ZciTSl+wckAXqkyDDz9szGcGXfQXecdmVNpdLQbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeftddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpeffvdeuleffve ekudfhteejudffgefhtedtgfeutdfgvdfgueefudehveehveekkeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Apr 2024 08:12:03 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, adamg@pobox.com Subject: [PATCH] firewire: ohci: always handle IRQ event for bus reset Date: Mon, 1 Apr 2024 21:11:59 +0900 Message-ID: <20240401121200.220013-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In the former commit, the spurious interrupt events are suppressed as possible, when masking the expected interrupts events for bus reset. The change was written to be less intrusive, thus it does not work at the first event of bus reset. However, it has few trouble to make it work at the first event. This commit is to mask the interrupt events as a default for the purpose. Signed-off-by: Takashi Sakamoto --- drivers/firewire/ohci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 38d19410a2be..4e86205f81bf 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2060,8 +2060,7 @@ static void bus_reset_work(struct work_struct *work) ohci->generation = generation; reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); - if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) - reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); + reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); if (ohci->quirks & QUIRK_RESET_PACKET) ohci->request_generation = generation; @@ -2133,6 +2132,7 @@ static irqreturn_t irq_handler(int irq, void *data) reg_write(ohci, OHCI1394_IntEventClear, event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr)); log_irqs(ohci, event); + // The flag is masked again at bus_reset_work() scheduled by selfID event. if (event & OHCI1394_busReset) reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); @@ -2472,9 +2472,8 @@ static int ohci_enable(struct fw_card *card, OHCI1394_cycleInconsistent | OHCI1394_unrecoverableError | OHCI1394_cycleTooLong | - OHCI1394_masterIntEnable; - if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS) - irqs |= OHCI1394_busReset; + OHCI1394_masterIntEnable | + OHCI1394_busReset; reg_write(ohci, OHCI1394_IntMaskSet, irqs); reg_write(ohci, OHCI1394_HCControlSet, -- 2.43.0