-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPCMCIA-HOWTO
3427 lines (2726 loc) · 154 KB
/
PCMCIA-HOWTO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Linux PCMCIA HOWTO
David Hinds, [email protected].
v2.119, 29 December 2003
This document describes how to install and use PCMCIA Card Services
for Linux, and answers some frequently asked questions. The latest
version of this document can always be found at <http://pcmcia-
cs.sourceforge.net>.
______________________________________________________________________
Table of Contents
1. General information and hardware requirements
1.1 Introduction
1.2 Copyright notice and disclaimer
1.3 What is the latest version, and where can I get it?
1.4 What systems are supported?
1.5 What cards are supported?
1.6 When will my favorite (unsupported) card become supported?
1.7 Mailing lists and other information sources
1.8 Prerequisites and kernel setup
1.9 Kernel PCMCIA support
1.10 Installation
1.11 Startup options
1.11.1 Card readers for desktop systems
1.12 System resource settings
1.12.1 PowerBook specific settings
1.13 Notes about specific Linux distributions
1.13.1 Debian
1.13.2 Red Hat, Caldera, Mandrake
1.13.3 Slackware
1.13.4 SuSE
2. Resolving installation and configuration problems
2.1 Base PCMCIA kernel modules do not load
2.2 Some client driver modules do not load
2.3 ISA interrupt scan failures
2.4 IO port scan failures
2.5 Memory probe failures
2.6 Failure to detect card insertions and removals
2.7 Interrupt delivery problems
2.8 System resource starvation
2.9 Resource conflict only with two cards inserted
2.10 Device configuration does not complete
3. Usage and features
3.1 Tools for configuring and monitoring PCMCIA devices
3.1.1 The cardmgr configuration daemon
3.1.2 The socket status file, stab
3.1.3 The cardctl and cardinfo utilities
3.1.4 Inserting and ejecting cards
3.1.5 Card Services and Advanced Power Management
3.1.6 Shutting down the PCMCIA system
3.2 Overview of the PCMCIA configuration scripts
3.3 PCMCIA network adapters
3.3.1 Network device parameters
3.3.2 Comments about specific cards
3.3.3 Diagnosing problems with network adapters
3.4 PCMCIA serial and modem devices
3.4.1 Serial device parameters
3.4.2 Comments about specific cards
3.4.3 Diagnosing problems with serial devices
3.5 PCMCIA parallel port devices
3.5.1 Parallel device parameters
3.5.2 Diagnosing problems with parallel port devices
3.6 PCMCIA SCSI adapters
3.6.1 SCSI device parameters
3.6.2 Comments about specific cards
3.6.3 Diagnosing problems with SCSI adapters
3.7 PCMCIA memory cards
3.7.1 Memory device parameters
3.7.2 Using linear flash memory cards
3.8 PCMCIA ATA/IDE card drives
3.8.1 ATA/IDE fixed-disk device parameters
3.8.2 Diagnosing problems with ATA/IDE adapters
3.9 Multifunction cards
4. Advanced topics
4.1 Resource allocation for PCMCIA devices
4.2 PCI interrupt configuration problems and solutions
4.2.1 An overview of PCI interrupt routing issues
4.2.2 CardBus bridge is not detected by the PCI BIOS
4.2.3 PCI interrupt delivery problems
4.2.4 No PCI interrupt assignment; valid routing table
4.2.5 No PCI interrupt assignment; unknown interrupt router
4.2.6 No PCI interrupt assignment; no routing table
4.3 How can I have separate device setups for home and work?
4.4 Booting from a PCMCIA device
4.4.1 The pcinitrd helper script
4.4.2 Creating an initrd boot floppy
4.4.3 Installing an initrd image on a non-Linux drive
5. Dealing with unsupported cards
5.1 Configuring unrecognized cards
5.2 Adding support for an NE2000-compatible ethernet card
5.3 PCMCIA floppy interface cards
6. Debugging tips and programming information
6.1 Submitting useful problem reports
6.2 Interpreting kernel trap reports
6.3 Low level PCMCIA debugging aids
6.4 /proc/bus/pccard
6.5 Writing Card Services drivers for new cards
6.6 Guidelines for PCMCIA client driver authors
6.7 Guidelines for Linux distribution maintainers
______________________________________________________________________
[1m1. General information and hardware requirements[0m
[1m1.1. Introduction[0m
Card Services for Linux is a complete PCMCIA or ``PC Card'' support
package. It includes a set of loadable kernel modules that implement
a version of the Card Services applications program interface, a set
of client drivers for specific cards, and a card manager daemon that
can respond to card insertion and removal events, loading and
unloading drivers on demand. It supports ``hot swapping'' of most
card types, so cards can be safely inserted and ejected at any time.
This software is a work in progress. It contains bugs, and should be
used with caution. I'll do my best to fix problems that are reported
to me, but if you don't tell me, I may never know. If you use this
code, I hope you will send me your experiences, good or bad!
If you have any suggestions for how this document could be improved,
please let me know ([email protected]).
[1m1.2. Copyright notice and disclaimer[0m
Copyright (c) 1998-2002 David A. Hinds
This document may be reproduced or distributed in any form without my
prior permission. Modified versions of this document, including
translations into other languages, may be freely distributed, provided
that they are clearly identified as such, and this copyright is
included intact.
This document may be included in commercial distributions without my
prior consent. While it is not required, I would like to be informed
of such usage. If you intend to incorporate this document in a
published work, please contact me to make sure you have the latest
available version.
This document is provided ``AS IS'', with no express or implied
warranties. Use the information in this document at your own risk.
[1m1.3. What is the latest version, and where can I get it?[0m
The current major release of Card Services is version 3.2, and minor
updates or bug fixes are numbered 3.2.1, 3.2.2, and so on.
Source code for the latest version is available on the web at
<http://pcmcia-cs.sourceforge.net>, as pcmcia-cs-3.2.?.tar.gz. You
may find more than one release number here. It is up to you to decide
which version is more appropriate, but the CHANGES file will summarize
the most important differences.
Pre-compiled drivers are included with current releases of essentially
all major Linux distributions, including Slackware, Debian, Red Hat,
Caldera, and SuSE, among others. So generally there is no need to
compile the drivers from scratch.
[1m1.4. What systems are supported?[0m
This package should run on almost Intel-based Linux-capable laptop.
It also runs on some Alpha, PowerPC, ARM, and MIPS platforms. Most
common socket controllers are supported. Card docks for desktop
systems should work as long as they use a supported controller, and
are plugged directly into the ISA or PCI bus, as opposed to SCSI-to-
PCMCIA or IDE-to-PCMCIA adapters. The following controllers are
recognized by the supplied socket drivers:
+o Cirrus Logic (now Basis Communications) PD6710, PD6720, PD6722,
PD6729, PD6730, PD6832
+o ENE Technology CB1211, CB1225, CB1410, CB1420
+o Intel i82365sl B, C, and DF steps, 82092AA
+o O2Micro OZ6729, OZ6730, OZ6812, OZ6832, OZ6833, OZ6836, OZ6860,
OZ6922, OZ6933, OZ6912
+o Omega Micro 82C365G, 82C092G
+o Ricoh RF5C296, RF5C396, RL5C465, RL5C466, RL5C475, RL5C476,
RL5C477, RL5C478
+o SMC 34C90
+o Texas Instruments PCI1031, PCI1130, PCI1131, PCI1210, PCI1211,
PCI1220, PCI1221, PCI1225, PCI1250A, PCI1251A, PCI1251B, PCI1410,
PCI1410A, PCI1420, PCI1450, PCI1451A, PCI1510, PCI1520, PCI1620,
PCI4410, PCI4410A, PCI4450, PCI4451, PCI4510, PCI4520, PCI7410,
PCI7510, PCI7610
+o Toshiba ToPIC95, ToPIC97, ToPIC100 (experimental, incomplete)
+o Vadem VG465, VG468, VG469
+o VLSI Technologies 82C146, VCF94365
+o VIA VT83C469
+o Databook DB86082, DB86082A, DB86084, DB86084A, DB86072, DB86082B
Other controllers that are register compatible with the Intel i82365sl
will generally work, as well.
Due to the rapid pace of technological change for laptop hardware, new
controllers appear frequently, and there may be delays between when a
new model appears on the market, and when driver support becomes
available.
Support for Toshiba's ToPIC bridges was hindered for a long time by a
lack of sufficiently detailed technical documentation. While some
datasheets have been available, a few idiosyncracies of the ToPIC
chips were not adequately explained. Toshiba has given some direct
technical help on some of these issues, and I think the major ones
have been resolved. However, with the introduction of kernel PCMCIA
support in 2.4.* and later kernels, some new Toshiba bugs may have
cropped up in the new socket driver code.
The Motorola 6AHC05GA controller used in some Hyundai laptops is not
supported. The custom host controller in the HP Omnibook 600 is also
unsupported.
[1m1.5. What cards are supported?[0m
The current release includes drivers for a variety of ethernet cards,
a driver for modem and serial port cards, several SCSI adapter
drivers, a driver for ATA/IDE drive cards, and memory card drivers
that should support most SRAM cards and some flash cards. The
SUPPORTED.CARDS file included with each release of Card Services lists
all cards that are known to work in at least one actual system.
The likelihood that a card not on the supported list will work depends
on the type of card. Essentially all modems should work with the
supplied driver. Some network cards may work if they are OEM versions
of supported cards. Other types of IO cards (frame buffers, sound
cards, etc) will not work until someone writes the appropriate
drivers.
[1m1.6. When will my favorite (unsupported) card become supported?[0m
Unfortunately, they usually don't pay me to write device drivers, so
if you would like to have a driver for your favorite card, you are
probably going to have to do at least some of the work. Ideally, I'd
like to work towards a model like the Linux kernel, where I would be
responsible mainly for the ``core'' driver code and other authors
would contribute and maintain client drivers for specific cards. The
SUPPORTED.CARDS file mentions some cards for which driver work is
currently in progress. I will try to help where I can, but be warned
that debugging kernel device drivers by email is not particularly
effective.
[1m1.7. Mailing lists and other information sources[0m
The Linux PCMCIA information page is at <http://pcmcia-
cs.sourceforge.net>, and has bug tracking, support and feature
requests, and a variety of PCMCIA related message forums. Users can
request email notification of new responses to particular questions,
or notification for all new messages in a given category. I hope that
this will become a useful repository of information, for questions
that go beyond the scope of the HOWTO.
The Linux Laptop Page at <http://www.linux-on-laptops.com> has links
to a vast number of sites that have information about configuring
specific types of laptops for Linux. There is also a searchable
database of system configuration information, and pointers to a
variety of laptop-related mailing lists.
There is also a mailing list for ongoing development of the kernel
PCMCIA driver subsystem, at
<http://lists.infradead.org/mailman/listinfo/linux-pcmcia>.
<sect>Compilation and installation<label id=>>
[1m1.8. Prerequisites and kernel setup[0m
Before starting, you should think about whether you really need to
compile the PCMCIA package yourself. All common Linux distributions
come with pre-compiled driver packages. Generally, you only need to
install the drivers from scratch if you need a new feature of the
current drivers, or if you've updated and/or reconfigured your kernel
in a way that is incompatible with the drivers included with your
Linux distribution. While compiling the package is not technically
difficult, it does require some general Linux familiarity.
The following things should be installed on your system before you
begin:
+o A 2.0, 2.2, 2.4, or 2.6 series kernel source tree.
+o An appropriate set of module utilities.
+o (Optional) the ``XForms'' X11 user interface toolkit.
You need to have a complete linux source tree for your kernel, not
just an up-to-date kernel image. The driver modules contain some
references to kernel source files. While you may want to build a new
kernel to remove unnecessary drivers, installing PCMCIA does not
require you to do so.
Current ``stable'' kernel sources and patches are available from
<ftp://ftp.kernel.org/pub/linux/kernel/v2.4>. Current module
utilities can be found in the same locations.
In the Linux kernel source tree, the Documentation/Changes file
describes the versions of all sorts of other system components that
are required for that kernel release. You may want to check through
this and verify that your system is up to date, especially if you have
updated your kernel. If you are using a development kernel, be sure
that you are using the right combination of shared libraries and
module tools.
On x86 based systems, if you plan to use 16-bit PC Card devices, you
should also enable CONFIG_ISA, for recent kernels. These cards behave
much like ISA devices, and the PCMCIA drivers use CONFIG_ISA to judge
whether a platform supports ISA bus interrupts.
When configuring your kernel, if you plan on using a PCMCIA ethernet
card, you should turn on networking support but turn off the normal
Linux network card drivers, including the ``pocket and portable
adapters''. The PCMCIA network card drivers are all implemented as
loadable modules. Any drivers compiled into your kernel will only
waste space.
If you want to use SLIP, PPP, or PLIP, you do need to either configure
your kernel with these enabled, or use the loadable module versions of
these drivers.
In order to use a PCMCIA token ring adapter, your kernel should be
configured with ``Token Ring driver support'' (CONFIG_TR) enabled,
though you should leave CONFIG_IBMTR off.
If you want to use a PCMCIA IDE adapter, your kernel should be
configured with CONFIG_BLK_DEV_IDE_PCMCIA enabled, for 2.0.* kernels.
Newer kernels do not require a special configuration setting.
If you will be using a PCMCIA SCSI adapter, then enable CONFIG_SCSI
when configuring your kernel. Also, enable any top level drivers
(SCSI disk, tape, cdrom, generic) that you expect to use. All low-
level drivers for particular host adapters should be disabled, as they
will just take up space.
This package includes an X-based card status utility called cardinfo.
This utility is based on a freely distributed user interface toolkit
called the XForms Library. This library is available as a separate
package with most Linux distributions. If you would like to build
cardinfo, you should install XForms and all the normal X header files
and libraries before configuring the PCMCIA package. This tool is
completely optional.
[1m1.9. Kernel PCMCIA support[0m
PCMCIA driver support is included in the 2.4 and later linux kernel
trees. While it shares most of the same code with the standalone
PCMCIA driver package, there are some important differences. The
kernel PCMCIA support is also still evolving.
The kernel PCMCIA code has the same functionality as the driver side
of the pcmcia-cs package. It does not eliminate the need to install
the pcmcia-cs package, since it requires the same user tools (cardmgr,
cardctl, /etc/pcmcia/* files). The drivers in pcmcia-cs can still be
built for 2.4 kernels, so you have a choice of using either the in-
kernel PCMCIA drivers, or the drivers included in pcmcia-cs. With 2.5
and later kernels, the standalone drivers cannot be used.
To use the kernel PCMCIA drivers, configure the kernel with
CONFIG_HOTPLUG, CONFIG_PCMCIA, and usually CONFIG_CARDBUS enabled. On
x86 based systems, CONFIG_ISA should also be enabled. The drivers can
either be built into the kernel or built as modules. PCMCIA client
driver options are listed in their regular driver categories; thus,
PCMCIA network drivers are in a submenu of network drivers, and PCMCIA
serial drivers are in a submenu of character drivers.
In the standalone pcmcia-cs drivers, the i82365 module supports both
ISA-to-PCMCIA, PCI-to-PCMCIA, and PCI-to-CardBus bridges. The CardBus
socket driver in the 2.4 tree is the yenta_socket driver. It is
selected by the CONFIG_CARDBUS option. In your PCMCIA startup
options, this driver should be specified in place of the i82365
driver. The kernel version of the i82365 driver, selected by
CONFIG_I82365, only supports ISA-to-PCMCIA bridges. PCI-to-PCMCIA
bridges that are not CardBus capable, like the Cirrus PD6729, are not
supported at all by the kernel PCMCIA drivers.
When compiling the standalone PCMCIA package, the Configure script
decides whether or not to build any kernel modules by looking at the
value of the CONFIG_PCMCIA option in your kernel configuration. If
CONFIG_PCMCIA is enabled, then by default, no driver components are
built. If CONFIG_PCMCIA is disabled, then all the modules will be
built and installed. It is safe to compile the user tools (cardmgr,
cardctl, etc) in a PCMCIA package whose version number differs from
the PCMCIA version number in the kernel source tree. The kernel
PCMCIA header files take precedence over the ones included in the
PCMCIA package, if CONFIG_PCMCIA is enabled.
[1m1.10. Installation[0m
Here is a synopsis of the installation process:
+o Unpack pcmcia-cs-3.2.?.tar.gz in /usr/src.
+o Run ``make config'' in the new pcmcia-cs-3.2.? directory.
+o Run ``make all'', then ``make install''.
+o Customize the startup script and the option files in /etc/pcmcia
for your site, if needed.
If you plan to install any contributed client drivers not included in
the core PCMCIA distribution, unpack each of them in the top-level
directory of the PCMCIA source tree. Then follow the normal build
instructions. The extra drivers will be compiled and installed
automatically.
Running ``make config'' prompts for a few configuration options, and
checks out your system to verify that it satisfies all prerequisites
for installing PCMCIA support. In most cases, you'll be able to just
accept all the default configuration options. Be sure to carefully
check the output of this command in case there are problems. The
following options are available:
[1mLinux kernel source directory?[0m
This is the location of the source tree for the kernel you want
to use with PCMCIA. Often this is /usr/src/linux, but the
default location depends on what Linux distribution you're using
(or on where you've chosen to place your kernel source tree).
[1mBuild 'trusting' versions of card utilities?[0m
Some of the support utilities (cardctl and cardinfo) can be
compiled either in ``safe'' or ``trusting'' forms. The ``safe''
forms prevent non-root users from modifying card configurations.
The ``trusting'' forms permit ordinary users to issue commands
to suspend and resume cards, reset cards, and change the current
configuration scheme. The default is to build the safe forms.
[1mInclude 32-bit (CardBus) card support?[0m
This option must be selected if you wish to use 32-bit CardBus
cards. It is not required for CardBus bridge support, if you
only plan to use 16-bit PC Cards.
[1mInclude PnP BIOS resource checking?[0m
This builds additional code into the PCMCIA core module to
communicate with a system's PnP BIOS to obtain resource
information for built-in ``motherboard'' devices (serial and
parallel ports, sound, etc), to help avoid resource conflicts.
If enabled, some extra resource files will be created under
/proc/bus/pccard, and the lspnp and setpnp tools can be used to
view and manipulate PnP BIOS devices. However, this setting
causes problems on some laptops and is not turned on by default.
[1mModule install directory?[0m
The directory that new kernel modules will be installed into.
Normally this should be the subdirectory of /lib/modules that
matches your kernel version.
[1mHow to set kernel-specific options?[0m
There are a few kernel configuration options that affect the
PCMCIA tools. The configuration script can deduce these from
the running kernel (the default and most common case).
Alternatively, if you are compiling for installation on another
machine, it can read the configuration from a kernel source
tree, or each option can be set interactively.
The Configure script can also be executed non-interactively, for
automatic builds or to quickly reconfigure after a kernel update.
Some additional less-frequently-used options can be only be set from
the command line. Running ``Configure --help'' lists all available
options.
Running ``make all'' followed by ``make install'' will build and then
install the kernel modules and utility programs. Kernel modules are
installed under /lib/modules/<version>/pcmcia. The cardmgr and
cardctl programs are installed in /sbin. If cardinfo is built, it is
installed in /usr/bin/X11.
Configuration files will be installed in the /etc/pcmcia directory.
If you are installing over an older version, your old config scripts
will be backed up before being replaced. The saved scripts will be
given an *.O extension.
If you don't know what kind of host controller your system uses, you
can use the pcic_probe utility in the cardmgr/ subdirectory to
determine this. There are several major types: the Databook TCIC-2
type and the Intel i82365SL-compatible type. With the kernel PCMCIA
subsystem, Intel compatible controllers are further subdivided into
ISA-bus 16-bit bridges, and PCI-based CardBus bridges.
In a few cases, the pcic_probe command will be unable to determine
your controller type automatically. If you have a Halikan NBD 486
system, it has a TCIC-2 controller at an unusual location: you'll need
to edit rc.pcmcia to load the tcic module, and also set the PCIC_OPTS
parameter to ``tcic_base=0x02c0''.
On some old pre-PCI systems using Cirrus controllers, including the
NEC Versa M, the BIOS puts the controller in a special suspended state
at system startup time. On these systems, the pcic_probe command will
fail to find any known host controller. If this happens, edit
rc.pcmcia and set PCIC to i82365, and PCIC_OPTS to ``wakeup=1''.
[1m1.11. Startup options[0m
The PCMCIA startup script recognizes several groups of startup
options, set via environment variables. Multiple options should be
separated by spaces and enclosed in quotes. Placement of startup
options depends on the Linux distribution used. They may be placed
directly in the startup script, or they may be kept in a separate
option file. See the ``Notes about specific Linux distributions'' for
specifics. The following variables can be set:
PCMCIA
This variable specifies whether PCMCIA support should be started
up, or not. If it is set to anything other than ``yes'', then
the startup script will be disabled.
PCIC
This identifies the PC Card Interface Controller driver module.
There are several options: ``tcic'', ``i82365'', and (for the
kernel PCMCIA subsystem) ``yenta_socket''. Virtually all
current controllers are in the ``i82365'' group for the
standalone drivers, and ``yenta_socket'' for the kernel drivers.
This is the only mandatory option setting.
PCIC_OPTS
This specifies options for the PCIC module. Some host
controllers have optional features that may or may not be
implemented in a particular system. In some cases, it is
impossible for the socket driver to detect if these features are
implemented. See the corresponding man page for a complete
description of the available options.
CORE_OPTS
This specifies options for the pcmcia_core module, which
implements the core PC Card driver services. See ``man
pcmcia_core'' for more information.
CARDMGR_OPTS
This specifies options to be passed to the cardmgr daemon. See
``man cardmgr'' for more information.
SCHEME
If set, then the PC Card configuration scheme will be
initialized to this at driver startup time. See the ``Overview
of the PCMCIA configuration scripts'' for a discussion of
schemes.
The low level socket drivers, tcic and i82365, have various bus timing
parameters that may need to be adjusted for certain systems with
unusual bus clocking. Symptoms of timing problems can include card
recognition problems, lock-ups under heavy loads, high error rates, or
poor device performance. Only certain host bridges have adjustable
timing parameters: check the corresponding man page to see what
options are available for your controller. Here is a brief summary:
+o ISA-bus Cirrus controllers have numerous configurable timing
parameters. The most important seems to be the cmd_time flag,
which determines the length of PCMCIA bus cycles. Fast 486 systems
(i.e., DX4-100) seem to often benefit from increasing this from 6
(the default) to 12 or 16.
+o The Cirrus PD6729 PCI controller has the fast_pci flag, which
should be set if the PCI bus speed is greater than 25 MHz.
+o For Vadem VG-468 controllers, the async_clock flag changes the
relative clocking of PCMCIA bus and host bus cycles. Setting this
flag adds extra wait states to some operations. However, I have
yet to hear of a laptop that needs this.
+o The pcmcia_core module has the cis_speed parameter for changing the
memory speed used for accessing a card's Card Information Structure
(CIS). On some systems, increasing this parameter (i.e., slowing
down card accesses) may fix card recognition problems.
+o Another pcmcia_core parameter, io_speed, can be used to slow down
accesses to IO cards. It may help in certain cases with systems
that have out-of-spec PCMCIA bus timing.
+o This is not a timing issue, but if you have more than one ISA-to-
PCMCIA controller in your system or extra sockets in a laptop
docking station, the i82365 module should be loaded with the
extra_sockets parameter set to 1. This should not be necessary for
detection of PCI-to-PCMCIA or PCI-to-CardBus bridges.
Here are some timing settings for a few old systems:
+o On the ARM Pentium-90 or Midwest Micro Soundbook Plus, use
``freq_bypass=1 cmd_time=8''.
+o On a Compaq Presario 1220, try ``setup_time=1''.
+o On a Midwest Micro Soundbook Elite, use ``cmd_time=12''.
+o On a Gateway Liberty, try ``cmd_time=16''.
+o On a Samsung SENS 810, use ``fast_pci=1''.
[1m1.11.1. Card readers for desktop systems[0m
While almost all PCMCIA card readers and card docks work fine under
Linux, some require special startup options because they do not behave
exactly like laptop PCMCIA bridges. PCI card readers, in particular,
may handle interrupts differently. Some of the following parameter
settings are only available for the i82365 module in the standalone
drivers; the kernel's yenta_socket driver is not configurable.
+o The Linksys ProConnect PCMRDWR and Antec DataChute ISA card readers
are ``ISA Plug and Play'' devices. To use these, you must first
activate them with the Linux isapnp tools. See the man pages for
pnpdump and isapnp for more information.
+o For Chase CardPORT and Altec ISA card readers using the Cirrus
PD6722 ISA-to-PCMCIA bridge, the i82365 driver should be loaded
with a ``has_ring=0'' parameter to prevent irq 15 conflicts.
+o For Elan P-series PCI card readers based on the Cirrus PD6729 PCI-
to-PCMCIA bridge chip, the i82365 driver requires a ``irq_mode=1''
parameter.
+o For the Sycard PCChost1200 host adapter, the i82365 driver requires
a ``p2cclk=1'' parameter.
+o For the Alex Electronics PCICBI host adapter based on the TI 1221
bridge, the i82365 driver requires ``p2cclk=1 irq_mode=0'' as well
as PCMCIA driver release 3.1.23 or later.
+o With SCM Microsystems SBP series PCI card readers (which are also
being distributed with Lucent WaveLAN IEEE cards), and for the
Synchrotech PCM-CR-PC2IF and PCM-CR-PC2IR, it is necessary to
specify ``irq_mode=0'' for the i82365 module, to force use of PCI
interrupts.
+o For the ActionTec PC 750 card reader, and for the Antec Datachute
PCI card reader, the i82365 driver requires a ``irq_list=0''
parameter, to indicate that ISA interrupts are unavailable.
+o The PLX Technologies PCI9052 (also sold as the Linksys WDT11) is
not a general purpose PCMCIA card reader at all: it is a PCI
interface card for use with certain wireless adapters, that makes
them look like ordinary PCI devices. These devices are not
supported.
[1m1.12. System resource settings[0m
Card Services should automatically avoid allocating IO ports and
interrupts already in use by other standard devices. It will also
attempt to detect conflicts with unknown devices, but this is not
completely reliable. In some cases, you may need to explicitly
exclude resources for a device in /etc/pcmcia/config.opts.
Here are some resource settings for specific laptop types. View this
list with suspicion: it may give useful hints for solving problems,
but it is inevitably out of date and certainly contains mistakes.
Corrections and additions are welcome.
+o On the AMS SoundPro, exclude irq 10.
+o On some AMS TravelPro 5300 models, use memory 0xc8000-0xcffff.
+o On the BMX 486DX2-66, exclude irq 5, irq 9.
+o On the Chicony NB5, use memory 0xda000-0xdffff.
+o On the Compaq Presario 900Z, exclude port 0x3b0-0x3bb.
+o On the Compaq Presario 1020, exclude port 0x2f8-0x2ff, irq 3, irq
5.
+o On the Compaq Presario 2120EA, exclude irq 10.
+o On the Dell Inspiron 7000, exclude irq 3, irq 5.
+o On the Dell Inspiron 8000, exclude port 0x800-0x8ff.
+o On the Fujitsu C series, exclude port 0x200-0x27f.
+o On the HP Omnibook 4000C, exclude port 0x300-0x30f.
+o On the HP Omnibook 4100, exclude port 0x220-0x22f.
+o On the IBM ThinkPad 380, and maybe the 385 and 600 series, exclude
port 0x230-0x233, and irq 5.
+o On IBM ThinkPad 600 and 770 models with internal modems, exclude
port 0x2f8-0x2ff.
+o On the IBM ThinkPad 600E and 770Z, change the high memory window to
0x60000000-0x60ffffff.
+o On the Micron Millenia Transport, exclude irq 5, irq 9.
+o On the NEC Versa M, exclude irq 9, port 0x2e0-2ff.
+o On the NEC Versa P/75, exclude irq 5, irq 9.
+o On the NEC Versa S, exclude irq 9, irq 12.
+o On the NEC Versa 6000 series, exclude port 0x2f8-0x33f, irq 9, irq
10.
+o On the NEC Versa SX, exclude port 0x300-0x31f.
+o On the ProStar 9200, Altima Virage, and Acquiline Hurricane
DX4-100, exclude irq 5, port 0x330-0x35f. Maybe use memory
0xd8000-0xdffff.
+o On the Siemens Nixdorf SIMATIC PG 720C, use memory 0xc0000-0xcffff,
port 0x300-0x3bf.
+o On the TI TravelMate 5000, use memory 0xd4000-0xdffff.
+o On the Toshiba Satellite 4030CDS, exclude irq 9.
+o On the Toshiba T4900 CT, exclude irq 5, port 0x2e0-0x2e8, port
0x330-0x338.
+o On the Toshiba Tecra 8000, exclude irq 3, irq 5, irq 9.
+o On the Twinhead 5100, HP 4000, Sharp PC-8700 and PC-8900, exclude
irq 9 (sound), irq 12.
+o On an MPC 800 Series, exclude irq 5, port 0x300-0x30f for the CD-
ROM.
[1m1.12.1. PowerBook specific settings[0m
On PowerPC based PowerBook systems, the default system resources in
/etc/pcmcia/config.opts file are no good at all. Replace all the IO
port and window definitions with something like:
include port 0x100-0x4ff, port 0x1000-0x17ff
include memory 0x80000000-0x80ffffff
[1m1.13. Notes about specific Linux distributions[0m
This section is incomplete. Corrections and additions are welcome.
[1m1.13.1. Debian[0m
Debian uses a System V boot script arrangement. The PCMCIA startup
script is installed as /etc/init.d/pcmcia. New packages use
/etc/default/pcmcia for startup options; older versions used
/etc/pcmcia.conf for this purpose. Debian's syslog configuration will
place kernel messages in /var/log/messages and cardmgr messages in
/var/log/daemon.log.
Debian distributes the PCMCIA system in two packages: the ``pcmcia-
cs'' package contains cardmgr and other tools, man pages, and
configuration scripts; and the ``pcmcia-modules'' package contains the
kernel driver modules.
Starting with 3.1.25, a clean PCMCIA install will identify Debian
systems and create a special network.opts file that, in the absence of
other network configuration settings, uses Debian's ifup and ifdown
commands to configure a network card based on settings in
/etc/network/interfaces.
[1m1.13.2. Red Hat, Caldera, Mandrake[0m
These distributions use a System V boot script organization. The
PCMCIA startup script is installed as /etc/rc.d/init.d/pcmcia, and
boot options are kept in /etc/sysconfig/pcmcia. Beware that
installing the Red Hat package may install a default boot option file
that has PCMCIA disabled. To enable PCMCIA, the ``PCMCIA'' variable
should be set to ``yes''. Red Hat's default syslogd configuration
will record all interesting messages in /var/log/messages.
Red Hat's PCMCIA package contains a replacement for the network setup
script, /etc/pcmcia/network, which meshes with the Red Hat linuxconf
configuration system. This is convenient for the case where just one
network adapter is used, with one set of network parameters, but does
not have the full flexibility of the regular PCMCIA network script.
Compiling and installing a clean PCMCIA source distribution will
overwrite the network script, breaking the link to the Red Hat tools.
If you prefer using the Red Hat tools, either use only Red Hat RPM's,
or replace /etc/pcmcia/network.opts with the following:
if [ -f /etc/sysconfig/network-scripts/ifcfg-$2 ] ; then
start_fn () {
. /etc/sysconfig/network-scripts/ifcfg-$1
if [ "$ONBOOT" = "yes" ] ; then /sbin/ifup $1 ; fi
}
stop_fn () {
/sbin/ifdown $1
}
fi
Starting with the 3.1.22 release, the PCMCIA installation script will
automatically append a variant of this to the default network.opts
file, so this problem should no longer be an issue.
If you do use linuxconf (or netconf) to configure your network
interface, leave the ``kernel module'', ``I/O port'', and ``irq''
parameters blank. Setting these parameters may interfere with proper
operation of the PCMCIA subsystem.
At boot time, when the Red Hat network subsystem starts up, it may say
``Delaying eth0 initialization'' and ``[FAILED]''. This is actually
not a failure: it means that this network interface will not be
initialized until after the PCMCIA network device is configured.
Red Hat bundles their slightly modified PCMCIA source distribution
with their kernel sources, rather than as a separate source package.
When preparing to build a new set of PCMCIA drivers, you will
generally want to install Red Hat's kernel-source RPM (kernel-
source-*.i386.rpm), and not the kernel SRPM (kernel-*.src.rpm). The
SRPM is tailored for building their kernel RPM files, which is not
exactly what you want. With Red Hat 7.0, the kernel-source RPM also
includes a mis-configured PCMCIA source tree; if you want to use it,
delete their PCMCIA config.out file and re-do "make config".
[1m1.13.3. Slackware[0m
Slackware uses a BSD boot script arrangement. The PCMCIA startup
script is installed as /etc/rc.d/rc.pcmcia, and boot options are
specified in rc.pcmcia itself. The PCMCIA startup script is invoked
from /etc/rc.d/rc.S.
[1m1.13.4. SuSE[0m
SuSE uses a System V init script arrangement, with init scripts stored
under /etc/init.d. The PCMCIA startup script is installed as
/etc/init.d/pcmcia, and startup options are kept in /etc/rc.config.
Before release 7.0, init scripts were kept under /sbin/init.d. In
early SuSE releases (pre-5.3), the PCMCIA startup script was somewhat
limited and did not allow PCMCIA startup variables to be overridden
from the lilo boot prompt.
SuSE 8.0 includes both the standalone PCMCIA modules, and the 2.4
kernel PCMCIA subsystem modules. A new variable, PCMCIA_SYSTEM, is
available in /etc/sysconfig/pcmcia to choose between these. It can be
set to either ``kernel'' or ``external''.
To look up current PCMCIA issues in SuSE's support database, go to
<http://sdb.suse.de/cgi-bin/sdbsearch_en.cgi?stichwort=PCMCIA>.
[1m2. Resolving installation and configuration problems[0m
This section describes some of the most common failure modes for the
PCMCIA subsystem. Try to match your symptoms against the examples.
This section only describes general failures that are not specific to
a particular client driver or type of card.
Before trying to diagnose a problem, you have to know where your
system log is kept (see ``Notes about specific Linux distributions'').
You should also be familiar with basic diagnostic tools like dmesg and
lsmod. Also, be aware that most driver components (including all the
kernel modules) have their own individual man pages.
In 3.1.15 and later releases, the debug-tools subdirectory of the
PCMCIA source tree has a few scripts to help diagnose some of the most
common configuration problems. The test_setup script checks your
PCMCIA installation for completeness. The test_network and test_modem
scripts will try to diagnose problems with PCMCIA network and modem
cards. These scripts can be particularly helpful if you are
unfamiliar with Linux and are not sure how to approach a problem.
Try to define your problem as narrowly as possible. If you have
several cards, try each card in isolation, and in different
combinations. Try cold Linux boots, versus warm boots from Windows.
Compare booting with cards inserted, versus inserting cards after
boot. If you normally use your laptop docked, try it undocked. And
sometimes, two sockets will behave differently.
For debugging problems in the device configuration scripts, it may be
useful to start cardmgr with the ``-v'' option. With a 3.1.23 or
later PCMCIA package, this will cause most important script actions to
be recorded in the system log.
It is nearly impossible to debug driver problems encountered when
attempting to install Linux via a PCMCIA device. Even if you can
identify the problem based on its symptoms, installation disks are
difficult to modify, especially without access to a running Linux
system. Customization of installation disks is completely dependent
on the choice of Linux distribution, and is beyond the scope of this
document. In general, the best course of action is to install Linux
using some other means, obtain the latest drivers, and then debug the
problem if it persists.
[1m2.1. Base PCMCIA kernel modules do not load[0m
Symptoms:
+o Kernel version mismatch errors are reported when the PCMCIA startup
script runs.
+o After startup, lsmod does not show any PCMCIA modules.
+o cardmgr reports ``no pcmcia driver in /proc/devices'' in the system
log.
Kernel modules contain version information that is checked against the
current kernel when a module is loaded. The type of checking depends
on the setting of the CONFIG_MODVERSIONS kernel option. If this is
false, then the kernel version number is compiled into each module,
and insmod checks this for a match with the running kernel. If
CONFIG_MODVERSIONS is true, then each symbol exported by the kernel is
given a sort of checksum. These codes are all compared against the
corresponding codes compiled into a module. The intent was for this
to make modules less version-dependent, because the checksums would
only change if a kernel interface changed, and would generally stay
the same across minor kernel updates. In practice, the checksums have
turned out to be even more restrictive, because many kernel interfaces
depend on compile-time kernel option settings. Also, the checksums
turned out to be an excessively pessimistic judge of compatibility.
The practical upshot of this is that kernel modules are closely tied
to both the kernel version, and the setting of many kernel
configuration options. Generally, a set of modules compiled for one
2.2.19 kernel will not load against some other 2.2.19 kernel unless
special care is taken to ensure that the two were built with similar
configurations. This makes distribution of precompiled kernel modules
a tricky business.
You have several options:
+o If you obtained precompiled drivers as part of a Linux
distribution, verify that you are using an unmodified kernel as
supplied with that distribution. If you intend to use precompiled
modules, you generally must stick with the corresponding kernel.
+o If you have reconfigured or upgraded your kernel, you will probably
need to compile and install the PCMCIA package from scratch. This
is easily done if you already have the kernel source tree
installed. See ``Compilation and installation'' for detailed
instructions.
+o In some cases, incompatibilities in other system components can
prevent correct loading of kernel modules. If you have upgraded
your own kernel, pay attention to the ``minimal requirements'' for
module utilities and binutils listed in the Documentation/Changes
file in the kernel source code tree.
[1m2.2. Some client driver modules do not load[0m
Symptoms:
+o The base modules (pcmcia_core, ds, i82365) load correctly.
+o Inserting a card gives a high beep + low beep pattern.
+o cardmgr reports version mismatch errors in the system log.
Some of the driver modules require kernel services that may or may not
be present, depending on kernel configuration. For instance, the SCSI
card drivers require that the kernel be configured with SCSI support,
and the network drivers require a networking kernel. If a kernel
lacks a necessary feature, insmod may report undefined symbols and
refuse to load a particular module. Note that insmod error messages do
not distinguish between version mismatch errors and missing symbol
errors.
Specifically:
+o The serial client driver serial_cs requires the kernel serial
driver to be enabled with CONFIG_SERIAL. This driver may be built
as a module.
+o Support for multiport serial cards or multifunction cards that
include serial or modem devices requires CONFIG_SERIAL_SHARE_IRQ to
be enabled.
+o The SCSI client drivers require that CONFIG_SCSI be enabled, along
with the appropriate top level driver options (CONFIG_BLK_DEV_SD,
CONFIG_BLK_DEV_SR, etc for 2.2 and later kernels). These may be
built as modules.
+o The network client drivers require that CONFIG_INET is enabled.
Kernel networking support cannot be compiled as a module.
+o The token-ring client requires that the kernel be compiled with
CONFIG_TR enabled.
There are two ways to proceed:
+o Rebuild your kernel with the necessary features enabled.
+o If the features have been compiled as modules, then modify
/etc/pcmcia/config to preload these modules.
The /etc/pcmcia/config file can specify that additional modules need
to be loaded for a particular client. For example, for the serial
driver, one would use:
device "serial_cs"
class "serial" module "misc/serial", "serial_cs"
Module paths are specified relative to the top-level module directory
for the current kernel version; if no relative path is given, then the
path defaults to the pcmcia subdirectory.
[1m2.3. ISA interrupt scan failures[0m
Symptoms:
+o The system locks up when the PCMCIA drivers are loaded, even with
no cards present.
+o The system log shows a successful host controller probe just before
the lock-up, but does not show interrupt probe results.