Marcel Moolenaar [Sun, 30 Jan 2005 09:27:49 +0000 (09:27 +0000)]
o Enable puc(4) and uart(4).
o Disable ofw_console(4), sab(4) and zs(4).
sab(4) and zs(4) are disabled because the hardware controlled by
them is handled by uart(4)+puc(4) and the latter combination is
functionally complete and up to date.
ofw_console(4) is disabled because it doesn't claim the device it
controls (through OFW) and thus interferes with puc(4)+uart(4),
which has sufficient knowledge to extract the necessary information
from OFW to setup the console. Put differently, ofw_console(4) is
not a proper device driver and can only do harm. Its functionality
is completely handled by uart(4).
This commit makes uart(4) the default driver for serial ports.
Marcel Moolenaar [Sun, 30 Jan 2005 09:00:50 +0000 (09:00 +0000)]
o Fix the various interrupt related problems caused by reverse
engineering the pending interrupt sources from the current
state of the controller. For channel A we can always read the
interrupt pending register (RR3). For channel B we can read
the interrupt vector register (RR2) because it contains the
modified vector and thus includes the interrupt source.
Since we currently need puc(4) for the Z8530, we know that
the interrupt handler for both channels will be called and
thus that RR3 will always be read at least once, even if ch A
has no pending interrupt.
NOTE: The modified interrupt vector has no value that represent
a lack of pending interrupt for channel B. That is, the
value read when no interrupts are pending is the same as the
value for the special receive condition. Fortunately, we don't
actually have to depend on that interrupt source. This does
mean that we need to properly handle the overflow condition,
when we read received character from the chip.
o The DSR signal is represented by the SYNC bit in the external
status register (RR0). We now properly track DSR.
o It's save to enable the external/status interrupt source. We
now get interrupts when line signals (DSR, DCD or CTS) change.
Problems fixes:
o interrupt storms.
o blocked open(2).
o lack of (hardware) flow control.
o unable to report DSR.
Maxim Sobolev [Sun, 30 Jan 2005 08:12:37 +0000 (08:12 +0000)]
Boot away another stackgap (one of the lest ones in linuxlator/i386) by
providing special version of CDIOCREADSUBCHANNEL ioctl(), which assumes that
result has to be placed into kernel space not user space. In the long run
more generic solution has to be designed WRT emulating various ioctl()s
that operate on userspace buffers, but right now there is only one such
ioctl() is emulated, so that it makes little sense.
Maxim Sobolev [Sun, 30 Jan 2005 07:20:36 +0000 (07:20 +0000)]
Extend kern_sendit() to take another enum uio_seg argument, which specifies
where the buffer to send lies and use it to eliminate yet another stackgap
in linuxlator.
Maxim Sobolev [Sat, 29 Jan 2005 23:47:36 +0000 (23:47 +0000)]
Fix small non-conformance introduced in the previous commit: execve() is
expected to return ENAMETOOLONG, not E2BIG if first argument doesn't
fit into {PATH_MAX} bytes.
Maxim Sobolev [Sat, 29 Jan 2005 23:12:00 +0000 (23:12 +0000)]
o Split out kernel part of execve(2) syscall into two parts: one that
copies arguments into the kernel space and one that operates
completely in the kernel space;
o use kernel-only version of execve(2) to kill another stackgap in
linuxlator/i386.
Warner Losh [Sat, 29 Jan 2005 04:20:01 +0000 (04:20 +0000)]
The Olicom OC2220 has an ID of 0x101, not 0x2220 as I previously
thought. I'm unsure why I thought this was the case, but it
definitely isn't for this card. If another card with the other ID
makes an appearance, then we'll add a second entry for it.
# With this change my Olicom OC2220 is now working again, since I make
# this commit with that device. :-)
Jeff Roberson [Fri, 28 Jan 2005 17:48:58 +0000 (17:48 +0000)]
- Don't drop the wref on the bufobj until after bufdone() has completed.
Without this, threads waiting in bufobj_wwait() may wakeup prior to
bufdone() completing.
Ruslan Ermilov [Fri, 28 Jan 2005 17:01:54 +0000 (17:01 +0000)]
Clean up makefile.
- Remove all:. It's redundant, and ${LIB} in it is just a bug.
- Remove .ORDER:. *.mgc files can safely be built in parallel.
- Remove PITA. The mkmagic tool is smart to put the binary file
into the current directory (${.OBJDIR}) even if the source file
lives somewhere else, which is just what we need.
Warner Losh [Fri, 28 Jan 2005 06:35:39 +0000 (06:35 +0000)]
For the PC Card implementation of the CS8920M that's in my IBM
EtherJet, the interrupt is selected in the eeprom based on the layout
of the PC Card board. Since this is encoded into the EEPROM, and has
no relationship to the IRQ that the pccard bridge routes the PC Card's
interrupt pin to.
As such, stop writing to that register. This gets my EtherJet working.
# The eeprom reading code appears to be totally wrong for my EtherJet
# card. This causes the card to bogusly detect the media options
# available.
Scott Long [Fri, 28 Jan 2005 05:02:13 +0000 (05:02 +0000)]
Lock the IPS driver and bring it out from under Giant. Also do some
significant clean up and optimizations:
- don't call bioq_disksort() on every command, the hardware will do that for
us.
- remove all of the complicated bio deferral code. bio's that can't be
serviced immediately can just wait on the bioq.
- Only reserve one command object for doing control commands to the card.
This simplifies a lot of code and significantly reduces the size of the
command struct.
- Allocate commands out of a slab instead of embedding them into the softc.
- Call the command action method directly instead of having ips_get_free_cmd()
call it indirectly.
Marcel Moolenaar [Fri, 28 Jan 2005 02:58:32 +0000 (02:58 +0000)]
Wrap calls to memcpy(3) in a function called block_copy(). This way,
and as long as we're not compiling with IPA, gcc(1) won't optimize
the call away. The whole purpose of using memcpy(3) is to avoid
misaligned loads and stores when we need to read or write the value
in the unaligned memory location. But if gcc(1) optimizes the call
to memcpy(3) away, it will typically introduce misaligned loads and
stores. In this context that's not a good idea.
Warner Losh [Fri, 28 Jan 2005 00:28:22 +0000 (00:28 +0000)]
error = is needed before ether_ioctl() so that unsupported/unknown
IOCLTs are properly handled. This gets the cs driver properly
reporting things via ifconfig.
Marcel Moolenaar [Thu, 27 Jan 2005 23:15:58 +0000 (23:15 +0000)]
Skip the register based postinc stores here and don't count them
in the number of tests. This way we avoid skipped tests for non-
existent memory access combinations. The number of tests dropped
from 60 to 48.
Marcel Moolenaar [Thu, 27 Jan 2005 23:11:55 +0000 (23:11 +0000)]
Make the local variables global so that the compiler cannot assume
too much about them. This prevents certain peephole optimizations
at -O that invalidate the tests.
Marcel Moolenaar [Thu, 27 Jan 2005 22:46:15 +0000 (22:46 +0000)]
Fix the unaligned store with post increment test: The misaligned pointer
stopped pointing to the value the moment we wrote it due to the post
increment. So, grab the value for comparison out of the data structure
directly.
Doug Ambrisko [Thu, 27 Jan 2005 16:40:12 +0000 (16:40 +0000)]
Change the ifr_media operation to only get its value and only set
its value once per ifconfig run. Use Sam's new callback
operation to set it when everything is done.
The purpose for this is that if you did something like
ifconfig bge0 media 100baseTX mediaopt full-duplex
multiple times it would end up causing the PHY to re-sync
since it would send the IOCTLs:
ifconfig bge0 media 100baseTX -mediaopt full-duplex
ifconfig bge0 media 100baseTX mediaopt full-duplex
This would cause the PHY to be updated twice even though
there really wasn't any change since the check in
sys/net/if_media.c would always fail.
Caveat is that this doesn't fix the case of:
ifconfig bge0 media autoselect
etc. since in sys/net/if_media.c it forces an autoselect to go through
the entire process in ifmedia_ioctl :-( :
/*
* If no change, we're done.
* XXX Automedia may invole software intervention.
* Keep going in case the the connected media changed.
* Similarly, if best match changed (kernel debugger?).
*/
if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
(newmedia == ifm->ifm_media) &&
(match == ifm->ifm_cur))
return 0;
Xin LI [Thu, 27 Jan 2005 14:44:39 +0000 (14:44 +0000)]
WARNS?=6 cleanup for [gs]et[fp]mac:
- Constify structure members that should not be changed
during process.
- Apply static where needed
- signed/unsigned madness
- Bump WARNS?= levels from 2 to 6
(this is a diff reduction for a subsequent commit against these
Makefile's)
Brian Somers [Thu, 27 Jan 2005 14:09:33 +0000 (14:09 +0000)]
Add a radius_Flush() function that waits for the response (or timeout) to
any pending RADIUS transaction. Use this before sending RAD_STOP RADIUS
messages so that we definitely ``stop'' the session.
It was discovered that sometimes when the link timed out, we got lucky
enough to have an un-ACK'd RADIUS accounting transaction in progress,
resulting in the RAD_STOP message failing to send.
Original report found on: A russion news group
Text translated by: glebius
Tested by: Alexey Popov llp at iteranet dot com
MFC after: 7 days
Peter Edwards [Thu, 27 Jan 2005 13:50:27 +0000 (13:50 +0000)]
Make NTFS at least minimally usable after bufobj and GEOM fallout.
mmap() on NTFS files was hosed, returning pages offset from the
start of the disk rather than the start of the file. (ie, "cp" of
a 1-block file would get you a copy of the boot sector, not the
data in the file.) The solution isn't ideal, but gives a functioning
filesystem.
Cached vnode lookup was also broken, resulting in vnode haemorrhage.
A lookup on the same file twice would give you two vnodes, and the
resulting cached pages.
Just recently, mmap() was broken due to a lack of a call to
vnode_create_vobject() in ntfs_open().
Marcel Moolenaar [Thu, 27 Jan 2005 06:50:05 +0000 (06:50 +0000)]
Add tests for post increment. This bumps the number of tests up to
60. The postinc store tests currently fail (value mismatch). Hence
the score as of this commit is 48 out of 60. Either the kernel or
the tests need to be fixed.
Marcel Moolenaar [Thu, 27 Jan 2005 06:01:44 +0000 (06:01 +0000)]
Fix handling of post increment: Either the first or second operand
is the register with the memory address, and it's that register's
value we need to increment or decrement.
David Schultz [Thu, 27 Jan 2005 05:46:17 +0000 (05:46 +0000)]
- Move the functions presently described in in ieee(3) to their own
manpages. They are not very related, so separating them makes it
easier to add meaningful cross-references and extend some of the
descriptions.
- Move the part of math(3) that discusses IEEE 754 to the ieee(3)
manpage.
Warner Losh [Thu, 27 Jan 2005 04:51:44 +0000 (04:51 +0000)]
Write cs_detach() and use it. This resolves the twin problems of the
cs1 interface linger on card eject, as well as the warnings about the
card still using resources. Ooops.