linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
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: Wed, 11 Jul 2007 20:56:41 +0100	[thread overview]
Message-ID: <20070711195641.GA2301@flint.arm.linux.org.uk> (raw)
In-Reply-To: <46952A87.6010005@ru.mvista.com>

On Wed, Jul 11, 2007 at 11:07:51PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> Bartlomiej Zolnierkiewicz 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.

Moreover, I think the patch is quite broken.  If an invalid DMA mode
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.
Moreover, 'on' will be zero, causing icside_set_speed() to return zero
which means the DMA setting was not successful (iow, use PIO).

This causes icside_dma_check() to return -1 to the IDE layer which
should fail the setting.

With your patch, you make icside_set_speed() return '1' meaning DMA
was succesfully configured.  That then causes icside_dma_check() to
return success to the IDE layer, so we now allow invalid speeds.

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.

BIG NAK.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2007-07-11 19:57 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 [this message]
2007-07-11 20:15     ` Sergei Shtylyov
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=20070711195641.GA2301@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).