DMA on sii3114 on Sam460ex

This forum is for all AmigaOne 500, Sam440 and Sam460 specific issues.
mpiva
Posts: 35
Joined: Sun Jul 03, 2011 10:05 pm

DMA on sii3114 on Sam460ex

Post by mpiva »

I recently noticed that when I type "idetool -l sii3114ide.device" into the CLI I get:

-------------------Unit 0 information------------------------
Flags : $00000187 - present, LBA48 used, supports DMA, ATA, supports cache flush, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 70 (UDMA 6, 133 MB/s) / current 12 (PIO 4, 16 MB/s)
Total blocks : 1953525168
Blocksize : 512
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1000 / $100A / $1020
*** Error opening device sii3114ide.device / unit 1
-------------------Unit 2 information------------------------
Flags : $0000019D - present, supports DMA, removable media, ATAPI, supports cache flush, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 69 (UDMA 5, 100 MB/s) / current 12 (PIO 4, 16 MB/s)
Total blocks : 0
Blocksize : 0
SCSI devtyp : 5
Packet size : 12
Current medium read speed : x 65535 ('65535' stands for max.)
Current medium write speed : x 65535 (idem)
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1010 / $101A / $1028

This seems to tell me that my drives are operating in PIO mode instead of DMA. I find this odd as I got this system premade from AmigaKit but, for the life of me, I can't figure out how to turn on DMA. I've tried "idetool -x sii3114ide.device 0 70" but as soon as I reboot it goes back to PIO. I've seen some passing comments about some UBoot setting but I've scoured the net and can't find anything that tells me what that command might be.

Please help. I've noticed that AmigaOS4.1 takes FOREVER to transfer several gigabytes of data from one drive to another and I'm really hoping this is the reason and that there's an easy fix. Thank you.
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: DMA on sii3114 on Sam460ex

Post by Slayer »

Type this in a shell

NVSetVar sii3114ide_xfer GG0G

or

NVSetVar sii3114ide_xfer GGGG if you don't care whether your DVDRW Drive is in PIO or Not... eg some people say 0 is the correct setting for CDRom/DVDRom drives...

btw, some systems report that 0 1 2 and 3 are reversed so if GG0G doesn't do it for you try G0GG I guess ;)

hope this helps

Type NVGetVar to see a listing of other variables set... alot aren't listed because they haven't been set but don't change anything unless you know why you're changing it and know the syntax, check out your documentation directory for docs on various things related...

Here's my list of drives on my SAMFlex, my optical is set to 0 so at max PIO etc...
:
-------------------Unit 0 information------------------------
Flags : $000001A7 - present, LBA48 used, supports DMA, ATA, supports acoustic mgmt, supports cache flush, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 70 (UDMA 6, 133 MB/s) / current 70 (UDMA 6, 133 MB/s)
Total blocks : 625142448
Blocksize : 512
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1100 / $110A / $1120
-------------------Unit 1 information------------------------
Flags : $000001A7 - present, LBA48 used, supports DMA, ATA, supports acoustic mgmt, supports cache flush, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 70 (UDMA 6, 133 MB/s) / current 70 (UDMA 6, 133 MB/s)
Total blocks : 1953525168
Blocksize : 512
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1100 / $110A / $1120
-------------------Unit 2 information------------------------
Flags : $000001A7 - present, LBA48 used, supports DMA, ATA, supports acoustic mgmt, supports cache flush, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 70 (UDMA 6, 133 MB/s) / current 70 (UDMA 6, 133 MB/s)
Total blocks : 976773168
Blocksize : 512
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1110 / $111A / $1128
-------------------Unit 3 information------------------------
Flags : $0000011D - present, supports DMA, removable media, ATAPI, interrupts used,
Xfer mode : best pio 12 (PIO 4, 16 MB/s) / best dma 68 (UDMA 4, 66 MB/s) / current 12 (PIO 4, 16 MB/s)
Total blocks : 0
Blocksize : 0
SCSI devtyp : 5
Packet size : 12
Current medium read speed : x 65535 ('65535' stands for max.)
Current medium write speed : x 65535 (idem)
Power mode : 2 / idle (ready for operation)
IO1 / IO2 / BMCR @ : $1110 / $111A / $1128
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
mpiva
Posts: 35
Joined: Sun Jul 03, 2011 10:05 pm

Re: DMA on sii3114 on Sam460ex

Post by mpiva »

Thanks. I'll try that out as soon as I get home tonight.
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: DMA on sii3114 on Sam460ex

Post by ssolie »

mpiva wrote:I've tried "idetool -x sii3114ide.device 0 70" but as soon as I reboot it goes back to PIO...
Think back to the Eyetech AmigaOne boards. There are a lot of them still around. The reason the IDE drivers default to PIO is because the Eyetech boards had some trouble with DMA. This would render them unable to boot if the default was DMA enabled. Sometimes you got lucky with a device and sometimes not.

The Sam boards are rock solid DMA performers and do not need to default to PIO. The plan is to default them to DMA mode in a future release. Then the only reason you would worry about this is if some device is not compatible and you need to slow it down.

In the mean time, you have to tell the drivers to use DMA mode manually using a UBoot environment variable as has already been described. UBoot variables are stored in non-volatile RAM so you won't have to use idetool each time you reboot.
ExecSG Team Lead
mpiva
Posts: 35
Joined: Sun Jul 03, 2011 10:05 pm

Re: DMA on sii3114 on Sam460ex

Post by mpiva »

Slayer wrote:Type this in a shell

NVSetVar sii3114ide_xfer GG0G
Thanks! That worked perfectly. I can already notice a difference. The system boots quicker and everything loads faster. :mrgreen:

Now I wonder why AmigaKit didn't set this by default? I knew a SATA card in a Sam460ex supported DMA so I just assumed that AmigaKit had set it up that way. It wasn't until after I started to wonder why my file transfers were so slow that I discovered the truth. If anyone else has a prebuilt system from AmigaKit I urge you to check that DMA is properly set. Perhaps it was just an accidental oversight on my particular system but, if all their systems are coming like this, there may be a lot of Sam460ex users who don't realize their system it not running to its full potential.
User avatar
Noel Fuller
Beta Tester
Beta Tester
Posts: 13
Joined: Wed Aug 31, 2011 9:07 pm

Re: DMA on sii3114 on Sam460ex

Post by Noel Fuller »

mpiva wrote:
Slayer wrote:Type this in a shell

NVSetVar sii3114ide_xfer GG0G
Thanks! That worked perfectly. I can already notice a difference. The system boots quicker and everything loads faster. :mrgreen:
Ah! I assembled the club's 460 and set it to GGGG. But I wish I knew how to get it to boot faster. We get a huge delay with init sata and usb won't initialise with a flash card in a slot. What could be changed I wonder?

Noel
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: DMA on sii3114 on Sam460ex

Post by Spectre660 »

How is you Card reader attached ?
I have two external ones and one does the same thing on a sam440-flex when attached to a one of the two USB ports that you can boot from.
not sure if the 460 has ports that you cant boot from.
If not you should be able to disable usb scanning at boot in Uboot.
scan_usb_storage = 0 on the Samflex
Or remove USB booting from the boot options or set it to the option after the Harddrive,

Noel Fuller wrote:
mpiva wrote:
Slayer wrote:Type this in a shell

NVSetVar sii3114ide_xfer GG0G
Thanks! That worked perfectly. I can already notice a difference. The system boots quicker and everything loads faster. :mrgreen:
Ah! I assembled the club's 460 and set it to GGGG. But I wish I knew how to get it to boot faster. We get a huge delay with init sata and usb won't initialise with a flash card in a slot. What could be changed I wonder?

Noel
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
User avatar
Noel Fuller
Beta Tester
Beta Tester
Posts: 13
Joined: Wed Aug 31, 2011 9:07 pm

Re: DMA on sii3114 on Sam460ex

Post by Noel Fuller »

Spectre660 wrote:How is you Card reader attached ?
I used misleading terminology. I was refering to a 4GB memory stick if that is what they are still called.
However, I have a card reader hanging about so popped it into a front port - no problems with that
but the card in use is only 1GB. The 4 GB sticks are recognised OK on my A1 but not the card reader.

It is the sata holdup that really annoys me.

Noel
ikir
Posts: 5
Joined: Fri Sep 23, 2011 3:18 pm

Re: DMA on sii3114 on Sam460ex

Post by ikir »

ssolie wrote:
mpiva wrote:I've tried "idetool -x sii3114ide.device 0 70" but as soon as I reboot it goes back to PIO...
Think back to the Eyetech AmigaOne boards. There are a lot of them still around. The reason the IDE drivers default to PIO is because the Eyetech boards had some trouble with DMA. This would render them unable to boot if the default was DMA enabled. Sometimes you got lucky with a device and sometimes not.

The Sam boards are rock solid DMA performers and do not need to default to PIO. The plan is to default them to DMA mode in a future release. Then the only reason you would worry about this is if some device is not compatible and you need to slow it down.

In the mean time, you have to tell the drivers to use DMA mode manually using a UBoot environment variable as has already been described. UBoot variables are stored in non-volatile RAM so you won't have to use idetool each time you reboot.
This is wrong, you can't suppose users to change this. HD/SSD should run at max speed by default not in ancient PIO mode. I can understand why but if we want to attract users we should make this kind of stuff easier. For example OS4 installation should detect a SAM board and run a script which enables this by default. When X1000 will be out it will run in PIO mode by default?
Just make a script to enable this in installation or.... maybe the contrary, a script which disable it if you're running on original AmigaOnes.
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: DMA on sii3114 on Sam460ex

Post by ssolie »

ikir wrote:This is wrong, you can't suppose users to change this. HD/SSD should run at max speed by default not in ancient PIO mode. I can understand why but if we want to attract users we should make this kind of stuff easier. For example OS4 installation should detect a SAM board and run a script which enables this by default. When X1000 will be out it will run in PIO mode by default?
Just make a script to enable this in installation or.... maybe the contrary, a script which disable it if you're running on original AmigaOnes.
The PIO default issue will be fixed in a future release of the drivers.
ExecSG Team Lead
Post Reply