Commit Graph

74880 Commits

Author SHA1 Message Date
Nathan Whitehorn
a0b72790e4 MFC r204129:
Enable NETIF_OPEN_CLOSE_ONCE on PowerPC OFW. This fixes netbooting on
PowerPC Book-S hardware, which had been broken for a very long time.

Submitted by:	Andreas Tobler
2010-03-01 00:35:30 +00:00
Joerg Wunsch
27a98ec529 MFC r203360
GPIB overhaul, part #2: make the tnt4882 driver work with the newer
  TNT5004 IC.  This involved a major rewrite of a number of things, as
  this chip no longer supports the NAT7210 legacy mode but requires the
  host to use the (more modern) FIFO mode.

  In theory, this also ought to work on the older TNT4882C chip.  I'll
  probably add this as optional support (perhaps by a device.hints flag)
  later on.  By now, FIFO mode is *only* activates iff a TNT5004 chip
  has been detected (where the old code didn't work at all), while
  everything else is supposed to use the old code.
2010-02-28 22:25:39 +00:00
Andriy Gapon
0445c84e45 MFC r203546: acpi_cpu: prefer _OSC over _PDC 2010-02-28 21:43:47 +00:00
Andriy Gapon
9478f3990b MFC r203430: acpi_cpu: correct capabilities arguments for Processor _OSC 2010-02-28 21:30:46 +00:00
Andriy Gapon
932a288f19 MFC r203061: KASSERT contract of return value of interrupt filter
X-MFCto7 after:	1 week
2010-02-28 21:28:24 +00:00
Matt Jacob
c5fc7d9644 MFC of 204384: Fix misallocation error in target mode 2010-02-28 06:07:53 +00:00
Marcel Moolenaar
84a85a0662 MFC rev 204182:
Remove pm_active from struct pmap as it serves no purpose.
2010-02-28 01:25:12 +00:00
Konstantin Belousov
e623216f38 MFC r203827:
- Add idempotency guards so the structures can be used in other utilities.
- Update bpb structs with reserved fields.
- In direntry struct join deName with deExtension. Although a
  fix was attempted in the past, these fields were being overflowed,
  Now this is consistent with the spec, and we can now share the
  WinChksum code with NetBSD.
2010-02-27 16:51:23 +00:00
Ed Maste
6101f245fc MFC r204106:
Avoid corrupting the list or queue if _REMOVE is invoked with a
  reference to the head.

PR:		kern/119307
2010-02-27 03:47:22 +00:00
Kirk McKusick
4179ce18a2 MFC of 203763, 203764, 203768, 203769, 203770, 203782, and 203784.
These fixes correct a problem in the file system that treats large
inode numbers as negative rather than unsigned. For a default
(16K block) file system, this bug began to show up at a file system
size above about 16Tb.

These fixes also update newfs to ensure that it will never create a
filesystem with more than 2^32 inodes.

They also update libufs, tunefs, and growfs so that they properly
handle inode numbers as unsigned.

Reported by: Scott Burns, John Kilburg, and Bruce Evans
Followup by: Jeff Roberson
PR:          133980
2010-02-26 21:49:11 +00:00
Rui Paulo
9d8ea0c702 MFC r203695, r203751
Fix spelling mistake and compile error.
2010-02-26 20:25:30 +00:00
Rui Paulo
f5e8283aa9 MFC r203683:
Add multicast key search support. This fixes corrupted mcast packets
 when we have more than one hostap vap.
2010-02-26 18:46:16 +00:00
Xin LI
a5a931b33f MFC 203052:
Add interface description capability as inspired by OpenBSD.  Thanks for
rwatson@, jhb@, brooks@ and others for feedback to the old implementation!

Sponsored by:	iXsystems, Inc.
2010-02-26 00:54:47 +00:00
Jung-uk Kim
7cfd788d1a MFC: r204105
Return partially filled buffer for non-blocking read(2)
in non-immediate mode.

PR:		kern/143855
Submitted by:	Guy Harris (guy at alum dot mit dot edu)
2010-02-26 00:11:17 +00:00
Rafal Jaworowski
bca23f69fd MFC r204009
Assorted fixes for mge(4).

- Use proper map for the busdma sync on mge descriptor.
- Remove unnecesary busdma sync.
- Eliminate redundant locking in mge_reinit_rx() (just assert).
- Kill unused variable.

Submitted by:	Grzegorz Bernacki
Obtained from:	Semihalf
2010-02-25 13:28:05 +00:00
Konstantin Belousov
f407eeb3b4 MFC r204205:
Remove write-only variable.
2010-02-25 10:40:52 +00:00
Xin LI
a498e71df3 MFC r202964:
On FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc,
where the type is 32-bit.  ZFS can handle 64-bit timestamp internally
but zfs_setattr() would check if the time value can fit, we change the
checking macros to match 64-bit timestamp if the platform supports it.

This change has some downsides like, while you can import zfs on 32-bit
platforms, the timestamp would overflow if they are out of the range.

This fixes the Y2.038K issue on platforms using 64-bit timestamps.

Reviewed by:	pjd
2010-02-25 00:46:51 +00:00
Brooks Davis
3c48c0897f MFC r202143,202163,202341,202342,204278
Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
  kern.ngroups+1.  kern.ngroups can range from NGROUPS_MAX=1023 to
  somewhere in the neighborhood of INT_MAX/4 one a system with sufficent
  RAM and memory bandwidth.  Given that the Windows group limit is
  1024, this range should be sufficient for most applications

r202342:
  Only allocate the space we need before calling kern_getgroups instead
  of allocating what ever the user asks for up to "ngroups_max + 1".  On
  systems with large values of kern.ngroups this will be more efficient.

  The now redundant check that the array is large enough in
  kern_getgroups() is deliberate to allow this change to be merged to
  stable/8 without breaking potential third party consumers of the API.
2010-02-24 22:16:16 +00:00
Rafal Jaworowski
0bd1aed098 MFC r203924:
Call the proper linkup routine in PowerPC Book-E machdep.

Submitted by:	attilio
2010-02-24 20:20:02 +00:00
Pawel Jakub Dawidek
1b4509372f MFC r201684.
Teach the (gpt)zfsboot and zfsloader raidz code to use its buffers
more efficiently.

Before this patch, in the worst case memory use would increase
exponentially on the number of drives in the raidz vdev.

Submitted by:	Matt Reimer <mattjreimer@gmail.com>
Sponsored by:	VPOP Technologies, Inc.
Silence from:	dfr
2010-02-23 16:46:34 +00:00
Ed Maste
624e666b5d MFC r202812:
Add H55 ID from Mike Tancsa, with minor rewording from avg@.

PR:		kern/143068
Submitted by:	Mike Tancsa (Sentex)
2010-02-23 01:00:15 +00:00
Xin LI
d21288b029 MFC r203728:
- Return EAFNOSUPPORT instead of EINVAL for unsupported address family,
   this matches the Linux behavior.
 - Check if we have sufficient space allocated for socket structure, which
   fixes a buffer overflow when wrong length is being passed into the
   emulation layer. [1]

PR:		kern/138860
Submitted by:	Mateusz Guzik <mjguzik gmail com>
Reported by:	Alexander Best [1]
2010-02-23 00:40:02 +00:00
Xin LI
18148841f8 MFC r203533:
Remove two files that are not needed by FreeBSD.

Approved by:  pjd
2010-02-22 22:27:26 +00:00
Marius Strobl
c6bf5f18c0 - Factor out the code shared between NFS client and server into its own
module so it's not present twice.
- Move nfs_realign() from the NFS client to the shared NFS code and
  remove the NFS server version in order to reduce code duplication.
  The shared version now uses a second parameter how, which is passed
  on to m_get(9) and m_getcl(9) as the server used M_WAIT while the
  client requires M_DONTWAIT, and replaces the the previously unused
  parameter hsiz.
- Change nfs_realign() to use nfsm_aligned() so as with other NFS code
  the alignment check isn't actually performed on platforms without
  strict alignment requirements for performance reasons because as the
  comment suggests unaligned data only occasionally occurs with TCP.
- Change fha_extract_info() to use nfs_realign() with M_DONTWAIT rather
  than M_WAIT because it's called with the RPC sp_lock held.
2010-02-22 21:45:20 +00:00
Bernhard Schmidt
7eb2cc363d MFC r203673:
Ensure that tkip_mixing_phase1() is called after a rekeying event when
using plain s/w crypto.

PR:		bin/142547
Approved by:	rpaulo (mentor)
2010-02-22 17:10:47 +00:00
Konstantin Belousov
3588e7da23 MFC r203866:
Invalid filesystem might cause the bp to be never read.
2010-02-21 11:13:15 +00:00
Alan Cox
454947a618 MFC r203085
Optimize pmap_demote_pde() by using the new KPTmap to access a kernel
  page table page instead of creating a temporary mapping to it.

  Set the PG_G bit on the page table entries that implement the KPTmap.

  Locore initializes the unused portions of the NKPT kernel page table
  pages that it allocates to zero.  So, pmap_bootstrap() needn't zero
  the page table entries referenced by CMAP1 and CMAP3.

  Simplify pmap_set_pg().
2010-02-21 04:10:25 +00:00
Marcel Moolenaar
69b0137459 MFC rev 203883:
o   Eliminate IA64_PHYS_TO_RR6 by calling bus_space_map() or pmap_mapdev().
o   Implement bus_space_map() in terms of pmap_mapdev().
o   Have ia64_pib hold the uncached virtual address of the PIB.
2010-02-20 22:43:12 +00:00
Konstantin Belousov
fe5e746617 MFC r203826:
Use M_ZERO instead of calling bzero().
Fix function name in the comment.

MFC r203828:
Fix function name in the comment in the second location too.
2010-02-20 11:58:19 +00:00
Konstantin Belousov
bc6c9c912c MFC r203822:
Remove unused macros.
2010-02-20 11:54:18 +00:00
Konstantin Belousov
c84124c0d4 MFC r203818:
Clear the bp pointer when buffer is already brelse()d.
2010-02-20 11:50:50 +00:00
Alexander Motin
a510b78b19 MFC r200291, r203529:
Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes.
It gives those beasts additional 10% of write bandwidth.
Use new helper functions to do it.
2010-02-19 18:15:45 +00:00
Alexander Motin
210a19d014 MFC r203528:
Add pci_get|set_max_read_req() helper functions to control maximum PCIe
read request size.
2010-02-19 18:07:51 +00:00
Alexander Motin
c48c2a2389 MFC r203873:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.
2010-02-19 17:54:03 +00:00
Alexander Motin
04c9f4b6d0 MFC r203931:
Make CD driver a bit more robust and predictable to unreported errors.
2010-02-19 17:45:47 +00:00
Rick Macklem
3ed680d8da MFC: r203849
Change the default value for vfs.newnfs.enable_locallocks to 0 for
the experimental NFS server, since local locking is known to be
broken and the patch to fix it is still a work in progress.
2010-02-19 16:36:08 +00:00
Rick Macklem
3322939bbb MFC: r203848
This fixes the experimental NFS server so that it won't crash in the
caching code for IPv6 by fixing a typo that used the incorrect variable.
It also fixes the indentation of the statement above it.

Reported by:	simon AT comsys.ntu-kpi.kiev.ua
2010-02-18 16:23:13 +00:00
Rebecca Cran
dfbcd90790 MFC r203685:
Document the usfs driver and the NO_SYSCTL_DESCR option, and update the comment
for umass.
Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR
is used.

Approved by:	rrs (mentor)
2010-02-18 11:07:36 +00:00
Rebecca Cran
646b39536d MFC r203679:
Remove the usb2_input_kbd directive that was missed during the renaming of the
drivers in the usb2 stack.

Approved by:	rrs (mentor)
2010-02-18 11:03:35 +00:00
Rebecca Cran
82521c1509 MFC r203678:
Rename usb2_ structures and variables to usb_.

Approved by:	rrs (mentor)
2010-02-18 10:59:32 +00:00
Konstantin Belousov
f723d876b5 MFC r203875:
Do not leak process lock when current thread is not allowed to see target.
2010-02-17 09:03:38 +00:00
Xin LI
d1b9afd28a MFC r203408:
Prevent NULL deference by checking return value of
gctl_get_asciiparam.
2010-02-16 06:34:44 +00:00
Rafal Jaworowski
a911d19dfe MFC r203637:
Improve checking whether an ARM VA has a valid mapping before performing cache
sync.

VIPT/PIPT caches need valid VA-PA mapping in PTE for a cache operation to
succeed (unlike VIVT). Prior to this fix pmap was using l2pte_valid() for that
check, but this is not sufficient as the function merely checks if a PTE
exists (there can be existing but _invalid_ entries in the table).

A new pmap_has_valid_mapping() routine is introduced to do this job right by
checking proper PTE flags.

Among other potential problems this cures coherency issues with L2 caches on
MV-78100.

Submitted by:	Grzegorz Bernacki, Piotr Ziecik
Reviewed, tested by:	marcel
Obtained from:	Semihalf
2010-02-15 15:00:40 +00:00
Alexander Motin
877380223f MFC r203426:
Disable PHY of unconnected ports when interface power management enabled.
It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M).
2010-02-14 20:00:21 +00:00
Alexander Motin
3e2fbfe5e6 MFC r203165:
Reset port on disconnect event, to abort any running requests.
2010-02-14 19:59:06 +00:00
Alexander Motin
0129e5cf7a MFC r203123:
Add FIS-based switching support. If controller supports FBS, it allows
several devices beyond Port Multiplier to work simultaneously, substantially
increasing performance.
2010-02-14 19:57:54 +00:00
Alexander Motin
ee22e37df5 MFC r203449:
Implement poll method for atapicam.
It is not perfect, but better then nothing.
2010-02-14 19:56:42 +00:00
Alexander Motin
34cbb135e7 MFC r203347:
NetCell is a PCI hardware RAID without cable and mode setting.
2010-02-14 19:55:41 +00:00
Alexander Motin
dd96528dec MFC r203525:
Report SATA300 chips also as SATA.
2010-02-14 19:54:16 +00:00
Alexander Motin
d2846ca800 MFC r203445:
Report to CAM unit number of underlying ataX bus device, instead of this
atapicamX. It is more apropriate and useful together with "ata" name.
2010-02-14 19:53:09 +00:00