These drivers were cloned from the ed and ep drivers back in 1994
when PCMCIA cards were a very new thing and we had no other support
for such devices. They treated the PCIC (the chip which controls the
PCCARD slot) as part of their device and generally hacked their way
to success. They have significantly bit-rotted relative to their
ancestor drivers (ed & ep) and they were a dead-end on the evolution
path to proper PCCARD support in FreeBSD.
They have been terminally broken since August 18 where mdodd forgot
them and nobody seems to have missed them enough to fix them since.
Warner Losh [Fri, 10 Dec 1999 08:19:19 +0000 (08:19 +0000)]
o Make pccard work at all by including card.h
o fix return type of sio_pccard_detach
o don't free softc in deatch, since that is done by newbus
o disconnect interrupt we used to have. Add cookie to com so that we can
tear down the interrupt on unload
o Set gone earlier, but likely doesn't matter
This makes sio pccards work again. Cards that are active when ejects may
not work (but they might, softc goes away quickly).
These changes are unreviewed by bde. I'll make any style changes he wants.
Warner Losh [Fri, 10 Dec 1999 07:22:53 +0000 (07:22 +0000)]
Fix pccard ed driver, I think.
o Expose ed_stop and call it early to shutdown the hardware.
o When releasing the interrupt, pass the cookie for the irq, not
a pointer to the cookie (this is the base problem).
o Release other resources used, just like the ep driver
Warner Losh [Fri, 10 Dec 1999 07:02:41 +0000 (07:02 +0000)]
Move the turning on of the interrupts for the card at the bridge from
the activate method to the setup_intr, and turn it off to
teardown_intr.
This makes the ed driver not enter its interrupt routine during the
probe. Apparently, an interrupt happens when you disable the
interrupts. There are other problems with ed still.
Kazutaka YOKOTA [Fri, 10 Dec 1999 04:31:33 +0000 (04:31 +0000)]
Add support new keys: lshifta, rshifta, lctrla, rctrla, lalta, and
ralta. These keys combine shift/ctrl/alt function and the AltLock
function. When these keys pressed together with another key, they act
just like the ordinary shift/ctrl/alt keys. When these keys are
pressed and released alone, Alt lock state is toggled.
Kazutaka YOKOTA [Fri, 10 Dec 1999 04:30:58 +0000 (04:30 +0000)]
Add "panic key" function to syscons. When this key is defined in a
keymap and pressed, the system panic will be forced.
This feature must be specifically enabled by a new sysctl variable:
machdep.enable_panic_key. Its default value is 0. The panic key
won't do anything unless this variable is set to non-zero.
To use the panic key, add a keyword 'panic' to a key in your
keymap file. The following example assigns the panic function
to SysReq (Alt-PrintScreen) key (keycode 84).
083 del '.' '.' '.' '.' '.' boot boot N
084 panic nop nop nop panic nop nop nop O
085 nop nop nop nop nop nop nop nop O
Added support for file flags, mostly merged from the NetBSD version.
The way is now open to schg and sappnd key files and directories in
our tree. There are recommendations in bin/15229.
Archie Cobbs [Thu, 9 Dec 1999 19:38:20 +0000 (19:38 +0000)]
Move source files common to all platforms from <arch>/conf/files.<arch>
to conf/files. If/when these files are optimized for each platform,
they can be moved back.
John Polstra [Thu, 9 Dec 1999 17:09:37 +0000 (17:09 +0000)]
Fix a route table leak in rtalloc() and rtalloc_ign(). It is
possible for ro->ro_rt to be non-NULL even though the RTF_UP flag
is cleared. (Example: a routing daemon or the "route" command
deletes a cloned route in active use by a TCP connection.) In that
case, the code was clobbering a reference to the routing table
entry without decrementing the entry's reference count.
The splnet() call probably isn't needed, but I haven't been able
to prove that yet. It isn't significant from a performance standpoint
since it is executed very rarely.
Reviewed by: wollman and others in the freebsd-current mailing list
Ollivier Robert [Thu, 9 Dec 1999 13:17:01 +0000 (13:17 +0000)]
Commit a fix several warnings on alpha for sysctlbyname arguments. It could
have resulted in stack corruption. A patch has been sent to the ntp author
for inclusion in next version.
Ollivier Robert [Thu, 9 Dec 1999 13:13:26 +0000 (13:13 +0000)]
Please all welcome the long-awaited upgrade from our ancient xntpd 3.4f
to a brand new and shiny ntpd 4.0.98f.
I got tired of waiting for 4.1.0 and there is the feature freeze deadline
so here it is. This is the contrib/ part of the upgrade. The Makefile glue
will be added very soon in usr.sbin.
It builds and runs on both i386 and alpha (Thanks Peter!).
The bad news is that manpages no longer exist, everything is in HTML. I'll
commit the text version of each HTML file in /usr/share/doc/ntp soon to have
at least the help files w/o needing to get the entire contrib/ntp tree.
I'll commit FREEBSD-Xlist as soon as I can skip over $FreeBSD$ checks...
o Add usr/lib/compat/aout to the temp world. This is needed by release.
o If you can't beat them, join them: use symlinks to populate the obj
tree. This avoids using mtree.
Sheldon Hearn [Thu, 9 Dec 1999 07:58:28 +0000 (07:58 +0000)]
Remove discussion of %C in the BUGS section. The limitations on valid
centuries are much more serious than those mentioned and this is not the
place to discuss the limitations of time_t.
Warner Losh [Thu, 9 Dec 1999 02:42:42 +0000 (02:42 +0000)]
Merge _isa and _isasubr since only one function remained in _isasubr
Saticize _isa.c
Kill compile warnings for _isa.c
Remove obsolete comment from i82365.c
Mike Pritchard [Wed, 8 Dec 1999 21:50:11 +0000 (21:50 +0000)]
Update mdoc(7) and mdoc.samples(7) to list the preferred order
of manual page sections. Make the two man pages consistent
with each other in the headers they list and they order they list
them in.
Note: this is the preferred ordering. All new man pages/additions
to man pages should try and follow this. Existing man pages
should be left alone, unless you are making major changes in
the man page and re-ordering of the sections is only a
minor part of the change.
Oops! bypassing Makefile.inc0 without adding a `world' target is not
a good idea. Adding `world' to Makefile is save, because all hairy
bits are in Makefile.inc1 anyway.
[ repository copy of sys/pci/pci_ioctl.h to sys/sys/pciio.h happened in the
background ]
Rename sys/pci/pci_ioctl.h to sys/sys/pciio.h to make it easier for
userland programs to use this interface. Reformat the file, and add a
BSD-style copyright to it.
Add a new man page for pci(4). The PCIOCGETCONF, PCIOCREAD, and PCIOCWRITE
ioctls are documented, but the PCIOCATTACHED ioctl is not documented
because it is not implemented.
Change includes of <pci/pci_ioctl.h> to <sys/pciio.h> or remove them
altogether. In many cases, pci_ioctl.h was unused.
Sheldon Hearn [Wed, 8 Dec 1999 15:49:10 +0000 (15:49 +0000)]
Prevent digit-gobbling for all but %l and %e, which can't be fixed.
Discuss in the BUGS section of the manpage, problems involved with
the use of %C, %e, %l, %p, %U and %W.
Roger Hardiman [Wed, 8 Dec 1999 14:01:30 +0000 (14:01 +0000)]
Backout changes made in 1.102 following feedback from NTSC users
There seems to be some problem with the new rgb_vbi_prog() RISC
code not working for NTSC users.
This means that European teletext users will need to start
Alevt (or open /dev/vbi0) BEFORE starting FXTV (or opening /dev/bktr0)
if they want to capture VBI data for Teletext/Videotext or WaveTop
Reported by: Chris Csanady <cc@137.org>, Kenneth D. Merry <ken@kdm.org>,
Randy Bush <randy@psg.com>
Restore the upgrade path from -stable to -current and prepare for
non-root cross-building.
o Makefile.inc0 is not used anymore.
o The legacy aout build has been removed.
o Selectively build tools *before* building includes/libraries.
o Avoid using mtree to populate the obj tree.
install(1) lookalike that can be used during a build. Any options
are ignored and the remaining is passed on to cp(1). This allows
a build to be run as non-root without forcing any user/group
setting and also prevents setting any file flags.
Mark Newton [Wed, 8 Dec 1999 10:51:17 +0000 (10:51 +0000)]
SVR4 emulator source files now take their compilation options from
opt_global.h and opt_svr4.h, instead of from the command line. This
brings them in-line with most of the rest of the kernel.
svr4_ioctl.c has also failed to compile with debugging for a while
now; fixed by adding systm.h and socketvar.
Some svr4 source files are automatically generated from syscalls.master;
these have been committed as consequential changes, otherwise everyone
will have to "make svr4_sysent.c".
Changes:
sys/svr4/svr4.h include opt_global.h and opt_svr4.h
sys/svr4/svr4_ioctl.c include svr4.h, sys/systm.h and sys/socketvar.h
sys/svr4/svr4_ipc.c include svr4.h
sys/svr4/svr4_resource.c include svr4.h
sys/svr4/svr4_socket.c include svr4.h
sys/svr4/svr4_ttold.c include svr4.h
sys/svr4/syscalls.master include svr4.h
sys/svr4/svr4_syscallnames.c dependent on syscalls.master
sys/svr4/svr4_sysent.c dependent on syscalls.master
sys/svr4/svr4_syscall.h dependent on syscalls.master
sys/svr4/svr4_proto.h dependent on syscalls.master
sys/modules/svr4/Makefile create opt_global.h and opt_svr4.h
Warner Losh [Wed, 8 Dec 1999 07:55:20 +0000 (07:55 +0000)]
Switch to using suspend/resume methods rather than the APM hooks.
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)
Warner Losh [Wed, 8 Dec 1999 07:47:41 +0000 (07:47 +0000)]
If last state was supended, remove the card. This is a kludge, there
is a race here that the old code didn't deal with, and I'm not
completely sure this is the right way to solve it, but it works here.
Should get rid of the dreaded "No free configuration for card" message.
When erroring out that there is not enough space to write the corefile,
tell the user how much space is avaible for writing the corefile, and how
much space we wanted.
Bill Paul [Wed, 8 Dec 1999 05:34:17 +0000 (05:34 +0000)]
Fix alloc_driver() so that calls devclass_get_device() with slt->slotnum
as the unit argument instead of 0. disable_slot() calls
devclass_get_device() correctly, however because alloc_driver() does
it wrong, disable_slot() is unable to locate the child devices
attached to the pccard bus and thus fails to call device_delete_child()
on them. The end result is that when a card is removed, its detach
routine is never called, and re-insertion always fails.
With this fix (and the previous one to if_wi.c), I can now insert,
remove and re-insert my WaveLAN/IEEE card and things behave correctly.
kldunloading the if_wi.ko module also seems to work properly now.
Revamp the devstat priority system. All disks now have the same priority.
The same goes for CD drivers and tape drivers. In systems with mixed IDE
and SCSI, devices in the same priority class will be sorted in attach
order.
Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of
drivers have been modified to use that priority.
This includes the necessary changes to all drivers, except the ATA drivers.
Soren will modify those separately.
This does not include and does not require any change in the devstat
version number, since no known userland applications use the priority
enumerations.
Brian Feldman [Wed, 8 Dec 1999 02:44:46 +0000 (02:44 +0000)]
I've been Brucified! I did evil things with typedefs, but I'll do it
the correct (but less aesthetic) way, now. New lesson: correctness
and aestheticity may be mutually exclusive at times.
Warner Losh [Wed, 8 Dec 1999 01:42:44 +0000 (01:42 +0000)]
o Implement IRQ activation. We do this in bus_{setup,teardown}_intr,
per discussions on -arch. This is different than -current's pccard
code, but shouldn't have any real difference.
o More code cleanup.
Next step: convert bus_space_* mapping stuff to newbus.
Bill Paul [Tue, 7 Dec 1999 20:14:42 +0000 (20:14 +0000)]
Spruce up the Sundance ST201 driver:
- Convert to using TX descritor polling similar to the xl driver (the
ST201 is a clone of the 3c90xB chipset and offers the same transmit
polling scheme). This should reduce TX overhad a little.
- Make sure to reset PHY when switching mode, as in the starfire driver.
- Fix instances of free() that should be contigfree().
Warner Losh [Tue, 7 Dec 1999 19:23:56 +0000 (19:23 +0000)]
Bump CIS_MAXSTR from 30 to 254. pccard appears to define the entire
section we take them from to be up to 255 bytes long, so that's the
max size for the string. They can't all be this big, but I don't have
a better number and better to be a little long than a little short.
Also only consume len characters of the cis buffer so we don't run off
the end into the next buffer and get garbage. This second patch
shouldn't impact anything, but I'll hold off back porting this to
-stable until I get more reports on the stability before/after this
fix.
Bill Paul [Tue, 7 Dec 1999 19:18:41 +0000 (19:18 +0000)]
Tweak the DC_REDUCED_MII_POLL code in dc_mii_tick() for the DC_IS_INTEL()
case. The idea is to reduce how often we call mii_tick(), however currently
it may not be called often enough, which prevents autonegotiation from
being driven correctly.
This should improve the chances of successfully autonegotiating media
settings on non-MII 21143 NICs. (Still waiting for confirmation from
some testers, but the code is clearly wrong in any case.)