Commit Graph

2391 Commits

Author SHA1 Message Date
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
bouyer 2b318d4800 Note that SF_CHIP_QUAD is for clock quadrupler with busy wait for PPL.
SF_CHIP_DBLR is for clock doubler or quadrupler.
2001-03-15 17:38:59 +00:00
tsutsui 585b6f2b0a Fix tyop in comments. 2001-03-15 13:45:00 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
mjacob c67c3d855d Clean up and update copyright (remove advertising clause). Clean
up header guard.  Clean up structure definition for at2_entry so
it's correct rather than derived from at_entry- this is important
for unswizzling purposes. Add a whole bunch of unswizzle macros-
they're not quite right yet but at least they're a start. Note that
we now have, for at_entry, a 16 bit firmware handle as part of what
had been at_reserved- this is to correlate ATIOs with CTIOs- and
this must be carried along as part of a tag value to use with all
CTIOs we send in relation to this ATIO. ANSIfy.
2001-03-14 05:46:50 +00:00
mjacob 98381c7a2d ANSIfy source. 2001-03-14 05:44:46 +00:00
mjacob 8d81f18e84 Handles are now 16 bits. ANSIfy. 2001-03-14 05:44:21 +00:00
mjacob 765a49664e Roll core minor. ANSify. 2001-03-14 05:14:36 +00:00
mjacob 6112b6b2e7 Clean up some comments. Expand usage of cd_reserved. Expand cd_tagval
to 32 bits so it can haul along this furshlugginer handle for parallel
SCSI as well as a regular vanilla 8 bit SCSI tag.
2001-03-14 05:10:38 +00:00
mjacob 928cef6eb8 Clean up license && copyright a tad. ct_reserved should now be more
properly called ct_syshandle.
2001-03-14 05:01:54 +00:00
mjacob 5d68eec9d1 Handles are now u_int16_t instead of u_int32_t. ANSIfy (NetBSD was the holdout). 2001-03-14 04:55:21 +00:00
mjacob 4a005e2d38 Update copyright date. ANSIfy isp.c (NetBSD was the holdout of all
the platforms this code runs on). Handles are now u_int16_t, so adjust
code as required.
2001-03-14 04:54:13 +00:00
tsutsui 06237a6a03 Add some delay in zstty_attach() to wait previous console output
to complete before hardware initialization.
2001-03-12 15:46:56 +00:00
bouyer 9ea2b5098b Preliminary support for SYM53C1010-33 (at 80MB/s only for now), based on
patches sent by Matthias Drochner <M.Drochner@fz-juelich.de> and
Kenneth R Westerback <kwesterback@home.com>
2001-03-12 10:00:50 +00:00
wdk 688a84b1b2 Add missing \n during probe if port is dedicated to kgdb 2001-03-11 09:06:09 +00:00
jdolecek 9d66d7180b add 'why' argument to the channel attention hook function; this argument
is similar to the one passed to hwreset hook function
2001-03-10 20:04:30 +00:00
jdolecek c0d40387a0 improve the error messages for IE_TDR_OPEN & IE_TDR_SHORT 2001-03-10 19:59:13 +00:00
jdolecek a557028a27 improve description of IE_TDR_OPEN & IE_TDR_SHORT a bit 2001-03-10 19:57:38 +00:00
briggs 0828a1bcd0 Make this work on a PowerPC system:
- Load the DMA address a byte at a time, and
 - Use bus_space_read_stream_2() instead of bus_space_read_2() when reading
   the byte-stream of configuration data from the card.

Sanity-checked on both i386 and sandpoint.  Reviewed by ad.
2001-03-10 13:30:55 +00:00
thorpej 32a284db3a Make sure data after the header is aligned, so that this works on
systems with strict alignment constraints.
kern/12356, Feico Dillema <feico@pasta.cs.uit.no>.
2001-03-08 16:33:43 +00:00
thorpej 09cc55c97c Add additional padding to the status record, needed by the AIR-PCM342.
kern/12357, Feico Dillema <feico@pasta.cs.uit.no>.
2001-03-08 16:30:50 +00:00
thorpej 54bb0eddd9 Preliminary support for detaching an "adv" instance. This
could use some more work.

Derived from kern/12341, takashi.yamamoto@bigfoot.com.
2001-03-08 06:49:49 +00:00
thorpej fd7ed72be1 Add BUS_DMA_STREAMING to data transfer maps. 2001-03-07 23:07:12 +00:00
mjacob bf630787f7 Fix isp_print_qentry to print all four lines- it's been broken for months. 2001-03-02 04:51:14 +00:00
thorpej 8f79095477 Differentiate a couple of similar error message, and add newlines
on the end of them.
2001-03-01 22:10:57 +00:00
itojun 0913c0736c IPv6 support, from fujiwara@rcac.tdi.co.jp 2001-03-01 00:40:41 +00:00
mjacob bcc65cfc34 roll platform minor 2001-02-28 05:53:59 +00:00
ad 8be33f9cc5 Remove mlxvar.h, which was added for no apparent reason. 2001-02-25 16:15:07 +00:00
cgd c105346203 Avoid sequence point issues. 2001-02-24 00:03:12 +00:00
cgd 023e9f0649 C requires that labels be followed by statements. 2001-02-24 00:01:22 +00:00
mjacob baf0985f2a Fix a longstanding bug- we had the sense of what bit 14
for the ICB firmware options meant- *I* had taken it to
mean that if you set it, Node Name would be ignored and
derived from Port Name. Actually, it meant the opposite.
As a consequence- change ICBOPT_USE_PORTNAME to the
define ICBOPT_BOTH_WWNS- makes more sense.
2001-02-23 05:38:27 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
martin f0d6660cf4 Filename cleanup: remove i4b_ prefixes outside sys/netisdn, last round.
Renamed in sys/dev/ic:
i4b_hscx.c -> hscx.c
i4b_hscx.h -> hscx.h
i4b_ipac.h -> ipac.h
i4b_isac.c -> isac.c
i4b_isac.h -> isac.h
i4b_isic.c -> isic.c
i4b_isicbchan.c -> isic_bchan.c
i4b_isicl1.c -> isic_l1.c
i4b_isicl1.h -> isic_l1.h
i4b_isicl1fsm.c -> isic_l1fsm.c
2001-02-20 22:24:31 +00:00
mjacob 1c40195bea Add ISPCTL_RUN_MBOXCMD control op and ISPASYNC_UNHANDLED_RESPONSE async event. 2001-02-20 01:11:35 +00:00
mjacob 3f7d69fe2c Add ISPCTL_RUN_MBOXCMD control function and ISPASYNC_UNHANDLED_RESPONSE
async event. Call ISP_DUMPREGS on f/w erro. Correct problem in bitmap
for MBOX_DUMP_RAM.
2001-02-20 01:10:50 +00:00
taca 47e672bfdc Add mlxvar.h as include files to install. 2001-02-18 14:17:45 +00:00
thorpej 4027cab9ea Support for the MII on the D-Link DL10019/DL10022 NE2000-compatible
Ethernet chips.
2001-02-13 01:43:02 +00:00
mjacob a898cb6cb0 Eliminate ISP2100_FABRIC- we always allow for fabric now. Add an
isp_iid_set/isp_iid for fibre channel- this is because we now
fake a port database entry for ourselves. Add the additional loop
states between LOOP_PDB_RCVD and LOOP_READY.

Change and comment on a wad of Fibre Channel isp_control functions.
Change and comment on some of the ISPASYNC Fibre Channel events.

Add was_fabric_dev/fabric_dev tags to our local FC database structure
(so we can see rapidly whether something was a fabric device but is
now gone).

Add a tag which says what role this adapter should take. It can take
on the value of None, Target, Initiator or Both. None is useful for
warm failover purposes. Remove the ISP_CFG_NOINIT silliness since
a role of "None" does this.

Add a isp_lastmbxcmd tag to store the opcode for the last mailbox
command used.
2001-02-12 23:33:49 +00:00
mjacob b01ecfe65c Put in offset definitions for FPM and FBM registers, plus just enough
bits defined so we can reset them.
2001-02-12 23:33:11 +00:00
mjacob a86729db93 Add structure defining FC-AL position maps. The only tool that I know of
that really uses this is luxadm(8) under Solaris.
2001-02-12 23:32:44 +00:00
mjacob 4409fa23b2 Remove ISP2100_FABRIC (we're always fabric now). Fix usage of isp_lastmbxcmd
to report the mailbox command that times out. Fix isp_unswizzle_sns_rsp
which for reasons *I* find obscurer just doesn't work correctly on sparc64
with words past 128. I have no idea why this *does* work on SparcLinux.
2001-02-12 23:32:11 +00:00
mjacob 25bc760687 Do some cleanup based upon adapter role- mainly not enabling interrupts
if we're ISP_ROLE_NONE. Change ISPASYNC_LOGGED_INOUT to ISPASYNC_PROMENADE.
Make sure we note if something is a fabric device.
2001-02-12 23:30:12 +00:00
mjacob d9696b793a Add isp_fc_runstate function- this function's purpose is to, in stages,
and depending on role, make sure link is up, scan the fabric (if we're
connected to a fabric), scan the local loop (if appropriate), merge
the results into the local port database then, check once again
to make sure we have f/w at FW_READY state and the the loopstate
is LOOP_READY.
2001-02-12 23:29:26 +00:00
mjacob 85b0326ec6 Minor stuff:
Remove ISP2100_FABRIC defines- we always handle fabric now. Insert
isp_getmap helper function (for getting Loop Position map). Make
sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE
for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic
f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP,
and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications
upstream for changes in the name server, changes in the port database, and
f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event.

When resetting the Qlogic 2X00 units, reset the FPM (Fibre Protocol
Module) and FBM (Fibre Buffer Modules). Also remember to clear the
semaphore registers. Tell the RISC processor to not halt on FPM
parity errors.


Finally, use a new tag in the softc to store the opcode for the
last mailbox command used so we can report which opcode timed
out.

Major stuff:
Quite massively redo how we handle Loop events- we've now added several
intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us
a lot finer control about how we scan fabric, whether we go further
than scanning fabric, how we look at the local loop, and whether we
merge entries at the level or not. This is the next to last step for
moving managing loop state out of the core module entirely (whereupon
loop && fabric events will simply freeze the command queue and a thread
will run to figure out what's changed and *it* will re-enable the queu).
This fine amount of control also gets us closer to having an external
policy engine decide which fabric devices we really want to log into.

Throw out the ISP_CFG_NOINIT silliness and instead go to the use of
adapter 'roles' to see whether one completes initialization or not
(mostly for Fibre Channel). The ultimate intent, btw, of all of this
is to have a warm standby adapter for failover reasons.  Because
we do roles now, setting of Target Capable Class 3 service parameters
in the ICB for the 2x00 cards reflects from role. Also, in isp_start,
if we're not supporting an initiator role, we bounce outgoing commands
with a Selection Timeout error. Also clean out the TOGGLE_TMODE
goop for FC- there is no toggling of target mode like there is
for parallel SCSI cards.

Do more cleanup with respect to using target ids 0..125 in F-port
topologies. Also keep track of things which *were* fabric devices
so that when you rescan the fabric you can notify the outer layers
when fabric devices go away.

Only force a LOGOUT for fabric devices if they're still logged in
(i.e., you cat their Port Database entry. Clean up the Get All Next
scanning.
2001-02-12 23:28:50 +00:00
ad 469b91fce0 Don't put the request onto the `worklist' in ccb_submit(), since it may
still be on the pending queue.
2001-02-12 19:04:35 +00:00
thorpej ec0ab7054b Add a "stop_card", which is the opposite of "init_card", and
call it from dp8390_stop().
2001-02-12 18:56:26 +00:00
thorpej b17ef220b5 Print the Ethernet address before attaching media. 2001-02-12 18:52:22 +00:00
thorpej 043e519d55 Adjust the way that media is initialized on DP8390-compatible
chips.  The dp8390_softc now has media_init and media_fini
function pointers that do the work.
2001-02-12 18:49:03 +00:00
hpeyerl 2dcf59c673 Fix for kern/12114 and kern/12158 Advansys DMA errors.
Reported by Bob Bernstein who heard from Kenneth Westerback that this
might be the problem.  Tested by HP.
2001-02-11 23:40:03 +00:00
bouyer 0653304779 Avoid sending new commands to the device if it has sense pending:
- run request sense command without disconnect
- don't restart the script before siop_scsicmd_end has been called if the
  cmd didn't complete with good status.
- reserve slot 0 for request sense, to make sure it'll be sent first.
2001-02-11 18:04:49 +00:00
thorpej 21096fc86d Include MII glue here -- some DP8390-compatible chips have MII
interfaces on them (scary, eh?)
2001-02-10 17:18:02 +00:00
thorpej 72d4eea6ef Register definitions for the D-Link DL10019 and DL10022 Ethernet
chips.  These are NE2000-compatible chips with an MII interface
on them for media.
2001-02-10 16:41:40 +00:00
thorpej ef958d8898 Add a type for the DL10022. 2001-02-10 16:09:55 +00:00
ad 77c450a230 Squash some nits. 2001-02-06 12:53:48 +00:00
chs 09cb38f22b expose the definitions of MIN() and MAX() in sys/param.h to the kernel
and use those in favor of a dozen copies scattered around the source tree.
2001-02-05 10:42:40 +00:00
enami 5760375275 Include uvm/uvm_extern.h to pull in the definition of PAGE_SIZE. 2001-02-05 04:50:27 +00:00
ad 8d75ab98d3 Add a driver for the Mylex DAC960 family (including DEC SWXCR). 2001-02-04 17:05:11 +00:00
thorpej 311479928a Rework the transmit logic. Use a "free" and "dirty" list of
transmit jobs.  The previous logic occasionally, under heavy
load, would attempt to sync and unload DMA maps that weren't
currently in use, and also occasionally leaked mbufs under
heavy load.

Yay, NFS now works pretty well on my Dreamcast.
2001-02-02 04:34:19 +00:00
thorpej bf8be41116 Put the rx buf pointer into the softc directly. 2001-02-02 03:51:51 +00:00
thorpej 84b5bb2f1b Fix a bug in ring-buffer wrap calculation. On the Dreamcast,
it causes assertions to fail in the PCI bounce buffer code.  On
other platforms, it causes the address of the next packet to
be mis-calculated, leading to packet loss.
2001-02-01 04:45:17 +00:00
thorpej 3c0c1146ac Use a 16K receive buffer on the SEGA Dreamcast (XXX should be
done differently than it is).
2001-01-31 07:44:51 +00:00
thorpej 9710d432c2 Power management support for the CardBus Etherlink XL cards.
From Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>.
2001-01-30 19:27:39 +00:00
enami 2c218a4926 Handle allmulti case correctly as a NetBSD network driver;
if we are requested range of multicast address or too many multicast address,
program multicast filter to receive all multicast address.   And set/clear
IFF_ALLMULTI flag properly.
2001-01-29 01:24:42 +00:00
bouyer 22189b442b Add a few siop_table_sync() calls. 2001-01-26 22:00:01 +00:00
bouyer 05b5119cdf Fix a 4 byte ovferflow in an array:
resel[sizeof(load_dsa) / sizeof(load_dsa[0])] is 25, not 24.
2001-01-26 21:58:56 +00:00
bjh21 fe3273fbb4 Patch from PR kern/8001, submitted by Rafal Boni.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards.  This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver.  I've tested it (briefly) with 'ei' on arm26
as well.  In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
2001-01-22 22:28:43 +00:00
jdolecek 9e7736f1dc make patches[] const 2001-01-22 14:30:43 +00:00
mycroft f2d987f8a4 Force certain commands (i.e. DVD authentication) to PIO mode. They are
explicitly not supported in DMA mode, and generally return an `illegal field
in CDB' error.
This should have been done ages ago.
2001-01-22 07:00:39 +00:00
thorpej 3966e66ec8 Untangle some spl-spaghetti in cy_modem_control(). 2001-01-21 16:55:10 +00:00
thorpej 13ad8f5ba7 Pack the minor numbers like the Cyclades-Z driver does, and
make the dialout bit compatible with the other serial drivers
(and with what MAKEDEV generates for dtyCYxxx).
2001-01-20 19:29:05 +00:00
lukem 1d15673dae consistently use FE_DEBUG (DEBUG was used a couple of places where it
was obvious that FE_DEBUG should have been used instead)
2001-01-20 07:31:00 +00:00
thorpej c38c39fc9b Only need to pass a cy_softc * to cy_attach(). 2001-01-20 02:26:39 +00:00
thorpej 44ff75e3c5 ANSI'ify. 2001-01-20 02:24:16 +00:00
thorpej a0f7017e2e Clean up the PCI attachment a bit, and adjust the other pieces
to suit.
2001-01-20 02:15:01 +00:00
eeh 905ef1b7fa Use the SCSIACCEL ioctl() to turn on TAG QUEUEs. 2001-01-19 23:04:23 +00:00
martin 0f589a40df Nuke all uses of splimp() in the isdn subsystem, replace by splnet(). 2001-01-19 12:44:44 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
thorpej 3d0bbf9152 Filter "receive process failed to idle" on noisy chips (like the
ADMtek AN985).
2001-01-17 19:37:09 +00:00
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
thorpej 2663816278 Fix register offset botch when setting the multicast filter on
the ADMtek AN985.
2001-01-16 17:33:24 +00:00
thorpej 45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +00:00
tsutsui 4f8dfdb556 Don't copy Rx packet to mbuf if it has invalid length; just discard it.
Fixes kern/11877.
2001-01-11 14:38:58 +00:00
ad 6b133efd3e Make this work with the SA 431 and 42xx series controllers. 2001-01-10 16:48:04 +00:00
rh cb2d30303b Add new AC97_HOST_SWAPPED_CHANNELS host flag that causes left and right
mixer channels to be swapped (required for hardware that has wiring
reversed).
2001-01-09 23:14:25 +00:00
mjacob 442e2e73a9 ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT. 2001-01-09 18:56:24 +00:00
mjacob 64c3b7f881 Add some 2X00 specific state flags for status response entries. Add the
defines necessary for the REGISTER FC4 TYPE SNS subcommand.
2001-01-09 18:56:06 +00:00
mjacob 5599d31360 ISPASYNC_PDB_CHANGED->ISPASYNC_LOGGED_INOUT. And also, ISPASYNC_CHANGE_NOTIFY
is for both local loop and fabric cases now.
2001-01-09 18:54:53 +00:00
mjacob 81df08ddef Use a SNS REGISTER FC4 TYPE subcommand to register with the name server.
This means we should be able to work with McData switches now. Change
ISPASYNC_PDB_CHANGED to ISPASYNC_LOGGED_INOUT (more descriptive). Allow
F-Port topologies to use target ids 0..125 to log into fabric devices.
Yet again fool around with defaul WWN stuff.
2001-01-09 18:54:06 +00:00
thorpej 7bebf9a408 On ADMtek chips, don't just idle the chip when programming the
multicast filter.  These chips don't like to go into "idle" state
very much, so we have to use the big hammer and reset the chip,
instead.
2001-01-08 22:12:57 +00:00
thorpej e9bb880aaf The ADMtek AN985 "ghosts" the single built-in PHY at every MII address.
Work around this by having a custom media init routine that limits the
search to MII address 1.
2001-01-08 21:40:29 +00:00
thorpej b79ddef845 Also ignore receiver errors if VLAN_MTU is enabled; the 21040 appears
to require this.
2001-01-07 23:29:12 +00:00
martin 6b82e7fe42 64bit police.
Rumors say there are archs without ISA busses, so avoid including
(uneccesarily) isa bus headers in MI files.
XXX this is the minimal solution, layer interface calls will have
XXX to be revisited later
2001-01-07 21:47:24 +00:00
sommerfeld 4522010c18 Make certain we see COM_MPLOCK, MULTIPROCESSOR, and LOCKDEBUG
to avoid any confusion about whether or not we have a lock in the softc.
2001-01-07 18:09:26 +00:00
nathanw a30debae05 Add description of the pinout of a standard DB-25 parallel port,
relative to the bits described here.
2001-01-06 17:16:19 +00:00
takemura 1c518d67a0 Add WDC_CAPABILITY_SINGLE_DRIVE to ignore secound drive. Wdc on pcmcia will
be attached with this flag.
Some CF Card (for ex. IBM MicroDrive and SanDisk) doesn't seem to implement
drive select command. In this case, you can't eliminate ghost drive properly.
So you should use this flag to ignore the ghost by force.
2001-01-06 14:55:49 +00:00
martin c3cb638bca Initial import of ISDN4BSD release 0.96 2001-01-05 12:49:52 +00:00
mjacob 6cb4620b76 (some of these changes were made in the previous revision- oops)
Say which mailbox command times out (polled or interrupting). Also,
give them a bit more time to timeout (5 seconds instead of 2).
2001-01-05 07:03:54 +00:00
mjacob 9d7f6e219f Ian McDonnell <apriori@world.std.com> made me see the error of my ways.
*Cough*. Ahem. I hadn't been setting error to XS_SENSE when there was
a check condition. Major blunder.
2001-01-05 07:02:00 +00:00
augustss 5f3c3e0d6f Add definitions for some bits in ID and STATUS regs. 2001-01-05 03:32:46 +00:00
augustss cc9f003455 Add some codecs. 2001-01-05 03:32:11 +00:00
mjacob 462ff196a4 [ dummy checkin to add to previous CVS ]
It's probably not really a compiler bug- somebody pointed out
that it was the kernel making strings readonly. But I do think it's
a bug. The actual code was really more like:

	char *revname;

	...

	revname = "2X00";

	...
	revname[1] = '2'; <<<<<<<<< BOOOM


The variable revname is not a const. If I had said

	const char *revname = "2X00"
	...
	revname[1] = '2';

that would indeed be breaking const rules.
2000-12-30 19:47:20 +00:00
mjacob 8adadc9bda There's a compiler bug for sparc64 that makes the construct:
char *foo = "XXXX";
	...
	foo[1] = 'Y';

blow up (in the kernel) with the 2nd assignment. Work around it here-
it's probably just as well- I was spending more in cpu instructions doing
the assignment than I was saving in string space (it would have been
cheap on a pdp11 or a 68k- but the address loads and assignments on something
like sparc or alpha way outweigh the savings in space. Tsk.).
2000-12-30 19:30:09 +00:00
wiz 1796fa4bd8 Fix pasto in comment. 2000-12-30 16:55:24 +00:00
wiz 2ad3fd958d Merge 2.18 to trunk. 2000-12-30 16:52:36 +00:00
mjacob d4c32f2a63 Apply nearly all of Bill Sommerfeld's -Wformat patches. The one
change I didn't take is the %llu format- I can't have a common
across multiple platform module assume a %ll argument capability-
which really pointed out that I shouldn't be trying to *print*
something which could long long.
2000-12-28 22:27:46 +00:00
mjacob 0dae1b3d9a Turn ISP_LOCK/ISP_UNLOCK into ISP_ILOCK/ISP_IUNLOCK macros for routines
that are driven from a timeout (oops, they're on the interrupt stack).
2000-12-28 21:37:04 +00:00
mjacob d81d268d13 Use the ISP_CFG_NOINIT flag to decide whether to complete the full init
process steps (this is used in some platforms where you want to bring
the adapter to ready (to get a WWN, e.g.) , but not engage either target
or initiator mode until some later time). Set the correct defaults WWNs.
2000-12-28 08:26:12 +00:00
mjacob a5498e1514 add an ISP_CFG_NOINIT flag 2000-12-28 08:24:17 +00:00
mjacob b551237fb6 add two minor ATIO2 offsets 2000-12-28 08:23:48 +00:00
mjacob 829a533bfb Restore the change fvdl made. Sorry about not noticing it. The
header (about 'Maintainer') is supposed to help encourage folks
to coordinate with me.
2000-12-28 08:11:52 +00:00
bjh21 a48c9194bb Print the newline after the memory test. This makes it clear that the delay's
related to this driver rather than the next device to be attached.
2000-12-23 16:37:20 +00:00
wiz c8b0b91e7e Fix pathnames in comment. 2000-12-23 01:37:57 +00:00
onoe 2079f9d276 improve an_cmd() slightly:
- strip unnecessary loop to get command result status
- ack command after clearing busy bit

XXX: it still sometimes get timeout to get status(0xff50) or statistics(0xff68)
     probably due to heavy load of firmware in receiving.
2000-12-21 15:37:18 +00:00
onoe c6607f2fef move definition of AN_INTRS from anreg.h to anvar.h
strip off AN_EV_CMD from AN_INTRS because it causes severe performance
problem.
2000-12-20 23:30:36 +00:00
briggs 9a73f8b22b Make _sure_ that we do not use selatn3 when it is not present. Fixes a
problem on pmax reported by Izumi Tsutsui.  Tested also on alpha and mac68k.
2000-12-20 15:49:03 +00:00
eeh d1ab475964 Make the driver negotiate sync again and remove some (hopefully) superfluous
DELAY()s.
2000-12-20 03:19:34 +00:00
pk c6bd81f8a6 Fix reversed logic when setting setting sync-negotiation ability flag 2000-12-19 14:08:17 +00:00
onoe 684fe5613d cleanup attach procedure, use tsleep() instead of long delay (and ignore
timeouts).
stop driver after suspend.
XXX: should use command interrupt but no document...
XXX: status update sometimes failed perhaps due to collision.
	(RID 0xff50 or 0xff68 access failed)
2000-12-19 08:00:55 +00:00
thorpej ba4b6847df Fix a problem with the ALTQ changes that can cause bogus memory
refernces.  Problem reported by Luke Mewburn.
2000-12-19 00:06:01 +00:00
thorpej 4dbafc4a71 Remove an IF_PREPEND() that slipped through. 2000-12-18 23:57:13 +00:00
briggs 7ea0edc288 If the target rejects a tag message, turn off tagged transfers for that target.
Also, adjust message/command construction in ncr53c9x_select() to work no
matter how the structure alignment works out (needed at least for m68k).
Tested by me on mac68k & alpha, and sanity-checked by eeh.
2000-12-18 23:39:44 +00:00
thorpej df6482a625 ALTQ'ify. 2000-12-18 20:32:08 +00:00
thorpej cc6e5d835f Adapt to ALTQ-related API changes (driver is not fully ALTQ'ified yet). 2000-12-18 20:23:04 +00:00
eeh 519aef8cf4 Make sure bits in the flags are disjoint. 2000-12-17 06:18:21 +00:00
briggs d25ab824c8 Back out previous change. It appears to be in error. There is something
else that is causing the esp driver on the mac68k to fail miserably.
2000-12-17 04:38:29 +00:00
briggs 0debc0e91e At least the 53c96 does not work with the selatn3 command. Disable it
for both the 53c94 and 53c96.  This also addresses PR port-mac68k/11716.
2000-12-17 03:29:03 +00:00
thorpej 8489b5e4cf if_qflush() -> IFQ_PURGE() 2000-12-14 17:48:23 +00:00
thorpej 6b16911a43 ALTQ'ify. 2000-12-14 06:27:23 +00:00
onoe a7125e435c Add PCI version of Aironet, not tested at all.
ISA/ISApnp version won't come since I don't know about isa...
2000-12-14 04:11:25 +00:00
onoe d5dd5139a3 Support 80211NWKEY and 80211POWER ioctl. 2000-12-13 20:21:10 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
onoe aa513e6338 add support(?) for PC4500 which is a 2Mbps product.
Though ifconfig -m no longer show 5Mbps/11Mbps for PC4500 by this fix,
I cannot find how to set fixed transmit speed to the firmware.
FreeBSD version of driver apparently ignore the value set by ancontrol(8).
2000-12-12 05:34:02 +00:00
onoe 99675e3dde cleanup headers: remove duplicate definition, split reg.h/var.h. 2000-12-12 05:11:15 +00:00
thorpej 41d6a62c1c s/Ethernet/802.11/ when printing the address. 2000-12-12 01:32:34 +00:00
onoe c63194c7af To fix panic at "ifconfig an0 down",
define ANCACHE in if_an_pcmcia.c (XXX)
try not to access registers after interface down.
2000-12-11 23:58:55 +00:00
onoe 9c25e9208a Port 'an' driver for Aironet PC4500/PC4800 IEEE802.11 card from FreeBSD.
This is very adhoc work for IETF meeting.
- Since it seems that 'an' and 'wi' have similar hardware, low level
  functions should be shared.
- There are PCI/ISA cards of Aironet but not supported yet.
- The wiconfig interface is changed so that wiconfig cannot be used.
- 'ancontrol' of FreeBSD is not ported.
- Only infrastructure mode is tested.
- WEP is not supported.

Though I only have an Aironet card, Cisco card should be expected to work.
2000-12-11 23:16:50 +00:00
ws 8132c2a6aa Fix the previous differently:
The intent was to protect the full range of ports on the board by the
barriers.  But the start address was wrong.  Fix it.

While here, change two other barriers to also protect the full range
(not only the nic ports), and add yet another similar barrier.
2000-12-11 17:07:38 +00:00
ad 2940363203 Report soft-errors-per-unit once per minute at most. 2000-12-11 13:19:50 +00:00
eeh af770220fa Fix for chips that don't grok NCRCMD_SELATN3. 2000-12-10 19:25:07 +00:00
mjacob af2807f9f7 Finally fix this driver to be sensible about the ENDIAN dance. It's not
quite simply a question of the Qlogic being little endian and having
to have stuff swapped on big endian machines- it also has to do with the
fact that the SBus and PCI DMA layouts are wierd with respect to this.

At any rate, now finally fixed- works on Mac G4, tested it on a SS10
for sparc, checked on alpha to see if I've broken anything, and as
soon as I get another spare afternoon I'll finally install a sparc64
version which should just work (as it'll be like the Mac).
2000-12-09 08:06:31 +00:00
tsutsui fd97da6384 Add (missed) bus_dmemem_free() in rtk_detach(). 2000-12-09 02:02:20 +00:00
tsutsui e8bfefe60c - Since rtk_rxeof() was rewritten, we don't have to reserve a few bytes
before the Rx buffer.
- Reduce delay on EEPROM access.
- Some more cosmetics.
2000-12-05 11:11:49 +00:00
fvdl d26269e0a6 'error' was not initialized in the _ioctl function, potentially returning
!= 0 values in the non-error case.
2000-12-04 11:18:49 +00:00
fvdl 0888965bb7 Remove uninitialized variable usage (it was redundant anyway). 2000-12-04 11:05:32 +00:00
eeh 03e0f9950a Fix bug in non-dma select code i added. 2000-12-03 23:25:24 +00:00
jlam 9cfd45593f Set range of memory protected by read/write bus space barriers to the
correct size, instead of extending past the mapped region.
2000-12-03 23:15:23 +00:00
tsutsui 311a1a842c Clean up receive interrupt routine:
- Use MGETHDR + MCLGET + memcpy rathar than m_devget + m_adj + m_copyback.
- Call bus_dmamap_sync(9) correctly for Rx buffer.

Mostly from thorpej's if_rtp.c.
2000-12-03 14:24:17 +00:00
fvdl 2b69243845 Add AHC_NO_TAGS option to switch off tagged queueing. Done because
tagged queueing has a severe performance impact (60%) on write
throughput with UBC. Needs investigation.
2000-12-02 14:53:01 +00:00
augustss a51ea43fd6 Make this compile again (on i386). 2000-12-01 04:37:54 +00:00
pk d736ce5086 We don't need <sys/proc.h>, <sys/user.h> and <machine/cpu.h>. 2000-11-30 23:21:39 +00:00
pk 55fa60c3e5 De-__P(). 2000-11-30 23:12:43 +00:00
pk 58b6f2ef7d KNF patrol && De-__P(). 2000-11-30 23:06:44 +00:00
pk 03903e1da8 KNF patrol. 2000-11-30 23:01:03 +00:00
tsutsui 786dc5161c Clarify RX status header length and some cosmetics. 2000-11-30 15:51:57 +00:00
tsutsui fd4d074b27 After rev 1.16 rtk driver uses the CRC from the chip,
so no need to adjust Rx address for it. Fixes kern/11301.
2000-11-30 15:33:04 +00:00
thorpej 64222ad03a Fix some printf formats, and remove SPARC-specific debugging stuff. 2000-11-30 14:41:46 +00:00
pk 7006bcd449 Fix two cases of reversed arguments to printf(); 2000-11-30 09:58:03 +00:00
eeh 9e7aa98aa6 Add TAG QUEUE support to the ncr53c9x driver. 2000-11-30 00:19:25 +00:00
thorpej 997701c6c1 Define additional AC'97 registers. 2000-11-28 16:54:17 +00:00
ad 57ea462da2 lsu -> ld, by popular request. 2000-11-26 17:44:02 +00:00
takemura 3c9d9276dc Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
2000-11-26 11:08:57 +00:00
soren 290a66c213 Reduce probe noise. 2000-11-21 05:23:37 +00:00
sommerfeld acc196c4a9 Initialize ring buffer pointers when the ring buffer is allocated.
(comsoft() can be invoked before comopen() on serial consoles; a character
received before the console is opened "for real" can result in a fatal trap
unless the ring buffer pointers are initialized early)
2000-11-18 15:46:23 +00:00
bouyer 42681a6a9f Supports ETHERCAP_VLAN_MTU. Tested on sbus hme on Ultra/1.
Thanks to Andrei Petrov for the hint !
2000-11-17 19:08:00 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
thorpej 60f33f91c2 Pull in <uvm/uvm_extern.h> 2000-11-14 18:35:10 +00:00
thorpej 275539f03c NBPG -> PAGE_SIZE 2000-11-14 18:21:00 +00:00
pk 4c54ce2034 Define ncr53c9x_ioctl() and use it to start sync negotiation. 2000-11-13 15:24:22 +00:00
pk ad9bda9339 Change `nvram size' data type to `bus_size_t'. 2000-11-11 11:59:42 +00:00
pk 035ceca5b2 Add note about time-of-day and interval timer programming on this chip
are combined into the same (write-only!) control register.
2000-11-11 11:18:07 +00:00
pk 526def8fd1 Add a function to retrieve the size of the on-chip NVRAM area. 2000-11-11 11:03:31 +00:00
eeh faa5920bd2 Use the MI console magic sequence framework. 2000-11-08 23:13:03 +00:00
ad 142ab5b1ec Move lsu stuff to more logical locations, and push queueing into the lsu
driver.
2000-11-08 19:20:33 +00:00
wrstuden 88cbfbe36d Move guts of pciide_print_modes() to wdc_print_modes() so that non-pciide
wdc drivers (like macppc's obio IDE interface) can use it. Also add
support to both wd attach line and to wdc_print_modes() to print
Ultra/{33,66,100} for respective UDMA modes (From Manuel Bouyer).
2000-11-08 17:57:36 +00:00
thorpej d764c4d540 One more fix to multicast hash computation. Submitter confirms that
with this fix, multicast does indeed work properly on the EPIC.

From Zdenek Salvet <salvet@ics.muni.cz>.
2000-11-08 15:20:29 +00:00
chs b6b3ee8657 remove what looks to be a bit of leftover debug code. 2000-11-05 23:00:10 +00:00
thorpej aac73109ae Feh, fix st00p1d braino in last. 2000-11-05 05:41:25 +00:00
scw 3b5fce6c46 Invert the sense of i82586_init()'s return value so that
it matches what ether_ioctl() expects.
2000-11-04 19:48:38 +00:00
veego 232ac6b3d1 Print the vendor and chip id in the DPRINTF with 0x%x and not just %d. 2000-11-04 18:28:19 +00:00
thorpej 05d5f37522 Shadow the AC'97 codec registers. This adds two capabilities:
* support devices that crash when reading the codec registers; a flags
  interface is added to the host interface and one flag is defined
  (AC97_HOST_DONT_READ).
* new API (restore_ports) for restoring the user's settings.  This
  can be useful after an APM resume after a suspend to disk.

From OpenBSD.
2000-11-04 08:07:14 +00:00
thorpej 0bb6525f5b Add some more codec IDs. From OpenBSD. 2000-11-04 05:45:57 +00:00
tsutsui 39355e9743 Make this compilie with LANCE_REVC_BUG. 2000-11-03 06:21:32 +00:00
tsutsui d952450835 Wrap function declaration with "#ifndef sun3/#endif"
because sun3 does not have bus_space(9) support and
it have not switched to MI intersil7170 driver.

XXX We should split this into intersil7170{reg,var}.h ?
2000-11-03 05:23:07 +00:00
bjh21 930c4cf062 First attempt at multicast stuff. I suspect it doesn't work.
Use ether_ioctl -- saves 300 bytes of text.
2000-11-03 00:25:36 +00:00
bjh21 42e564ed45 Remove unnecessary includes.
Add a compiled-in RCSID.
2000-11-02 21:56:46 +00:00
bjh21 13234acd0f Convert to using ether_ioctl().
G/C huge swathes of unused code and outdated comments.
2000-11-02 21:42:41 +00:00
eeh 2a860a3de9 Adapt to the new line discipline scheme. 2000-11-01 23:54:57 +00:00
eeh f9a51c7b15 Clean up a #define that doesn't belong. Oops. That's what I get for
working this late.
2000-10-31 08:06:14 +00:00
eeh 37486bb837 Get the bpp driver to work properly. 2000-10-31 06:32:06 +00:00
mjl a7fcd8b686 Fix hanging token ring when data size is multiple of 514, using
patch in PR/11316 by YAMAMOTO Takashi.
This fixes random hangs I experienced, and probably also
remedies PR/11300 and PR/9321.
2000-10-31 01:22:08 +00:00
bouyer fc92601259 Fixes related to QUEUE FULL status:
- move status handling in siop_scsicmd_end(), it's better than in siop_intr()
- define 2 internal SIOP status, for "no status reported by device" and
  reset condition
- add a list of "urgent" command, to be executed before the list of command
  queued the normal way; this is used for command which got aborted
  by a QUEUE FULL and have to be requeued in order.
- Don't accept to send a Q_TAG message not immediatly folowing a IDENTIFY
2000-10-23 23:18:10 +00:00
bouyer 7777f61cbe Rearrange for script changes (scheduler core in main script, command part
of the scheduler in command table).
Add tagged command queuing support.
2000-10-23 14:56:16 +00:00
onoe 644aa13a51 Fixed the value of TULIPF_DBO; which was accidentaly shared with the same
value of TULIPF_BLE.  Pointed out by Enami-san.
2000-10-23 04:05:21 +00:00
bouyer 2ebf1a0cd0 Ops, sync the script DMA map when the script RAM *don't* exists. 2000-10-21 13:56:17 +00:00
bouyer e999ecae48 Support ETHERCAP_VLAN_MTU. Tested on a sparc 2 with:
le0 at sbus0 slot 0 offset 0xc00000 level 5: address 00:00:3b:86:19:92
le0: 8 receive buffers, 2 transmit buffers
2000-10-20 09:40:26 +00:00
mrg 0c6aa8d3ed ensure DMA mappings are not mapped streamable. fixes ethernet problems on
ultrasparc sbus class machines.  from eeh.
2000-10-20 06:08:02 +00:00
ad 67fe5fbbb4 Update for lsu; untested. 2000-10-19 14:28:46 +00:00
bouyer d239df5374 Adapt for script change: don't assume Ent_lun_switch_entry == 0 2000-10-19 07:22:06 +00:00
bouyer f629a0ae67 Ops, add proper bus_dmamap_sync() calls for reselect switch operations. 2000-10-18 20:06:54 +00:00
bouyer 9d3f5d7fbd Adapt for new lun switch script.
Implement SCBUSACCEL ioctl.
Snapshot of work in progress on tagged queuing: we can send/receive
queue tag messages. Infrastructure to manage multiple commands per
devices not here yet.
2000-10-18 17:06:52 +00:00
bouyer 9836ff3913 Looks like frame size isn't checked; just say we can do VLAN MTU.
Tested with a SMC9432TX.
2000-10-18 16:49:13 +00:00
bouyer f87b1573c3 Support ETHERCAP_VLAN_MTU by ignoring the EX_UPD_ERROR and EX_UPD_OVERSIZED
status bits. Tested with a 3c905-TX.
2000-10-17 16:16:52 +00:00
bouyer 5cc13a273b Support ETHERCAP_VLAN_MTU. It seems the chip doesn't check the frame size.
Tested with a NetVin 5000 and a WD8013EBT.
2000-10-17 16:14:42 +00:00
mjacob c64069308b Make changes relevant to changes in WWN defaults.
Also fix egregious bug where we would never decrement
the islocked recursion counter. I guess this means
that we don't recurse on this platform! All of this should
go away when we have real lock primitives to use in drivers.
2000-10-16 05:18:15 +00:00
mjacob c7c2783178 Change some of the WWN macros- eliminate PORT_FROM_NODE_WWN and make
sure we have a DEFAULT_{PORT,NODE}WWN and ISP_{NODE,PORT}WWN macro
as a requirement for all platforms.
2000-10-16 05:16:56 +00:00
mjacob ffdbddbd79 Add in commented-out hiwater measurement.
Remove egregious older bug which had us refusing to log into
fabric devices unless they were NL ports. Whuff.
2000-10-16 05:15:55 +00:00
mjacob 298ec0ecd9 Clarify/cleanup how node and port names are derived from nvram. Remove
clause 2 of licence. Remember to print initiator ID (LOGINFO level).
2000-10-16 05:15:05 +00:00
thorpej 4318834442 Don't trim off the FCS, pass it up. 2000-10-15 19:56:31 +00:00
bjh21 83666f01fa Shuffle printfs around so they look right when we've got a drive attached. 2000-10-14 23:45:57 +00:00
matt b885772956 The input packet has the FCS attached to set M_HASFCS before passing up.
Revove eh = ... since it's no longer used.
2000-10-14 20:06:02 +00:00
thorpej 2198741306 Use ether_ioctl(). 2000-10-11 16:57:45 +00:00
onoe fcde56c9ba Add flags to indicate that tlp_init() should set some more BUSMODE bits.
TULIPF_BLE	/* data is big endian */
	TULIPF_DBO	/* descriptor is big endian */
These setting is required for Big-endian bus front-end (such as APbus for
newsmips) to work with tulip.  Also,
	sc_maxburst
member is added to the tulip_softc to limit the maximum burst length.
This member defaults to zero which means no restriction for burst length.
2000-10-11 14:59:52 +00:00
itojun b69ea2a63d make it work right on non-32bit arch. from kjc@csl.sony.co.jp 2000-10-10 10:15:00 +00:00
enami db6fba6bdf Move inclusion of rnd.h and sys/rnd.h from tulip.c to tulipvar.h. 2000-10-09 14:31:01 +00:00
enami ca88e2b6bd Make tulip a random source. 2000-10-09 12:54:28 +00:00
nathanw 34f3869cdc Change int->bus_addr_t in com_kgdb_attach() prototype.
Compiles again with KGDB enabled.
2000-10-06 21:12:01 +00:00
bouyer f6bf6762ab Ops, disable debugging messages. 2000-10-06 20:07:10 +00:00
bouyer 171adcf634 Fix recurent typo: shed->sched 2000-10-06 16:39:04 +00:00
bouyer e353a6d9b2 Adapt for reselect handling from the script. While here, fix typo
(SIOP_SCXFER -> SIOP_SXFER).
2000-10-06 16:35:13 +00:00
bouyer 2e6cb6a878 When 802.1Q MTU, we have to ignore the Frame Too Long errors, and there's no
need to disable RWT and JAB.
2000-10-05 07:22:43 +00:00
tsutsui d11ef545cd Enable sanity checks in mk48txx_gettime().
(Many news68k have dead NVRAM.)
2000-10-04 17:00:45 +00:00
thorpej 5fcde4924f Support ETHERCAP_VLAN_MTU by igorning Receive Watchdog and Transmit Jabber
errors if VLANs are configured on the interface.
2000-10-03 23:35:55 +00:00
thorpej cbfe7605c9 Support ETHERCAP_VLAN_MTU by doing extra error checking upon packet
reception and saving other "bad frames" (i.e. ones that are larger
than the standard Ethernet frame length) if we have VLANs configured
on the interface.
2000-10-03 23:35:02 +00:00
simonb 5d4fa9b0ce Revert rev 1.31 of bha.c (and associtated changes in the headers and
config glue files).

Fixes PR kern/9841.  Tested by Tracy J. Di Marco White with a bt948
and 6 disks.
2000-10-03 14:07:36 +00:00
tsutsui 91959d389e Typo in comment. 2000-10-03 13:54:02 +00:00
tsutsui 33e8ebeef3 1970 -> POSIX_BASE_YEAR 2000-10-03 13:52:39 +00:00
thorpej 7edd5d54bc Add support for the ADMtek AN983 and AN985. 2000-10-03 04:32:00 +00:00
itojun 1af3d80bce fix compilation without INET. 2000-10-02 03:53:07 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
tsutsui 710c43c745 6 -> ETHER_ADDR_LEN 2000-09-28 10:56:57 +00:00
tsutsui ab9b015dce 6 -> ETHER_ADDR_LEN 2000-09-28 10:10:14 +00:00
sommerfeld 91178eae70 Add missing '&& defined(COM_MPLOCK)' 2000-09-26 14:12:42 +00:00
enami d52ba1b85f Fix merge lossage in disabled code. 2000-09-25 01:07:25 +00:00
jdolecek 5eb24d5dd0 am7990[0]_intr(): only print the "entering with isr=XX" debug message
if compiled with LEDEBUG > 1
2000-09-24 18:37:22 +00:00
jdolecek 5fea96167f use new generic bootverbose instead of local definition 2000-09-24 12:37:03 +00:00
sommerfeld 6a71867356 Add `COM_MPLOCK' option to use a device-instance-specific spinlocks
when running at splserial().  This is a temporary measure (until
there's a MP-safe interrupt handling structure); until then, it should
be used when MULTIPROCESSOR and IPL_SERIAL > IPL_SCHED.
2000-09-23 17:17:11 +00:00
bjh21 a48f581877 Substantial overhaul, factoring out of common code, removal of redundancy
and general cleanup.  Still not a beautiful driver, but one I'd be willing to
introduce to my parents now.
2000-09-23 15:13:02 +00:00
bjh21 65c1db338c paddr_t -> bus_addr_t in prototypes too. 2000-09-23 12:08:16 +00:00
eeh d651adf44a paddr_t -> bus_addr_t. 2000-09-22 14:46:38 +00:00
soren cf3c3f9410 Rename to match Ben's naming scheme. 2000-09-22 05:48:50 +00:00
eeh 56cf963264 Support for SPARC machines with `su' devices. 2000-09-21 23:27:32 +00:00
bjh21 f3ef35c447 Add rudimentary 80C04 support (basically saying "Oh look, an 80C04!").
Move printing the initial ":" into the board driver, like i82586.c does.
Don't bother printing the amount of RAM, as it's always 64 KB.
2000-09-21 22:20:38 +00:00
fvdl c5d8401866 Add support for the 3c555, 556 and 556B MiniPCI cards. Based on the
cardbus code and the FreeBSD xl driver.
2000-09-19 01:15:06 +00:00
bjh21 40aba7cd4d Split the arm26 Ether3 (ea) driver into an MI driver for the SEEQ 8005 chip,
and a front-end driver for the Ether3.  Only semantic change is to remove
ea_claimirq() and ea_releaseirq() on the grounds that the seem too spurious
to warrant a callback to the front-end.
2000-09-18 20:51:14 +00:00
toshii faf55ac40c Change tiocm_to_{com,zs}'s second argument to u_long to match with
the type in their caller.
2000-09-17 22:07:39 +00:00
drochner a960881851 -make the default screentype override less invasive, call it
VGA_CONSOLE_SCREENTYPE because the screen types are hardware specific
 and make it affect the console only (no need to change runtime
 behaviour), don't call vga_setscreentype() unless necessary (to avoid
 trouble with strange hardware - PR kern/11025)
-some beginnings of ISO-7 (greek) font support
2000-09-15 14:13:01 +00:00
lukem 6439b28202 * rename vga_stdscreen* -> vga_25lscreen*
* in vga_init(), set the screen type to WSCONS_DEFAULT_TYPE, which defaults
  to "80x25".
    XXX: the code currently makes no attempt to ensure that a font
	 with the appropriate width & height is available, effectively
	 limiting this default to either "80x25" or "80x24" at this
	 time.
* make wsdisplay_screentype_pick() non static, so that vga_init() can use it
2000-09-10 11:44:13 +00:00
ad 237007cd69 - Set CCB_ACTIVE flag in all cases when DIAGNOSTIC is defined.
- Correct arguments to bus_dmamap_create().
2000-09-08 12:16:17 +00:00
thorpej e79103cb0a Cast the arg to vtophys() to vaddr_t. 2000-09-06 18:48:36 +00:00
eeh 0d01e04003 Add support for write protecting clock registers. 2000-09-01 19:04:49 +00:00
drochner 641326ee44 -fix multicast filter programming
-support access to MII_ANER too for completeness
-remove some hacks which disappeared in FreeBSD if_rl.c
 rev. 1.25 (Aug 31 14:45:49 1999)
(the driver could need more updating, but this is what I've tested
for months)
2000-09-01 15:07:23 +00:00
ad f729f26133 FLUSH_CACHE will not return until complete. 2000-09-01 14:17:15 +00:00
ad 40f6cd2b96 The `cac' driver now frees CCBs on our behalf. 2000-09-01 12:23:57 +00:00
ad 671d7f91ae - Interface cleanup. static, const in places.
- Move convenience macros from cacreg.h to cacvar.h.
- Add one hardware check in DIAGNOSTIC case.
- Declare `cac_l0'.
2000-09-01 12:12:29 +00:00
ad ac2883e218 - Interface cleanup. static, const in places.
- Pull in linkage useful for both PCI and EISA boards from cac_pci.c.
- cac_ccb_done() now frees the done CCB if the CCB callback completes.
- Model-specific linkage is now responsible for DMA synchronization.
- Use wakeup_one() in cac_ccb_free().
- Start synchronous commands `manually'.
- Add one hardware check in DIAGNOSTIC case.
- Improve error messages.
- Start firmware background tasks on controllers that need it.
2000-09-01 12:11:37 +00:00
ad d8e5466776 - Move convenience macros from cacreg.h to cacvar.h.
- Define EISA board register set and some other magic numbers.
- Add missing elements to `struct cac_controller_info'.
2000-09-01 12:10:21 +00:00
haya ea9ef4ff69 Correct LED polarity bit. This bit and PHY power bit should be
defined in elinkxlreg.h.
2000-08-31 08:42:29 +00:00
haya 25147761ff Add support 3C[CX]FE575CT. 2000-08-29 08:54:50 +00:00
mjacob 37c83e1340 fix some missing initializations 2000-08-27 21:43:26 +00:00
haya 0e2c6c0cc1 Access on ELINK_W3_INTERNAL_CONFIG register with 32-bit mode. Remove
16-bit access code.  This register is 32-bit.  16-bit access with the
register causes data inconsistency (especially for CardBus cards).
2000-08-25 09:01:59 +00:00
jeffs d3afa878a2 Fix typo in SIATXRX_SPP comment. 2000-08-25 08:03:10 +00:00
haya 6cbde58ee4 Add flag defines for 3CCFE575BT and 3CCCFE575CT (CardBus cards). 2000-08-24 08:54:31 +00:00
thorpej 7951ece147 Use splsched() instead of splhigh(), and explain why in a comment,
as well as document a pitfall of the approach being used.
2000-08-21 14:25:14 +00:00
castor 0c05c0b9f2 Add register definitions for S.M.A.R.T. -- an autonomous disk monitoring
standard.
2000-08-21 03:53:55 +00:00
sommerfeld 8f5586c98f Avoid calling tsleep when running above splhigh() 2000-08-18 13:22:39 +00:00
bjh21 d7eebd9227 Basic driver for CHIPS 82C710 Universal Peripheral Controller and friends,
as used on later arm26 system (A5000, A4, A3010, A3020, A4000).

What we have got:
...
upc0 at iobus0 base 0x010000: config state bb 87 1c 00 00
fdc at upc0 offset 0x3f4 not configured
wdc0 at upc0 offset 0x1f0
lpt0 at upc0 offset 0x278
com0 at upc0 offset 0x3f8: ns8250 or ns16450, no fifo
...

What we haven't got:
 - FDC support (found, but not configured).
 - Clearing lpt interrupts on arm26 systems (needs help from IOEB).
 - A upc(4) manual page.
 - More than minimal testing (my A3020s don't have root devices).
 - A proper probe routine (arm26 can't use one anyway).
2000-08-16 23:56:08 +00:00
mjacob 4f5e77ca58 Change _res field in ispstatusreq_t to be req_response for FC.
Add some more FC specific response defines and split the response
defines into common, SCSI only and FC only cases.
2000-08-16 18:11:38 +00:00
mjacob d9162135d4 Add some changes/notes suggested by eeh@netbsd.org (zero header of
response queue entry). Clean up some of the Fibre Channel completion
stuff so that thing we check actually match the current manual. There's
only one silly lossage that the manual doesn't cover at present- if
an FC command completes with SV (sense valid), the f/w does *not* s
et "GOT_STATUS" in the state bits- I guess they assume that you'd figure
out that if you have SENSE DATA you probably have a CHECK CONDITION. Still-
yet another fine f/w frotz from Qlogic. Add in an ISP_EXEC_THROTTLE
define to set a per-device execution throttle.
2000-08-16 18:10:21 +00:00
thorpej f80d70f19a Just add the mmap argument to vga_common_attach(), don't bother
with vga_extended_attach().
2000-08-14 20:14:50 +00:00
onoe 7f6e2386a6 Make sure to reset length of data (len) and offset of mbuf (mlen) when
CRC is splitted into two mbufs in receiving.  This fixes panic or hangup
in arc4_encrypt() when WEP is enabled on awi.
2000-08-14 11:28:03 +00:00
mjacob ec701021fd Add a maintenance note. Fix QFREE and QAVAIL macros to match change in usage. 2000-08-14 07:12:15 +00:00
mjacob ed05406b77 Add a maintenance note 2000-08-14 07:11:14 +00:00
mjacob b1c18a6bc7 Add a maintenance note. Move the single bit tags of islocked and
onintstack to be real integers. Add ISP_ILOCK/ISP_IUNLOCK macros.

Fix the isp_lock/isp_unlock inlines to stop being so embarrassingly
in error. Why, or why, can't I have mutex_enter/mutex_exit, pretty please?
2000-08-14 07:10:09 +00:00
mjacob 22ef6ec857 Add a maintenance note. Change all splbio's to use the ISP_LOCK/ISP_UNLOCK
or ISP_ILOCK/ISP_IUNLOCK macros.
2000-08-14 07:08:12 +00:00
mjacob 8801250c70 Add a maintenance note. Add a cast to u_int16_t which will keep
Solaris lint && the SUNPro SC5.0 complier happy.
2000-08-14 07:06:50 +00:00
mjacob d7ee06672f Add a maintenance note.
Clarify some startup SCSI mode settings. Insist that the FC f/w options
*must* have ICBOPT_PDBCHANGE_AE set (wasted a half day on this crock).

Make a specific comment in isp_start that the tags being selected for FC
cards, in lieu of any set by the outer layers, are there for safety's sake.
This removes the change from a previous commit.

For the ISP_TOGGLE_TMODE function, do a complete reset, not just an
isp_init (info from Solaris port). Make some cleanup changes for
code clarity.
2000-08-14 07:05:28 +00:00
augustss 0390dd7f3e Fix spelling in comment. 2000-08-12 22:24:26 +00:00
tls c9dc8413bb Make our policy WRT tagged queueing consistent and sane: ordered tags for sync writes, simple tags for all else. Should make ahc and adv a bit more reliable (metadata writes won't get reordered incorrectly...) and isp a bit more performant (it was using ordered tags all the time). 2000-08-11 21:31:19 +00:00
thorpej 8cb7deb85b Add support for the DEC DE422 Ethernet, which is a DEPCA
attached to the EISA bus.  This board is commonly found
on Alpha Jensen systems.
2000-08-11 02:27:07 +00:00
tv 389bf995b5 %b -> bitmask_snprintf() 2000-08-09 01:56:33 +00:00
mjacob 0dc8c1fb35 Remove ispcmd_slow routine- SCBUSACCEL routine will set/clear tag/wide/sync.
Make some changes about where some things sit in the softc.
2000-08-08 22:58:30 +00:00
bjh21 4f33d5a8ab Register definitions for the C&T 82C710, 82C711 and 82C721, as used in
the Acorn A5000, A4, A4000, A3010 and A3020.
2000-08-08 22:14:53 +00:00
jeffs aaa5c58d70 Update arc map routine prototype to compile again. 2000-08-08 02:11:05 +00:00
briggs b103a8ca48 Label the buffer size as such on probe. 128 KB makes sense, but 4608 does not. 2000-08-06 00:19:04 +00:00
bouyer a8421d4787 Some W83781 have ID 0x11 instead of 0x10; handle these too.
Restore printing sdata for each sensors if DEBUG.
2000-08-03 09:27:01 +00:00
castor b6dd28b4ce Support some differences in the Macronix 98715AEC-C and E chips from the other
98715* series.

The MX98715AEC-[C,E] use a different location in the serial eerom for
LED control, and programming it with the original location's values
caused unpredictable behavior.

Also, start integrating fixes where media changes on an adapter
under load may fail.  There's more work to be done here, but I need
to sort out our internal changes a little more carefully.
2000-08-03 03:07:30 +00:00
jeffs e97c2066ab Add options DDB_BREAK_CHAR. This overrides break on the serial console
break character with the supplied one.  This is useful for cases where
break is hard to generate, or you are connected to a PC that "sends"
breaks when power cycled.  For this mode in com, interpret break char
in the polling section, which allows entry into the debugger before
the tty is opened.  Only supported in the com driver currently.
2000-08-03 00:30:47 +00:00