dragonfly.git
12 years agoMerge from vendor branch TNFTP:
Peter Avalos [Sat, 25 Aug 2007 21:05:27 +0000 (21:05 +0000)]
Merge from vendor branch TNFTP:
Improve parsing of chunked transfer chunks per RFC2616:
* more stringent chunk-size parsing
* ignore optional trailing ';chunk-ext' stuff, instead of barfing
* detect EOF before final \r\n.

12 years agoImprove parsing of chunked transfer chunks per RFC2616:
Peter Avalos [Sat, 25 Aug 2007 21:05:27 +0000 (21:05 +0000)]
Improve parsing of chunked transfer chunks per RFC2616:
* more stringent chunk-size parsing
* ignore optional trailing ';chunk-ext' stuff, instead of barfing
* detect EOF before final \r\n.

12 years agoRework generating of files so that every generation tool will only run once.
Simon Schubert [Sat, 25 Aug 2007 15:29:29 +0000 (15:29 +0000)]
Rework generating of files so that every generation tool will only run once.

Before, we generated a file over and over again where it was needed by the
build process, instead of generating the files once and reusing them.
This commit changes this behavior and makes the build match more gcc's own
build way, which is quite optimized.

Additionally, use move-if-change, to avoid rebuilds if the generated files
didn't change.

12 years agoDon't hang `all' off `_EXTRADEPEND', but rather on `afterdepend'.
Simon Schubert [Sat, 25 Aug 2007 15:22:30 +0000 (15:22 +0000)]
Don't hang `all' off `_EXTRADEPEND', but rather on `afterdepend'.

The problem with using _EXTRADEPEND is that ${DEPENDFILE} depends on
_EXTRADEPEND, which means it will depend on the phony `all' source which
is always out of date.  If we make `all' a source of `afterdepend',
the .depend file won't be regernerated every time.

12 years agomdoc makeover, no content changes
Sascha Wildner [Sat, 25 Aug 2007 10:38:53 +0000 (10:38 +0000)]
mdoc makeover, no content changes

12 years agoComment out empty section.
Sascha Wildner [Sat, 25 Aug 2007 10:01:34 +0000 (10:01 +0000)]
Comment out empty section.

12 years agoOutput more detail when reporting errors. Use err() instead of warn();exit();
Simon Schubert [Sat, 25 Aug 2007 08:55:26 +0000 (08:55 +0000)]
Output more detail when reporting errors.  Use err() instead of warn();exit();

12 years agoAdd T2300 cpu support to EST.
Matthew Dillon [Fri, 24 Aug 2007 16:08:05 +0000 (16:08 +0000)]
Add T2300 cpu support to EST.

Submitted-by: Andrew Atrens <atrens@nortel.com>
Taken-from: FreeBSD and NetBSD

12 years agopart2 ppX fix for altq/pf.
Matthew Dillon [Fri, 24 Aug 2007 16:06:37 +0000 (16:06 +0000)]
part2 ppX fix for altq/pf.

Submitted-by: Andrew Atrens <atrens@nortel.com>
12 years agoAdd geode companion support to ohci probe code
Matthew Dillon [Fri, 24 Aug 2007 16:02:47 +0000 (16:02 +0000)]
Add geode companion support to ohci probe code

Submitted-by: Andrew Atrens <atrens@nortel.com>
12 years agoAdd missing if_softc assignment, allowing pppX interfaces to
Matthew Dillon [Fri, 24 Aug 2007 16:00:52 +0000 (16:00 +0000)]
Add missing if_softc assignment, allowing pppX interfaces to
work with altq/pf.

Submitted-by: Andrew Atrens <atrens@nortel.com>
12 years agoAdd missing xfer->state assignment.
Matthew Dillon [Fri, 24 Aug 2007 15:58:33 +0000 (15:58 +0000)]
Add missing xfer->state assignment.

Obtained-from: FreeBSD
Submitted-by: Andrew Atrens <atrens@nortel.com>
12 years agoDefine TARGET_PLATFORM matching TARGET_ARCH.
Simon Schubert [Thu, 23 Aug 2007 07:00:31 +0000 (07:00 +0000)]
Define TARGET_PLATFORM matching TARGET_ARCH.

This way we don't have to specify TARGET_ARCH *and* TARGET_PLATFORM for
crossbuilds.  Of course this should be generalized, etc, but as we just
have two platforms for now, this is no problem yet.

12 years agoDrop reference to non-existing variable.
Simon Schubert [Thu, 23 Aug 2007 06:57:09 +0000 (06:57 +0000)]
Drop reference to non-existing variable.

12 years agoDefine MACHINE et al like this header is supposed to do.
Simon Schubert [Thu, 23 Aug 2007 06:56:27 +0000 (06:56 +0000)]
Define MACHINE et al like this header is supposed to do.

12 years agoDon't define USED_FOR_TARGET on the command line.
Simon Schubert [Thu, 23 Aug 2007 06:52:02 +0000 (06:52 +0000)]
Don't define USED_FOR_TARGET on the command line.

This produces all kinds of side effects, ultimately leading to the csu
sources and the compiler being out of sync on compilation, thus triggering
an internal compiler error.

Details for the curious and for historical purposes:
Our gcc is configured to work with a ld which can merge ro and rw sections
to rw sections.  Nevertheless cc1 will enforce sections in one unit to be
of one type or the other, i.e. it disallows section flag changes.  Sections
are usually a compiler internal detail, so a flag change is considered a
compiler bug and thus cc1 aborts with an internal compiler error on such
occasions.

The csu libs consider themselves as part of the compiler and use section
declarations.  However if the lib and the compiler don't agree on some
settings and are out of sync, the lib will decide to create a rw .eh_frame
section (by not declaring a variable constant).  If the compiler uses the
.eh_frame section as well, like gcc41/amd64 does to store dwarf2 exception
rollback information, the above mentioned internal compiler error is
triggered.

The essential problem here was that USED_FOR_TARGET will prevent the
auto-host.h/dragonfly-native.h config.h-style headers to set the necessary
compiler configuration which is also used by the csu libs.  By moving it
to the place where the gcc people intended it to be, everything works as
desired.

12 years agoDefine USED_FOR_TARGET in tconfig.h, matching what gcc does.
Simon Schubert [Thu, 23 Aug 2007 06:22:10 +0000 (06:22 +0000)]
Define USED_FOR_TARGET in tconfig.h, matching what gcc does.

12 years agoChange gcc41 search path setup to match gcc34.
Simon Schubert [Thu, 23 Aug 2007 06:19:20 +0000 (06:19 +0000)]
Change gcc41 search path setup to match gcc34.

We need this modification to make the cross compiler use the correct
search paths.  I would prefer a solution without having to patch the
sources, but for now it is working and even reduces complexity in gcc.

12 years agoUse the i486 headers for amd64.
Simon Schubert [Thu, 23 Aug 2007 06:13:30 +0000 (06:13 +0000)]
Use the i486 headers for amd64.

12 years agoAdd usbdi(9) manpage.
Hasso Tepper [Wed, 22 Aug 2007 21:35:59 +0000 (21:35 +0000)]
Add usbdi(9) manpage.

Obtained-from: FreeBSD

12 years agoTemporary hack up a fix for msdos which avoids a deadlock between the VM
Matthew Dillon [Wed, 22 Aug 2007 16:56:52 +0000 (16:56 +0000)]
Temporary hack up a fix for msdos which avoids a deadlock between the VM
subsystem and the buffer cache subsystem.

Reported-by: "Andrew Atrens" <atrens@nortel.com>
12 years agoFix for CVE-2006-7180
Sepherosa Ziehau [Wed, 22 Aug 2007 13:41:10 +0000 (13:41 +0000)]
Fix for CVE-2006-7180

Obtained-from: MadWifi via Sam Leffler

12 years ago- Add ic_headroom through which drivers can inform 802.11 layer to reserve
Sepherosa Ziehau [Wed, 22 Aug 2007 13:24:44 +0000 (13:24 +0000)]
- Add ic_headroom through which drivers can inform 802.11 layer to reserve
  some space for device specific TX header when encapsulate 802.11 frames.
- Add another parameter to ieee80211_getmgtframe(), so it knows how many
  header space it should reserve.

Obtained-from: FreeBSD (sam@freebsd.org) w/ bug fix

12 years agoMerge from vendor branch GDB:
Simon Schubert [Wed, 22 Aug 2007 08:50:26 +0000 (08:50 +0000)]
Merge from vendor branch GDB:
Drop the stupid patch infrastructure and merge patches into contrib.

I'm not willing to spend several minutes to hours trying to figure out
how to do makefile magic to get this patch infrastructure to do what
I want, and only that what I want.

Instead, use CVS vendor branches like they are supposed to be used.

This unbreaks world and makes gdb compilable for i386 and amd64.

12 years agoDrop the stupid patch infrastructure and merge patches into contrib.
Simon Schubert [Wed, 22 Aug 2007 08:50:26 +0000 (08:50 +0000)]
Drop the stupid patch infrastructure and merge patches into contrib.

I'm not willing to spend several minutes to hours trying to figure out
how to do makefile magic to get this patch infrastructure to do what
I want, and only that what I want.

Instead, use CVS vendor branches like they are supposed to be used.

This unbreaks world and makes gdb compilable for i386 and amd64.

12 years agoDrop the stupid patch infrastructure and merge patches into contrib.
Simon Schubert [Wed, 22 Aug 2007 08:50:26 +0000 (08:50 +0000)]
Drop the stupid patch infrastructure and merge patches into contrib.

I'm not willing to spend several minutes to hours trying to figure out
how to do makefile magic to get this patch infrastructure to do what
I want, and only that what I want.

Instead, use CVS vendor branches like they are supposed to be used.

This unbreaks world and makes gdb compilable for i386 and amd64.

12 years agoDefine macros also for amd64.
Simon Schubert [Tue, 21 Aug 2007 20:04:09 +0000 (20:04 +0000)]
Define macros also for amd64.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoFix size types.
Simon Schubert [Tue, 21 Aug 2007 20:03:20 +0000 (20:03 +0000)]
Fix size types.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoDon't include the kernel target. This is handled in kgdb separately.
Simon Schubert [Tue, 21 Aug 2007 19:55:23 +0000 (19:55 +0000)]
Don't include the kernel target.  This is handled in kgdb separately.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoFix amd64 support of libc.
Simon Schubert [Tue, 21 Aug 2007 19:49:10 +0000 (19:49 +0000)]
Fix amd64 support of libc.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoResurrect headers for sys/platform/pc64/include from CVS Attic.
Simon Schubert [Tue, 21 Aug 2007 19:45:45 +0000 (19:45 +0000)]
Resurrect headers for sys/platform/pc64/include from CVS Attic.

Patch and mark them as platform specific.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoThe first commit of a series of 6 commits for the amd64 port.
Simon Schubert [Tue, 21 Aug 2007 19:40:24 +0000 (19:40 +0000)]
The first commit of a series of 6 commits for the amd64 port.

This commit includes header files for amd64 cpu that are in
sys/cpu/amd64/include.

The #1 task to port for amd64 is to get the world/kernel cross-compiled
for the 64-bit target. This involves creating a platform and cpu target
for the build.  The skeleton infrastructure for the cpu and platform is
the sys/cpu/amd64 directory and the sys/platform/pc64 directory.

The first stage of this #1 task is to have the world cross-build.  It
includes the building of cross toolchains, the libraries and the world.
This series of commits makes the world cross-build (buildworld) for the
amd64 port with these environment variables:
TARGET_CPU=amd64; TARGET_PLATFORM=pc64; NO_GCC41=1

This is the first commit: resurrect headers for sys/cpu/amd64/include from
CVS Attic; patch and mark them as CPU specific.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoWrite status output to stderr.
Simon Schubert [Tue, 21 Aug 2007 19:23:46 +0000 (19:23 +0000)]
Write status output to stderr.

12 years agoRemove stale prototype.
Simon Schubert [Tue, 21 Aug 2007 19:23:04 +0000 (19:23 +0000)]
Remove stale prototype.

12 years agoFix panic with ALTQ.
Simon Schubert [Tue, 21 Aug 2007 19:21:54 +0000 (19:21 +0000)]
Fix panic with ALTQ.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue420>
Submitted-by: Matthias-Christian Ott
12 years agoAdd msleep(9) to the sleep(9) page.
Simon Schubert [Tue, 21 Aug 2007 19:16:19 +0000 (19:16 +0000)]
Add msleep(9) to the sleep(9) page.

12 years agoDo not try to dump UIO_NOCOPY writes to the journal. There's nothing
Matthew Dillon [Tue, 21 Aug 2007 17:43:52 +0000 (17:43 +0000)]
Do not try to dump UIO_NOCOPY writes to the journal.  There's nothing
to dump at the moment.

12 years agogetpages/putpages fixup part 1 - Add support for UIO_NOCOPY VOP_WRITEs to
Matthew Dillon [Tue, 21 Aug 2007 17:26:48 +0000 (17:26 +0000)]
getpages/putpages fixup part 1 - Add support for UIO_NOCOPY VOP_WRITEs to
filesystems which use the buffer cache and assert that UIO_NOCOPY is not
being used for filesystems which do not.

For filesystems using the buffer cache all we have to do is force a
read-before-write to fill in any missing pieces of the buffer.

UIO_NOCOPY writes are used for buffer-cache-backed filesystems which do
not implement their own vop_putpages code.  At the moment this is only
the msdosfs.

12 years agoSync zoneinfo database with tzdata2007g from elsie.
Sascha Wildner [Mon, 20 Aug 2007 21:08:19 +0000 (21:08 +0000)]
Sync zoneinfo database with tzdata2007g from elsie.

africa:         8.8  -> 8.9
antarctica:     8.3  -> 8.4
australasia:    8.7  -> 8.8
europe:         8.10 -> 8.11
leapseconds:    8.3  -> 8.4
northamerica:   8.17 -> 8.18
zone.tab:       8.10 -> 8.11

From Paul Eggert's comments:

* Egypt switches the September 7, not September 28.  Thanks to Dirk
  Losch for this.

* Daviess, Dubous, Knox, Martin, and Pike Counties, Indiana, switch
  from central to eastern time in November.  This results in a zone
  split, and a new entry America/Tell_City is created for Perry County,
  which does not switch zones in November.

* South Australia, Tasmania, Victoria, and New South Wales are changing
  their DST rules effective next year.  DST will end the first Sunday in
  April at 03:00 and start the first Sunday in October at 03:00.  Lord Howe
  Island has a similar change.

* Several Antarctic station's rules weren't properly updated to account
  for this year's change to the New Zealand daylight saving rules.

* In zone.tab (sorry, I don't recall who sent in these changes):
** Dumont-d'Urville is a station, not a base.
** Correct the coordinates for Aruba, Cambridge Bay, London, Johnston.
** Give alternate spellings for Zaporozhye.

* Add spelling notes for Kiev, Uzhgorod, Zaporozhye.
  (Sorry, I forgot who wrote this.)

* Identify American time zone boundaries more carefully.
  (Sorry, I forgot who sent this in.)

* Improve historical notes for Howland, Baker, and Jarvis.

Additionally, this commit updates the "leapseconds" file to incorporate the
most recent International Earth Rotation and Reference Systems Service (IERS)
bulletin.

12 years agoAdd a prototype and wrapper for lockuninit() to complement spin_uninit().
Matthew Dillon [Mon, 20 Aug 2007 05:44:59 +0000 (05:44 +0000)]
Add a prototype and wrapper for lockuninit() to complement spin_uninit().

Submitted-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
12 years agoFix another ^T race related to catching a LWP just as it is being created,
Matthew Dillon [Mon, 20 Aug 2007 05:40:40 +0000 (05:40 +0000)]
Fix another ^T race related to catching a LWP just as it is being created,
before lwp_thread has been assigned.

Reported-by: Stefan Krueger
12 years agoFix the root device selection to match the manual page. Before it was always
Matthew Dillon [Mon, 20 Aug 2007 05:27:46 +0000 (05:27 +0000)]
Fix the root device selection to match the manual page.  Before it was always
choosing the CD.  Now it chooses the first disk (-r or -c) option specified.

Submitted-by: Clement Martin <cma@alunys.com>
12 years agoUpdate for the latest changes to nrelease/Makefile.
Sascha Wildner [Mon, 20 Aug 2007 02:02:02 +0000 (02:02 +0000)]
Update for the latest changes to nrelease/Makefile.

12 years agos/.Fx/.Dx/
Sascha Wildner [Mon, 20 Aug 2007 01:35:56 +0000 (01:35 +0000)]
s/.Fx/.Dx/

12 years agoBring in latest uftdi(4) driver from FreeBSD.
Hasso Tepper [Sun, 19 Aug 2007 19:45:39 +0000 (19:45 +0000)]
Bring in latest uftdi(4) driver from FreeBSD.

Obtained-from: FreeBSD

12 years agoThere is no reason to be so verbose.
Hasso Tepper [Sun, 19 Aug 2007 19:42:11 +0000 (19:42 +0000)]
There is no reason to be so verbose.

12 years agoAdd missing .Sh LIBRARY.
Sascha Wildner [Sun, 19 Aug 2007 18:47:47 +0000 (18:47 +0000)]
Add missing .Sh LIBRARY.

12 years agoUse device_printf() where it makes sense.
Hasso Tepper [Sun, 19 Aug 2007 17:16:43 +0000 (17:16 +0000)]
Use device_printf() where it makes sense.

12 years agoAllow up to 13 bits for mode numbers.
Sascha Wildner [Sun, 19 Aug 2007 12:16:10 +0000 (12:16 +0000)]
Allow up to 13 bits for mode numbers.

Some VESA implementations use more than 9 bits for mode numbers (in
violation of the specification which marks D9-D12 as reserved).

This doesn't cause problems on conforming cards and recognizes more
modes on cards which exhibit this behavior (my Rage 3D LT Pro AGP
for example).

12 years ago* Use one ioctl() (CONS_SET, analogous to CONS_GET) for switching video
Sascha Wildner [Sun, 19 Aug 2007 11:39:11 +0000 (11:39 +0000)]
* Use one ioctl() (CONS_SET, analogous to CONS_GET) for switching video
  modes instead of having one ioctl() per video mode.

* Adjust userspace (vidcontrol, libvgl) accordingly.

* Bump libvgl's version number, since this makes the VGLInit() function
  incompatible (previously it took an ioctl request as the first argument,
  now it's a mode number).

* Remove scvesactl.c, which no longer serves any purpose.

12 years agoAdd Smart Technologies USB to serial adapter.
Hasso Tepper [Sun, 19 Aug 2007 10:19:43 +0000 (10:19 +0000)]
Add Smart Technologies USB to serial adapter.

Obtained-from: NetBSD

12 years agoAdd Smart Technologies USB to serial adapter.
Hasso Tepper [Sun, 19 Aug 2007 10:03:45 +0000 (10:03 +0000)]
Add Smart Technologies USB to serial adapter.

Obtained-from: NetBSD

12 years agoAdd some missing LIBRARY sections.
Sascha Wildner [Sat, 18 Aug 2007 20:48:47 +0000 (20:48 +0000)]
Add some missing LIBRARY sections.

12 years agoAdd some words about the MBUF_STRESS_TEST kernel option and the sysctls
Sascha Wildner [Sat, 18 Aug 2007 18:58:20 +0000 (18:58 +0000)]
Add some words about the MBUF_STRESS_TEST kernel option and the sysctls
it creates.

Taken-from: FreeBSD

12 years agoAdd MBUF_DEBUG.
Sascha Wildner [Sat, 18 Aug 2007 18:16:24 +0000 (18:16 +0000)]
Add MBUF_DEBUG.

12 years agoUse upper case for section header and expand HISTORY a bit.
Sascha Wildner [Sat, 18 Aug 2007 18:04:59 +0000 (18:04 +0000)]
Use upper case for section header and expand HISTORY a bit.

12 years agoNote that the vke interface needs to be brought up for its IP address to
Sascha Wildner [Sat, 18 Aug 2007 16:09:57 +0000 (16:09 +0000)]
Note that the vke interface needs to be brought up for its IP address to
be assigned.

Submitted-by: Chris Turner <c.turner@199technologies.org>
12 years agoUpdate for libarchive-2.2.6 import.
Peter Avalos [Sat, 18 Aug 2007 15:23:33 +0000 (15:23 +0000)]
Update for libarchive-2.2.6 import.

12 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Sat, 18 Aug 2007 15:20:51 +0000 (15:20 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive 2.2.6.

12 years agoImport libarchive 2.2.6.
Peter Avalos [Sat, 18 Aug 2007 15:20:51 +0000 (15:20 +0000)]
Import libarchive 2.2.6.

12 years agoFix setting 115200 baudrate.
Hasso Tepper [Sat, 18 Aug 2007 09:44:46 +0000 (09:44 +0000)]
Fix setting 115200 baudrate.

12 years agoAdd some words about the vcd driver in the DEVICES section.
Sascha Wildner [Sat, 18 Aug 2007 08:46:32 +0000 (08:46 +0000)]
Add some words about the vcd driver in the DEVICES section.

While I'm here, adjust some TABs and copyright years, and sort the
manpages in the Makefile.

12 years agoDeprecate 'installer_*' targets. If used a warning is generated and the
Matthew Dillon [Sat, 18 Aug 2007 00:10:50 +0000 (00:10 +0000)]
Deprecate 'installer_*' targets.  If used a warning is generated and the
build will sleep for 10 seconds before continuing.

New way of doing targets: build what you want by specifying multiple
targets.  For example:  'make installer release' instead of
'make installer_release'.  This increases the flexibility of the
nrelease build by allowing us to add multiple targets to create an
enhanced result.

12 years agoAdd 'options CARP' to the SYNOPSIS.
Sascha Wildner [Fri, 17 Aug 2007 11:07:54 +0000 (11:07 +0000)]
Add 'options CARP' to the SYNOPSIS.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
12 years agoMake functions static.
Hasso Tepper [Fri, 17 Aug 2007 06:40:19 +0000 (06:40 +0000)]
Make functions static.

12 years agoAdd umsm(4) driver for EVDO and UMTS modems with Qualcomm MSM chipsets.
Hasso Tepper [Thu, 16 Aug 2007 20:38:33 +0000 (20:38 +0000)]
Add umsm(4) driver for EVDO and UMTS modems with Qualcomm MSM chipsets.

Obtained-from: OpenBSD

12 years agoAdd some devices based on Qualcomm HSDPA chips.
Hasso Tepper [Thu, 16 Aug 2007 20:10:08 +0000 (20:10 +0000)]
Add some devices based on Qualcomm HSDPA chips.

12 years agoBring CARP into the tree. CARP = Common Address Redundancy Protocol, which
Matthew Dillon [Thu, 16 Aug 2007 20:03:58 +0000 (20:03 +0000)]
Bring CARP into the tree.  CARP = Common Address Redundancy Protocol, which
allows an IP address to hot switch to backup machine(s) when the master goes
offline.

Submitted-by: Baptiste Ritter <baptiste.ritter@ulp.u-strasbg.fr>,
Jonathan, and Nicolas
Testing-by: Thomas Nikolajsen, Gergo Szakal
Obtained-from: OpenBSD, NetBSD, and FreeBSD

12 years agoRemove reference to the nonexistant uhub(4).
Hasso Tepper [Thu, 16 Aug 2007 19:07:09 +0000 (19:07 +0000)]
Remove reference to the nonexistant uhub(4).

12 years agoExtra ';' after if() would cause panic if attaching failed.
Sepherosa Ziehau [Thu, 16 Aug 2007 11:20:37 +0000 (11:20 +0000)]
Extra ';' after if() would cause panic if attaching failed.

Noticed-by: hasso@
12 years agoAdd support for HandyTech's Braille displays into ubsa(4) (ID found in
Hasso Tepper [Thu, 16 Aug 2007 07:03:30 +0000 (07:03 +0000)]
Add support for HandyTech's Braille displays into ubsa(4) (ID found in
Linux driver).

12 years agoAdd the ID of USB serial interface used in HandyTech Braille displays.
Hasso Tepper [Thu, 16 Aug 2007 06:58:02 +0000 (06:58 +0000)]
Add the ID of USB serial interface used in HandyTech Braille displays.

12 years agoClean up the kvm process code. This is only used when trying to get a
Matthew Dillon [Wed, 15 Aug 2007 19:37:52 +0000 (19:37 +0000)]
Clean up the kvm process code.  This is only used when trying to get a
process list out of a kernel core with 'ps'.  Many things had gone stale.

Also adjust the code to traverse the new LWP list.

12 years ago* Add DPMS support to the vesa module.
Sascha Wildner [Wed, 15 Aug 2007 19:31:12 +0000 (19:31 +0000)]
* Add DPMS support to the vesa module.

* Adjust the V_DISPLAY_* defines to play better with DPMS.

* Fix {blank,green}_saver to check if the requested state is already
  active.

With this commit, the "blank" (for off) and "green" (for standby)
console screen savers will turn off the backlight on flat screens
if supported.

12 years agoFix uslcom path.
Sascha Wildner [Wed, 15 Aug 2007 14:34:02 +0000 (14:34 +0000)]
Fix uslcom path.

12 years agoHardware flow control support for uslcom(4).
Hasso Tepper [Wed, 15 Aug 2007 06:47:26 +0000 (06:47 +0000)]
Hardware flow control support for uslcom(4).

Obtained-from: NetBSD with modifications

12 years agoConvert the lwp list into a red-black tree. This greatly reduces the
Matthew Dillon [Wed, 15 Aug 2007 03:15:07 +0000 (03:15 +0000)]
Convert the lwp list into a red-black tree.  This greatly reduces the
overhead of looking up LWPs for numerous operations including select and
removes the hokey fork code that tried to avoid doing a list traversal.

One inefficiency remains which cannot be easily fixed, and may not matter
much anyway, and that is delivering a generic signal the process may have
to iterate through many LWPs before finding one that can handle the signal.

12 years agoSignals have to be blocked when creating our LWPs or a LWP may receive a
Matthew Dillon [Wed, 15 Aug 2007 03:10:50 +0000 (03:10 +0000)]
Signals have to be blocked when creating our LWPs or a LWP may receive a
signal before it is ready to handle it.  This can cause clock interrupt
to stop operating when booting SMP.

Fix cpu_disable_intr() - the wrong signals were being masked due to an
off-by-one error.

12 years agoAdd uark(4) driver which supports Arkmicro Technologies ARK3116 chip found
Hasso Tepper [Tue, 14 Aug 2007 22:28:11 +0000 (22:28 +0000)]
Add uark(4) driver which supports Arkmicro Technologies ARK3116 chip found
in some USB to serial adapters.

Obtained-from: OpenBSD

12 years agoAdd '-H', 'nlwp', and 'tid' options to ps(1) to display some LWP data (inspired
Matthew Dillon [Tue, 14 Aug 2007 20:29:07 +0000 (20:29 +0000)]
Add '-H', 'nlwp', and 'tid' options to ps(1) to display some LWP data (inspired
from FreeBSD options).  Clean up the kernel's initialization of the kl_tid
field.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
12 years agoFix pci bus detection on certain motherboards. Fixes bus detect on
Matthew Dillon [Tue, 14 Aug 2007 20:09:13 +0000 (20:09 +0000)]
Fix pci bus detection on certain motherboards.  Fixes bus detect on
ALIX.1C board (www.pcengines.ch).  May fix bus detection on other esoteric
boards.

Submitted-by: Andrew Atrens <atrens@nortel.com>
Obtained-from: Various sources including FreeBSD

12 years agoFix for amd geode cs5536 companion (ehci) panic. Also fix a word-reversed
Matthew Dillon [Tue, 14 Aug 2007 20:06:13 +0000 (20:06 +0000)]
Fix for amd geode cs5536 companion (ehci) panic.  Also fix a word-reversed
AMD 8111 device ID.

Submitted-by: Andrew Atrens <atrens@nortel.com>
12 years ago- Correct SYNOPSIS section in USB serial manpages.
Hasso Tepper [Tue, 14 Aug 2007 17:40:19 +0000 (17:40 +0000)]
- Correct SYNOPSIS section in USB serial manpages.
- Add references to ubsa(4) and uslcom(4) to the ucom(4) manpage.
- Remove section regarding portno from ucom(4) manpage.

12 years ago- Overlooked pccard dark corner: NIC lan id should be returned by reference.
Sepherosa Ziehau [Tue, 14 Aug 2007 15:32:32 +0000 (15:32 +0000)]
- Overlooked pccard dark corner: NIC lan id should be returned by reference.
- Const-fy pccard_get_ether() return value.

Reported-by: EJHaug <ejh@eas.slu.edu>
12 years agoIf PCI_MAP_FIXUP is defined, we can no longer do the reallocation magic;
Sepherosa Ziehau [Tue, 14 Aug 2007 14:58:44 +0000 (14:58 +0000)]
If PCI_MAP_FIXUP is defined, we can no longer do the reallocation magic;
at least it breaks following case:

1) BIOS does not assign cbb IO memory.
2) ipw and cbb are on the same PCI bus.
3) If ipw was loaded, it would use 0xd0000000-0xd0000fff as its IO memory.
4) ipw was not loaded at boot time.
5) At boot time, cbb tried to attach, system assigned IO memory 0xd0000000
   -0xd0000fff to it.  But later on, due to incorrect IRQ assignment, cbb
   attaching failed.  The assigned IO memory was freed properly.  However,
   the resource list entry (rle) was not freed.
6) ipw was loaded after booting and successfully attached.  It occupied IO
   memory 0xd0000000-0xd0000fff.
7) Since ipw and cbb are on the same PCI bus, cbb got a second chance re-
   probe and re-attach.  But this time, no rle would be allocated by PCI bus
   code, since old rle was still there.  Old rle had 0xd0000000-0xd0000fff
   as start/end, so this allocation failed -- same IO memory segment was
   already used by ipw.
8) The reallocation magic was performed then.  It succeeded, but this left
   cbb's rle in an uninitalized state.

As pointed out in 5), cbb attaching failed again.  Reallocated IO memory
was going to be freed: assertion in pci_release_resource(), since cbb's rle
was not initialized in 8).

If PCI_MAP_FIXIP is not defined, we depend on the current mechanism to find
the PCI IO memory for cbb, given some goofy BIOSes do not assign cbb's IO
memory.  This seems to be the only way to make things working without
PCI_MAP_FIXUP, though it is vulnerable to the case described above.

Reported-by: Michael Neumann <mneumann@ntecs.de>
12 years agoAdd a new csum flag to tell IP defragmenter that csum_data does _not_
Sepherosa Ziehau [Tue, 14 Aug 2007 13:30:35 +0000 (13:30 +0000)]
Add a new csum flag to tell IP defragmenter that csum_data does _not_
contain a valid IP fragment payload checksum.  This flag is only intented
to be used by IP defragmenter.

Currently only bce(4), bge(4) and ti(4) provide valid IP fragment payload
checksum.  Turn on the new csum flag for the rest of the drivers, which
support hardware TCP/UDP checksum offload but hard-wire csum_data to 0xffff,
to avoid bypassing verification of defragmented payload's checksum.

Discussed-with: dillon@, hsu@
Approved-by: dillon@
12 years agoAdd some new uslcom(4) device ids found in Linux driver.
Hasso Tepper [Tue, 14 Aug 2007 11:31:02 +0000 (11:31 +0000)]
Add some new uslcom(4) device ids found in Linux driver.

12 years agoAdd some new uslcom(4) devices found in Linux driver.
Hasso Tepper [Tue, 14 Aug 2007 11:04:52 +0000 (11:04 +0000)]
Add some new uslcom(4) devices found in Linux driver.

12 years agouslcom(4) works with devices based on CP2103 chip. Tested by me with CP2103
Hasso Tepper [Tue, 14 Aug 2007 10:11:07 +0000 (10:11 +0000)]
uslcom(4) works with devices based on CP2103 chip. Tested by me with CP2103
evaluation kit.

12 years agoAdd uslcom(4) into LINT.
Hasso Tepper [Tue, 14 Aug 2007 09:39:26 +0000 (09:39 +0000)]
Add uslcom(4) into LINT.

Reminded-by: Sascha Wildner
12 years agoAdd uslcom(4) driver which provides support for USB devices based on
Hasso Tepper [Tue, 14 Aug 2007 08:53:59 +0000 (08:53 +0000)]
Add uslcom(4) driver which provides support for USB devices based on
Silicon Laboratories CP120x USB-UART bridges.

Obtained-from: OpenBSD

12 years agoAdd devices based on Silicon Laboratories USB-UART bridge.
Hasso Tepper [Tue, 14 Aug 2007 08:42:34 +0000 (08:42 +0000)]
Add devices based on Silicon Laboratories USB-UART bridge.

Obtained-from: OpenBSD

12 years agoRemove custom mk.copf stuff -- a correct one comes with the pkgsrc bootstrap.
Simon Schubert [Mon, 13 Aug 2007 21:33:47 +0000 (21:33 +0000)]
Remove custom mk.copf stuff -- a correct one comes with the pkgsrc bootstrap.

12 years agoPart 1/many USERFS support. Bring in the initial userfs infrastructure.
Matthew Dillon [Mon, 13 Aug 2007 17:49:17 +0000 (17:49 +0000)]
Part 1/many USERFS support.  Bring in the initial userfs infrastructure.
Add syslink-based mount support.  Most of the VOPs are still just dummy
wrappers with this commit.  USERFS is not yet linked into the build.

12 years agoAdd additional functionality to the syslink implementation. Give the
Matthew Dillon [Mon, 13 Aug 2007 17:47:20 +0000 (17:47 +0000)]
Add additional functionality to the syslink implementation.  Give the
kernel side the ability to send a syslink message asynchronously (we we
can implement an asynchronous VOP_STRATEGY) and add support code to
construct XIO's for kernel consumption.

Document the syslink element flags a bit better and add a ne wsyslink
element construction inline which constructs a simple degenerate element.

12 years agoThe new VOP_N*() (namespace) operations pass a pointer to a namecache
Matthew Dillon [Mon, 13 Aug 2007 17:43:57 +0000 (17:43 +0000)]
The new VOP_N*() (namespace) operations pass a pointer to a namecache
record.  This information is sufficient for resolving the namespace
operation.  In all cases the parent namecache record already had to have
a resolved vnode so the related directory vnode could be easily extracted
by the VFS.  But this also means the target VFSs had to traverse the
namecache topology up one level which introduced API pollution that
is not compatible with directly translating a VOP to a RPC.

To solve this we now pass a directory vnode along with the namecache pointer.
This vnode is only held, not referenced or vget()d so the target VFS must
still vget() the vnode and/or do whatever it needs to do to validate it.
This gives the target VFS full control over directory locking when performing
namespace operations.  The namespaces themselves are already guarenteed
to be locked due to the fact that the related namecache records are locked.

This change is being made to accomodate USERFS, so we can directly translate
the related VOPs to RPCs without having to reproduce the namecache topology
in the target VFS running in userland.

12 years agoRemove the vpp (returned underlying device vnode) argument from VOP_BMAP().
Matthew Dillon [Mon, 13 Aug 2007 17:31:57 +0000 (17:31 +0000)]
Remove the vpp (returned underlying device vnode) argument from VOP_BMAP().
VOP_BMAP() may now only be used to determine linearity and clusterability of
the blocks underlying a filesystem object.  The meaning of the returned
block number (other then being contiguous as a means of indicating
linearity or clusterability) is now up to the VFS.

This removes visibility into the device(s) underlying a filesystem from
the rest of the kernel.

12 years agoAdd xio_init_pages(), which builds an XIO based on an array of vm_page_t's.
Matthew Dillon [Mon, 13 Aug 2007 17:20:05 +0000 (17:20 +0000)]
Add xio_init_pages(), which builds an XIO based on an array of vm_page_t's.

12 years agoReplace the huge mess that was vnode_pager_generic_getpages() with a much
Matthew Dillon [Mon, 13 Aug 2007 17:18:16 +0000 (17:18 +0000)]
Replace the huge mess that was vnode_pager_generic_getpages() with a much
simpler version which does a UIO_NOCOPY VOP_READ.  This version requires
that all VREG file I/O pass through the buffer cache.  All filesystems
which use this function already use the buffer cache.

* specfs rolls its own for device mmaps.
* NFS rolls its own.
* UFS rolls its own by backs down to this function in certain cases.
* Remaining filesystems call this function and use the buffer cache (ext2,
  hpfs, isofs, msdosfs, ntfs, nwfs, smbfs), and are compatible.

Buffer cache side effects properly set the valid bits in the vm_page_t
and vm_faults in DragonFly are now responsible for zero-filling mapped VM
pages, so the vnode_pager*() code no longer has to do this.

The vnode_pager*() code was previously using getpbuf() and pmap_qenter() and
friends which is almost as expensive as instantiating a new buffer cache
buffer.  The vnode_pager*() code also previously ran a manual BMAP whereas
the buffer cache may already have a cached translation available.

12 years agoExplicitly extract the sector size for the underlying media. This solves
Matthew Dillon [Mon, 13 Aug 2007 17:08:34 +0000 (17:08 +0000)]
Explicitly extract the sector size for the underlying media.  This solves
some, but not all of the issues related to running fdisk on media with a
sector size greater then 512 bytes.  Still unaddressed is what to do about
the 512-byte MBR.

Reported-by: "Dennis den Brok" <d.den.brok@uni-bonn.de>