Commit Graph

74233 Commits

Author SHA1 Message Date
Robert Noland
6400e3ac8c MFC 198692
Use system specified memory barriers rather than rolling our own.
2009-11-02 15:57:03 +00:00
Robert Noland
1675ae3b86 MFC 198691
Fix blitter support for RS880 chips
2009-11-02 15:53:32 +00:00
Max Khon
fd6bbf0435 MFC: Allow KMOD with hypens and dots. 2009-11-02 09:47:15 +00:00
Alan Cox
588b5e6ee8 MFC r197331, r197394
Add getpagesizes(3).
2009-11-01 19:22:07 +00:00
Andriy Gapon
ea9b1909f6 MFC 197450: number of cleanups in i386 and amd64 pci md code 2009-11-01 18:39:26 +00:00
Andriy Gapon
2df1facbb7 MFC 198279: fix sorting of some amd* entries in some makefiles 2009-11-01 17:56:45 +00:00
Andriy Gapon
fc06d8191e MFC 198271: add amdtemp to i386 NOTES 2009-11-01 17:53:33 +00:00
Andriy Gapon
f13868d206 MFC 197647: cpufunc.h: unify/correct style of c extension names 2009-11-01 17:45:37 +00:00
Andriy Gapon
33b3442f13 MFC 197658: print machine in kernel boot version string
PR:		kern/126926
2009-11-01 17:40:05 +00:00
Andriy Gapon
b8daad66fd MFC 197641: print_caddr_t: drop incorrect __unused from parameter 2009-11-01 17:36:36 +00:00
Andriy Gapon
0406cc12b6 MFC r197128,197325: add support for smbus controller found in AMD SB700 2009-11-01 11:34:13 +00:00
Ed Schouten
f36e7051c7 MFC various commits back to stable/8:
SVN r197174:
  Make sure we never place the cursor outside the screen.

  For some vague reason, it may be possible that scp->cursor_pos exceeds
  scp->ysize * scp->xsize. This means that teken_set_cursor() may get
  called with an invalid position. Just ignore the old cursor position in
  this case.

  Reported by:  Paul B. Mahol <onemda gmail com>

SVN r198213:
  Make lock devices work properly.

  It turned out I did add the code to use the init state devices to set
  the termios structure when opening the device, but it seems I totally
  forgot to add the bits required to force the actual locking of flags
  through the lock state devices.

  Reported by:	ru

SVN r198215, r198217:
  Fix a typo in the jail(8) manpage.

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198216:
  Fix qouting in a comment, to make it look more consistent

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198223:
  Properly set the low watermarks when reducing the baud rate.

  Now that buffers are deallocated lazily, we should not use
  tty*q_getsize() to obtain the buffer size to calculate the low
  watermarks. Doing this may cause the watermark to be placed outside the
  typical buffer size.

  This caused some regressions after my previous commit to the TTY code,
  which allows pseudo-devices to resize the buffers as well.

  Reported by:  yongari, dougb
2009-11-01 10:30:30 +00:00
Alexander Motin
5d933cfd98 MFC rev. 198623:
Add missing ATA kernel options dependencies.
2009-11-01 10:01:39 +00:00
Stacey Son
83613795b2 MFC 197240,197241,197242,197243,197293,197294,197407:
Add EVFILT_USER filter and EV_DISPATCH/EV_RECEIPT flags to kevent(2).

Approved by: rwatson (mentor)
2009-10-31 21:22:18 +00:00
Alan Cox
13529df13b MFC r197317
When superpages are enabled, add the 2 or 4MB page size to the array of
  supported page sizes.
2009-10-31 19:02:08 +00:00
Alan Cox
ebc91405bd MFC r197316
Add a new sysctl for reporting all of the supported page sizes.
2009-10-31 18:54:26 +00:00
Alan Cox
38c15033c7 MFC r198472
Eliminate an unnecessary check from vm_fault_prefault().
2009-10-31 18:18:32 +00:00
Antoine Brodin
5a1c285266 MFC r196891 to stable/8:
Change w_notrunning and w_stillcold from pointer to array so that sizeof
  returns what is expected.

  PR:		kern/138557
  Discussed with:	brucec@
  MFC after:	1 month
2009-10-31 12:26:40 +00:00
Christian Brueffer
ce68852cc2 MFC: r198356
Fix a memory leak in an error case.
2009-10-31 11:08:04 +00:00
Christian Brueffer
b7ef6e29a5 MFC: r198327
Add a missing free() call.
2009-10-31 10:59:53 +00:00
Rui Paulo
e22a16d5d3 MFC r198230, r198242, r198260, r198346, r198369, r198384:
More mesh fixes to comply with latest draft.
2009-10-30 19:59:50 +00:00
Robert Noland
5a3d86c297 MFC r197950
Add pci id's for Intel G41 chipset
2009-10-30 16:43:28 +00:00
Robert Noland
6137518b87 MFC r197951
Add support for Intel G41 chipset
2009-10-30 16:37:58 +00:00
Robert Noland
357a8e800b MFC r196470-196471,197154-197155,197603-197606
Sync radeon drm support

This adds kernel support for r6/7xx 3D.
2009-10-30 16:32:35 +00:00
Robert Noland
d84490b532 MFC r196466
Add a read only sysctl tracking the hw.drm.msi tunable.
2009-10-30 16:14:17 +00:00
Robert Noland
1587b7fc87 MFC r196465
Clean up the handling of device minors
2009-10-30 16:12:28 +00:00
Robert Noland
e7d8e24d0a MFC r196464
Clean up the locking in drm_alloc_resource()
2009-10-30 16:06:32 +00:00
Robert Noland
713444a957 MFC r198097
Set the active flag in the PMBR when we install bootcode on a GPT
partitioned disk.  Some BIOS require this to be set before they will
boot the device.
2009-10-30 15:45:00 +00:00
Andrew Thompson
bfa1f203df MFC r198373
Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
 previously only available via bootverbose.

PR:		usb/137191
2009-10-29 23:28:48 +00:00
Andrew Thompson
fbcc87cbbc MFC r198258
Add opt_gdb.h which is now needed by ucom.
2009-10-29 23:28:21 +00:00
Andrew Thompson
906c96039d MFC r198257
Add support for newer WinChipHead CH341 chips, previously in the uch341 driver.
2009-10-29 23:27:40 +00:00
Andrew Thompson
83c0f67853 MFC r198153
Correct offset calcluation for the NCM implementation.
2009-10-29 23:27:00 +00:00
Andrew Thompson
6a8d0ac969 MFC r198152
Only poll ukbd if KDB is active.
2009-10-29 23:26:29 +00:00
Andrew Thompson
1ea6a20c73 MFC r198151
Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
 all host controllers at the same time, we avoid problems where the BIOS will
 actually write to the USB registers of all the USB host controllers every time
 we handover one of them, and consequently reset the OS programmed values.
2009-10-29 23:25:52 +00:00
Andrew Thompson
b0deb9099b MFC r197999 (hrs)
Fix the 106/109 USB Japanese keyboard "underscore" issue.
 Sun Type 6 USB keyboard support added in rev 1.46 conflicted with
 some scan codes used in Japanese keyboards because the scan code
 conversion routine was ambiguous for the overlapped codes.

PR:		ports/134005
2009-10-29 23:25:13 +00:00
Andrew Thompson
48bd741396 MFC r197573
Add back endpoint swap detection that was disabled in an earlier driver
 conversion.
2009-10-29 23:24:41 +00:00
Andrew Thompson
b56d97e2af MFC r197572
Add new FTDI IDs.
2009-10-29 23:24:10 +00:00
Andrew Thompson
e792954dba MFC r197570
Add experimental support for usb serial console and polled mode during DDB.
2009-10-29 23:23:34 +00:00
Andrew Thompson
6b48cd2444 MFC r197569
Add a config number quirk for the ELSA_MODEM1
2009-10-29 23:22:54 +00:00
Andrew Thompson
589c414bdf MFC r197568
add more device IDs
2009-10-29 23:22:23 +00:00
Andrew Thompson
9d2344fb86 MFC r197567
Allow setting of MAC address for AXE based ethernet adapters.
2009-10-29 23:21:52 +00:00
Andrew Thompson
381882bf15 MFC r197566
Increase the rx buffer size to 16384 bytes, this increases RX performance from
 50Mbps to 220Mbps on PLANEX GU-1000T.
2009-10-29 23:21:20 +00:00
Andrew Thompson
c21bee0c36 MFC r197565
- Remove SAMSUNG_YP_U2 now that it is in the cam layer
 - Add quirk from Tobias Grosser for Western Mypassword
2009-10-29 23:20:47 +00:00
Andrew Thompson
078da83100 MFC r197564
Add new usbdev entries for Marvell, FTDI, Option and Western.
2009-10-29 23:20:15 +00:00
Andrew Thompson
d66897e03e MFC r197563
Add basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.
2009-10-29 23:19:41 +00:00
Andrew Thompson
57866e6c93 MFC r197562
Add extra safety locking when clobbering xfer->flags_int.started in start and
 stop functions, because xfer->flags_int is also updated by the USB controller,
 under the controller lock.
2009-10-29 23:18:59 +00:00
Andrew Thompson
d81c7ac0fa MFC r197561
Correct buffer sizes used so that they match. The old code could give the
 impression that a overflow situation existed but was not possible.
2009-10-29 23:18:27 +00:00
Andrew Thompson
88f788a6c5 MFC r197559
Add support for USB language selection.

PR:		usb/138563
2009-10-29 23:17:54 +00:00
Andrew Thompson
9d168176f5 MFC r197558
Fix NULL-pointer dereference in usb_endpoint_foreach().

PR:		usb/138389
2009-10-29 23:17:23 +00:00
Andrew Thompson
f23c09d0b0 MFC r197556
Clear all interrupts rather than just SETUP packet.
2009-10-29 23:16:39 +00:00
Andrew Thompson
320dbc0942 MFC r197555
Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
 statements to zero.
2009-10-29 23:16:00 +00:00
Andrew Thompson
ffa540b752 MFC r197554
Import two PCI quirks from Linux

  - Add quirk for ATI SB600 and SB700 to free SMB controller
  - Correct schedule sleep time to 10us on the VIA ehci controller
2009-10-29 23:15:26 +00:00
Andrew Thompson
1063b450cd MFC r197553
- clean up USB detach logic. There seems to be some problems detaching multiple
   USB HUBs connected in series from the root.
2009-10-29 23:14:39 +00:00
Andrew Thompson
6333b36c43 MFC r196826
Make umass(4) pass device USB serial number to CAM, making it possible
 to e.g. retrieve it using camcontrol(8).
2009-10-29 23:14:06 +00:00
Andrew Thompson
6536a23656 MFC r196497
Remove redundant locking.
2009-10-29 23:13:36 +00:00
Andrew Thompson
f18778a473 MFC r196496
Add a reminder comment to optimize bus_dmamap_sync calls.
2009-10-29 23:13:02 +00:00
Andrew Thompson
edd4ee99cf MFC r196495
Add mass storage quirks.

PR:             usb/137138,usb/137226,usb/137789,usb/135372
2009-10-29 23:12:29 +00:00
Andrew Thompson
d92f7ea655 MFC r196494
- fix uvisor support, mostly correct buffer sizes used.
 - correct device info flag for SONY Cli NR70V
2009-10-29 23:11:48 +00:00
Andrew Thompson
d51a8c13ea MFC r196493
- Fix false positive uipaq probe
2009-10-29 23:11:13 +00:00
Andrew Thompson
2bb2691018 MFC r196492
- fix CDC ethernet matching order so that the match flags get correct.
2009-10-29 23:10:41 +00:00
Andrew Thompson
0627fc1870 MFC r196491
We used force all of the GPIO pins low first and then
 enable the ones we want. This has been changed to better
 match the ADMtek's reference design to avoid setting the
 power-down configuration line of the PHY at the same time
 it is reset.
2009-10-29 23:10:11 +00:00
Andrew Thompson
9fd6caea70 MFC r196490
- FIFO's are always opened separately in read and write direction even if the
   actual device is opened for read and write. Fix fflags check so that the UFM
   and URIO drivers work.
2009-10-29 23:09:37 +00:00
Andrew Thompson
61908699b5 MFC r196488
- allow disabling "root_mount_hold()" by setting a sysctl/tunable at boot
 - remove some redundant initial explore code
2009-10-29 23:09:02 +00:00
Konstantin Belousov
5984920662 MFC r197930:
Postpone dropping fp till both kq_global and kqueue mutexes are
unlocked.
2009-10-29 16:28:21 +00:00
Konstantin Belousov
c2204c03c8 MFC r197389:
Do panic regardeless of execution mode at the moment of T_RESERVED trap.
2009-10-29 16:24:39 +00:00
Konstantin Belousov
ce8e32de5c MFC r197428:
Add per-process osrel node to the procfs, to allow read and set p_osrel
value for the process.
2009-10-29 16:19:58 +00:00
John Baldwin
ff5bfa3ef6 MFC 197439:
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.
2009-10-29 16:00:27 +00:00
John Baldwin
983998573b MFC 197649:
Do not hold the ACPI A/C adapter lock when changing the power profile.
2009-10-29 15:28:05 +00:00
John Baldwin
9ad4b9fbd2 MFC 197648:
Split the 'video' ACPI lock up into two locks to resolve a LOR with the
sysctl lock.  The 'video' lock now protects the 'bus' of video output
devices attached to a graphics adapter.  It is used when iterating over
the list of outputs, etc.  The 'video_output' lock is used to lock the
output-specific data similar to a driver lock for the individual video
outputs.
2009-10-29 15:24:57 +00:00
John Baldwin
9e14139d9b MFC 196840:
Fill the reverse RSS map with 0xff's so that the subsequent loop to
calculate the values will work properly.
2009-10-29 15:17:59 +00:00
John Baldwin
50d356311a MFC 197460:
Remove unnecessary locking from attach().  This fixes a LOR between the
acpi_ibm lock and the sysctl lock.
2009-10-29 15:13:36 +00:00
John Baldwin
a6fb726860 MFC 196615:
Extend the device pager to support different memory attributes on different
pages in an object.
- Add a new variant of d_mmap() currently called d_mmap2() which accepts
  an additional in/out parameter that is the memory attribute to use for
  the requested page.
- A driver either uses d_mmap() or d_mmap2() for all requests but not both.
  The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate
  that the driver provides a d_mmap2() handler instead of d_mmap().  This
  is done to make the change ABI compatible with existing drivers and
  MFC'able to 7 and 8.
2009-10-29 15:09:54 +00:00
Alexander Motin
f39d3da87e MFC rev. 198487:
Round timeout up when converting CAM milliseconds to ATA seconds.
2009-10-29 10:38:17 +00:00
Alexander Motin
963069c15e MFC rev. 198488:
Report SATA speeds to CAM, to not confuse users with low numbers logged.
2009-10-29 10:35:50 +00:00
Alexander Motin
e180821780 MFC rev. 198481, 198482:
Add two more VIA SATA chip IDs.

PR:		kern/135057
2009-10-29 10:05:08 +00:00
Alexander Motin
6b7a5f803b MFC rev. 198480, 198483:
Document new modularised ATA kernel modules and options.

PR:             kern/133162, amd64/139859
2009-10-29 09:58:16 +00:00
Alexander Motin
9149cb69ab Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
memory access.

PR:		amd64/128686, amd64/132372, amd64/139156
2009-10-29 09:45:48 +00:00
Qing Li
f60909e3e2 MFC r198418
Use the correct option name in the preprocessor command to enable
or disable diagnostic messages.

Reviewed by:	ru
2009-10-28 21:45:25 +00:00
Qing Li
54b7653bd5 MFC r198353
Verify "smp_started" is true before calling
sched_bind() and sched_unbind().

Reviewed by:	kmacy
2009-10-28 21:43:16 +00:00
Ken Smith
1e5dd50780 Prepare for 8.0-RC2 builds.
Approved by:	re (implicit)
2009-10-25 00:28:01 +00:00
Ruslan Ermilov
f47552e770 MFC r198295:
Random number generator initialization cleanup:

- Introduce new SI_SUB_RANDOM point in boot sequence to make it
clear from where one may start using random(9).  It should be as
early as possible, so place it just after SI_SUB_CPU where we
have some randomness on most platforms via get_cyclecount().

- Move stack protector initialization to be after SI_SUB_RANDOM
as before this point we have no randomness at all.  This fixes
stack protector to actually protect stack with some random guard
value instead of a well-known one.

Note that this patch doesn't try to address arc4random(9) issues.
With current code, it will be implicitly seeded by stack protector
and hence will get the same entropy as random(9).  It will be
securely reseeded once /dev/random is feeded by some entropy from
userland.

Submitted by:	Maxim Dounin <mdounin@mdounin.ru>
Approved by:	re (kib)
2009-10-24 04:55:14 +00:00
John Baldwin
115753ce9e MFC 198174:
Close a race with caching of -ve name lookups in the NFS client.
Specifically, clients only trust -ve cache entries while the directory
remains unchanged and discard any -ve cache entries for a directory when
they notice that the modification time of a directory entry changes.  The
race involves two concurrent lookups as follows:
- Thread A does a lookup for file 'foo' which sends a lookup RPC to the
  server.  The lookup fails and the server replies.
- The 'foo' file is created (either by the same client or a different
  client) updating the modification time on the parent directory of 'foo'.
- Thread B does a lookup for a different file 'bar' which updates the
  cached attributes of the parent directory of 'foo' to reflect the new
  modification time after 'foo' was created.
- Thread A finally resumes execution to parse the reply from the NFS
  server.  It adds a -ve cache entry and sets the cached value of the
  directory's modification time that is used for invalidating -ve cached
  lookups to the new modification time set by thread B.

At this point, future lookups of 'foo' will honor the -ve cached entry
until the cached entry is pushed out of the name cache's LRU or the
modification time of the parent directory is changed again by some other
change.  The fix is to read the directory's modification time before
sending the lookup RPC and use that cached modification time when setting
the directory's cached modification time.  Also, we do not add a -ve cache
entry if another thread has added -ve cache entry that set the directory's
cached modification time to a newer value than the value we read before
sending the lookup RPC.

Approved by:	re (kib)
2009-10-23 19:52:29 +00:00
Qing Li
dbd4bfe317 MFC 198306
The flow-table function flowtable_route_flush() may be called
during system initialization time. Since the flow-table is
designed to maintain per CPU flow cache, the existing code
did not check whether "smp_started" is true before calling
sched_bind() and sched_unbind(), which triggers a page fault.

Reviewed by:	jeff
Approved by:	re
2009-10-22 18:48:25 +00:00
Edward Tomasz Napierala
1c7deea437 MFC r196863:
Improve wording.

MFC r196941:

Prevent the line from wrapping.

Approved by:	re (kib)
2009-10-22 16:26:38 +00:00
Andrew Thompson
b1c3c31d58 MFC r198307
Change from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device
 has been yanked, this works around a cam recounting bug when
 CAM_DEV_UNCONFIGURED is set late in the detach. In certain conditions the
 reference to the XPT device would not be released which would cause the usb
 explore thread to sleep forever on "simfree", preventing any new usb devices to
 be found/ejected on the bus.

Approved by:	re (kib)
2009-10-21 19:48:27 +00:00
Konstantin Belousov
46aaa1ed67 MFC r198201:
Remove spurious call to priv_check(PRIV_VM_SWAP_NOQUOTA).
Call priv_check(PRIV_VM_SWAP_NORLIMIT) only when per-uid limit is
actually exceed.

Approved by:	re (kensmith)
2009-10-21 15:07:34 +00:00
Robert Watson
cbdd92bda4 Merge r198233 from head to stable/8:
Clean up comments, white space, and style in pfil.c (VNET changes not
  MFC'd)

Approved by:	re (kib)
2009-10-21 14:05:51 +00:00
Robert Watson
5e2ef9933c Merge r198198 from head to stable/8:
Line-wrap pfil.c so that it prints more nicely.

Approved by:	re (kensmith)
2009-10-21 13:11:38 +00:00
Robert Watson
304762b138 Merge r198219 from head to stable/8:
Remove unused pfil_flags field in packet_filter_hook.

Approved by:	re (kib)
2009-10-21 09:53:55 +00:00
Qing Li
0eb4d28bac MFC 198301
In the ARP callout timer expiration function, the current time_second
is compared against the entry expiration time value (that was set based
on time_second) to check if the current time is larger than the set
expiration time. Due to the +/- timer granularity value, the comparison
returns false, causing the alternative code to be executed. The
alternative code path freed the memory without removing that entry
from the table list, causing a use-after-free bug.

Reviewed by:	discussed with kmacy
Approved by:	re
Verified by:	rnoland, yongari
2009-10-20 21:36:56 +00:00
Robert Watson
752b1b6971 Merge r198218 from head to stable/8:
Sort function prototypes in pfil.h, clean up white space, and better
  align fields for printing.

Approved by:	re (kensmith)
2009-10-20 18:54:51 +00:00
Weongyo Jeong
6fb7173c2b MFC r198098:
fixes a TX hang bug that it could happen when if_start callback didn't
  be restarted by full of the output queue.

  Tested by:      bsduser <bsd at acd.homelinux.org>

MFC r198099:
  fixes a TX hang that could be possible to happen when the trasfers are
  in the high speed that some drivers don't call if_start callback after
  marking ~IFF_DRV_OACTIVE.

Approved by:	re (kib)
2009-10-20 17:50:36 +00:00
Qing Li
6f99a646e4 MFC r198111
This patch fixes the following issues in the ARP operation:

1. There is a regression issue in the ARP code. The incomplete
   ARP entry was timing out too quickly (1 second timeout), as
   such, a new entry is created each time arpresolve() is called.
   Therefore the maximum attempts made is always 1. Consequently
   the error code returned to the application is always 0.
2. Set the expiration of each incomplete entry to a 20-second
   lifetime.
3. Return "incomplete" entries to the application.
4. The return error code was incorrect.

Reviewed by:	kmacy
Approved by:	re
2009-10-20 17:44:50 +00:00
Stanislav Sedov
ea95296ce8 - Disable ASF by default in STABLE_8. This causes a lot
of problems on non-DELL branded machines with IPMI
  support.  The proposed fix was committed to HEAD but has
  not received much test coverage yet.

Discussed with:	bz
Approved by:	re (kensmith)
2009-10-20 16:41:23 +00:00
Robert Watson
92b52ada7c Merge r198196 from head to stable/8:
Rewrap ip_input() comment so that it prints more nicely.

Approved by:	re (kib)
2009-10-20 16:22:31 +00:00
Konstantin Belousov
dc68cec603 MFC r197934:
Map PIE binaries at non-zero base address.

MFC r198202:
Honour non-zero mapbase for PIE binaries. Inform interpreter-less PIE
binary about its relocbase.

Approved by:	re (kensmith)
2009-10-20 13:34:41 +00:00
Konstantin Belousov
55f128de91 MFC r197933:
Define architectural load bases for PIE binaries.

MFC r198203 (by marius):
Change load base for sparc to match default gcc memory layout model.

Approved by:	re (kensmith)
2009-10-20 13:32:28 +00:00
Konstantin Belousov
5b15472fe9 MFC r197932:
Do not map elf segments of zero length.

Approved by:	re (kensmith)
2009-10-20 13:30:06 +00:00
John Baldwin
74fb2c91c6 MFC 198126:
Fix a sign bug in the handling of nice priorities when computing the
interactive score for a thread.

Approved by:	re (kib)
2009-10-19 19:40:05 +00:00
John Baldwin
a9266569b7 MFC 198079:
Use zfs_read() instead of xfsread() to read /boot.config.  xfsread() fails
short read requests, so the result was that a /boot.config smaller than 512
bytes was ignored.  boot2 uses fsread() instead of xfsread() to read
/boot.config already, so this makes zfsboot more like boot2.

Approved by:	re (kib)
2009-10-19 18:31:39 +00:00