summaryrefslogtreecommitdiffstats
path: root/sys/pccard
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in description of Cirrus Logic PD6832 PCI-CardBus Bridge.iwasaki2000-03-301-1/+1
| | | | | | | | This don't hurt anything. PCI/CardBus Bridge -> PCI-CardBus Bridge Submitted by: Takeshi Shibagaki <sibagaki@lsi.melco.co.jp> Obtained from: bsd-nomads ML in Japan
* More fully initialize cardbus bridges. We now call the new genericimp2000-03-252-28/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | cardbus bridge init routine for all cardbuses. This routine attempts to compensate for BIOSes that do not setup the cardbus bridge into legacy mode. Since this is becoming more common, and cardbus pci cards have appeared on the market, this makes sense. Do some TI113x specific initialization. This came in as part of the patch. Report TI1[1234]XX specific config registers protected by bootverbose. Minor code cleanup while I'm here. I've also removed the unused code present in the original patches, and cleaned it up slightly in places as well. The original patches supported more than one card, but these patches support just one. We should likely revisit this in the future. This makes the Compaq card that Walnut Creek CD purchased for me work in my bouncer box. This is a MFC candidate. However, I'd like to get some airtime on these patches on as many laptops as possible before doing the MFC. It does change things somewhat. In theory, apart from the minor TI tweaks, this shouldn't change anything if the bridge is in legacy mode already. Submitted by: sanpei@sanpei.org (MIHIRA Yoshiro)
* Add support for PnP ISA cards, and some laptop PnP support:imp2000-03-103-83/+125
| | | | | | | | | | | | | | | o break out some of the probe routine the allocation of resources into an attach routine o Recognize PnP ids o Allocate IRQ per card rather than per system o Better polling reporting o Remove unneeded include files in slot.h o store a pseudo unit number on each device we find. o Pass a unit number to interrupt/timeout routine and use it for polling the hardware. Tested on: My VAIO and with the Linksys pccard reader. Approved by: jkh
* /tmp/msgimp2000-02-214-33/+35
|
* Update the pci->pcic compatability module to newbus. This is a simplepeter2000-02-021-108/+151
| | | | | | | | conversion to eliminate the compatability shims without making any significant changes. This eliminates the shim warnings. Obtained from: n_himba (tweaked by me, don't blame him for this) Approved by: jkh
* Propagate MAC address in CIS tupple to dev/ed/ driver.hosokawa2000-01-211-0/+17
| | | | | | | | Many ed-based Ethernet PC-cards can't get correct MAC address without this patch. Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp> Reviewed by: Warner Losh <imp@village.org>
* This fixes a bug that /etc/pccard_ether did not work without DHCP.hosokawa2000-01-162-1/+3
| | | | | | | | | | | | | | | | | | For example, when /etc/pccard.conf had ed0 in config line, but kernel refused this name and said devclass_alloc_unit: ed0 already exists, using next availale unit number Kernel used ed1 as device name and it did not match with config and insert/remove lines. Fortunately, dhclient was called without args, and it works, but if we wanted to use static IP address for PC-card, it did not work. This modification makes pccardd to execute insert/remove lines with the true device name that returns from kernel. (Last change to etc/pccard.conf.sample eliminated all hardwired device name from insert/remove lines in /etc/pccard.conf)
* Fixed a bug in PCIC polling mode.hosokawa2000-01-151-6/+17
| | | | (it does not work without this fix)
* Stop the recurring feeling of deja vuimp2000-01-131-1/+2
| | | | | | | | | | Stop the recurring feeling of deja vu Stop the recurring feeling of deja vu Stop the recurring feeling of deja vu and debounce the eject messages. We now mark the socket empty in the interrupt handler, rather than after we've disabled the socket which happens "much later".
* Fill in the blanks for some of the Texas Instruments cardbus controllers.billf1999-12-312-0/+6
| | | | Obtained from: NetBSD (syssrc/sys/dev/pci/pcidevs)
* Copy Texas Instruments cardbus controllers from pcisupport.c, the pcisupport.cbillf1999-12-292-0/+9
| | | | | | | probes are at the 'chip' level and will get overridden by pcic_p if it is compiled in. It's still nice to get the better probe message if it's not... Requested by: imp
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Move the turning on of the interrupts for the card at the bridge fromimp1999-12-101-15/+14
| | | | | | | | | the activate method to the setup_intr, and turn it off to teardown_intr. This makes the ed driver not enter its interrupt routine during the probe. Apparently, an interrupt happens when you disable the interrupts. There are other problems with ed still.
* Switch to using suspend/resume methods rather than the APM hooks.imp1999-12-083-112/+65
| | | | | | | | | | | | | Should have no effect, but does make things a little cleaner. I thought this was the race that was causing problems, but it turned out to be in pccardd waking up after the empty/insert events had happened and being confused. Minor cleanup: o Remove isahd from pccard_devinfo o remove extra from controller o formatting nits o use PCCARD_DEVINFO(d) rather than a bare device_get_ivars(d)
* Fix alloc_driver() so that calls devclass_get_device() with slt->slotnumwpaul1999-12-081-1/+1
| | | | | | | | | | | | | | | as the unit argument instead of 0. disable_slot() calls devclass_get_device() correctly, however because alloc_driver() does it wrong, disable_slot() is unable to locate the child devices attached to the pccard bus and thus fails to call device_delete_child() on them. The end result is that when a card is removed, its detach routine is never called, and re-insertion always fails. With this fix (and the previous one to if_wi.c), I can now insert, remove and re-insert my WaveLAN/IEEE card and things behave correctly. kldunloading the if_wi.ko module also seems to work properly now. Ok'ed by: imp
* Remove unused junk: next fields and list head. Likely not completelyimp1999-12-062-20/+1
| | | | | needed on software reaching EOL, but I'd have caught the hang bug sooner had I done this earlier.
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-032-2/+3
| | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
* Print device names for children that fail to detach.imp1999-12-021-1/+3
| | | | | | | Free child array when we're done with it. Forgotten by: imp Submitted by: Nick Hibma <hibma@skylink.it>
* Make pccardc beep actually work. The kernel was doing the wrong thingimp1999-12-023-9/+11
| | | | | | | | with the beep information it had (like ignoring it). Submitted by: sanpei@sanpei.org (MIHIRA-san Yoshiro) Add $FreeBSD$ to pccard_beep.c while I'm here.
* /tmp/msgimp1999-12-022-1/+19
|
* Forgot to commit this in last commit.imp1999-12-011-0/+1
|
* Fix the hang on card eject problem and maybe the hang on suspendimp1999-12-011-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem. o Create new timeout routine so we don't detach the card inside a ISR but instead drop back to spl0 via a timeout of 0. o Actually delete the child of the pccard device rather than just faking it badly. o Fix sio, ed and ep to have pccard detach routines that are int rather than void. o Fix ep and ed pccard detach routines to use if_detach rather than just if_down. if_detach destroys the device, while if_down just marks it down. In this incarnation of the pccard things, we map the disable the slot action to detach the driver, which removes the driver from the device tree. When that is done, a panic would soon follow as the ifconfig tried to down the device. Didn't fix: o Should cache the pccard dev child's pointer in struct slot o remove now unused parts of struct slot o Any driver using softc after detach has been called. sio's softc used to be statically allocated, so you could check sc->gone, but that is now gone. o Didn't remove gone from softc of drivers that use the old pccard method. Didn't test: o ed driver changes o sio driver changes on pccards o suspend (no laptop or apm support on my desktop)
* Add the PCI id for the TI PCI-1251B PCI-CardBus bridge.eivind1999-11-282-0/+3
| | | | Submitted by: Martin Blapp <mb@imp.ch>
* s/Brige/Bridge/.kuriyama1999-11-211-4/+4
|
* Allow NULL for startp and/or countp in bus_get_resource() so that you canpeter1999-11-201-2/+4
| | | | get one of the two without having to use a dummy variable.
* Kill unneeded includesimp1999-11-203-8/+0
| | | | Found by phk's script a while ago.
* I'm told this makes more laptops work with the new attachment code.imp1999-10-291-1/+1
| | | | Submitted by: archie cobbs
* Do not add children for new bus kludge version of pccard.imp1999-10-282-10/+2
| | | | Fix some compile warnings.
* Remove debug printfs and Debugger() calls.imp1999-10-252-85/+49
| | | | | | | Add support for memory mapping This should allow pccard that need memory mapping to work, but I don't have one to test against.
* Massive rewrite of pccard to convert it to newbus.imp1999-10-259-1122/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Gut the compatibility interface, you now must attach with newbus. o Unit numbers from pccardd are now ignored. This may change the units assigned to a card. It now uses the first available unit. o kill old skeleton code that is now obsolete. o Use newbus attachment code. o cleanup interfile dependencies some. o kill list of devices per slot. we use the device tree for what we need. o Remove now obsolete code. o The ep driver (and maybe ed) may need some config file tweaks to allow it to attach. See config files that were committed for examples on how to do this. Drivers to be commited shortly. This is an interrum fix until the new pccard. ed, ep and sio will be supported by me with this release, although others are welcome to try to support other devices before new pccard is working. I plan on doing minimal further work on this code base. Be careful when upgrading, since this code is known to work on my laptop and those of a couple others as well, but your milage may vary. BUGS TO BE FIXED: o system memory isn't allocated yet, it will be soon. o No devices actually have a pccard newbus attach in the tree. BUGS THAT MIGHT BE FIXED: o card removal, including suspend, usually hangs the system. Many thanks to Peter Wemm and Doug Rabson for helping me to fill in the missing bits of New Bus understanding at FreeBSD Con '99.
* Remove name field from controller information. Fix name setting inimp1999-10-163-38/+44
| | | | | | | | pc98 case that I missed before. Attempt to get the irq for the PCIC first from the loader env var and second from the config system. I've been able to boot my laptop with a kernel that hardwired the irq to 10. This should allow boot -c to finally start working for pcic irq, but I've not tested that. Add $FreeBSD$ to slot.h.
* Add new file for pccard compatibilty code. Add it to files so it getsimp1999-10-151-0/+218
| | | | pulled in as well.
* Reorganize the attachement point for pcic (it was unattached andimp1999-10-154-296/+50
| | | | | | | | | | | | | | | | | | | | | | floating before). Attach pccard devices to pcic, one per slot (although this may change to one per pcic). pcic is now attached to isa (to act as a bridge) and pccard is attached to pcic, cbb and pc98ic (the last two are card bus bridge and the pc98ic version of pcic, neither of which are in the tree yet). Move pccard compat code into pccard/pccard_compat.c. THIS REQUIRES A CONFIG FILE CHANGE. You must change your pcic/card entries to be: # PCCARD (PCMCIA) support controller pcic0 at isa? controller pcic1 at isa? controller card0 The old system was upside down and this corrects that problem. It will make it easier to add support for YENTA pccard/card bus bridges. Much more cleanup needs to happen before newbus devices can have pccard attachments. My previous commit's comments were premature.
* Make it easier to have completely new bus attachment points for pccardimp1999-10-153-32/+70
| | | | | | | | | | devices. There may still be problems with said drivers, if so please let me know. o Move attach-like functionality to the nbk attach compatibility code. o Smarter probe code: for the compatibility code probe succeeds if strcmp succeeds, for noncompatibility you can do anything you like. o Get rid of some compiler warnings introduced in last commit.
* *** empty log message ***imp1999-09-265-18/+31
|
* Kill printf warnings.imp1999-09-261-1/+1
|
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* $Id$ -> $FreeBSD$peter1999-09-062-2/+2
|
* Kludge together support for the old pccard system with newbus. Thisimp1999-09-065-19/+388
| | | | | | | | will allow newbus based drivers to have pccard attachments. Also start printing out probe messages for pccards stating the resources used and regularize many of the pccard printfs. Reviewed by: Peter Wemm.
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-232-13/+2
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* (1) Fix a spelling mistake in a comment.billf1999-08-171-2/+3
| | | | | | (2) Add braces to avoid ambigious if/if/else Reviewed by: bde
* o Add additional printfs for error cases when we can't attach the device.imp1999-08-013-9/+29
| | | | | | | | o Add field to dev_desc for the size of the io port range. This isn't used yet in the committed sources, but will make the transition easier in the future. If you build this into your kernel, you will need to rebuild pccardd.
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-031-5/+1
| | | | files. config will leave the whole file out if configured to do so.
* Simplify cdevsw registration.phk1999-05-311-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-5/+22
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-091-5/+1
| | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
* Unbreak slot_irq_handler(). The problem here is that slot_irq_handler()wpaul1999-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | abuses its argument, which is supposed to be an integer unit number, as a pointer to the head of the 'struct slot' list. When this code was hacked^Wupdated for newbus, a new mechanism for registering slot_irq_handler() was put in place and the significance of the unit number was overlooked. When registering an interrupt, we have both device_id and unit. The unit number is passed as 'unit' but /sys/i386/usa/intr_machdep.c:register_intr() drops unit on the floor and uses device_id instead. Since pccard_alloc_intr() always sets device_id to 0, this means the unit number is always zero, and slot_irq_handler() is always called with 0, which becomes a NULL pointer which slot_irq_handler() tries to dereference and the kernel explodes. Result: if you assign a PCMCIA driver in the kernel config file like this: device wi0 at isa? port? irq? Then the system will panic the moment a PCMCIA device is attached and an interrupt is triggered. The quick fix: make pccard_alloc_intr() pass the unit number as both the device_id and unit arguments to register_pcic_intr(). The correct fix would be to rewrite /sys/pccard to be less disgusting.
* Operator precedence (nit: in #if 0 code) bug.peter1999-05-021-1/+1
| | | | | PR: 11413 Submitted by: Christopher Peterson <cpeterso@cs.washington.edu>
* - Added PCI identification support for the TI1251 PCI/CardBus bridge.nate1999-05-022-2/+5
| | | | | With this addition my ThinkPad 600E works with the stock FreeBSD PCMCIA code.
OpenPOWER on IntegriCloud