Gentoo Archives: gentoo-user

From: Etaoin Shrdlu <shrdlu@×××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: New kernel 2.6.20-r6
Date: Thu, 19 Apr 2007 08:36:00
Message-Id: 200704191100.25500.shrdlu@unlimitedmail.org
In Reply to: Re: [gentoo-user] Re: New kernel 2.6.20-r6 by Iain Buchanan
1 On Thursday 19 April 2007 03:53, Iain Buchanan wrote:
2
3 > > > hda: 39070080 sectors (20003 MB) w/1740KiB Cache,
4 > > > CHS=16383/255/63<6>hda: hw_config=600d, UDMA(100)
5 > > >
6 > > > What's the hw_config part?
7 > >
8 > > Any more (useful) ideas on this?
9
10 Seems a kind of hardware config register (part of a struct hd_driveid
11 object), whose value is used by the ide drivers to adjust the drive
12 speed, depending on the type of cable used. The function that checks its
13 value (and prints the "hda: hw_config=600d" message you are seeing)
14 seems to be in drivers/ide/ide-iops.c, and is defined as follows:
15
16 /*
17 * All hosts that use the 80c ribbon must use!
18 * The name is derived from upper byte of word 93 and the 80c ribbon.
19 */
20 u8 eighty_ninty_three (ide_drive_t *drive)
21
22 That function is called from various pci ide drivers code (for example
23 drivers/ide/pci/it821x.c, drivers/ide/pci/siimage.c,
24 drivers/ide/pci/piix.c, drivers/ide/pci/sis5513.c), from a function
25 whose name is composed appending "_ratemask" to the driver name (eg,
26 piix_ratemask, sis5513_ratemask, etc.) in a way similar to this:
27
28 if (!eighty_ninty_three(drive))
29 mode = min(mode, (u8)1);
30
31 So, if eighty_ninty_three returns 0, "mode" (which I suppose indicates
32 the DMA/UDMA mode) is set to 1 if it wasn't already.
33
34 This value is then used as an argument to the ide_rate_filter function
35 (along with the xferspeed). The comments in the code for ide_rate_filter
36 are as follows (drivers/ide/ide-lib.c):
37
38 /**
39 * ide_rate_filter - return best speed for mode
40 * @mode: modes available
41 * @speed: desired speed
42 *
43 * Given the available DMA/UDMA mode this function returns
44 * the best available speed at or below the speed requested.
45 */
46
47 Bottom line: the message you see is an informational message printed
48 during ide initialization, and the value of hw_config is used by the
49 kernel to set drive speed.
50
51 Keep in mind that I'm definitely no kernel guru, and did my searches by
52 simply grepping through the code, so something might be wrong in what I
53 said. Anyway, I think the general idea is correct.
54
55 But don't worry, because your value for hw_config is "600d"! :)
56 --
57 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Re: New kernel 2.6.20-r6 Etaoin Shrdlu <shrdlu@×××××××××××××.org>