linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to get DMA working with IDE alim15x3 controller
@ 2003-07-14 17:31 Art Haas
  0 siblings, 0 replies; 10+ messages in thread
From: Art Haas @ 2003-07-14 17:31 UTC (permalink / raw)
  To: linux-kernel

Hi.

After recent success with getting a Turtle Beach Malibu sound card
working on my machine, I'm looking again at trying to get DMA working.
I've been booting with 'ide=nodma' for a long time now as the boot
sequence gets stuck after probing for the hard drives and partitions.
I should clarify "getting stuck" by saying the machine prints out lots
of "hda: drive not ready" and "hda: lost interrupt" messages but continues 
limp along.  With the release of 2.6.0-test1 (running it now) I tried again
to boot without 'ide=nodma' on the command line and sadly still saw the same
boot problems.

Here's some hdparm output describing the machine ...

$ hdparm /dev/hd?

/dev/hda:

 Model=ST33232A, FwRev=3.02, SerialNo=GH593339
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=6253/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=128kB, MaxMultSect=16, MultSect=off
 CurCHS=6253/16/63, CurSects=6303024, LBA=yes, LBAsects=6303024
 IORDY=on/off, tPIO={min:383,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 *udma2 
 AdvancedPM=no
 Drive conforms to: unknown:  0 1 2


/dev/hdb:

 Model=ATAPI CDROM, FwRev=V1.80, SerialNo=
 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=16384kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,w/IORDY:180}, tDMA={min:150,rec:150}
 PIO modes:  pio0 pio1 pio2 pio4 
 DMA modes:  sdma0 sdma1 *sdma2 mdma0 mdma1 
 AdvancedPM=no


/dev/hdc:

 Model=FUJITSU MPD3084AT, FwRev=DD-03-47, SerialNo=05043987
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=512kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=16514064
 IORDY=yes, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 *udma2 udma3 udma4 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: device does not report version:  1 2 3 4

Here's the IDE config bits for my 2.6.0-test1 kernel. I _do_ have the
alim15x3 driver compiled in ...

....
#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_TASKFILE_IO=y

#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDE_TCQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
CONFIG_BLK_DEV_ALI15X3=y
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_BLK_DEV_IDE_MODES=y
...

BTW, the IDE taskfile stuff seems to work here without a problem.

When I boot with the 'ide=nodma' argument the kernel prints out the
following:

...
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
ALI15X3: IDE controller at PCI slot 0000:00:0b.0
ALI15X3: chipset revision 32
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:pio, hdd:pio
hda: ST33232A, ATA DISK drive
hdb: ATAPI CDROM, ATAPI CD/DVD-ROM drive
anticipatory scheduling elevator
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: FUJITSU MPD3084AT, ATA DISK drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
hda: 6303024 sectors (3227 MB) w/128KiB Cache, CHS=6253/16/63
 hda: hda1 hda2 < hda5 hda6 hda7 >
hdc: max request size: 128KiB
hdc: 16514064 sectors (8455 MB) w/512KiB Cache, CHS=16383/16/63
 hdc: hdc1 hdc2 < hdc5 hdc6 > hdc3
....

I noticed when booting up my new kernel without the 'nodma' argument
that the /dev/hdc drive seemed to present no problem at all when it was
being examined. The partition stuff was found quickly, and there was a
"(U)DMA" at the end of the line giving the sector count, cache size, and
CHS breakdown of the drive, so it looks like the problem is just
something regarding the hard drive and cdrom on the ide0 controller.
Looking at the 'ide.c' file for clues or bootup arguments I don't see a
way to specify activating DMA on only hda while not on hdb. Maybe it is
there and I'm missing something.

Perhaps the problem I'm seeing is a bug in the alim15x3 driver? Maybe
some configuration flag I've missed, or a combination of options given
in the ide.c file? Something else?

Suggestions welcomed, and any info that I can provide I will.

Thanks in advance.

Art Haas

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
       [not found]     ` <Pine.SOL.4.30.0307160212040.27735-100000@mion.elka.pw.edu.pl>
  2003-07-16 13:40       ` Art Haas
@ 2003-07-16 17:36       ` Art Haas
  1 sibling, 0 replies; 10+ messages in thread
From: Art Haas @ 2003-07-16 17:36 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Wed, Jul 16, 2003 at 02:20:36AM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> I spotted following difference between old (<=2.4.20) and new
> (>=2.4.21 and 2.6) code.  Just a guess...
> 
> --- alim15x3.c.orig	2003-04-20 04:49:10.000000000 +0200
> +++ alim15x3.c	2003-07-16 02:09:05.411225464 +0200
> @@ -595,6 +595,26 @@
> 
>  	local_irq_save(flags);
> 
> +	/*
> +	 * CD_ROM DMA on (m5229, 0x53, bit0)
> +	 *      Enable this bit even if we want to use PIO
> +	 * PIO FIFO off (m5229, 0x53, bit1)
> +	 *      The hardware will use 0x54h and 0x55h to control PIO FIFO
> +	 *	(Not on later devices it seems)
> +	 *
> +	 *	0x53 changes meaning on later revs - we must no touch
> +	 *	bit 1 on them. Need to check if 0x20 is the right break
> +	 */
> +
> +	pci_read_config_byte(dev, 0x53, &tmpbyte);
> +
> +	if (m5229_revision <= 0x20)
> +		tmpbyte = (tmpbyte & (~0x02)) | 0x01;
> +	else
> +		tmpbyte |= 0x01;
> +
> +	pci_write_config_byte(dev, 0x53, tmpbyte);
> +
>  	if (m5229_revision < 0xC2) {
>  		/*
>  		 * revision 0x20 (1543-E, 1543-F)
> @@ -706,26 +726,6 @@
>  		chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0;
>  	}
> 
> -	/*
> -	 * CD_ROM DMA on (m5229, 0x53, bit0)
> -	 *      Enable this bit even if we want to use PIO
> -	 * PIO FIFO off (m5229, 0x53, bit1)
> -	 *      The hardware will use 0x54h and 0x55h to control PIO FIFO
> -	 *	(Not on later devices it seems)
> -	 *
> -	 *	0x53 changes meaning on later revs - we must no touch
> -	 *	bit 1 on them. Need to check if 0x20 is the right break
> -	 */
> -
> -	pci_read_config_byte(dev, 0x53, &tmpbyte);
> -
> -	if(m5229_revision <= 0x20)
> -		tmpbyte = (tmpbyte & (~0x02)) | 0x01;
> -	else
> -		tmpbyte |= 0x01;
> -
> -	pci_write_config_byte(dev, 0x53, tmpbyte);
> -
>  	local_irq_restore(flags);
> 
>  	return(ata66);
> 

Apply this patch and rebooting with this new kernel made no difference.
I tried a few more things as well:

Disconnect CD-ROM: Same problem as before.
Boot with 'ide0=autotune': Same problem as before

I was e-mailed a suggestion to try booting with 'noapic', and that
didn't help either. I'm currently running the patched kernel booted with
the 'ide=nodma' argument.

As things just go to pieces when reading the hard drive, maybe someone
knows if this hard drive model has known DMA issues. When starting the
machine the screens before my lilo prompt print out that the hard drive
should do UDMA. The hard drive on the ide1 channel seems to present no
problem to the ALi controller. Here is agin the hdparm info on my
troublesome drive:

$ hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
	Model Number:       ST33232A                                
	Serial Number:      GH593339
	Firmware Revision:  3.02    
Standards:
	Supported: 2 1 
	Likely used: 4
Configuration:
	Logical		max	current
	cylinders	6253	6253
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:    6303024
	LBA    user addressable sectors:    6303024
	device size with M = 1024*1024:        3077 MBytes
	device size with M = 1000*1000:        3227 MBytes (3 GB)
Capabilities:
	LBA, IORDY(can be disabled)
	Buffer size: 128.0kB	bytes avail on r/w long: 4	Queue depth: 1
	Standby timer values: spec'd by Vendor
	R/W multiple sector transfer: Max = 16	Current = 0
	DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=383ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
		Power Management feature set
		SMART feature set


This hard drive is from 1996/1997; it is the original hard drive I built
this machine with. The 'Standards' line above looks odd - a clue
perhaps?

The second hard drive I added about 3 years ago. Here is info on it:

$ hdparm -I /dev/hdc

/dev/hdc:

ATA device, with non-removable media
	Model Number:       FUJITSU MPD3084AT                       
	Serial Number:      05043987
	Firmware Revision:  DD-03-47
Standards:
	Supported: 4 3 2 1 
	Likely used: 4
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:   16514064
	device size with M = 1024*1024:        8063 MBytes
	device size with M = 1000*1000:        8455 MBytes (8 GB)
Capabilities:
	LBA, IORDY(cannot be disabled)
	Buffer size: 512.0kB	bytes avail on r/w long: 4	Queue depth: 1
	Standby timer values: spec'd by Vendor
	R/W multiple sector transfer: Max = 16	Current = ?
	Advanced power management level: unknown setting (0x0000)
	DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
		READ BUFFER cmd
		WRITE BUFFER cmd
		Host Protected Area feature set
	   *	Look-ahead
	   *	Write cache
		Power Management feature set
		Security Mode feature set
	   *	SMART feature set
		Advanced Power Management feature set
Security: 
		supported
	not	enabled
	not	locked
	not	frozen
	not	expired: security count
	not	supported: enhanced erase
	24min for SECURITY ERASE UNIT. 

If the hard drives seem to be alright, maybe there is some sort of BIOS
thing I should try? I've poked around in the BIOS setup numerous times
but never found anything that I could change and make things work.

Art Haas

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
       [not found]     ` <Pine.SOL.4.30.0307160212040.27735-100000@mion.elka.pw.edu.pl>
@ 2003-07-16 13:40       ` Art Haas
  2003-07-16 17:36       ` Art Haas
  1 sibling, 0 replies; 10+ messages in thread
From: Art Haas @ 2003-07-16 13:40 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Wed, Jul 16, 2003 at 02:20:36AM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> > I've been using the 2.5 series for a long time now, but I have vague
> > memories of not needing to use 'ide=nodma' before this patch was added:
> 
> I don't think so, but you can safely revert this chunk and check.
> 
> > ===== setup-pci.c 1.5 vs 1.6 =====
> > --- 1.5/drivers/ide/setup-pci.c	Sat Sep 21 07:59:59 2002
> > +++ 1.6/drivers/ide/setup-pci.c	Tue Sep 24 09:24:57 2002
> > @@ -250,6 +250,7 @@
> >
> >  		switch(dev->device) {
> >  			case PCI_DEVICE_ID_AL_M5219:
> > +			case PCI_DEVICE_ID_AL_M5229:
> >  			case PCI_DEVICE_ID_AMD_VIPER_7409:
> >  			case PCI_DEVICE_ID_CMD_643:
> >  			case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:
> >

I built a new kernel with this line commented out and booted up this new
kernel. Sadly the problem remained. Trying this kernel with the
'ide0=autotune' was also unsuccessful. For the curious, the kernel gets
to the point where the drive partitions are examined and then things go
splat. A sample of the messages ...

hda: dma_timer_expiry: dma_status == 0x20
hda: (__ide_dma_test_irq) called while not waiting
hda: drive not ready for command
hda: lost interrupt

Things limp along as the partitions on the hda drive are gradually
printed out, but there is one change in the kernel messages

hda: dma_timer_expiry: dma_status == 0x21

I'll try modifing the ali15x3 driver with the patch you sent and see how
that goes.

Art Haas
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
  2003-07-15 23:32   ` Art Haas
  2003-07-16 11:34     ` Ivan Kokshaysky
@ 2003-07-16 13:09     ` Alan Cox
       [not found]     ` <Pine.SOL.4.30.0307160212040.27735-100000@mion.elka.pw.edu.pl>
  2 siblings, 0 replies; 10+ messages in thread
From: Alan Cox @ 2003-07-16 13:09 UTC (permalink / raw)
  To: Art Haas; +Cc: Bartlomiej Zolnierkiewicz, Linux Kernel Mailing List

On Mer, 2003-07-16 at 00:32, Art Haas wrote:
> I'd received mail from another person stating that the ALi DMA is broken
> from many old chips, but that it is only the UDMA stuff that is broken,

The older chips dont do UDMA. Then a lot of the next range of chips do
UDMA but not 48bit command so you can end up in PIO mode. Possibly our
logic for this needs tightening now we use lba28 commands whenever 
possible, so an LBA48 capable disk under LBA48 limit size is drivable
entirely in LBA28 safely.

> and the MW_DMA stuff works. Also the notes about the 2.6 transition
> indicate ali15x3 and DMA don't always play nicely together. Still,
> if the MW_DMA stuff works, some hdparm trickery like ...

Simplex DMA needs some fixing for one. That should only bite you if you
have a set up something like

hda -> unused
hdb -> unused
hdc -> DISK
hdd -> unused

in which case we assign the DMA engine to hda/hdb!


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
  2003-07-15 23:32   ` Art Haas
@ 2003-07-16 11:34     ` Ivan Kokshaysky
  2003-07-16 13:09     ` Alan Cox
       [not found]     ` <Pine.SOL.4.30.0307160212040.27735-100000@mion.elka.pw.edu.pl>
  2 siblings, 0 replies; 10+ messages in thread
From: Ivan Kokshaysky @ 2003-07-16 11:34 UTC (permalink / raw)
  To: Art Haas; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

On Tue, Jul 15, 2003 at 06:32:02PM -0500, Art Haas wrote:
> I've been using the 2.5 series for a long time now, but I have vague
> memories of not needing to use 'ide=nodma' before this patch was added:
> 
> ===== setup-pci.c 1.5 vs 1.6 =====
> --- 1.5/drivers/ide/setup-pci.c	Sat Sep 21 07:59:59 2002
> +++ 1.6/drivers/ide/setup-pci.c	Tue Sep 24 09:24:57 2002
> @@ -250,6 +250,7 @@
>  
>  		switch(dev->device) {
>  			case PCI_DEVICE_ID_AL_M5219:
> +			case PCI_DEVICE_ID_AL_M5229:
>  			case PCI_DEVICE_ID_AMD_VIPER_7409:
>  			case PCI_DEVICE_ID_CMD_643:
>  			case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:

Hmm, interesting. This line has been added at early stage of IDE rewrite
to work around some unrelated bug, IIRC. I strongly suspect that it's
not needed anymore (will verify it later today), and it also might explain
weird DMA breakage with older ALi chips.

BTW, have you tried recent 2.4 kernels? Looks like this line should be
removed in 2.4 as well.

Ivan.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
  2003-07-15 23:12 ` Bartlomiej Zolnierkiewicz
@ 2003-07-15 23:32   ` Art Haas
  2003-07-16 11:34     ` Ivan Kokshaysky
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Art Haas @ 2003-07-15 23:32 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Wed, Jul 16, 2003 at 01:12:09AM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> It seems it won't help.
> 
> What was the last kernel which worked without "ide=nodma"?
> 

I've been using the 2.5 series for a long time now, but I have vague
memories of not needing to use 'ide=nodma' before this patch was added:

===== setup-pci.c 1.5 vs 1.6 =====
--- 1.5/drivers/ide/setup-pci.c	Sat Sep 21 07:59:59 2002
+++ 1.6/drivers/ide/setup-pci.c	Tue Sep 24 09:24:57 2002
@@ -250,6 +250,7 @@
 
 		switch(dev->device) {
 			case PCI_DEVICE_ID_AL_M5219:
+			case PCI_DEVICE_ID_AL_M5229:
 			case PCI_DEVICE_ID_AMD_VIPER_7409:
 			case PCI_DEVICE_ID_CMD_643:
 			case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:

I don't recall which kernel brought this change, and I can't swear that
this recollection is correct.

I'd received mail from another person stating that the ALi DMA is broken
from many old chips, but that it is only the UDMA stuff that is broken,
and the MW_DMA stuff works. Also the notes about the 2.6 transition
indicate ali15x3 and DMA don't always play nicely together. Still,
if the MW_DMA stuff works, some hdparm trickery like ...

# hdparm -d1 -X34 /dev/hda

... would supposedly activate working DMA. I really screwed up my
machine once by fooling around with hdparm so I'm very hesitant to go in
and start trying hdparm commands without some expert guidance.

Art Haas
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
  2003-07-15 22:58 Bartlomiej Zolnierkiewicz
  2003-07-15 23:12 ` Bartlomiej Zolnierkiewicz
@ 2003-07-15 23:16 ` Art Haas
  1 sibling, 0 replies; 10+ messages in thread
From: Art Haas @ 2003-07-15 23:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Wed, Jul 16, 2003 at 12:58:53AM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi,
> 
> Can you try this patch?  It seems
> 

You're messages seems to have been cut. I should have sent the following
along with my initial posting:

$ lspci -v
00:00.0 Host bridge: ALi Corporation M1531 [Aladdin IV] (rev b3)
	Subsystem: ALi Corporation M1531 [Aladdin IV]
	Flags: bus master, slow devsel, latency 32

00:02.0 ISA bridge: ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV] (rev b4)
	Flags: bus master, medium devsel, latency 0

00:05.0 VGA compatible controller: S3 Inc. ViRGE/DX or /GX (rev 01) (prog-if 00 [VGA])
	Subsystem: S3 Inc. ViRGE/DX
	Flags: bus master, medium devsel, latency 64
	Memory at ec000000 (32-bit, non-prefetchable) [size=64M]
	Expansion ROM at ebff0000 [disabled] [size=64K]

00:06.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
	Subsystem: D-Link System Inc DFE-530TX+ 10/100 Ethernet Adapter
	Flags: bus master, medium devsel, latency 64, IRQ 11
	I/O ports at ec00 [size=256]
	Memory at ebfeff00 (32-bit, non-prefetchable) [size=256]
	Capabilities: <available only to root>

00:0b.0 IDE interface: ALi Corporation M5229 IDE (rev 20) (prog-if fa)
	Flags: bus master, medium devsel, latency 32
	I/O ports at ffa0 [size=16]

$

If I'm reading the lspci output correctly the patch won't have any effect
on my machine because the m5229 interface is at rev 0x20, so the test in
the if block will succeed and the atapi_dma variable is set to 1 just
like it is currently. I'll still recompile and try if you like; let me
know.

> --- alim15x3.c.orig	2003-04-20 04:49:10.000000000 +0200
> +++ alim15x3.c	2003-07-16 00:39:15.351639072 +0200
> @@ -753,7 +753,8 @@
>  		return;
>  	}
> 
> -	hwif->atapi_dma = 1;
> +	if (m5229_revision <= 0x20)
> +		hwif->atapi_dma = 1;
> 
>  	if (m5229_revision > 0x20)
>  		hwif->ultra_mask = 0x3f;
> 

Art Haas
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
  2003-07-15 22:58 Bartlomiej Zolnierkiewicz
@ 2003-07-15 23:12 ` Bartlomiej Zolnierkiewicz
  2003-07-15 23:32   ` Art Haas
  2003-07-15 23:16 ` Art Haas
  1 sibling, 1 reply; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-07-15 23:12 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Art Haas, linux-kernel


On Wed, 16 Jul 2003, Bartlomiej Zolnierkiewicz wrote:

>
> Hi,
>
> Can you try this patch?  It seems

It seems it won't help.

What was the last kernel which worked without "ide=nodma"?

Regards,
--
Bartlomiej


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Trying to get DMA working with IDE alim15x3 controller
@ 2003-07-15 22:58 Bartlomiej Zolnierkiewicz
  2003-07-15 23:12 ` Bartlomiej Zolnierkiewicz
  2003-07-15 23:16 ` Art Haas
  0 siblings, 2 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-07-15 22:58 UTC (permalink / raw)
  To: Art Haas; +Cc: linux-kernel


Hi,

Can you try this patch?  It seems

--- alim15x3.c.orig	2003-04-20 04:49:10.000000000 +0200
+++ alim15x3.c	2003-07-16 00:39:15.351639072 +0200
@@ -753,7 +753,8 @@
 		return;
 	}

-	hwif->atapi_dma = 1;
+	if (m5229_revision <= 0x20)
+		hwif->atapi_dma = 1;

 	if (m5229_revision > 0x20)
 		hwif->ultra_mask = 0x3f;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Trying to get DMA working with IDE alim15x3 controller
  2003-07-14  7:26 Linux v2.6.0-test1 Peter
@ 2003-07-14 17:59 ` Peter
  0 siblings, 0 replies; 10+ messages in thread
From: Peter @ 2003-07-14 17:59 UTC (permalink / raw)
  To: linux-kernel


This is on the ALim15x3 with the 2.5.69 kernel on a vpr matrix 200a5 
laptop -- I just did this to get DMA5:

    *  set ide0=ata66 in lilo to get the 100MHz bus and DMA5
    *  add "hdparm -c 1 -m 16 -S 242 -k 1 /dev/hda" to /etc/init.d/bootmisc.sh

Nice results:

hda: 78140160 sectors (40008 MB) w/1768KiB Cache, CHS=77520/16/63, UDMA(100)

# hdparm -i /dev/hda

    /dev/hda:

     Model=IC25N040ATCS04-0, FwRev=CA4OA71A, SerialNo=CSH405DCLW5UVB
     Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
     RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
     BuffType=DualPortCache, BuffSize=1768kB, MaxMultSect=16, MultSect=16
     CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
     IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
     PIO modes:  pio0 pio1 pio2 pio3 pio4
     DMA modes:  mdma0 mdma1 mdma2
     UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
     AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
     Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:  2 3 4 5

# hdparm -tT /dev/hda

    /dev/hda:
     Timing buffer-cache reads:   128 MB in  0.45 seconds =283.23 MB/sec
     Timing buffered disk reads:  64 MB in  3.23 seconds = 19.79 MB/sec

# hdparm /dev/hda

    /dev/hda:
     multcount    = 16 (on)
     IO_support   =  1 (32-bit)
     unmaskirq    =  0 (off)
     using_dma    =  1 (on)
     keepsettings =  1 (on)
     readonly     =  0 (off)
     readahead    = 256 (on)
     geometry     = 11984/16/63, sectors = 78140160, start = 0

Cheers,
Peter



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-16 17:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 17:31 Trying to get DMA working with IDE alim15x3 controller Art Haas
  -- strict thread matches above, loose matches on Subject: below --
2003-07-15 22:58 Bartlomiej Zolnierkiewicz
2003-07-15 23:12 ` Bartlomiej Zolnierkiewicz
2003-07-15 23:32   ` Art Haas
2003-07-16 11:34     ` Ivan Kokshaysky
2003-07-16 13:09     ` Alan Cox
     [not found]     ` <Pine.SOL.4.30.0307160212040.27735-100000@mion.elka.pw.edu.pl>
2003-07-16 13:40       ` Art Haas
2003-07-16 17:36       ` Art Haas
2003-07-15 23:16 ` Art Haas
2003-07-14  7:26 Linux v2.6.0-test1 Peter
2003-07-14 17:59 ` Trying to get DMA working with IDE alim15x3 controller Peter

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