Re: [PATCH] pcmcia/ds: handle any error code

From: Wakko Warner (wakko_at_animx.eu.org)
Date: 05/13/05

  • Next message: Felipe Alfaro Solana: "Re: RSS feed for latest kernel versions"
    Date:	Fri, 13 May 2005 06:50:00 -0400
    To: randy_dunlap <rdunlap@xenotime.net>
    
    

    randy_dunlap wrote:
    > | Wakko Warner wrote:
    > | > 3) I put together a boot kernel/initrd using 2.6.12-rc2 (also tested
    > | > 2.6.12-rc4) which seems to work, except that pcmcia does not function
    > | > properly. When pcmcia.ko gets loaded, it is unable to register it's char
    > | > dev. I'm not sure why this is. 2.6.11.8 worked fine with no modifications
    > |
    > | I tested this again today with a few changes. It appears that if pcmcia.ko
    > | (or rather the .c files that make it up) are compiled with -Os, it will fail
    > | to register a character device. Being that one of my goals for this was to
    > | fit everything on a floppy, I had to use -Os when building the kernel.
    > | (pcmcia was not one of the modules that belongs on the floppy, however I
    > | did not want to have to compile the kernel and then again for the modules
    > | w/o -Os)
    > |
    > | I believe that pcmcia.ko is the only module I am using that uses a dynamic
    > | major.
    >
    > There is some small difference in locking in fs/char_dev.c between
    > 2.6.12-rc4 and 2.6.11.8, but I don't yet see why it would cause a
    > failure in register_chrdev().
    >
    > Oh, there's a big difference in drivers/pcmcia/ds.c, lots of probe
    > changes. This is where to look further (but not tonight).
    > The question then becomes is this a real regression?
    >
    > Do you suspect a problem with -Os code generation?

    Definately. Here's what I did. The laptop I was testing has 2.6.12-rc2
    installed (it's a multi boot). This kernel was compiled specifically for
    the laptop since it's one that I use for work. The kernel I compiled with
    -Os is a generic and this laptop was the only one I had to test this with.
    So basically, you could say this laptop currently has 2 linux installations
    on it. The generic one I'm trying to get partially on a floppy and it's
    normal one.

    I was first booting from floppy to test. The kernel on the floppy is
    compield with -Os and the kernel itself is compressed with upx-ucl-beta to
    make it smaller. Then it has a gzipped initrd with busybox and some
    modules. I call this stage1. stage2 which has the pcmcia module comes from
    either a cdrom or a usb stick (I have stage 1 on the laptop hdd, but stage 2
    still comes from usb). Figuring there might have been a problem with upx, I
    decided to through the stage1 on my laptop's hdd (since it can't boot from
    usb). This time, I recompiled the kernel (make clean, remove optimize for
    size, make bzImage modules, install modules to the usb stick and select ones
    for the initrd). Once I did this, pcmcia worked. The configuration was the
    same, all that changed was not using -Os.

    > Looks to me like ds.c needs at least this small fix...

    I'll forward this diff to myself at work and test it. Thanks. I'll let you
    know what happens.

    -- 
     Lab tests show that use of micro$oft causes cancer in lab animals
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Felipe Alfaro Solana: "Re: RSS feed for latest kernel versions"

    Relevant Pages

    • Re: Boot Floppy
      ... Claus wrote: ... small recovery tool that runs off a floppy I would have a good chance ... The laptop has 512 RAM so even if I could load from several ... The darn thing doesn't support USB CD. ...
      (microsoft.public.windows.server.sbs)
    • Re: Dell Latitude LS
      ... YOu still wont get it to install by using a usb cd drive or floppy as the ... The laptop did not have an internal CD Rom or Floppy, ...
      (alt.sys.pc-clone.dell)
    • Re: Building kernel for another computer
      ... > the result onto a floppy. ... I then try and boot the laptop from the floppy (I ... > want to be sure the kernel works okay before I replace the one on the hd). ... The default root device is set in the kernel at build time, ...
      (Debian-User)
    • Re: Etch Beta 2 / USB Floppy
      ... The laptop cd drive cannot be used to boot from (3rd party ... PCMCIA drive) and the floppy is a usb drive. ... The system bios is set to boot from the usb floppy and it boots the ...
      (Debian-User)
    • Re: Icom PCR1000 as a spectrum analyser
      ... to transfer to my friend's PC which is a bit old - a W95 ... laptop with no USB, no CD, just a floppy and HD. ...
      (uk.radio.amateur)