Commit Graph

12661 Commits

Author SHA1 Message Date
Matt Jacob
dd1419abe1 Support the DELL OEM 2312 cards (1077,6312).
Many thanks to Stormweb for making the h/w available for testing.

MFC after:	2 days
2005-01-23 06:23:55 +00:00
Warner Losh
5fb99dcabe Bring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from
a RealTek 8169SB.

PR: 74262
Submitted by: Yoshikazu GOTO-san

# Submitter notes that he's unsure of the revision string for 8169SB
2005-01-22 22:40:53 +00:00
Pawel Jakub Dawidek
1db17c6db2 - Don't destroy UMA zone on error in mdcreate_malloc(), because we need it
in mddestroy() to properly free already allocated memory.
  This fixes a panic when we want to create too big memory backed device
  with preallocate memory (-o reserve).
- Remove redundant { }.

MFC after:	1 week
2005-01-22 19:56:03 +00:00
Poul-Henning Kamp
9d3a77c463 Add a couple of mtx_asserts() to try to narrow down the window on
a bug repeatedly reported.
2005-01-22 19:08:50 +00:00
Warner Losh
327f4aba35 we don't need the offset in the attr memory to get the ethernet
address, nor do we need the alignment requirements, so eliminate them.
This likely means that we can now collapse some of the entries as we
have no need of them anymore (they match other entries and were there
only to get the right attr memory offset of the enet addr).
2005-01-21 19:51:23 +00:00
Poul-Henning Kamp
27d62ec5a6 Remove prototype of undefined function so this compiles again. 2005-01-21 10:19:17 +00:00
Warner Losh
3b36b3703e Rework pccard attachment a little. Now both of my fe based ethernet
cards work.  These changes depend on the expanded funce parsing that
just was committed to pccard_cis.c.  In NetBSD the ethernet address
was read out of attr memory directly.  We rely on the kernel pccard
parser to pulll this information out of what appears to be an obsolete
funce with the information in it.

# I'm still getting the no rx interrupt sometimes with some hub/switches
# for reasons unknown...  But usually only one and only when dhclient
# runs.
2005-01-21 02:14:40 +00:00
Warner Losh
9cdd39c25f Some older PC Cards have a weird format for FUNCE tuples. They appear
as type 0, rather than the usualy type 4.  Assume that this format is
from an old standard and go with it.  The Fujitsu FMV-186A and Silicom
Ethernet cards I have both have tuples with this format, and they are
both pretty old cards.

# if somebody knows for sure, please let me know.
2005-01-21 02:11:48 +00:00
Paul Saab
f3f8276732 Remove 6422, V100 and add the P600.
Submitted by:	John Cagle
2005-01-20 22:51:38 +00:00
Warner Losh
ca44231197 Don't print 'unknown id' in the ep_pccard_identify routine. It is
expected to be unknown in some cases, and printing it clutters up
things too much.
2005-01-20 20:36:59 +00:00
Warner Losh
40cc58261a Remove now-stale comment 2005-01-20 20:32:56 +00:00
Warner Losh
0c2c006362 Only attach to network functions. This should be a nop since I'm not
aware of any fe based cards that do anything except network (well,
maybe the fujitsu scsi/lan card, but I've only seen two of those on
ebay in the last 3 years).
2005-01-20 20:08:18 +00:00
Warner Losh
4a17d9141c Include necessary declarations 2005-01-20 20:06:44 +00:00
Warner Losh
9273a2b597 Only match ethernet functions. I've not seen any multifunction cards
(from a PC Card sense), so this should be a nop.  The
pseudo-multifunction cards (eg Silicom ones) need a special driver
anyway..
2005-01-20 20:03:37 +00:00
Warner Losh
e30d646d97 Only attach to network functions. I'm not aware of any multifunction
(pccard sense) sn based cards, but this won't hurt.  The
pseudo-multifunction cards need a special driver anyway...
2005-01-20 19:59:31 +00:00
Warner Losh
ca33f4678a Only attach to network functions (unlikely to matter since I'm not
aware of any multi-function cs cards, but it doesn't hurt).
2005-01-20 19:56:22 +00:00
Warner Losh
a20e4848bd u_intXX_t -> uintXX_t while I'm here. 2005-01-20 19:39:33 +00:00
Warner Losh
0409a8c387 Only attach to network functions. 2005-01-20 19:37:22 +00:00
Warner Losh
52cba392e0 u_intXX_t -> uintXX_t
Fix a comment
2005-01-20 19:32:37 +00:00
Warner Losh
c5c0655590 Use Intersil chip names for the symbols, since many makers use the
intersil IDs but their own name in the CIS.
2005-01-20 18:34:22 +00:00
Warner Losh
7610c28cf1 Add support for SENAO SL-2511CD
Info submitted by: Paulo Fragoso
2005-01-20 17:46:05 +00:00
Warner Losh
4cd3a82d7b Minor tweaks to properly order things. 2005-01-20 17:34:15 +00:00
Warner Losh
787a196bb7 Mask off the upper bits of the resource before using it as an index
into a small array.  Also, re-save the dev in attach to avoid
depending on side effects of the probe.

Weird stuff Reported by: jeffr
2005-01-20 17:27:37 +00:00
Bruce M Simpson
0502030614 Add device description for the Dell Remote Access Card (DRAC) III and IV
virtual COM port. This makes the use of the Dell OpenManage tools on FreeBSD
considerably easier, and is based on Chuck Cranor's original patch for 4.6.

Reviewed by:	imp
Tested by:	dpk at dpk dot net
MFC after:	1 week
2005-01-20 15:40:50 +00:00
Warner Losh
e1239d17fe Minor nit 2005-01-20 07:05:59 +00:00
Warner Losh
bec6d0ea5a Although USBVERBOSE was an option in the config system, usb_subr.c failed
to recognize that.  Include opt_usb.h to pick it up, rather than usb_port.h.
2005-01-20 05:03:28 +00:00
Warner Losh
b72e9f1719 Fix spelling error
submitted by: Anders Hanssen
2005-01-19 20:21:44 +00:00
Sam Leffler
aa959e0d17 Update support for 795x parts:
o rework pll setup code to follow h/w specification
o add hint.hifn.X.pllconfig to specify reference clock setup
  requirements; default is pci66 which means the clock is
  derived from the PCI bus clock and the card resides in a
  66MHz slot

Tested on 7955 and 7956 cards; support for 7954 cards not enabled
since we have no cards to test against.

In collaboration with Poul-Henning Kamp.

Reviewed by:	phk
MFC after:	1 week
2005-01-19 17:03:35 +00:00
Shunsuke Akiyama
1f41d5d83a Fix USB serial device stalled after tcflush() was called.
PR:		kern/65769
MFC after:	3 days
2005-01-19 15:18:00 +00:00
Warner Losh
973bfe6c4a MFp4: overhaul of resource allocation
Rather than have a twisty maze of special case allocations, move
instead to a data driven allocation.  This should be the most robust
way to cope with the resource problems that the multiplicity of ways
of encoding 5 registers that have the misfortune of not being a power
of 2 nor contiguous.

Also, make it less impossible that pccard will work.  I've not been able
to get my libretto floppy working, but it now fails later than before.

phk and I had similar ideas on this during the 5.3 release cycle, but
it wasn't until recently that I could test more than one allocation
scenario.

MFC After: 1 month (5.4 if possible, 5.5 if not)
2005-01-19 07:46:38 +00:00
Warner Losh
33481e9d67 MFp4: u_intXX_t to uintXX_t. 2005-01-19 07:37:32 +00:00
Warner Losh
0ca891272b Simplify aha resource management, and fix a few bugs in unwinding
error cases.
2005-01-19 06:54:10 +00:00
Warner Losh
c3bd3b5978 Call wi_free after we turn off the interrupts. If we call it before,
then we reference parts of the softc.

# My appologies, but this was sent to me by someone whose name I've lost.
2005-01-19 01:26:44 +00:00
John Baldwin
b0977ecfd7 Don't create new-bus resources for ACPI extended IRQ resources that are
producers rather than consumers as new-bus resources only handle consumed
resources.  We already do this for the other ACPI resource types that
support the producer/consumer attribute.
2005-01-18 20:21:36 +00:00
John Baldwin
5e15a08100 For the sake of consistency, look up link devices relative to the root
object (/) rather than the pci bus object when walking the _PRT to force
attach devices.  We already look up relative to the root object when doing
interrupt routing.

Suggested by:	njl
2005-01-18 20:20:32 +00:00
John Baldwin
94b3af82c1 - Add support for link devices where _CRS just outright fails to execute.
For such devices, we require _PRS to exist and we warn if any of the
  resources in _PRS are not IRQ resources (since we'll have no way of knowing
  which of those resources to use without a working _CRS).  When it does
  come time to set resources, we build up a resource buffer from scratch
  as we do for devices with _CRS that only have IRQ resources.
- Fix a bug with setting extended IRQ resources where we set the IRQ value
  in the wrong resource structure meaning that whichever IRQ was listed in
  _PRS was used instead.  This might fix some weird issues on certain boxes
  where IRQs > 16 don't seem to work when using ACPI.
- Fix a bug with how we walked the resource buffer after _SRS to call
  config_intr() in that the 'end' variable was not properly updated, so we
  could either terminate the loop early or loop after the end of the
  buffer.

Tested by:	pjd
2005-01-18 20:18:46 +00:00
Sam Leffler
c4dc6d1307 adjust tx buffer allocation based on empirical testing:
o increase the max per-frame tx descriptor count and the number of tx
  buffers for forthcoming fast frame support
o correct the max scatter/gather count; it cannot be larger than the
  max(tx,rx,beacon) descriptor counts
2005-01-18 19:42:17 +00:00
Sam Leffler
aab26fb481 add missing statistic 2005-01-18 19:33:06 +00:00
Sam Leffler
4c24deac20 disable interrupts when transitioning to INIT state so we don't rx frames 2005-01-18 19:31:31 +00:00
Sam Leffler
f6b8ec160d replace hand-rolled code to compact an mbuf chain with m_defrag; this is
suboptimal but needed for fast frames which won't fit in a single cluster
2005-01-18 19:28:49 +00:00
Sam Leffler
80d2765fe2 setup the beacon xmit queue to not interrupt; we don't use them and
they make the led's flash unnecessarily in adhoc mode
2005-01-18 19:10:17 +00:00
Sam Leffler
3e50ec2c95 better led blinking 2005-01-18 19:03:04 +00:00
Sam Leffler
0a1b94c44c add paren's so we can supply a|b as a debug mask 2005-01-18 18:11:04 +00:00
Sam Leffler
0b19ce1eb7 o disable pci retry timeout to avoid problems when operating in C3 state
(fix imported from madwifi by Takanori Watanabe)
o eliminate save/restore of pci registers handled by the system
o eliminate duplicate zero of the softc (noted by njl)
o consolidate common code

MFC after:	1 week
2005-01-18 18:08:16 +00:00
Warner Losh
ddd8ec50b0 Go ahead and match on CIS3 and CIS4 strings as well. These are NULL
for the vast majority of our cards.  However, they are critically
needed to distinguish different fe based PC Cards (the FMV-182 from
the 182A) which need to be treated differently (the ethernet address
is loaded not from the standard CIS-based ethernet tuples, but from
differing locations in attribute space based on the version string in
CIS3.  This should have no impact for other users of this function.
2005-01-17 06:54:48 +00:00
Scott Long
5b4a781b96 Lock the AMR driver:
- Introduce the amr_io_lock to control access to command queues, bio queues,
  and the hardware.
- Eliminate the taskqueue and do all completion processing in the ithread.
- Assign a static slot number to each command instead of doing a linear
  search for free slots each time a command is needed.
- Modify the interrupt handler to more closely match what Linux does, for
  safety.
2005-01-16 07:34:26 +00:00
David E. O'Brien
7c804097a4 Fix kernel builds with INVARIANTS. 2005-01-16 02:39:18 +00:00
Scott Long
bd1954cc37 Use bus_dmamap_load_mbuf_sg() for loading rx buffers. 2005-01-15 22:05:59 +00:00
Scott Long
0ab6412830 Convert if_em to the new bus_dmamap_load_sg() interface. The old callback
was really just a waste of cycles, so this streamlines it considerably.
2005-01-15 20:52:15 +00:00
Warner Losh
2dd5c91ebb Use the standard FreeBSD license
Approved by: imp, jon
2005-01-13 19:12:10 +00:00