I have Sun Ultra40 workstation. Southbridge is nVidia CrushK8-04/nforce 2200 (too many names, sounds like a criminal).
1) Linuxbios loads kernel A; kernel A loads kernel B. Everything works fine.
2) Then I push the reset button.
3) Linuxbios loads kernel A; kernel A loads kernel B. Kernel B complains about wrong checksum of the mptable and crushes later.
An investigation showed that in 3), short after kernel A (v2.6.19.2) sets the Bus Master Enable bit of the nVidia's USB1 controller (pci_set_master()), the mptable gets two bytes at physical address 0x80 damaged.
Nothing is plugged to the USB ports. Other two Sun workstations had the same behavior. This does not make sense to me unless the controller has a HW bug.
I believe, this should better be fixed in the kernel USB driver.
For now this patch offers a possibility for linuxbios to reset the USB controller by setting HostControllerReset bit in HcCommandStatus Register. It is enablead by using 'register "usb1_hc_reset"="1"' in 'chip southbridge/nvidia/ck804' section of the mainboard's Config.lb.
Signed-off-by: Roman Kononov kononov195-lbl@yahoo.com
Hi Roman, this patch looks fine save for one thing: I believe that the // comments were supposed to be deprecated. I can not find a reference for this, however; anybody care to correct me?
signed,
a former // coment user
Hi,
On Fri, Feb 02, 2007 at 10:40:34AM -0700, ron minnich wrote:
Hi Roman, this patch looks fine save for one thing: I believe that the // comments were supposed to be deprecated. I can not find a reference for this, however; anybody care to correct me?
Well, not sure. // comments are valid in C++, but not (ANSI?) C as far as I know. But in practice compilers allow both, except if you pass some command line options like -pedantic and others...
Uwe.
Uwe Hermann wrote:
Hi,
On Fri, Feb 02, 2007 at 10:40:34AM -0700, ron minnich wrote:
Hi Roman, this patch looks fine save for one thing: I believe that the // comments were supposed to be deprecated. I can not find a reference for this, however; anybody care to correct me?
Well, not sure. // comments are valid in C++, but not (ANSI?) C as far as I know. But in practice compilers allow both, except if you pass some command line options like -pedantic and others...
IIRC the C99 standard is the first C standard to allow // comments.
Regards, Carl-Daniel
On 02/02/2007 12:08 PM, Carl-Daniel Hailfinger wrote:
IIRC the C99 standard is the first C standard to allow // comments.
I vote for allowing // comments since:
1. they are a C standard 2. they do not clutter so much 3. they make life easier for many people 4. the current code has too many GCC-specific things anyway
Roman
Hi,
On Fri, Feb 02, 2007 at 02:28:28PM -0600, Roman Kononov wrote:
On 02/02/2007 12:08 PM, Carl-Daniel Hailfinger wrote:
IIRC the C99 standard is the first C standard to allow // comments.
I vote for allowing // comments since:
Yeah, I agree. This is not so critical, IMHO. If we really care, we can always replace them later... We got more important things to do right now :)
Besides, we already have lots of // comments in the code anyway.
- the current code has too many GCC-specific things anyway
This is more important IMHO than the // comments. We should keep LinuxBIOS as compiler-/toolchain-independant as possible (if we can).
Patches to improve the situation are welcome :)
Uwe.
On 2/1/07, Roman Kononov kononov195-lbl@yahoo.com wrote:
I have Sun Ultra40 workstation. Southbridge is nVidia CrushK8-04/nforce 2200 (too many names, sounds like a criminal).
Linuxbios loads kernel A; kernel A loads kernel B. Everything works fine.
Then I push the reset button.
Linuxbios loads kernel A; kernel A loads kernel B. Kernel B complains
about wrong checksum of the mptable and crushes later.
An investigation showed that in 3), short after kernel A (v2.6.19.2) sets the Bus Master Enable bit of the nVidia's USB1 controller (pci_set_master()), the mptable gets two bytes at physical address 0x80 damaged.
Nothing is plugged to the USB ports. Other two Sun workstations had the same behavior. This does not make sense to me unless the controller has a HW bug.
I believe, this should better be fixed in the kernel USB driver.
For now this patch offers a possibility for linuxbios to reset the USB controller by setting HostControllerReset bit in HcCommandStatus Register. It is enablead by using 'register "usb1_hc_reset"="1"' in 'chip southbridge/nvidia/ck804' section of the mainboard's Config.lb.
Signed-off-by: Roman Kononov kononov195-lbl@yahoo.com
Acked-by: Ronald G. Minnich rminnich@gmail.com Committed revision 2546.