View Single Post
  #3  
Old May 19th 09, 01:21 PM posted to comp.arch.storage
Maxim S. Shatskih[_2_]
external usenet poster
 
Posts: 36
Default SATA optical drive problems with DMA/PIO transfer

According to the specs on my Silicon Image Si3112 SATA controller, it
supports PIO modes 0 to 4, mdma 0 to 2 and UDMA 0 to 5.


The whole PIO/DMA thing has 2 meanings:

a) data rate and command set on ATA cable between the controller and the drive. I'm not even sure that this applies to SATA. Probably the distinction between slower PIO/DMA and faster UDMA data transfer mode applies to parallel ATA only, where it was enforced by the cable type among the other things.

Are you sure that SATA wire supports reduced speeds? are you sure that the SATA drive can be uncapable of running its SATA interface at full speed and can require slower speed, the same speeds as for obsolete pre-UDMA parallel ATA hardware? Doubts.

There is no doubts about this all with parallel ATA, since it evolved over time from slower version to faster. But SATA is designed to be fast from the beginning.

b) register interface to the controller (between CPU/RAM and the controller). In PIO mode, the _classic_ PC/AT IDE controller uses the REP INSW or REP OUTSW CPU opcode to transfer the actual data to the controller's 16bit data IO port.

a) can be related to any parallel ATA hardware (but I have doubts about SATA).

b) is only about the classic PC/AT controller, since the newer chips like SiL will never use this stupidity of 1980ies between CPU/RAM and the chip. I even have doubts about support of this obsolete stuff in nForce south bridge. It is surely supported by Intel's south bridges though, to provide the exact PC/AT compatibility.

SATA can run in native mode or legacy mode


This is only about south bridge controller (and maybe about other south bridges too). The thing is that for this controller, the "legacy mode" emulates the classic PC/AT controller, so that the OS will be able to access the disk as "standard IDE" without having drivers/settings/kernel build options for the modern new controller.

AHCI, SiL, Promise, HighPoint and so on just cannot do this.

Some MBs allow to switch the south bridge's SATA controller (Intel ICH9B or so) to AHCI, after which, the port 0x1f0/interrupt 0xf is no more and you need to reinstall the driver in the OS or the OS will not boot (a non-trivial process in Windows).

In device manager, the controller 'device info' says the device is in
PIO4 mode.


And what is the actual speed? is it OK? if yes - then forget this minor bug in SiL's driver's UI :-)

The properties box you're seeing in the Device Manager belongs to the plugin DLL which is shipped and installed together with the SiL's .sys driver binary. So, probably they have bugs.

I will not be surprised if SiL _only supports 1 mode of operation_ and _the whole this UI is a fake_.

which lists my device: HL-DT-STDVD-RAM GH22NS30 1.02


OK, so, this is LG's DVD drive, and not a hard disk.

I have doubts that DVD can really require the fastest possible ATA wire speed, I think that around 20/30MB/s is the maximum speed for DVDs (~22MB/s is surely the maximum _burning_ speed, achievable on DVD+R media only).

What is the actual data transfer rate you have on this DVD drive? is it OK? what is the CPU load you have on a DVD drive busy with data transfers? if both these values are OK - then I would forget the SiL's settings and consider that everything is OK.

along with the REG_SZ MaxMode = UDMA-2


Note "MaxMode". This is the maximum limit, not the actual mode.

The driver is either ignoring the value or the controller is not
responding to it.


or c) there can be a bug in the UI. Or d) the SIlL's driver/hardware tries to handshake with the device and chooses the slower data rate (if this is applicable on a SATA wire anyway, probably the whole PIO/DMA thing does not change the actual data rate on _SATA_ wire).

the 'bustype' is listed as 0x0000000b, which is a SATA bus type.


Correct:

typedef enum _STORAGE_BUS_TYPE {
BusTypeUnknown = 0x00,
BusTypeScsi,
BusTypeAtapi,
BusTypeAta,
BusType1394,
BusTypeSsa,
BusTypeFibre,
BusTypeUsb,
BusTypeRAID,
BusTypeiScsi,
BusTypeSas,
BusTypeSata,
BusTypeSd,
BusTypeMmc,
BusTypeMax,
BusTypeMaxReserved = 0x7F
} STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE;

Elsewhere on the net, I read that XP does not recognize a SATA bustype and that the bus type should be SCSI = 1 or ATA = 3.


What is the icon for SiL in Device Manager? the SCSI one? or some other? can you look at "driver files" tab in Properties? what files are there? SCSIPORT.SYS?

According to the docs, BusTypeSata is supported since Server 2003 SP1. But there are chances that, in this particular context of SCSIPORT's registry, _any_ value is supported which is desired by the driver. Also it is possible that XP SP2 or SP3 added this support to XP. So, probably this does not mean anything.

My practical experience with this same SiL chip was on old Pentium-3 computer with i815 chipset (NOTE: SiL has issues with nForce north bridge due to bugs in PCI implementation by nVidia) and Windows 2000 OS.

SiL was looking as SCSI device there (which means that the SiL's driver for w2k is SCSIPORT-based, probably it is so for XP too). I don't remember what ATA modes the SiL's UI was displaying, I just remember that the disk's data transfer rates were OK (the SiL have not added a bottleneck there) and there was no CPU load due to disk IO on SiL.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com