Commit Graph

16398 Commits

Author SHA1 Message Date
Ariff Abdullah
082f63835c Flush remaining malloc() cleanups (M_NOWAIT -> M_WAITOK). 2007-06-17 06:10:43 +00:00
Scott Long
b50569b71d Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.
2007-06-17 05:55:54 +00:00
Matt Jacob
6eb9bbf329 Initialize key to zero. 2007-06-17 04:40:33 +00:00
Kip Macy
bb38cd2fbc - switch adapter and port lock over to using sx so that resources
can be allocated atomically
- add debug macros for printing lock initialization / teardown
- add buffers to port_info and adapter to allow each lock to have a
  unique name
- destroy mutexes initialized by cxgb_offload_init
- remove recursive calls to ADAPTER_LOCK
- move callout_drain calls so that they don't occur with the lock held
- ensure that only as many qsets as are needed are initialized and
  destroyed

MFC after: 3 days
Sponsored by: Chelsio Inc.
2007-06-17 04:33:38 +00:00
Matt Jacob
60a35d3afd Initialize mouse resolution to zero if converting from
OLD to NEW.
2007-06-17 04:32:18 +00:00
Andrew Gallatin
4d69a9d061 Also mark writecombine as enabled when PAT is used to enable
it rather than MTRRs.
2007-06-17 00:09:51 +00:00
Warner Losh
fab38de2d3 only register a ithread handler if the card requests an ithread
handler.
2007-06-16 23:33:57 +00:00
Marius Strobl
e87137e133 - In gem_bitwait() check that the bit clears/was set in the content
of the register rather than in the offset describing the register.
- In gem_reset_rx() let gem_bitwait() check for the Rx reset bit
  rather than the Tx reset bit to clear.

Obtained from:	OpenBSD (same/similar bugs being fixed)
2007-06-16 23:27:59 +00:00
Marius Strobl
40fa5858b1 Export mc146818_def_{read,write}() so the front-end can make use
of them if needed.
2007-06-16 23:10:00 +00:00
Marius Strobl
adc4099183 In OF_init() check the return value of OF_getprop().
Found with:	Coverity Prevent(tm)
CID:		679
2007-06-16 22:34:16 +00:00
Marius Strobl
838f76c0a9 - Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by
moving OF_set_mmfsa_traptable() (SUNW,set-trap-table with the two
  arguments used here is specific to sun4v) to MD code.
- In sys/dev/ofw/openfirm.h remove prototypes for unimplemented
  functions and unused Solaris compatibility macros.
2007-06-16 22:30:38 +00:00
Marius Strobl
c54e7ea989 Move the gallant 12 x 22 font data from a .h to a .c so it doesn't need
to be compiled into every driver making use of it. Use a const instance
of struct gfb_font for this as the font isn't intended to be changed at
run-time and in order to accompany the font data with height and width
info.
2007-06-16 21:48:50 +00:00
Marius Strobl
7d62dd366b Sync the styles of sys/boot/ofw/libofw/openfirm.c and
sys/dev/ofw/openfirm.c with themselves, with each-other
and with style(9).
2007-06-16 21:38:04 +00:00
Marius Strobl
7a89ac4d26 - Define data of struct gfb_font a const as it's only used to supply font
data and remove the array size from the definition as f.e. the gallant
  12 x 22 font data is 256 * 44 in size, exceeding the previously hard-
  coded size.
- Declare the bold8x16 instance of struct gfb_font as const as it's not
  intended to be changed at run-time as a whole either.
- Use __FBSDID in xboxfb.c

Tested by:	rink
2007-06-16 21:31:53 +00:00
Ariff Abdullah
c17bfa7714 Use signed int, since all the samples are in that form.
This will help future implementation of soft amplifier
with variable/relative 0db.
2007-06-16 20:36:39 +00:00
Wilko Bulte
ff9d7fae6a Per request (to core) by the person refered to in the comment. 2007-06-16 19:23:14 +00:00
Ariff Abdullah
e4e61333ff Last (again ?!?) major commit for RELENG_7, featuring total Giant
eradication in/from userland path, countless locking fixes, etc.

- General sleep call through msleep(9) has been converted to condvar(9)
  with better consistencies.
- Heavily guard every possible "slow path" entries (open(), close(),
  few ioctl()s, sysctls), but once it entering "fast path" (io, interrupt
  started), they are free to fly on their own.
- Rearrange locking sequences, resulting better concurrency and
  serialization. Large part doesn't even need locking at all, and will be
  removed in future. Less clutter, except in few places due to lock
  ordering.
- Anonymous mixer object creation/deletion to simplify mixer handling
  beyond typical mixer ioctls.
  Submitted by:		chibis (with modifications)
- Add few mix_[get|set|..] functions to avoid calling mixer_ioctl()
  directly using cryptic arguments.
- Locking fixes to avoid possible deadlock with (still under Giant) USB.
- Better simplex/duplex device handling.
- Recover mmap() functionality for recording, which has been lost
  since 2.2.x - 3.x (the introduction of newpcm). Full-duplex mmap still
  doesn't work (due to VM/page design), but people still can mmap
  both by opening each direction separately. mmaped playback is guarantee
  to work either way.
- New sysctl: "hw.snd.compat_linux_mmap" to allow PROT_EXEC page
  mapping, due to recent changes in linux compatibility layer which
  require it. All linux applications that using sound + mmap() (mostly games)
  require this to be enabled. Disabled by default.
- Other goodies.. too many, that will increase releng7 shareholder value
  and make users of releng6 (and below) cry ;)

* This commit should be atomic. If anything goes wrong (not counting problem
  originated from elsewhere), I will not hesitate to revert everything back
  within 12 hours. This substantial changes itself not a rocket science
  and the process has begun for almost 2 years, and lots of incremental
  changes are already in place during that period of time.
* Some issues does occur in snd_emu10kx (note the 'x') due to various
  internal locking issues and it is currently being worked on by chibis.

Tested by:	chibis (Yuriy Tsibizov), joel, Alexandre Vieira,
          	many innocent souls...
2007-06-16 03:37:28 +00:00
Pyun YongHyeon
f28a171ce2 Disable TSO support.
Without bus_dma clean up and increment of number of Tx descriptors
it's hard to guarantee correct Tx operation in TSO case. The TSO
support would be enabled again when I get more feeback from re(4)
patch posted to current.
2007-06-16 02:54:19 +00:00
David Christensen
ca4c7b3b75 - Migrated IPMI fix from RELENG_6.
- Added additional debug code.
2007-06-16 02:27:03 +00:00
Hidetoshi Shimokawa
99b242f354 - Lock sbp_write_cmd() and ORB_POINTER_ACTIVE flag.
- Remove unnecessary timestamps.
- Return CAM_RESRC_UNAVAIL for ORB shortage.
- Fix a lock problem when doorbell is used.
- Fix a potential bug for unordered execution.
2007-06-16 00:59:41 +00:00
Kip Macy
c0fdfb956d Fix build warnings
Submitted by: mjacob@
2007-06-15 20:02:02 +00:00
Nate Lawson
70fa7bc0ac Convert magic to a uintptr_t. This should get rid of some warnings on
gcc4.
2007-06-15 18:02:34 +00:00
Andrew Gallatin
f616ebc73f correct some limits on interrupt proccessing so that
fast forwarding back out the same mxge interface works nicely.
2007-06-14 19:35:03 +00:00
Warner Losh
200d9c860d Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
Warner Losh
a73530728e Move PWR_* from usb_port.h to usb.h 2007-06-14 16:12:04 +00:00
Warner Losh
058cc61a3e Move malloc definitions to usb.h.
Also, remove usb_malloc_type: it was unused.
Remove METHODS_NONE: it was unused.
Move include of opt_usb.h from usb_port.h to usb.h, since usb_port.h is
going away (there will be a usb_compat.h for out-of-tree drivers that want it).
2007-06-14 15:09:21 +00:00
Hidetoshi Shimokawa
9b33b1ab38 - Suppress compiler optimization so that orb[1] must be written first.
We may need an explicit memory barrier for other architectures other than i386/amd64.

MFC after: 3 days
2007-06-14 12:52:13 +00:00
Ariff Abdullah
504e00af6b Buffer optimization and locking cleanup. Don't resize/malloc
unless it is really necessary to ease down unlock/lock sequence.
2007-06-14 11:15:51 +00:00
Ariff Abdullah
5d75db4f00 Drain all callout handlers during driver detach appropriately. 2007-06-14 11:13:38 +00:00
Ariff Abdullah
79b783c721 Don't push too hard waiting/looping for codec detection interrupt.
Let the interrupt do the job waking us up.
2007-06-14 11:11:06 +00:00
Ariff Abdullah
553dc5c78c - Add option to allow sleeping malloc(9).
- Cleanup locking assertions that aren't needed anymore.
2007-06-14 11:10:21 +00:00
Warner Losh
6f93a78c1a config_detach is just used in one place, so expand it inline. 2007-06-13 20:58:57 +00:00
Bruce M Simpson
d3fd8d85fc Do not attempt to enable AHCI mode on ALi SATA controllers other
than the 5288.

It is not correctly implemented in earlier silicon, and the BIOS often
lies about AHCI capability on platforms where these chips are deployed.
With this change I am able to boot FreeBSD on the ASUS Vintage AH-1
barebones system.

Approved by:	sos
2007-06-13 17:44:49 +00:00
Warner Losh
2283429409 Remove more unnecessary and unwanted __OtherBSD__ ifdefs. 2007-06-13 06:00:10 +00:00
Warner Losh
63ba0d2d76 Remove more __OtherBSD__ ifdefs that don't make sense, and haven't for
some time.
2007-06-13 05:45:48 +00:00
Warner Losh
778e5b6687 Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functional
change, and MD5's appear to be the same.
2007-06-13 05:37:59 +00:00
Kip Macy
ef72318f0e - import new common code for the T304
- update to firmware version 4.1.0

- switch over to standard method for initializing cdevs (contributed by scottl@)
- break out timer_reclaim_task to be per-port
- move msix teardown into separate function
- fix bus_setup_intr for msi-x for the multi-port case so that msi-x resources
  are not corrupted on unload
- handle 10/100/1000 base-T media and auto negotiation
- bind qset to cpu even for singleq case
- white space cleanups
- remove recursive PORT_LOCK
- move mtu setting to separate function
- stop and re-init port when changing mtu
- replace all direct references to m_data with calls to mtod
- handle attach failure better by not trying to de-initialize
  taskqueues when they have not been allocated
- no longer default to jumbo frames

Sponsored by: Chelsio
MFC after: 3 days
2007-06-13 05:36:00 +00:00
Warner Losh
828dd7cd00 Remove compat macros. md5 the same. 2007-06-12 21:35:18 +00:00
Warner Losh
9ab3a4add1 First pass at removing __OtherBSD__. We can't blindly remove all of
them in bulk because there is at least one feature that's
unimplemented on FreeBSD that needs to be done and these are good
placeholders.
2007-06-12 19:40:20 +00:00
Andrew Gallatin
f04b33f842 Use the new IFCAP_LRO to enable/disable LRO. 2007-06-12 19:15:16 +00:00
Warner Losh
f3ece13593 Don't pretend to support !BSD systems. 2007-06-12 19:01:32 +00:00
Warner Losh
5ea892ec7c Remove usb_kthread_create*. They are now unused. 2007-06-12 18:52:29 +00:00
Warner Losh
015454acee unifdef -D__FreeBSD__ -U__NetBSD__ -U__OpenBSD__
Use kthread_create directly
2007-06-12 18:52:07 +00:00
Warner Losh
4f9929e80f Eliminate usb_thread_t. 2007-06-12 17:30:54 +00:00
Warner Losh
0f5a2cb6b7 Remove USBDEV() macro. We do not need a macro that is defined as its
only argument.  It was used inconsistently in the tree, so remove it.
2007-06-12 16:52:07 +00:00
Warner Losh
e4255d701d clalloc and clfree are useles. Remove them. Remove dead code that's
always been dead for years, but has been obfuscated by these macros.
2007-06-12 16:41:29 +00:00
Warner Losh
645016c0e4 Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from
usb_port.h.  They aren't needed, and are a legacy of this code's past.
2007-06-12 15:37:19 +00:00
Pyun YongHyeon
a272ea16ed The maximum size of the sum of all segment lengths in a given DMA mapping
should be 65535 + link layer headers.

Pointed out by:	gallatin
2007-06-12 10:51:47 +00:00
Pyun YongHyeon
66b255c049 Nuke duplicated __FBSDID. 2007-06-12 04:33:21 +00:00
Pyun YongHyeon
8b1568ff6e Add checks for contigmalloc(9) failure. 2007-06-12 04:30:30 +00:00