]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMFC
Attilio Rao [Sun, 26 Jun 2011 17:30:46 +0000 (17:30 +0000)]
MFC

13 years agoAdd better error handling for RTAS calls. These can potentially cause
Nathan Whitehorn [Sun, 26 Jun 2011 16:11:36 +0000 (16:11 +0000)]
Add better error handling for RTAS calls. These can potentially cause
machine checks (e.g. invalid PCI configuration cycles), but these can
be caught and recovered from. This change also the RTAS PCI driver to
work without modification as a replacement for the Grackle driver on
Grackle-based Powermacs.

13 years agoRevert r223479. It is unnecessary and served only to slightly ameliorate
Nathan Whitehorn [Sun, 26 Jun 2011 15:08:14 +0000 (15:08 +0000)]
Revert r223479. It is unnecessary and served only to slightly ameliorate
some manifestations of the bug actually fixed in r223485.

13 years ago.. this wasn't supposed to be committed! sorry.
Adrian Chadd [Sun, 26 Jun 2011 14:29:49 +0000 (14:29 +0000)]
.. this wasn't supposed to be committed! sorry.

13 years agoFix beacon transmission after a channel set.
Adrian Chadd [Sun, 26 Jun 2011 13:53:24 +0000 (13:53 +0000)]
Fix beacon transmission after a channel set.

The DFS code was tickling the channel set directly whilst going
through the state RUN -> CSA -> RUN. This only changed the channel;
it didn't go via ath_reset(). However in this driver, a channel
change always causes a chip reset, which resets the beacon timer
configuration and interrupt setup. This meant that data would go
out but as the beacon timers never fired, beacons would never
be queued.

The confusing part is that sometimes the state transition was
RUN -> SCAN -> CAC -> RUN (with CSA being in there sometimes);
going via SCAN would clear sc_beacons and thus the transition
to RUN would reprogram beacon transmission.

In case someone tries debugging why suspending a device currently
beaconing (versus just RX'ing beacons which is what occurs in STA
mode), add a silly comment which should hopefully land them at
this commit message. The call to ath_hal_reset() will be clearing
the beacon config and it may not be always reset.

13 years agoAdd ATH_ENABLE_DFS which enables the DFS flag so the DFS code
Adrian Chadd [Sun, 26 Jun 2011 13:43:15 +0000 (13:43 +0000)]
Add ATH_ENABLE_DFS which enables the DFS flag so the DFS code
can be tested.

This doesn't at all actually do radar detection! It's just
so developers who wish to test the net80211 DFS code can easily
do so. Without this flag, the DFS channels are never marked
DFS and thus the DFS stuff doesn't run.

13 years agoThe SMCWUSBG is a zyd(4) device, not an uath(4) device. Remove from the
Gavin Atkinson [Sun, 26 Jun 2011 11:37:24 +0000 (11:37 +0000)]
The SMCWUSBG is a zyd(4) device, not an uath(4) device.  Remove from the
latter.

It appears that the addition to uath(4) came in through PR kern/135009,
which had tested another device, the SMCWUSBTG2, successfully with uath(4)
and included the SMCWUSBG as it "has the same chipset".  I can find no
other evidence that these two do actually share the same chipset.  Moreover,
Linux treats the SMCWUSBG as a zyd(4) device also.

This reverts r223537.

Discussed with: hselasky, kevlo
MFC after: 1 week

13 years agoI think 23dBm is the correct value to use here. CRDA uses 20dBm + 3dB max antenna
Adrian Chadd [Sun, 26 Jun 2011 10:34:01 +0000 (10:34 +0000)]
I think 23dBm is the correct value to use here. CRDA uses 20dBm + 3dB max antenna
gain; I believe net80211 doesn't take antenna gain into account and leaves it
up to the driver to enforce. (ath_hal(4) certainly tries to do this.)

13 years agoAdd a couple more frequency ranges to the FCC3 (FCC + DFS) regulatory domain.
Adrian Chadd [Sun, 26 Jun 2011 10:32:09 +0000 (10:32 +0000)]
Add a couple more frequency ranges to the FCC3 (FCC + DFS) regulatory domain.

The frequency range 5490MHz -> 5710MHz was opened up sometime in 2009, but
regdomain.xml wasn't updated.

FCC reference: (Section 15.407): http://louise.hallikainen.org/FCC/FccRules/2009/15/407/

The hole between 5600-5650MHz is due to a request from Airports using
a weather radar system which also utilises this range.
The GIT commit explaining this hole in more detail can be found here:

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-regdb.git;a=commit;h=fcbf9225d56e82d9a4e506187d42285e76d81523

13 years agoRemove duplicate header includes
Kevin Lo [Sun, 26 Jun 2011 10:07:48 +0000 (10:07 +0000)]
Remove duplicate header includes

13 years agoReplace tab with 8 spaces, bringing it in line with the rest of the file.
Adrian Chadd [Sun, 26 Jun 2011 09:32:46 +0000 (09:32 +0000)]
Replace tab with 8 spaces, bringing it in line with the rest of the file.

13 years agocam/scsi/scsi_cd.c:
Justin T. Gibbs [Sun, 26 Jun 2011 01:32:46 +0000 (01:32 +0000)]
cam/scsi/scsi_cd.c:
In cdregister(), hold the periph lock semaphore during changer
probe/configuration.  This removes a window where an open of the
cd device may succeed before probe processing has completed.

13 years agocam/cam_xpt.c:
Justin T. Gibbs [Sun, 26 Jun 2011 01:14:54 +0000 (01:14 +0000)]
cam/cam_xpt.c:
In camisr_runqueue(), we need to run the sims queue regardless of
whether or not the current peripheral has more work to do.  This
reverts a change mistakenly made in revision 223081.

Reported by: ache

13 years agoTurn the minimum PWM fan speed down to 30 from 40. It turns out the burning
Nathan Whitehorn [Sun, 26 Jun 2011 00:49:17 +0000 (00:49 +0000)]
Turn the minimum PWM fan speed down to 30 from 40. It turns out the burning
smell that caused me to turn this up was due to a failed fan burning, not
a CPU (plus a healthy dose of paranoia).

Submitted by: Paul Mather <paul at gromit dot dlib dot vt dot edu>

13 years agoDo not attach to the sound device on G5 Xserves, which is actually an
Nathan Whitehorn [Sun, 26 Jun 2011 00:35:11 +0000 (00:35 +0000)]
Do not attach to the sound device on G5 Xserves, which is actually an
LED controller used to run the load graph on the server's front panel.

Reported by: Paul Mather <paul at gromit dot dlib dot vt dot edu>
MFC after: 3 days

13 years agosh: Test that '!' is literal if quoted and first char of bracket expression
Jilles Tjoelker [Sat, 25 Jun 2011 20:37:43 +0000 (20:37 +0000)]
sh: Test that '!' is literal if quoted and first char of bracket expression

This also works on stable/8.

13 years agoMore accurate birthplace.
Joel Dahl [Sat, 25 Jun 2011 19:21:54 +0000 (19:21 +0000)]
More accurate birthplace.

13 years agoOops. The sec field of struct bintime is *not* a 32-bit type.
Marcel Moolenaar [Sat, 25 Jun 2011 17:58:35 +0000 (17:58 +0000)]
Oops. The sec field of struct bintime is *not* a 32-bit type.
It's time_t, which is 64 bits on ia64.

13 years ago- Move bus_auto.conf back into /etc/devd/
Hans Petter Selasky [Sat, 25 Jun 2011 17:01:46 +0000 (17:01 +0000)]
- Move bus_auto.conf back into /etc/devd/
- Rename bus_auto.conf into usb.conf

Requested by: imp @
MFC after: 14 days

13 years agoDefine the minimum fractional period in terms of hz. We know hz is
Marcel Moolenaar [Sat, 25 Jun 2011 16:35:43 +0000 (16:35 +0000)]
Define the minimum fractional period in terms of hz. We know hz is
a magnitude smaller than itc_freq. A minimum period of 10*hz is
sufficient precision. As a side-effect, the number of clocks per
second, when the machine is idle, dropped by more than 50%.
Be anal and define the maximum period to be at least 4G seconds.
With a 64-bit counter and an ITC frequency that's expected to be
always less than 4Ghz, it takes longer than that to wrap around.

13 years agoIf there is a read error reading Y/N confirmation from the keyboard,
Tim Kientzle [Sat, 25 Jun 2011 16:27:49 +0000 (16:27 +0000)]
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

PR: bin/154407

13 years agoThe kerberos5 tools are only used as build tools but not otherwise and
Marius Strobl [Sat, 25 Jun 2011 16:13:56 +0000 (16:13 +0000)]
The kerberos5 tools are only used as build tools but not otherwise and
didn't get installed either.

MFC after: 1 week

13 years agoAs with EFI, OFW and U-Boot etc only compile FDT support on those
Marius Strobl [Sat, 25 Jun 2011 16:01:45 +0000 (16:01 +0000)]
As with EFI, OFW and U-Boot etc only compile FDT support on those
architectures that actually use it.

13 years ago- Export the USB device ID format to userspace tools.
Hans Petter Selasky [Sat, 25 Jun 2011 15:51:44 +0000 (15:51 +0000)]
- Export the USB device ID format to userspace tools.

MFC after: 14 days

13 years ago- Remove duplicate USB ID.
Hans Petter Selasky [Sat, 25 Jun 2011 15:46:24 +0000 (15:46 +0000)]
- Remove duplicate USB ID.

MFC after: 3 days

13 years ago- Move auto-load devd config file into etc/defaults folder.
Hans Petter Selasky [Sat, 25 Jun 2011 15:42:33 +0000 (15:42 +0000)]
- Move auto-load devd config file into etc/defaults folder.
- Regenerate file after bugfix in the generator.

Suggested by: Jeremy Messenger
MFC after: 14 days

13 years ago- Need to respect the module name and the USB mode when accumulating device ID's.
Hans Petter Selasky [Sat, 25 Jun 2011 15:22:44 +0000 (15:22 +0000)]
- Need to respect the module name and the USB mode when accumulating device ID's.
- Be more verbose on file seek failures. Allow a file size of zero.
- Improve the wrapper shell.

MFC after: 14 days

13 years ago- Improve bus_autoconf tool.
Hans Petter Selasky [Sat, 25 Jun 2011 13:44:05 +0000 (13:44 +0000)]
- Improve bus_autoconf tool.
- Implement simple and generic language which can
be used to describe any kind of device ID structures.
- Fix endian issues.
- Add an example format file.

Suggested by: imp @
MFC after: 14 days

13 years agoRemove redundant Capsicum sysctl.
Jonathan Anderson [Sat, 25 Jun 2011 12:37:06 +0000 (12:37 +0000)]
Remove redundant Capsicum sysctl.

Since we're now declaring FEATURE(security_capabilities), there's no need for an explicit SYSCTL_NODE.

Approved by: rwatson

13 years agoAdd missing libkvm and libutil dependencies.
Sergey Kandaurov [Sat, 25 Jun 2011 11:21:23 +0000 (11:21 +0000)]
Add missing libkvm and libutil dependencies.
Now libprocstat takes care of its own dependencies and does not
require applications to specify them.

Reviewed by: stas, jilles

13 years agounconditionally stop other cpus when entering kdb in smp system
Andriy Gapon [Sat, 25 Jun 2011 10:28:16 +0000 (10:28 +0000)]
unconditionally stop other cpus when entering kdb in smp system

... and thus retire debug.kdb.stop_cpus tunable/sysctl.
The knob was to work around CPU stopping issues, which since have been
either fixed or greatly reduced.  kdb should really operate in a special
environment with scheduler stopped and interrupts disabled to provide
deterministic debugging.

Discussed with: attilio, rwatson
X-MFC after: 2 months or never

13 years agogeneric_stop_cpus: pull timeout logic from under DIAGNOSTIC
Andriy Gapon [Sat, 25 Jun 2011 10:01:43 +0000 (10:01 +0000)]
generic_stop_cpus: pull timeout logic from under DIAGNOSTIC

... and also increase the timeout.
It's better to try to proceed somehow despite stuck CPUs than to hang
indefinitely.  Especially so during shutdown and when entering kdb or panic.

Timeout value is still an aribitrary value.
Timeout diagnostic is just a printf; the work on something more
debuggable is planned by attilio.  Need to be careful here as
stop_cpus_hard is called very early while enetering kdb and soon(-ish)
it may become called very early when entering panic.

Reviewed by: attilio
MFC after: 2 months

13 years agoReplace the original copyright notice with my own. Everything in
Marcel Moolenaar [Sat, 25 Jun 2011 03:43:58 +0000 (03:43 +0000)]
Replace the original copyright notice with my own. Everything in
this file is written by me and has no bearing on the initial or
original version.

13 years agoUpdate copyright.
Marcel Moolenaar [Sat, 25 Jun 2011 03:37:40 +0000 (03:37 +0000)]
Update copyright.

13 years agoNow that ia64 has been switched to the event timers, remove the
Marcel Moolenaar [Sat, 25 Jun 2011 02:49:47 +0000 (02:49 +0000)]
Now that ia64 has been switched to the event timers, remove the
conditional compilation work-arounds.

13 years agoSwitch to the event timers infrastructure. This includes:
Marcel Moolenaar [Sat, 25 Jun 2011 02:15:14 +0000 (02:15 +0000)]
Switch to the event timers infrastructure. This includes:
o   Setting td_intr_frame to the XIVs trap frame because it's referenced
    by the ET event handler.
o   Signal EOI to the CPU before calling the registered XIV handlers.
    This prevents lost ITC interrupts, which cause starvation in one-shot
    mode.
o   Adding support for IPI_HARDCLOCK with corresponding per-CPU counters.
o   Have the APs call cpu_initclocks() so as to limited the scattering of
    clock related initialization. cpu_initclocks() calls the <self>_bsp()
    or <self>_ap() version accordingly.
o   Uncomment the ET clock handling in cpu_idle().
o   Update the DDB 'show pcpu' output for the new MD fields.
o   Entirely rewritten ia64_ih_clock(). Note that we don't create as many
    clock XIVs as we have CPUs, as is done on PowerPC. It doesn't scale.
    We can only have 240 XIVs and we can have more CPUs than that. There's
    a single intrcnt index for the cumulative clock ticks and we keep per
    CPU counts in the PCPU stats structure.
o   Register the ITC by hooking SI_SUB_CONFIGURE (2nd order).

Open issues:
o   Clock interrupts can still be lost. Some tweaking is still necessary.

Thanks to: mav@ for his support, feedback and explanations.

ET stats while committing:
eris% sysctl machdep.cpu | grep nclks

machdep.cpu.0.nclks: 24007
machdep.cpu.1.nclks: 22895
machdep.cpu.2.nclks: 13523
machdep.cpu.3.nclks: 9342
machdep.cpu.4.nclks: 9103
machdep.cpu.5.nclks: 9298
machdep.cpu.6.nclks: 10039
machdep.cpu.7.nclks: 9479
eris% vmstat -i | grep clock
clock                      108599         50

13 years agoCommit missing piece from a couple days ago - re-add ath_hal_debug.
Adrian Chadd [Sat, 25 Jun 2011 00:34:40 +0000 (00:34 +0000)]
Commit missing piece from a couple days ago - re-add ath_hal_debug.

13 years agoSmall fix to bring the non-debug definitions of HALDEBUG/HALDEBUG_G in line
Adrian Chadd [Fri, 24 Jun 2011 23:59:14 +0000 (23:59 +0000)]
Small fix to bring the non-debug definitions of HALDEBUG/HALDEBUG_G in line
with the debug definitions.

13 years agoComment out AH_DEBUG, to get this kernel to compile, until AH_DEBUG is fixed.
Olivier Houchard [Fri, 24 Jun 2011 23:26:45 +0000 (23:26 +0000)]
Comment out AH_DEBUG, to get this kernel to compile, until AH_DEBUG is fixed.

13 years agosh(1): Improve documentation of shell patterns:
Jilles Tjoelker [Fri, 24 Jun 2011 22:08:26 +0000 (22:08 +0000)]
sh(1): Improve documentation of shell patterns:

* Shell patterns are also for ${var#pat} and the like.
* An '!' by itself will not trigger pathname generation so do not call it a
  meta-character, even though it has a special meaning directly after an
  '['.
* Character ranges are locale-dependent.
* A '^' will complement a character class like '!' but is non-standard.

MFC after: 1 week

13 years ago- Export more USB device ID's.
Hans Petter Selasky [Fri, 24 Jun 2011 22:01:56 +0000 (22:01 +0000)]
- Export more USB device ID's.
- Update bus_auto.conf accordingly.

MFC after: 3 days

13 years agoSplit out host_pcib_get_busno() from the generic PCI-PCI bridge driver to
John Baldwin [Fri, 24 Jun 2011 21:39:38 +0000 (21:39 +0000)]
Split out host_pcib_get_busno() from the generic PCI-PCI bridge driver to
start a new file that will hold utility APIs used by various Host-PCI
bridge drivers and drivers that provide PCI domains.

13 years ago- Add auto-load devd config file for USB kernel modules.
Hans Petter Selasky [Fri, 24 Jun 2011 21:32:03 +0000 (21:32 +0000)]
- Add auto-load devd config file for USB kernel modules.

MFC after: 14 days

13 years ago- We need to sort all USB device ID's together. Else the matching order will
Hans Petter Selasky [Fri, 24 Jun 2011 21:27:33 +0000 (21:27 +0000)]
- We need to sort all USB device ID's together. Else the matching order will
be wrong. This is required because devd only executes one entry.

MFC after: 14 days

13 years agosh(1): Document the case command better.
Jilles Tjoelker [Fri, 24 Jun 2011 20:23:50 +0000 (20:23 +0000)]
sh(1): Document the case command better.

Suggested by: netchild
Reviewed by: gjb

13 years ago- Export more USB device ID's.
Hans Petter Selasky [Fri, 24 Jun 2011 19:32:29 +0000 (19:32 +0000)]
- Export more USB device ID's.

MFC after: 3 days

13 years ago- Ensure that we get all the required nomatch devd events.
Hans Petter Selasky [Fri, 24 Jun 2011 19:02:56 +0000 (19:02 +0000)]
- Ensure that we get all the required nomatch devd events.

MFC after: 3 days

13 years ago- Move execution of event handlers into the probe and attach function so that
Hans Petter Selasky [Fri, 24 Jun 2011 18:14:43 +0000 (18:14 +0000)]
- Move execution of event handlers into the probe and attach function so that
dynamically loaded device drivers get a chance to run their event hooks.

- Decouple the USB suspend and resume lock from witness. It produces some
false warnings due to reusing the lock name among multiple devices.

MFC after: 3 days

13 years ago- Export the URIO USB device ID's.
Hans Petter Selasky [Fri, 24 Jun 2011 18:11:55 +0000 (18:11 +0000)]
- Export the URIO USB device ID's.
- Add checks for configuration and interface index.

MFC after: 3 days

13 years agoDon't die if either of INET or INET6 aren't in the running kernel.
John Baldwin [Fri, 24 Jun 2011 17:54:45 +0000 (17:54 +0000)]
Don't die if either of INET or INET6 aren't in the running kernel.
Instead, report "protocol not supported" errors at runtime if a user
attempts to use a protocol that the kernel doesn't support.

Reviewed by: bz
MFC after: 1 week

13 years agoMFC
Attilio Rao [Fri, 24 Jun 2011 16:35:40 +0000 (16:35 +0000)]
MFC

13 years agoAdd support for string values with white spaces for ifconfig(8)
Sergey Kandaurov [Fri, 24 Jun 2011 14:56:38 +0000 (14:56 +0000)]
Add support for string values with white spaces for ifconfig(8)
parameters accepting them (such as description, group).

Changes discussed on freebsd-rc.

PR: conf/156675
Reported by: "Alexander V. Chernikov" <melifaro att ipfw ru>
Suggested by: hrs
Analyzed with: Alexander V. Chernikov via IRC
MFC after: 2 weeks

13 years agoTidy up a capabilities-related comment.
Jonathan Anderson [Fri, 24 Jun 2011 14:40:22 +0000 (14:40 +0000)]
Tidy up a capabilities-related comment.

This comment refers to an #ifdef that hasn't been merged [yet?]; remove it.

Approved by: rwatson

13 years agoFix another broken HT40 channel band reference.
Adrian Chadd [Fri, 24 Jun 2011 14:31:30 +0000 (14:31 +0000)]
Fix another broken HT40 channel band reference.

13 years agoTypo.
John Baldwin [Fri, 24 Jun 2011 13:58:56 +0000 (13:58 +0000)]
Typo.

13 years agoActually, if code had followed style(9), there would be less stupid errors
Gleb Smirnoff [Fri, 24 Jun 2011 12:55:16 +0000 (12:55 +0000)]
Actually, if code had followed style(9), there would be less stupid errors
like the one fixed in r223416.

Noticed by: julian

13 years agoMore incorrect HT/40 setups in FCC.
Adrian Chadd [Fri, 24 Jun 2011 12:50:18 +0000 (12:50 +0000)]
More incorrect HT/40 setups in FCC.

Noticed-by: bschmidt@

13 years agoFix an incorrect frequency band for HT/40 in the FCC SKU.
Adrian Chadd [Fri, 24 Jun 2011 12:31:36 +0000 (12:31 +0000)]
Fix an incorrect frequency band for HT/40 in the FCC SKU.

Noticed by: bschmidt@

13 years agoImport one of the two missing US FCC DFS bands to FCC3.
Adrian Chadd [Fri, 24 Jun 2011 12:30:43 +0000 (12:30 +0000)]
Import one of the two missing US FCC DFS bands to FCC3.

The FCC opened up this band sometime in 2009 (and ath was updated);
but regdomain.xml wasn't updated.

13 years ago- Add two new API's to libusb20 which can be used to retrive information
Hans Petter Selasky [Fri, 24 Jun 2011 11:14:09 +0000 (11:14 +0000)]
- Add two new API's to libusb20 which can be used to retrive information
about the parent USB device:
  - libusb20_dev_get_parent_address
  - libusb20_dev_get_parent_port

- Rename libusb20_compat01.c into libusb01.c

MFC after: 3 days

13 years agoRemove duplicated header files
Kevin Lo [Fri, 24 Jun 2011 07:29:04 +0000 (07:29 +0000)]
Remove duplicated header files

13 years agoRemove duplicated header files
Kevin Lo [Fri, 24 Jun 2011 07:18:44 +0000 (07:18 +0000)]
Remove duplicated header files

13 years agoRemove duplicated header files
Kevin Lo [Fri, 24 Jun 2011 07:05:20 +0000 (07:05 +0000)]
Remove duplicated header files

13 years agoAcknowledge Edwin Groothuis for the major rewrite he
Craig Rodrigues [Fri, 24 Jun 2011 05:41:38 +0000 (05:41 +0000)]
Acknowledge Edwin Groothuis for the major rewrite he
did of the tftpd and tftp code to support TFTP blocksize.

13 years ago- Make sure we don't match the wrong device by adding
Hans Petter Selasky [Fri, 24 Jun 2011 04:35:58 +0000 (04:35 +0000)]
- Make sure we don't match the wrong device by adding
a match for the bus the device belongs to.

PR: misc/157903
MFC after: 14 days

13 years ago- Add additional information to the PnP info of USB HUBs children which
Hans Petter Selasky [Fri, 24 Jun 2011 04:16:06 +0000 (04:16 +0000)]
- Add additional information to the PnP info of USB HUBs children which
  is now required by bus_autoconf.
- Allow interface class matching even if device class is vendor specific.
- Update bus_autoconf tool to not generate system and subsystem match lines
  for the nomatch event.

PR: misc/157903
MFC after: 14 days

13 years agoFixes to newer tftp code in libstand:
Craig Rodrigues [Fri, 24 Jun 2011 03:50:54 +0000 (03:50 +0000)]
Fixes to newer tftp code in libstand:
 (1) Coding style changes.
 (2) If the server does not acknowledge any blocksize option,
     revert to the default blocksize of 512 bytes.
 (3) Send ACK if the first packet happens to be the last packet.
 (4) Do not accept blocksize greater than what was requested.
 (5) Drop any unwanted OACK received if a tftp transfer is already
     in progress.
 (6) Terminate incomplete transfers with a special no-error ERROR packet.
     Otherwise we rely on the tftp server to time out, which it does
     eventually, after re-sending the last packet several times and spamming
     the system log about it every time.  This idea is borrowed from the
     PXE client, which does exactly that.

Submitted by:  Alexander Kabaev <kan@FreeBSD.org>
Reviewed and Tested by: Santhanakrishnan Balraj <sbalraj at juniper dot net>

13 years agoBring back synchnet() implementation from older
Craig Rodrigues [Fri, 24 Jun 2011 02:56:24 +0000 (02:56 +0000)]
Bring back synchnet() implementation from older
tftp implementation.  The synchnet() function
was converted to a no-op when the new TFTP implementation
was committed to FreeBSD.  However, this function, as it was
in the older code, is needed
in order to synchronize between the tftpd server and tftp clients,
which may be buggy.

Specifically, we had a buggy TFTP client which would send
TFTP ACK packets for non-TFTP packets, which would cause
the count of packets to get out of whack, causing transfers
to fail with the new TFTPD implementation.

Obtained from:  Juniper Networks
Submitted by: Santhanakrishnan Balraj <sbalraj at juniper dot net>

13 years ago- Move all USB device ID arrays into so-called sections,
Hans Petter Selasky [Fri, 24 Jun 2011 02:30:02 +0000 (02:30 +0000)]
- Move all USB device ID arrays into so-called sections,
  sorted according to the mode which they support:
host, device or dual mode
- Add generic tool to extract these data:
tools/bus_autoconf

Discussed with: imp
Suggested by: Robert Millan <rmh@debian.org>
PR: misc/157903
MFC after: 14 days

13 years agoUse the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64)
Nathan Whitehorn [Thu, 23 Jun 2011 22:21:28 +0000 (22:21 +0000)]
Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64)
instead of a PCPU field for curthread. This averts a race on SMP systems
with a high interrupt rate where the thread looking up the value of
curthread could be preempted and migrated between obtaining the PCPU
pointer and reading the value of pc_curthread, resulting in curthread being
observed to be the current thread on the thread's original CPU. This played
merry havoc with the system, in particular with mutexes. Many thanks to
jhb for helping me work this one out.

Note that Book-E is in principle susceptible to the same problem, but has
not been modified yet due to lack of Book-E hardware.

MFC after: 2 weeks

13 years agoMake GNU as recognize the ARM 'rrx' mnemonic, which can be generated by
Dimitry Andric [Thu, 23 Jun 2011 20:54:44 +0000 (20:54 +0000)]
Make GNU as recognize the ARM 'rrx' mnemonic, which can be generated by
clang for certain expressions.  Code taken from Apple cctools (GPLv2).

Submitted by: damjan.marion@gmail.com

13 years agoFix make buildworld -DMODULES_WITH_WORLD
Ulrich Spörlein [Thu, 23 Jun 2011 20:31:52 +0000 (20:31 +0000)]
Fix make buildworld -DMODULES_WITH_WORLD
Sort opt_ srcs

13 years agoPut back the global for rx processing due to popular demand.
Jack F Vogel [Thu, 23 Jun 2011 17:42:27 +0000 (17:42 +0000)]
Put back the global for rx processing due to popular demand.

13 years agoClear any outstanding atomic reservations when traps are taken. This fixes
Nathan Whitehorn [Thu, 23 Jun 2011 16:34:41 +0000 (16:34 +0000)]
Clear any outstanding atomic reservations when traps are taken. This fixes
some interesting bugs (mostly on SMP systems) with atomic operations
silently failing in interrupt heavy situations, especially when using
overflow pages.

13 years agoUnblock the outgoing thread after we performed pmap_switch() to
Marcel Moolenaar [Thu, 23 Jun 2011 16:21:43 +0000 (16:21 +0000)]
Unblock the outgoing thread after we performed pmap_switch() to
switch the region registers. pmap_switch() returns the pmap for
which the region register are currently programmed, which needs
to be re-programmed on the CPU the ougoing thread gets switched
in.  This change does not noticibly change anything or fix known
bugs, but does give me a warm fuzzy feeling by being more
correct.

13 years agoThe recent change to increase the zfsboot size to 64k made a few BIOSes
John Baldwin [Thu, 23 Jun 2011 15:53:17 +0000 (15:53 +0000)]
The recent change to increase the zfsboot size to 64k made a few BIOSes
unhappy (probably they don't handle crossing the 64k boundary, etc.).
Fix this by changing zfsldr to use a loop reading from the disk one
sector at a time.  To avoid trashing the saved copy of the MBR which is
used for disk I/O, read zfsboot2 at address 0x9000.  This has the
advantage that BTX no longer needs to be relocated as it is read into
the correct location.  However, the loop to relocate zfsboot2.bin can
now cross a 64k boundary, so change it to use relative segments instead.
(This will need further work if zfsboot2.bin ever exceeds 64k.)

While here, stop storing a relocated copy of zfsldr at 0x700.  This was
only used by the xread hack which has recently been removed (and even
that use was dubious).  Also, include the BIOS error code as hex when
reporting read errors to aid in debugging.

Much thanks to Henri Hennebert for patiently testing various iterations
of the patch as well as fixing the zfsboot2.bin relocation to use
relative segments.

MFC after: 1 week

13 years agoFix ATAPI breakage introduced by r223443. It made SCSI commands to ATAPI
Alexander Motin [Thu, 23 Jun 2011 15:10:44 +0000 (15:10 +0000)]
Fix ATAPI breakage introduced by r223443. It made SCSI commands to ATAPI
device to never complete, that caused probe process (system boot) stuck.

13 years agoadd missing #define for the non-debug case.
Adrian Chadd [Thu, 23 Jun 2011 12:11:43 +0000 (12:11 +0000)]
add missing #define for the non-debug case.

13 years agoDocument that autoSrcAddr isn't re-enabled on NGM_SHUTDOWN.
Gleb Smirnoff [Thu, 23 Jun 2011 10:43:36 +0000 (10:43 +0000)]
Document that autoSrcAddr isn't re-enabled on NGM_SHUTDOWN.

Submitted by: Vadim Goncharov <vadim_nuclight mail.ru>

13 years ago- Add some comments about the origin of some USB descriptors.
Hans Petter Selasky [Thu, 23 Jun 2011 10:35:45 +0000 (10:35 +0000)]
- Add some comments about the origin of some USB descriptors.

MFC after: 7 days

13 years agoFix merge typo.
Andreas Tobler [Thu, 23 Jun 2011 09:46:12 +0000 (09:46 +0000)]
Fix merge typo.

13 years agoAdd leading zeros when printing the stackframe on __powerpc64__.
Andreas Tobler [Thu, 23 Jun 2011 09:43:53 +0000 (09:43 +0000)]
Add leading zeros when printing the stackframe on __powerpc64__.

13 years agoBe consistent with r160968: keep autoSrcAddr flag untouched when
Gleb Smirnoff [Thu, 23 Jun 2011 09:42:41 +0000 (09:42 +0000)]
Be consistent with r160968: keep autoSrcAddr flag untouched when
node receives NGM_SHUTDOWN.

Submitted by: pluknet

13 years ago- Add more USB templates for various USB device classes
Hans Petter Selasky [Thu, 23 Jun 2011 07:54:03 +0000 (07:54 +0000)]
- Add more USB templates for various USB device classes
- Add basic template support for USB 3.0
- Export definition of template sysctl numbers through usb_ioctl.h

MFC after: 7 days

13 years agoRe-introduce a global ath_hal_debug again for now, whilst I figure out what
Adrian Chadd [Thu, 23 Jun 2011 06:55:29 +0000 (06:55 +0000)]
Re-introduce a global ath_hal_debug again for now, whilst I figure out what
to do about the few cases where the HAL state isn't available (regdomain)
or isn't yet setup (probe/attach.)

The global ath_hal_debug now affects all instances of the HAL.

This also restores the ability for probe/attach debugging to work; as
the sysctl tree may not be attached at that point. Users can just set
the global "hw.ath.hal.debug" to a suitable value to enable probe/attach
related debugging.

13 years agoFix indenting issues introduced by the previous commit.
Adrian Chadd [Thu, 23 Jun 2011 06:53:13 +0000 (06:53 +0000)]
Fix indenting issues introduced by the previous commit.

13 years agoRevert to using the page queues lock in vm_page_clear_dirty_mask() on
Alan Cox [Thu, 23 Jun 2011 05:23:59 +0000 (05:23 +0000)]
Revert to using the page queues lock in vm_page_clear_dirty_mask() on
MIPS.  (At present, although atomic_clear_char() is defined by atomic.h
on MIPS, it is not actually implemented by support.S.)

13 years agoUse atomic operations to mask and unmask IRQs. This prevents a problem
Nathan Whitehorn [Thu, 23 Jun 2011 04:35:45 +0000 (04:35 +0000)]
Use atomic operations to mask and unmask IRQs. This prevents a problem
(obvious in retrospect) in which interrupts on one CPU that are temporarily
masked can end up permanently masked when a handler on another CPU clobbers
the interrupt mask register with an old copy.

13 years agoUse 4 KB pages for storage bus devices, which seems to be what the HV uses
Nathan Whitehorn [Thu, 23 Jun 2011 04:06:33 +0000 (04:06 +0000)]
Use 4 KB pages for storage bus devices, which seems to be what the HV uses
internally.

13 years agoRework the PS3 disk driver to support NCQ and do its DMA a little
Nathan Whitehorn [Thu, 23 Jun 2011 03:37:25 +0000 (03:37 +0000)]
Rework the PS3 disk driver to support NCQ and do its DMA a little
differently.

13 years agoAdd hypervisor call error codes.
Nathan Whitehorn [Thu, 23 Jun 2011 03:20:11 +0000 (03:20 +0000)]
Add hypervisor call error codes.

13 years agoBreak out most of the HAL related tweaks into a per-HAL instance,
Adrian Chadd [Thu, 23 Jun 2011 02:38:36 +0000 (02:38 +0000)]
Break out most of the HAL related tweaks into a per-HAL instance,
rather than global variables.

This specifically allows for debugging to be enabled per-NIC, rather
than globally.

Since the ath driver doesn't know about AH_DEBUG, and to keep the ABI
consistent regardless of whether AH_DEBUG is enabled or not, enable the
debug parameter always but only conditionally compile in the debug
methods if needed.

The ALQ support is currently still global pending some brainstorming.

Submitted by: ssgriffonuser@gmail.com
Reviewed by: adrian, bschmidt

13 years agoBump &release.manpath.*;.
Hiroki Sato [Thu, 23 Jun 2011 02:38:06 +0000 (02:38 +0000)]
Bump &release.manpath.*;.

13 years agoRemove links to mirrorlist.FreeBSD.org.
Hiroki Sato [Thu, 23 Jun 2011 02:35:55 +0000 (02:35 +0000)]
Remove links to mirrorlist.FreeBSD.org.

Submitted by: ryusuke
Reported by: gavin, brucec

13 years agoUpdate references to RFC's that the newer TFTP implementation supports.
Craig Rodrigues [Wed, 22 Jun 2011 23:26:04 +0000 (23:26 +0000)]
Update references to RFC's that the newer TFTP implementation supports.

13 years agoUpdate references to RFC's that the newer TFTP implementation supports.
Craig Rodrigues [Wed, 22 Jun 2011 23:25:24 +0000 (23:25 +0000)]
Update references to RFC's that the newer TFTP implementation supports.

13 years agoFix build on ia64 after r223426.
Jung-uk Kim [Wed, 22 Jun 2011 22:56:42 +0000 (22:56 +0000)]
Fix build on ia64 after r223426.

13 years agoReturn CAM_REQ_INVALID if the SCSI XPT receives an unsupported operation
Will Andrews [Wed, 22 Jun 2011 22:55:51 +0000 (22:55 +0000)]
Return CAM_REQ_INVALID if the SCSI XPT receives an unsupported operation
via the XPT_DEV_ADVINFO CCB.

Reviewed by: ken

13 years agoBump date.
Craig Rodrigues [Wed, 22 Jun 2011 22:55:51 +0000 (22:55 +0000)]
Bump date.
Document the following commands which were added in the new TFTP implementation:
blocksize, blocksize2, packetdrop, options, rollover

13 years agoUse USB_VENDOR_OVISLINK define rather than the vendor ID.
Gavin Atkinson [Wed, 22 Jun 2011 22:08:55 +0000 (22:08 +0000)]
Use USB_VENDOR_OVISLINK define rather than the vendor ID.

PR: usb/158142
Submitted by: Robert Millan <rmh debian.org>
MFC after: 1 week