joerg [Mon, 21 Dec 1998 18:01:15 +0000 (18:01 +0000)]
This is my first cut on a driver for the RealTek RTL 8002 pocket
ethernet driver.
The BUGS section is still impressive, but the driver seems to work for
me now. Disclaimer: i haven't been able to test this under -current
so far (but it compiles, and the notebook it's intended for can now be
updated to -current more easy than before). Don't be afraid of the
many #ifdefs on __FreeBSD_version in the imported file; i want them in
the repository on the vendor-branch so other people can also manually
integrate it into older systems. I'll clean it up on the -current
branch in a followup commit. The vendor-banch version right now
supports systems back to 2.2R.
This driver should be layered upon ppc(4), but i currently have no
idea how to do this.
Eventually i'll further develop the driver to also support the more
modern RTL 8012 success, which seems to be present in a number of
cheap pocket ethernet adapters these days. Right now, i doubt it will
run with the 8012 without any changes.
Finally a big Thanks! to RealTek for promptly providing me with
documentation and with the source code for the 8012 pocket driver upon
request. I wish all vendors were that cooperative!.
dillon [Mon, 21 Dec 1998 09:41:26 +0000 (09:41 +0000)]
Elf (and a.out?) rebuild of bootstrap tools appeared to be broken due to
some tools requiring header files, such as errno.h, that are softlinks.
The mini installation of include files in Makefile.inc1 wasn't doing
the job, so it has been ripped out and replaced with a true make of the
/usr/src/include/ directory (make all and make beforeinstall). I think
the original idea was to save time by not installing unnecessary header
files, but it doesn't really save all that much time.
Also, I have moved a NOCLEAN conditional to cover rebuilding the object
tree 'Rebuilding the ${OBJFORMAT} obj tree' section. This may or may not
be correct but it appears to function properly. If it is not correct we
need to find another way to avoid scanning every single file in the
entire source hierarchy for make restarts.
dillon [Mon, 21 Dec 1998 07:41:51 +0000 (07:41 +0000)]
Add asleep() and await() support. Currently highly experimental. A
small support structure had to be added to the proc structure, and
a few minor conditional panics no longer apply.
bde [Sun, 20 Dec 1998 16:25:21 +0000 (16:25 +0000)]
Fixed building elf kernels without a `make depend' step. The magic
ordering in rev.1.38 was broken by putting setdef0.o before vnode_if.o
in SYSTEM_OBJS.
jhay [Sun, 20 Dec 1998 14:30:08 +0000 (14:30 +0000)]
Split out afterdistribute and distribute from BKTGTS because they do
need MK_ENV. This should make release work again. Maybe we should get
rid of the /usr/obj/elf at some stage?
dfr [Sun, 20 Dec 1998 12:36:01 +0000 (12:36 +0000)]
In ufs_setattr(), if only one of va_atime or va_mtime are != VNOVAL, then
the code set the other field in the inode to VNOVAL. This can happen
sometimes on an NFS server.
mjacob [Sat, 19 Dec 1998 23:33:21 +0000 (23:33 +0000)]
1) Fix some serious bugs (1 botch on my part which caused a filemark to be
written even it the tape was opened readonly- 2 botches in deferred error
handling for FIXED LENGTH mode which caused panic && hand resp.). Fixed
a memory leak in sa_mount.
2) Fixed an annoying bug when turning of compression to actually reflect
this for future status calls.
3) Implement the MTIOCERRSTAT call where latched control and I/O residuals
and sense data are returned to the application asking for them.
msmith [Sat, 19 Dec 1998 23:07:16 +0000 (23:07 +0000)]
Move the "generic" SMP options from options.i386 to conf/options.
This has the useful side-effect of ensuring that opt_smp.h is
always generated, so we can assume it will always be available.
Prompted by: Andrew Gallatin <gallatin@cs.duke.edu>
mjacob [Sat, 19 Dec 1998 20:21:56 +0000 (20:21 +0000)]
Add MTIOCERRSTAT ioctl and structures that define (at least for
SCSI) the data returned for latched residual and error statistics.
Reserve space for LOG SENSE data which we'll get later. This area
in transition as the HP TapeAlert initiative is looked at.
bde [Sat, 19 Dec 1998 16:28:57 +0000 (16:28 +0000)]
Wait for channel commands to complete after issuing the commands.
The optimisation of only waiting before issuing new commands is
obviously invalid in general and it caused many errors in NIST-PCTS.
I think the errors were mostly for characters sent with the wrong
parity, etc., after a half complete tcsetattr().
Use microtime() instead of a magic loop count to limit the wait.
The wait is a busy-wait :-( and normally takes about 500 usec.
foxfair [Sat, 19 Dec 1998 16:05:19 +0000 (16:05 +0000)]
Add more non-Intel family ((new)) chipset, just like VIA technology MVP3
AcerLabs Aladdin-V. It makes the PCI probing work when system booting. I
will try to merge some additional funtion(i.e. wdc1 problem cause tons of
PR appear :<) ASAP if I could.
Remind me if something wrong after committing, thanks!
dillon [Sat, 19 Dec 1998 09:33:03 +0000 (09:33 +0000)]
Commit initial man page for 'security'... an introduction to security
mechanisms. It is a little light on detail but still a pretty good
overview. I suggest that for specific detail (such as, for example,
how to setup kerberos), that additional security-DETAILNAME man pages
be written and refered to.
dillon [Sat, 19 Dec 1998 07:25:56 +0000 (07:25 +0000)]
Take bind out of sandbox and run it as root again, but leave support
mechanisms ('bind' user and group) in place so the feature can be easily
turned on. There were too many complaints. The security(1) man
page will be created/updated to include the appropriate info.
wpaul [Sat, 19 Dec 1998 04:19:44 +0000 (04:19 +0000)]
Trim the ethernet CRC from received frames manually in wb_rxeof().
The Winbond chip always includes the CRC with every received frame,
and I can't find anything in the Winbond manual that indicates you can
program it not to do this.
julian [Sat, 19 Dec 1998 02:55:34 +0000 (02:55 +0000)]
Reviewed by: Luoqi Chen, Jordan Hubbard
Submitted by: "Richard Seaman, Jr." <lists@tar.com>
Obtained from: linux :-)
Code to allow Linux Threads to run under FreeBSD.
By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.
msmith [Sat, 19 Dec 1998 02:51:22 +0000 (02:51 +0000)]
Support for Intel 450NX-based systems with more than one PCI bus (ie.
most of them).
Many thanks to Kevin Van Maren for the work here, Intel for lending us
a 450NX system to work this out on, and several other folks for testing
the patches. See the PR for an extensive discussion of the nature of
the problem and resolution.
PR: kern/8928
Submitted by: Kevin Van Maren <vanmaren@fast.cs.utah.edu>
dt [Sat, 19 Dec 1998 00:02:34 +0000 (00:02 +0000)]
Little reorganization:
- created internal names for fixed-size integral types, like __int32_t. They
will be used to make several headers self-sufficient.
- <stdlib.h> don't include <machine/types.h> anymore.
- created <sys/inttypes.h>, which can be used as <inttypes.h>.
- declaration of uoff_t and ufs_daddr_t moved to <sys/types.h>.
wpaul [Fri, 18 Dec 1998 18:31:34 +0000 (18:31 +0000)]
Correct the definition for PN_NETCFG_NO_RXCRC: it's 0x20000000, not
0x02000000. This error was causing the chip to always include the
ethernet CRC along with every received frame (the driver turns on
PN_NETCFG_NO_RXCRC, but it was frobbing the wrong bit).
mjacob [Fri, 18 Dec 1998 02:02:20 +0000 (02:02 +0000)]
1) Clarify that a weof count of zero is allowed (flush buffers).
2) Add in the set of {sethpos,setspos,rdhpos,rdspos) commands to implement the
Hardware && SCSI Logical Block position ioctls.
bde [Thu, 17 Dec 1998 19:23:09 +0000 (19:23 +0000)]
Flush the tx fifo in cystop(). Now ttyflush() (and thus tcflush(3))
almost works properly. Unfortunately, there is no way to flush
the rx fifo without resetting the channel, which also flushes the
tx fifo. We avoid resetting even when both fifos need to be flushed,
since resetting seems to cause the rx to lose sync if it is done
while data is arriving.
mjacob [Thu, 17 Dec 1998 19:04:18 +0000 (19:04 +0000)]
Add some tape specific density codes- only enough of them here to recognize
some specific older units so we can choose 2FM@EOD or FIXED blocksize
quirks.
mjacob [Thu, 17 Dec 1998 18:56:23 +0000 (18:56 +0000)]
Several changes having to do blocksize- mostly to force variable as the default.
Attempt to determine (at mount time if not done so already) via density code
whether a device should default to fixed mode or not. Attempts to set to
variable that fail will cause fixed to be selected.
Similarly, the '2 filemarks at EOM' quirk is now determined (or attempted to
be determined) via density code. Some as yet not entirely tested code for
coping with 2FM@EOD position is now also in place.
bde [Thu, 17 Dec 1998 17:40:13 +0000 (17:40 +0000)]
Implemented sending of BREAKs. This is quite complicated because the
hardware is interrupt-driven to a fault and sending a BREAK requires
mode switching. Always running in the BREAK-capable mode as in PR 8318
would double the overhead for sending \0's.
gibbs [Thu, 17 Dec 1998 00:06:52 +0000 (00:06 +0000)]
Fix a few problems with handling rejected transfer negotiation messages.
Use the host message loop for any unknown message types instead of performing
a reject message in the sequencer. Pass reject messages to the host
message loop too which frees up a sequencer interrupt type slot.
Default to issuing a bus reset if initiator mode is enabled. It seems
that the reset scsi bus bit is not defined in the same location for
all aic78xx BIOSes, so attempting to honor this setting will have to
wait until I get more information on how to detect it.
gibbs [Thu, 17 Dec 1998 00:03:14 +0000 (00:03 +0000)]
Correctly track allocated accept target I/O ccbs so that they can be
aborted prior to disabling our lun. This requires a second set of
links since we use the ones in the ccb_hdr during normal operations.
ken [Wed, 16 Dec 1998 21:00:06 +0000 (21:00 +0000)]
At Justin's request, limit the size of buffers that can be mapped into
and out of kernel address space (via the pass(4) and xpt(4) peripheral
drivers) to 64K (DFLTPHYS). Some controllers, like the Adaptec 1542,
don't support more than 64K transactions.
We plan on eventually having the capability of limiting this size based
on min(MAXPHYS, controller max), but since that capability isn't here yet,
limit things to the lowest common denominator.
bde [Wed, 16 Dec 1998 19:04:54 +0000 (19:04 +0000)]
The previous commit was bogus. <stdlib.h> was never a prerequisite
for <kvm.h> or kvm_getloadavg(), and <sys/types.h> was only a
prerequisite for <kvm.h> when <kvm.h> was broken.
bde [Wed, 16 Dec 1998 18:59:47 +0000 (18:59 +0000)]
Declare size_t and ssize_t if they are not already declared, so that
<kvm.h> is self-sufficient again.
Moved typedefs and forward struct declarations out of __BEGIN_DECLS/
__END_DECLS.
Don't comment out the prototype for kvm_uread(). This was a 4 year
old kludge for previous breakage of self-sufficiency. The prototypwe
was broken instead.
Fixed bitrot (const poisoning) in the type of kvm_uread().
phk [Wed, 16 Dec 1998 18:42:38 +0000 (18:42 +0000)]
Straigthen out the use of the tls and tlf callbacks.
Not tested on the if_sr, if_cx and if_ar drivers, but
expected to work just the same as it used to.
Any users of these drivers (or even better: donors
of hardware for them) please contact phk@freebsd.org
so we can test the next batch of changes to if_sppp.
bde [Wed, 16 Dec 1998 18:31:51 +0000 (18:31 +0000)]
Adjust for kern.ps_strings and PS_STRINGS not being a pointer. This
fixes a type mismatch in the call to kvm_uread(). The bug has gone
undetected for almost 3 years because kvm_uproc()'s protoype has been
disabled for almost 4 years.
Trust sysctlbyname() to work properly if it succeeds.
ken [Wed, 16 Dec 1998 18:00:39 +0000 (18:00 +0000)]
Probable fix for the "cdda2wav" panics that various people have been
reporting since this past summer. (I think Daniel O'Conner was the first.)
The problem appears to have been something like this:
- cdda2wav by default passes in a buffer that is close to the 128K MAXPHYS
limit.
- many times, the buffer is not page aligned
- vmapbuf() truncates the address, so that it is page aligned
- that causes the total size of the buffer to be greater than MAXPHYS,
which of course is a bad thing.
Here's a quote from the PR (kern/9067):
==================
In particular, note bp->b_bufsize = 0x0001f950 and bp->b_data = 0xf2219960
(which does not start on a page boundary). vunmapbuf() loops through all
the pages without any difficulty until addr reaches 0xf2239000, and then
the panic occurs. This seems to indicate that we are exceeding MAXPHYS
since we actually started from the middle of a page (the data is being
transfered to a non page aligned location).
To complete the description, note that the system call originates from
ReadCddaMMC12() (in scsi_cmds.c of cdda2wav) with a request to read 55
audio sectors of 2352 bytes (which is calculated to fall under MAXPHYS).
This in turn ends up calling scsi_send() (in scsi-bsd.c) which calls
cam_fill_csio() and cam_send_ccb(). This results in a CAMIOCOMMAND ioctl
with a ccb function code of XPT_SCSI_IO.
==================
The fix is to change the size check in cam_periph_mapmem() so that it is
like the one in minphys(). In particular, it is something like:
if ((buffer_length + (buf_ptr & PAGE_MASK)) > MAXPHYS)
buffer is too big
My fix is based on the one in the PR, but I cleaned up a fair number of
things in cam_periph_mapmem(). The checks for each buffer to be mapped
are now in a separate loop from the actual mapping operation. With the new
arrangement, we don't have to bother with unmapping any previously mapped
buffers if one of the checks fails.
Many thanks to James Liu for tracking this down. I'd appreciate it if some
vm-savvy folks would look this over. I believe this fix is correct, but I
could be wrong.