Commit Graph

64448 Commits

Author SHA1 Message Date
Robert Watson
b4f3a844d2 Mark wire data structures in netatalk as __packed so that they are
properly (un)padded on the arm platform.  With this change, FreeBSD/arm
boxes are able to route AppleTalk properly.

Submitted/tested by:	Nathan Whitehorn <nathanw at uchicago dot edu>
Tested on:		arm, i386, amd64
Approved by:		re (kensmith)
2007-06-28 12:54:58 +00:00
Warner Losh
9729910999 The timeout is in milliseconds, not in hz. Only the portion of the
patch that converts ms to ticks was used.  Another PR states that a
return code of 0 is the right one for libusb.

Submitted by: Lonnie Mendez
PR: 94311
Approved by: re (blanket)
2007-06-28 06:22:40 +00:00
Warner Losh
f8f10e94cf Support for iRiver U10 USB connection
PR: 92306
Submitted by: Soren Dossing
Approved by: re (blanket)
2007-06-28 06:12:55 +00:00
Warner Losh
e9da08f2eb With the advent of G3/CDMA modems, the old buffer sizes are no longer
adequate.  Increase them to 1k.  The referenced PR made this a sysctl,
but that seems like overkill to me.  The difference between 320 and
2048 bytes in modern systems, even embedded ones, seems to be in the
noise to be worth the extra hair to make it settable.

PR: 74609
Submitted by: Divacky Roman
Approved by: re (blanket)
2007-06-28 05:50:14 +00:00
Warner Losh
dc0c82bc3f For both interrupt and isochronous (the patch was unclear which one it
applied to, but I'd think both), honor the timeout that's been set.
Return 0 bytes to be consistant with what libusb expects.  By default,
the timeout will be zero, so only applications that change the default
will see a change.  The patch only seems to apply to the interrupt end
points, but it should also apply to isochronous endpoints as well.

Submitted by: Maurice Castro
PR: 110122
Approved by: re (blanket)
2007-06-28 05:15:33 +00:00
Warner Losh
dcf43907af Quirk for Denver MP3 player usb.
Submitted by: Ed Schouten
PR: 107101
Approved by: re (blanket for device supprot)
2007-06-28 04:51:19 +00:00
Xin LI
a321f489a5 Space/style cleanups after last set of commits.
Approved by:	re (tmpfs blanket)
2007-06-28 02:39:31 +00:00
Xin LI
a96539bf8f Staticify most of fifo/vn operations, they should not
be directly exposed outside.

Approved by:	re (tmpfs blanket)
2007-06-28 02:36:41 +00:00
Xin LI
8d5892eeab Use vfs_timestamp instead of nanotime when obtaining
a timestamp for use with timekeeping.

Approved by:	re (tmpfs blanket)
2007-06-28 02:34:32 +00:00
Xin LI
5ff9b9158f Reorder tf_gen and tf_id in struct tmpfs_fid. This
saves 8 bytes on amd64 architecture.

Obtained from:	NetBSD
Approved by:	re (tmpfs blanket)
2007-06-28 02:32:44 +00:00
Christian S.J. Peron
cac465aa7f - Add audit_arg_audinfo_addr() for auditing the arguments for setaudit_addr(2)
- In audit_bsm.c, make sure all the arguments: ARG_AUID, ARG_ASID, ARG_AMASK,
  and ARG_TERMID{_ADDR} are valid before auditing their arguments. (This is done
  for both setaudit and setaudit_addr.
- Audit the arguments passed to setaudit_addr(2)
- AF_INET6 does not equate to AU_IPv6. Change this in au_to_in_addr_ex() so the
  audit token is created with the correct type. This fixes the processing of the
  in_addr_ex token in users pace.
- Change the size of the token (as generated by the kernel) from 5*4 bytes to
  4*4 bytes (the correct size of an ip6 address)
- Correct regression from ucred work which resulted in getaudit() not returning
  E2BIG if the subject had an ip6 termid
- Correct slight regression in getaudit(2) which resulted in the size of a pointer
  being passed instead of the size of the structure. (This resulted in invalid
  auditinfo data being returned via getaudit(2))

Reviewed by:	rwatson
Approved by:	re@ (kensmith)
Obtained from:	TrustedBSD Project
MFC after:	1 month
2007-06-27 17:01:15 +00:00
Robert Watson
dc2e1e3fae Use vm_offset_t for kmembase and kmemlimit rather than char *, avoiding
unnecessary casts, and making it possible to compile kern_malloc.c with
strict aliasing.

Submitted by:	rdivacky
Approved by:	re (kensmith)
2007-06-27 13:39:38 +00:00
Doug Rabson
7761242694 In zfs_vget, if we fail to translate an inode number to the corresponding
vnode, make sure we return an error code to the caller.

Reviewed by: pjd
Approved by: re
2007-06-27 12:00:24 +00:00
Matt Jacob
baa219ed6f Pointy hat to me. Committed with building.
Approved by:	re (ken, implicit)
2007-06-26 23:08:57 +00:00
Robert Watson
cc9bdf2a62 Sync comments to code: we now use priv_check() rather than suser() to
determine privilege.

Approved by:	re (bmah)
2007-06-26 23:01:01 +00:00
Remko Lodder
266d3a7a09 Add Viking Interworks 256MB as an ata device; this might give
some false positives but at this moment it is better to add
support then to dont have it at all (comment from Soren).

PR:		kern/111516
Submitted by:	Thomas Nystrom <thn at saeab dot se>
Approved by:	re (kensmith)
Approved by:	imp (mentor)
OK'ed by:	sos (With the comment noted above about false
		positives).
2007-06-26 22:13:43 +00:00
Attilio Rao
6a0ce57d10 Fix an old standing LOR between callout_lock and sleepqueues chain (which
could lead to a deadlock).
- sleepq_set_timeout acquires callout_lock (via callout_reset()) only
  with sleepq chain lock held
- msleep_spin in _callout_stop_safe lock the sleepqueue chain with
  callout_lock held

In order to solve this don't use msleep_spin in _callout_stop_safe() but
use directly sleepqueues as inline msleep_spin code. Rearrange the
wakeup path in order to have it consistent too.

Reported by: kris (via stress2 test suite)
Tested by: Timothy Redaelli <drizzt@gufi.org>
Reviewed by: jhb
Approved by: jeff (mentor)
Approved by: re
2007-06-26 21:42:01 +00:00
Attilio Rao
f08945a7d2 Introduce a new rwlocks initialization function: rw_init_flags.
This is very similar to sx_init_flags: it initializes the rwlock using
special flags passed as third argument (RW_DUPOK, RW_NOPROFILE,
RW_NOWITNESS, RW_QUIET, RW_RECURSE).
Among these, the most important new feature is probabilly that rwlocks
can be acquired recursively now (for both shared and exclusive paths).

Because of the recursion counter, the ABI is changed.

Tested by: Timothy Redaelli <drizzt@gufi.org>
Reviewed by: jhb
Approved by: jeff (mentor)
Approved by: re
2007-06-26 21:31:56 +00:00
Matt Jacob
458570f736 Extension of previous commit- when we have 2k login firmware, we need to
put out a ispreqt2e_t structure onto the request queue- not a ispreqt2_t
structure. I forgot that the 23XX can use a t2 structure.

Approved by:    re (ken, implicitly)
MFC after:	3 days
2007-06-26 20:53:07 +00:00
Alan Cox
97824da382 Eliminate the use of Giant from vm_daemon(). Replace the unconditional
use of Giant in vm_pageout_scan() with VFS_LOCK_GIANT().

Approved by:	re (kensmith)
MFC after:	3 weeks
2007-06-26 18:24:05 +00:00
Robert Watson
f1e8bf6dd4 Add a new MAC framework and policy entry point,
mpo_check_proc_setaudit_addr to be used when controlling use of
setaudit_addr(), rather than mpo_check_proc_setaudit(), which takes a
different argument type.

Reviewed by:	csjp
Approved by:	re (kensmith)
2007-06-26 14:14:01 +00:00
Remko Lodder
c6feae7224 Fix Rocketport so that it does not crash the system when a device pointer
changes for example:

(From Craig Leres):

tip to a rocketport line
run "/etc/rc.d/devfs restart"
exit tip
(wait for the system to reboot)

Thanks to Robert Watson for poking me to fix this.

PR:		kern/109152
Approved by:	imp (mentor)
Approved by:	re (kensmith)
Reviewed by:	jhb
Submitted by:	Craig Leres <leres@ee dot lbl dot gov>
2007-06-26 13:50:48 +00:00
Warner Losh
67c4e28638 Partially updated usbdevs from OpenBSD's usbdevs. Also, some sorting
of the file numerically for vendors and then each product numerically
by vendor (with all the foo2's sorting after the foo's).  Someday, all
the usbdevs will be merged, I hope, but until then, we have these
mega-merges.

This also finishes the LINKSYS4 -> CISCOLINKSYS rename.

Approved by: re@ (blanket)
2007-06-26 05:29:27 +00:00
Xin LI
6ca4416347 Remove two function prototypes that are no longer used.
Approved by:	re (tmpfs blanket)
2007-06-26 02:08:29 +00:00
Xin LI
974fd8c650 - Sync with NetBSD's RCSID (HEAD preferred).
- Correct a typo.

Approved by:	re (tmpfs blanket)
2007-06-26 02:07:08 +00:00
Andrew Thompson
163ee27671 The config.use_protection option can not be used in 802.11b mode and causes a
firmware reset. Also zero out struct iwi_rateset although its not strictly
necessary.

Reported by:	Maxim Konovalov
Reviewed by:	sam
Approved by:	re (bmah)
2007-06-25 20:56:33 +00:00
Warner Losh
b19eb2f4c1 LINKSYS4 is going to be going away. Migrate to CISCOLINKSYS instead.
There is no md5 delta for this change.

Approved by: re@ (blanket)
2007-06-25 20:51:58 +00:00
Randall Stewart
97c76f10a0 - Update bindx address checking to properly screen out address
per the socket api, adding port validation. We allow port 0
  or the already bound port number and no others.

Approved by:	re@freebsd.org (Ken Smith)
2007-06-25 19:05:26 +00:00
Xin LI
7adb177693 MFp4: Several clean-ups and improvements over tmpfs:
- Remove tmpfs_zone_xxx KPI, the uma(9) wrapper, since
   they does not bring any value now.
 - Use |= instead of = when applying VV_ROOT flag.
 - Remove tm_avariable_nodes list.  Use uma to hold the
   released nodes.
 - init/destory interlock mutex of node when init/fini
   instead of ctor/dtor.
 - Change memory computing using u_int to fix negative
   value in 2G mem machine.
 - Remove unnecessary bzero's
 - Rely uma logic to make file id allocation harder to
   guess.
 - Fix some unsigned/signed related things.  Make sure
   we respect -o size=xxxx
 - Use wire instead of hold a page.
 - Pass allocate_zero to obtain zeroed pages upon first
   use.

Submitted by:	Howard Su
Approved by:	re (tmpfs blanket, kensmith)
2007-06-25 18:46:13 +00:00
Matt Jacob
16dbcac063 Yet another bug- when we have 2k login firmware, we need
to put out a ispreqt3e_t structure onto the request queue-
not a ispreqt3_t structure. We weren't. This turns out only
to really matter for big endian machines.

Approved by:	re (ken)
MFC after:	3 days
2007-06-25 17:21:16 +00:00
Søren Schmidt
27568384f3 Add support for the nVidia MCP61 series chipset.
Approved by: re (mux@)
2007-06-25 08:21:21 +00:00
Warner Losh
5acfdb129b Starting in version 1.56, ucomstop started calling ucomstart to work
around an output freezing problem (see the CVS log for details).  This
is the same approach that sio takes to solve that problem.  However,
ucom has a problem that sio doesn't have.

Consider the case where output is pending, and the device is closed.
ttyclose calls tt_close (which indirects to ucomclose) and then calls
ttyflush which calls tt_stop (which indirects to ucomstop).  Since
ucomclose removed all the usb transfer points, sc_oxfer will be NULL
when ucomstop calls ucomstart.  This results in a null pointer
dereference.

Since calling ucomstart in ucomstart solves other problems, we need to
work with this calling sequence.  The easiest way to do that is to
bail early if sc_oxfer is NULL.

Kazuaki ODA-san came up with this patch, and filed a PR.  I had seen
this bug at work and this patch does seem to solve it.  He had no idea
why it worked, but knew that either this patch, or backing out ucom.c
1.56 fixed his panic.  I just did the legwork of chasing down the code
paths that would cause this, and added a comment.  This is obscure
enough to warrant a comment, I think.

Submitted by: Kazuaki ODA-san
PR: 113964
Approved by: re (bmah)
2007-06-25 06:40:20 +00:00
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Sam Leffler
b038594e17 Correct msecs_to_ticks macro. This fixes problems when hz is not the
default 1000 setting.

Reviewed by:	thompsa, rpaulo
Approved by:	re (bmah)
2007-06-25 03:26:10 +00:00
Nate Lawson
81cd8a5bf0 Make acpica include path relative, not absolute.
Approved by:	re
2007-06-24 20:36:51 +00:00
Nate Lawson
41621cb408 The viapm module build had what appear to be some debugging CFLAGS left
around to force the IO port to a fixed address.  They were only turned
on in the module build and were present since the original import.  This
breaks soft power-off on the Asus A7V since it reprograms the SMBus base
address to a different one than the BIOS expects.  A similar issue was
found in the alpm(4) module build.

PR:		kern/113986, i386/97468
MFC after:	3 days
Approved by:	re
2007-06-24 20:35:59 +00:00
Alan Cox
fe8606ac9e Eliminate GIANT_REQUIRED from swap_pager_putpages().
Approved by:	re (mux)
MFC after:	1 week
2007-06-24 18:40:30 +00:00
Sam Leffler
d50ea6acfa Process tx callbacks when draining the tx q; this fixes a problem
where a device timeout that occurs with a mgt frame on the tx q
will leave the net80211 layer w/o any way to make progress.

Reviewed by:	thompsa, sephe
Approved by:	re (hrs)
2007-06-24 01:57:20 +00:00
Matt Jacob
530755ca2d If we're going to (for 23XX and 24XX cards) DMA firmware from the
request queues rather than shove it down a word at a time, we have
to remember to put it into little endian format. Use the macros
ISP_IOXPUT_{16,32} for this purpose. Otherwise, on sparc the firmware
is loaded garbled and we get a (not surprisingly) firmware checksum
failure and the card won't start and we don't attach it.

Approved by:	re (bruce)
MFC after:	3 days
2007-06-24 01:41:16 +00:00
Warner Losh
d98db3b7b2 Include usb_port.h
Approved by: re@ (blanket and/or cleanup commit approval)
2007-06-23 21:52:05 +00:00
Warner Losh
a272617c67 For USBVERBOSE case, we can't have " in any of the names.
Submitted by:  Flemming Jacobsen
Approved by: re (blanket)
2007-06-23 16:50:46 +00:00
Warner Losh
aca96341db Drag in another device: The Surecom RT2570.
Obtained from: OpenBSD
Approved by: re@ (blanket for device IDs)
2007-06-23 06:52:56 +00:00
Warner Losh
0b204f9c17 Add a boatload of devices from OpenBSD and NetBSD to kue and cdce.
Obtained From: OpenBSD/NetBSD
Approved by: re (blanket)
2007-06-23 06:47:43 +00:00
Rong-En Fan
e570d2a417 - Remove the warning about NULL filesystem. It is stable and safe to use in
both 6.x and 7.x. This is based on feedbacks on this thread

  http://docs.freebsd.org/cgi/getmsg.cgi?fetch=81818+0+current/freebsd-stable

  and my use it on 6.x.

MFC after:   	3 days

- Update the warning about UNION filesystem. It is now actively maintained,
  although there are still some issues being resolved.

Reviewed by:	freebsd-stable@, kris, bmah
Approved by:	re (bmah)
2007-06-23 06:42:40 +00:00
Warner Losh
2de4b931b6 Note the Belkin F5U111 Adapter is covered by NETMATE entry.
Approved by: re (blanket)
2007-06-23 06:29:19 +00:00
Warner Losh
cea0228c56 Remove duplicate ID and recall that I comes after E in alphabetical
listings.

Approved by: re@
2007-06-23 05:59:53 +00:00
Warner Losh
1331348cb7 Merge some device IDs from OpenBSD for aue. Minor sorting of usbdevs
to fix disorder.

Obtained from: OpenBSD
Approved by: re@ (blanket)
2007-06-23 05:52:12 +00:00
Warner Losh
02fb1cf4b9 These modules depend on usb, make that explicit
Approved by: re@
2007-06-23 04:34:38 +00:00
Warner Losh
fbd57cc069 We need a special module loader routine, not the stock usbd one. This
also eliminates a routine unused message.

Submitted by: mjacob
Approved by: re@
2007-06-23 04:20:24 +00:00
Warner Losh
78f3413f0c Initialize id before using it.
Submitted by: mjacob
Approved by: re@
2007-06-23 04:18:44 +00:00
Matt Jacob
2a9a64c6a2 Fix various compilation warnings for gcc-4.2.
Approved by:	re (bruce)
2007-06-23 00:02:20 +00:00
Andrew Thompson
e67b204a4a Check the correct port to see if synced is true.
PR:		misc/113958
Submitted by:	Aaron Needles
Approved by:	re (bmah)
MFC after:	1 week
2007-06-22 23:28:33 +00:00
Randall Stewart
a964e8de4c - Fix type casts in calling sctp_m_getptr, it expects a int not
an unsigned (returned by sizeof) also add cast to  comparison check
  for size bounds.
Approved by:	re(bmah@freebsd.org)
2007-06-22 14:40:09 +00:00
Randall Stewart
671d309c7c - Fix stream reset so it limits the number of streams that can be listed
- Fix fwd-tsn to use proper accessor so it does not overrun mbufs
- Fix stream reset error reporting to actually work (it has always been
  broken if the peer rejects a stream reset)
- Some 64 bit friendly changes

Approved by:	re(bmah@freebsd.org)
2007-06-22 13:50:56 +00:00
Konstantin Belousov
d66ba37013 Fix livelock that could occur when snapshoting UFS with quotas, where
some quota limit was exceeded. Sequence of UFS_VALLOC()/UFS_VFREE()
call there could cause inodeblock to have both freefile and inodedep
dependencies without any inode in the block being marked for write.
Then, softdep_check_suspend() would return EAGAIN forewer.

Force write of inodeblock with allocated freefile softdependency by
setting IN_MODIFIED flag in softdep_freefile and unconditionally calling
UFS_UPDATE() in ufs_reclaim.

Reported by:	kris
Debug help and tested by: 	Peter Holm
Approved by:	re (kensmith)
MFC after:	3 weeks
2007-06-22 13:22:37 +00:00
Warner Losh
c199bfa6cb Add support for Garmin iQue 3600
Submitted by: Lapo Luchini
PR: 113324
Approved by: re (kensmith, blanket)
2007-06-22 06:02:19 +00:00
Warner Losh
30d52b75e4 add support for Option GlobeTrotter 3G+
(PR says this may be from OpenBSD)

Submitted by: Simun Mikecin
PR: 111710
Approved by: re (kensmith, blanket)
2007-06-22 05:56:05 +00:00
Warner Losh
e5be70a464 Tactrix Openport support
Submitted by: Jonathan Charest
PR: 110992
Approved by: re (kensmith, blanket)
2007-06-22 05:53:05 +00:00
Warner Losh
54a25dd338 add Benq 3300U/4300U support
Submitted by: Denis Sadykov
PR: 110477
Approved by: re (kensmith, blanket)
2007-06-22 05:49:12 +00:00
Warner Losh
dffc4a655f Crystalfontz CFA-635 20x4 USB LCD
(plus minor sorting)

Submitted by: John Wilson
PR: 107526
Approved by: re (kensmith, blanket)
2007-06-22 05:44:41 +00:00
Warner Losh
c0a4ed889c Update uvisor to support the Fossil Abacus Wrist PDA
Submitted by: Simon Dick
PR: 96714
Approved by: re (kensmith, blanket)
2007-06-22 05:33:20 +00:00
Warner Losh
b1aafdf7af USB Ethernet Adaptor "ELECOM LD-USB20"
PR: 86195
Submitted by: kato <redzonemiata@yahoo.co.jp>
Approved by: re (kensmith)
2007-06-22 05:20:11 +00:00
Warner Losh
21bf93883e USL101 Host-to-Host bridge support
PR: 82436
Submitted by: Maxim M. Kazachek
Approved by: re (kensmith)
2007-06-22 05:14:27 +00:00
Pyun YongHyeon
081a65368c Reimplement bus_dmamap_load with bus_dmamap_load_buffer.
Previously it didn't honor parent dma tag's restrictions such that
an invalid dma segment could be passed to device. The driver for the
device may panic in sanity check routine for the dma segment or may
produce unexpected results. I have no idea how it could ever have
worked before.

Reviewed by:	grehan
Tested by:	gad
Approved by:	re (hrs)
2007-06-22 03:57:36 +00:00
Pyun YongHyeon
485aebfc80 Honor maxsegsz of less than a page size in a DMA tag. Previously it
used to return PAGE_SIZE without respect to restrictions of a DMA tag.
This affected all of the busdma load functions that use
_bus_dmamap_loader_buffer() as their back-end.

Reviewed by:	scottl (long a ago)
Approved by:	re (hrs)
2007-06-22 03:54:53 +00:00
Nate Lawson
00a304487f Update the suspend/resume user API while maintaining backwards compat.
Improvements:
* /etc/rc.suspend,rc.resume are always run, no matter the source of the
  suspend request (user or kernel, apm or acpi)
* suspend now requires positive user acknowledgement.  If a user program
  wants to cancel the suspend, they can.  If one of the user programs
  hangs or doesn't respond within 10 seconds, the system suspends anyway.
* /dev/apm is clonable, allowing multiple listeners for suspend events.
  In the future, xorg-server can use this to be informed about suspend
  even if there are other listeners (i.e. apmd).

Changes:
* Two new ACPI ioctls:  REQSLPSTATE and ACKSLPSTATE.  Request begins the
  process of suspending by notifying all listeners.  acpi is monitored by
  devd(8) and /dev/apm listener(s) are also counted.  Users register their
  approval or disapproval via Ack.  If anyone disapproves, suspend is vetoed.
* Old user programs or kernel modules that used SETSLPSTATE continue to
  work.  A message is printed once that this interface is deprecated.
* acpiconf gains the -k flag to ack the suspend request.  This flag is
  undocumented on purpose since it's only used by /etc/rc.suspend.  It is
  not intended to be a permanent change and will be removed once a better
  power API is implemented.
* S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z.
  This restores previous behavior of halt/shutdown -p being the interface.
* Miscellaneous improvements to error reporting

Approved by:	re
2007-06-21 22:50:37 +00:00
Warner Losh
638c640a71 Add support for YANO external USB-HDD.
Submitted by: Norihiro TANAKA
PR: 94742
Approved by: re (kensmith blanket)
2007-06-21 20:13:07 +00:00
Maksim Yevmenkin
280c458af8 Replace sosend() with direct call to .pru_send method on the
L2CAP socket. This is to avoid LOR with sx(9) lock in sblock()
called from sosend_generic().

Approved by:	re (kensmith)
MFC after:	1 week
2007-06-21 19:55:49 +00:00
Warner Losh
c2861c84f6 Fix two PRs by adding vendor IDs:
PR 108097: ADMtek 851X USB-to-LAN adapter
PR 74849: Samsung SPH-i500 does not attach properly as usb modem/Palm device

PR: 108097, 74849
Approved by: re@ (kensmith trivial usb blanket)
2007-06-21 17:55:28 +00:00
Warner Losh
bbc84740c1 Latest round of usb cleanups:
o Consistently use device_foo_t and bus_foo_t for functions implementing
  device_foo and bus_foo respectively.  Adjust those routines that were wrong
  (we should do this throughout the tree).
o make all the modules depend on usb.  Otherwise these modules won't
  load.
o ucycom doesn't need usb_port.h
o Minor unifdefing
o uhub, umass, ums, urio, uscanner conversion complete.
o ukbd: Remove the NO_SET_PROTO quirk (fixes a PR 77940).  NetBSD removed
  their check and setting the proto a long time ago.
o umodem panic fixed.  UQ_ASSUME_CM_OVER_DATA quirk removed because I've never
  seen a umodem that needed this rejection for proection (this gets rid of
  ~20% of the quirks).

Approved by: re@ (kensmith)
PR: 77940
2007-06-21 14:42:34 +00:00
Warner Losh
cb198db63b Restore approximately FreeBDS 6.x's level of compatibility macros.
Older drivers that do not wish to convert to the native API (which
will work with both 6.x and 7.x) can simply include
<dev/usb/usb_port.h>.  Drivers in the tree shouldn't these macros,
unless they actually work on other OSes and are actively maintained.

Approved by: re@
2007-06-21 14:36:22 +00:00
Warner Losh
7bd250d818 s/logprintf/printf/g
Approved by: re@
2007-06-20 05:11:37 +00:00
Xin LI
1f5d755661 Use .CURDIR when referring source code. This fixes build
when 'make obj' was done first.  I found this when fixing
a problem reported by tinderbox, but forgot to send the
patchset to re@ altogether.

Approved by:	re (kensmith)
2007-06-20 00:29:51 +00:00
Xin LI
8dac5046be Fix build problem caused by a set of typos.
Reported by:	tinderbox
Approved by:	re (mux)
2007-06-19 14:56:35 +00:00
Konstantin Belousov
9bc911d4a2 devfs_free() calls free_unr(), that may sleep.
Postpone call to devfs_free() after cdev mutex is dropped. Reuse
cdp_list link for queuing devices awaiting deletion in the
cdevp_free_list.

Reported by:	Hans Petter Selasky <hselasky c2i net>
Tested by:	Peter Holm
Approved by:	re (kensmith)
MFC after:	2 weeks
2007-06-19 13:19:23 +00:00
Konstantin Belousov
7550e3eac4 Add the witness warning for free_unr. Function could sleep, thus callers
shall not have any non-sleepable locks held.

Submitted by:	Hans Petter Selasky <hselasky c2i net>
Approved by:	re (kensmith)
2007-06-19 13:13:17 +00:00
Xin LI
b76d072be1 Include usb_port.h to fix build.
Reported by:	tinderbox
Approved by:	re (mux)
2007-06-19 10:28:08 +00:00
Ariff Abdullah
715ed548ab Fix headphone jack sensing support for Olivetti Olibook 610-430 XPSE.
Tested by:	Gonzalo Lionel Rodriguez
2007-06-18 22:39:27 +00:00
Randall Stewart
ea1fbec59a - Two more static analisys bugs found by cisco's tool on a subsequent
run.
2007-06-18 22:36:52 +00:00
Warner Losh
c8222a9830 Mark the few remaining drivers that haven't been converted as needing
usb_port.h by explicitly including it.
2007-06-18 22:32:09 +00:00
Warner Losh
3f35ccb617 Expand usb_port macros 2007-06-18 22:31:35 +00:00
Warner Losh
34f7cf9af5 Remove usb_port.h from usb.h, except for one or two useful things that
don't belong there (these moved into usb.h).
2007-06-18 22:30:53 +00:00
Warner Losh
bd6bb69705 Expand usb_port.h macros. 2007-06-18 22:30:08 +00:00
Warner Losh
70c1d26317 Expand usb_callout_init 2007-06-18 22:28:32 +00:00
Warner Losh
70f16d924f Finish removal of usb_port.h macros. 2007-06-18 22:27:57 +00:00
Warner Losh
528fb030b3 Explicitly use usb_port.h to get compat macros. 2007-06-18 22:26:41 +00:00
Warner Losh
a5509ec848 Use device_foo_t to declare kobj methods
Fix shutdown type to return int rather than void.
2007-06-18 22:25:46 +00:00
Warner Losh
79d80dc284 finish removing usb_port.h macros.
Use device_foo_t to declare functions
a little de-k&r
2007-06-18 22:24:32 +00:00
Warner Losh
38b00ba0cd Finish removing usb_port.h compat macros. 2007-06-18 22:23:20 +00:00
Marius Strobl
7ca851e3a5 According to the default font size on sparc64 provide a 12 x 22
mouse pointer instead of a 8 x 16 one so device drivers don't
need to bring there own one there and in gfb_mouse() (ab)use
the pixel_mask argument of putm() to pass along on/off info as
erasing the mouse cursor image by redrawing the text underneath
doesn't work as we use hardware cursors on sparc64.
2007-06-18 22:15:17 +00:00
Randall Stewart
eacc51c5b6 - Fixes cstatic issues found by cisco sa tool (missing frees and such
on error legs)
- align sctp_sockstore to 64 bit boundary ..
2007-06-18 21:59:15 +00:00
Marius Strobl
f0d8df7bb2 - Move ofw_pci_alloc_busno() to the ofw_pci KOBJ interface,
allowing the driver for the host-PCI-bridge to indicate that
  reenumeration of the PCI busses isn't supported by returning
  -1 instead of a valid PCI bus number. This is needed in order
  support both Tomatillo, which don't support reenumeration and
  thus are apparently intended to be used for independently
  numbered PCI domains only, and Psycho bridges, whose busses
  need to be reenumerated on at least some E450, without the
  #ifndef currently used for sun4v in order to support multiple
  independently PCI domains. The actual allocation/incrementation
  of the PCI bus numbers is now done in psycho(4), though it
  no longer establish a mapping between bus numbers and device
  nodes like ofw_pci_alloc_busno() did as that functionality
  wasn't used (but can easily brought back if really needed).
  The now no longer used sys/sparc64/pci/ofw_pci.c is also
  removed from sys/conf/files.sun4v as ofw_pci_alloc_busno()
  wasn't used there in the first place.
- In ofw_pci_default_{adjust_busrange,intr_pending}() sanity
  check that the device has a parent before passing it on.
- Make psycho_softcs static to sys/sparc64/pci/psycho.c as
  it's not used outside of that module.
- In sys/sparc64/pci/ofw_pcib_subr.c remove the superfluous
  inclusion of opt_global.h and correct the debug output for
  adjusting the subordinate bus number.
2007-06-18 21:49:42 +00:00
Marius Strobl
9030c513c8 For sun4u also add PCI busses with a device unit number of -1
instead of using the PCI bus number, like it's already done for
sun4v in order to deal properly with independently numbered PCI
domains which can't be reenumerated (in the case of sun4u f.e.
Tomatillo bridges). For machines where we need to reenumerate
all PCI busses this change obviously introduces the theoretical
cosmetic problem that the device number of the PCI bus no longer
equals to its PCI bus number. In practice this doesn't happen
as both are assigned linearly and in parallel.
2007-06-18 21:46:07 +00:00
Scott Long
d38f7b62af Fix some debugging code that crept in accidentally. 2007-06-18 18:28:43 +00:00
Maxim Konovalov
d069a5d478 o Make ipfw set more robust -- now it is possible:
- to show a specific set: ipfw set 3 show
    - to delete rules from the set: ipfw set 9 delete 100 200 300
    - to flush the set: ipfw set 4 flush
    - to reset rules counters in the set: ipfw set 1 zero

PR:		kern/113388
Submitted by:	Andrey V. Elsukov
Approved by:	re (kensmith)
MFC after:	6 weeks
2007-06-18 17:52:37 +00:00
Xin LI
b746bf0820 Use vfs_timestamp() instead of nanotime() - make it up to
the user to make decisions about how detail they wanted
timestamps to have.
2007-06-18 14:40:19 +00:00
Randall Stewart
d95ddf0251 Add additional logging level mask for packet_logging too. 2007-06-18 13:57:37 +00:00
Pawel Jakub Dawidek
dfe97ff4a5 We only flush entries related to the given file system. Currently there are
no 'invalid' cache entires - file system is responsible for keeping it that
way. The comment should have been updated in rev.1.25.
2007-06-18 09:28:24 +00:00
Robert Watson
c4f45442c4 Update comment: kernel privileges are, in fact sorted by subsytem. 2007-06-18 07:54:27 +00:00
Warner Losh
bb92e05941 minor style(9) polishing
# but we need a usb_match function, if we don't already have one...
2007-06-18 02:15:58 +00:00