linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.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: Thu, 10 Jan 2008 11:14:37 +0900	[thread overview]
Message-ID: <47857F8D.9040209@gmail.com> (raw)
In-Reply-To: <478503FE.7040501@ru.mvista.com>

Hello, Sergei.

Sergei Shtylyov wrote:
>    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().

Yeap, I saw that and lifted MWDMA programming from pata_ali.  That's how
I got the identical PCI configuration area but still no go.

>> 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...

And PIO4 timing seems to be doing just fine for IDE.  Unfortunately, it
doesn't work for libata.

>>     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.

And it's the same story for IDE and libata.  Also, the UDMA hard drive
connected to the primary channel works just fine.  I watched how BMDMA
status and TF status changes after ATAPI DMA is initiated and it's not
IRQ problem.  DMA engine just doesn't sits there doing nothing even
after the device indicates DRQ!

>>     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?

Those are from Alan's PCI resource fix up so that legacy and native
modes look alike.  It's weird that they show up as memory tho.  Okay,
that looks like a bug in lspci.  Here's dump of sysfs resource file.

ali:/sys/bus/pci/devices/0000:00:10.0 # cat resource
0x00000000000001f0 0x00000000000001f7 0x0000000000000110
0x00000000000003f6 0x00000000000003f6 0x0000000000000110
0x0000000000000170 0x0000000000000177 0x0000000000000110
0x0000000000000376 0x0000000000000376 0x0000000000000110
0x0000000000008080 0x000000000000808f 0x0000000000000101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000

The last field is flags and 0x100 is IO alright.

-- 
tejun

  reply	other threads:[~2008-01-10  2:14 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
2008-01-10  2:14   ` Tejun Heo [this message]
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=47857F8D.9040209@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=bzolnier@gmail.com \
    --cc=jeff@garzik.org \
    --cc=liml@rtr.ca \
    --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).