All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, Mark Lord <liml@rtr.ca>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	andre@linux-ide.org,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: [CALL-FOR-HELP] pata_ali: can't get MWDMA working!
Date: Wed, 09 Jan 2008 20:27:26 +0300	[thread overview]
Message-ID: <478503FE.7040501@ru.mvista.com> (raw)
In-Reply-To: <4784FBC1.7070804@gmail.com>

Tejun Heo wrote:
> Hello, all.
> 
> Broken MWDMA on pata_ali has caused a number of bug reports.  I've been
> trying to fix it for some time now && finally got a machine with
> pata_ali and non-working MWDMA2 ATAPI device on my desk a few weeks ago.
>  Testing confirms what users have been reporting - MWDMA2 works fine

    Heh, it works by accident: PIO4 timings correspond to MWDMA ones. The 
driver does *not* support MWDMA modes -- there's FIXME in ali_set_dma_mode().

> with the IDE alim15x3 driver while any DMA data transfer on pata_ali
> times out.

> At first I thought this was simple timing programming error, but no.
> pata_ali's mode programming wasn't wrong although it was different in
> how it programs empty slots.  Even after making pata_ali to program the
> controller exactly the same as alim15x3 (identical lspci -xxx results),
> MWDMA didn't work. (attached)

    I don't quite understand -- MWDMA mode programming is simply not there in 
the alim15x3 driver...

> I wondered whether the device was configured differently, so compared
> hdparm --Istdout results.  They were identical too. (attached)

> I walked through IDE and libata codes and found some differences in the
> order registers are accessed and which values are written (e.g. libata
> never turns on device 0/1 DMA capable bits in BMDMA status register
> while IDE does).  I made them access the registers in the same order and
> write the same values.  Still no go.

> Then, I made libata probing sequence very close to IDE such that no
> reset is performed and NIEN isn't tempered with.  No go.

> I thought maybe the drive should just be blacklisted.  I took the laptop
> apart, took out the DVD combo drive to ICH7 ata_piix.  It works just fine.

> So, I'm out of ideas at this point.  Any suggestions?  Ideas?

> Thanks.

> ------------------------------------------------------------------------
> 
> 00:10.0 IDE interface [Class 0101]: ALi Corporation M5229 IDE [10b9:5229] (rev c4) (prog-if b0)

    Hm, channel enables (bits 4/5) are set but bit 6 is cleared... looking 
into the datasheet, bits 4/5/6 should be read as 0 by default...

> 	Subsystem: Hewlett-Packard Company Pavilion ze4400 builtin IDE [103c:0024]
> 	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
> 	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
> 	Latency: 32 (500ns min, 1000ns max)
> 	Interrupt: pin A routed to IRQ 0

    Interrupt not routed... well, we're in legacy mode anyway with native mode 
not supported, so why the device is requesting interrupt at all is not clear.

> 	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [disabled] [size=8]
> 	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) [disabled] [size=1]
> 	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [disabled] [size=8]
> 	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) [disabled] [size=1]

    What?! The minimum PCI resource size is 4 bytes, not 1. And why those are 
seen as memory resources?

> 	Region 4: I/O ports at 8080 [size=16]
> 	Capabilities: [60] Power Management version 2
> 		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> 		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
> 00: b9 10 29 52 05 00 90 02 c4 b0 01 01 00 20 00 00
> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 81 80 00 00 00 00 00 00 00 00 00 00 3c 10 24 00
> 30: 00 00 00 00 60 00 00 00 00 00 00 00 00 01 02 04
> 40: 00 00 00 0f 00 00 00 00 30 00 20 c9 00 00 ba 3a
> 50: 02 00 00 89 05 00 0f 00 01 31 31 00 01 31 31 00
> 60: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

MBR, Sergei

  parent reply	other threads:[~2008-01-09 17:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09 16:52 [CALL-FOR-HELP] pata_ali: can't get MWDMA working! Tejun Heo
2008-01-09 17:01 ` Tejun Heo
2008-01-09 17:16 ` Alan Cox
2008-01-09 17:28   ` Alan Cox
2008-01-10  1:44   ` Tejun Heo
2008-01-09 17:25 ` Mark Lord
2008-01-10  1:49   ` Tejun Heo
2008-01-09 17:27 ` Sergei Shtylyov [this message]
2008-01-10  2:14   ` Tejun Heo
2008-01-09 22:55 ` Bartlomiej Zolnierkiewicz
2008-01-10  1:39   ` Tejun Heo

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=478503FE.7040501@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=bzolnier@gmail.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.