mjacob [Tue, 4 Jan 2000 11:12:42 +0000 (11:12 +0000)]
Add first pass of the Intel Gigabit Ethernet (wiseman) driver. This
driver seems relatively functional, but could use some souping up,
particularly in the performance area. This has both NetBSD and FreeBSD
attachment code and a fair amount of effort has been put into making
it easy to port to different *BSD platforms.
The basic design is a one tfd per mbuf transmit (with no transmit
related interrupts- tfds are gc'd as needed). The receive ring
uses a 2K buffer per rfd with a +2 byte adjust for the ethernet
header (so the payload is aligned). There's support that *almost*
works for doing large packets- the rfd chaining code works, but there's
some problem with getting good checksums at the IP reassembly level
(ditto for doing short tfd's too).
The chip has support for TCP checksums insertion for transmit and
TCP checksum calculation on receive (for both you have to do some
appropriate backoff && twiddling), but this isn't in place.
This is nearly entirely reverse engineered from the released Intel
driver, so there's a lot of "We have to do this but do not know why"
stuff. There is somebody who has the chip specs who works in FreeBSD
but they're being a bit standoffish about even sharing hints which
is somewhat annoying. It's also apparent that all I had to work with
were the first rev boards.
This driver has been lightly tested on intel && alpha, but only
point-to-point. There may be some issues with switches- use of
boot time environment variables that override EEPROM settings
(e.g., 'set wx_ilos=1' which inverts the sense of optical signal
loss) may help with this.
I had this out for review for three weeks, and nobody said anything
negative or positive, ergo, this checkin has no 'reviewed by' field
which I would have preferred.
* Make --null option work in (HAVE_LIBZ > 0) case.
* Remove "why we need this decl..." comment. The `matcher' variable
is defined in *grepmat.c files in the original distribution, which
we did not import.
obrien [Tue, 4 Jan 2000 03:48:08 +0000 (03:48 +0000)]
Turn on a new /usr/bin/cpp that is a true binary rather than a shell script
wrapper. /usr/bin/cpp knows about all the GCC predefined symbols and has
the functionality of the previous EGCS 1.1.2 /usr/libexec/cpp.
mjacob [Tue, 4 Jan 2000 03:45:49 +0000 (03:45 +0000)]
Clean up some debug printing. Find the correct lun when SCCLUN is
defined. If we complete with a check condition but no sense data,
say we had an AUTOSENSE failure.
mjacob [Tue, 4 Jan 2000 03:22:04 +0000 (03:22 +0000)]
Ho, ho, ho... this clock chip is not y2k compliant. Motorola
has it blacklisted. Silly us for not planning ahead. Tsk. Anyway-
a 10 year window patch is probably sufficient to still detect
nonsense in the clock but allow us to roll past the year 2000.
mjacob [Mon, 3 Jan 2000 23:58:41 +0000 (23:58 +0000)]
These are platform independent definitions for target mode support-
code gratefully borrowed from Patrick Stirling who did a lot of the
grunt work on this years ago. There are also some beginnings of
swizzle macros in case we go to a big endian machine. This is just
a first pass at this and is likely to change a bit over the next
mjacob [Mon, 3 Jan 2000 23:55:30 +0000 (23:55 +0000)]
Make a static chain of isp softcs- gdb usage becomes a lot easier.
Add in a very large amount of target mode support code- this is just
a first pass at this. It's a difficult thing because some of the code
can be in platform independent areas (see isp_target.?) but a lot has
to be in platform dependent areas because of not only the tight coupling
of received commands/events and the specific OS subsystem but because
the platform independent code has (deliberately) no event/wait mechanisms.
mjacob [Mon, 3 Jan 2000 23:52:41 +0000 (23:52 +0000)]
Raise default FCP logintime to 60 seconds. Move the position
of where we could have seen the loop up at least once so it
makes sense. Change some stuff in ispscsicmd so we don't get
stuck there if the loop has never come up yet. Add in some
target mode support code.
mjacob [Mon, 3 Jan 2000 23:50:13 +0000 (23:50 +0000)]
Support target mode operations. This involves having some variant
dma mapping callback routines to select from as target mode
entries are handled a fair bit differently from normal initiator
mode entries.
brian [Mon, 3 Jan 2000 20:09:23 +0000 (20:09 +0000)]
Ensure that there's a bit of extra space in our buffer when it's
passed to libalias. If there's not enough space, things like ftp
PORT commands start failing....
guido [Mon, 3 Jan 2000 19:13:53 +0000 (19:13 +0000)]
Use MAP_NOSYNC for vnodes without any links in their filesystem.
This is necessary for vmware: it does not use an anonymous mmap for
the memory of the virtual system. In stead it creates a temp file an
unlinks it. For a 50 MB file, this results in a ot of syncing
every 30 seconds.
Reviewed by: Matthew Dillon <dillon@backplane.com>
obrien [Mon, 3 Jan 2000 17:40:47 +0000 (17:40 +0000)]
Stop my evil plot to stop the use of GNU info files (which I don't care for)
for people that don't have "NOINFO=yes" in /etc/make.conf.
[read: this still refered to contrib/egcs/]
wpaul [Mon, 3 Jan 2000 15:28:47 +0000 (15:28 +0000)]
It appears that under certain circumstances that I still can't quite pin
down, the dc driver and receiver can fall out of sync with one another,
resulting in a condition where the chip continues to receive packets
but the driver never notices. Normally, the receive handler checks each
descriptor starting from the current producer index to see if the chip
has relinquished ownership, indicating that a packet has been received.
The driver hands the packet off to ether_input() and then prepares the
descriptor to receive another frame before moving on to the next
descriptor in the ring. But sometimes, the chip appears to skip a
descriptor. This leaves the driver testing the status word in a descriptor
that never gets updated. The driver still gets "RX done" interrupts but
never advances further into the RX ring, until the ring fills up and the
chip interrupts again to signal an error condition. Sometimes, the
driver will remain in this desynchronized state, resulting in spotty
performance until the interface is reset.
Fortunately, it's fairly simple to detect this condition: if we call
the rxeof routine but the number of received packets doesn't increase,
we suspect that there could be a problem. In this case, we call a new
routine called dc_rx_resync(), which scans ahead in the RX ring to see
if there's a frame waiting for us somewhere beyond that the driver thinks
is the current producer index. If it finds one, it bumps up the index
and calls the rxeof handler again to snarf up the packet and bring the
driver back in sync with the chip. (It may actually do this several times
in the event that there's more than one "hole" in the ring.)
So far the only card supported by if_dc which has exhibited this problem
is a LinkSys LNE100TX v2.0 (82c115 PNIC II), and it only seems to happen
on one particular system, however the fix is general enough and has low
enough overhead that we may as well apply it for all supported chipsets.
I also implemented the same fix for the 3Com xl driver, which is apparently
vulnerable to the same problem.
Problem originally noted and patch tested by: Matt Dillon
phk [Mon, 3 Jan 2000 14:26:47 +0000 (14:26 +0000)]
truss /usr/bin/su
login (or not if root)
then exit the shell
truss will get stuct in tsleep
I dont know if this is correct, but it fixes the problem and
according to the commends in pioctl.h, PF_ISUGID is set when we
want to ignore UID changes.
The code is checking for when PF_ISUGID is not set and since it
never is set, we always ignore UID changes.
mjacob [Mon, 3 Jan 2000 08:54:51 +0000 (08:54 +0000)]
Widen width of tag && initiator ids to u_int
(from u_int8_t) in ccb_accept_tio structure. This
matches usage elsewhere and also allows me to
overload the tag id with the RX_ID for fibre
channel target mode.
Reviewed by: gibbs@freebsd.org
imp [Mon, 3 Jan 2000 06:45:16 +0000 (06:45 +0000)]
Connect interrupts and start processing them. We panic on card removal
now, but we're getting interrupts!
o Add pcic_suspend/pcic_resume so we can detach our children on suspention
and fix the state of the pcic on resume.
o Remove some unused parts of softc.
o Centralize resource activation/deactivation for pcic bridge chip in
the stylistic pcic_activate/pcic_deactivate.
o Add bus_print_child method so we can see the pccard attachment.
o Add pcic_identify in an attempt to make it possible to automatically id
the pcic devices. This works great, but we cannot divine the irq to use
from this method, nor the memory hole. For the moment, KLUDGE irq to be
10 and memory hold to be 0xd0000.
o Loose the pnp probe stuff. This may be a big mistake, but it is easy
enough to add back later. I did this so the identify routines can do their
thing unmolested by pnp information. The whole identify thing may be a bad
idea to be ripped out later.
o change return type of pcic_intr to void, make it static and ripple
this through the code.
o Add explicit call to bus_generic_attach at the end of pcic_attach to
get any children probed/attached.
o add some comments about future directions/questionable things being
done at different layers, etc.
tanimura [Mon, 3 Jan 2000 02:51:16 +0000 (02:51 +0000)]
- Handle an interrupt for csa primarily in the bridge driver,
then invoke the children. As the value of HISR can be read
only once, pass the HISR to the children via struct
csa_bridgeinfo, stored in the ivars of them.
- Clear the contents of serial FIFO upon stopping the DMA for
playing. This may eliminate buzz on playing. Experimental.
bde [Sun, 2 Jan 2000 17:40:02 +0000 (17:40 +0000)]
Don't allow mounting (or mounting R/W) of filesystems with unsupported
features (except for file types in directory entries, which will be
supported soon).
Centralized the magic number and compatibility checking.
Dropped support for ancient (pre-0.2b) filesystems, as in the Linux
version. Our "support" consisted of printing more details in the error
message before failing at mount time.
Fix the mess with signed/unsigned longs and ints (inspired by bde).
Fix potential bug with directory reading.
Explicitly limit file size to 4GB (msdos can't handle larger files).
Slightly reorganize msdosfs_read() to reduce number of 'if's.
bde [Sat, 1 Jan 2000 17:39:21 +0000 (17:39 +0000)]
Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. The
main changes are:
- many things are more dynamic; e.g., the inode size is a new parameter
in the superblock instead of a constant.
- extensions are controlled by new flags in the superblock.
- directory entries may have a file type field.
These changes are not used yet, except for a spelling change which affects
ext2_cnv.c
bde [Sat, 1 Jan 2000 16:26:43 +0000 (16:26 +0000)]
Merged cosmetic changes from the initial import on the vendor branch
(mainly things that were lost or misformatted in a different way by
moving them to ext2_fs_i.h and back, and ifdefs for user mode that
were excessively edited).
groudier [Sat, 1 Jan 2000 15:24:44 +0000 (15:24 +0000)]
- Add device entry for the next generation of C1010 device
(pci dev_id 0x21).
- Start the SCRIPTS processor without resetting the SCSI BUS
at initialization.
- Remove the "Host adapter CCB chain" (got useless given the
new queuing scheme).
- Display correctly the state of SCSI signals, when SCSI BUS
looks bad.
- Cosmetic changes in messages printed out at initialization.
- Notifications and messages on RESET conditions slightly
reworked.
- TEKRAM 24C16 NVRAM support fixed (also reported ok).
bde [Sat, 1 Jan 2000 14:43:20 +0000 (14:43 +0000)]
Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)
to avoid the namespace problems caused by <ufs/ufs/inode.h> #defining
i_mode, etc.
ext2_fs_i.h had nothing to do with the Linux version. It was a small
part of the Linux version of ext2_fs.h (the part that declares extra
in-core fields for an inode). We don't need it because we use the
ufs in-core inode for the extra fields.
bde [Sat, 1 Jan 2000 11:17:28 +0000 (11:17 +0000)]
This file is not used directly. The small parts of it that are used were
merged into ext2_vfsops.c in rev.1.1. This broke both merging from the
vendor branch and the non-GPL'ed-ness of ext2_vfsops.c.