hwpath for superio serial console
Now I've fixed pdc_stable to not dereference a null ptr, I can see why it failed. The hardware path it has is:
# cat console/* [10/0/14/1/1] 643
To my mind, this is a broken hwpath. The algorithm we use for converting hwpaths to PCI busses says this is:
10 (PA)
10/0 (PA)
10/0/14 (PCI bridge 0e.0)
10/0/14/1/1 (PCI device 1.1)
We're actually supposed to decode this as:
10/0 (PA)
10/0/14/1 (PCI device 0e.1)
10/0/14/1/1 (subfunction 1?)
This isn't consistent breakage, only for serial console hwpath on a sprockets machine. N4000 reports [0/0/4/0] (Ike 0, Elroy 0, PCI device 4.0). Sprockets reports [10/0/15/1] for alternate boot path (Astro 10, Elroy 0, PCI device 0f.1), [10/6/2/0] for graphics console, and [10/0/14/2] for USB keyboard.
To my mind, SERIAL_1 should have been reported by a hwpath of 10/0/14/1 and then two layers -- the first being 1 or 2 for SERIAL_1 vs SERIAL_2, and the second encoding 9600.8.none (which seems to be 643 for some reason).
How should we be handling this? Look for a device, then retry with the hwpath shifted left if we don't find it? How about when write support is added? What does HPUX do?
Signature · 10 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain _______________________________________________ parisc-linux mailing list [email protected] http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
Quoted 5 lines · Matthew Wilcox
# cat console/* [10/0/14/1/1] 643To my mind, this is a broken hwpath.
It is.
We can even detect those - the PCI dev/func needs to be encoded as "func<<5 | dev" (ie 10/0/46/1) if it wanted to follow the expected convention.
Quoted 1 line
10/0/14/1/1 (PCI device 1.1)
It should be "10/0/14/1.1".
Quoted 4 lines
We're actually supposed to decode this as:
10/0 (PA)
10/0/14/1 (PCI device 0e.1)
So far so good.
Quoted 1 line
10/0/14/1/1 (subfunction 1?)
no - see above.
Quoted 2 lines
This isn't consistent breakage, only for serial console hwpath on a sprockets machine.
Right - someone botched how to display suckyio serial ports. Maybe this was an attempt to make it consistent with other serial ports not using "layers" to identify the port.
Quoted 4 lines
To my mind,
SERIAL_1should have been reported by a hwpath of 10/0/14/1 and then two layers -- the first being 1 or 2 forSERIAL_1vsSERIAL_2, and the second encoding 9600.8.none (which seems to be 643 for some reason).
Yes.
Quoted 1 line
How should we be handling this?
Probably just ignore it. It's just a "handle" and people will have to manually handle it as a quirk.
Try "in io" and see what it says for SERIAL_1 and SERIAL_2 on the astro based workstation.
My j6k show's it as 10/0/14/1/1.
So I think it's ok if Linux is consistent with what firmware displays.
grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux