From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 6/6] ide: rework handling of serialized ports Date: Tue, 04 Nov 2008 21:30:10 +0300 Message-ID: <491094B2.4090107@ru.mvista.com> References: <20081103200244.5098.29817.sendpatchset@localhost.localdomain> <20081103200326.5098.2058.sendpatchset@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from gateway-1237.mvista.com ([63.81.120.155]:47973 "EHLO imap.sh.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754109AbYKDSaQ (ORCPT ); Tue, 4 Nov 2008 13:30:16 -0500 In-Reply-To: <20081103200326.5098.2058.sendpatchset@localhost.localdomain> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Bartlomiej Zolnierkiewicz Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Bartlomiej Zolnierkiewicz wrote: > From: Bartlomiej Zolnierkiewicz > Subject: [PATCH] ide: rework handling of serialized ports > * hpt366: set IDE_HFLAG_SERIALIZE in hwif->host_flags if needed > in init_hwif_hpt366(). Remove HPT_SERIALIZE_IO while at it. > * Set IDE_HFLAG_SERIALIZE in hwif->host_flags if needed in > ide_init_port(). > * Convert init_irq() to use IDE_HFLAG_SERIALIZE together with > hwif->host to find out ports which need to be serialized. > * Remove no longer needed save_match() and ide_hwif_t.serialized. > This patch should fix the incorrect grouping of port(s) from > host(s) that need serialization with port(s) that happen to use > the same IRQ(s) but are from the host(s) that don't need it. > Cc: Sergei Shtylyov > Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sergei Shtylyov > static int __devinit init_dma_hpt366(ide_hwif_t *hwif, > Index: b/drivers/ide/ide-probe.c > =================================================================== > --- a/drivers/ide/ide-probe.c > +++ b/drivers/ide/ide-probe.c [...] > + if (hwif->host_flags & IDE_HFLAG_SERIALIZE) { > + if (hwif->host == h->host) > + match = h; Can be collapsed into a single *if*, and braces not needed either way. > @@ -1436,10 +1398,8 @@ static void ide_init_port(ide_hwif_t *hw > } > > if ((d->host_flags & IDE_HFLAG_SERIALIZE) || > - ((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base)) { > - if (hwif->mate) > - hwif->mate->serialized = hwif->serialized = 1; > - } > + ((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base)) > + hwif->host_flags |= IDE_HFLAG_SERIALIZE; I don't see what use is forcing this flag at all here -- it doesn't seem to be checked only in init_irq() now, so this *if* could just be moved there... MBR, Sergei