summaryrefslogtreecommitdiffstats
path: root/sys/pccard
Commit message (Collapse)AuthorAgeFilesLines
* fix some minor problem in PIOCSRESOURCE ioctl.sanpei2000-10-011-14/+5
| | | | | | | | | | | | | | - If resource which was allocated for pcic was requested via this ioctl, bus_alloc_resource would be succeeded and that resource was returned as free resource. So check whether requested resource was used for pcic or not before bus_alloc_resource test. - merge SYS_RES_IRQ routine into other SYS_RES_* routine and clean up. problem reported by: Yohei Terada <terada@jiro.c.u-tokyo.ac.jp>
* Spelling police in a comment: Defalut -> Default.jhb2000-09-291-1/+1
|
* Add pccard_product_lookup comatibility shimimp2000-09-281-0/+7
|
* o Remove 9 unnecessary includes.imp2000-09-203-12/+8
| | | | | | | | o Add Vpp power at 5.0V rather than 0. Setting it to zero violates the pccard spec. Most pcic devices in use today don't let us violate the spec, but some older ones do. Bill Paul sent this to me a long time ago and I thought I'd commit it before now. o Add some debug stuff hidden behind bootverbose.
* Implement indirection in the pccard probe/attach. This should make itimp2000-09-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | possible to have different probe/attach semantics between the two systems and yet still use the same driver for both. Compatibility methods for OLDCARD drivers. We use these routines to make it possible to call the OLDCARD driver's probe routine in the context that it expects. For OLDCARD these are implemented as pass throughs to the device_{probe,attach} routines. For NEWCARD they are implemented such such that probe becomes strictly a matching routine and attach does both the old probe and old attach. compat devices should use the following: /* Device interface */ DEVMETHOD(device_probe), pccard_compat_probe), DEVMETHOD(device_attach), pccard_compat_attach), /* Card interface */ DEVMETHOD(card_compat_match, foo_match), /* newly written */ DEVMETHOD(card_compat_probe, foo_probe), /* old probe */ DEVMETHOD(card_compat_attach, foo_attach), /* old attach */ This will allow a single driver binary image to be used for both OLDCARD and NEWCARD. Drivers wishing to not retain OLDCARD compatibility needn't do this. ep driver minorly updated. sn driver updated more than minorly. Add module dependencies to allow module to load. Also change name to if_sn. Add some debugging code. attempt to fix the cannot allocate memory problem I'd been seeing. Minor formatting nits.
* add PIOCSRESOURCE(IOC_GET_RESOURCE_RANGE)sanpei2000-09-173-0/+59
| | | | | | | Now /usr/sbin/pccardd read free resource(io,irq) range with this ioctl. Original Idea from: PAO3
* - Remove the inthand2_t type and use the equivalent driver_intr_t type fromjhb2000-09-131-1/+2
| | | | | | | | | | | | | newbus for referencing device interrupt handlers. - Move the 'struct intrec' type which describes interrupt sources into sys/interrupt.h instead of making it just be a x86 structure. - Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd' and 'struct intrec' - Move the code to translate new-bus interrupt flags into an interrupt thread priority out of the x86 nexus code and into a MI ithread_priority() function in sys/kern/kern_intr.c. - Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and sys/pci/pci_compat.c.
* Add a detach method to allow this device to be unloaded.imp2000-08-301-0/+7
|
* Add TI-1031 id. It doesn't work yet, but it is nice to have it.imp2000-08-292-0/+6
| | | | | These were on cards that were pci pccard (not cardbus) bridges that lived in SparcUltras that picked up on ebay.
* Add UNIX domain socket feature to pccardd. This makes pccardume2000-08-202-4/+6
| | | | | | | related PAO3/ports such as gxcardmon work. Reviewed by: imp Obtained from: PAO3
* Add some infrastructure support for dealing with large attributeimp2000-08-102-5/+61
| | | | | | | | | | memory space needed by the raylink driver (in progress, nearing completion). This is a minorly cleaned up diff from Duncan to help him reduce the diffs from stock FreeBSD. Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
* Fix a bug so that we have correct number of pccard instances in pcic_attach().iwasaki2000-07-241-1/+1
| | | | | | | | | pcic_attach() got a wrong pointer to pcic_slots since device haven't set correct unit number yet, so always accessed elements of pcic_slots which belong to pcic0 (unit number 0). Now we set unit number to pcic device first, then access to pcic_slots based on the unit number we've just set.
* There is no atdevbase on the alpha. Hide this case statement on alpha untilmjacob2000-06-231-0/+3
| | | | the design/implementation is complete.
* o Implement some compatibility functions for NEWCARD compat. This isimp2000-06-181-2/+24
| | | | | | | incomplete, but will eventually allow the same drivers to function with both oldcard and newcard. o Remove include of opt_bus.h. It isn't needed and gets in the way of module building.
* Add ACTIONTECH #define for plug and play. Also add PnP support to NEWCARDimp2000-05-291-1/+1
| | | | | | for this card. Submitted by: Kazuya Kodama <kodama@rd.nacsis.ac.jp>
* Make this compile without depending on the FreeBSD 2.2 compatabilitypeter2000-05-282-12/+13
| | | | defines.
* Add PnP ID for vadem based plug and play card.imp2000-05-021-0/+1
| | | | | Submitted by: Dave Belfer-Shevett <shevett@stonekeep.com> Fix by: Bill Paul
* Add $FreeBSD$peter2000-05-011-0/+1
|
* MFPAO3. Improvement of of pccard cis tuple parsing capability.iwasaki2000-04-261-0/+29
| | | | | | | | | - Fixed bogus CIS tuple dumping (Network node ID, IRQ modes and etc.) - Include telling drivers ethernet address if Network node ID tuple is available. This is usefull for some bogus ehter cards which can't get correct ethernet address from CIS tupple. Obtained from: PAO3
* Checkin my first batch of New Mexico changes:imp2000-04-254-43/+48
| | | | | o minor whitespace things (bad because this is also a functional commit) o Backport reading in of CIS entries from the driver level.
* o Preliminary support for mapping the CIS by the driver.imp2000-04-202-9/+77
| | | | | | | | o Modify xe driver to use this. There's still some issues with this code, so xe can't map the cis just yet. I'm thinking about how to resolve the issue. pccard_nbk's pccard_alloc_resource is getting in the way.
* Add TI-1211 chipset from datasheet infoimp2000-04-202-2/+7
|
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-192-2/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* 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
OpenPOWER on IntegriCloud