Bug 104517

Summary: Installation from PCMCIA CDROM fails, because it is not initialized properly
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Eric Whiting <whitet>
Component: KernelAssignee: Christian Zoz <zoz>
Status: VERIFIED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: aj, behlert, probono, snwint
Version: RC 1   
Target Milestone: ---   
Hardware: i586   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 115232    
Attachments: screen capture of text -- typing and /var/log/messages
hwinfo
ls output as requested
udevcontrol at log_priority=6
modprobe ide_cs manual before plugging device in
unpug/plug pcmcia card with 10V power attached to drive (no aux power before)

Description Eric Whiting 2005-08-12 21:34:28 UTC
Sony Z505LS laptop. 

Booting CD1 in external/pcmcia based cdrom -- select installation -- it gives
you no display. 

If you select 'installation - acpi off' then the install starts, but drops you
to text mode linuxrc. Trying to 'start installation' from that screen indicates
that it can't see the cd at all. The box just booted from the CDROM, but once
the regular kernel loads I guess the system is confused about how to access the
install CD.
Comment 1 Eric Whiting 2005-08-12 22:41:00 UTC
*** Bug 104542 has been marked as a duplicate of this bug. ***
Comment 2 Steffen Winterfeldt 2005-08-15 09:33:06 UTC
I see at least two problems: 
 
1) acpi 
  boot with 'vga=normal' or select 'text mode' this should give at least 
  some kernel messages 
 
2) pcmcia cd 
  is this via pc-card (old 16 bit) or cardbus interface? pc-card will 
  not work presently (including beta-2) 
Comment 3 Eric Whiting 2005-08-15 13:28:33 UTC
1. acpi with vga=normal

Install hangs. Last messages on conosle:
executing all Device _sta and _ini methods
46 devices found coutainting ...
ACPI interpreter enabled
ACPI: using pic for interuupt routing
acpi: pci root bridge
PCI probing pci hardware
ACPI assum root bridge 
ACPI assume root bridge
ACPI embedded controller ECO gpe 9

Then the screen stops.

2. pcmcia CD
Model PCGA-DVD51 I was running it in PC-card mode. The manual says I have to
have external power to operate in cardbus mode... hmmmm.. I'll look for the
power cord.

Comment 4 Steffen Winterfeldt 2005-08-22 15:11:31 UTC
pcmcia should work in beta3  
 
acpi is a kernel problem, please put it into a separate bug and assign to 
kernel 
Comment 5 Eric Whiting 2005-08-26 18:10:28 UTC
Just booted 10.0 beta3 cd1 on same hardware. (selecting acpi=off)

Same error: unable to locate installation CD. 
Comment 6 Steffen Winterfeldt 2005-08-29 08:36:26 UTC
Try manual=1 and load the modules yourself. Does that give you a CD drive? 
I think it's more a problem on the pcmcia driver side. 
Comment 7 Christian Zoz 2005-08-29 09:33:25 UTC
Before we debug CD access a boottime:

Can you access the cdrom from an installed linux system? Sony pccard crdroms are
very special. Not sure if we can do anything at all.
Comment 8 Eric Whiting 2005-08-29 14:55:06 UTC
Just booted 9.2 install DVD and started installation fine. (same CDROM drive)
Just booted 9.1 install DVD and started installation fine. (same CDROM drive)

I did a minimum install of 9.1 and after install the pccard cdrom was mountable
as /dev/hde

Booting 10.0B3 CD1 with manual=1 acpi=off and trying to manually load modules
gives same result. 'make sure that CD1 is in your drive'. It can't see the CDROM
drive in 10.0B3. (maybe this is too old of hardware to be concerned about?)

It sounds like a PCMCIA problem on 10.0. (or is linuxrc not looking at /dev/hde?)





Comment 9 Eric Whiting 2005-08-29 22:52:32 UTC
Just booted 9.3 install DVD and startedinstallation fine. (without any special
flags like acpi=off or manual=1, etc)

Comment 10 Steffen Winterfeldt 2005-08-30 08:55:43 UTC
Chances are that beta4 is a bit better. 
 
As Christian said, it would help if you could boot a 10.0 some other way, 
say via network card, and then have a look at what has to be done to get the 
drive working. 
Comment 11 Christian Zoz 2005-08-31 10:08:45 UTC
well, i had bad experience with some Sony CDrom device, but if you say that it
worked well up to now, then we'll check that of course.

Up to beta3 we did not initialize pcmcia sockets properly. So either wait for
beta4 or try another way of installation as Steffen supposed.

It is much easier to debug such a case in the running system.
Comment 12 Eric Whiting 2005-08-31 13:57:21 UTC
Booted 9.3 resuce. 
rsync'd the 10B3 tree to hda3
booted 10B3 CDROM acpi=off
Did install from harddisk. 

Install completed fine. 

checked for /etc/init.d/pcmcia file -- not present. 
Tried to add pcmcia via rpm -- got errors.
Did a force on the package. 
Now the pcmcia utils appear to work better. 
hmmm..
Screen log attached. 


Comment 13 Eric Whiting 2005-08-31 13:58:17 UTC
Created attachment 48320 [details]
screen capture of text -- typing and /var/log/messages
Comment 14 Eric Whiting 2005-08-31 19:17:06 UTC
Same error with Beta4

Beta4 cd1 booted.
screen: linuxrc v 1.9.12 kernel 2.6.13-3-default
Menu: choose  source medium (CDROM) enter
message: Make sure that CD number 1 is in your drive.

Well the CD is in there. It booted the system. It just can't see it anymore. 

I'm sure I could do a rsync of beta4 and install from hard disk, but I can't
install from this PCMCIA cdrom. Most Sony 505's don't have a built-in cdrom. 

Drive is operating in pc-card mode (according to the manual -- no external power
means pc-card mode)

I think the CDROM sometimes shows up as hde -- Is this kernel not configured to
look at other ide drives beyond hd[abcd]?


Comment 15 Steffen Winterfeldt 2005-09-01 08:45:30 UTC
Before we revert to superstition: does the driver (ide-cs, I think) get 
loaded and if not, does loading it manually (after the pcmcia core drivers) 
help? 
Comment 16 Eric Whiting 2005-09-01 15:32:40 UTC
booting B4CD1
changing to VC10 -- lsmod doesn't show ide-cs.
modprobe ide-cs loads the module. (but messages on VC4 fail to show any ide-disk
hardware detection like they should)

Trying to do the same from the linuxrc menus (load/unload modules) yields the
same result. 

Works for 9.1, 9.2, 9.3. 
Does not work for 10.0.

I booted 9.3 install and noticed that in 9.3 the external IDE devices are
detected first -- pcmcia ide is hda -- internal hard disk is hdc

In 10.0 the order is reversed. It detects the internal hard disk as hda and then
fails to detect the pcmcia ide. booting with ide=revers did not help. 

Seems to be a kernel/pcmcia change that is causing this -- or a linuxrc cdrom
detection difference.


Comment 17 Jan Engelhardt 2005-09-05 19:01:04 UTC
For the record: I've got a PCGA-CD51/A over PCMCIA ("your small brother"). No
external or iLink-style DC power required. It uses/has "NinjaATA" which works
well in the stock 9.3 kernel and newer. Requires "ISA support" in the kernel.
(EISA or "ISA Plug and Play" not required.) I can get into linuxrc, possibly
further; but I did not try that. I went there using text mode; did not try
graphic. So far fine here.
Comment 18 Christian Zoz 2005-09-12 10:02:52 UTC
I now tested it myself with RC1.
linuxrc seems to detect the card, at least pcmcia_socket_startup was executed
regarding the messages at console 4. But ide_cs was not loaded.
After loading ide_cs manually i can proceed installation.
Comment 19 Steffen Winterfeldt 2005-09-12 10:21:48 UTC
Ok, if you get that far, what does 'hwinfo --pcmcia' say? And attach 
the result of 'getsysinfo', too. 
Comment 20 Christian Zoz 2005-09-12 10:59:33 UTC
hwinfo sees the cdrom, but as 'Hardware Class: unknown'.
getsysinfo tells nothing interesting.

It works here if i add insmod=ide_cs to the boot prompt.

Eric, would you please do the same and try installation again? And please also
report 'hwinfo --pcmcia'.
Comment 21 Eric Whiting 2005-09-12 13:38:39 UTC
Booting RC1 CD1 with insmod=ide=cs does not help. Install still fails with an
unable to find media message.  

hwinfo attached
Comment 22 Eric Whiting 2005-09-12 13:47:46 UTC
Created attachment 49616 [details]
hwinfo
Comment 23 Steffen Winterfeldt 2005-09-12 13:51:11 UTC
Eric, have you seen it actually loading the module? 
Comment 24 Eric Whiting 2005-09-12 13:58:55 UTC
Module loading: cntl-F3 console shows insmod /modules/ide-cs.ko.  cntl-F4
doesn't seem to show any messages related to the module loading.

Clarification: RC1 CD1 will boot and start linuxrc fine. Where this process
fails is when I try to proceed with the install and actuall install from CD1. 
This behavior has not changed much from B* to RC1. 

One more note: In 9.3 there seemed to be very long delays while linuxrc was
starting  before it continued with the install. 10 releases seem to be very fast
to start  linuxrc and fail right away. (unable to mount the cdrom error)
Comment 25 Steffen Winterfeldt 2005-09-12 14:04:36 UTC
Then this seems to be a different problem to Christians notebook. 
Comment 26 Timo Hoenig 2005-09-13 07:51:35 UTC
*** Bug 116687 has been marked as a duplicate of this bug. ***
Comment 27 Andreas Jaeger 2005-09-13 08:02:57 UTC
Raising priority.
Comment 28 Steffen Winterfeldt 2005-09-13 12:11:59 UTC
Christian, I'll need the notebook if I should do something here.  
Comment 29 Steffen Winterfeldt 2005-09-13 14:09:22 UTC
Ok, linuxrc now loads ide-cs automatically. And the driver even works at 
least on the test machine I have. 
Comment 30 Eric Whiting 2005-09-13 14:21:56 UTC
Can you post an ISO of CD1 (or mini-root) so I can verify here?
Comment 31 Steffen Winterfeldt 2005-09-13 14:40:15 UTC
ftp://ftp.suse.com/pub/people/snwint/10.0/rc3-test.iso 
(Rescue system only.) 
 
May take some time until it's visible from outside, though. 
Comment 33 Timo Hoenig 2005-09-13 15:12:31 UTC
I'll give it a try.
Comment 34 Timo Hoenig 2005-09-13 16:03:32 UTC
Verified on a Toshiba Portege 2000.

The rescue system offered

   * the PCMCIA CD-ROM drive as /dev/hda

and

   * the harddrive as /dev/hdc
Comment 35 Eric Whiting 2005-09-13 18:55:00 UTC
I downloaded the rc3-test.iso rescue system. (did I get the right file?)
cb443e0ec346e0d7965d0dd44e8a5c7e  rc3-test.iso
Booted -- selected rescue.
waited for all hardware detection -- 
eventually got to linuxrc --
start install/system
selected rescue system
ERROR -- unable to mount the CDROM.
CNTL-F4 has many 'device not ready. make sure there is a disc in the drive' errors.
module loaded list did not include ide-cs. I did a manual load of this and it
still couldn't see the cdrom to load the rescue system.

Tried 9.3 DVD1 again -- it boots and starts install or rescue from CDROM just
fine. (cdrom is hda -- hard disk is hdc) I notice that I get 'starting card
manager messages' in 9.3 that I never see in 10.0. 




Comment 36 Christian Zoz 2005-09-14 07:34:03 UTC
Eric, please switch to console 9. There is a very simple shell. What does
   ls -l /sys/bus/pcmcia/*/*
   cat /sys/class/pcmcia_socket/*/card_voltage
   ls -l /sys/block/hd*
   cat /sys/block/hd*/removable
show you?
This shell does not understanf wildcards, so please expand them manually.
Timestamps, modes and ownerships are unimportant, but if there are links, i like
to see where they point to.

Simon, don't use this ide parameters at all. Please check in linuxrc (console 1)
or in the shell in console 9 if ide_cs was loaded. If not then also test the
rescue system from comment 31
Comment 37 Steffen Winterfeldt 2005-09-14 08:48:58 UTC
The module alias in comment 22 does not match anything in ide-cs. 
Comment 38 Eric Whiting 2005-09-14 14:01:27 UTC
module alias:
comment 20 has it as insmod=ide_cs
comment 21 has it as insmod=ide=cs (typo from me)
The syntax I have been using is insmod=ide-cs (dash, not _ or =)

I assume the correct name is ide-cs?
Comment 39 Steffen Winterfeldt 2005-09-14 14:09:13 UTC
Both ide-cs & ide_cs work (beat the kernel people for that). But that's not 
what I meant. I was referring to the 'pcmcia:...' line. 
Comment 40 Eric Whiting 2005-09-14 14:15:30 UTC
I can't figure out how to log/capture the ls output... This might be a little
messy...

FILES/LINKS:
/sys/bus/pcmcia/drivers/ide-cs/bind
/sys/bus/pcmcia/drivers/ide-cs/unbind
/sys/bus/pcmcia/drivers/ide-cs/module -> ../../../../module/ide_cs

/sys/devices/pci0000:00/0000:00:0c.0/0.0/bus -> ../../../../bus/pcmcia
/sys/devices/pci0000:00/0000:00:0c.0/0.0/allow_func_id_match
/sys/devices/pci0000:00/0000:00:0c.0/0.0/modalias
/sys/devices/pci0000:00/0000:00:0c.0/0.0/prod_id4
/sys/devices/pci0000:00/0000:00:0c.0/0.0/prod_id3
/sys/devices/pci0000:00/0000:00:0c.0/0.0/prod_id2
/sys/devices/pci0000:00/0000:00:0c.0/0.0/prod_id1
/sys/devices/pci0000:00/0000:00:0c.0/0.0/card_id
/sys/devices/pci0000:00/0000:00:0c.0/0.0/manf_id
/sys/devices/pci0000:00/0000:00:0c.0/0.0/func_id
/sys/devices/pci0000:00/0000:00:0c.0/0.0/function
/sys/devices/pci0000:00/0000:00:0c.0/0.0/power/state

card_voltage --- 5.0V

/sys/block/hda/
files under here -- queue hda3 hda2 hda1 device(link to
../../devices/pci0000:00/0000:00:07:1/ide0/0.0) state size removable range dev

cat of removable
0

Why is there no cardmgr running in 10.0? Is this part of the pcmcia changes?

Comment 41 Steffen Winterfeldt 2005-09-14 14:18:06 UTC
cardmgr is history  
Comment 42 Christian Zoz 2005-09-15 09:50:27 UTC
About cardmgr, see /usr/share/doc/packages/pcmciautils.

Your device is not in the drivers device table. So it does not feel responsible
for it. You might try
  echo -n 42 > /sys/bus/pcmcia/devices/0.0/allow_func_id_match
but i don't know if
- the shell in console 9 allows redirection
- if it helps at all.

Problem is nearly located, further tests and info extraction can be done from
installed 10.0 system. So choose another way of installation.
Does your CDRom then work after installation?

Then please show me the exact content of /sys/bus/pcmcia/devices/0.0/*. It may
be that some of them do just contain spaces; also the spaces are important. Use
  for a in /sys/bus/pcmcia/devices/0.0/*id*; do echo ">`grep -sH "" $a`<"; done
Comment 43 Christian Zoz 2005-09-15 11:49:59 UTC
This is not critical, since it works in most cases. Only some devices do not work.
Comment 44 Eric Whiting 2005-09-15 15:45:30 UTC
10 Beta3 installed from harddisk (after rsync'ing tree from 9.3 rescue boot).

CDROM is detected fine when I plug in the CDROM 
Sep 15 03:31:07 linux cardmgr[3816]: socket 0: Ninja ATA
Sep 15 03:31:07 linux kernel: Probing IDE interface ide2...
Sep 15 03:31:08 linux kernel: hde: TOSHIBA DVD-ROM SD-C2402, ATAPI CD/DVD-ROM drive
Sep 15 03:31:08 linux kernel: ide2 at 0x180-0x187,0x386 on irq 3
Sep 15 03:31:13 linux kernel: ide-cd: cmd 0x5a timed out
Sep 15 03:31:13 linux kernel: hde: lost interrupt
Sep 15 03:31:13 linux kernel: hde: ATAPI 12X DVD-ROM drive, 128kB Cache
Sep 15 03:31:13 linux kernel: Uniform CD-ROM driver Revision: 3.20
Sep 15 03:31:15 linux kernel: ide-cs: hde: Vcc = 5.0, Vpp = 0.0
Sep 15 03:31:17 linux hal-subfs-mount[6955]: registered at resmgrd and called(0)
/bin/mount -t subfs -o f
s=cdfss,ro,procuid,nosuid,nodev,exec /dev/hde "/media/CDROM"

Note: this is the 2.6.13-rc6-git13-4 Beta3 kernel

OTHER DEBUG OUTPUT -- see attachment.




Comment 45 Eric Whiting 2005-09-15 15:46:22 UTC
Created attachment 50036 [details]
ls output as requested
Comment 46 Christian Zoz 2005-09-15 20:58:56 UTC
OK, the difference seems to be one tiny space in the card identification. The
driver knows 
" ", "NinjaATA-", "*", "*" and you have
"", "NinjaATA-", "V1.0", "AP00 "

But i don't know why it works in runing system. I expected function id matching
but the func_id attribute of your device is empty according the attachment.
Please unplug the card, unload ide_cs and call
  udevcontrol log_priority=6
Then plug the card again and show me the new lines in syslog.
Comment 47 Christian Zoz 2005-09-16 08:45:26 UTC
On Thu, Sep 15, Eric Whiting wrote:
> Email only reply -- I'll add it to bugzilla when I get a chance.
>
> suse 10 RC1 is on the laptop now.  (instead of beta3)
>
> Now in RC1 CDROM no longer shows up as a device when you plug it in.
> (like it did in 10.0 beta3) This should make you feel better regarding
> your comment  about 'why it works in a running system'.
>
> I think there has been some pcmcia changes from beta3 to rc1 that have
> changed this.
Comment 48 Christian Zoz 2005-09-16 09:00:59 UTC
Yes, there were changes, but most changes were formal and not functional (code
moved from one to another script).

Before any test, set udevcontrol log_priority=6 (You can also set
/etc/udev/udev.conf:udev_log=info and '/etc/init.d/boot.udev restart')

Does the device work if you load ide_cs manually before you plug the device?
Please show syslog.
Comment 49 Christian Zoz 2005-09-16 09:17:30 UTC
module aliases for ide_cs were the same in B3 and RC1.
Comment 50 Eric Whiting 2005-09-16 15:35:35 UTC
Created attachment 50169 [details]
udevcontrol at log_priority=6
Comment 51 Eric Whiting 2005-09-16 15:36:14 UTC
Created attachment 50170 [details]
modprobe ide_cs manual before plugging device in
Comment 52 Eric Whiting 2005-09-16 15:42:22 UTC
Created attachment 50171 [details]
unpug/plug pcmcia card with 10V power attached to drive (no aux power before)

I have never used the 10V power for the drive on the other installs of 9.x. I
decided to try the power for this test. Still appears to not help/work -- but
the messages seem a little different.
Comment 53 Eric Whiting 2005-09-19 15:57:33 UTC
info provided.
Comment 54 Christian Zoz 2005-09-30 07:48:09 UTC
OK, all behaves as expected. Since your device did not set a function id the
'func_id based device matching' does not help, too. You could probably override
CIS to solve this, but since ide_cs will become aware of your device soon we
don't wast time on fiddling with your CIS.

The device id table in ide_cs will be enhanced regarding Ninja ATA devices. So a
newer kernel will solve this issue. I will check which kernel version finally
got it.
Comment 55 Christian Zoz 2006-02-13 17:31:01 UTC
The card id is fixed in ide_cs since some time.