Problem
How can I tell what UDMA mode Im running in while using Openserver 5.0.7
Solution
The easiest way to get this information is to reboot and add "wd.debug=u" to the bootstring and the debug output will tell you which UDMA mode, if any. For example:
boot: defbootstr wd.debug=uThe UDMA mode is a configuration property of each ATA drive on the system; as well as the controller.
For the controller, what matters is:1. whether it supports UDMA, and 2. whether we recognize it as supporting UDMA.
New improvements have been made in Openserver 5.0.7 for part 2 than earlier releases.
The "wd.debug=u" output will show you whether we think it supports UDMA.
For the drive, what matters is:1. what the drive reports itself to support 2. what we think the controller supports 3. how the BIOS configured the drive 4. any overrides a user might have given (ie: "wd.udma=100").
Again, the "wd.debug=u" output will show this information.
You will see this information as the server boots and runs through it's hard ware checks, for example:
wd: PCI bus/dev/func 0/7/1, vend/dev 1106/0571, prog_if 8A, BMIBA 0000FFA1
wd: controller supports UDMA mode 100
%adapter 0x0170-0x0177 15 - type=IDE ctlr=secondary dvr=wdOnce booted, see /var/adm/messages and /var/adm/syslog for the same information.
Further Analysis:It is possible, by poking around in kernel memory on a live system, to see which drives we are using UDMA with:
# crash
> o -ld wdRequest+10 4
f04274f8: 0000000002 0000000000 0000000000 0000000000
pri/mast pri/slave sec/mast sec/slaveA value of 2 means UDMA; 1 means hard disk using PIO; 0 means ATAPI
device using PIO, or drive not present. The driver doesn't support
using UDMA with ATAPI devices.This does not show you which UDMA mode is being used with a drive. The kernel doesn't really record that anywhere; it examines the drive at startup time but it doesn't save a record. The only "saved" record of which UDMA mode is in the drive itself, it has been programmed to a particular mode, and remembers so.
However, the driver does keep a record of the drive's original UDMA mode
at startup time. Since the driver doesn't normally reprogram the
drive's UDMA settings, in most cases this will tell you its current
mode. The driver only reprograms drives' UDMA settings if there's a
"wd.udma=100" override on the kernel command line. We can examine those
original UDMA modes:# crash
> o -lx wdDriveinfo 4
f0427f1c: f0b64600 00000000 f0b64400 00000000
pri/mast pri/slave sec/mast sec/slave
> o -bx f0b64600+b1
f0b646b1: 20
> o -bx f0b64400+b1
f0b644b1: 04The byte at offset 0xb1 in each record is the drive's current, at the time of the query, UDMA mode. It should only have one bit turned on; the meaning of the bit is as follows:
01 UDMA0 16.7 MB/s
02 UDMA1 25.0 MB/s
04 UDMA2 33.3 MB/s
08 UDMA3 44.4 MB/s
10 UDMA4 66.7 MB/s
20 UDMA5 100.0 MB/s
40 UDMA6 133.0 MB/sFinally, we can check the bootstring for user modification of UDMA settings:
# cat /dev/string/boot; echo
hd(40)unix swap=hd(41) dump=hd(41) root=hd(42)No override is seen, so the queried modes should still be in effect.
So, on the system we looked at here, we have learned:
primary/master is a hard disk using UDMA5 (100MB/s)primary/slave is not presentsecondary/master is an ATAPI device using PIO; drive is configured for UDMA2 (33.3MB/s), though we won't use UDMA with it
secondary/slave is not presentThis solution will only work on Openserver 5.0.7 or an older release running the most current WD driver available from SCO.
NOTE: It is not advised to enter "defbootstr wd.debug=u" if you server does not have an IDE controller installed.
See also
man page for the wd driver for further information