From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756731AbXFKSvs (ORCPT ); Mon, 11 Jun 2007 14:51:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753097AbXFKSvj (ORCPT ); Mon, 11 Jun 2007 14:51:39 -0400 Received: from mga02.intel.com ([134.134.136.20]:60562 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbXFKSvh (ORCPT ); Mon, 11 Jun 2007 14:51:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.16,409,1175497200"; d="scan'208";a="253162004" Date: Mon, 11 Jun 2007 11:48:10 -0700 From: Kristen Carlson Accardi To: jeff@garzik.org, james.bottomley@steeleye.com Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, htejun@gmail.com, Kristen Carlson Accardi , arjan@linux.intel.com Subject: [patch 1/3] Store interrupt value Message-Id: <20070611114810.f918bc1d.kristen.c.accardi@intel.com> In-Reply-To: <20070611184146.448266229@intel.com> References: <20070611184146.448266229@intel.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Use a stored value for which interrupts to enable. Changing this allows us to selectively turn off certain interrupts later and have them stay off. Signed-off-by: Kristen Carlson Accardi Index: 2.6-git/drivers/ata/ahci.c =================================================================== --- 2.6-git.orig/drivers/ata/ahci.c +++ 2.6-git/drivers/ata/ahci.c @@ -211,6 +211,7 @@ struct ahci_port_priv { unsigned int ncq_saw_d2h:1; unsigned int ncq_saw_dmas:1; unsigned int ncq_saw_sdb:1; + u32 intr_mask; /* interrupts to enable */ }; static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg); @@ -1384,6 +1385,7 @@ static void ahci_thaw(struct ata_port *a void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR]; void __iomem *port_mmio = ahci_port_base(ap); u32 tmp; + struct ahci_port_priv *pp = ap->private_data; /* clear IRQ */ tmp = readl(port_mmio + PORT_IRQ_STAT); @@ -1391,7 +1393,7 @@ static void ahci_thaw(struct ata_port *a writel(1 << ap->port_no, mmio + HOST_IRQ_STAT); /* turn IRQ back on */ - writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); + writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); } static void ahci_error_handler(struct ata_port *ap) @@ -1547,6 +1549,12 @@ static int ahci_port_start(struct ata_po pp->cmd_tbl = mem; pp->cmd_tbl_dma = mem_dma; + /* + * Save off initial list of interrupts to be enabled. + * This could be changed later + */ + pp->intr_mask = DEF_PORT_IRQ; + ap->private_data = pp; /* power up port */ --