summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the kernel portion of OLDCARD. I'm working on a replacementimp2005-09-251-731/+0
| | | | | for pccardc dumpcis, but until I'm done with that, I'm leaving pccardc in place. As such, I'm leaving the .h files in place for the moment.
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+2
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-6/+6
| | | | Bump __FreeBSD_version accordingly.
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-6/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-091-1/+1
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* OLDCARD is OBSOLETE_IN_6. Tag it as such.imp2003-06-121-0/+2
|
* 1. Allow drivers to query CIS strings from OLDCARD.imp2003-04-231-0/+34
| | | | | | | | | 2. Include backwards compatibility good for the moment (eventually will be turned off in current, but allow for a short transition period). PR: 51333 Submited by: Scott Mitchell (1) MFC after: 2 weeks
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+8
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* pccard isn't picky about WHAT major it gets.imp2003-02-281-0/+4
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-021-2/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* For boot verbose, print resources assigned in a more asthetically pleasingimp2002-09-131-5/+11
| | | | | | way. PR: 42745 (although done in a different way)
* Change the order that we look for free memory windows from 0 -> MAX-1imp2002-09-081-4/+4
| | | | | | to MAX-1 -> 0. This should allow for less potential for conflict between pccardd/pccardc and drivers. As far as I can tell no drivers try to use window 4, so this should be a no-op for them.
* Copy manufacturer and version string into the kernel, and copy it toimp2002-07-221-0/+2
| | | | | | the slot info. This brings OLDCARD's API much closer to NEWCARD and will allow moving more information into the kernel from pccard.conf for common drivers (ed).
* minor nit in commentsimp2002-07-201-1/+0
|
* What:imp2002-06-231-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o ToPIC is happy with two cards now, even when the two cards are modems. o Fix (all?) hangs on boot when power is applied to the card. I suspect that this will make the Ricoh bridges happier and also make a lot of VAIO owners happy (confirm to me in private email please :-). o All Cardbus bridges should now support 3.3V, X.XV and Y.YV cards, to the extent that the underlying hardware supports such cards. (X.X and Y.Y haven't been assigned values yet :-). o Better 3.3V support for Ricoh ISA bridges. How: o Don't mess with the power register when scanning the cards. It is unnecessary and causes BADVcc conditions on many chipsets. These in turn can cause an interrupt storm. o Make pcic_disable reset the slot's voltage. o Move initializing voltage for the slot until after it has been disabled. o Fix a lot of issues with the pcic_cardbus_power routine. We now properly enable the card and take it out of reset after a power change. o When detecting the card's voltage, if we're in a BadVcc state, direct the bridge to rescan the card for what it supports. (we might need to in the future set the power register to 0 before doing this). o Don't preserve CLKSTOP. need to revisit this. o Better support for Ricoh ISA bridges for 3.3V cards. o Don't write to PCIC_POWER directly as offten, but instead go through the pcic_power interface. o All cardbus bridges now default to use cardbus power control. o Add misc register definitions. o remove some (now) bogus comments. Extra Special Thanks To: Scott Lamber for his kind and generous loan of a Toshiba laptop with a ToPIC 100 in it for my use.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-8/+4
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Better power code and better power diagnosticsimp2002-03-201-7/+1
|
* Add some code which is compatible for NEWCARD. It makes manufacturershiba2002-02-201-0/+3
| | | | | | id transfer from pccardd. Reviewed by: imp
* Garbage collect options AVM_A1_PCI, AVM_A1_PCMCIA, DEBUG_LINUX, DEV_APM,bde2002-02-151-2/+0
| | | | | GUS_DMA, GUS_DMA2, GUS_IRQ, OLTR_NO_BULLSEYE_MAC, OLTR_NO_HAWKEYE_MAC, OLTR_NO_TMS_MAC and PCIC_RESUME_RESET.
* Avoid doubly defining machdep.pccardmsmith2002-01-081-2/+0
|
* Use d_thread_t (the new ugly compatibility hack) rather than the oldimp2001-11-121-6/+4
| | | | uglier compatibility hack (#define thread proc).
* Introduce the concept of "default" voltage. Have pccard layer use thisimp2001-11-111-1/+1
| | | | | | | | | value (-1) in lue of 50 (which assumes a 5.0V card). The rest of the pccard system doesn't detect the proper voltage for the card, so we have to do it on powerup. Many (all?) 3.3V cards can tolerate 5.0V for reading the CIS, but may fail to operate properly when so powered. Idea from: Chiharu Shibata-san <chi@bd.mbn.or.jp> in bsd-nomads:15867
* Better error messages for the cases where device_add_child fails. Weimp2001-11-021-2/+8
| | | | | | | | should also whine if the old pccardd is used, but that's a little harder than it sounds. This also has the effect of fixing a typo that was in the last version I committed.
* Remove an extra " that crept into a string.silby2001-11-021-1/+1
|
* Print a warning when device_add_child returns NULL. This used to beimp2001-11-021-0/+5
| | | | | | impossible at this point, but now it apparently is. Grump. Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
* <jkh> "Hey Rocky, watch me eject this pccard outta my laptop!" "What,imp2001-09-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | again? That NEVER works!" "This time for sure!" Minor overhaul of how we do interrupts for the pci interrupt routing case to cope with card ejection better (read: make it not hand on so many cards): o Reintroduce func_intr and func_arg and use the to store the interrupt handler to call. o Create a pcic_pci_func_intr to call the real interrupt handler iff the card hasn't been ejected. o Remove some checks in pcic_setup_intr now that it is used exclusively for isa routed interrupts. o Defer the eject event until later too, but make sure we can't do any client driver ISR calling in the interrum. o Add some simple code to make sure that we don't attach more than one child. This should fix pccardd starting twice problem (ala single user -> multi-user when you started pccardd by hand in SU). MFC: after jkh thinks I've put the crack pipe away.
* Even better compatibility with 4.x. #define thread proc, since forimp2001-09-131-16/+2
| | | | | this file, that's a reasonable workaround. Also, include sys/proc.h for 4.x.
* Better way to do compatibility between the two versions.imp2001-09-131-20/+8
|
* Fix KSE breakage to this file:imp2001-09-131-0/+32
| | | | Make it compile again on 4.x.
* KSE Milestone 2julian2001-09-121-9/+9
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* A bunch of interrupt related cleanup.imp2001-07-311-33/+0
| | | | | | | | | | | | | o Move PIOCSRESOURCE from pccard to pcic so the kernel can give pccardd better hints as to what resources to use. o Implement an undocumented hw.pcic.interrupt_route to allow people that need to do so to route their interrupts in a non-standard way. o Only preallocate a resource in probe if we're routing via pci. o If we aren't routing via pci, then set the irq to use explicitly to defeat the automatic IRQ routing of the pci layer. This, with the pccardd code should be close to what can be committed to -stable.
* When booted -v (eg bootverbose is non-zero), have pccard report whatimp2001-07-301-0/+7
| | | | | | | | | resources it is attempting to assign to a child object. This should help people track down mysterious resource allocation problems more easily. # Unfortunately, it is harder to do the conflict check and report which # resource failed if the driver itself doesn't.
* Minor nits merged from my stable tree:imp2001-07-271-2/+1
| | | | | | | | | | | | o kill blank line that I introduced in cardinfo.h o Delete unused variable wasinactive. o return 0 from pccard_resume. o Set the state and lastsate initially to be empty. o move comment above code for interrupt dispatching. o Powerstate interface is now available as of 430002, not 500000 (note that this change will be not 100% correct since the power state stuff didn't enter current until well after 500000, but it is good enough for the two branche we have going now).
* Attempt to fix and document interactions between suspend/resume and pccardcimp2001-07-271-24/+17
| | | | | | | | | | | | | | | | | | | | power x 0. pccardc power x 0 used to disable the slot. But a suspend/resume would reactivate the pccard. It no longer does that. Now the disabling of the slot is sticy until it is reset with power x 1 or the card is ejected. This seems closer to correct behavior to me. o Process all card state changes the same using pccard_do_stat_change(). o Cleanup disabling the card so that we can preserve the state after the change. Basically, don't set it to empty as often as we do. o On suspend, the new state is "empty" and the laststate is "suspend" o Document state machine with a diagram of states and edges. The edges are labeld to tell the reader what event causes the external state changes. o "machdep.pccard.pcic_resume_reset" may be obsolete now. We always call the bridge driver's resume method on resume now. Otherwise cards won't automatically show up. If it needs to stay, I'll add it back.
* Note that spls are noopsimp2001-07-091-0/+2
|
* Cleanup some obsolete commentsimp2001-07-061-2/+3
|
* Minor whitespace nit.imp2001-07-011-1/+1
|
* Save the IRQ that we get in pci attachment.imp2001-06-161-13/+7
| | | | | | | | | | | Print type of pci bridge we find. Force the IRQ of pci bridges upon all its children. Allocate the resources on behalf of the bridge when we're testing to see if they exist. This should help people who don't read updating instructions very well. This patch started out with an idea from Shigeru Yamamoto-san in -current.
* Minor style(9) nit. a|b -> a | b.imp2001-06-041-1/+1
|
* Update copyright infoimp2001-05-251-0/+1
|
* Minor style(9) changes:imp2001-05-141-35/+35
| | | | return (VALUE);
* Take a stab at making this less dependent on having pcic as a parent.imp2001-05-141-24/+17
| | | | | | | For memory for the pccard attribute/common memory mapping allocate on the pccard. For other allocations, use whatever is the parent of this device. There's no doubt other issues lurking, but this should make things closer to being independent.
* o Get rid of static array of slots in pccard layer. Move this to theimp2001-05-131-39/+23
| | | | | | | | | softc. o Store pointers to softc in dev_t in si_drv1. o Change 'kludge version' to 'classic version' since things are getting less kludgy. o Minor code shuffling so that we probe and attach the pccard slots. o Minor style(9) changes.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* First step towards plugging the "pccard is trying to map into a BIOSimp2001-03-261-75/+63
| | | | | | | | | | | region for CIS reading" problem: Use bus_alloc_resource to get the memory that we'll be using. Also has the benefit of doing usage checking as well. This gets rid of the ugly kludge that we had before for mapping pmem to vmem. Second, move PIOCSRESOURCE to its own routine and make it conform more to style(9) in the process.
* Place the call to pccard_insert_beep() in the inserted() timeoutiedowse2001-03-201-1/+1
| | | | | | | | | | | | routine instead of pccard_event(). This avoids spurious extra calls to pccard_insert_beep() at insert or remove time which could occur due to noise on the card-present lines. Clean up some code in pccard_beep.c; we were depending on the order of evaluation of function arguments, which is undefined in C. Also, use `0' rather than `NULL' for integer values. Reviewed by: sanpei, imp
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-1/+0
|
OpenPOWER on IntegriCloud