]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoReported by Yehuda Weinraub (yehudasa@gamil.com) - CRC32C algorithm
Randall Stewart [Sat, 18 Oct 2008 15:53:31 +0000 (15:53 +0000)]
Reported by Yehuda Weinraub (yehudasa@gamil.com) - CRC32C algorithm
uses incorrect init_bytes value. It SHOULD have the number
of bytes to get to a 4 byte boundary.

PR: 128134
MFC after: 4 weeks

15 years agoSet PCB_32BIT and clear PCB_GS32BIT for linux32 binaries.
Konstantin Belousov [Sat, 18 Oct 2008 13:39:22 +0000 (13:39 +0000)]
Set PCB_32BIT and clear PCB_GS32BIT for linux32 binaries.

Tested by: dchagin
MFC after: 3 days

15 years agoIncrease the date in the manual page, which should have been done in r183922.
Ed Schouten [Sat, 18 Oct 2008 06:23:08 +0000 (06:23 +0000)]
Increase the date in the manual page, which should have been done in r183922.

In r183922 I introduced a new DDB command, documented it, but forgot to
bump the date in the manual page.

Pointed out by: bz

15 years agoUse strlcpy() in !localized case to avoid the -1's.
Xin LI [Fri, 17 Oct 2008 21:29:05 +0000 (21:29 +0000)]
Use strlcpy() in !localized case to avoid the -1's.

15 years agoUse strlcpy() when we mean it.
Xin LI [Fri, 17 Oct 2008 21:21:14 +0000 (21:21 +0000)]
Use strlcpy() when we mean it.

15 years agoUse strlcpy() when we mean it.
Xin LI [Fri, 17 Oct 2008 21:14:50 +0000 (21:14 +0000)]
Use strlcpy() when we mean it.

15 years ago - Use static for usage()
Xin LI [Fri, 17 Oct 2008 21:11:09 +0000 (21:11 +0000)]
 - Use static for usage()
 - Include necessary header files.

setfib(1) should pass WARNS=6 with this changes.

15 years agoReduce code duplication: use calloc() intead of malloc()
Xin LI [Fri, 17 Oct 2008 20:11:28 +0000 (20:11 +0000)]
Reduce code duplication: use calloc() intead of malloc()
and memset afterward.

15 years ago_kvm_malloc allocates memory through calloc() which
Xin LI [Fri, 17 Oct 2008 20:09:00 +0000 (20:09 +0000)]
_kvm_malloc allocates memory through calloc() which
returns zeroed memory, so don't redo the initialization.

15 years agoAdd cr_canseeinpcb() doing checks using the cached socket
Bjoern A. Zeeb [Fri, 17 Oct 2008 16:26:16 +0000 (16:26 +0000)]
Add cr_canseeinpcb() doing checks using the cached socket
credentials from inp_cred which is also available after the
socket is gone.
Switch cr_canseesocket consumers to cr_canseeinpcb.
This removes an extra acquisition of the socket lock.

Reviewed by: rwatson
MFC after: 3 months (set timer; decide then)

15 years ago- For chipsets that can't do 64k transfers, fall back to 32k transfers
John Baldwin [Fri, 17 Oct 2008 16:03:37 +0000 (16:03 +0000)]
- For chipsets that can't do 64k transfers, fall back to 32k transfers
  (still a power of 2) rather than 63k transfers.  Even with 63k transfers
  some machines (such as Dell SC1435's) were experiencing chronic data
  corruption.
- Use the MIO method to talk to the Serverworks HT1000_S1 SATA controller
  like all the other SATA controllers rather than the compat PATA
  method.  This lets the controller see all 4 SATA ports and also
  matches the behavior of the Linux driver.

Silence from: sos
MFC after: 3 days

15 years agoAdd a mac_inpcb_check_visible implementation to all MAC policies
Bjoern A. Zeeb [Fri, 17 Oct 2008 15:11:12 +0000 (15:11 +0000)]
Add a mac_inpcb_check_visible implementation to all MAC policies
that handle mac_socket_check_visible.

Reviewed by: rwatson
MFC after: 3 months (set timer; decide then)

15 years agoDisplay usage when pkg_add is called with no arguments.
Brooks Davis [Fri, 17 Oct 2008 15:10:45 +0000 (15:10 +0000)]
Display usage when pkg_add is called with no arguments.

PR: bin/121093
Submitted by: volker
Approved by: portmgr (linimon)
MFC after: 3 days

15 years agoAdjust default keymaps for Ireland and Channel Islands. They use the UK
Philip Paeps [Fri, 17 Oct 2008 14:40:03 +0000 (14:40 +0000)]
Adjust default keymaps for Ireland and Channel Islands.  They use the UK
keymap.  You can learn some interesting things in the PR database!

PR: conf/124411
Submitted by: Doctor Modiford <freebsd -at- modiford.com>
MFC after: 3 days

15 years agoWireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
Brooks Davis [Fri, 17 Oct 2008 14:37:58 +0000 (14:37 +0000)]
Wireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
same program interface as Microsoft Wireless Notebook Optical Mouse and
needs a quirk.

PR: usb/122712
MFC after: 3 days

15 years agoAdd the nordic keyboard layout for Asus eee devices.
Philip Paeps [Fri, 17 Oct 2008 14:07:39 +0000 (14:07 +0000)]
Add the nordic keyboard layout for Asus eee devices.

PR: 126841
Submitted by: Peter <pb -at- ludd.ltu.se>
MFC after: 3 days

15 years agoSupport the remaining options listed in dhcp-options(5) and RFC 2132.
Brooks Davis [Fri, 17 Oct 2008 13:28:53 +0000 (13:28 +0000)]
Support the remaining options listed in dhcp-options(5) and RFC 2132.

PR: bin/127076
Submitted by: jkim
MFC after: 1 week

15 years agoAdd mac_inpcb_check_visible MAC Framework entry point, which is similar
Bjoern A. Zeeb [Fri, 17 Oct 2008 12:54:28 +0000 (12:54 +0000)]
Add mac_inpcb_check_visible MAC Framework entry point, which is similar
to mac_socket_check_visible but operates on the inpcb.

Reviewed by: rwatson
MFC after: 3 months (set timer, decide then)

15 years agoUse the label from the socket credential rather than the
Bjoern A. Zeeb [Fri, 17 Oct 2008 08:58:33 +0000 (08:58 +0000)]
Use the label from the socket credential rather than the
solabel which was not set by the mac_partition policy.

Spotted by: rwatson
Reviewed by: rwatson
MFC after: 3 days

15 years agoMTC r183949:
Alexander Leidinger [Fri, 17 Oct 2008 08:30:20 +0000 (08:30 +0000)]
MTC r183949:
 Allow to define MALLOC_PRODUCTION with a make variable instead of polluting
 the global CFLAGS.

Reviewed by: jasone

15 years agoTrack number of packets transmitted and number of packets received
Kip Macy [Fri, 17 Oct 2008 07:04:29 +0000 (07:04 +0000)]
Track number of packets transmitted and number of packets received

PR: 125806
MFC after: 3 days

15 years agoSome 88E1149 PHY's page select is initialized to point to other
Pyun YongHyeon [Fri, 17 Oct 2008 05:26:51 +0000 (05:26 +0000)]
Some 88E1149 PHY's page select is initialized to point to other
bank instead of copper/fiber bank which in turn resulted in
wrong registers were accessed during PHY operation. It is
believed that page 0 should be used for copper PHY so reinitialize
E1000_EADR to select default copper PHY.
This fixes link establishment issue of nfe(4) on Sun Fire X4140.

OpenBSD also has similimar patch but they just reset the E1000_EADR
register to page 0. However some Marvell PHYs((88E308288E1000)
don't have the extended address register and the meaning of the
register is quite different for each PHY model. So selecting copper
PHY is limited to 88E1149 PHY which seems to be the only one that
exhibits link establishment problem. If parent device know the type
of PHY(either copper or fiber) that information should be notified
to PHY driver but there is no good way to pass this information yet.

Reported by: thompsa
Reviewed by: thompsa

15 years agomake sure that SO_NO_DDP and SO_NO_OFFLOAD get passed in correctly
Kip Macy [Fri, 17 Oct 2008 01:25:45 +0000 (01:25 +0000)]
make sure that SO_NO_DDP and SO_NO_OFFLOAD get passed in correctly

PR: 127360
MFC after: 3 days

15 years agoFree old arrays if we increase them.
Poul-Henning Kamp [Thu, 16 Oct 2008 20:56:09 +0000 (20:56 +0000)]
Free old arrays if we increase them.

Pointed out by: mlaier

15 years agoMake ministat(1) vastly faster on huge datasets.
Poul-Henning Kamp [Thu, 16 Oct 2008 20:39:02 +0000 (20:39 +0000)]
Make ministat(1) vastly faster on huge datasets.

15 years agoEliminate flushing of L2 cache in ARM context switch routines.
Rafal Jaworowski [Thu, 16 Oct 2008 19:06:24 +0000 (19:06 +0000)]
Eliminate flushing of L2 cache in ARM context switch routines.

With VIPT L2 cache such syncing not only is redundant, but also a performance
penalty.

Pointed out by: cognet

15 years agoDocument what the sed trick is for.
David E. O'Brien [Thu, 16 Oct 2008 18:09:27 +0000 (18:09 +0000)]
Document what the sed trick is for.
Remove an embedded <TAB>, and use same style for both files.

15 years ago- Fix a race in witness_checkorder() where, between the PCPU_GET() and
Attilio Rao [Thu, 16 Oct 2008 12:42:56 +0000 (12:42 +0000)]
- Fix a race in witness_checkorder() where, between the PCPU_GET() and
  PCPU_PTR() curthread can migrate on another CPU and get incorrect
  results.
- Fix a similar race into witness_warn().
- Fix the interlock's checks bypassing by correctly using the appropriate
  children even when the lock_list chunk to be explored is not the first
  one.
- Allow witness_warn() to work with spinlocks too.

Bugs found by: tegge
Submitted by: jhb, tegge
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>

15 years agoRemove a useless global static variable.
Marko Zec [Thu, 16 Oct 2008 12:31:03 +0000 (12:31 +0000)]
Remove a useless global static variable.

Approved by: bz (ad-hoc mentor)

15 years agoRestore code wrongly removed in SVN revision 173004, it causes threaded
David Xu [Thu, 16 Oct 2008 04:17:17 +0000 (04:17 +0000)]
Restore code wrongly removed in SVN revision 173004, it causes threaded
process to be stuck in execv().

Noticed by: delphij

15 years agoComment on the umass CD ROM devices in the UMTS modems.
Nick Hibma [Wed, 15 Oct 2008 21:47:01 +0000 (21:47 +0000)]
Comment on the umass CD ROM devices in the UMTS modems.

15 years agoRewrite the driver to better support the Huawei devices. It should now support
Nick Hibma [Wed, 15 Oct 2008 21:25:11 +0000 (21:25 +0000)]
Rewrite the driver to better support the Huawei devices. It should now support
the Sierra and Novatel devices, ignore all umass devices and hide the umass
devices that represent the CD ROM devices (but not the SD card slot in the
Huawei Mobile dongle).

Note: This driver in FBSD7 seems to suffer from memory corruption when used
with an Option GT Quad. The E220 however works flawlessly.

Also add the ID for the Option GTMaxHSUPA, provided by Olivier Fromme.

15 years agoCheck that the mbuf len is positive (like we do in the v4 case).
Bjoern A. Zeeb [Wed, 15 Oct 2008 19:24:18 +0000 (19:24 +0000)]
Check that the mbuf len is positive (like we do in the v4 case).

Read the other way round this means that even with the checks
the m_len turned negative in some cases which led to panics.
The reason to my understanding seems to be that the checks are wrong
(also for v4) ignoring possible padding when checking cmsg_len or
padding after data when adjusting the mbuf.
Doing proper cheks seems to break applications like named so
further investigation and regression tests are needed.

PR: kern/119123
Tested by: Ashish Shukla  wahjava gmail.com
MFC after: 3 days

15 years agoImport some improvements to the TTY code from the MPSAFE TTY branch.
Ed Schouten [Wed, 15 Oct 2008 16:58:35 +0000 (16:58 +0000)]
Import some improvements to the TTY code from the MPSAFE TTY branch.

- Change the ddb(4) commands to be more useful (by thompsa@):
  - `show ttys' is now called `show all ttys'. This command will now
    also display the address where the TTY data structure resides.
  - Add `show tty <addr>', which dumps the TTY in a readable form.

- Place an upper bound on the TTY buffer sizes. Some drivers do not want
  to care about baud rates. Protect these drivers by preventing the TTY
  buffers from getting enormous. Right now we'll just clamp it to 64K,
  which is pretty high, taking into account that these buffers are only
  used by the built-in discipline.

- Only call ttydev_leave() when needed. Back in April/May the TTY
  reference counting mechanism was a little different, which required us
  to call ttydev_leave() each time we finished a cdev operation.
  Nowadays we only need to call ttydev_leave() when we really mark it as
  being closed.

- Improve return codes of read() and write() on TTY device nodes.

- Make sure we really wake up all blocked threads when the driver calls
  tty_rel_gone(). There were some possible code paths where we didn't
  properly wake up any readers/writers.

- Add extra assertions to prevent sleeping on a TTY that has been
  abandoned by the driver.

- Use ttydev_cdevsw as a more reliable method to figure out whether a
  device node is a real TTY device node.

Obtained from: //depot/projects/mpsafetty/...
Reviewed by: thompsa

15 years agoPackage installation is handled by starting off with the list of packages
Ken Smith [Wed, 15 Oct 2008 15:54:33 +0000 (15:54 +0000)]
Package installation is handled by starting off with the list of packages
the user selected and then recursively installing their dependencies, finally
installing the ones the user selected after the recursion unwinds.  Since
users often select "high-level" packages that are on a higher numbered
disc for the multi-volume release CDROMS this resulted in excessive disc
swapping while installing things like kde, gnome, etc.

Cut down on disc swapping by iterating through the disc volumes one at a
time if we notice the package set is on multiple volumes.  If a package
is on a higher volume don't install it yet, but still "process it" so we
get its dependencies installed.  Because of the way the package sets for
releases get assembled we're guaranteed dependencies will be on the same
volume or lower.

Reviewed by: jhb
MFC after: 1 week

15 years agoThe timezone information databases has been updated to tzdata2008h.
Edwin Groothuis [Wed, 15 Oct 2008 12:02:32 +0000 (12:02 +0000)]
The timezone information databases has been updated to tzdata2008h.

15 years agoMove per-thread userland debugging flags into seperated field,
David Xu [Wed, 15 Oct 2008 06:31:37 +0000 (06:31 +0000)]
Move per-thread userland debugging flags into seperated field,
this eliminates some problems of locking, e.g, a thread lock is needed
but can not be used at that time. Only the process lock is needed now
for new field.

15 years agoPrevent the OF syscons module from trying to attach to real devices on the
Nathan Whitehorn [Wed, 15 Oct 2008 03:38:03 +0000 (03:38 +0000)]
Prevent the OF syscons module from trying to attach to real devices on the
nexus by only attaching to a device with no OF node.

15 years agoUse bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)
Marius Strobl [Tue, 14 Oct 2008 20:28:42 +0000 (20:28 +0000)]
Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)
in order to get rid of the bus space handle and tag in the softc.

MFC after: 1 month

15 years agoUse xpt_register_async() in order to remove code duplication.
Marius Strobl [Tue, 14 Oct 2008 20:18:57 +0000 (20:18 +0000)]
Use xpt_register_async() in order to remove code duplication.

MFC after: 1 month

15 years agoAdd all Sigmatel/IDT codecs I could find.
Alexander Motin [Tue, 14 Oct 2008 19:58:26 +0000 (19:58 +0000)]
Add all Sigmatel/IDT codecs I could find.
Add IDT and Intel unknown codecs.

PR: kern/125822

15 years agoRemove the 'old' Novatel MC950D entry which was slightly incorrect, NetBSD has
Andrew Thompson [Tue, 14 Oct 2008 18:24:40 +0000 (18:24 +0000)]
Remove the 'old' Novatel MC950D entry which was slightly incorrect, NetBSD has
already picked up the new name so run with it.

15 years agoo Remove a debug code and restore an accidentally deleted code
Maxim Konovalov [Tue, 14 Oct 2008 17:59:39 +0000 (17:59 +0000)]
o Remove a debug code and restore an accidentally deleted code
in a previous commit.

15 years agoo Do nothing in show_nat() for a test mode (-n). This prevents
Maxim Konovalov [Tue, 14 Oct 2008 17:53:26 +0000 (17:53 +0000)]
o Do nothing in show_nat() for a test mode (-n).  This prevents
show_nat() from endless loop and makes work ipfw -n nat <...>.

PR: bin/128064
Submitted by: sem
MFC after: 1 month

15 years agoRewrite Synaptics touchpads support with the following goals in mind:
Jean-Sébastien Pédron [Tue, 14 Oct 2008 17:48:36 +0000 (17:48 +0000)]
Rewrite Synaptics touchpads support with the following goals in mind:
    o  better quality of the movement smoothing
    o  more features such as tap-hold and virtual scrolling

Support must still be enabled with this line in your /boot/loader.conf:
    hw.psm.synaptics_support="1"

The following sysctls were removed:
    hw.psm.synaptics.low_speed_threshold
    hw.psm.synaptics.min_movement
    hw.psm.synaptics.squelch_level

An overview of this new driver and a short documentation about the added
sysctls is available on the wiki:
http://wiki.freebsd.org/SynapticsTouchpad

15 years agoo Remove unnecessary parentheses and restore identation.
Maxim Konovalov [Tue, 14 Oct 2008 17:47:29 +0000 (17:47 +0000)]
o Remove unnecessary parentheses and restore identation.

Prodded by: mlaier

15 years agocorrect sizeof calculation
Sam Leffler [Tue, 14 Oct 2008 16:27:52 +0000 (16:27 +0000)]
correct sizeof calculation

PR: arm/128095
Submitted by: Henning Petersen
MFC after: 1 week

15 years agoCorrect the name of the device.
Nick Hibma [Tue, 14 Oct 2008 15:30:17 +0000 (15:30 +0000)]
Correct the name of the device.

15 years agoAdd back in the (incorrect) entry for the MC950D, as requested by Andrew
Nick Hibma [Tue, 14 Oct 2008 15:19:02 +0000 (15:19 +0000)]
Add back in the (incorrect) entry for the MC950D, as requested by Andrew
Thompson. They should not be removed in support of 3rd party software.

15 years agoConvert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
Nathan Whitehorn [Tue, 14 Oct 2008 14:54:14 +0000 (14:54 +0000)]
Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
simplifies certain device attachments (Kauai ATA, for instance), and makes
possible others on new hardware.

On G5 systems, there are several otherwise standard PCI devices
(Serverworks SATA) that will not allow their interrupt properties to be
written, so this information must be supplied directly from Open Firmware.

Obtained from: sparc64

15 years agoo Reformat ipfw nat get|setsockopt code to look it more
Maxim Konovalov [Tue, 14 Oct 2008 12:26:55 +0000 (12:26 +0000)]
o Reformat ipfw nat get|setsockopt code to look it  more
style(9) compliant.  No functional changes.

15 years agoInitial support of loader(8) for ARM machines running U-Boot.
Rafal Jaworowski [Tue, 14 Oct 2008 10:11:14 +0000 (10:11 +0000)]
Initial support of loader(8) for ARM machines running U-Boot.

This uses the common U-Boot support lib (sys/boot/uboot, already used on
FreeBSD/powerpc), and assumes the underlying firmware has the modern API for
stand-alone apps enabled in the config (CONFIG_API).

Only netbooting is supported at the moment.

Obtained from: Marvell, Semihalf

15 years agoLet libstand(3) build on ARM.
Rafal Jaworowski [Tue, 14 Oct 2008 09:53:47 +0000 (09:53 +0000)]
Let libstand(3) build on ARM.

This is a pre-requisite for loader(8) + U-Boot support library on this arch.

15 years agoMove all the hacks for the Huawei, Novatel and Qualcomm cards into a stub
Nick Hibma [Tue, 14 Oct 2008 08:41:54 +0000 (08:41 +0000)]
Move all the hacks for the Huawei, Novatel and Qualcomm cards into a stub
driver.

This stub also hides the devices until they are ready to be used to avoid
confusion (commented out for now).

15 years agoAdd kernel config files for Marvell development boards.
Rafal Jaworowski [Tue, 14 Oct 2008 08:18:27 +0000 (08:18 +0000)]
Add kernel config files for Marvell development boards.

FreeBSD 8-CURRENT was tested and run successfully on the following eval
boards and devices :

  * DB-88F5182, DB-88F5281 (Orion based)

  * DB-88F6281, RD-88F6281 (Kirkwood based)

  * DB-78100 (Discovery based)

For more detailed info on build instructions and other examples please refer
to http://wiki.freebsd.org/FreeBSDMarvell

Obtained from: Marvell, Semihalf

15 years agoMake robust futexes work on linux32/amd64. Use PTRIN to read
Konstantin Belousov [Tue, 14 Oct 2008 07:59:23 +0000 (07:59 +0000)]
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.

Submitted by: dchagin
MFC after: 1 week

15 years agoFix a comment.
Nick Hibma [Tue, 14 Oct 2008 07:52:47 +0000 (07:52 +0000)]
Fix a comment.

Submitted by: Nick Mann

15 years ago- Fix the naming of the MC950D device.
Nick Hibma [Tue, 14 Oct 2008 07:45:11 +0000 (07:45 +0000)]
- Fix the naming of the MC950D device.
- Remove the (unimplemented) U3GFL_EJECT quirk as this won't be implemented in
  the u3g driver anyway (most probably as an entry in devd.conf)

15 years agoMarvell Gigabit Ethernet controller driver.
Rafal Jaworowski [Tue, 14 Oct 2008 07:24:18 +0000 (07:24 +0000)]
Marvell Gigabit Ethernet controller driver.

This supports 1Gbps Ethernet engine found on ARM-based SOCs (Orion, Kirkwood,
Discovery), as well as on system controllers for PowerPC processors (MV64430,
MV6446x).

The following advanced features are supported:

  - multicast
  - VLAN tagging
  - IP/TCP/UDP checksum calculation offloading
  - polling
  - interrupt coalescing

Obtained from: Marvell, Semihalf

15 years agoMbus attachment for USB EHCI integrated controller on Marvell chips.
Rafal Jaworowski [Tue, 14 Oct 2008 07:05:20 +0000 (07:05 +0000)]
Mbus attachment for USB EHCI integrated controller on Marvell chips.

This includes workarounds required for the ehci(4) to handle some non-standard
behaviour of these devices.

Obtained from: Marvell, Semihalf

15 years agoupdate the manual on how to import and MFV new tzdata releases
Edwin Groothuis [Tue, 14 Oct 2008 04:09:33 +0000 (04:09 +0000)]
update the manual on how to import and MFV new tzdata releases

15 years agoMFV of r183861:
Edwin Groothuis [Tue, 14 Oct 2008 03:38:02 +0000 (03:38 +0000)]
MFV of r183861:
Vendor import of tzdata2008h

- Minor update for Mauritius (which I don't understand)
- Syria goes to DST at 1 November instead of 1 October.
- Niue is now located at the right side of the equator.

15 years agoAdd a simple HFS boot block implementation for booting PowerPC macs. It creates
Nathan Whitehorn [Tue, 14 Oct 2008 03:32:41 +0000 (03:32 +0000)]
Add a simple HFS boot block implementation for booting PowerPC macs. It creates
a small HFS filesystem with a CHRP boot script and an early-stage bootloader
derived from the sparc64 boot block.

Obtained from:  sparc64

15 years agoVendor import of tzdata2008h.
Edwin Groothuis [Tue, 14 Oct 2008 03:21:36 +0000 (03:21 +0000)]
Vendor import of tzdata2008h.

- Minor update for Mauritius (which I don't understand)
- Syria goes to DST at 1 November instead of 1 October.
- Niue is now located at the right side of the equator.

15 years agoThe thought of making more than one DVD image for a release really
Ken Smith [Tue, 14 Oct 2008 02:13:12 +0000 (02:13 +0000)]
The thought of making more than one DVD image for a release really
freaks me out.  But it turns out we might be able to generalize
a few of the other things RE uses to assemble the package trees
for releases if the DVDs use a naming theme close to what is used
for the CDROMS (disc1, disc2, etc).  So change the name to dvd1.
Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
can be generalized instead of copied-and-hacked.

MFC after: 5 days

15 years agoMake sure to read the last byte of EEPROM descriptor. Previously
Pyun YongHyeon [Tue, 14 Oct 2008 00:54:15 +0000 (00:54 +0000)]
Make sure to read the last byte of EEPROM descriptor. Previously
the last byte of the ethernet address was not read which in turn
resulted in getting 5 out of the 6 bytes of ethernet address and
always returned ENOENT. I did not notice the bug on FPGA version
because of additional configuration data in EEPROM.

Pointed out by: bouyer at NetBSD

15 years agoANSIfy, plus constify interfaces where possible.
Xin LI [Mon, 13 Oct 2008 23:10:19 +0000 (23:10 +0000)]
ANSIfy, plus constify interfaces where possible.

15 years agoUse strlcpy() instead of strncpy() when we want the string to be
Xin LI [Mon, 13 Oct 2008 22:50:38 +0000 (22:50 +0000)]
Use strlcpy() instead of strncpy() when we want the string to be
NUL-terminated.

15 years agoCheck the result of copyin and in a case of error
Roman Divacky [Mon, 13 Oct 2008 21:04:52 +0000 (21:04 +0000)]
Check the result of copyin and in a case of error
return one. This prevents setting wrong priority
or (more likely) returning EINVAL.

Approved by: kib (mentor)

15 years agoMention iwn(4) and malo(4).
Christian Brueffer [Mon, 13 Oct 2008 21:02:19 +0000 (21:02 +0000)]
Mention iwn(4) and malo(4).

Note that the malo entry doesn't suck in the hardware adapter list from the
manpage yet, as man2hwnotes.pl doesn't grok the table format.

15 years agoUpdate the man pages with the moved/added support for devices. The SD card slot
Nick Hibma [Mon, 13 Oct 2008 20:43:08 +0000 (20:43 +0000)]
Update the man pages with the moved/added support for devices. The SD card slot
of the Huawei mobile card is supported by the (generic) umass driver.

15 years ago- Add better support for Huawei cards, by attaching as an interface driver.
Nick Hibma [Mon, 13 Oct 2008 20:41:11 +0000 (20:41 +0000)]
- Add better support for Huawei cards, by attaching as an interface driver.
- Be bold and add Novatel cards to the list of supported devices. One person
  reported success with the Novatal U950D.

15 years ago- Only refuse to attach to the first interface on the Huawei cards as for
Nick Hibma [Mon, 13 Oct 2008 20:38:33 +0000 (20:38 +0000)]
- Only refuse to attach to the first interface on the Huawei cards as for
  example the Huawei Mobile has an SD card slot on the second interface.
- Do not attach to Qualcomm and Novatel cards. If ignored these cards will
  switch to modem mode automatically it seems.
- Reduce the priority on generic attachment to the appropriate level.

Note: A better solution is to send an eject command straightaway, but that can
be left till later.

15 years agoThis code has no copyright. It is fairly obvious to me that we're a
Warner Losh [Mon, 13 Oct 2008 20:24:03 +0000 (20:24 +0000)]
This code has no copyright.  It is fairly obvious to me that we're a
derivitive of NetBSD's mips_reloc.c, so pull in the copyright notice
from there.

Also, a minor tweak to load/store pointers.  Other changes from NetBSD
likely would be useful too...

Obtained from: NetBSD

15 years agoIntroduce basic support for Marvell families of system-on-chip ARM devices:
Rafal Jaworowski [Mon, 13 Oct 2008 20:07:13 +0000 (20:07 +0000)]
Introduce basic support for Marvell families of system-on-chip ARM devices:

  *  Orion
     - 88F5181
     - 88F5182
     - 88F5281

  * Kirkwood
     - 88F6281

  * Discovery
     - MV78100

The above families of SOCs are built around CPU cores compliant with ARMv5TE
instruction set architecture definition. They share a number of integrated
peripherals. This commit brings support for the following basic elements:

  * GPIO
  * Interrupt controller
  * L1, L2 cache
  * Timers, watchdog, RTC
  * TWSI (I2C)
  * UART

Other peripherals drivers will be introduced separately.

Reviewed by: imp, marcel, stass (Thanks guys!)
Obtained from: Marvell, Semihalf

15 years agoOne more L2 cache synchronization call that didn't make the previous commit.
Rafal Jaworowski [Mon, 13 Oct 2008 19:14:14 +0000 (19:14 +0000)]
One more L2 cache synchronization call that didn't make the previous commit.

15 years agoProvide L2 cache synchronization (write back + invalidation) on ARM.
Rafal Jaworowski [Mon, 13 Oct 2008 18:59:59 +0000 (18:59 +0000)]
Provide L2 cache synchronization (write back + invalidation) on ARM.

Note the cpu_l2cache_wbinv_* routines are no-ops on systems not populated with
L2 caches.

Obtained from: Marvell, Semihalf

15 years agoDo not use cached page for temporary mapping in pmap_zero_page_generic()
Rafal Jaworowski [Mon, 13 Oct 2008 18:42:25 +0000 (18:42 +0000)]
Do not use cached page for temporary mapping in pmap_zero_page_generic()

The physical page which we clear is accessed via additional temp kernel
mapping for the period of zeroing operation. However in systems with virtual
d-cache (most ARMs) when write-allocate feature is enabled, we can have
modified but unflushed content pertaining to this physical page still in the
d-cache due to its primary (pre-existing) mapping. In such scenario that
cached content upon flush is likely to overwrite [portions of] the physical
page we want to zero here..

This is a general problem with multiple virtual mappings covering the same
physical page with write-allocate and virtual d-cache: there is inherent
potential for corruptions of this kind, which are not easily resolved; it is
best policy that such multiple mappings be not allowed.

Obtained from: Marvell, Semihalf

15 years agoIntroduce low-level support for new Marvell core CPUs: 88FR131, 88FR571.
Rafal Jaworowski [Mon, 13 Oct 2008 18:16:54 +0000 (18:16 +0000)]
Introduce low-level support for new Marvell core CPUs: 88FR131, 88FR571.

They are compliant with ARMv5TE and integrated on 88F6281 (Kirkwood) and
MV78100 (Discovery) system-on-chip families.

Obtained from: Marvell, Semihalf

15 years agoCorrect memory leak of info->rects. Previously we would free info, but
Robert Noland [Mon, 13 Oct 2008 18:06:33 +0000 (18:06 +0000)]
Correct memory leak of info->rects.  Previously we would free info, but
but abandon info->rects.

Approved by: jhb (mentor)

15 years agoRework memory allocation to allocate memory with different type names. This
Robert Noland [Mon, 13 Oct 2008 18:03:27 +0000 (18:03 +0000)]
Rework memory allocation to allocate memory with different type names.  This
will ease the identification of memory leaks as the OS will be able to track
allocations for us by malloc type.  vmstat -m will show all of the
allocations.

Convert the calls to drm_alloc() and friends, which are used in shared code
to static __inline__ while we are here.

Approved by: jhb (mentor)

15 years agoThe linux list compat code had an error which prevented list_for_each_safe()
Robert Noland [Mon, 13 Oct 2008 17:52:41 +0000 (17:52 +0000)]
The linux list compat code had an error which prevented list_for_each_safe()
from operating on a list with a single item.  This code is used much more by
the i915 driver with xorg-7.4.  Correct it to match the actual linux
implementation.

Approved by: jhb (mentor)

15 years agoCorrect the interrupt handling in the Intel i915 driver.
Robert Noland [Mon, 13 Oct 2008 17:47:13 +0000 (17:47 +0000)]
Correct the interrupt handling in the Intel i915 driver.

Approved by: jhb (mentor)

15 years agoSeveral of the newer radeon cards have moved around the registers for enabling
Robert Noland [Mon, 13 Oct 2008 17:43:39 +0000 (17:43 +0000)]
Several of the newer radeon cards have moved around the registers for enabling
busmastering support.  This also adds register definitions for MSI support,
which we will be using shortly.

Approved by: jhb (mentor)
Obtained from: drm git master

15 years agoFix minor typo.
Ken Smith [Mon, 13 Oct 2008 17:42:21 +0000 (17:42 +0000)]
Fix minor typo.

15 years agoAdd support for Radeon rs740 (HD 2100)
Robert Noland [Mon, 13 Oct 2008 17:38:04 +0000 (17:38 +0000)]
Add support for Radeon rs740 (HD 2100)

Approved by: jhb (mentor)
Obtained from: drm git master

15 years agoChange the way we enable the BMAC cell in macio. Instead of calling the
Nathan Whitehorn [Mon, 13 Oct 2008 17:33:55 +0000 (17:33 +0000)]
Change the way we enable the BMAC cell in macio. Instead of calling the
macio's enable-enet word, which apparently does nothing on some machines,
open an OF instance of the ethernet controller. This fixes cold booting
from disk on my Blue & White G3.

MFC after: 3 days

15 years agoDon't close OF disk devices on PowerPC. This fixes loader when booting from
Nathan Whitehorn [Mon, 13 Oct 2008 17:14:29 +0000 (17:14 +0000)]
Don't close OF disk devices on PowerPC. This fixes loader when booting from
disk on my Blue & White G3 system.

15 years agoSync up summary information for cylinder groups while data is already
Konstantin Belousov [Mon, 13 Oct 2008 14:05:01 +0000 (14:05 +0000)]
Sync up summary information for cylinder groups while data is already
in memory during snapshot creation. This improves the results of the
background fsck.

Submitted by: tegge
MFC after: 1 week

15 years agoBackground fsck applies twice some summary totals changes. The next
Konstantin Belousov [Mon, 13 Oct 2008 14:01:05 +0000 (14:01 +0000)]
Background fsck applies twice some summary totals changes. The next
background fsck on the same file system might then print negative
numbers for reclaimed directories/files/fragments.

Address the issue in a limited degree, by using old summary data for
cg when bgfsck is performed.

Submitted by: tegge
MFC after: 1 week

15 years agocheck_maps() in /usr/src/sbin/fsck_ffs/pass5.c seems to be limited to file
Konstantin Belousov [Mon, 13 Oct 2008 13:56:23 +0000 (13:56 +0000)]
check_maps() in /usr/src/sbin/fsck_ffs/pass5.c seems to be limited to file
systems less than 1 TB, due to using 32-bits integers for file system block
numbers. This also causes incorrect error reporting for foreground fsck.

Convert it to use ufs2_daddr_t for block numbers.

PR: kern/127951
Submitted by: tegge
MFC after: 1 week

15 years agoRevert r179409; it breaks all OX16PCI954-based cards except the SIIG 4.
Dag-Erling Smørgrav [Mon, 13 Oct 2008 12:28:33 +0000 (12:28 +0000)]
Revert r179409; it breaks all OX16PCI954-based cards except the SIIG 4.

MFC after: 3 days

15 years agoPoint this config at the required linker script.
Bruce M Simpson [Mon, 13 Oct 2008 06:25:28 +0000 (06:25 +0000)]
Point this config at the required linker script.

15 years agoFix the CFE ldscript after the cutover to tradmips.
Bruce M Simpson [Mon, 13 Oct 2008 06:07:58 +0000 (06:07 +0000)]
Fix the CFE ldscript after the cutover to tradmips.
Diff minimization against ldscript.mips.

Note: CFE will not load PT_DYNAMIC segments, therefore the dynamic
sections have been placed in a PT_LOAD segment for now. This is not
too efficient in terms of memory use, they should probably get
placed in the text segment.

15 years agoRead PCI device id instead of PCI revision id. Also checks the read
Pyun YongHyeon [Mon, 13 Oct 2008 01:11:28 +0000 (01:11 +0000)]
Read PCI device id instead of PCI revision id. Also checks the read
device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.

Pointed out by: bouyer at NetBSD

15 years agoBump driver revision after the previous commit.
Alexander Motin [Sun, 12 Oct 2008 21:46:11 +0000 (21:46 +0000)]
Bump driver revision after the previous commit.

15 years agoFix bug in a second call of the channel allocation function.
Alexander Motin [Sun, 12 Oct 2008 21:42:21 +0000 (21:42 +0000)]
Fix bug in a second call of the channel allocation function.
This should fix crash on systems where two audio codecs connected
to the same HDA bus.

15 years agoTurn XXX's for unlocked writes of NFS server statistics to simple notes,
Robert Watson [Sun, 12 Oct 2008 20:06:59 +0000 (20:06 +0000)]
Turn XXX's for unlocked writes of NFS server statistics to simple notes,
as we consider it a feature to exchange performance for consistency.

MFC after: 3 days

15 years agoDowngrade XXX to a Note for fgetsock() and fputsock().
Robert Watson [Sun, 12 Oct 2008 20:03:17 +0000 (20:03 +0000)]
Downgrade XXX to a Note for fgetsock() and fputsock().

MFC after: 3 days

15 years agoWhen disconnecting a UDPv6 socket, acquire the socket lock around the
Robert Watson [Sun, 12 Oct 2008 20:01:32 +0000 (20:01 +0000)]
When disconnecting a UDPv6 socket, acquire the socket lock around the
changing of the so_state field, as is done in UDPv4.  Remove XXX
locking comment.

MFC after: 3 days