History log of /src/sys/dev/pci/pccbbvar.h |
Revision | | Date | Author | Comments |
1.41 |
| 20-Apr-2010 |
dyoung | Change sc_pil_intr_enable from an int to a bool. No functional change intended.
|
1.40 |
| 15-Mar-2010 |
dyoung | rbus is always #defined as 1, so unifdef -D rbus=1.
|
1.39 |
| 15-Dec-2009 |
snj | branches: 1.39.2; 1.39.4; Move to 2-clause license. Approved by HAYAKAWA Koichi (copyright holder).
|
1.38 |
| 23-Jul-2009 |
dyoung | Use kpause(9), cv_timedwait(9), and cv_signal(9) instead of tsleep(9) and wakeup(9).
Use mstohz(9).
XXX Protection against spurious wakeups is still needed, but this patch XXX makes the code no worse than before in this regard.
|
1.37 |
| 26-Jun-2008 |
drochner | delete more dead code, remove use of pcic_handle except of some local uses in pcmcia ressource management which is copied from ISA pcic, so use our softc as handle exported to generic pcmcia code and kill the ph_parent backpointer - this makes the code simpler and smaller
|
1.36 |
| 25-Jun-2008 |
drochner | Avoid the use of i82365var.h - we don't use any functions from there. Extract some data structures for ressource management into our private header instead. This allows to use a typed pointer instead of a generic one which saves a lot of typecasts. Also remove something marked as "dirty hack" which I admittedly don't understand, but it doesn't look useful...
|
1.35 |
| 25-Jun-2008 |
drochner | split device/softc for pccbb, the cardbus half of cardslot and cardbus (not yet pcmcia, there is a lot of md code involved)
|
1.34 |
| 27-May-2008 |
dyoung | branches: 1.34.2; Distinguish O2 Micro bridges from generic bridges. PCI Parity Error reporting seems to be broken on O2 Micro bridges, so do not activate it. Should fix kern/38698, reported by Andreas Gustafsson.
|
1.33 |
| 15-Jan-2008 |
christos | branches: 1.33.6; 1.33.8; 1.33.10; 1.33.12; Remove ricoh hack; FreeBSD does not seem to do it, and it was a remnant from the branch. Things should work properly now.
|
1.32 |
| 14-Jan-2008 |
dyoung | Use device_t, device_private().
|
1.31 |
| 16-Dec-2007 |
dyoung | Improve pci, cbb, cardslot, cardbus, and pcmcia to support detachment of this entire device tree:
pci0 at mainbus0 elansc0 at pci0 gpio0 at elansc0 cbb0 at pci0 cardslot0 at cbb0 cardbus0 at cardslot0 pcmcia0 at cardslot0 cbb1 at pci0 cardslot1 at cbb1 cardbus1 at cardslot1 rtw0 at cardbus1 pcmcia1 at cardslot1 sip0 at pci0 nsphyter0 at sip0 sip1 at pci0 nsphyter1 at sip1
Whew!
|
1.30 |
| 09-Dec-2007 |
jmcneill | branches: 1.30.2; Merge jmcneill-pm branch.
|
1.29 |
| 10-Aug-2007 |
dyoung | branches: 1.29.2; 1.29.8; 1.29.10; 1.29.12; Remove unused definitions CB_CHIPS_LAST and cb_chipset_name. Add a type code for the Texas Instruments PCI1420 PCI-CardBus bridge, CB_TI1420, which I will use in the near future.
|
1.28 |
| 04-Feb-2007 |
dyoung | branches: 1.28.6; 1.28.14; 1.28.18; sc_pwrcycle is shared between the interrupt handler and Cardbus event thread, so make it volatile.
|
1.27 |
| 21-Dec-2006 |
yamt | merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie). http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html - complete workqueue(9) and fix its ipl problem, which is reported to cause audio skipping. - fix netbt (at least compilation problems) for some ports. - fix PR/33218.
|
1.26 |
| 17-Jun-2006 |
jmcneill | branches: 1.26.4; 1.26.6; 1.26.8; 1.26.10; For Ricoh 5c47x class controllers, restore the "misc control" PCI config register on resume.
|
1.25 |
| 11-Dec-2005 |
christos | branches: 1.25.4; 1.25.8; 1.25.14; 1.25.16; merge ktrace-lwp.
|
1.24 |
| 04-Feb-2005 |
perry | branches: 1.24.6; de-__P
|
1.23 |
| 27-Jan-2005 |
jmcneill | Capture PCI configuration state on suspend and restore it on resume, from Kentaro A. Kurahone.
|
1.22 |
| 16-Jan-2005 |
mycroft | branches: 1.22.2; 1.22.4; Christos's crappy Libretto 100CT has an extremely long ramp for socket Vcc (violating the PC Card spec), so... use the "power cycle" socket event to determine when we've reached Vcc before proceeding, rather than using a fixed amount of time. This has the double advantage that it makes the card attach time even shorter on sane systems -- the minimum is now ~38ms on my i8500 rather than 222ms.
Probably a similar change should be made to pcic, but it was hard enough figuring out whether it would work with pccbb. The chip specs suck.
For now, I'm leaving in a couple of additional printf()s in the hope that I will get some interesting data from them.
|
1.21 |
| 22-Jul-2004 |
mycroft | If the bus number has not been initialized, do not attach a cardslot, and output a diagnostic: pccbbN: secondary bus number uninitialized; try PCIBIOS_BUS_FIXUP
|
1.20 |
| 10-Dec-2003 |
briggs | branches: 1.20.2; Power up the card without OE enabled to avoid letting SanDisks enter True IDE mode. Hinted at by Charles Hannum a while back. This lets my PCI-Cardbus adapter read SanDisk CF cards much more reliably.
Also bring in a few defines from FreeBSD for some more TI registers and such.
|
1.19 |
| 22-Mar-2003 |
nakayama | branches: 1.19.2; PCI-CardBus bridge support for sparc64: - add pccbb_attach_hook in pccbbattach for MD initializations. - omit arithmetics to bus_space_handle_t. - remove use of IST_LEVEL; not defined on sparc64 and unused.
|
1.18 |
| 01-Oct-2002 |
haya | Use LIST in sys/queue. Add some comments.
|
1.17 |
| 02-Nov-2001 |
haya | Add PCI power management control. If the power state of a bridge is not D0 at device attaching or resuming, set the bridge D0 mode.
|
1.16 |
| 06-Jul-2001 |
mcr | branches: 1.16.2; 1.16.6; split pccbb_intr_route() into seperate function.
|
1.15 |
| 20-Feb-2001 |
minoura | branches: 1.15.2; Re-initialize more registers after resuming from suspend. Some APM BIOSes do not restore them. Reviewd by haya.
|
1.14 |
| 28-Dec-2000 |
sommerfeld | Change pci_intr_map to get interrupt source information from a "struct pci_attach_args *" instead of from four separate parameters which in all cases were extracted from the same "struct pci_attach_args".
This both simplifies the driver api, and allows for alternate PCI interrupt mapping schemes, such as one using the tables described in the Intel Multiprocessor Spec which describe interrupt wirings for devices behind pci-pci bridges based on the device's location rather the bridge's location.
Tested on alpha and i386; welcome to 1.5Q
|
1.13 |
| 08-Jun-2000 |
haya | Change IPL when bridge's interrupt handler calls child device's interrupt handler (This solution is not very good).
|
1.12 |
| 23-Mar-2000 |
thorpej | branches: 1.12.2; New callout mechanism with two major improvements over the old timeout()/untimeout() API: - Clients supply callout handle storage, thus eliminating problems of resource allocation. - Insertion and removal of callouts is constant time, important as this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
|
1.11 |
| 22-Mar-2000 |
haya | 1. Do not apply 5 V on a CardBus card. 2. Do not avoid ISA hole when a device requires more than 256-byte io space. 3. Remove sending CardBus bridge's function number to cardbus stack. This number is not needed for anyone.
|
1.10 |
| 15-Mar-2000 |
haya | Remove ancient code.
|
1.9 |
| 12-Mar-2000 |
mycroft | Revert the previous change.
|
1.8 |
| 12-Mar-2000 |
thorpej | Add missing sc_pil_intr_enable member to pccbb_softc.
XXX Double check this, please. The code appears to only use it as a boolean, but...
|
1.7 |
| 01-Mar-2000 |
thorpej | Simplify the winlist code.
|
1.6 |
| 05-Feb-2000 |
chopps | indent this file
|
1.5 |
| 26-Jan-2000 |
haya | Pccbb manages interrupt handlers by itself for its child device.
|
1.4 |
| 01-Nov-1999 |
haya | branches: 1.4.4; Maintainance the name of Ricoh PCI-CardBus bridges.
|
1.3 |
| 19-Oct-1999 |
haya | branches: 1.3.2; Disable legacy io port before the bridge is probed as a pcic on isa. Comments ware changed to comply the KNF. Add PCCBB_PCMCIA_16BITONLY to support TI PCI103X series.
|
1.2 |
| 15-Oct-1999 |
haya | branches: 1.2.2; add NetBSD ID tag.
|
1.1 |
| 15-Oct-1999 |
haya | This is the first check-in of CardBus driver. CardBus driver contains CardBus bus stub, YENTA PCI-CardBus bridge (cbb), 3Com 3C575TX driver (ex) and Intel fxp driver.
TODO: o Conform to the KNF more strictly. o Be unified with pcmcia code as much as possible. o Add more drivers for CardBus card, such as APA-1480 or USB card.
The affected files are listed below.
sys/arch/i386/conf/files.i386 sys/arch/macppc/conf/files.macppc sys/conf/files sys/dev/ic/elinkxl.c sys/dev/ic/elinkxlvar.h sys/dev/ic/i82365.c sys/dev/ic/i82365var.h sys/dev/isa/i82365_isasubr.c sys/dev/pci/files.pci sys/dev/pcmcia/pcmcia.c sys/dev/pcmcia/pcmciachip.h
The added files are listed below.
sys/arch/i386/conf/CARDBUS sys/arch/i386/include/rbus_machdep.h sys/arch/i386/i386/rbus_machdep.c sys/arch/macppc/include/rbus_machdep.h sys/arch/macppc/macppc/rbus_machdep.c sys/dev/cardbus/if_ex_cardbus.c sys/dev/cardbus/Makefile.cardbusdevs sys/dev/cardbus/cardbus.c sys/dev/cardbus/cardbus_map.c sys/dev/cardbus/cardbusdevs sys/dev/cardbus/cardbusdevs.h sys/dev/cardbus/cardbusdevs_data.h sys/dev/cardbus/cardbusvar.h sys/dev/cardbus/cardslot.c sys/dev/cardbus/cardslotvar.h sys/dev/cardbus/devlist2h.awk sys/dev/cardbus/files.cardbus sys/dev/cardbus/if_fxp_cardbus.c sys/dev/cardbus/pccardcis.h sys/dev/cardbus/rbus.c sys/dev/cardbus/rbus.h sys/dev/pci/pccbb.c sys/dev/pci/pccbbreg.h sys/dev/pci/pccbbvar.h
|
1.2.2.4 |
| 12-Mar-2001 |
bouyer | Sync with HEAD.
|
1.2.2.3 |
| 05-Jan-2001 |
bouyer | Sync with HEAD
|
1.2.2.2 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code.
|
1.2.2.1 |
| 20-Oct-1999 |
thorpej | Sync w/ trunk.
|
1.3.2.2 |
| 15-Nov-1999 |
fvdl | Sync with -current
|
1.3.2.1 |
| 19-Oct-1999 |
fvdl | file pccbbvar.h was added on branch fvdl-softdep on 1999-11-15 00:41:06 +0000
|
1.4.4.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.12.2.1 |
| 22-Jun-2000 |
minoura | Sync w/ netbsd-1-5-base.
|
1.15.2.3 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.15.2.2 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.15.2.1 |
| 24-Aug-2001 |
nathanw | Catch up with -current.
|
1.16.6.1 |
| 12-Nov-2001 |
thorpej | Sync the thorpej-mips-cache branch with -current.
|
1.16.2.2 |
| 10-Oct-2002 |
jdolecek | sync kqueue with -current; this includes merge of gehenna-devsw branch, merge of i386 MP branch, and part of autoconf rototil work
|
1.16.2.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.19.2.3 |
| 04-Feb-2005 |
skrll | Sync with HEAD.
|
1.19.2.2 |
| 17-Jan-2005 |
skrll | Sync with HEAD.
|
1.19.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.20.2.1 |
| 23-Jul-2004 |
he | Pull up revision 1.21 (requested by mycroft in ticket #692): If the bus number has not been initialized, do not attach a cardslot, and instead output a diagnostic pointing the administrator towards the PCIBIOS_BUS_FIXUP option.
|
1.22.4.1 |
| 12-Feb-2005 |
yamt | sync with head.
|
1.22.2.2 |
| 29-Apr-2005 |
kent | sync with -current
|
1.22.2.1 |
| 16-Jan-2005 |
kent | file pccbbvar.h was added on branch kent-audio2 on 2005-04-29 11:29:07 +0000
|
1.24.6.5 |
| 21-Jan-2008 |
yamt | sync with head
|
1.24.6.4 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.24.6.3 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.24.6.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.24.6.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.25.16.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.25.14.1 |
| 19-Jun-2006 |
chap | Sync with head.
|
1.25.8.1 |
| 26-Jun-2006 |
yamt | sync with head.
|
1.25.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.26.10.1 |
| 03-Sep-2007 |
wrstuden | Sync w/ NetBSD-4-RC_1
|
1.26.8.1 |
| 30-Jul-2007 |
liamjfoy | Pull up following revision(s) (requested by dyoung in ticket #739): sys/dev/pci/pccbb.c: revision 1.140 sys/dev/pci/pccbb.c: revision 1.141 sys/dev/pci/pccbb.c: revision 1.142 sys/dev/pci/pccbb.c: revision 1.143 sys/dev/pci/pccbb.c: revision 1.144 sys/dev/pci/pccbbvar.h: revision 1.28 sys/dev/pci/pcireg.h: revision 1.53 sys/dev/pci/pccbb.c: revision 1.139 Name magic numbers PCI_PMCSR_PME_EN and PCI_PMCSR.
Fix grammar in comment. From Patrick Welche.
Use the right subroutine name for the debug message.
Convert the rather long and backslash-ridden DELAY_MS macro to a much shorter static subroutine, delay_ms().
Cosmetic: KNF indentation, curly braces, and argument declarations.
sc_pwrcycle is shared between the interrupt handler and Cardbus event thread, so make it volatile.
Fix a bug in Cardbus power activation.
Most Cardbus bridges supported by pccbb(4) fire a power-cycle interrupt when the power state of a cardslot changes from 'off' to 'on'. TI bridges fire a power-cycle interrupt on both on->off and off->on changes.
When pccbb_power() powered-down a cardslot, it did not wait around for the power-cycle interrupt. When pccbb_power() powered-up a cardslot, it did wait for the interrupt. If a pccbb_power(UP) followed a pccbb_power(DOWN) very closely, pccbb_power() used to interpret the power-cycle interrupt for the up->down transition as "power-up complete," read the power-state bit and, finding that power had NOT been activated, complain, "cbb0: power on failed?" Then pccbb_power() exited before power-activation was complete, falsely indicating that the power-activation *was* complete. After that, a driver attach/enable routine would blithely configure a card that was not fully powered-up. An operator who ran a command such as 'ifconfig rtw0 down up' or 'ifconfig ath0 down up' would read 'cbb0: power on failed?' in the system log, and their NIC would misbehave.
This excerpt from a comment in the source should suffice to explain how I fixed the bug,
/* * Wait as long as 200ms for a power-cycle interrupt. If * interrupts are enabled, but the socket has already * changed to the desired status, keep waiting for the * interrupt. "Consuming" the interrupt in this way keeps * the interrupt from prematurely waking some subsequent * pccbb_power call.
And this explains why this patch will work for Ricoh bridges that do not fire an interrupt on the on->off transition:
* XXX Not every bridge interrupts on the ->OFF transition. * XXX That's ok, we will time-out after 200ms. * * XXX The power cycle event will never happen when attaching * XXX a 16-bit card. That's ok, we will time-out after * XXX 200ms. */
M. Warner Losh and Charles M. Hannum provided valuable input on this patch.
|
1.26.6.1 |
| 02-Nov-2006 |
yamt | use splraiseipl.
|
1.26.4.2 |
| 09-Feb-2007 |
ad | Sync with HEAD.
|
1.26.4.1 |
| 12-Jan-2007 |
ad | Sync with head.
|
1.28.18.2 |
| 06-Nov-2007 |
joerg | Refactor PNP API: - Make suspend/resume directly a device functionality. It consists of three layers (class logic, device logic, bus logic), all of them being optional. This replaces D0/D3 transitions. - device_is_active returns true if the device was not disabled and was not suspended (even partially), device_is_enabled returns true if the device was enabled. - Change pnp_global_transition into pnp_system_suspend and pnp_system_resume. Before running any suspend/resume handlers, check that all currently attached devices support power management and bail out otherwise. The latter is not done for the shutdown/panic case. - Make the former bus-specific generic network handlers a class handler. - Make PNP message like volume up/down/toogle PNP events. Each device can register what events they are interested in and whether the handler should be global or not. - Introduce device_active API for devices to mark themselve in use from either the system or the device. Use this to implement the idle handling for audio and input devices. This is intended to replace most ad-hoc watchdogs as well. - Fix somes situations in which audio resume would lose mixer settings. - Make USB host controllers better deal with suspend in the light of shared interrupts. - Flush filesystem cache on suspend. - Flush disk caches on suspend. Put ATA disks into standby on suspend as well. - Adopt drivers to use the new PNP API. - Fix a critical bug in the generic cardbus layer that made D0->D3 break. - Fix ral(4) to set if_stop. - Convert cbb(4) to the new PNP API. - Apply the PCI Express SCI fix on resume again.
|
1.28.18.1 |
| 16-Aug-2007 |
jmcneill | Sync with HEAD.
|
1.28.14.1 |
| 15-Aug-2007 |
skrll | Sync with HEAD.
|
1.28.6.1 |
| 20-Aug-2007 |
ad | Sync with HEAD.
|
1.29.12.1 |
| 11-Dec-2007 |
yamt | sync with head.
|
1.29.10.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.29.8.1 |
| 18-Feb-2008 |
mjf | Sync with HEAD.
|
1.29.2.2 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.29.2.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.30.2.2 |
| 19-Jan-2008 |
bouyer | Sync with HEAD
|
1.30.2.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.33.12.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.33.12.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.33.10.4 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.33.10.3 |
| 11-Mar-2010 |
yamt | sync with head
|
1.33.10.2 |
| 19-Aug-2009 |
yamt | sync with head.
|
1.33.10.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.33.8.1 |
| 04-Jun-2008 |
yamt | sync with head
|
1.33.6.2 |
| 29-Jun-2008 |
mjf | Sync with HEAD.
|
1.33.6.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.34.2.1 |
| 27-Jun-2008 |
simonb | Sync with head.
|
1.39.4.1 |
| 30-May-2010 |
rmind | sync with head
|
1.39.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|