aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb
Commit message (Collapse)AuthorAgeFilesLines
...
* Reduce the number of retries to 10 from 20 for not_a_card retry test.Warner Losh2007-03-041-5/+8
| | | | | | | | | | | Add some comments to explain how 10 was picked. 20 was completely arbitrary, at least 10 has some reasoning behind it. Also, update the comments about how long we sleep to reflect the new, shorter timeout we use. Notes: svn path=/head/; revision=167208
* Use pause() instead of tsleep()'s on the softc pointer that have noJohn Baldwin2007-02-271-6/+6
| | | | | | | | corresponding wakeups. Also, at least some of the comments nearby indicate that these are fixed-length I/O sleeps. Notes: svn path=/head/; revision=167087
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-233-5/+7
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Two changes:Warner Losh2007-02-161-1/+4
| | | | | | | | | | | | | | | | | (1) change debounce period from 1s to 250ms. This appears to be fine and speeds things up a little. (2) In the middle of cbb_pcic_power_disable_socket we write 0 to the EXCA_INTR register to put the card into reset. However, this turns off CSC interrupts for TI bridges (and maybe others). So no further card insertion events would be noticed. To compensate, after we've gone through the entire power down sequence, turn on EXCA_INTR_ENABLE so that CSC events happen. #2 should fix the 'dead slot' problem that has been reported after card ejection (but only 16-bit cards). Notes: svn path=/head/; revision=166786
* Fix typo in commentWarner Losh2007-02-161-1/+1
| | | | Notes: svn path=/head/; revision=166785
* It turns out that it is easier to not NULL out pccard and cardbusWarner Losh2007-02-151-14/+6
| | | | | | | | | | | device pointers. They don't change as the children device drivers come and go. Rather, check to see if the device is attached where we would have checked ! NULL. This solves many asymmetries in the code that likely could lead to crashes when loading/unloading cbb without one or more of the expected children's driver not present. Notes: svn path=/head/; revision=166742
* Fix three bugs:Warner Losh2007-02-151-6/+25
| | | | | | | | | | | | | o When detaching all children, try really hard to get all the children list before giving up. This is based on an observation by hans petter selasky in his usb p4 branch. o When rescanning devices after a driver is added, abort if we can't get the child list with a message. o when rescanning devices, if the reprobe/attach is successful, save the device for cardbus/pccard. Notes: svn path=/head/; revision=166741
* Batch of changes:Warner Losh2006-08-123-61/+112
| | | | | | | | | | | | | | | | | | | | | | o when turning off the socket for a 16-bit card, write 0 to INTR register rather than just tying to just clear the rest bit. this seems to fix card insert detection after an eject on TI bridges (ricoh bridges work either way, apparently). This is a MFp4. o Cope better with TOPIC95 bridges on powerup. According to NetBSD driver, these bridges don't set POWER_STATE, so cope accordingly in our power code. They also need a little extra time to settle, so do that as well. o It appears that we need to turn on/off one of the clocks to the card when we power up/down that socket on a TOPIC97, also from NetBSD. o TOPIC97 bridges need to specifically enable LV card support. Unconditionally do this in the hopes that all laptops that have these chips support LV voltages (they should, since they are required for CardBus). o TOPIC register name regularization. Registers specific to models of TOPIC are now called out as such. # I need a machine with a TOPIC95 for testing. Notes: svn path=/head/; revision=161241
* We don't have a ISA specific shutdown routine at this time, so removeWarner Losh2006-06-031-1/+0
| | | | | | | | | it. We just moved it to be pci specific, so this was causing compile problems (linking problems, so I didn't notice since I unwisely just built the module). Notes: svn path=/head/; revision=159207
* Since we turn off the interrupts, we don't need to disestablishWarner Losh2006-06-031-13/+0
| | | | | | | our ISR. Notes: svn path=/head/; revision=159206
* Move shutdown, and pci specific methods into pccbb_pci.c. Many moreWarner Losh2006-06-033-74/+67
| | | | | | | are needed still. Notes: svn path=/head/; revision=159197
* The interrupt routine is pci specific. Move it into pccbb_pci.c.Warner Losh2006-06-032-70/+71
| | | | Notes: svn path=/head/; revision=159196
* Fix a couple printf's to be properly terminated.Warner Losh2006-06-031-3/+3
| | | | | | | Use a better name for the cbb thread. Notes: svn path=/head/; revision=159195
* Succeed for writing bus value... nobody that calls must care :-(Warner Losh2006-06-031-1/+1
| | | | Notes: svn path=/head/; revision=159194
* Zero out the devices when they are deleted. We can access the pointer afterWarner Losh2006-06-021-1/+5
| | | | | | | the bus detaches which can lead to core dumps. This is quite rare. Notes: svn path=/head/; revision=159161
* Export the pribus, secbus and subbus as sysctls for informationWarner Losh2006-05-242-20/+31
| | | | | | | purposes only. Additional information may be exported in the future. Notes: svn path=/head/; revision=158893
* Suspend the children before we turn off card events in hardware. ThisWarner Losh2006-05-241-2/+4
| | | | | | | | | | | was done, I believe, to work around some cards having issues in the suspend case. I think that this helped my Sony VAIO TS505 work better when it had certain wireless cards in it and I did a apm -z. I've not tested suspend/resume on other laptops in a long time, so I hope this doesn't cause greif. Please let me know if it does. Notes: svn path=/head/; revision=158892
* Fix a race when detaching the cbb worker thread. There were a coupleWarner Losh2006-05-241-1/+7
| | | | | | | | | of cases where we didn't take out the lock before setting or clearing a bit. This apparently can lead to a race at kldunload time (at least on my Turion64 laptop, never saw it on my Sony Vaio). Notes: svn path=/head/; revision=158891
* Whitespace nitsWarner Losh2006-05-231-3/+3
| | | | Notes: svn path=/head/; revision=158865
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-162-2/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Add missing ~. We want all the INVALID bits to be 0... Let's see if thisWarner Losh2006-04-161-1/+1
| | | | | | | helps people with their interrupt storm problem on card eject. Notes: svn path=/head/; revision=157803
* On some laptops, under very high loads, the socket event register readWarner Losh2006-03-301-2/+13
| | | | | | | | | | | | | | | in the ISR doesn't read the actual socket event register, but instead reads garbage (usually 0xffffffff, but other times other things). This totally violates the PCI spec, but happens rarely enough that a workaround is in order. This adds one test when we have a real interrupt to service (which is very rare), and doesn't affect the usualy 'nothing to see here' case at all. Problem reported by many, but sam@ gave me this workaround after diagnosing the problem. Notes: svn path=/head/; revision=157281
* Add a mask of valid socket eventsWarner Losh2006-03-301-19/+20
| | | | | | | While I'm hear, fix define<sp> to be define<tab>. Notes: svn path=/head/; revision=157278
* For each of the voltages that a card might support, make sure that theWarner Losh2006-03-241-4/+4
| | | | | | | | | | | | | socket also supports the voltage. Some XV cards have appeared on the scene (or cards that report they support XV), and in older machines that have sockets that do not support XV, we were bogusly trying to power them at XV rather than at 3.3V. Now, power up the card at the lowest voltage supported by both the card and the socket. MFC After: 3 days Notes: svn path=/head/; revision=157092
* Detach the children before we delete them. This is a little cleanerWarner Losh2006-02-071-10/+18
| | | | | | | | | than just deleting them. Also add comments about why we do this. Given the current behavior of delete_child, I don't think this changes anything. It just feels cleaner. Notes: svn path=/head/; revision=155434
* Now that TUNABLE_ULONG is in the tree, and has been for a while, use it.Warner Losh2006-02-041-3/+3
| | | | | | | This also avoids typepunning. Notes: svn path=/head/; revision=155316
* Remove extra debugging that crept in with the integration from p4.Warner Losh2005-12-311-1/+1
| | | | Notes: svn path=/head/; revision=153945
* Simplify the opening of the resources for cardbus cards. Before we'dWarner Losh2005-12-291-102/+53
| | | | | | | | | | | | | | | try very hard to be perfect. However, these attempts broke down when there were large numbers of resources. We'd not be able to map them all. Instead, accept that we might pass more range to thse subbus than might be optimal be able to compute. However, there's little harm in this and it allows us to pass greater resources through. # it has been suggested that we allocate a fixed amount of resources # on attach and give it out upon request. This might not be a bad idea... Notes: svn path=/head/; revision=153860
* Ensure that we're aligned at leas tto the size of the resource being requested.Warner Losh2005-12-271-0/+21
| | | | | | | When cbb_debug is on, print the windows that we're mapping. Notes: svn path=/head/; revision=153757
* nitsWarner Losh2005-12-271-1/+1
| | | | Notes: svn path=/head/; revision=153756
* Mollify the whitespace policeWarner Losh2005-11-081-27/+27
| | | | Notes: svn path=/head/; revision=152193
* Shutdown a little better by commenting the shutdown code and acknowledgingWarner Losh2005-10-291-4/+9
| | | | | | | any interrupts after we turn off the interrupt mask. Notes: svn path=/head/; revision=151838
* Shut down the card bus bridge hardware on detach. Before we'd justWarner Losh2005-10-291-6/+14
| | | | | | | | | free the resoruces w/o actually turning off the interrupts. This lead to interrupt storms if you were to insert a card after kldunloading the driver. Notes: svn path=/head/; revision=151837
* Make sure we set bst and bsh in the softc.Warner Losh2005-10-191-0/+2
| | | | | | | | This gets us probing, but not attaching to, ISA cards. More work needed since the ISA attach routine is return ENXIO right now :-) Notes: svn path=/head/; revision=151457
* Merge in WIP from p4 for supporting ISA pccard bridges conforming toWarner Losh2005-10-141-17/+43
| | | | | | | | | | | | | | the ExCA spec, and close cousins: o Write an activate routine that works. o merge a couple of items from oldcard before they are lost o write a deactivate routine I suspect we're still a ways away from having this work, but maybe for 6.1/5.5? Notes: svn path=/head/; revision=151308
* MFP4: More removal of unused stuff.Warner Losh2005-10-082-2/+0
| | | | Notes: svn path=/head/; revision=151081
* MFP4: Changes to hopefully make the new power code work betterWarner Losh2005-10-081-3/+3
| | | | | | | | | | | | | | | | | o Rather than just try to turn off EXCA_INTR_RESET, set the entire register to 0. This is slightly faster, and a better hammer. o Move attempted clearing of the output enable (EXCA_PWRCTL_OE) back to after we turn off the power. Modify it to write 0 so that we don't get Bad Vcc messages on TI bridges (untested, but ru@ sent me a similar patch) while at the same time avoiding interrupt storms on Ricoh bridges (tested by me on my Sony). # Many of my observations of 'breakage' for this patch are due to some bug # in the load/unload of cbb.ko unlreated to this change. I'll be investigating # and fixing that bug in the fullness of time. Notes: svn path=/head/; revision=151080
* MFP4: We no longer use intr_handlers, so remove it.Warner Losh2005-10-082-4/+0
| | | | Notes: svn path=/head/; revision=151079
* MFP4: Note why we do the dance we do for waiting for the thread to die.Warner Losh2005-10-081-0/+8
| | | | Notes: svn path=/head/; revision=151078
* Fix bad compile. Pointy hat to: impWarner Losh2005-09-292-2/+2
| | | | Notes: svn path=/head/; revision=150730
* o Add a bunch of o2micro controller IDsWarner Losh2005-09-292-2/+13
| | | | | | | | o Add SMC34C90 to list as well, since I've found enough more data about it since my original research to know it is appropriate for this driver. Notes: svn path=/head/; revision=150728
* I added the device IDs to the header, but not to the table. Add themWarner Losh2005-09-291-0/+9
| | | | | | | | | to the table. MFC After: 3 days Notes: svn path=/head/; revision=150713
* 'PC Card' instead of other variantsWarner Losh2005-09-221-3/+3
| | | | Notes: svn path=/head/; revision=150460
* This appears to be good for some folks, but really bad for others.Warner Losh2005-09-121-1/+0
| | | | | | | Until we know why, back out 1.127. Notes: svn path=/head/; revision=150017
* Minor improvement for the suspend case for Ricoh based (and others)Warner Losh2005-09-081-0/+1
| | | | | | | CardBus bridges. Notes: svn path=/head/; revision=149892
* o The ricoh bridge needs us to turn off the function interrupts forWarner Losh2005-07-171-12/+22
| | | | | | | | | | | | | | | | | | | | 16-bit cards when we're powering them up. Other bridges may have similar issues, so we do this for all of them by setting the interrupt in the PCIC register 3 to be 0 (done always anyway) and turning on the bit in the bridge control register to route these interrupts via the ISA bus (or via the interrupt configured in the PCIC register 3). '0' means disable completely. There's a small chance this may interfere with the o2micro power hacks, but I'll wait for reports to come in from o2micro users. o Expand some of the comments about why we do certain things. # this gets rid of the interrupt storm warnings on my 505TS. I think # that we may need to do something similar on suspend, but I'm unsure # since I don't have a laptop that supports suspened/resume with a # ricoh chipset in it. Notes: svn path=/head/; revision=148105
* Rename a bit to make it clearer that it enables routing of the functionWarner Losh2005-07-172-2/+2
| | | | | | | interrupts to the ISA bus. Notes: svn path=/head/; revision=148102
* The CD interrupt should only be enabled after we've initialized theWarner Losh2005-07-171-10/+38
| | | | | | | | | | | | | | | | | card. Mask it while we're doing power things, as the PC Card standard suggests. Also, poll the POWER_CYCLE bit 10x a second as well as providing a timeout for power cycle interrupt to happen. The Ricoh '475 that I have doesn't seem to generate an interrupt for power at the present time, so the polling is necessary for reasons as yet unknown. This results in an interrupt storm warning that I'm still trying to quantify (the o2micro trick doesn't work to mitigate this storm). At the very least, this should help those users that lost pccards on boot with the prior rev of this code. My VAIO PCG-505TS is now happier, but more investigation is necessary. Notes: svn path=/head/; revision=148090
* s/_us//Warner Losh2005-07-151-1/+1
| | | | Notes: svn path=/head/; revision=148026
* Move to using tsleeps in the cardbus reset case as well. ThisWarner Losh2005-07-151-3/+7
| | | | | | | eliminates the last of the DELAYs in pccbb. Notes: svn path=/head/; revision=148025