linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.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 13:21:16 +0300	[thread overview]
Message-ID: <473C1D9C.5000208@ru.mvista.com> (raw)
In-Reply-To: <200711050031.10290.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

> * Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide
>   what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate().

> * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it
>   (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old,
>   serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode
>   methods in host drivers that don't (IDE core code guarantees that
>   ->set_dma_mode will be called only for modes which are present
>   in SWDMA/MWDMA/UDMA masks).

> While at it:

> * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in
>   hpt34x/hpt366/pdc202xx_old/serverworks host driver.

> There should be no functionality changes caused by this patch.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> Index: b/drivers/ide/ide-lib.c
> ===================================================================
> --- a/drivers/ide/ide-lib.c
> +++ b/drivers/ide/ide-lib.c
> @@ -438,6 +438,12 @@ int ide_set_xfer_rate(ide_drive_t *drive
>  	 * case could happen iff the transfer mode has already been set on
>  	 * the device by ide-proc.c::set_xfer_rate()).
>  	 */
> +	if (rate < XFER_PIO_0) {
> +		if (hwif->host_flags & IDE_HFLAG_ABUSE_SET_DMA_MODE)
> +			return ide_set_dma_mode(drive, rate);

    Not sure if it was worth the effort at all...

> +		else
> +			return ide_config_drive_speed(drive, rate);

    It's tome that I go and make a patch which deals with 0x00 (default PIO 
mode)...

> +	}
>  
>  	return ide_set_dma_mode(drive, rate);
>  }

MBR, Sergei

  reply	other threads:[~2007-11-15 10:21 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 [this message]
2007-11-15 10:56   ` Sergei Shtylyov
2007-11-15 20:03     ` 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=473C1D9C.5000208@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@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).