From: James Bottomley <James.Bottomley@suse.de>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: David Miller <davem@davemloft.net>,
linux-scsi@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: Re: [PATCH] mac_esp: fix PIO mode
Date: Fri, 04 Dec 2009 09:31:24 -0600 [thread overview]
Message-ID: <1259940684.2701.8.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.OSX.2.00.0912042321220.596@localhost>
On Fri, 2009-12-04 at 23:58 +1100, Finn Thain wrote:
> On Wed, 2 Dec 2009, David Miller wrote:
>
> ...
> >
> > Can you explain why the esp_slave_configure() part of your patch is
> > necessary?
> >
> > > Index: linux-2.6.31/drivers/scsi/esp_scsi.c
> > > ===================================================================
> > > --- linux-2.6.31.orig/drivers/scsi/esp_scsi.c 2009-11-23 12:52:45.000000000 +1100
> > > +++ linux-2.6.31/drivers/scsi/esp_scsi.c 2009-11-23 12:53:30.000000000 +1100
> > > @@ -2405,12 +2405,6 @@ static int esp_slave_configure(struct sc
> > > struct esp_target_data *tp = &esp->target[dev->id];
> > > int goal_tags, queue_depth;
> > >
> > > - if (esp->flags & ESP_FLAG_DISABLE_SYNC) {
> > > - /* Bypass async domain validation */
> > > - dev->ppr = 0;
> > > - dev->sdtr = 0;
> > > - }
> > > -
> > > goal_tags = 0;
> > >
> > > if (dev->tagged_supported) {
> > > @@ -2433,6 +2427,11 @@ static int esp_slave_configure(struct sc
> > > }
> > > tp->flags |= ESP_TGT_DISCONNECT;
> > >
> > > + if (esp->flags & ESP_FLAG_DISABLE_SYNC) {
> > > + dev->wdtr = spi_support_wide(dev->sdev_target) = 0;
> > > + dev->sdtr = spi_support_sync(dev->sdev_target) = 0;
> > > + }
> > > +
> > > if (!spi_initial_dv(dev->sdev_target))
> > > spi_dv_device(dev);
> > >
>
> The aim is that domain validation will not test for sync when we know it
> can't work (in PIO mode). This is the result:
So this isn't the correct way to handle the problem. You're altering
the disk capability flags to trick the transport class. What you want
to be doing is updating esp_set_period so it won't go under whatever you
deem to be a correct period setting (or if it's really async then it
won't set the period at all).
James
next prev parent reply other threads:[~2009-12-04 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-23 3:57 [PATCH] mac_esp: fix PIO mode Finn Thain
2009-12-02 23:40 ` David Miller
2009-12-04 12:58 ` Finn Thain
2009-12-04 15:31 ` James Bottomley [this message]
2009-12-05 1:30 ` [PATCH] mac_esp: fix PIO mode, take 2 Finn Thain
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=1259940684.2701.8.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=davem@davemloft.net \
--cc=fthain@telegraphics.com.au \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox