linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 12/15] alim15x3: ->speedproc, filter out invalid modes passed from user-space
Date: Mon, 2 Jul 2007 19:56:32 +0200	[thread overview]
Message-ID: <200707021956.32844.bzolnier@gmail.com> (raw)
In-Reply-To: <46891CD4.7020703@ru.mvista.com>

On Monday 02 July 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > * ->speedproc, filter out invalid modes passed from user-space.
> 
> > * Add FIXME about DMA timings never being set.
> 
> > * Bump driver version.
> 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> > Index: b/drivers/ide/pci/alim15x3.c
> > ===================================================================
> > --- a/drivers/ide/pci/alim15x3.c
> > +++ b/drivers/ide/pci/alim15x3.c
> > @@ -425,6 +425,17 @@ static int ali15x3_tune_chipset (ide_dri
> >  	u8 tmpbyte		= 0x00;
> >  	int m5229_udma		= (hwif->channel) ? 0x57 : 0x56;
> >  
> > +	/*
> > +	 * Paranoia, filter out invalid modes passed from user-space
> > +	 * (unsupported UDMA modes are dealt by ide_rate_filter() call).
> > +	 *
> > +	 * This will go away once ide_set_xfer() is fixed.
> > +	 */
> > +	if ((speed > XFER_PIO_5 && speed < XFER_SW_DMA_0) ||
> > +	    (speed > XFER_SW_DMA_2 && speed < XFER_MW_DMA_0) ||
> > +	    (speed > XFER_MW_DMA_2 && speed < XFER_UDMA_0))
> > +		return -1;
> > +
> >  	if (speed == XFER_UDMA_6)
> >  		speed1 = 0x47;
> >  
> > @@ -437,6 +448,10 @@ static int ali15x3_tune_chipset (ide_dri
> >  		tmpbyte &= ultra_enable;
> >  		pci_write_config_byte(dev, m5229_udma, tmpbyte);
> >  
> > +		/*
> > +		 * FIXME: Oh, my... DMA timings are never set.
> > +		 */
> > +
> 
>     Erm, wouldn't it have been better to mark them as unsupported while at it?

This would brake setups which currently work OK, i.e. BIOS set things up
(reminds me about cmd64x vs broken MWDMA)...

The RightThing(tm) to do is to fix alim15x3 driver to program DMA timings
(especially given that pata_ali seems to already contain the needed code).

Thanks,
Bart

  reply	other threads:[~2007-07-02 17:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-30 19:10 [PATCH 12/15] alim15x3: ->speedproc, filter out invalid modes passed from user-space Bartlomiej Zolnierkiewicz
2007-07-02 15:42 ` Sergei Shtylyov
2007-07-02 17:56   ` Bartlomiej Zolnierkiewicz [this message]
2007-07-02 18:00     ` Jeff Garzik
2007-07-02 18:41       ` Bartlomiej Zolnierkiewicz
2007-07-02 18:31         ` Jeff Garzik
2007-07-02 18:55           ` Bartlomiej Zolnierkiewicz
2007-07-02 19:13             ` Bartlomiej Zolnierkiewicz
2007-07-02 19:17             ` Jeff Garzik
2007-07-02 19:53               ` Bartlomiej Zolnierkiewicz
2007-07-02 19:22       ` Alan Cox
2007-07-02 19:20         ` Jeff Garzik

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=200707021956.32844.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).