Commit Graph

1468 Commits

Author SHA1 Message Date
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
Ruslan Ermilov
df4443ffa6 Added support for i815. 2000-10-16 08:53:00 +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
Bill Paul
67db683bc9 Fix one instance of XL_LOCK() that should have been XL_UNLOCK(). After
doing this so many times, I guess I was entitled to at least one typo.
Thanks to all who spotted this.
2000-10-15 21:15:38 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Alan Cox
34fc4aef48 Recognize the ServerWorks IB6566 south bridge. 2000-10-14 23:16:42 +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
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
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
0441aa9a52 Validate the PCI bus number that we fetch from our parent, since there's no
guarantee that everything attached to *it* is a PCI bus.
2000-10-09 00:43:45 +00:00
Bill Paul
6202589a40 When leaving suspend mode after enabling/disabling the promisc mode bit,
make sure the chip is restarted by issuing a start command to the command
register. Sometimes the receiver doesn't restart after leaving suspend
mode.
2000-10-06 22:54:41 +00:00
Bill Paul
bd57768e0f Add the card ID for the Am79c975 PCnet/FAST III card. This is a variant
of the Am79c973 with "AlertIT Technology," whatever that is. Also mention
support for the PCnet/FAST III cards in the documentation. The
PCnet/FAST III chips have integrated 10/100 PHYs.
2000-10-05 19:40:19 +00:00
John Baldwin
cfbe8cbed5 - Add another PCI Id for a Lucent Win Modem.
- Change the chip description to use mixed-case so it is consistent and
  doesn't yell at the user during boot.
2000-10-05 18:00:56 +00:00
Bill Paul
5c1cfac46e Add support for parsing the media blocks from the SROM on 21143
adapters. This is necessary in order to make this driver work with
the built-in ethernet on the alpha Miata machines. These systems
have a 21143-PC chip on-board and optional daughtercards with either
a 10/100 MII transceiver or a 10baseT/10base2 transceiver. In both
cases, you need to twiddle the GPIO bits on the controller in order
to turn the transceivers on, and you have to read the media info
from the SROM in order to find out what bits to twiddle.
2000-10-05 17:36:14 +00:00
Jason Evans
a18b1f1d4d Convert lockmgr locks from using simple locks to using mutexes.
Add lockdestroy() and appropriate invocations, which corresponds to
lockinit() and must be called to clean up after a lockmgr lock is no
longer needed.
2000-10-04 01:29:17 +00:00
Bill Paul
e0b8bc252f Add support for the AMD Am79c976 PCnet/PRO controller chip. For now
this just involves adding the chip ID to the supported list: the PCnet/PRO
is compatible with the PCnet/FAST+ and friends and should "just work"
with this driver.

Also try to handle mbuf allocation failures in the receive handler
more gracefully.
2000-10-03 18:11:36 +00:00
Archie Cobbs
645d61ffeb Add definition for PCIS_SERIALBUS_SMBUS PCI device subclass.
Remove cut & paste leftovers.
2000-10-02 00:41:43 +00:00
John Baldwin
2ea498b2e5 Recognize the ATI Rage128-LF Mobility AGP video adapter. 2000-09-29 21:15:02 +00:00
John Baldwin
7fa6b7c01e Spelling police in a comment: Defalut -> Default. 2000-09-29 21:14:05 +00:00
Peter Wemm
b6c8407840 Get out the roto-rooter and clean up the abuse of nexus ivars by the
i386/isa/pcibus.c.  This gets -current running again on multiple host->pci
machines after the most recent nexus commits.  I had discussed this with
Mike Smith, but ended up doing it slightly differently to what we
discussed as it turned out cleaner this way.  Mike was suggesting creating
a new resource (SYS_RES_PCIBUS) or something and using *_[gs]et_resource(),
but IMHO that wasn't ideal as SYS_RES_* is meant to be a global platform
property, not a quirk of a given implementation.  This does use the ivar
methods but does so properly.  It also now prints the physical pci bus that
a host->pci bridge (pcib) corresponds to.
2000-09-28 00:37:32 +00:00
Jason Evans
9a02e8c68f Don't #include <sys/proc.h>, since machine/mutex.h does it now. 2000-09-23 00:01:37 +00:00
Paul Saab
7321545f26 Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,
NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP.

Reviewed by:	peter
2000-09-22 23:40:10 +00:00
Bill Paul
d9c1afbeab Typo in comment (decent performances -> decent performance). 2000-09-22 04:03:10 +00:00
Bill Paul
325931c901 Make pcn_miibus_readreg() latch onto the first PHY that it finds (as
a result of mii_phy_probe()) and use that rather than hardcoding a
constant. The hardcoded way was too specific to the particular card
I had and caused PHY probing to fail on at least one laptop with a
built-in AMD chip.

Reported by: rjk@grauel.com (Richard J Kuhns)
2000-09-22 03:49:12 +00:00
Matt Jacob
aa57fd6fa5 some copyright cleanups 2000-09-21 20:16:04 +00:00
Bill Paul
b2f5cb03e7 Add the PCI device ID for the on-board ethernet controllers on the
Intel 815E motherboard, which I believe is an i82562. Seems to work
just fine with the fxp driver.
2000-09-21 20:01:57 +00:00
Bill Paul
94741b4657 Remove one debug line that snuck in by accident. 2000-09-20 17:32:17 +00:00
Bill Paul
73334a4329 Add a new driver for the AMD PCnet/FAST, FAST+ and Home PCI adapters.
Previously, these cards were supported by the lnc driver (and they
still are, but the pcn driver will claim them first), which is fine
except the lnc driver runs them in 16-bit LANCE compatibility mode.
The pcn driver runs these chips in 32-bit mode and uses the RX alignment
feature to achieve zero-copy receive. (Which puts it in the same
class as the xl, fxp and tl chipsets.) This driver is also MI, so it
will work on the x86 and alpha platforms. (The lnc driver is still
needed to support non-PCI cards. At some point, I'll need to newbusify
it so that it too will me MI.)

The Am79c978 HomePNA adapter is also supported.
2000-09-20 17:30:22 +00:00
Søren Schmidt
e7590dc69d Clean up the VIA id's a bit and add the K[TX]133 chipsets 2000-09-20 07:05:44 +00:00
Bill Paul
857fd445c3 If this is a Davicom DM9102A and we're enabling the homePNA link, force
dc_link to 1 and don't activate the tick routine. Without this, dc_start()
always thinks the link is down and never transmits in homePNA mode.
2000-09-20 00:59:17 +00:00
David Greenman
9492779067 Removed NetBSD support, which bit-rotted long ago.
Changed new SMP locking macros given the new situation.
2000-09-18 21:12:19 +00:00
David Greenman
7d854d93af Added a couple more missing FXP_SPLVAR()'s. 2000-09-17 23:23:22 +00:00
David Greenman
b184b38e2b As a minor optimization, do suspended checking more like it was originally
in the PR - before the while loop.
2000-09-17 23:04:57 +00:00
David Greenman
04ea20fcf4 Added missing FXP_SPLVAR() to fxp_intr(). 2000-09-17 22:59:58 +00:00
David Greenman
2053b07d7e Attempt to replicate the new fxp SMP locking in the changes committed
in the previous (APM suspend/resume) commit.
2000-09-17 22:20:33 +00:00
David Greenman
7dced78a28 Added support for APM suspend/resume.
PR:		18756
Submitted by:	mike ryan <msr@elision.org>, with modifications by me.
2000-09-17 22:12:12 +00:00
Chuck Paterson
87807fded9 Add include of proc.h to make compile without SMP defined. This
change is likely interm, the include happens automagically
when SMP is defined.

Obtained from:	Jason Evans.
2000-09-17 22:01:21 +00:00
Chuck Paterson
0f4dc94cfc Add locking to make able to run without the Giant lock being held. This
is enabling as all entries are still called with Giant being held.
Maintaining compatability with NetBSD makes what should be very simple
kinda ugly.

Reviewed by:	Jason Evans
2000-09-17 13:26:25 +00:00
Justin T. Gibbs
cb4d93cdbf Add PCIM_CMD_MWRICEN, the bit in the command register in PCI space
that enables memory write and invalidate cycles on a bus master.
2000-09-16 20:06:13 +00:00
Poul-Henning Kamp
574abd2926 Make LINT compile again. 2000-09-16 18:46:05 +00:00
John Baldwin
9a94c9c5c3 - Remove the inthand2_t type and use the equivalent driver_intr_t type from
newbus for referencing device interrupt handlers.
- Move the 'struct intrec' type which describes interrupt sources into
  sys/interrupt.h instead of making it just be a x86 structure.
- Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd'
  and 'struct intrec'
- Move the code to translate new-bus interrupt flags into an interrupt thread
  priority out of the x86 nexus code and into a MI ithread_priority()
  function in sys/kern/kern_intr.c.
- Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and
  sys/pci/pci_compat.c.
2000-09-13 18:33:25 +00:00
Matt Jacob
e11a1ee870 Per msmith's request, don't attach to Qlogic 12160 id'd cards that have
a certain SubVendorID.
2000-09-07 20:27:40 +00:00
Bill Paul
78999dd117 Special-case the LED twiddling code so that it doesn't do anything
on the NEC VersaPro NoteBook PC. This 21143 implementation has no LEDs,
and flipping the LED control bits somehow stops it from establishing
a link. We check the subsystem ID and don't flip the LED control
bits for the NEC NIC.
2000-09-07 18:51:04 +00:00
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Poul-Henning Kamp
bfb752885a Register resources in a more opportune order for the hardware. 2000-09-05 21:08:48 +00:00
Peter Wemm
741f2944a9 Add compaq hotplug PCI device id.
Tidy up some loose ends.  Be a little more consistent how the ign driver
probes with the rest of the drivers in this file.
2000-09-05 00:33:22 +00:00
Peter Wemm
28ea1bf869 When dumping the 'found devices' list in verbose mode, actually show the
bus/slot/function numbers.  The old PCI code used other markers or
something, but without it here under the new pci code it is very hard to
tell which device is which (this only affects bootverbose mode).
2000-09-05 00:32:19 +00:00
Peter Wemm
edc31306f7 Fix pci-pci bridges (I hope).
In the nexus case, there are no ivars for children of nexus devices,
and we were passing data in from before the device existed, hence ivars
are convenient as the softc doesn't really exist yet.
However, for pci->pci bridges, the pcib occupies a pci device itself,
which *does* already have ivars.  However, softc is available and stable
at this point since we've been identified and are locating the bus during
attach.  So, use softc for this version of pcib devices for storing the
physical bus number in.
2000-09-03 08:30:10 +00:00