Quantcast

Wyse S50 and hang on boot: possible solution

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Wyse S50 and hang on boot: possible solution

Stefano Ceccherini
Hi.
Some of you already know that booting thinstation > 2.2.2 on WyseS50 and similar machines sometimes hang on boot, due to a firmware bug triggered by Linux kernel > 3.2.
We have a couple of these machines, and in fact we still use Thinstation 2.2.2h there.
The other week I stumbled upon this page, where they explain the problem, and offer a fix:


http://www.parkytowers.me.uk/thin/wyse/s10/Linux.shtml

"CS5536 Driver patches

Note: The following patches were made to the driver in the 3.8.13 kernel. There have been some changes to the driver code since my previous set of patches (3.0.21 kernel) and things may be slightly different again with a later kernel.

Freeze during initialisation

I now know the reason for this behaviour. Back in June 2013 Karol pointed me at a posting in the kernel list about a problem with some MIPS hardware. I've only just got round to checking it out (March 2014!) and it turns out this does solve the start-up problem. In the words of Aaro Koskinen:

"Some Loongson boards (e.g. Lemote FuLoong mini-PC) use ISA/southbridge device (CS5536 general purpose timer) for the timer interrupt. It starts running early and is already enabled during the PCI configuration, during which there is a small window in pci_read_base() when the register access is temporarily disabled. If the timer interrupts at this point, the system will hang. Fix this by adding a fixup that keeps the register access always enabled."

The accompanying patch was applied to the driver that's in the MIPS architecture source tree. What we need to do is add the following code to the driver pata_cs5536.c that we're using which is in the directory drivers/ata/:

/*
 * The mfgpt timer interrupt is running early, so we must keep the south bridge
 * mmio always enabled. Otherwise we may race with the PCI configuration which
 * may temporarily disable it. When that happens and the timer interrupt fires,
 * we are not able to clear it and the system will hang.
 */
static void cs5536_isa_mmio_always_on(struct pci_dev *dev)
{
	dev->mmio_always_on = 1;
}
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA,
	PCI_CLASS_BRIDGE_ISA, 8, cs5536_isa_mmio_always_on);

I added it at the start of the functions following all the #includes."

The patch they provide is against the linux kernel 3.8. I have checked and the 3.2 driver is somewhat different.
Would be nice if someone with kernel access, or involved with the Linux kernel, would submit the patch. If this isn't possible, would be nice to build the Thinstation Linux kernel with this patch, because it makes these thin clients usable again.

Thank you in advance.

------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
Thinstation-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/thinstation-developer
Loading...