diff options
Diffstat (limited to 'source/a/pcmciautils/config')
-rw-r--r-- | source/a/pcmciautils/config/60-pcmcia.rules | 22 | ||||
-rw-r--r-- | source/a/pcmciautils/config/config.opts | 71 | ||||
-rwxr-xr-x | source/a/pcmciautils/config/rc.pcmcia | 65 |
3 files changed, 158 insertions, 0 deletions
diff --git a/source/a/pcmciautils/config/60-pcmcia.rules b/source/a/pcmciautils/config/60-pcmcia.rules new file mode 100644 index 00000000..677da01b --- /dev/null +++ b/source/a/pcmciautils/config/60-pcmcia.rules @@ -0,0 +1,22 @@ +# PCMCIA devices: +# +# Very few CIS firmware entries (which we use for matching) +# are so broken that we need to read out random bytes of it +# instead of the manufactor, card or product ID. Then the +# matching is done in userspace. +ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \ + RUN+="/sbin/pcmcia-check-broken-cis" + +# However, the "weak" matching by func_id is only allowed _after_ modprobe +# returns, so that "strong" matches have a higher priority. +ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \ + RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + +# PCMCIA sockets: +# +# modprobe the pcmcia bus module so that 16-bit PCMCIA devices work +ACTION=="add", SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia" + +# if this is a PCMCIA socket which needs a resource database, +# pcmcia-socket-startup sets it up +ACTION=="add", SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/pcmcia-socket-startup" diff --git a/source/a/pcmciautils/config/config.opts b/source/a/pcmciautils/config/config.opts new file mode 100644 index 00000000..5b8d5faf --- /dev/null +++ b/source/a/pcmciautils/config/config.opts @@ -0,0 +1,71 @@ +# +# Local PCMCIA Configuration File +# +#---------------------------------------------------------------------- +# +# System resources available for PCMCIA cards +# +# NOTE: these settings have no effect on resources assigned to a +# CardBus bridge device itself; this file only affects resources +# assigned to cards. Also, interrupt settings here will only affect +# ISA bus interrupts assigned to 16-bit cards. PCI interrupts +# generally can't be reconfigured. +# +# With the kernel PCMCIA subsystem, these settings also have no effect +# at all on resources used for 32-bit CardBus cards. Those are set by +# the PCI hotplug subsystem. +# + +# These are the official ports to use from pcmcia-cs: +#include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff +# However, ports 0x810-0x81f hurt on some DELL machines and +# ports 0x3b0-0x3df hurt on some FSC machines, so we use this port +# list instead: +include port 0x100-0x3af, port 0x3e0-0x4ff, port 0xc00-0xcff + +include memory 0xc0000-0xfffff +include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff + +# High port numbers do not always work... +# include port 0x1000-0x17ff + +# Extra port range for IBM Token Ring +include port 0xa00-0xaff + +# Resources we should not use, even if they appear to be available + +# First built-in serial port +exclude irq 4 +# Second built-in serial port +#exclude irq 3 +# First built-in parallel port +exclude irq 7 + +#---------------------------------------------------------------------- + +# Examples of options for loadable modules + +# To fix sluggish network with IBM ethernet adapter... +#module "pcnet_cs" opts "mem_speed=600" + +# Options for IBM Token Ring adapters +#module "ibmtr_cs" opts "mmiobase=0xd0000 srambase=0xd4000" + +# Options for Raylink/WebGear driver: uncomment only one line... +# These are the default settings for use with the WebGear Windows driver: +#module "ray_cs" opts "essid=NETWORK_NAME hop_dwell=128 beacon_period=256 translate=0" +# Generic ad-hoc network +#module "ray_cs" opts "essid=ADHOC_ESSID hop_dwell=128 beacon_period=256 translate=1" +# Infrastructure network for older cards +#module "ray_cs" opts "net_type=1 essid=ESSID1" +# Infrastructure network for WebGear +#module "ray_cs" opts "net_type=1 essid=ESSID1 translate=1 hop_dwell=128 beacon_period=256" + +# Options for WaveLAN/IEEE driver (AccessPoint mode)... +#module "wvlan_cs" opts "station_name=MY_PC" +# Options for WaveLAN/IEEE driver (ad-hoc mode)... +#module "wvlan_cs" opts "port_type=3 channel=1 station_name=MY_PC" + +# Options for Xircom Netwave driver... +#module "netwave_cs" opts "domain=0x100 scramble_key=0x0" + diff --git a/source/a/pcmciautils/config/rc.pcmcia b/source/a/pcmciautils/config/rc.pcmcia new file mode 100755 index 00000000..1f21be84 --- /dev/null +++ b/source/a/pcmciautils/config/rc.pcmcia @@ -0,0 +1,65 @@ +#!/bin/sh +# +# rc.pcmcia: Script to initialize PCMCIA subsystem. +# Based in an example found in cardmgr-to-pcmciautils.txt +# and in Slackware rc.pcmcia found in pcmcia-cs package. +# + +# Set this to the driver to use, one of: +# probe, yenta_socket, i82365, i82092, pd6729, tcic, etc. +# +DRIVER=probe +DRIVER_OPTS= + +case "$1" in + start) + echo "Starting PCMCIA services:" + fgrep -q pcmcia /proc/devices + if [ $? -ne 0 ] ; then + if [ "$DRIVER" = "probe" ]; then + echo " <Probing for PCIC: edit /etc/rc.d/rc.pcmcia>" + for DRV in yenta_socket i82365 tcic ; do + /sbin/modprobe $DRV > /dev/null 2>&1 + /sbin/pccardctl status | grep -q Socket && break + /sbin/modprobe -r $DRV > /dev/null 2>&1 + done + else + echo " <Loading PCIC: $DRIVER>" + /sbin/modprobe $DRIVER $DRIVER_OPTS > /dev/null 2>&1 + fi + /sbin/modprobe pcmcia > /dev/null 2>&1 # just in case it's not auto-loaded + else + echo " <PCIC already loaded>" + fi + ;; + + stop) + echo -n "Shutting down PCMCIA services: " + echo -n "cards " + /sbin/pccardctl eject + MODULES=`/sbin/lsmod | grep "pcmcia " | awk '{print $4}' | tr , ' '` + for i in $MODULES ; do + echo -n "$i " + /sbin/modprobe -r $i > /dev/null 2>&1 + done + echo -n "pcmcia " + /sbin/modprobe -r pcmcia > /dev/null 2>&1 + if [ "$DRIVER" = "probe" ]; then + for DRV in yenta_socket i82365 tcic ; do + grep -qw $DRV /proc/modules && modprobe -r $DRV && \ + echo -n "$DRV " && break + done + else + /sbin/modprobe -r $DRIVER > /dev/null 2>&1 + fi + echo -n "rsrc_nonstatic " + /sbin/modprobe -r rsrc_nonstatic > /dev/null 2>&1 + echo "pcmcia_core" + /sbin/modprobe -r pcmcia_core > /dev/null 2>&1 + ;; + + restart) + $0 stop + $0 start + ;; +esac |