summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
Commit message (Collapse)AuthorAgeFilesLines
* MFp4:imp2004-01-042-5/+5
| | | | | | o O2Micro OZ711e1 is now recognized (note: I don't have one, and the current owner of the Dell laptop is reporting problems). o minor nits wrt copyright date.
* Fix typo in ENE CB710 description. It isn't a 720.imp2003-12-221-1/+1
|
* Fix a harmless typo (use of res instead of rle: if rle is NULL, we'dimp2003-11-121-3/+4
| | | | | | | still get a panic, just not a nice message) and update to new __FBSDID. Submitted by: charnier@
* -Wunusedimp2003-11-081-1/+1
|
* Remove channeling interrupts to IRQ1. Some chipsets don't do theimp2003-11-071-0/+7
| | | | expected thing and that causes interference with keyboards.
* Backswards is as backwards does: If we're MPSAFE, then we don't needimp2003-10-241-2/+2
| | | | | | | | giant, which implies that we need to take out giant it we're NOT MPSAFE. # I can't believe the number of people that looked at this failed to # detect this.
* Add newly discovered ENE Technologies CardBus bridges to the list:imp2003-08-222-0/+16
| | | | | | | | CB710, CB720, CB1211, CB1225, CB1410 and CB1420 These are likely licensed designed from TI, and the Linux PCMCIA code treats them as TI chips. Add comment, but no ID for the 711E1 from O2Micro.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* In my efforts to make checking the CD bits less error-prone, Iimp2003-08-201-1/+1
| | | | | | | introduced an error. In power_enable_socket, we only return ENODEV if there isn't a card, not if there is a card. Ooops. Pointy hat to: bsdimp
* Fix typo in last commit.mux2003-08-201-1/+1
|
* Use CBB_CARD_PRESENT instead of checking STATE_CD directly since it isimp2003-08-201-4/+6
| | | | hard to get right.
* The CD bits in the CBB_SOCKET_STATE register are 0 when the card isimp2003-08-181-4/+3
| | | | | | | | | | | | | present, and non-zero when it is (or may be) absent. The test cbb_child_present was backwards. However, typical usage in the tree would cause it to do the right thing because the card really wasn't there the OK flag would be turned on. Also, assume that if any of these bits are turned on we don't have a card, rather than requiring both of them in the suspend/resume routines. Noticed by: cognet
* Put the clearing of the socket cd interrupt and setting of it underimp2003-08-181-10/+8
| | | | | protection of sc->mtx. Sometimes multiple insert/ejections could cause further insertion/removals to not happen due to racing an ISR...
* trivial optimization: use nameunit here.imp2003-08-141-1/+1
|
* MF p4:imp2003-08-101-1/+1
| | | | Minor style(9) nit.
* Some bridges, like o2 micro and maybe ricoh, have some issues betweenimp2003-08-101-10/+47
| | | | | | | | | | | | | | | the time the card is inserted and the time that the card is configured. This can lead to interrupt storms. The O2Micro suggested workaround is to route the card function interrupt to IRQ1. It appears from my testing that this is an acceptable workaround for most chipsets (there's still some issue with the ricoh chipset). Also, only look at the NOT_A_CARD bit when the bridge tells us there's a card present. At least one test caused this to be true after the card was removed, but the author couldn't recreate it with the workaround in place. The change is more conservative than the previous code, but still has the work around that wasn't present in the older code.
* Add code to cope more with strange conditions after careful study ofimp2003-08-091-14/+42
| | | | | | | | | | | | | | | | | | | | | | the standard. 1) When the bridge tells us that we have a card that isn't recognized, we use the force register to force the CV_TEST to run. This test causes the bridge to re-evaluate the card. Once this re-evaluation process happens, we get a new interrupt that may say it is ready to process. We try this up to 20 times. Tests have shown that this appears to correctly reset the 'Unknown card type' problem that I saw on my Sony PCG-505TS. 2) Take a page from OLDCARD and always read the CSC register in the ISR. Some TI (and it seems maybe Ricoh) chipsets require this to behave properly. This work around appears to work due to some power management protocols that were improperly implemented. Maybe it can be removed when this driver supports the full PME# protocol described in the standards. 3) Minor additional debug printf when debugging is enabled. 4) Minor additional commentary for things that are obvious only after study. # I'm committing this from my Sony PCG-505TS using shared PCI interrupts # and NEWCARD, but there are some issues with the Ricoh bridge still, but # at least now I can boot with the card inserted and have it work.
* CBB_SOCKET_STAT_ is too long. Change it to CBB_STATE_. Also, makeimp2003-08-092-31/+44
| | | | | | some minor changes to more closely match the bit names used in the 7.0 version of the PCMCIA standard. Also add bits from the FORCE register.
* When allocating memory, align it to the minimum alignment required forimp2003-08-092-0/+5
| | | | cardbus bridges if the alignment requirements were less restrictive.
* Add comments about some alignment that looks a little strange.imp2003-08-091-2/+9
|
* Minor fixes to a couple of comments.imp2003-08-091-2/+2
|
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-5/+5
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* All current uses of pci_set_powerstate are bogus, at least in theory.imp2003-07-031-2/+3
| | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds.
* Unlock after ISR.imp2003-06-121-1/+1
| | | | | Noticed by: njr Pointy hat to: the impable one.
* s/BURN_THE_BOATS/BURN_BRIDGES/g to adopt to new world orderimp2003-06-121-2/+2
|
* Make cbb interrupts MPSAFE:imp2003-06-122-22/+34
| | | | | | | | | | | | | | | | o Register ISR INTR_MPSAFE. o Loop on KTHREAD_DONE == 0 in the thread. o Safe the INTR_MPSAFE flag for client drivers (don't know if there are any CardBus/PCI drivers that are INTR_MPSAFE) o Read status after acquiring mtx_lock(Giant) rather than before so that we catch state changes that happen while Giant is being acquired. o Turn off the CD bit when we see a CD interrupt, and turn it back on after we've attached/detached the card. o On suspend, actually set the CBB_SOCKET_MASK to zero rather than oring in '0' to turn it off on suspend. o If the ISR that's registerd is MPSAFE, don't acquire Giant around call to client ISR. o Fix comments to reflect these changes.
* MFp4:imp2003-06-072-54/+13
| | | | Migrate some common pccard code into exca.
* Simplify the power code somewhat (this makes the module about 100imp2003-06-072-85/+34
| | | | bytes smaller).
* Add two of three workarounds for interrupt storms for o2micro parts asimp2003-06-062-14/+145
| | | | | | | | | obtained from o2micro. These should only be needed for 'older' o2micro bridges (anything before the 7xxx series of bridges), but will work with the new bridges. # I don't plan on porting it to oldcard, but will happily commit to # oldcard if someone else needs them.
* Remove return after goto.phk2003-05-311-2/+0
| | | | | | Remove break after return; Found by: FlexeLint
* Back out accidentally committed debuggingimp2003-05-041-8/+0
|
* fix typo in TI1515 ID.imp2003-05-042-1/+9
|
* Grab some of the latest TI cardbus bridge IDs. Inspired by a similarimp2003-05-041-0/+10
| | | | commit to NetBSD. I'll add these to various tables soon.
* Fix typo on O2Micro devices names.imp2003-04-291-2/+2
| | | | Submitted by: noda-san
* Make IRQ shareable for the cardbus case too.imp2003-04-281-0/+1
|
* Don't need to read this config register if we're just going toimp2003-04-081-2/+1
| | | | overwrite it in the next line.
* MFp4: Massively unbreak module loading/unloading:imp2003-04-081-62/+32
| | | | | | | | | | | | | | | | | | o Only complain about detached children that aren't pccard/cardbus. o Don't NULL out the pccarddev and cbdev devices. detach just disassociates the device and driver. It doesn't delete the child. o on driver added, just probe_and_attach the children. If there's any children attached, wakeup the device add/delete thread. o wakeup the add/delete thread with the correct cv_signal() rather than the bogus wakeup(sc). It used to be that we did a tsleep on sc in this thread, but switched to the more reliable cv stuff a while ago w/o changing this. o Remove bogus checks when reallocating memory for the registers. They weren't needed and turned out to be completely bogus. This lets me load/unload pccard with a pccard in a slot and have the child correctly detach/attach. This should help people that have wi in their kernel, but that kldload cbb and pccard, for example.
* Add a number of IDs from linux for old, rare pci devices:imp2003-02-261-5/+6
| | | | | | o A second 82092AA id. o SMC 34c90 Plus a couple of trivial formatting changes.
* o transition from exca_write to exca_putb and read->getb. This is so thatimp2003-02-141-15/+7
| | | | | | | | | | we can have additional different types of bridges. o remove now bogus comment. o Don't clear CARD_OK when we can't attach a card. o minor style nits # this make kldload of cardbus drivers work for me when the card is # present on boot.
* Remove a comple of bogus debug printfs that snuck in during someimp2002-11-232-5/+2
| | | | | | | debugging I was doing 3 months ago :-(. Noticed by: scottl Aproved by: the re blanket (different than the security blanket).
* MFp4:imp2002-11-141-0/+12
| | | | o Add support for bus_child_present call by implementing that method for cbb.
* MFp4:imp2002-11-141-4/+7
| | | | | o Make this code a little easier to understand by using simpler if statements, but nesting them.
* Detach the pccard bus children when we eject a 16-bit card, not theimp2002-11-041-1/+1
| | | | 32-bit ones. This was introduced in the last commit.
* MFp4:imp2002-11-021-4/+9
| | | | | | | | | | | | | | | o Always release the resources on device detach. o Attach resources the same with driver added as we do we do in the insert case (maybe this should be a routine). o signal the wakeup of the thread on resume instead of trying to force an interrupt. o Minor debug hacks. o use 0xffffffff instead of -1 for uint32_t items. o Don't complain when we're asked to detach no cards. This is normal. o Eliminate the now worthless second parameter to card_detach_card. o minor style(9)isms Some of these patches may be from: iwasaki-san, jhb, iadowse
* o Set CBB_CARD_OK just before CARD_ATTACH_CARD. If ATTACH_CARD fails, thenimp2002-10-111-12/+14
| | | | | | | | | clear the bit. This allows ata driver to attach its children because it needs the interrupts enabled to succeed. Submitted by: iwasaki-san o Spell CardBus as CardBus, not Cardbus or CardBUS while I'm here.
* Make kldunload cbb work:imp2002-10-081-22/+17
| | | | | | | | | o Implement the thread killing interlock as described by jhb in arch@ while talking to markm. o Hold Giant around cbb_insert()/cbb_remove(). Deep in the belly of the vm code we panic if we don't hold this when we activate the memory for reading the CIS. o If we had to do the kludge alloc, then do a kludge free.
* MFp4:imp2002-10-072-46/+76
| | | | | | | | | | | | | | o Better resume code. Move the comments around. Force the socket state to be querried. Ack the interrupts properly. o Intercept the interrupt requests and keep a list of interrupts to service ourselves. When the card attaches, set its OK bit. When we get a card status change interrupt for that card, clear the OK bit. Don't call the ISR if the OK bit is cleared. Iwasaki-san and yamamoto-san have both sent me patches that fix the same problem this fixes, but at the pccard level. o Try to get the signalling of the thread to actually die. This might not be 100% right, but it is less wrong than before. o Add a SIC next to a TI type that looks like it could be wrong, but isn't.
* Some kernel threads try to do significant work, and the default KSTACK_PAGESscottl2002-10-021-1/+1
| | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb
* reprobe not needed here eitherimp2002-09-101-30/+0
|
* Fix typos: s/O2Mirco/O2Micro/blackend2002-08-241-6/+6
| | | | Approved by: imp
OpenPOWER on IntegriCloud