Commit Graph

19742 Commits

Author SHA1 Message Date
jonathan ba2e141969 TCP Segmentation Offload (TSO) add-on firmware for the
Broadcom bcm5703/bcm5704, and bcm5705, respectively.

Taken verbatim from the Linux-2.6.12.3 tg3 driver, where the firmware
is explictly marked as non-GPLed (hex-encoded binary blobs are not in
source form, and therefore violate the terms of the GPL), along with
the Boradcom non-GPL copyright allowing distribution of this
hex-encoded firmware.
2005-12-15 17:37:03 +00:00
reinoud cdfee8349d Allow SCIOCCOMMAND ioctl that executes a SCSI command to also be issued
within the kernel when the FKIOCTL flag is passed to the ioctl.

No code actually uses this yet but is committed for completion.
2005-12-14 21:55:47 +00:00
bouyer fc1d07dd69 Only VNDIOCSET needs a valid process context, so don't blindly
dereference l, test it l is NULL first.
Fix exporting a vnd device to a XENU domain.
2005-12-14 19:49:16 +00:00
christos d4d0b2f85f whitespace. 2005-12-14 00:41:17 +00:00
christos 9f7f6692b9 proc -> lwp 2005-12-14 00:35:31 +00:00
cube 9af385388e machdep.acpi_root -> hw.acpi.root, as discussed on source-changes. 2005-12-13 23:27:31 +00:00
abs 97ca1ffebb Update some missed _close() and _open() functions from 'struct proc *p'
to 'struct lwp *l'.
2005-12-13 20:55:46 +00:00
dyoung 47b698d0b8 Fix comments and debug printfs: Tx FIFOs underflow, they don't
overflow.
2005-12-13 05:10:55 +00:00
dyoung 830e4be4c8 On a transmit FIFO overflow (err, actually an underflow...) reset
both the transmit & receive sections of the MAC.
2005-12-13 05:07:14 +00:00
elad a9505be892 Add and document a "query" keyword to veriexecctl. Usage:
/sbin/veriexecctl query /path/to/file

will print out filename, device, inode, evaluation status, entry flags,
fingerprint, and fingerprinting algorithm.
2005-12-12 21:47:58 +00:00
jonathan e66e62e9be Fix silly cut-and-paste typo (CSR_READ(sc, BGE_MARBMODE_ENABLE),
should obviously have been CSR_READ(sc, BGE_MARB_MODE) incurred during
my backport of 5714/5715 support from my netbsd-3 development branch,
back into -current.
2005-12-12 19:58:11 +00:00
elad 6590e0e201 Catch up with ktrace-lwp merge.
While I'm here, stop using cur{lwp,proc}.
2005-12-12 16:26:33 +00:00
cube 3de4cab6f7 Move the (one liner) logic of AcpiOsGetRootPointer() out of acpica/Osd to
acpi.c and take the opportunity to create a sysctl node that contains the
address of the main ACPI table.

The name of the node, "machdep.acpi_root", is questionable but matches the
one FreeBSD has, which will make it easier to port their acpidump(8)
program.
2005-12-12 15:04:50 +00:00
christos 5ecdc5e2d0 welcome to the new lwp world. 2005-12-12 02:44:09 +00:00
christos dac64af055 more proc -> lwp 2005-12-12 01:18:29 +00:00
christos d014803b83 more proc->lwp changes. 2005-12-12 01:14:22 +00:00
jonathan cc474061e1 Add support for bcm5714 and (possibly incorrect) support for the
bcm5715 PCI-Express dual-port NICs. Taken from the Broadcom-supplied
Linux driver, bcm-8.3.13a.

Add nascent support for the bcm5780, but (since I have no bcm5780 to
test), don't yet add an entry which allows us to match or attach to a
5780.

Change 5752 support: Follow the lead of the Broadcom-supplied Linux
driver (bcm) and the Linux tg3 driver, and treat the 5752 like a 5750.
2005-12-12 00:40:44 +00:00
rpaulo 3b3e91ace3 More ktrace-lwp merge. 2005-12-11 23:42:33 +00:00
simonb ae278e7e7d Remove blank line added to end of file by previous change. 2005-12-11 23:34:27 +00:00
reinoud 700d0843b3 Add SCSI calls for read discinfo and read trackinfo. Also add the various
read toc formats returned.
2005-12-11 23:26:31 +00:00
christos 4040537d5e make this compile again (from Johnny Billquist) 2005-12-11 23:17:10 +00:00
jonathan 291fa16d03 Regen after pcidevs rev 1.746, 1.747 (Add device IDs for LSI Megaraid,
and Intel IDs for  software-compatible Intel RAID products).
2005-12-11 20:01:48 +00:00
jonathan 86cd178b0d Remove extraneous //// markers of potential conflict in last commit. 2005-12-11 19:59:06 +00:00
jonathan 7871d4095b Add pcidevs entries and support to amr(4) for newer LSI MegaRAID devices,
including the LSI MegaRAID SCSI 320-0x, 320-2x, 320-4x, 320-1E, 320-2E,
the LSI MegaRAID SATA 300-6x and 300-8x.

Tested on an LSI MegaRAID SATA 300-8x, which confirms private advice
that after PCI-IDs to our amr(4) driver, the newer LSI MegaRAID cards
will Just Work

The Linux megaraid2 driver accepts various Intel cards with the same
pci-device IDs as the LSI MegaRAID cards, treating them exaclty as the
above-listed LSI cards. Rework our amr(4) driver to also match and
attach those device-ID if seen with an Intel vendor-ID. Add the
Intel-vendor PCI decice-ids to pcidevs, so that PCI_VERBOSE will
correctly identify the Intel cards.

Update src/share/man/man4/amr.4 to list the newly-supported cards.

(NB: I don't have the LSI SCSI or any Intel cards to test, just the
LSI SATA, which works fine for me.)
2005-12-11 19:34:47 +00:00
rpaulo c747cf7094 Add NSC (NSC6001) IRDA device. 2005-12-11 18:48:51 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
reinoud 17f915ee27 Fix illogical use of extra variable. It was mainly to get a better
readability in KNF. This solution gives better readability without the
extra variable.
2005-12-11 00:01:54 +00:00
reinoud 705000f60a Second stage of read TOC modifications. Introducing the various forms of
TOC reading. Note that the external interfaces haven't changed. Only the
formatted toc is requestable.

The read msinfo command hasn't been changed in this patch though it could
become more clever using the CD_TOC_MSINFO format.
2005-12-10 21:17:21 +00:00
jonathan 9262e4dab5 regen from pcidevs rev.1.745 with IDs for broadcom bcm5714, bcm5715, bcm5780. 2005-12-10 19:05:46 +00:00
jonathan 513e2c3670 Add PCI device entries for Broadcom Ethernet devices: PCI-Express
gigabit bcm5714 (copper), bcm5714S (serdes), bcm5715 (copper),
bcm5715S (SERDES), also bcm5780 (copper) and bcm5780S (SERDES).

Extracted from Broadcom-supplied Linux driver and from prerelease patches
for Linux-2.6.15.
2005-12-10 19:03:22 +00:00
jonathan 8fdab8c431 Oops! Restore brgphys[]z stanza for bcm5705 integral PHY, somehow
lost in the previous addition of the bcm5714 integral phy.
2005-12-10 03:03:34 +00:00
elad f39afe3e47 Add and document a VERIEXEC_DELETE operation for Veriexec.
We can now delete an entry from the tables using

	veriexecctl delete /path/to/file

or remove an entire table using

	veriexecctl delete /mount_point

(any directory will work for the mount point it's on)
2005-12-10 02:10:00 +00:00
elad b302da6341 Refactor the code that creates a new table and loads entries to its own
functions (veriexec_newtable and veriexec_load). No functional change.
2005-12-10 01:04:17 +00:00
xtraeme bddfd2ef4d regen 2005-12-09 10:46:00 +00:00
xtraeme dd06e46f96 Add two VMware SVGA device ids. 2005-12-09 10:45:28 +00:00
bouyer 514622c61f Adapt previous change to recent scsipi. Pointed out by Simon Burge. 2005-12-09 09:24:30 +00:00
yamt 6bba73019a use VM_PAGE_TO_PHYS macro. 2005-12-08 22:41:44 +00:00
bouyer dd5eb5979f Some USB devices reports themselves as removable, but have no door and
so don't support the SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL command.
When an "Illegal field in CDB" is reported for this command, mark the
device as non-removable (which is always true for USB keys from the SCSI
point of view), print a message and ignore the error.
For DIOCLOCK, return ENOTTY if the device is not removable instead of
trying a command which will fail.

Fix a problem reported by Hubert Feyrer for some USB umass devices, patch
tested by him.
2005-12-08 22:14:19 +00:00
xtraeme efc3770d53 Not everyone want to see debugging printf()s unless "options DEBUG"
is compiled in.
2005-12-08 18:06:42 +00:00
xtraeme 2c3c79e7ab regen 2005-12-08 17:38:34 +00:00
xtraeme d68332fa49 Add three Rhine ethernet adapters. 2005-12-08 17:38:11 +00:00
soren 1747d879bc Regen. 2005-12-08 05:10:39 +00:00
jonathan a92fde1678 Add PHY mii-id for the Broadcom 1000base-T PHY integral to the
bcm5714, added yesterday to sys/dev/pci/if_bge.c in revision 1.98,
since it appears the 5714 has a new PHY revision.  Pending further
details, follow the FreeBSD code (as submitted by
John Cagle <john dot cagle at hp dot com> and committed by
ps@FreeBSD.ORG), and treat the 5714 integral PHY the same way as we
treat the bcm5750 integral PHY.
2005-12-08 03:16:43 +00:00
augustss 2a86a7b8c1 Regen. 2005-12-07 10:18:10 +00:00
augustss af55235d94 Another vendor and product. 2005-12-07 10:17:53 +00:00
jonathan bc8eddcf7a regen from sys/dev/pci/pcidevs rev 1.742 (add bcm5714 et al.). 2005-12-07 04:44:47 +00:00
jonathan cf16a10aad Add PCI device-ids to sys/dev/pci/pcidevs for newer Broadcom gigabit
ethernet devices: bcm5714, bcm5752 (previously the 5789, but fvdl
committed that whilst I was musing).

Add definitions to sys/dev/pci/if_bgereg.h for the Broadcom 57xx-family
ASIC revisions on these newer chips.

Add entries to the PCI-device-version and bge-internal-asic-revision
tables in sys/dev/pci/if_bge.c to use these new devices. Pending
further information, follow the lead of FreeBSD's if_bge.c driver and,
pending further info, treat these new chips as we do the 5750.
2005-12-07 04:43:05 +00:00
wiz 483767fb43 Add support for two models of Terratec TValue cards.
From FreeBSD problem report 53383, submitted by Tanja Wittke,
updated by Simon Barner. Adapted for NetBSD by Alexander Becher,
via port-i386.
2005-12-06 23:43:57 +00:00
wiz 3a21a4243b Handle MSP3435G the same as MSP3430G. From Scott Presnell in PR 28682. 2005-12-06 23:29:05 +00:00
fvdl a085182504 Match the 5789. 2005-12-06 20:56:42 +00:00
fvdl fb1f667470 Regen for BCM5789. 2005-12-06 20:55:33 +00:00
fvdl 496be2c643 Add ID for yet another 57xx-compatible Broadcom chip, the 5789. 2005-12-06 20:54:28 +00:00
christos 1839ea54c0 Remove the "don't match lmc cards" test, because the lmc driver returns a
match of 100 which will supersede the de and tlp match if present. If not
present, then these two drivers will fail to match an mii. Thanks to thorpej
for the explanation.
2005-12-06 18:37:57 +00:00
thorpej 62d2755224 Don't use magic constants in previous. (Not that we should be doing this
here in the first place...)
2005-12-06 15:40:16 +00:00
skrll 396c76cb52 Correct the includes for lmc. 2005-12-06 11:53:56 +00:00
christos 4178b4005f Don't match lmc cards by accident. 2005-12-06 03:30:12 +00:00
christos afd1b57d09 New lmc driver from David Boggs 2005-12-06 03:01:45 +00:00
bouyer b898e14a29 Wrap debug printf in AHC_DEBUG. Pointed out by Izumi Tsutsui. 2005-12-05 18:29:45 +00:00
macallan eecff0f52d back out the changes to KD* ioctl()s for now, seem to break more than they
do good.
2005-12-05 18:27:59 +00:00
macallan 91d47a92df - remove a leftover debug printf()
- fix the other cases of _IO() type ioctl() abuse ( mainly keyboard related
  stuff )
2005-12-05 11:46:19 +00:00
skrll a599d2ebb4 Finally (I hope) fix iwi_ioctl:
- handle SIOCADDMULTI/SIOCDELMULTI properly, i.e. no need to reset
	  anything as we don't do multicast filters (yet)
	- restructure some code and use an IS_RUNNING macro

Fix iwi_init to set if_flags before the net80211 state machine is kicked
and init to IEEE80211_S_INIT.
2005-12-05 09:24:54 +00:00
christos 184ad089a7 - make settime take timespec.
- avoid wrapping of time in settime.
- pass struct proc down so that we can log a detailed message.
2005-12-05 00:16:33 +00:00
christos 3b9c87155a Merge the 3 copies of m_getcl() so that fast ipsec compiles again together
with net80211. XXX: We don't really have an m_getcl(), we just emulate it.
2005-12-04 19:15:21 +00:00
christos f1c1eb475b PR/32220: Murray Armfield: Enable AMD768 random no generator. 2005-12-04 17:47:33 +00:00
christos 832f4dc791 Regen. 2005-12-04 17:44:25 +00:00
christos 86b55997ca PR/32181: Matthias-Christian Ott: Add support for the Belkin F5D6001 pci device 2005-12-04 17:44:02 +00:00
christos e0ad34fdcb Regen. 2005-12-04 17:39:28 +00:00
christos 99b3a7df46 PR/32238: Ryo Shimizu: Add support for Promise SATA300TX4 SATA Controller
(PDC40718)
2005-12-04 17:39:03 +00:00
macallan 826e1b36bc Make the VT_* ioctl()s work in LP64/big endian platforms, like sparc64.
The problem is that these ioctl()s are declared as _IO() and expect to pass an
integer as argument, instead of a pointer. When dereferencing the argument
pointer in the ioctl() handler as an int we get the upper 32bit of the value so
we simply dereference it as long. Other _IO() ioctl()s may need similar fixes.

Tested on sparc64, sparc and macppc.
2005-12-04 14:03:42 +00:00
xtraeme 40fe6ad1b5 Add support for Intel 6300ESB. 2005-12-04 12:27:49 +00:00
rpaulo bcb67e15ae s/NBFILTER/NBPFILTER 2005-12-03 21:20:07 +00:00
rpaulo de470a4422 Make this compile without bpf(4). 2005-12-03 21:18:32 +00:00
xtraeme 7ee2d6b20e Add support for ICH7. Tested by gendalia@. 2005-12-02 19:47:52 +00:00
kleink 3b3dbbe727 Fix AUDIO_DEBUG printf formatting of size_t; from Pavel Cahyna in
PR kern/32207.
2005-12-02 19:26:14 +00:00
riz f4ed9745aa Match all model numbers with both Cicada OUIs; this allows the proper PHY to
attach on my ZyXEL GN650-T.
2005-12-01 04:59:53 +00:00
rpaulo ff67bb3168 Add support for software controlled LEDs as found on some
boards. Currently, only the associated LED is being used because
that's the only LED my card has. The other two LEDs (OFDM and
activity) can later be set by someone, easily, who owns some board
with that LEDs.

Reviewed by Nick Hudson.
2005-11-29 13:57:00 +00:00
bouyer 2ac6595656 Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback.
Fix a panic in uvm reported by John R. Shannon on port-xen; patch tested on
ahc by me and on ahd by John.
2005-11-28 21:03:19 +00:00
augustss af35e68362 Add a {UQ_ASSUME_CM_OVER_DATA quirk for Siemens AG Wireless Modules MC75.
From kern/32180 from Brad du Plessis bradd@cat.co.za
2005-11-28 19:37:18 +00:00
augustss 953d857bcb Regen. 2005-11-28 19:32:29 +00:00
augustss 8ebe76f3d7 Add Siemens AG Wireless Modules MC75. 2005-11-28 19:32:07 +00:00
rpaulo 8935d3bf0f PR 32178: Nicolas Joly: VT8233 AC'97 Audio revision 0x10 small display
fix. I just changed the comment a bit.
2005-11-28 19:00:49 +00:00
augustss 911fb919e4 Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context.  From kern/32172 by darkstar@city-net.com.
2005-11-28 13:31:09 +00:00
augustss 5d74925cbe Add a new match level, UMATCH_HIGHEST. 2005-11-28 13:14:48 +00:00
jdolecek 62729c9f70 regen - 3ware ATA RAID description/ID fixes 2005-11-27 10:19:03 +00:00
jdolecek 3f4958d066 change the description of the 3ware raid controllers to 'ATA RAID Controller'
rather then 'IDE RAID'

fix the ID of the 9xxx series controller and rename to ATARAID_9k, since
3ware doesn't refer to it using the 'Escalade' family name
2005-11-27 10:17:26 +00:00
thorpej 7d00e1aff3 Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
  that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
  ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
  registering those disciplines with the system.  The linesw
  structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
  be held.  ttyldisc_release() releases the reference.  Attempts to
  detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
  that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
2005-11-27 05:35:52 +00:00
jdolecek 8c602c3844 Add some casts to make this compile on amd64 (and perhaps other LP64
architectures). Part of PR kern/30456.

The binary object file on i386 confirmed to be exactly the same before
and after the change.
2005-11-26 21:33:46 +00:00
jdolecek 9019b1d22c fix aac_print_fib() to compile with AAC_DEBUG; noncompilable "%16D" printf
format replaced by explicit hexadecimal dump of the first 32 bytes of fip->data
2005-11-26 21:29:48 +00:00
tsutsui d0c28ccd6d Fix typo (FALLTHOUGH -> FALLTHROUGH). From Jeff Ito. 2005-11-26 13:54:18 +00:00
skrll 535aed4540 Fixes from Steve Woodford:
- add some missing bus_dmamap_sync operations.
	- don't process other interrupts if we get an error/radio off
	  interrupt.
	- improve command handling - sleep against the descriptor instead
	  of the descriptor set.
2005-11-26 07:42:10 +00:00
tsutsui 36f216123b FALLTHROUH -> FALLTHROUGH (from OpenBSD) 2005-11-26 04:11:31 +00:00
thorpej 4537c59ffb Add swcrypto 2005-11-25 16:42:55 +00:00
thorpej 7bc6d90c9d - De-couple the software crypto implementation from the rest of the
framework.  There is no need to waste the space if you are only using
  algoritms provided by hardware accelerators.  To get the software
  implementations, add "pseudo-device swcr" to your kernel config.
- Lazily initialize the opencrypto framework when crypto drivers
  (either hardware or swcr) register themselves with the framework.
2005-11-25 16:16:46 +00:00
tsutsui f7e281c38a Remove unnecessary byteswap code so that bge(4) should work
at least on macppc.
2005-11-25 15:30:34 +00:00
elad d51a16a060 Remove few no longer needed XXX comments about fsid/fileid being
not the same type as dev_t/ino_t.
2005-11-25 12:02:09 +00:00
martin 328b263349 Use %zd for size_t. Noticed by Kurt Schreiner on current-users. 2005-11-24 13:47:46 +00:00
fredb c3ec7554f8 Initialize "mapped" before any of the "goto"'s, so we're not testing an
uninitialized variable at "bad:".
2005-11-24 13:34:55 +00:00
dyoung 7e173af81d Put the microsecond timestamp in the radiotap header for received
frames.
2005-11-24 09:58:39 +00:00
jonathan 43255e3f4e Add TSO support to bge(4) for PCI-Express bge devices, which are
shipped from the factory with TSO-capable firmware.  The TSO support
here may also work on 5705 chips, but that is (so far) untested.

TSO support written after careful reading of the Linux tg3 driver,
and (after attempting to deconstruct the cut-and-paste mess therein)
very close reading of the Broadcom-supplied Linux driver, particularly
the building of Tx-DMA buffer descriptors (bds). The TSO code herein was
then rewritten from scratch, circa 4am local time, October 27 2005.
(In other words: this is 4am software; caveat emptor.)

Other magic register settings in this patch are required; without
them, attepmting to use TSO locks up the chip. The required register
settings were extracted from the cited Linux drivers.

Note that TSO-capable firmware for the 5703/5704 is distributed in
non-GPL form with the aforementioned Linux drivers. Once the 5705 case
is debugged, (particularly the pseudo-header checksum precalculation
flagged with an XXX) downloading that TSO-capable firmware to the
5703/5704 should, in principle, enable TSO support on all but the
original bcm5700 (I forget if the 5701 can support TSO, or not).

Note also that the ``hard case '' of IP/TCP headers spanning more than
one mbuf is not handled; I haven't been able to trigger it.  In any
case, since TSO applies only to packets generated by the local TCP,
and our TCP always leaves space for TCP headers and a normal IP
header, TSO on an IP/TCP header spanning multiple headers can only
arise due to insertion of IP options. I beleive that we are clearly
better off outlawing that case, and requiring ip_insertoptions()
to  pull-up TCP headers on any packets with M_CSUM_TSOv4 set.

As far as I know, bge hardwar does not support TSO for IPv6.
2005-11-24 03:27:59 +00:00
skrll 3b6e301485 Fix the handling of ENETRESET in iwi_ioctl.
This fixes PR 32143
2005-11-23 20:35:54 +00:00
skrll d40d6be769 Correct a bpf tap. 2005-11-23 20:08:29 +00:00
riz 752c0a4023 Special-case the Linksys EG1032 cards using PCI subsystem ID; rev. 2 uses
the sk(4) driver, while rev. 3 needs re(4).

Mostly from brad@openbsd.
2005-11-23 18:56:22 +00:00
tron 019491bca2 Make this compile if UHID_DEBUG is not defined. 2005-11-23 10:03:56 +00:00
augustss 48164bddda If a mouse has both a wheel and a Z direction we report both.
XXX Due to tradition the wheel is reported as the Z direction (and the Z
direction as W).
Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver
doesn't know what to do with the new coordinate.
2005-11-23 09:41:28 +00:00
augustss 5b71c2bf99 Some devices provide more than three (X, Y, and Z) "directions". So add
a W "coordinate" that can be used for these.
This changes the type of wsmouse_input().  To avoid changing a lot of drivers
a compatibilty #define is provided.  Maybe changing all drivers would have
been better?
2005-11-23 09:38:02 +00:00
augustss f0b7793c4b Look for a wheel before looking for a Z dir. This makes Apple's
Mightymouse work.
2005-11-23 09:04:20 +00:00
augustss cf1de1bda0 Normally a ugen device only attaches if no other driver wants the device.
Add the ability to force ugen to attach with very high priority if "flags 1"
is specified.  This can be used with the vendor and product locators to
force ugen to be used for certain devices.
Similarly, uhid only attaches if no other HID driver (ums or ukbd) wants it.
Again, "flags 1" will force uhid to attach anyway.
2005-11-23 08:54:47 +00:00
dyoung 63d8fb2cb6 Miscellaneous Realtek RTL8180L driver improvements:
1 Added new sysctl controls for debugging.

2 Improve detection & support for hardware WEP.

3 Revamp handling of transmit descriptor rings.

4 Reliably IFF_OACTIVE when transmit descriptors are available, to
  stop the transmit section of the driver from freezing up.

5 Fix beacon transmission in adhoc and hostap modes.  XXX There is
  a wart in hostap mode, where beacons are transmitted at 1/2 the
  correct rate.  Load beacon descriptors when the RTW_INTR_BINT
  interrupt arrives; schedule RTW_INTR_BINT 1ms ahead of the target
  beacon time.

6 Recover more gracefully from tx/rx errors: avoid
  transmitter/receiver/chip resets.  Try to re-synchronize software
  state with hardware state---e.g., load next descriptor pointer
  from hardware.

7 Activate the transmit watchdog timer for beacons as well as other
  packets.

8 Introduce rtw_idle() that waits for transmit DMA to finish; call
  it before resetting the transmitter.
2005-11-23 04:12:33 +00:00
dyoung 5e4572a5a8 Misc. bug fixes:
1 Reset both IFF_OACTIVE and the transmit watchdog timer in
  appropriate places to avoid both wedging the transmit section
  and spurious transmit timeouts.

2 Reset IFF_ALLMULTI at the top of atw_filter_setup so that the
  NIC will filter the multicast packets we are not interested in
  after we come out of promiscuous mode.

3 In atw_txdrain, count drained transmit descriptors to avoid
  descriptor exhaustion.
2005-11-23 01:11:23 +00:00
dyoung 4e254e89e9 Non-functional change: a missing '}' in an #ifdef __FreeBSD__
section confuses ctags(1), so I add the '}'.
2005-11-23 01:04:37 +00:00
rpaulo 8708c3d6c2 regen 2005-11-22 22:57:45 +00:00
rpaulo eed63d4b44 Fix entry for TI FlashMedia Controller. 2005-11-22 22:55:30 +00:00
martin 17b12c5ad7 This driver does only access the bus_space_tag via bus_space_* functions,
so there is no need to map it linear. From Garrett D'Amore in
PR kern/32137.
2005-11-21 20:25:15 +00:00
augustss 4bc39eaf86 Make the unused ehci_dump() function non-static. 2005-11-21 10:15:41 +00:00
augustss e49945ef23 Print an error message if we cannot located the legacy capability. 2005-11-20 18:44:56 +00:00
augustss d801565e9b Make debug printout a little nicer. 2005-11-20 18:42:43 +00:00
augustss 8e55eef7c0 Add some definitions for the extended capability registers. 2005-11-20 18:36:20 +00:00
augustss 3fe79ce029 Go through the prescribed process to get ownership of the controller from
BIOS before we start using it.
This seems to fix the problems some people have been experiencing with
keyboards not working.
2005-11-20 14:46:23 +00:00
augustss 992297a008 Keep a flag for each port that keeps track of if the port has been reset
instead of having one flag for the controller.

Also, don't try to modify read-only power bits if the controller doesn't
support power cobntrol.
2005-11-20 14:27:25 +00:00
riz 8b1bf051e2 From FreeBSD (appropriate pieces of revs 1.90 and 1.92):
Only clear the IFF_OACTIVE flag when we have a chance of being able
to queue a packet to the hardware, instead of when the hardware queue
is empty, and fix up handling and prodding of the tx.

These fixes clear up an occasional "sk0: watchdog timeout" from the
on-board ethernet on my Asus A8V motherboard.

OK christos@
2005-11-19 21:45:50 +00:00
skrll 541652ce7b Adapt to new net80211(9).
Thanks to dan@ and Kouichirou Hiratsuka for testing.
2005-11-19 08:06:03 +00:00
bouyer 44453e12b8 Regen: save offset at disconnect after a data phase without save data pointer. 2005-11-18 23:11:38 +00:00
bouyer 98fae666e4 Some drives disconnect after the last data phase without a save data pointer
message. In such case we would not update resid with the proper value
(eventually resid would not be updated at all if there was only one data
phase). To fix this, have the script save the offset in the data tables at
disconnect time if there was a transfer, and use this to compute the resid
if the current offset is 0.
Problem reported and patch tested by edwin, Roy Bixler and YAMAMOTO Takashi.
Fix kern/31990 by YAMAMOTO Takashi.
2005-11-18 23:10:32 +00:00
rpaulo 4d1d9eb828 regen 2005-11-18 21:58:20 +00:00
rpaulo 7282bf0378 It's really PCI7x21/7x11 Cardbus Controller. 2005-11-18 21:55:13 +00:00
rpaulo a1c9602de5 regen 2005-11-18 21:46:11 +00:00
rpaulo 924d40ef97 Add a bunch of devices:
o Intel 82801FBM ICH6M LPC Interface Bridge
    o Intel 82801FB/FR PCI Express Port #2
    o TI PCIxx21/x515 Cardbus Controller
    o TI PCI7x21/7x11 IEEE 1394 Host Controller
    o TI PCIxx11/21 Integrated FlashMedia Controller
2005-11-18 21:40:14 +00:00
skrll 302689559d Adapt drivers to the new net80211(9).
Most of this is from dyoung@. Thanks!
2005-11-18 16:53:56 +00:00
skrll dc2bd8a8cf Resolve conflicts. 2005-11-18 16:48:31 +00:00
skrll 38d4ca67e5 Resolve conflicts. Changelog to follow. 2005-11-18 16:42:22 +00:00
hira 23426c5438 Regen. 2005-11-18 11:31:41 +00:00
hira b05e6b060b Correct entry of vendor ID 0x0d8c. It's C-Media, not ABC.
Confirmed by augustss@.
2005-11-18 11:29:47 +00:00
hira c9370bf9e5 Regen. 2005-11-17 18:12:59 +00:00
hira 8bc7a4c07b Correct product ID of Buffalo WLI-U2-KG54-AI. 2005-11-17 18:12:08 +00:00
bouyer 3506fa3a54 After a reset don't wait for drives to come ready if there's no drives.
Fix a 30s hang after resume. Problem reported and fix tested by Brian de Alwis.
2005-11-16 23:39:08 +00:00
jonathan de85711ee1 Correct a performance bug from Bill Paul's original FreeBSD bge(4) driver:
Each call to the FreeBSD bge_start() routine the transmit producer
pointer index from the chip mailbox register BGE_MBX_TX_HOST_PROD0_LO.
The local copy of that value is then updated by bge_encap() as
bge_encap() encapsulates packets in the Tx ring. If bge_encap()
succeds in encpuslating one or more packets, bge_start() tells the
chip to start sending the newly-encinitiates writes the new value back
to the chip mailbox register.

However, comparison of the Linux drivers (Broadcom-supplied and
open-source tg3.c) and to the OpenSolaris driver confirms that
register BGE_MBX_TX_HOST_PROD0_LO is write-only to software.
Thus, we can just keep a copy in the softc, and eliminate the
(expensive) PCI register write on each call to bge_start().

``Make it so''.
2005-11-15 06:05:44 +00:00
augustss 88f620ab3d Make it possible to decide endianess dynamically. From port-evbmips/31912
by "Garrett D'Amore" <garrett_damore@tadpole.com>.
2005-11-14 13:40:23 +00:00
skrll 1f381351c3 Don't use DPRINTF for previous. Doh! 2005-11-14 12:07:33 +00:00
skrll 5349e12d67 Dump the error log if we get an IWI_INTR_FATAL_ERROR interrupt. 2005-11-14 11:58:52 +00:00
rpaulo 585daa639d Fix a long standing typo noticed by Alex Pivovarov on PR/32061.
When people use variables like 'flag' and 'flags' in the same function
(one local and one passed as a parameter) this is prone to happen..
2005-11-13 10:47:39 +00:00
macallan 0ea32fbae1 Add hardware cursor support, needs testing. 2005-11-12 23:25:46 +00:00
rpaulo 861d507d5b regen 2005-11-12 11:54:29 +00:00
rpaulo 645b6b622a Add ACPI Three-wire Device Bus. 2005-11-12 11:53:30 +00:00
simonb a21c456e2e Call nanotime() directly, instead of doing the
microtime()/TIMEVAL_TO_TIMESPEC() dance.
2005-11-11 07:07:42 +00:00
kochi ec63345182 regen. 2005-11-11 02:11:07 +00:00
kochi 2d0bb278d1 add HPET timer PNP ID.
reported in PR32040 by  Nicolas Joly
2005-11-11 02:10:09 +00:00
martin a332f6615a Use mstohz() for timeout calculations.
Avoid local stack addresses as tsleep identifiers.
2005-11-10 21:25:35 +00:00
rpaulo 07c827131f regen 2005-11-10 13:31:03 +00:00
rpaulo 7928f127e6 Add NSC IrDA Fast Infrared Port. 2005-11-10 13:30:46 +00:00
rpaulo f5602021b6 regen 2005-11-10 13:26:34 +00:00
rpaulo 066abf15d0 Add Synaptics PS/2-style Touchpad. 2005-11-10 13:25:59 +00:00
augustss 65ee9092eb Abuse types a little less. 2005-11-10 12:05:01 +00:00
tron f55fe966f7 Apply big endian fixes submitted by Garrett D'Amore in PR kern/32032. 2005-11-10 10:00:19 +00:00
rpaulo 67a3f47423 Add a fake entry in pms_protocols array to avoid an out-of-bounds
access in do_enable() if PMS_SYNAPTICS_TOUCHPAD and PMSDEBUG are both
defined.
2005-11-08 22:12:16 +00:00
tsutsui fe35cfd50c Regen from pcmciadevs rev 1.213:
> Fix pp_cisinfo[0] of the TEAC IDECARDII entry.
> If pp_cisinfo[0] is NULL, current pcmcia_product_lookup()
> never matches the device.
2005-11-07 16:39:16 +00:00
tsutsui cf09fb3893 Fix pp_cisinfo[0] of the TEAC IDECARDII entry.
If pp_cisinfo[0] is NULL, current pcmcia_product_lookup()
never matches the device.
2005-11-07 16:37:28 +00:00
dsl 80c644a6b9 Explicitly default the input baud rate (c_ispeed) to the output baud rate (c_ospeed)
instead of setting it to zero.  Otherwise nothing ever sets it unless some code
explicitly changes the baud rate.  For a serial console (in particular) we want
to use the baud rate set by the bios (or whatever) and used by theboot code.
This is the way it was before a 'new version of com driver' was added in 1997 (rev 1.99)
2005-11-06 21:34:37 +00:00
tsutsui 830c0db95b NCRDMA_SETUP() should be called before NCR_SET_COUNT() and NCRCMD_DMA command
in ncr53c9x_select(). Tested with esp on SS1+ and sun3/80, and pcscp at pci.
2005-11-06 10:31:46 +00:00
rpaulo e15c104622 Add "Conexant CXT48". This should have a more meaningful name, but I
couldn't find it. So, I added this because it's better than printing
"unknown codec". When we find a more decent name later, we can change this.
2005-11-06 10:08:24 +00:00
bouyer dfbaaaef48 ETHERCAP_VLAN_MTU is a flag for ec_capabilities, the size of the 802.1q
encaptulation header is ETHER_VLAN_ENCAP_LEN. Pointed out by der Mouse on
tech-kern.
2005-11-05 16:01:52 +00:00
martin 4daa98c618 Rename the wait channels (one was a copy&pasto, the other much too long) 2005-11-05 13:59:02 +00:00
abs 8380617e54 Regen after adding Radeon 9000 PCI (0x4966) 2005-11-01 22:01:44 +00:00
abs f643837128 Add Radeon 9000 PCI (0x4966) 2005-11-01 22:00:56 +00:00
martin b1134bf887 Rework the funny "user_strat: No ioctl" error messages - the functions
have not been called user_strat for quite some time and the message is
confusing if you do not know the code.
2005-11-01 20:44:04 +00:00
bouyer 1421f4d030 Don't claim there is a data in or out phase if the datalen is 0 (userland
shouldn't claim it either, but a buggy software shouldn't be able to crash
the kernel anyway). Should fix port-sparc64/31925 by Johan A.van Zanten
(which should really be kern/31925).
Analysed and patch tested by Martin Husemann.
2005-11-01 15:40:00 +00:00
yamt 8217506e75 fix ioctl problems after the recent physio changes
in some drivers including wd and scsi.

- physio: if a caller provided a buf, stick to use it
  because some drivers use it as an identifier.
- sprinkle simple_locks.
- scsistrategy: rather than issueing an async request and
  waiting for its completion, simply issue a sync request.
  the way to wait for the completion had an assumption that
  B_CALL is never used.  it isn't the case after the recent
  physio() changes.

pointed/analyzed/tested by Martin Husemann.
2005-10-31 14:36:41 +00:00
simonb 1d1300cd80 Only include <sys/systm.h> if _KERNEL is defined. 2005-10-30 23:34:04 +00:00
jmcneill 4b8daa06de Wow, this is clearly wrong (found in esa_set_params):
if (p->channels < 1 && p->channels > 2)
		return EINVAL;
Change the 'and' to an 'or' so the check actually does something.
2005-10-29 17:44:34 +00:00
rpaulo 2b6672222b regen 2005-10-29 17:18:40 +00:00
rpaulo b2880bdd35 Add Creative Labs's Notebook Optical Mouse. 2005-10-29 17:18:08 +00:00
yamt b9269a5f4f don't reset interface on rx overrun because it makes
the situation worse, if the overrun is merely a symptom of heavy load.
increament if_ierrors instead.  PR/29831.
2005-10-29 13:24:41 +00:00
scw 9877d180a5 Re-arrange a bitfield according to host byte-order. 2005-10-29 12:03:44 +00:00
scw aee1af1ef4 Expunge an extraneous bus_dmamap_sync() call in iwi_frame_intr(). The entire
frame has already been sync'd by iwi_rx_intr().
2005-10-29 11:00:17 +00:00
scw b6845ed55f - Use the DMA map size when calling bus_dmamap_sync(), instead of
blindly assuming MCLBYTES will DTRT.
- Use bus_dmamap_load_mbuf() instead of bus_dmamap_load() where
  appropriate.
- If we have to coalesce a Tx mbuf chain comprised of more than IWI_MAX_NSEG
  segments, allocate a cluster iff the payload won't fit in the header.
2005-10-29 10:48:02 +00:00
skrll 22049753c1 Don't byte swap unnecessarily in iwi_read_prom_word. Fix the user instead. 2005-10-29 08:44:28 +00:00
scw 842139fe29 Support big-endian hosts:
- Always byte-swap data read from EEPROM.
- Byte-swap firmware image when host is big-endian.

In iwi_tx_start():
- Fix descriptor initialisation bogon (only problematic on big-endian hosts).
- Fix bus_dmamap_sync() 'len' parameter..
2005-10-29 08:10:38 +00:00
christos daf2726a5c - delete ugly debugging crap.
- remove bogus multicast handling [pointed out by thorpej]
  and don't reset the chip on ENETRESET; ENETRESET is a sign
  that only the multicast filter needs changing.
2005-10-28 20:56:13 +00:00
christos 17f31a8395 forgot to commit this. 2005-10-28 14:36:15 +00:00
christos ffd31cc9b5 According to thorpej, we don't need to stop when we attach. But then again
we don't detach yet...
2005-10-28 13:20:55 +00:00
christos dd3b850e80 From FreeBSD:
- make a few functions static
- introduce gem_bitwait() to factor out some of the register wait code.
- add gem_stop() in attach
- some DEBUG should be GEM_DEBUG
- handle underrun, packet too long, and overflow errors by resetting the chip
- add handler in ioctl for add/del multi
- fix typo
Also:
- add a shadow sc_if_flags member so that we don't reset the chip if we
  don't need to.
2005-10-28 00:01:53 +00:00
rpaulo 89c0260a2e s/SYNAPTICS_DEBUG/SYNAPTICSDEBUG/ to keep consistency. 2005-10-26 17:20:19 +00:00
martin 3e4f7c877a Add missing <sys/device.h> include.
XXX - this is handled inconsistently accross the ath* files, maybe we
should move it to ath_netbsd.h and be done?
2005-10-25 19:59:02 +00:00
drochner afcc05d0fe finally nuke the useless cardbus "dev" locator 2005-10-25 16:37:50 +00:00
jdolecek bb7b3655f0 constify 2005-10-24 16:31:54 +00:00
hannken 366a53ff0c Run all i/o from or to backing store through fss_bs_io().
Replace VOP_BMAP()/VOP_BALLOC() by vn_rdwr()/VOP_PUTPAGES().

Inspired by discussion on tech-kern@
2005-10-24 14:25:06 +00:00
christos 8f370e24ef The previous change (to use bus_space_read_2), was broken because it was
reading from an odd offset. From Robert Elz
2005-10-23 20:03:04 +00:00
kochi 1b13c5e5de revive a piece of code for workaround for buggy BIOSes.
this code was accidentally dropped when the last merge of ACPI-CA.
(this code is one of NetBSD-local changes against original ACPI-CA)
2005-10-23 16:39:29 +00:00
jmcneill f18dd07571 If the temperature sensors are disabled, enable them rather than giving up. 2005-10-23 14:01:36 +00:00
nonaka 4fa7623be8 Use I2C_OP_{READ,WRITE}_WITH_STOP instead of I2C_OP_{READ,WRITE}. 2005-10-22 15:12:28 +00:00
dbj 37e4b2f6aa decrement nscreens in vga_free_screen
this cleans up a crash on failed allocation, although
vga_free_screen may still be leaking resources
2005-10-21 14:44:08 +00:00
itohy a2f0c58dbb If an unknown endpoint is found, ignore it, rather than abort attach.
This change allows to use HID-like devices with additional functions.
2005-10-20 13:09:18 +00:00
joerg 35b726a534 Fix a kernel segfault when a RX interrupt can't allocate a new mbuf.
The change adopts the idea of fxp to drop the incoming packet and panic
if the old mbuf cannot be reloaded. Since the bus_dmamap is allocated
during attach, this is not supposed to happen. Since a lot of code moves
anyway, factor out the allocation of RX ring elements, which is shared
between the init path and the RX interrupt path.

XXX A better fix might be to borrow the mbuf from the logic end of the
XXX ring buffer, but that needs more involved driver changes.

Reviewed by dyoung@ and nick@
2005-10-19 20:18:00 +00:00
joerg 397ada6330 Both iwi and ipw need arp. 2005-10-18 17:53:14 +00:00
yamt 464cf44f6c dksubr: do b_blkno -> b_rawblkno translation earlier so that bufq can uses it. 2005-10-18 00:14:43 +00:00
simonb 94e3e9f7f5 Spinkle some KNF. 2005-10-17 03:08:24 +00:00
tls 389883922e From Gilles Roy <groy@qnx.com>: don't increment buffer pointer twice
(once before callback, once *in* callback) for MAC transforms.  How did
this driver ever work at all without this?
2005-10-16 20:26:47 +00:00
tls 240f327f5b HAVE_CRYPTO_LZS, not HAVE_CRYPTO_LSZ (worse, it was inconsistently used) 2005-10-16 00:14:22 +00:00
tls c4b950020a Don't use rnd_extract_data to set up IVs for new sessions; it is very
expensive, and pointless.  As elsewhere in the kernel (and as approved
under FIPS-140-2 by multiple test labs, incidentally) we use arc4 to
generate IVs here; there is no benefit to their being cryptographically
strong so long as there is a sufficient Hamming distance between them.
2005-10-16 00:12:42 +00:00
jdolecek 91669fdaa7 use VLAN_OUTPUT_TAG() 2005-10-15 19:32:36 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00