Regression in 5.0.11 PCMCIA support

Started by morus, January 04, 2011, 18:24:07 PM

Previous topic - Next topic

morus

With 5.0.11-test I was able to boot Ubuntu from an external USB disk on my Acer TravelMate 634 notebook via a NEC USB 2.0 PCMCIA card. With 5.0.11-stable this is no more possible (however via the built-in USB 1.1 port it still works). I would bet that the problem is an incorrect initialization of the PCMCIA bridge. It's an OZmicro bridge, which is quite often found on older Notebooks. This PCMCIA bridge features a non-standard burst mode which needs to be enabled for USB 2.0 cards. The bios of my notebook enables this mode by default. However both the windows and the linux PCMCIA drivers clear the corresponding bit in the PCI config space, so I have to set this bit manually after the driver is loaded via setpci:

/bin/setpci -s 00:13.0 94.b=0xea

Can it be that PLOP 5.0.11-test leaves this bit untouched while 5.0.11-stable sets it in the same (wrong) way as the linux driver?

morus

Here is the log of what I had to do to get Ubuntu 10.04 running off an externel USB 2.0 disk on my Acer TM634 via a NEC USB 2.0 PCMCIA card:

install on ext. disk via built-in usb 1.1 port (use kernel parameter nohz=off for the Ubuntu installer)
install plop bootloader 5.0.11-test
boot ubuntu (still via built-in usb 1.1)
add yenta_socket to /etc/initramfs-tools/modules
mkinitramfs -o filename.gz
gunzip filename.gz
mkdir t
cd t
cpio -id <../filename
cp /usr/bin/setpci bin
cp /usr/lib/libpci.so.3 lib
cp /lib/libz.so.1 lib
cp /lib/libresolv.so.2 lib

add the following three lines to the 'init' script file after load_modules:

/bin/setpci -s 00:13.0 LATENCY_TIMER=40
/bin/setpci -s 00:13.1 LATENCY_TIMER=40
/bin/setpci -s 00:13.0 94.b=0xea
---------------
find ./ | cpio -H newc -o > ../filename2
cd ..
gzip filename2
mv filename2.gz /boot
change name of initrd in /boot/grub/grub.cfg to filename2.gz and add nohz=off kernel parameter
reboot via USB 2.0

Elmar


morus

It means that register 0x94 is byte adressed. Btw. the PCMCIA bridge is an OZ6933 from O2Micro (not OZMicro, sorry). See also: http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg10659.html

The setting of the latency timer is not important, enabling the burst mode is what makes the USB card work.

Regards
Sebastian

Elmar

#4
i never changed the byte at offset 0x94. its marked as reserved in the oz6812 datasheet and none of the standard registers. i didn't find a datasheet of oz6933. according your link its an undocumented register and i dont change such registers. are you really sure that the test version was working?

regards
elmar

morus

#5
Yes, and it is STILL WORKING. Today I did a test with both stable and test (IIRC this is the second test version you released):

boot via usb 1.1 (built-in port)
->test works
->stable works

boot via usb 2.0 (NEC card)
->test works
->stable does not work ("No boot device found")

It's just so similar to the problems I had with linux and windows, i.e. drivers load ok, but USB 2.0 does not work. However setting reg 0x94 fixes the problem in both environments. So my guess was that plop might fail for the same reason on my notebook.

To verify this, I did boot with both versions into plain dos and ran setpci from there. In both cases I got 0xea, which confirms that plop does not change reg 0x94. So it must be failing for a different reason. For me it is not a big issue, because I have a working solution with the test version, but I think that other users might fail for the same reason with the stable version.

Regards,
Sebastian

PlopUser

Hi,
I also just downloaded the latest version of the Plop Boot Manager
(plpbt-5.0.11).              I have a VERY old Compaq EvoN1050v, and I have upgraded the BIOS to the latest version.
I can boot Lubuntu using my onboard USB 1.1. (Although quite slow!)
I downloaded Plop hoping that I could make Lubuntu work with the PCMCIA USB 2.0. However, I do not see the USB memory stick LED to even blink once.
Interestingly enough, when I ask Plop to boot even from Floppy drive it hangs.
Plop only recognizes my HDD, DVD/CD ROM, and USB 1.1.
The rest simply hangs.
Since Plop plpbt-5.0.11-test seems to work, can you please also upload that version?
Thanks!

Elmar


PlopUser

Can you please generate the .iso file for the PCMCIA card and upload it?
For some reasons I have a hard time editing my .iso file

thanks,

Elmar


PlopUser

No. I did not. But it is good to know. I am using the UltraISO and I simply opened the old .iso file under the pcmcia folder and replaced the new .bin file posted by Elmar (you).

I got a new screen, which is blue checkered instead of the stars. However, like before, when I boot, it finds the PCMCIA card and starts searching for the USB controller, and then it fails.

Elmar

Quote from: PlopUser on January 08, 2011, 00:11:39 AM
No. I did not. But it is good to know. I am using the UltraISO and I simply opened the old .iso file under the pcmcia folder and replaced the new .bin file posted by Elmar (you).

creating a new iso should be the preferred  way. editing iso is always a risk.

Quote from: PlopUser on January 08, 2011, 00:11:39 AM
... and then it fails.

this says nothing and could be anything. it could mean that your pc has a power loss. please try to describe what you see on the screen.

PlopUser

ok... I used your own ISO creator and here is what happens during the boot, when I press the CTRL key:

Loading plpbt.bin.....ready
ab
xwxxxcplop boot manager:
pcmcia start
found PCI to CardBus Bridge
searching pccard
pccard found, searching for USB controllers...
no USB pccard found
CardBud Bridge End

pcmcia end

(Then I pressed space to move on)

Then it goes to the GUI and the menu shows:
HDA partition 1
Floppy
CDROM
Network

setup, etc

My USB 2.0 PCMCIA card is using an NEC chip, and it has an inlet for extra power to be connected to one of the USB 1.1 ports, which is connected.

The card works without any problem with both Windows XP, Ubuntu/Lubuntu

Elmar

#13
Quote from: PlopUser on January 08, 2011, 00:50:43 AM
ok... I used your own ISO creator and here is what happens during the boot, when I press the CTRL key:

Loading plpbt.bin.....ready
ab
xwxxxcplop boot manager:
pcmcia start
found PCI to CardBus Bridge
searching pccard
pccard found, searching for USB controllers...
no USB pccard found
CardBud Bridge End

pcmcia end

(Then I pressed space to move on)

Then it goes to the GUI and the menu shows:
HDA partition 1
Floppy
CDROM
Network

setup, etc

My USB 2.0 PCMCIA card is using an NEC chip, and it has an inlet for extra power to be connected to one of the USB 1.1 ports, which is connected.

The card works without any problem with both Windows XP, Ubuntu/Lubuntu

and this is absolutely different to the problem of morus and has nothing to do with the update in the test version.

EDIT:
so this is another topic

PlopUser

#14
By the way, the Floppy works this time from the menu. Good job!

However, for selecting USB from menu, it seems that I have to press SHIFT (as I read in another posting), before pressing Enter. Then it boots. But it only checks the USB 1.1, not the ones on the PCMCIA card.

And if there is nothing in the USB 1.1 ports, then it hangs.

PlopUser

Hi Elmar,
So, do you think you can fix this so that the PCMCIA USB ports are also going to be initialized? (Not just the card only)

pcmcia start
found PCI to CardBus Bridge
searching pccard
pccard found, searching for USB controllers...   <=== Very good!  :-)
no USB pccard found  <== Not good   :-(
CardBud Bridge End

pcmcia end


I have already a work around for Puppy Linux, using Panasonic USB drivers and LinLd through a floppy MS-DOS disk. However, the solution does not work using Ubuntu 10.10 (and Lubuntu 3). LinLd crashes.

Hence, I though to ask you and see if you can make it happen.

Thanks


Elmar

i have no idea why this happened on some pc's, so currently i am not able to fix it.

regards
elmar

PlopUser

Could it be that the card does not have enough time to respond and power up the USB 2.0 controllers?
Can you put more delays until your receive the notification?

I have seen that it takes the Panasonic driver at least 10 seconds before it can find the active USB port on the PCMCIA card.
Or maybe you can put retries for say 3 times, before the code gives up.

morus

5.0.12-test was working for me, but 5.0.12-test2 is broken again.


PlopUser

#19
Do you mean 5.0.11-test working? I read that was the working version.
Or do you mean that 5.0.12-test that has been working for a while, all of a sudden stopped working?
If you have 5.0.11-test, can you upload it in here?

morus

For me PCMCIA USB 2.0 boot works with:

5.0.11-test
5.0.12-test (http://download.plop.at/tmp/plpbt1.bin)

It does not work with:

5.0.11
5.0.11-2
5.0.12-test2 (http://download.plop.at/tmp/plpbt.bin)


Elmar

Quote from: morus on January 15, 2011, 21:46:44 PM
5.0.12-test was working for me, but 5.0.12-test2 is broken again.

morus, this info is useless without details whats happening.

@PlopUser: none of the test versions had a fix for the problem with your card and i don't see a chance to fix it soon.

elmar

morus

Sorry, but there is noch much to say about what's happening. The only obvious difference is that the working versions give me some text output about PCMCIA initialization (visible only for maybe 2 seconds) before the GUI starts, while the non-working versions don't. Non-working in this context means that my USB 2.0 disk is not detected ("No boot device found").

Elmar

Quote from: morus on January 16, 2011, 13:01:35 PM
Sorry, but there is noch much to say about what's happening. The only obvious difference is that the working versions give me some text output about PCMCIA initialization (visible only for maybe 2 seconds) before the GUI starts, while the non-working versions don't. Non-working in this context means that my USB 2.0 disk is not detected ("No boot device found").

this is a info and absolutely different to the problem at the beginning. its important to know that before there was an output that now there is none. are you sure that you use the pcmcia version and not the not pcmcia version? go to the "about" menu entry in the boot manager. there have to be the text "pcmcia", if it isn't there then you are not using the version with the pcmcia driver.

people! its difficult and impossible to help when you don't say what you see or not see, whats and when happening or not happening. only to say its not working is wasting my time and makes no fun. i dont expect much. the boot manager is a complex software and only to say it doesn't work is too less. is it really required to write a guide how to report a problem?

regards
elmar

morus

Sorry, my mistake. I did not get that http://download.plop.at/tmp/plpbt.bin is the non-PCMCIA version of 5.0.12-test2. This time I tried with the PCMCIA version of 5.0.12-test2 from the zip file and it worked just fine.

PlopUser

I just happened to realize something.
The first time that the plop boots from floppy, it recognizes the PCMCIA card, but it cannot initialize the USB 2.0 ports on the card.
(Based on what I see on the screen logs)

After plop boots, if from the main menu, I select to Boot from the Floppy again, then it recognizes both the PCMCIA card and initializes the USB 2.0 ports.
(Based on what I see on the screen logs)

Now, if there is a USB thum drive in one of the USB 1.1 ports, it tries that one first, and then tries USB 2.0 ports on the PCMCIA card.
However, if there is no USB thumb drive in the USB 1.1 ports, then plop will hang and will not check USB 2.0 at all.