From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag
Date: Wed, 12 Mar 2008 19:45:49 +0300 [thread overview]
Message-ID: <47D808BD.2080902@ru.mvista.com> (raw)
In-Reply-To: <200802232115.11908.bzolnier@gmail.com>
Hello.
Bartlomiej Zolnierkiewicz wrote:
> * Check for IDE_HFLAG_NO_SET_MODE host flag in ide_set_pio(),
> ide_set_[pio,dma]_mode(), ide_set_xfer_rate() and set_pio_mode().
> * Remove no longer needed IDE_HFLAG_NO_SET_MODE host flag checking
> from ide_tune_dma().
> * Remove superfluous ->set_pio_mode checking from do_special().
> This is a part of preparations for adding 'struct ide_port_ops'.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Index: b/drivers/ide/ide-lib.c
> ===================================================================
> --- a/drivers/ide/ide-lib.c
> +++ b/drivers/ide/ide-lib.c
> @@ -353,6 +354,9 @@ int ide_set_pio_mode(ide_drive_t *drive,
> {
> ide_hwif_t *hwif = drive->hwif;
>
> + if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
> + return 0;
> +
Shouldn't this be considered an error?
> if (hwif->set_pio_mode == NULL)
> return -1;
>
> @@ -380,6 +384,9 @@ int ide_set_dma_mode(ide_drive_t *drive,
> {
> ide_hwif_t *hwif = drive->hwif;
>
> + if (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)
> + return 0;
> +
Same here....
> if (hwif->set_dma_mode == NULL)
> return -1;
>
> @@ -410,7 +417,8 @@ int ide_set_xfer_rate(ide_drive_t *drive
> {
> ide_hwif_t *hwif = drive->hwif;
>
> - if (hwif->set_dma_mode == NULL)
> + if (hwif->set_dma_mode == NULL ||
> + (hwif->host_flags & IDE_HFLAG_NO_SET_MODE))
> return -1;
Hm, this is was not considered an error before...
MBR, Sergei
next prev parent reply other threads:[~2008-03-12 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 20:15 [PATCH 3/4] ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flag Bartlomiej Zolnierkiewicz
2008-03-12 16:45 ` Sergei Shtylyov [this message]
2008-03-15 21:57 ` 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=47D808BD.2080902@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).