lkml.org 
[lkml]   [2005]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pcmcia/ds: handle any error code
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/

\
 
 \ /
  Last update: 2005-05-13 12:56    [W:0.055 / U:2.432 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site