Commit Graph

55661 Commits

Author SHA1 Message Date
glebius
6404be1e73 MFC 1.12:
Correct off-by-one errors.

  Found with:     Coverity Prevent(tm)
2006-01-21 10:11:01 +00:00
glebius
7a6a9a7a20 MFC 1.18:
When sending export datagram from interrupt thread, use NG_QUEUE
  in flags. When sending export datagram from expiry thread, then
  use default zero flags. This removes unpleasant contention of the
  interrupt thread on mutexes (usually ng_ksocket's socket buffer
  mutex).
2006-01-21 10:09:18 +00:00
glebius
3d78d7e213 MFC 1.58:
Do not force queueing on peer hooks. This was important only for
  5.0-CURRENT. And it looks like this didn't work before Julian's
  revamp of netgraph queue code.

  Reviewed by:    julian
2006-01-21 10:07:25 +00:00
glebius
a0d17dcfa1 MFC 1.8:
Mark appropriate commands with NGM_READONLY and NGM_HASREPLY and
  bump type cookie.

  This fixes flowctl(8) exiting without any output under high load on SMP.
2006-01-21 10:06:15 +00:00
glebius
098f73d3f4 Partial MFC of NGM_HASREPLY flag. The flag is introduced, but message
codes and netgraph cookie are not altered, to preserve ABI compatibility.
2006-01-21 10:04:40 +00:00
glebius
443e91f57b MFC 1.65:
Provide additional macros for sending netgraph items, which allow
  to use non-default flags for netgraph functions. Implement current
  macros via new ones.
2006-01-21 10:00:51 +00:00
glebius
94513f129b Sync with HEAD:
- Some whitespace and style(9) cleanup.
  - Add ktr(4) debugging.
2006-01-21 09:59:43 +00:00
mux
99f5ca0a6f MFC ugraphire_rdesc.h r1.3, uhid.c r1.80, usbdevs r1.245:
Add support for the Wacom Graphire 3 4x5.  Like the Graphire 3, it has a
  broken report descriptor.  While I'm here, make all the other report
  descriptors const to match the newly added one.
2006-01-20 22:55:45 +00:00
mux
7dd1aaab4e MFC uhid.c r1.79, usb.h r1.40, uxb360gp_rdesc.h r1.1:
Add support for Xbox 360 gamepads.  They are HID-capable devices, but
  lack a report descriptor and don't use the standard interface class.
  This patch works around these deficiencies so that the uhid(4) driver
  can recognize and use those broken devices.
2006-01-20 22:47:49 +00:00
mnag
2654b13145 MFC: src/sys/cam/scsi/scsi_da.c 1.184
Allow to use Time DPA20B 1GB MP3 Player [1]
Allow to use Qware BeatZkey! Pro [2]

PR:		usb/81846 [1], usb/79164 [2]
Submitted by:	Ruben de Groot <rdg@bzerk.org> [1], Radek Kozlowski <radek@raadradd.com> [2]
Approved by:	njl (implict)
2006-01-20 19:23:47 +00:00
pjd
8e11cbfa32 MFC: share/man/man4/umass.4 1.41
sys/cam/scsi/scsi_da.c	1.182
	sys/dev/usb/umass.c	1.125
	sys/dev/usb/usbdevs	1.238

Allow to use TransFlash drive, which can be found in Motorola E398 Mobile Phone.

PR:		usb/89889
Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
2006-01-20 14:52:13 +00:00
yongari
090d60f537 MFC rev. 1.48 to RELENG_6:
Prefer NULL to 0.
  Add missing lock/unlock in sysctl handler.
2006-01-20 07:38:01 +00:00
yongari
cb5b5410bf MFC if_hme.c:1.46 to RELENG_6:
fix Rx checksum computation on little endian systems.
2006-01-20 06:27:49 +00:00
ariff
13fdba80c5 MFC:
- Workaround for sb16 behave poorly when running at 45000 hz while
    vchan is enabled.
    Ruthless vchan speed workaround against the dreaded sb16 / sb16x.
    It appear that nothing else using this weird 45k / 49k speed upper
    limit.
  - Raise VCHAN_DEFAULT_SPEED from 44100 to 48000.

Reported by:	many sb16, AWE64 users.
2006-01-20 03:55:58 +00:00
glebius
76d7ea24d4 Sync driver with HEAD merging all revisions from 1.96 to 1.115. The most
markable changes are:

 o Suspend/resume methods.
 o Link state detection fixes.
 o Utilization of jumbo allocator and extended RX descriptors.
 o busdma(9) cleanup and support for big-endian architectures.
 o Improved checksum offloading support.
 o Reduced number of PCI register writes in bge_start().
 o Counting RX/TX errors as input/output interface errors.
2006-01-19 13:36:26 +00:00
ariff
1aeaa0e0e4 Fix broken capabilites. There are possible calculation errors within
ess_calcspeed8() and ess_calcspeed9() that need to be fixed as well
(TODO).

Reported by:	[1] Claude Buisson <cbuisson at nerim.net>

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003566.html
2006-01-19 01:17:00 +00:00
thompsa
a387d16385 MFC r1.148:
Include the bridge interface itself in the special arp handling.
2006-01-19 00:38:00 +00:00
thompsa
07a0a1ec64 MFC: if_bridge.c, r1.50; if_bridgevar.h, r1.10
Clear IFCAP_TXCSUM from member interfaces while bridging.
2006-01-18 20:49:21 +00:00
andre
814aba4977 MFC jumbo mbuf cluster allocation API providing 4k, 9k and 16k clusters:
struct mbuf *m_getjcl(int how, short type, int flags, int size)
 void *m_cljget(struct mbuf *m, int how, int size)

For size both take MCLBYTES, MJUM4BYTES, MJUM9BYTES, MJUM16BYTES.

Tested by:	glebius
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-01-18 13:24:24 +00:00
glebius
00dc285d46 Check ifp before dereferencing it in xl_detach(). xl_detach() can be called
from xl_attach(), when ifp is not defined yet.

Found with:	Coverity Prevent(tm)
2006-01-18 09:42:21 +00:00
cperciva
1f4d619dab Correct a buffer overflow when scanning for 802.11 wireless networks.
Security:	FreeBSD-SA-06:05.80211
2006-01-18 09:03:15 +00:00
ariff
5c823ed0a2 MFC:
- Locking fixes. Release lock while chn_intr().
  - Mark MPSAFE since most of the locking procedures already implemented.
  - Turn on inverted external amplifier sense flag for selected boards.

Tested by:	bland
2006-01-18 01:05:34 +00:00
mlaier
f6a52266ef MFC: pf_norm.c, 1.15:
Move m_adj after checking that m_dup succeeded.

    Found with:	Coverity Prevent(tm)
2006-01-17 13:05:32 +00:00
pjd
d16c8aabc8 MFC: Sync with HEAD. 2006-01-17 11:49:09 +00:00
pjd
652705ad2e MFC: sys/kern/kern_malloc.c 1.150
In realloc(9), determine size of the original block based on
UMA_SLAB_MALLOC flag.
In some circumstances (I observed it when I was doing a lot of reallocs)
UMA_SLAB_MALLOC can be set even if us_keg != NULL.

If this is the case we have wonderful, silent data corruption, because less
data is copied to the newly allocated region than should be.
2006-01-17 10:19:37 +00:00
pjd
911efbaebd MFC: sys/kern/kern_malloc.c 1.149
Detect memory leaks when memory type is being destroyed.
This is very helpful for detecting kernel modules memory leaks on unload.
2006-01-17 10:17:37 +00:00
pjd
c4be8154d5 MFC: Sync with HEAD. 2006-01-17 09:28:57 +00:00
pjd
b11d89f3f9 MFC: Sync with HEAD. 2006-01-17 09:11:30 +00:00
pjd
947bbe05ee MFC: Sync with HEAD. 2006-01-17 08:59:55 +00:00
dougb
73ebda7083 MFC mechanism to include files added by ports which contain
names of directories to include in the base ldconfig script.

Bump __FreeBSD_version to recognize this change
2006-01-17 06:53:18 +00:00
ariff
37b56cc75b MFC: Add another inverted EAPD quirk for Gateway 7326GZ.
Tested by:	Jeff Cross <jeff.cross at averageadmins.com>
2006-01-17 05:13:37 +00:00
flz
179ac5f43a MFC:
Enable NO_GETMAXLUN quirk.

      src/sys/dev/usb/umass.c: rev 1.127 -> 1.128

PR:		usb/81073
Submitted by:	James E. Flemer <jflemer@alum.rpi.edu>
2006-01-16 22:34:20 +00:00
bruno
72bdc5650f MFC 1.4: fix bst.status and bst.rate to display correct informations.
Approved by:	njl
2006-01-16 09:13:53 +00:00
davidxu
a3ce51935a MFC revision 1.40:
Add a new feature to thr_kill, if thread ID argument is -1, send
	signals to all threads except current sender.
2006-01-16 06:25:32 +00:00
davidxu
bbb7464427 MFC following revisions:
sys/umtx.h		revision 1.17
	kern/kern_umtx.c	revision 1.34
	kern/kern_thr.c		revision 1.36

	call kern_umtx_wake on thread exit.
2006-01-16 05:48:40 +00:00
ariff
68bb9b25cf MFC: Joyport blacklist. Either we're facing with broken hardware
or because this hardware need special (unknown) initialization
     procedures.

Reported by:    [1] Rob Clark <vx2 at tds.net>

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003535.html
2006-01-16 02:08:56 +00:00
delphij
68b438857e MFC pidfile(3) function, and convert several applications to make use
of it.

Bump __FreeBSDversion for the MFC.

Discussed with:	pjd
2006-01-15 17:50:38 +00:00
glebius
470df2fb19 MFC:
Add a new feature for optimizining ipfw rulesets - substitution of the
  action argument with the value obtained from table lookup. The feature
  is now applicable only to "pipe", "queue", "divert", "tee", "netgraph"
  and "ngtee" rules.
2006-01-15 01:00:55 +00:00
glebius
9bfc349ebe MFC 1.118:
Optimize parallel processing of ipfw(4) rulesets eliminating the locking
  of the radix lookup tables. Since several rnh_lookup() can run in
  parallel on the same table, we can piggyback on the shared locking
  provided by ipfw(4).
    However, the single entry cache in the ip_fw_table can't be used lockless,
  so it is removed. This pessimizes two cases: processing of bursts of similar
  packets and matching one packet against the same table several times during
  one ipfw_chk() lookup. To optimize the processing of similar packet bursts
  administrator should use stateful firewall. To optimize the second problem
  a solution will be provided soon.

  Details:
    o Since we piggyback on the ipfw(4) locking, and the latter is per-chain,
      the tables are moved from the global declaration to the
      struct ip_fw_chain.
    o The struct ip_fw_table is shrunk to one entry and thus vanished.
    o All table manipulating functions are extended to accept the struct
      ip_fw_chain * argument.
    o All table modifing functions use IPFW_WLOCK_ASSERT().
2006-01-15 00:55:04 +00:00
glebius
035a021290 MFC:
First step in removing welding between ipfw(4) and dummynet.

  o Do not use ipfw_insn_pipe->pipe_ptr in locate_flowset(). The
    _ipfw_insn_pipe isn't touched by this commit to preserve ABI
    compatibility.
  o To optimize the lookup of the pipe/flowset in locate_flowset()
    introduce hashes for pipes and queues:
    - To preserve ABI compatibility utilize the place of global list
      pointer for SLIST_ENTRY.
    - Introduce locate_flowset(queue nr) and locate_pipe(pipe nr).
  o Rework all the dummynet code to deal with the hashes, not global
    lists. Also did some style(9) changes in the code blocks that were
    touched by this sweep:
    - Be conservative about flowset and pipe variable names on stack,
      use "fs" and "pipe" everywhere.
    - Cleanup whitespaces.
    - Sort variables.
    - Give variables more meaningful names.
    - Uppercase and dots in comments.
    - ENOMEM when malloc(9) failed.
2006-01-15 00:46:17 +00:00
glebius
7799eeee1b Fix build. 2006-01-15 00:20:31 +00:00
delphij
ac58eacb60 MFC revision 1.185
date: 2005/12/16 18:32:39;  author: delphij;  state: Exp;  lines: +2 -0
In pipe_write(): when uiomove() fails, do not spin on it forever.

Submitted by:   Kostik Belousov <kostikbel at gmail.com> on -current@
Message-ID:     <20051216151016.GE84442@deviant.zoral.local>
Security:	Local DoS
2006-01-14 19:57:48 +00:00
netchild
54d6a62a16 MFC r1.12:
Emit USB_EVENT_DRIVER_DETACH on detach.

  PR:             83247
  Submitted by:   Sangwoo Shim <ssw@neo.redjade.org>
2006-01-14 14:21:59 +00:00
netchild
d4a48e23d3 MFC bktr_card.c 1.35, bktr_card.h 1.12, bktr_tuner.c 1.20, bktr_tuner.h 1.7:
Add some cards:
   - several TerraTec TValue [1]
   - PixelView PlayTV Pro REV-4C [2]

  In case you have the PixelView card, please tell us the "pciconf -v -l"
  output on multimedia@FreeBSD.org if it works. There are revisions out there
  which may not work and we need to know which ones work.

  PR:             53383 [1], 76002 [2]
  Submitted by:   Tanja Wittke <tawi@gruft.de> [1], barner [1],
                  Dan Angelescu <mrhsaacdoh@yahoo.com> [2]
2006-01-14 14:18:34 +00:00
glebius
e9cbabbbdd - Restore VLAN_INPUT_TAG() macro to preserve API compatibility for
third party drivers.
- Fix bugs destribed in previous revision using macro with
  another name.
2006-01-14 10:05:07 +00:00
joel
b387971eec MFC r1.1343: Fix minor sorting issue. 2006-01-14 10:00:13 +00:00
tegge
81ceadf72a MFC: Add marker vnodes to ensure that all vnodes associated with the mount
point are iterated over when using MNT_VNODE_FOREACH.
2006-01-14 01:18:03 +00:00
tegge
479ccb2392 MFC: Close race where wakeup after background write could be lost. 2006-01-14 01:09:10 +00:00
tegge
c398a9e83f MFC: Broaden scope of softdep_worklist_busy rwlock protection. 2006-01-14 01:07:14 +00:00
tegge
c8d0f60cdf MFC: Obtain mount point lock before restarting sync loop if vget() failed. 2006-01-14 01:05:22 +00:00