From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 14/18] ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
Date: Thu, 15 Nov 2007 21:03:16 +0100 [thread overview]
Message-ID: <200711152103.16792.bzolnier@gmail.com> (raw)
In-Reply-To: <473C25E1.4040601@ru.mvista.com>
Hi,
On Thursday 15 November 2007, Sergei Shtylyov wrote:
> Hello, I wrote:
>
> > It's tome that I go and make a patch which deals with 0x00 (default
>
> s/tome/time/
>
> > PIO mode)...
>
> But I'm unsure how this value could reach us form userspace because of the
> argument check present everywhere that filters out 0 value form being passed
> -- look at set_xfer_rate() and ide_cmd_ioctl(). So, such fix doesn't seem to
> be applicable... :-|
You are right, I was mislead by "if (arg < 0 || arg > 70)":
static int set_xfer_rate (ide_drive_t *drive, int arg)
{
int err;
if (arg < 0 || arg > 70)
return -EINVAL;
err = ide_wait_cmd(drive,
WIN_SETFEATURES, (u8) arg,
SETFEATURES_XFER, 0, NULL);
if (!err && arg) {
ide_set_xfer_rate(drive, (u8) arg);
ide_driveid_update(drive);
}
return err;
}
but value "1" is still theoretically possible. ;)
Anyway fixing 0x00 is a desirable thing as it is needed for cleanly
handling many older CF cards (they don't support IORDY).
Thanks,
Bart
prev parent reply other threads:[~2007-11-15 20:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-04 23:31 [PATCH 14/18] ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag Bartlomiej Zolnierkiewicz
2007-11-15 10:21 ` Sergei Shtylyov
2007-11-15 10:56 ` Sergei Shtylyov
2007-11-15 20:03 ` 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=200711152103.16792.bzolnier@gmail.com \
--to=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).