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.
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).
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.
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@
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
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.
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.
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
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.
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.
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).
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.
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.
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.
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.
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.
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
<sys/proc.h> to <sys/systm.h>.
Correctly document the #includes needed in the manpage.
Add one now needed #include of <sys/systm.h>.
Remove the consequent 48 unused #includes of <sys/proc.h>.
- 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>
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.
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)
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".
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)