Commit Graph

4882 Commits

Author SHA1 Message Date
Nick Hibma
8b677600f9 Sync with NetBSD:
Add more Usages.
2000-10-16 17:45:27 +00:00
Nick Hibma
b78cc80b0d Sync with NetBSD:
Add seatbelts.
Be more lenient towards restarting the ports: If a port manages to connect
successfully reset the restartcount.
2000-10-16 17:40:59 +00:00
Andrew Gallatin
68ab2e8672 The previous commit broke kernel builds on alpha (and probably ia64).
#ifdef away the offending code until somebody with more newbus fu than
me can figure out where to put a default function that returns 255
without touching each alpha chipset driver..
2000-10-16 15:38:11 +00:00
David E. O'Brien
146a7d5318 "Ok, my loader's now up to putting up a prompt. It probes disks partially
but can't boot from them yet."

Thanks to Stephane Potvin for the some of the code in this set.

Submitted by:	Benno Rice <benno@jeamland.net>
2000-10-16 10:46:22 +00:00
Ruslan Ermilov
df4443ffa6 Added support for i815. 2000-10-16 08:53:00 +00:00
Warner Losh
9344caaf08 First cut at allocating the resources from the CIS after the probe, but
before the attach.  Things aren't completely working, but this is a good
checkpoint.

Also, initialize the dev member of the function as soon as we add it
to the parent.
2000-10-16 07:51:12 +00:00
Warner Losh
9bf4bbcaf7 When a pci device hasn't had an interrupt routed to it (signified by
the intline of 255) go ahead and route the interrupt when we allocate
an interrupt.

Submitted by: msmith
2000-10-16 07:24:00 +00:00
Mike Smith
1b97a6c6a9 Network modules are all "if_foo" not "foo". Avoid the confusing spew that
ensues when ifconfig tries to load if_ed.ko when it's already in the kernel.
2000-10-15 20:23:27 +00:00
Warner Losh
d62abc771f Lots of little fixes. We no longer panic on card insert:
o initialize ivars with bzero.
o remove interrupt function pointer.  netbsd needs it, but we don't.
o add lots of comments about bogus things that I've been kludging to try
  to make the simple cases work.
o add new ivar accessor for cis4 to match cis3.  likely neither will be
  needed, but it doesn't hurt to have it.
2000-10-15 17:21:50 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Poul-Henning Kamp
398bc678aa Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
Peter Wemm
ada54f9e54 Untangle some resource matching loops that were getting on my nerves
and seemed to be getting cut/pasted to places they shouldn't be.
2000-10-15 08:50:45 +00:00
Poul-Henning Kamp
1f22e63352 Remove even more unneeded #includes. 2000-10-14 17:37:32 +00:00
Poul-Henning Kamp
2d99f9a72c Remove even more nneeded #includes. 2000-10-14 15:57:44 +00:00
Mark Murray
a6278a2a42 After some complaints about the dir names, the random device is
now in dirs called sys/*/random/ instead of sys/*/randomdev/*.

Introduce blocking, but only at startup; the random device will
block until the first reseed happens to prevent clients from
using untrustworthy output.

Provide a read_random() call for the rest of the kernel so that
the entropy device does not need to be present. This means that
things like IPX no longer need to have "device random" hardcoded
into thir kernel config. The downside is that read_random() will
provide very poor output until the entropy device is loaded and
reseeded. It is recommended that developers do NOT use the
read_random() call; instead, they should use arc4random() which
internally uses read_random().

Clean up the mutex and locking code a bit; this makes it possible
to unload the module again.
2000-10-14 10:59:56 +00:00
Bill Paul
4c2efe270a Clean up a few things in dc_setcfg() pointed out to be me by
aaron@openbsd.com on IRC earlier today.
2000-10-14 00:40:14 +00:00
Jonathan Lemon
834801e8af Look at both the vendor and subvendor information when determining
whether this is a Smart Array.  This fixes a problem where the driver
would incorrectly match a Dell RAID device.

Reviewed by: msmith
2000-10-13 23:34:47 +00:00
Bill Paul
a95b77ec78 Remember to assign an_dev to device_t before calling an_attach(). 2000-10-13 22:04:20 +00:00
Bill Paul
736f03e49a Convert the Aironet driver to use mutexes instead of spls. 2000-10-13 21:58:36 +00:00
Paul Saab
16a011f973 Do not allocate a callout for all crashdumps, not just when you panic. 2000-10-13 21:49:19 +00:00
Bill Paul
9fa3f7b0f2 Update the wi driver to use mutexes instead of spls. 2000-10-13 20:33:24 +00:00
Bill Paul
d308faacc2 Add #include <machine/mutex.h> since these files need it and don't
include anything else that includes mutex.h. Needed to resolve struct mtx
from struct dc_softc.
2000-10-13 19:15:50 +00:00
Chuck Paterson
f59dd3ae6a Make mutex name reflect device driver name.
Destroy mutex when detaching the device.
Submitted by: John Baldwin <jhb@FreeBSD.ORG>
2000-10-13 18:59:29 +00:00
Bill Paul
1e856a7b34 Use device_get_nameunit(dev) as the mutex string when calling
mtx_init() instead of hard-coded string constant. Also remember to do
the mutex changes to the ste driver, which I forgot in the first commit.
2000-10-13 18:35:49 +00:00
Bill Paul
d1ce910572 First round of converting network drivers from spls to mutexes. This
takes care of all the 10/100 and gigE PCI drivers that I've done.
Next will be the wireless drivers, then the USB ones. I may pick up
some stragglers along the way. I'm sort of playing this by ear: if
anyone spots any places where I've screwed up horribly, please let me
know.
2000-10-13 17:54:19 +00:00
Bruce Evans
3d7613a6e2 Avoid impending world breakage.
1. Don't include <sys/conf.h> in userland.  It is not used, and including it
   without including its prerequisite <sys/time.h> should have broken the
   world.
2. Don't include <sys/mount.h>.  It is not used, except in -current it
   bogusly includes <sys/stat.h> which bogusly includes <sys/time.h> and
   thus accidentally provides the prerequisite in (1).
3. Cleaned up nearby include messes.

Not approved by despite 5 weeks notice: MAINTAINER
2000-10-13 13:43:37 +00:00
Søren Schmidt
e9cf6115e4 Add support for ATA "pseudo" RAID controllers as the Promise Fasttrak
and HighPoint HPT370 controllers.

Use by defining the RAID in the BIOS and the "ar driver will pick it up
automagically...
2000-10-13 13:04:45 +00:00
Søren Schmidt
8d8f318a08 Fix ISA only systems. 2000-10-13 12:09:23 +00:00
Søren Schmidt
2c483f9eb5 Get rid of the ivars entirely. 2000-10-13 11:21:27 +00:00
Søren Schmidt
b656ee68ec Only allow UDMA2 mode on SiS rev > 0xc1
Minor cosmetics
2000-10-13 10:54:47 +00:00
Matt Jacob
e5d4e19714 Make changes required by change in how default and usable node and port
WWNS are made and used.
2000-10-12 23:59:40 +00:00
Matt Jacob
c914d4237d Redo how default Node and Port WWNs are determined (again!). This is so
we don't stomp on the differences between ports for a Qlogic 2202.
2000-10-12 23:49:09 +00:00
Matt Jacob
9cf43b9716 Change some default macro usages/definitions/requirements. 2000-10-12 23:47:03 +00:00
Bruce Evans
00d8d16417 Don't depend on <machine/cpufunc.h> unnecessarily including <machine/lock.h>. 2000-10-12 16:15:24 +00:00
Justin T. Gibbs
60754d0ba3 Bring back the ability to send cdbs of length 13->32 bytes. This was lost
during the qinfifo optimization.  When swapping HSCBs, we were only copying
the first 32 bytes, the amount used in the common case of a cdb <= 12 bytes.
Larger cdbs are stored in the second 32 bytes of the cdb.

Noticed by: Marc Frajola <marc@terasolutions.com>
2000-10-12 14:36:27 +00:00
Poul-Henning Kamp
67b0d5b9ea Remove the #include kitchensink <netatm/kern_include.h> and add
the #includes to the respective source files.

Also un-nest includes in <dev/hfa/fore_include.h>

I have run src/tools/tools/kerninclude to remove 1239 clearly
unneeded #includes reducing the total from 3524 includes to 2285.
2000-10-12 08:14:20 +00:00
Poul-Henning Kamp
67467625e2 More HARP polishina:
unifdef -UFORE_SBUS -DFORE_PCI
s/ATM_KERNEL/_KERNER/g
2000-10-12 07:42:34 +00:00
Warner Losh
5984fd1d1f Another PnP pcic card: SMC Swapbox Plug and Play
Submitted by: gallatin
2000-10-12 03:51:16 +00:00
Bosko Milekic
20f1c8364b Make if_sk stop using the "hide the softc structure in the jumbo buffer"
now that the mbuf system can handle passing it to the driver itself.

Reviewed by: wpaul
Tested by: wpaul (Bill Paul) with "jumbograms" enabled
2000-10-12 02:42:25 +00:00
Mike Smith
b1e68a44b5 Reduce the number of outstanding commands we will send to the controller
to 50.  This has been reported to avoid the problems that many users have
been experiencing with crashing the card firmware during rebuilds.
2000-10-12 01:43:40 +00:00
Warner Losh
da8e360acf sync to last commit 2000-10-12 00:16:19 +00:00
Warner Losh
0ac8fcedf1 Add mii entry for tdk phy found on some cardbus cards. 2000-10-12 00:15:10 +00:00
Poul-Henning Kamp
6cb2a0952f Do some cleanups of the HARP atm codes interface into the system:
Define the NETISR just like all the other NETISRs.

unifdef -Usun -D__FreeBSD__  we will probably never support sun4c
and if we do we can't use the solaris code anyway and  I doubt
anybody will be running Fore ATM cards in then in the first place.
2000-10-12 00:03:50 +00:00
Justin T. Gibbs
70351c9a14 Store a pointer to our softc in the kernel's SCB structure. In the
past we stored this data in the CCB and attained the CCB via a pointer
in the SCB.  In ahc_timeout(), however, the timedout SCB may have already
been completed (inherent race), meaning that the CCB could have been recycled,
and the ahc pointer reset.

Clean up the logic in ahc_search_qinfifo that deals with the busy device
table.  For some reason it assumed that the only valid time to search
to see if additional lun entries should be checked was if lun 0 matched.
Now we properly itterate through the necessary luns.  The busy device
table is used to detect invalid reselections, so a device would have had
to perform an unexpected reselection for this to cause problems.  Further,
all luns are collapsed to a single entry unless we have external ram
with large SCBs (3940AU models) so the chance of this happening was
rather remote.

Clean up the logic for dealing with the untagged queues.  We now set a
flag in the SCB that indicates that it is on the untagged queue instead
of inferring this from the type and setup of the CCB pased into us by
CAM.

In ahc_timeout(), don't print the path of the SCB until the controller
is paused and we are sure that it has not completed yet.  This, in
conjunction with referencing the ahc pointer in the SCB rather than
the CCB in the SCB avoids panics in the case of a timedout scb completing
just before the timeout handler runs.  This turns out to be guaranteed
if interrupt delivery is failing, as we run our interrupt handler to
flush any "just missed events" when a timeout occurs.  Mention the
likelyhood of broken interrupts if a timedout SCB is completed by
our call to ahc_intr().
2000-10-11 23:46:34 +00:00
Jun Kuriyama
0a13e042b1 Add missing comma at the end of line. 2000-10-11 01:12:55 +00:00
Bill Paul
00a9155349 Add support for the Kingston KNU101TX 10/100 USB ethernet adapter. We're
up to 11 of these now.
2000-10-10 23:45:17 +00:00
Bill Paul
5a68c7769a regenetate 2000-10-10 23:24:45 +00:00
Bill Paul
5ccd443674 Add vendor ID for Kingston Technology and add device ID for
KNU101TX USB ethernet adapter. (Yes, another one.)
2000-10-10 23:23:54 +00:00
Doug Rabson
530f610f02 A quote from the ia64 compiler:
`char' is promoted to `int' when passed through `...'
	(so you should pass `int' not `char' to `va_arg')
2000-10-10 14:18:50 +00:00
Nick Hibma
8e6f860ac9 Remove unneccessary includes. (phk) 2000-10-10 12:41:46 +00:00