aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard/pccard.c
Commit message (Collapse)AuthorAgeFilesLines
* - Fix a bug where a "power_off_slot' timeout was not cancelled when theNate Williams1998-09-241-1/+6
| | | | | | | | | | | computer 'suspended', although the slot was powered off. There was a race where the slow could be powered off *after* it was assigned a new driver when the computer was 'resumed'. Noticed by: Brian Somers <brian@Awfulhak.org> Notes: svn path=/head/; revision=39631
* Make PCIC_RESUME_RESET an proper option.Brian Somers1998-09-081-3/+4
| | | | | | | | | My laptop (a CTX Cybernote) needs this. It claims to have a PC-Card VLSI 82C146 (5 mem & 2 I/O windows) Notes: svn path=/head/; revision=38953
* o renable pccard_remove_driver (it was used in the skel.c driver)Warner Losh1998-08-261-3/+1
| | | | | | | | o update skel.c to lots of stuff that has happened since the last time it was updated. Notes: svn path=/head/; revision=38552
* Use [u]intptr_t instead of [u_]long for casts between pointers andBruce Evans1998-08-161-6/+8
| | | | | | | integers. Don't forget to cast to (void *) as well. Notes: svn path=/head/; revision=38354
* Changed the type of an isa/general interrupt handler to take aBruce Evans1998-06-181-3/+3
| | | | | | | | | `void *' arg. Fixed or hid most of the resulting type mismatches. Handlers can now be updated locally (except for reworking their global declarations in isa_device.h). Notes: svn path=/head/; revision=37050
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Include pc98.h instead of isa.h when PC98 is defined.KATO Takenori1998-05-051-1/+5
| | | | Notes: svn path=/head/; revision=35748
* - Give up trying for a simple solution for correctly recognizing if a cardNate Williams1998-04-201-1/+4
| | | | | | | | | | | | | | was really removed, or simply 'faked' by a suspend/resume. Keep track of both current and previous state, and send that information to the userland programs. [ XXX - This breaks binary compatability with older pccardd programs, but they don't work reliably. :( ] Notes: svn path=/head/; revision=35345
* - Whoops, better have the structure created before trying to use it inNate Williams1998-04-091-2/+2
| | | | | | | | | the patch I just submitted. Noticed by: phk Notes: svn path=/head/; revision=35109
* - Fix bug I introduced a few months ago. If a driver fails the probe,Nate Williams1998-04-081-4/+4
| | | | | | | | | | | correctly unregister the interrupt from the system. [ My fix is much simpler than the one provided in the PR ] PR: 6249 Notes: svn path=/head/; revision=35101
* Removed unused #includes.Bruce Evans1998-02-251-2/+1
| | | | Notes: svn path=/head/; revision=33822
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-241-1/+3
| | | | | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow. Notes: svn path=/head/; revision=32726
* Specify the minor number correctly when creating devfs entries.Mike Smith1998-01-021-1/+3
| | | | Notes: svn path=/head/; revision=32186
* - Renamed 'card.h' to 'cardinfo.h', to avoid namespace collisions withNate Williams1997-11-181-1/+1
| | | | | | | | | the card.h that config builds. [ Repository renaming done in the background to save the card.h history ] Notes: svn path=/head/; revision=31289
* MF22:Nate Williams1997-11-151-5/+6
| | | | | | | | | | | | | | | (update_intr_masks might not need to be done in 3.X, but the new generic interrupt code is incomplete w/regard to support for the PCCARD code, so to avoid any potential problems use it. It can't hurt). - Correctly register pcic_imask with the system interrupt code. - Call update_intr_masks() so that pcic_imask modifications that occur when card interrupts are registered get updated in the system interrupt code. Notes: svn path=/head/; revision=31179
* - Disable cards when doing a suspend by emulating that they have beenNate Williams1997-10-281-8/+11
| | | | | | | | | | | | | | | removed. Add a new state 'suspend' so we 'fake' insertion events at resume time for the cards that have been suspended. [ The code still works if you remove the card during suspend, switch the card during suspend, or combinations of both. ] Reviewed by: frf@xocolatl.com Notes: svn path=/head/; revision=30815
* - Instead of relying on a functional call to register PCARD-capable drivers,Nate Williams1997-10-261-2/+10
| | | | | | | | | | | use a Linker Set. Note, if a driver is loaded as an LKM if will have to use the function call, but since none of the existing drivers are loadable, this made things cleaner and boot messages nicer. Obtained from: PAO-970616 Notes: svn path=/head/; revision=30747
* - 'Beep' support now happens in it's own separate file, so you can messNate Williams1997-10-261-22/+5
| | | | | | | | | | around with different noises for the different events and not have it affect other files. Inspired by: PAO Notes: svn path=/head/; revision=30723
* - Functional changes to PCCARD support.Nate Williams1997-10-261-39/+12
| | | | | | | | | | | | | * 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.) Notes: svn path=/head/; revision=30721
* - Do a bunch of gratuitous changes intended to make the code easier toNate Williams1997-10-261-291/+294
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=30720
* - Call 'callout_handle_init' on the two timeout channels after they areNate Williams1997-10-261-0/+2
| | | | | | | created in the new slot controller structure. Notes: svn path=/head/; revision=30717
* - Use the definitions found in <i386/isa/isa.h> instead of rolling ourNate Williams1997-10-241-6/+7
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=30690
* - defined constant ISA_HOLE_START (would be nice to include machine/pmap.h,Nate Williams1997-10-231-57/+66
| | | | | | | | | | | | 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 ] Notes: svn path=/head/; revision=30679
* - Move the untimeout code call out of the check for pwr_off_pending. ItNate Williams1997-10-231-3/+2
| | | | | | | shouldn't make any difference, but did on a couple of test systems. Notes: svn path=/head/; revision=30675
* - Fix braino in last commit. (Slow networks should be outlawed!)Nate Williams1997-10-231-2/+2
| | | | Notes: svn path=/head/; revision=30664
* - When doing suspend/resume, only try to suspend those drivers on activeNate Williams1997-10-231-4/+8
| | | | | | | | | | | | | | | | 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. ] Notes: svn path=/head/; revision=30660
* Back our V1.36, due to reports of badness. (IRQ's are again allocatedNate Williams1997-10-231-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=30659
* - Simplify code by removing a variable which was initialized once, neverNate Williams1997-10-231-7/+2
| | | | | | | modified, and was expected to have the initialized value. Notes: svn path=/head/; revision=30652
* - Bring in APM_PCCARD_RESUME support from PAO, FreeBSD style. This newNate Williams1997-10-061-8/+33
| | | | | | | | | | 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 Notes: svn path=/head/; revision=30157
* - Include <sys/interrupt.h> to avoid compiler errors.Nate Williams1997-10-061-0/+1
| | | | Notes: svn path=/head/; revision=30152
* - Allocate the 'PCIC' interrupt from the last available (higher #) IRQNate Williams1997-10-061-1/+1
| | | | | | | | | | 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. Notes: svn path=/head/; revision=30141
* Update for new callout interface.Justin T. Gibbs1997-09-211-6/+7
| | | | Notes: svn path=/head/; revision=29681
* Update select -> poll in drivers.Peter Wemm1997-09-141-18/+21
| | | | Notes: svn path=/head/; revision=29368
* 1. i82365.h: Chip identifiers should not be #ifdef PC98. Add identifierPoul-Henning Kamp1997-04-201-3/+14
| | | | | | | | | | | | | (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. Notes: svn path=/head/; revision=25040
* In the disable_slot() routine, the variable "i" wasNate Williams1997-02-111-1/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=22570
* Include file cleanups.Nate Williams1997-01-131-11/+2
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=21668
* Update the PCIC controller's imask with individual slot IRQ's.Nate Williams1997-01-111-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=21543
* Removed magic # 16 and replaced with ICU_LEN.Nate Williams1997-01-111-1/+1
| | | | Notes: svn path=/head/; revision=21542
* - Added PCIC resume functionNate Williams1997-01-081-0/+4
| | | | | | | | | - Cleaned up VLSI-PCIC work-around code Submitted by: nate & the Nomads Notes: svn path=/head/; revision=21411
* - Don't include <machine/laptops.h>. It was a kludge I should neverNate Williams1996-09-071-1/+0
| | | | | | | have imported. Notes: svn path=/head/; revision=18106
* Yet another merge. Remove support.s by deleting memcopy. RemoveSatoshi Asami1996-09-071-3/+1
| | | | | | | | | autoconf.c by merging icu.h. Fix a couple of typos. Submitted by: The FreeBSD(98) Development Team. Notes: svn path=/head/; revision=18095
* Remove devconf, it never grew up to be of any use.Poul-Henning Kamp1996-09-061-16/+0
| | | | Notes: svn path=/head/; revision=18084
* Added #include of <machine/md_var.h>. This will be needed whenBruce Evans1996-06-251-0/+1
| | | | | | | | some declarations are moved from <machine/cpufunc.h> to better places. Notes: svn path=/head/; revision=16733
* Oops, forgot to delete some garbage from working code.Satoshi Asami1996-06-141-8/+0
| | | | Notes: svn path=/head/; revision=16364
* The Great PC98 Merge.Satoshi Asami1996-06-141-0/+14
| | | | | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team Notes: svn path=/head/; revision=16363
* Minor formatting changes. No functional differences, but makes theNate Williams1996-06-051-17/+15
| | | | | | | style more consistant with KNF and the Nomad release. Notes: svn path=/head/; revision=16131
* Adds the APM hooks into the generic pccard kernel files. With this codeNate Williams1996-04-231-6/+113
| | | | | | | | | | | | in place device drivers can now register power-down/power-up routines so that we can use common routines to power-up/power-down cards for insert/removals, suspend/resume, etc.. Reviewed by: phk Submitted by: the 'Nomads' Notes: svn path=/head/; revision=15360
* Changed #includes of <i386/include/foo.h> to #includes of <machine/foo.h>.Bruce Evans1996-04-071-3/+3
| | | | Notes: svn path=/head/; revision=15119
* pccard.c:Gary Palmer1996-04-061-0/+1
| | | | | | | | | | | #include <i386/include/clock.h> to get sysbeep() prototype pcic.c: add appropriate #ifdef around a prototype to quiet GCC because fn decl. is also #ifdef'd. Notes: svn path=/head/; revision=15067
* Removed un-used code.Nate Williams1996-02-211-12/+0
| | | | Notes: svn path=/head/; revision=14174