Commit Graph

164374 Commits

Author SHA1 Message Date
Hans Petter Selasky
160d9dc32b - 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
2011-06-24 04:35:58 +00:00
Hans Petter Selasky
e71c21385e - 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
2011-06-24 04:16:06 +00:00
Craig Rodrigues
23a5bce73f 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>
2011-06-24 03:50:54 +00:00
Craig Rodrigues
14de21443e 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>
2011-06-24 02:56:24 +00:00
Hans Petter Selasky
f1a16106b6 - 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
2011-06-24 02:30:02 +00:00
Nathan Whitehorn
e69dff491d 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
2011-06-23 22:21:28 +00:00
Dimitry Andric
6a4ba2279d 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
2011-06-23 20:54:44 +00:00
Ulrich Spörlein
898dec7830 Fix make buildworld -DMODULES_WITH_WORLD
Sort opt_ srcs
2011-06-23 20:31:52 +00:00
Jack F Vogel
61cf9896b6 Put back the global for rx processing due to popular demand. 2011-06-23 17:42:27 +00:00
Nathan Whitehorn
045aee08f3 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.
2011-06-23 16:34:41 +00:00
Marcel Moolenaar
ded49c2eae 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.
2011-06-23 16:21:43 +00:00
John Baldwin
e1b4a23921 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
2011-06-23 15:53:17 +00:00
Alexander Motin
ee2b236b98 Fix ATAPI breakage introduced by r223443. It made SCSI commands to ATAPI
device to never complete, that caused probe process (system boot) stuck.
2011-06-23 15:10:44 +00:00
Adrian Chadd
dc6ebb1bca add missing #define for the non-debug case. 2011-06-23 12:11:43 +00:00
Gleb Smirnoff
79ddde082a Document that autoSrcAddr isn't re-enabled on NGM_SHUTDOWN.
Submitted by:	Vadim Goncharov <vadim_nuclight mail.ru>
2011-06-23 10:43:36 +00:00
Hans Petter Selasky
df142785d5 - Add some comments about the origin of some USB descriptors.
MFC after:	7 days
2011-06-23 10:35:45 +00:00
Andreas Tobler
dcf496e844 Fix merge typo. 2011-06-23 09:46:12 +00:00
Andreas Tobler
f7688a4194 Add leading zeros when printing the stackframe on __powerpc64__. 2011-06-23 09:43:53 +00:00
Gleb Smirnoff
cd5bdbcb4d Be consistent with r160968: keep autoSrcAddr flag untouched when
node receives NGM_SHUTDOWN.

Submitted by:	pluknet
2011-06-23 09:42:41 +00:00
Hans Petter Selasky
399e6543b2 - 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
2011-06-23 07:54:03 +00:00
Adrian Chadd
f6f1dfb66b 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.
2011-06-23 06:55:29 +00:00
Adrian Chadd
4c728c42f5 Fix indenting issues introduced by the previous commit. 2011-06-23 06:53:13 +00:00
Alan Cox
1bfec3dfb6 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.)
2011-06-23 05:23:59 +00:00
Nathan Whitehorn
f574af0d6d 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.
2011-06-23 04:35:45 +00:00
Nathan Whitehorn
1c167648c9 Use 4 KB pages for storage bus devices, which seems to be what the HV uses
internally.
2011-06-23 04:06:33 +00:00
Nathan Whitehorn
98934b1fd5 Rework the PS3 disk driver to support NCQ and do its DMA a little
differently.
2011-06-23 03:37:25 +00:00
Nathan Whitehorn
67de2cd330 Add hypervisor call error codes. 2011-06-23 03:20:11 +00:00
Adrian Chadd
37931a3544 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
2011-06-23 02:38:36 +00:00
Hiroki Sato
7d4c35c817 Bump &release.manpath.*;. 2011-06-23 02:38:06 +00:00
Hiroki Sato
97a9e26dd8 Remove links to mirrorlist.FreeBSD.org.
Submitted by:	ryusuke
Reported by:	gavin, brucec
2011-06-23 02:35:55 +00:00
Craig Rodrigues
fcaab598e0 Update references to RFC's that the newer TFTP implementation supports. 2011-06-22 23:26:04 +00:00
Craig Rodrigues
957af43f83 Update references to RFC's that the newer TFTP implementation supports. 2011-06-22 23:25:24 +00:00
Jung-uk Kim
624a5cc87e Fix build on ia64 after r223426. 2011-06-22 22:56:42 +00:00
Will Andrews
4c42b949e9 Return CAM_REQ_INVALID if the SCSI XPT receives an unsupported operation
via the XPT_DEV_ADVINFO CCB.

Reviewed by:	ken
2011-06-22 22:55:51 +00:00
Craig Rodrigues
b68628c826 Bump date.
Document the following commands which were added in the new TFTP implementation:
blocksize, blocksize2, packetdrop, options, rollover
2011-06-22 22:55:51 +00:00
Gavin Atkinson
95db0bf798 Use USB_VENDOR_OVISLINK define rather than the vendor ID.
PR:		usb/158142
Submitted by:	Robert Millan <rmh debian.org>
MFC after:	1 week
2011-06-22 22:08:55 +00:00
Craig Rodrigues
7e321ae384 Fix typo.
Reported by: Nick Mann <njm at njm dot me dot uk>
2011-06-22 22:05:37 +00:00
Craig Rodrigues
a1aea88a5c Clarify tftpd's -d flag in the new TFTP implementation.
Bump date.
2011-06-22 21:53:45 +00:00
Will Andrews
14f900e2cd Plumb support for the device advanced information CCB in the ATA XPT.
This was previously done only for SCSI XPT in r223081, on which the change
in r223089 depended in order to respond to serial number requests.  As a
result of r223089, da(4) and ada(4) devices register a d_getattr for geom to
use to obtain the information.

Reported by:	ache
Reviewed by:	ken
2011-06-22 21:43:10 +00:00
Rick Macklem
7bb55def77 Plug an mbuf leak in the new NFS client that occurred when a
server replied NFS3ERR_JUKEBOX/NFS4ERR_DELAY to an rpc.
This affected both NFSv3 and NFSv4. Found during testing
at the recent NFSv4 interoperability Bakeathon.

MFC after:	2 weeks
2011-06-22 21:10:12 +00:00
John Baldwin
1368987ae4 Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to
the x86 tree.  The $PIR code is still only enabled on i386 and not amd64.
While here, make the qpi(4) driver on conditional on 'device pci'.
2011-06-22 21:04:13 +00:00
Andrey V. Elsukov
0511675327 Export AddLink() function from libalias. It can be used when custom
alias address needs to be specified.
Add inbound handler to the alias_ftp module. It helps handle active
FTP transfer mode for the case with external clients and FTP server behind
NAT. Fix passive FTP transfer case for server behind NAT using redirect with
external IP address different from NAT ip address.

PR:		kern/157957
Submitted by:	Alexander V. Chernikov
2011-06-22 20:00:27 +00:00
Rick Macklem
72b7c8ddb1 Fix the new NFSv4 client so that it uses the same uid as
was used for doing a mount when performing system operations
on AUTH_SYS mounts.  This resolved an issue when mounting
a Linux server. Found during testing at the recent
NFSv4 interoperability Bakeathon.

MFC after:	2 weeks
2011-06-22 19:47:45 +00:00
Edward Tomasz Napierala
e81b1c7129 Add LOGIN_SETCPUMASK and LOGIN_SETLOGINCLASS to the setusercontext(3)
calls in ftpd(8).
2011-06-22 19:14:49 +00:00
John Baldwin
e8f40e32eb Oops, missed these in 223424.
Reported by:	jkim
2011-06-22 18:48:07 +00:00
Edward Tomasz Napierala
89d8548ce6 Advertise growfs(8) a little better. 2011-06-22 18:02:28 +00:00
Edward Tomasz Napierala
b2168df843 Cosmetic fixes; mostly s/file system/filesystem/g and removing weird indent
from messages.
2011-06-22 17:59:53 +00:00
John Baldwin
3bf59bd14f Use uintXX_t instead of u_intXX_t. 2011-06-22 17:55:16 +00:00
Jung-uk Kim
a49399a903 Set negative quality to TSC timecounter when C3 state is enabled for Intel
processors unless the invariant TSC bit of CPUID is set.  Intel processors
may stop incrementing TSC when DPSLP# pin is asserted, according to Intel
processor manuals, i. e., TSC timecounter is useless if the processor can
enter deep sleep state (C3/C4).  This problem was accidentally uncovered by
r222869, which increased timecounter quality of P-state invariant TSC, e.g.,
for Core2 Duo T5870 (Family 6, Model f) and Atom N270 (Family 6, Model 1c).

Reported by:	Fabian Keil (freebsd-listen at fabiankeil dot de)
		Ian FREISLICH (ianf at clue dot co dot za)
Tested by:	Fabian Keil (freebsd-listen at fabiankeil dot de)
		- Core2 Duo T5870 (C3 state available/enabled)
		jkim - Xeon X5150 (C3 state unavailable)
2011-06-22 16:40:45 +00:00
John Baldwin
38d7a61ba4 Add a helper routine to conditionally modify the start address of a
resource allocation from an x86 Host-PCI bridge driver so that it can be
reused by the ACPI Host-PCI bridge driver (and eventually the MPTable
Host-PCI bridge driver) instead of duplicating the same logic.  Note that
this means that hw.acpi.host_mem_start is now replaced with the
hw.pci.host_mem_start tunable that was already used in the non-ACPI case.
This also removes hw.acpi.host_mem_start on ia64 where it was not
applicable (the implementation was very x86-specific).

While here, adjust the logic to apply the new start address on any
"wildcard" allocation even if that allocation comes from a subset of
the allowable address range.

Reviewed by:	imp (1)
2011-06-22 16:15:15 +00:00