View Single Post
  #4  
Old May 21st 09, 08:35 AM posted to comp.arch.storage
gordo999
external usenet poster
 
Posts: 2
Default SATA optical drive problems with DMA/PIO transfer

Maxim...thanks for time taken to reply in such detail. Your
suggestions and questions are helpful.


The whole PIO/DMA thing has 2 meanings.... Are you sure that SATA wire supports reduced speeds?


Here's a manual I found on the Silicon Image 3112A controller. It goes
into great detail on the UDMA/PIO capabilities. Unfortunately the file
is packed in .bz format but fortunately modern versions of Winrar and
PkZip unpack it with ease.

http://gkernel.sourceforge.net/specs/sii/

It's the top selection on the list, 3112A_SiI-DS-0095-B2.pdf.bz2

While I'm at it, here's one from Intel on SATA implementation of the
ICH5 hub. Mine is ICH4, but intel claims they are quite similar:

http://www.intel.com/assets/pdf/manual/252671.pdf

Here's the programming reference for the ICH familly of controllers:

http://www.intel.com/Assets/PDF/manual/298600.pdf


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.


I'm not sure of anything :-)

I have come across something of interest. Based on Intel's explanation
of how SATA/PATA controllers are implemented in the ICH5 hub, it would
seem there are several arrangements which are left up to the OS. Intel
left selection of controller combos out of the BIOS on purpose because
some combinations are unpredictable.

I have a configuration utility from Silicon Image which is labeled
'Configuration for SATALink. It shows a diagram with a hierarchy as
follows: 'Computer name' - SI3112U-0 - Channel 0 - Device 0. Coming
off the SI3112U-0 branch is another leg labelled Channel 1, with no
Device attached. Beside the Device 0 leg is a red X, seemingly an
indication that something is wrong.

If I right-click on Device 0, next to the red X, a small window comes
up saying 'Disable'. Out of curiosity, I selected the disable function
to see if it would disable the device. Nothing seemed to happen, but
later, I noticed the ATA hard drive on the primary controller in
position 2 was missing. So, instead of switching off the optical drive
attached to SATA channel 0, Device 0, it switched off PATA Channel 0,
Device 1, my second drive on the primary controller. I have considered
unplugging Device 1 to see if it helps but that's on the 'to do' list.

Before I go on, let me describe the other parts of the hierarchy. If I
left-click SI3112U-0, it brings up a windows with the information that
the device is an Si3112, version 1 and it's PCI information is: IRQ
21, Bus 2, Device 6.

If I press on Channel 0, it only tells me that the channel speed is
Generation 1 @ 1.5 Gb/s. It's not clear if it is measuring that speed
or advertising it.

If I left-click 'Device 0', I get a window with 3 tabs. Tab 1describes
Device 0 as an HL-DT-STDVD-RAM GH22NS30, the SATA optical device I
have connected to the SATA port. It also says ATA Version: ATA/ATAPI
6, Current Mode: PIO4. It also says the look ahead and write cache are
disabled. I have seen elsewhere that the device is supposed to have a
2 Mb write cache.

Tab 2 is labeled 'SMART/configuration'. There is no SMART data
available. Under 'Transfer Mode', it lists the current mode at PIO4
and gives a dropdown window that lists available transfer modes from
PIO1 to PIO4, MDMA 0 to 2, and UDMA 0 to 5. There is a note claiming a
reboot is required before the mode will change, but all it does is
make an entry in the registry while the mode does not change.

Tab 3 is a mystery. It is marked 'Identity Table' and has an 8 column
by 32 row table filled with hex data.The first entry is 85C0 in column
1 row 1.

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.


I can understand that but apparently it was designed to emulate PATA
in one of its modes and that's what Intel claim in one of those pdf's
I linked to above. If a device attached to a SATA controller is not
capable of UDMA transfer rates, and can only run in PIO mode, the
device has to be able to accomodate that.


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.


I'm just learning about that now. My background is in hardware, as a
technician, and I am more familiar with registers from the old PC/AT
days. I have a lot of catching up to do. When I worked as a tech, we
used to program short Basic programs live and use them to position the
heads on hard drives. etc. All that has gone out the window with the
likes of the HAL interface but I'd like to be able to write a simple
assembler program to interrogate the controller. I know just enough
assembler to be dangerous. :-)


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.


There is a software device made in Russia (PC-3000) for repairing hard
drives. It comes with a PCI card that allows the user to gain control
over the hard drive independently of the OS. I'd like to get down to
that level with a SATA controller so I could see what was going on.
Maybe there's a software template out there that would allow me to
modify it without having to learn driver programming from the ground
up.


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


I would have forgotten it a long time ago but I can't even write with
the drive. I can read OK, but it fails in write mode ...even in
simulation mode. All I can think of is that the PIO4 mode is too slow.
I did a test using Nero's speed utility, and I get an average read
speed that is about 27x (48x drive). That is comparable to the PATA
equivalent drive I have from the same manufacturer. However, the PATA
drive has a burst rate of 19 Mb/s whereas the SATA device is down at 8
Mb/s.

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?


see above. My PATA equivalent is set on UDMA 2 mode by the system.
That translates to about 33 Mhz, so your estimate is close. The burst
test is meant to check the UDMA abilities, AFAIK, and the PATA device
measures 19 Mb/s on a CD+R medium. There again, you're pretty close.
The SATA device is only passing an 8 Mhz burst.

along with the REG_SZ MaxMode = UDMA-2


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


I understand that, but the value is being ignored. I have tried
uninstalling the drivers several times with the hope the system would
reset the transfer speed. I remember the old days with IRQ conflicts
and Intel suggests that is a possibility. I just don't know where to
begin looking these days.


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


my understanding on this is limited. Intel seems to suggest different
rates can be selected in legacy mode. Consider that a hard drive or
optical device is a serial device anyway. The bus is going to be too
fast for it so some kind of cache is required. With PIO mode, the data
has to be clocked through memory by the processor and Intel seems to
suggest DMA transfers are available with serial devices as well, to
bypass the processor.

The Si3112 is described as a PCI to serial converter. To program such
a device, would it not be required that a PCI programming protocol be
used? It's not as if you can get into the chip to affect the
serialization and data storage. Everything will be parallel till
inside the chip somewhere.


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


Correct:


I'm confused about that. Which bus are we talking about? The only real
serial bus is the cable between the Si3112 output and the device,
unless they are talking about a bus inside the Si3112. The Si3112
connects directly to the PCI bus but that is not considered a bustype.
There is a listing for an ATAPI bus (2) a SCSI bus (1) and an ATA bus
(3). I have considered experimenting with different buses but I'm
afraid I'll mess something up.

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?


The icon on the Si3112 controller is the same as the icon on the
Device Manager SCSI and RAID Controller entry. It's like a capital C
with a dash in the opening. The drivers are as follows:

Si3112.sys
SiRemFil.sys (filter)
SiWinAcc.sys (accelerator)
SilSupp.cpl (property sheet in the Control Panel)

SilSupp.cpl gives about the same information as the configuration
utility. It also has a 'Flash' utility that is currently not available
for my mobo because it is aimed at add-in cards. I do have the flash
binary for third party users but it is recommended that such binaries
come from manufacturers.

I'm confused about the SCSI aspect. What has it to do with a SATA
controller that uses an ATA/ATAPI standard?

Also, the drivers for the SATA optical drive a

cdrom.sys
imapi.sys
redbook.sys
SiRemFil.sys (filter again)
storprop.dll

Those are the same drivers used by the PATA optical device and all are
supplied by Microsoft. I have experimented with turning Microsoft's CD
Burning feature off but it doesn't help. It seems to use imapi.sys.

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.


those are all viable options to check. I have an NVidia 6200 series
video card, and although that may not seem related to SATA, it uses
memory between 640K and 1 meg just as the Si3112 does. Although the
vid card memory is usually down lower, and the Si3112 uses mem about
F0000, nothing would surprise me.

I also use a firewall (Sygate) that is relatively unobtrusive, but
that gave me a lot of grief with one app.

Thanks again for your correspondence, Maxim.