All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] ide: rework handling of serialized ports
Date: Sun, 9 Nov 2008 15:04:14 +0100	[thread overview]
Message-ID: <200811091504.14279.bzolnier@gmail.com> (raw)
In-Reply-To: <491095C4.3000503@ru.mvista.com>

On Tuesday 04 November 2008, Sergei Shtylyov wrote:
> Hello, I wrote:
> 
> >> Index: b/drivers/ide/ide-probe.c
> >> ===================================================================
> >> --- a/drivers/ide/ide-probe.c
> >> +++ b/drivers/ide/ide-probe.c
> 
> > [...]
> 
> >> @@ -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...
> 
>     Oops, rephrasing hurts sometimes: I meant "it seems", of course. :-)

I prefer to leave it in ide_init_port() because the future ide_hwgroup_t
removal depends on this flag in deciding whether serialization is needed.

Actually it is better to force the flag on host instead of port so:

...
v2:
* Set host's ->host_flags field instead of port's copy.
...
diff -u b/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
--- b/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -1303,7 +1303,7 @@
 		 * Clock is shared between the channels,
 		 * so we'll have to serialize them... :-(
 		 */
-		hwif->host_flags |= IDE_HFLAG_SERIALIZE;
+		hwif->host->host_flags |= IDE_HFLAG_SERIALIZE;
 		hwif->rw_disk = &hpt3xxn_rw_disk;
 	}
 }
diff -u b/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
--- b/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1030,7 +1030,7 @@
 		ide_hwif_t *h = ide_ports[index];
 
 		if (h && h->hwgroup) {  /* scan only initialized ports */
-			if (hwif->host_flags & IDE_HFLAG_SERIALIZE) {
+			if (hwif->host->host_flags & IDE_HFLAG_SERIALIZE) {
 				if (hwif->host == h->host)
 					match = h;
 			}
@@ -1399,7 +1399,7 @@
 
 	if ((d->host_flags & IDE_HFLAG_SERIALIZE) ||
 	    ((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base))
-		hwif->host_flags |= IDE_HFLAG_SERIALIZE;
+		hwif->host->host_flags |= IDE_HFLAG_SERIALIZE;
 
 	if (d->host_flags & IDE_HFLAG_RQSIZE_256)
 		hwif->rqsize = 256;


      reply	other threads:[~2008-11-09 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 20:02 [PATCH 1/6] ide: fix ->quirk_list checking in ide_do_request() Bartlomiej Zolnierkiewicz
2008-11-03 20:02 ` [PATCH 2/6] ide: always set nIEN on idle devices Bartlomiej Zolnierkiewicz
2008-11-03 20:03 ` [PATCH 3/6] rz1000: apply chipset quirks early Bartlomiej Zolnierkiewicz
2008-11-04 17:18   ` Sergei Shtylyov
2008-11-04 18:56     ` Sergei Shtylyov
2008-11-09 14:03       ` Bartlomiej Zolnierkiewicz
2008-11-03 20:03 ` [PATCH 4/6] trm290: add IDE_HFLAG_TRM290 host flag Bartlomiej Zolnierkiewicz
2008-11-04 17:36   ` Sergei Shtylyov
2008-11-03 20:03 ` [PATCH 5/6] cy82c693: remove superfluous ide_cy82c693 chipset type Bartlomiej Zolnierkiewicz
2008-11-03 20:03 ` [PATCH 6/6] ide: rework handling of serialized ports Bartlomiej Zolnierkiewicz
2008-11-04 18:30   ` Sergei Shtylyov
2008-11-04 18:34     ` Sergei Shtylyov
2008-11-09 14:04       ` Bartlomiej Zolnierkiewicz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811091504.14279.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.