Commit Graph

2177 Commits

Author SHA1 Message Date
ross 7e0b361d84 Fix for kernel alignment crash reported on port-alpha. A developer went on
a happy code sweep (in the kernel!) and constified a random selection of
kernel objects. This changed the alignment of the previously-aligned-by-
accident seqprog array, and exposed a lurking bug.  I can't decide if this
is good or bad.
2001-04-14 19:37:17 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
thorpej a3fd502107 Nuke some unneeded splimp. 2001-04-12 03:16:56 +00:00
thorpej d94ce2f426 splimp -> splnet 2001-04-12 03:10:35 +00:00
wiz b7f59127c9 re-add bt8xx.h (needed for fxtv, without which bktr is pretty much useless) 2001-04-11 09:07:21 +00:00
jdolecek 372e5956ef Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
2001-04-11 07:42:31 +00:00
mjacob dfb8f5f43f Include isp_ioctl.h. 2001-04-10 21:52:15 +00:00
mjacob 78a44662f5 Add initial implementation of ISP_SDBLEV, ISP_RESETHBA, ISP_FC_RESCAN,
ISP_FC_LIP and ISP_FC_GETDINFO ioctls.
2001-04-10 21:52:00 +00:00
mjacob 7bcf01a29a Note one other place that bogus interrupts can be measured. 2001-04-10 21:51:21 +00:00
mjacob 81a6d0ec41 Add isp_ioctl.h. 2001-04-10 21:50:53 +00:00
mjacob 5f8aa905e6 Add some HBA ioctl functions (LIP resets, rescan, setting debugging level). 2001-04-10 21:50:40 +00:00
fredette b27eda4ead Added. 2001-04-10 12:46:26 +00:00
fvdl 0ccb3965dd Fix missing splx calls. One of them from OpenBSD. 2001-04-09 23:51:28 +00:00
bjh21 fd7c4f1c79 ether_ioctl() expects i82586_init() to return an errno. Have it do so
(admittedly only EIO at present).
2001-04-09 22:31:16 +00:00
drochner 9e9590f441 Change the way the aux port is probed for. Some older chipsets w/o
mouse port seem to interpret the "test aux port" (0xa9) command differently,
leading to a non-working keyboard.
Now we try to echo a byte through the aux port by means of the "echo aux"
(0xd3) command, which is what Linux does.
Thanks to Christoph Badura for detailed reports and testing.
2001-04-09 15:45:50 +00:00
ad e637d8a38d - Some firmware fills the system drive table with junk, so get the number
of system drives from an ENQUIRY.
- Complain if there's more than 1 segment when issuing some kind of enquiry
  (this needs to be fixed properly).
- Fix the ID hack for 2.xx firmware.
- Fix an argument to bus_dmamap_sync().
2001-04-09 15:40:09 +00:00
tsutsui aa31658cf0 Correct values for sanity checks. 2001-04-08 17:05:10 +00:00
tsutsui c65417c92f Make sure to print "\n" at the end of the attach line on non-DEBUG case. 2001-04-08 11:45:45 +00:00
tsutsui 2f9f69455f Fix some bus_dma(9) usage:
- bus_dmamap_sync() takes offset into the dmamap, not VA.
- Use BUS_DMA_STREAMING for the data dmamap, not BUS_DMA_COHERENT.
2001-04-07 10:50:13 +00:00
bjh21 03e45ae8c7 In ea_writembuf(), reset the DMA pointer for each mbuf we copy, since
odd-sized mbufs will confuse things.  This makes transmission of odd-sized
packets work.
2001-04-06 00:02:49 +00:00
bjh21 d109dd795a Add a bit of voodoo code from the old "eb" driver that seems to prevent the
80C04 returning garbage when we read from it.  This driver can now handle flood
pings without dropping packets.
2001-04-05 22:55:46 +00:00
mjacob 5dafac6e18 Add a few opcodes for target mode. Define firmware attributes (for FC f/w). 2001-04-05 02:28:53 +00:00
mjacob ad454c818c Keep up with the Joneses: sync with common core target mode code. Eventually
we'll do something with it here.
2001-04-05 02:28:17 +00:00
mjacob 6c28def28f Change how SCSI defaults are latched if we're supporting Target Mode.
Make sure we pick up the channel for dual bus cards when enabling target
mode. Catch a silly null pointer dereference.
2001-04-05 02:27:33 +00:00
bjh21 0c5b5be69f Tweak product ID printing in light of the 80C04A data sheet.
Split out Rx and Tx interrupt handlers into their own functions for clarity.
2001-04-02 22:25:17 +00:00
bjh21 7b7d57c2da Add some definitions for the 80C04A, thanks to Reinoud, who found me a data
sheet for it.
2001-04-01 21:15:15 +00:00
jdolecek 5a3d02fe8b fix the copyright - Charles's name was added here by mistake, use
standard TNF cookie instead
2001-03-31 09:49:00 +00:00
jdolecek 592dfdc76b Prepare for MCA attachment:
* split off sharable stuff to dev/ic/ate_subr.[ch], move ate(4) device
  definition to conf/files
* cosmetic: attach with ate_isa
2001-03-31 00:26:53 +00:00
bjh21 f6ec9b4ab2 On an 80C04, try not to start reads at addresses of the form xx,ea, xx,ee, or
xx,f0.  This appears to heavily alleviate, but not to eliminate entirely,
the problems I've been seeing with garbage being read from the rx buffer.
I suspect the real solution lies elsewhere.
2001-03-29 20:49:44 +00:00
bjh21 2f6fd6b040 Print a warning message when the DMA FIFO fails to fill or empty before we
time out.
2001-03-29 17:46:39 +00:00
jdolecek 2a2070aec3 kill bunch of unneeded includes 2001-03-29 08:48:55 +00:00
petrov b0605f71d5 fas support added 2001-03-29 02:58:38 +00:00
bjh21 758fa94327 Print the address within the Rx buffer whenever anything goes wrong: it seems
to be significant.
2001-03-27 22:17:51 +00:00
bjh21 4beebf7d5d Clean up debugging printfs a little. 2001-03-27 21:43:13 +00:00
bjh21 8fc709ee67 Add some extra diagnostics:
* Use the timer to timoe out transmit operations.
 * Spot when the "next packet" pointer falls outside the recieve buffer and
   reset the interface.
 * Don't reset the interface when we get a bad packet (unless there's
   something else wrong as well).
2001-03-27 20:26:45 +00:00
bjh21 7dae264309 Comment and #ifdef cleanup. 2001-03-27 18:03:04 +00:00
bouyer f099a26df2 Cast to u_int64_t when computing callout argument, to avoid int overflow.
Fixes kern/12471.
2001-03-27 17:24:03 +00:00
ad d54c705158 Missing splx(). From OpenBSD. 2001-03-25 14:48:28 +00:00
is 51144af34f improve readibility 2001-03-25 14:38:23 +00:00
bjh21 39c267bb01 Tweak handling of multicast on 80C04. I think we need to set the match mode
to "multicast" for it to work, but I could be wrong.

Also make ALLMULTI work on 80C04, but this is untested.
2001-03-25 01:06:59 +00:00
bjh21 304809f5f1 Re-arrange board memory to suit the current (crude) transmit code.
Add ea_writembuf() from mark's code, and re-work eatxpacket() to use it.
2001-03-24 23:31:06 +00:00
bjh21 b94b953e92 Enormous pile of changes from mark's (uncommitted) work on this driver.
About the only bit of his code not here is the transmit routines, which I'll
merge in separately.

Also a few bug-fixes, so (for instance) multicast on an 8005 doesn't
immediately fall back to IFF_ALLMULTI.
2001-03-24 20:38:41 +00:00
bjh21 b83b8ac01f Change all the register definitions to match the names using in mark's
improved version of the driver.
2001-03-24 13:40:41 +00:00
martin 5171d409a5 First step to cleanup the hardware driver <-> upper layers interface.
This now provides slightly more functionality than the FreeBSD layer1-newbus
interface. It was meant to be a simple change to one header and a few
c files, but the change rippled all through various stuff.

To prevent a change to the kernel<->userland interface right now the kernel
is now lying about card types to userland (but who cares). This will be fixed
when the userland interface changes, after layer 3 <-> layer 4 has been
fixed.

Functional changes:

Provide a clean interface for hardware drivers to attach to the upper
layers. This will need another small change in the B-channel handling
when a similar change to the layer 3 <-> layer 4 interface happens.

Avoid passing indices into global arrays of pointers around, instead pass
the pointers itself. Don't code hardware driver types by predefined magic
numbers (think LKM). Prepare for detachable drivers (think pcmcia).

While there remove some sets of function pointers always pointing to the
same function (meant to be the configurable set of D channel protocol
handlers). It is unlikely another supported D-channel protocol will fit into
that (maximal layer interface) abstraction. When we get support for another
protocol, we will need to come up with a workable interface. Besides, the
old implementation was, uhm, strange.
2001-03-24 12:40:29 +00:00
bjh21 18db220fba Handle IFF_ALLMULTI correctly. We can now cope with multicast, but for
some reason DAD fails when starting IPv6.
2001-03-24 00:16:41 +00:00
jdolecek 6d79f8ce1e Split we(4) driver to bus independant and ISA-specific parts, in preparation
for MCA attachment.
2001-03-23 17:34:41 +00:00
jdolecek 031c6d8c24 Add MCA ep(4) attachment, for 3Com 3c529-type cards. Tested with 3c529-TP,
provided to me by David Brownlee (thanks!).

Performance of this card is quite poor on my PS/2 with 386DX, like 100KB/s
at best, but as low as 5KB/s when transferring bigger files due to
packet overruns. It would be good to revisit this later, probably by
teaching the ic code to use RX Early.
2001-03-22 16:54:45 +00:00
jdolecek 4ffa6a80d6 convert to use ether_ioctl()
fix bunch of typos
2001-03-22 12:00:26 +00:00
bouyer be5f917514 Add a small delay before reset at attach time, required by one old ATAPI
CD. Reported by Onno van der Linden.
2001-03-21 08:44:14 +00:00
is a4dce1a3f4 Don't need to use the hash filter for a single individual address; make
sure concurrent receive processing is disabled.
2001-03-16 13:43:31 +00:00