From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/6] icside: fix ->speedproc to return on unsupported modes
Date: Thu, 12 Jul 2007 00:15:46 +0400 [thread overview]
Message-ID: <46953A72.6070204@ru.mvista.com> (raw)
In-Reply-To: <20070711195641.GA2301@flint.arm.linux.org.uk>
Hello.
Russell King wrote:
>>>icside_set_speed() happily accepts unsupported transfer modes which
>>>results in drive->drive_data being set to the maximum value (480)
>>>and drive->current_speed being set to the unsupported transfer mode.
>>>Fix it.
>>>Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>>Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> I wonder why Sergei's acking this patch - do you have the hardware to
> test it on? Are you somehow involved in this driver? I think the
> answer to both is most likely no.
This just signified my positive review (as for any other IDE patch).
> Moreover, I think the patch is quite broken. If an invalid DMA mode
In what way I wonder?
> is passed, currently the driver sets the cycle time to 480ns (stored
> in drive_data) since both cycle_time and use_dma_info will be zero.
Why bother doing this? The speedproc() method shouldn't even try to
handle an unsupopoted mode, to begin with.,,
> Moreover, 'on' will be zero, causing icside_set_speed() to return zero
It means just the opposite for the speedproc() -- i.e. success.
> which means the DMA setting was not successful (iow, use PIO).
You're mixing with the ide_dma_check() method.
> This causes icside_dma_check() to return -1 to the IDE layer which
> should fail the setting.
Then the speedproc() method's return value and the ide_dma_check() method
must be fixed too -- NAK the patch. I haven't noticed so far that this driver
is more broken than the others, sorry. :-)
> With your patch, you make icside_set_speed() return '1' meaning DMA
> was succesfully configured. That then causes icside_dma_check() to
The return value was wrong from the very start -- any non-zero result
should mean error.
> return success to the IDE layer, so we now allow invalid speeds.
What it does *now* is returning bad result to ide_tune_dma() and the
possible userspace callers.
> Ergo, what wasn't broken before is now broken. So the patch is
> completely wrong and was trying to fix a problem which didn't exist in
> the first place.
More like incomplete fix to an existing problem.
> BIG NAK.
Indeed. It needs a bigger hammer. ;-)
MBR, Sergei
next prev parent reply other threads:[~2007-07-11 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 0:00 [PATCH 1/6] icside: fix ->speedproc to return on unsupported modes Bartlomiej Zolnierkiewicz
2007-07-11 19:07 ` Sergei Shtylyov
2007-07-11 19:56 ` Russell King
2007-07-11 20:15 ` Sergei Shtylyov [this message]
2007-07-11 21:21 ` Bartlomiej Zolnierkiewicz
2007-07-12 19:23 ` Sergei Shtylyov
2007-07-13 21:02 ` Bartlomiej Zolnierkiewicz
2007-07-13 21:39 ` Russell King
2007-07-13 22:49 ` Bartlomiej Zolnierkiewicz
2007-07-13 23:15 ` Alan Cox
2007-07-13 23:20 ` Russell King
2007-07-13 23:54 ` Alan Cox
2007-07-14 19:15 ` Russell King
2007-07-24 22:30 ` Russell King
2007-07-14 17:42 ` Sergei Shtylyov
2007-07-18 21:21 ` Bartlomiej Zolnierkiewicz
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=46953A72.6070204@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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.