* Kill individual drivers 'suspend' routines, since there's no simple/safe
way to suspend/resume a card w/out going through the complete probe
at initialization time.
* Default to using the apm_pccard_resume sysctl code, which basically
pretends the card was removed, and then re-inserted. Suspend/resume
is now 'emulated' with a fake insert/removal. (Hence we no longer
need the driver-specific suspend routines.)
follow.
* Rename/reorder all of the pccard structures, change many of the member
names to be descriptive, and follow more closely other 'bus' drivers
naming schemes.
* Rename a bunch of parameter and local variable names to be more
consistant in the code.
* Renamed the PCCARD 'crd' device to be the 'card' device
* KNF and make the code consistant where it was obvious.
* ifdef'd out some unused code
own definition of ISA_HOLE_START. We shouldn't need to include
bus/processor specific code in here, but it is required. At least by
doing it this way it becomes more obvious where the bogusness is.
Obtained from: email with bde
but it has too much baggage).
- create a new routine 'unregister_device_interrupt', which is now used
instead of having two routines with the same code snippet.
- Minor cleanups and commenting.
[ No functional changes, just moving things around ]
slots. Otherwise, we try to suspend drivers who have been disabled
already.
[
The only reason the drivers are still on the list is because of race
conditions where the card is removed while the driver is in use. We
leave the drivers on the slot list (leaving all of their structures in
place in case a process is using it) but set it's state to empty so that
further uses by the pccard code know not to expect active cards.
]
from the 'lower' interrupts to the 'higher' interrupts.) We need to
find a way to set the interrupt for the controller in the config file.
Determined by: handy@sag.space.lockheed.com
sysctl option 'fakes' like a card was removed and inserted when the
machine is brought up again from a suspend. It is disabled by default,
and the old code is used.
Obtained from: PAO
speaker. Cirrus Logic PCIC chips must enable this. There is also a Low
Power Dynamic Mode bit that claims to reduce power consumption by 30%,
so enable it and hope for the best.
PR: 4650
Submitted by: Nick Sayer <nsayer@quack.kfu.com>
instead of the first available, like Win95 does. This appears to help
on some machines, and avoids potential problems with built-in serial
ports which tend to live at IRQ 3, which is usually picked with the
old method.
(pt. unused) for TI PCI1130.
2. pccard.c: PCIC_RESUME_RESET is now (also) a sysctl. (Never make it
a #ifdef if it can be made a sysctl!)
3. pcic.c: make getb() and putb() proper member functions of struct
pcic_slot. Add a couple of missing casts.
Use the name argument almost the same in all LKM types. Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name. This is a candidate for change and I vote just the name without
the "_mod".
Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.
Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.
Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.
Change source in tree to use the new interface.
Reviewed by: Bruce Evans
non-broken chipssets whose ID is 0x84, such as the one found in the NEC
6030H.
> The code relies on the assumption that on a genuine_broken vlsi, you
> don't get 0x84 when probing slot 1 in the normal location. On the versa I
> do get 0x84 when probing slot 1 in the normal location. What you get on
> genuine_broken at the normal slot 1 location is unknown to me;
Submitted by: Chris Timmons <skynyrd@opus.cts.cwu.edu>
being used without ever being initialized. From examining
the rest of the routine, it looks like this is a typo,
and it really should have been "1" instead of "i".
Submitted by: mpp
Assuming that the intr_mask[] was updated by changing the maskptrs (the
existing update_intr_masks() function will not work) this code was
written so the PCIC controller insertion/removal events will not
interrupt the card IRQ handler events.
Some possible scenarios:
+ Card is removed during IRQ handler:
- PCIC card handler is allowed to interrupt
- card removal event is called, removing the driver and data structures
* card interrupt handler continues w/out driver, data structures, and hardware
OR (the code just committed)
* card IRQ handler has no hardware to read/write to, but has code and
data to run on (XXX- Assume it completes and doesn't spin forever)
- PCIC card handler unloads the card driver
The current situation at least leaves the card interrupt handlers the
drivers and data structures to work with although the hardware can't be
guaranteed.
Reviewed by: bde
- don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h>
instead. This was already done in 4.4Lite for the most important
ioctl headers. Header spam currently increases kernel build
times by 10-20%. There are more than 30000 #includes (not counting
duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
almost self-sufficient (some ioctl headers still need structs from
elsewhere).
- uniformized idempotency ifdefs. Copied the style in the 4.4Lite
ioctl headers.