# development sources and pcmcia-cs

## Crim

Hey everyone, I was just wondering if anyone has been messing around with pcmcia-cs support and the development sources and if you have gotten anywhere? Unlike the 2.4.19 kernel pcmcia says I should compile with cardbus support in the kernel, did that everything configures fine but it fails on cardmgr during the compile. Has anyone else had a similiar problem?

----------

## rojaro

show us some error messages ...

----------

## Crim

Sorry about that, here is the error in detail.  :Smile:  The machine is a sony vaio pcg-c1vn so I had to boot off the cd to boot up the network and grab the output.

This is the full text of emerge pcmcia-cs:

Calculating dependencies   \>>> Unpacking source...

>>> Unpacking pcmcia-cs-3.2.1.tar.gz

>>> Unpacking orinoco-0.12b.tar.gz

>>> Source unpacked.

    -------- Linux PCMCIA Configuration Script --------

The default responses for each question are correct for most users.

Consult the PCMCIA-HOWTO for additional info about each option.

Linux kernel source directory [/usr/src/linux]

The kernel source tree is version 2.5.37.

The current kernel build date is Sat Sep 21 00:01:51 2002.

Build 'trusting' versions of card utilities (y/n) [n]

Include 32-bit (CardBus) card support (y/n) [y]

Include PnP BIOS resource checking (y/n) [n]

Module install directory [/lib/modules/2.5.37]

Kernel configuration options:

    Kernel-tree PCMCIA support is enabled.

    Symmetric multiprocessing support is enabled.

    PCI BIOS support is enabled.

    Power management (APM) support is disabled.

    SCSI support is enabled.

    IEEE 1394 (FireWire) support is disabled.

    Networking support is enabled.

     Radio network interface support is enabled.

     Token Ring device support is disabled.

     Fast switching is disabled.

     Frame Diverter is disabled.

    Module version checking is enabled.

    Kernel debugging support is disabled.

    Preemptive kernel patch is disabled.

    /proc filesystem support is enabled.

System V init script layout (y/n) [n]

X Window System include files not installed.

    If you wish to build the 'cardinfo' control panel, you need the Forms

    library and the X Window System include files.  See the HOWTO for details.

Configuration successful.

Your kernel is configured with PCMCIA driver support.  Therefore,

'make all' will compile the PCMCIA utilities but not the drivers.

make[1]: Entering directory `/var/tmp/portage/pcmcia-cs-3.2.1/work/pcmcia-cs-3.2.1/cardmgr'

cc -march=i686 -mcpu=i686 -O3 -pipe -MD -O -Wall -Wstrict-prototypes -pipe -I../include/static -I/usr/src/linux/include -I../include -I../modules -c cardmgr.c

cc -march=i686 -mcpu=i686 -O3 -pipe -c -MD -O -pipe -I../include/static -I/usr/src/linux/include -I../include -I../modules yacc_config.c

In file included from cardmgr.c:199:

/usr/src/linux/include/scsi/scsi.h:172: parse error before "u8"

/usr/src/linux/include/scsi/scsi.h:172: warning: no semicolon at end of struct or union

/usr/src/linux/include/scsi/scsi.h:173: warning: type defaults to `int' in declaration of `ScsiLun'

/usr/src/linux/include/scsi/scsi.h:173: warning: data definition has no type or storage class

cc -march=i686 -mcpu=i686 -O3 -pipe -c -MD -O -pipe -I../include/static -I/usr/src/linux/include -I../include -I../modules lex_config.c

make[1]: *** [cardmgr.o] Error 1

make[1]: *** Waiting for unfinished jobs....

make[1]: *** Waiting for unfinished jobs....

make[1]: Leaving directory `/var/tmp/portage/pcmcia-cs-3.2.1/work/pcmcia-cs-3.2.1/cardmgr'

make: *** [all] Error 2

!!! ERROR: The ebuild did not complete successfully.

!!! Function src_compile, Line 43, Exitcode 2

!!! failed compiling

/usr/src/linux/include/scsi/scsi.h

168-/*

169- * ScsiLun: 8 byte LUN.

170- */

171-typedef struct scsi_lun {

172:	u8 scsi_lun[8];

173-} ScsiLun;

174-

175-/*

176- *  MESSAGE CODES

I appended the part of scsi.h in question for the 2.5.37 development sources. Same error with 2.5.35 also. The note about not compiling the drivers is also disturbing, but I had to compile pcmcia support into the kernel since its a greater than 2.5> revision. At least, thats what pcmcia-cs told me to do. Suggestions? Thanks.

----------

## masseya

 *Crim wrote:*   

> I appended the part of scsi.h in question for the 2.5.37 development sources. Same error with 2.5.35 also. The note about not compiling the drivers is also disturbing, but I had to compile pcmcia support into the kernel since its a greater than 2.5> revision. At least, thats what pcmcia-cs told me to do. Suggestions? Thanks.

 

Did you try it the other way just for kicks?

----------

## Crim

Yeah I tried just about everything and gave up for now. I reverted to the vanilla 2.4.19 and all is right with the world. I will definitely be revisiting this question later though.

----------

## monkeyBox

same error for me... except I REALLY want to use this kernel! (better ACPI support)  Let me know if any of you figure it out!

----------

## fury

I'm getting the same problem.  If I drop SCSI support it seems to compile ok (though i would be able to mount my usb smartmedia or burn cds, which may or may not work anyway under 2.5).

It still isn't working properly for me though.

```

May 12 11:20:08 eightytoo kernel: airo:  Probing for PCI adapters

May 12 11:20:08 eightytoo kernel: Badness in kobject_register at lib/kobject.c:293

May 12 11:20:08 eightytoo kernel: Call Trace:

May 12 11:20:08 eightytoo kernel:  [<f4939f50>] airo_driver+0x50/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<c0224ca7>] kobject_register+0x58/0x61

May 12 11:20:08 eightytoo kernel:  [<f4939f40>] airo_driver+0x40/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<c02528db>] bus_add_driver+0x57/0xc6

May 12 11:20:08 eightytoo kernel:  [<f4939f40>] airo_driver+0x40/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<f493a480>] +0x0/0x200 [airo]

May 12 11:20:08 eightytoo kernel:  [<c0252d53>] driver_register+0x31/0x35

May 12 11:20:08 eightytoo kernel:  [<f4939f28>] airo_driver+0x28/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<c017dacb>] create_proc_entry+0x87/0xcf

May 12 11:20:08 eightytoo kernel:  [<c0229a51>] pci_register_driver+0x43/0x53

May 12 11:20:08 eightytoo kernel:  [<f4939f28>] airo_driver+0x28/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<f493c0d6>] +0xd6/0xfe [airo]                                          May 12 11:20:08 eightytoo kernel:  [<f4939f00>] airo_driver+0x0/0xa0 [airo]

May 12 11:20:08 eightytoo kernel:  [<f493a480>] +0x0/0x200 [airo]

May 12 11:20:08 eightytoo kernel:  [<c0134382>] sys_init_module+0x149/0x226

May 12 11:20:08 eightytoo kernel:  [<f493a480>] +0x0/0x200 [airo]

May 12 11:20:08 eightytoo kernel:  [<c010add7>] syscall_call+0x7/0xb

May 12 11:20:08 eightytoo kernel: 

May 12 11:20:08 eightytoo kernel: airo:  Finished probing for PCI adapters 

May 12 11:20:08 eightytoo kernel: airo_cs: RequestConfiguration: Operation succeeded

```

I'm not really sure what I've messed up, so I'm dwelling in 2.4 ATM.

----------

## latexer

pcmcia has recently had a major overhaul in the 2.5.x series. THe actual drivers from pcmcia-cs will not work with 2.5.x anymore. Use the drivers from the kernel. As for cardmgr, the best route right now seems to be to use a cardmgr that was compiled against a 2.4.x kernel. It works (for the most part). pcmcia will soon switch over to using a hotplug interface just like USB soon (from what i've gathered from LKML). The scripts and the userland tools for this is not really there yet though. Good luck with it, i've had middling success so far (mainly with 802.11b hardware)

----------

