From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755089AbcGLRaO (ORCPT ); Tue, 12 Jul 2016 13:30:14 -0400 Received: from mail-qt0-f174.google.com ([209.85.216.174]:35719 "EHLO mail-qt0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754218AbcGLRaL (ORCPT ); Tue, 12 Jul 2016 13:30:11 -0400 Date: Tue, 12 Jul 2016 13:30:03 -0400 From: "tj@kernel.org" To: Pang Raymond Cc: linux ide , linux kernel Subject: Re: =?utf-8?B?562U5aSNOiBCVUc6IElOVHggaQ==?= =?utf-8?Q?s?= assered unexpectly when unload AHCI driver with MSIx support. Message-ID: <20160712173003.GM3190@htj.duckdns.org> References: <20160706135236.GG3262@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, Jul 11, 2016 at 05:16:00AM +0000, Pang Raymond wrote: > static irqreturn_t ahci_multi_irqs_intr_hard(int irq, > void *dev_instance) > { > // omitting unconcerned codes here > // ... > status = readl(port_mmio + PORT_IRQ_STAT); > writel(status, port_mmio + PORT_IRQ_STAT); > > // add patch code here. > + writel(1 << ap->port_no, ap->host->iomap + HOST_IRQ_STAT); > > // ... I think it'd be better to avoid adding stuff to the hot path. This only matters when the device is shut down, right? Can't it just be cleared in the driver cleanup path? Thanks. -- tejun