aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Commit the support for removing cpumask_t and replacing it directly withAttilio Rao2011-05-0548-544/+837
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno Notes: svn path=/projects/largeSMP/; revision=221499
* MFCAttilio Rao2011-05-0531-217/+1204
|\ | | | | | | Notes: svn path=/projects/largeSMP/; revision=221495
| * Add nvram2env (untested) and geom_map (tested) to PB92.Adrian Chadd2011-05-052-15/+83
| | | | | | | | Notes: svn path=/head/; revision=221489
| * Don't perform NF calibration for radio chains which aren't in use:Adrian Chadd2011-05-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting the ath9k commit message: At present the noise floor calibration is processed in supported control and extension chains rather than required chains. Unnccesarily doing nfcal in all supported chains leads to invalid nf readings on extn chains and these invalid values got updated into history buffer. While loading those values from history buffer is moving the chip to deaf state. This issue was observed in AR9002/AR9003 chips while doing associate/dissociate in HT40 mode and interface up/down in iterative manner. After some iterations, the chip was moved to deaf state. Somehow the pci devices are recovered by poll work after chip reset. Raading the nf values in all supported extension chains when the hw is not yet configured in HT40 mode results invalid values. Reference: https://patchwork.kernel.org/patch/753862/ Obtained from: Linux ath9k Notes: svn path=/head/; revision=221488
| * Another Howl (AR9130) fix.Adrian Chadd2011-05-051-1/+1
| | | | | | | | | | | | | | | | | | I haven't seen a 5ghz AR9130 based board yet though! Obtained from: Atheros Notes: svn path=/head/; revision=221483
| * Fix up the chipset checks for the AR5416 and later silicon.Adrian Chadd2011-05-051-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The checks should function as follows: * AR_SREV_<silicon> : check macVersion matches that version id * AR_SREV_<silicon>_<revision> : check macVersion and macRevision match the version / revision respectively * AR_SREV_<silicon>_<revision>_OR_LATER: check that + if the chip silicon version == macVersion, enforce revision >= macRevision + if the chip silicon version > macVersion, allow it. For example, AR_SREV_MERLIN() only matches AR9280 (any revision), AR_SREV_MERLIN_10() would only match AR9280 version 1.0, but AR_SREV_MERLIN_20_OR_LATER() matches AR9280 version >= 2.0 _AND_ any subsequent MAC (So AR9285, AR9287, etc.) The specific fixes which may impact users: * if there is Merlin hardware > revision 2.0, it'll now be correctly matched by AR_SREV_MERLIN_20_OR_LATER() - the older code simply would match on either Merlin 2.0 or a subsequent MAC (AR9285, AR9287, etc.) * Kite version 1.1/1.2 should now correctly match. As these macros are used in the AR9285 reset/attach path, and it's assumed that the hardware is kite anyway, the behaviour shouldn't change. It'll only change if these macros are used in other codepaths shared with older silicon. Obtained from: Linux ath9k, Atheros Notes: svn path=/head/; revision=221480
| * Import some HOWL (AR9130) related fixes from Atheros.Adrian Chadd2011-05-052-2/+30
| | | | | | | | | | | | | | Obtained from: Atheros Notes: svn path=/head/; revision=221479
| * T4 packet timestamps.Navdeep Parhar2011-05-052-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reference code that shows how to get a packet's timestamp out of cxgbe(4). Disabled by default because we don't have a standard way today to pass this information up the stack. The timestamp is 60 bits wide and each increment represents 1 tick of the T4's core clock. As an example, the timestamp granularity is ~4.4ns for this card: # sysctl dev.t4nex.0.core_clock dev.t4nex.0.core_clock: 228125 MFC after: 1 week Notes: svn path=/head/; revision=221477
| * Guard ptrdiff_t.David E. O'Brien2011-05-051-0/+3
| | | | | | | | Notes: svn path=/head/; revision=221476
| * T4 packet filtering/steering.Navdeep Parhar2011-05-054-4/+671
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Enable 5-tuple and every-packet lookup. - Setup the default filter mode to allow filtering/steering based on IP protocol, ingress port, inner VLAN ID, IP frag, FCoE, and MPS match type; all combined together. You can also filter based on MAC index, Ethernet type, IP TOS/IPv6 Traffic Class, and outer VLAN ID but you'll have to modify the default filter mode and exclude some of the match-fields in it. IPv4 and IPv6 SIP/DIP/SPORT/DPORT are always available in all filter rules. - Add driver ioctls to get/set the global filter mode. - Add driver ioctls to program and delete hardware filters. A couple of the "switch" actions that rewrite Ethernet and VLAN information and switch the packet out of another port may not work as the L2 code is not yet in place. Everything else, including all "drop" and "pass" rules with RSS or absolute qid, should work. Obtained from: Chelsio Communications Notes: svn path=/head/; revision=221474
| * Modify the NFS nfssvc(2) syscall so that it allowsRick Macklem2011-05-051-3/+6
| | | | | | | | | | | | | | | | | | anyone to get the statistics for the new NFS subsystem. MFC after: 2 weeks Notes: svn path=/head/; revision=221473
| * Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'mPyun YongHyeon2011-05-053-8/+8
| | | | | | | | | | | | | | | | here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs. Notes: svn path=/head/; revision=221468
| * Fix the new NFS client so that it handles the 64bit fieldsRick Macklem2011-05-051-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | that are now in "struct statfs" for NFSv3 and NFSv4. Since the ffiles value is uint64_t on the wire, I clip the value to INT64_MAX to avoid setting f_ffree negative. Tested by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=221467
| * Always re-arm an iq's interrupt before leaving the handler.Navdeep Parhar2011-05-041-10/+4
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221464
| * Add a comment noting that the NFS code assumes that theRick Macklem2011-05-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | values of error numbers in sys/errno.h will be the same as the ones specified by the NFS RFCs and that the code needs to be fixed if error numbers are changed in sys/errno.h. Suggested by: Peter Jeremy MFC after: 2 weeks Notes: svn path=/head/; revision=221462
| * Implement Resource Pooling V2 and an MPTCP like congestionMichael Tuexen2011-05-044-30/+217
| | | | | | | | | | | | | | | | | | | | control. Based on a patch received from Martin Becke. MFC after: 2 weeks. Notes: svn path=/head/; revision=221460
| * Remove unneeded code.Andrey V. Elsukov2011-05-041-30/+4
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221453
| * Remove unneeded code.Andrey V. Elsukov2011-05-041-14/+0
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221452
| * Remove unneeded code.Andrey V. Elsukov2011-05-041-28/+7
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221451
| * Removed KASSERT, g_new_providerf() can not fail.Andrey V. Elsukov2011-05-041-1/+0
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221449
| * Remove "for a moment" assignment. struct g_geom zeroed when allocated.Andrey V. Elsukov2011-05-044-8/+0
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221447
| * Remove unneeded checks, g_new_xxx functions can not fail.Andrey V. Elsukov2011-05-041-31/+6
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221446
| * Add initial BCM57765 family support. The BCM57765 family seems toPyun YongHyeon2011-05-042-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | have similar hardware features of BCM5718 family except the number of receive return ring is 4. The BCM57765 family is known to support IEEE 802.3az EEE(Energy Efficient Ethernet) but this change does not include EEE support code. I hope EEE is implemented in near future. This change will support BCM57761, BCM57765, BCM57781, BCM57785, BCM57791 and BCM57795. All hardware offloading features are supported and suspend/resume also should work. Many thanks to Broadcom for continuing support of FreeBSD. Tested by: Paul Thornton (prt <> prt dot org) HW donated by: Broadcom Notes: svn path=/head/; revision=221445
* | Revert md_assert_preempt() introduction.Attilio Rao2011-05-045-50/+0
| | | | | | | | | | | | | | Discussed with: jeff, jhb Notes: svn path=/projects/largeSMP/; revision=221459
* | MFCAttilio Rao2011-05-04103-1746/+3014
|\| | | | | | | Notes: svn path=/projects/largeSMP/; revision=221444
| * Revert by accident r221441.Attilio Rao2011-05-041-54/+0
| | | | | | | | Notes: svn path=/head/; revision=221442
| * Remove the previously added comment.Attilio Rao2011-05-041-0/+54
| | | | | | | | | | | | | | | | Probabilly me is the only one who didn't know userland and kerneland sizes were mismatching. Notes: svn path=/head/; revision=221441
| * Add kernel support for NFSSVC_ZEROCLTSTATS and NFSSVC_ZEROSRVSTATSRick Macklem2011-05-042-0/+60
| | | | | | | | | | | | | | | | | | | | so that they can be used by nfsstat(1) to implement the "-z" option for the new NFS subsystem. MFC after: 2 weeks Notes: svn path=/head/; revision=221439
| * Revert r221306, since NFSSVC_ZEROSTATS zero'd both client andRick Macklem2011-05-042-3/+0
| | | | | | | | | | | | | | | | server stats, when separate modifiers for NFSSVC_GETSTATS for each of client and server stats is what it required by nfsstat(1). Notes: svn path=/head/; revision=221438
| * Implemented a mount option "nocto" that disables cache coherencyRuslan Ermilov2011-05-046-4/+13
| | | | | | | | | | | | | | | | | | | | | | checking at open time. It may improve performance for read-only NFS mounts. Use deliberately. MFC after: 1 week Reviewed by: rmacklem, jhb (earlier version) Notes: svn path=/head/; revision=221436
| * Commit the missing linux_videdev2_compat.h (lost somewhere betweenAlexander Leidinger2011-05-041-0/+137
| | | | | | | | | | | | | | | | | | commit tree patch generation -> successful compile tree build test -> commmit). Pointy hat to: netchild Notes: svn path=/head/; revision=221434
| * When checking existence of providers skip those which are orphaned.Andrey V. Elsukov2011-05-041-0/+2
| | | | | | | | | | | | | | | | PR: kern/132273 MFC after: 2 week Notes: svn path=/head/; revision=221433
| * In ncl_printf(), call vprintf() instead of printf().Ruslan Ermilov2011-05-041-1/+1
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=221429
| * Add FEATURE macros for v4l and v4l2 to the linuxulator.Alexander Leidinger2011-05-041-0/+4
| | | | | | | | | | | | | | Suggested by: ae Notes: svn path=/head/; revision=221428
| * Remove this useless bit of code for Kite. The RIFS register value is overridenAdrian Chadd2011-05-041-7/+0
| | | | | | | | | | | | | | | | by the initvals, so disabling RIFS before calling writeIni() effectively does nothing. Notes: svn path=/head/; revision=221427
| * This is v4l2 support for the linuxulator. This allows to access FreeBSDAlexander Leidinger2011-05-042-0/+403
| | | | | | | | | | | | | | | | | | | | | | | | native devices which support the v4l2 API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd or multimedia/webcamd supplied drivers. Submitted by: nox MFC after: 1 month Notes: svn path=/head/; revision=221426
| * Fix typo in comment, improve comment.Alexander Leidinger2011-05-041-2/+2
| | | | | | | | Notes: svn path=/head/; revision=221425
| * Add explanation about the use-permission and FreeBSDify it.Alexander Leidinger2011-05-041-0/+15
| | | | | | | | Notes: svn path=/head/; revision=221424
| * Copy the v4l2 header unchanged from the vendor branch.Alexander Leidinger2011-05-041-0/+1164
| | | | | | | | Notes: svn path=/head/; revision=221423
| * Fix some corner cases in the net80211 sequence number retransmissionAdrian Chadd2011-05-046-24/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling. The current sequence number code does a few things incorrectly: * It didn't try eliminating duplications from HT nodes. I guess it's assumed that out of order / retransmission handling would be handled by the AMPDU RX routines. If a HT node isn't doing AMPDU RX, then retransmissions need to be eliminated. Since most of my debugging is based on this (as AMPDU TX software packet aggregation isn't yet handled), handle this corner case. * When a sequence number of 4095 was received, any subsequent sequence number is going to be (by definition) less than 4095. So if the following sequence number (0) doesn't initially occur and the retransmit is received, it's incorrectly eliminated by the IEEE80211_FC1_RETRY && SEQ_LEQ() check. Try to handle this better. This almost completely eliminates out of order TCP statistics showing up during iperf testing for the 11a, 11g and non-aggregate 11n AMPDU RX case. The only other packet loss conditions leading to this are due to baseband resets or heavy interference. Notes: svn path=/head/; revision=221418
| * Remove code with any effect.Michael Tuexen2011-05-034-11/+1
| | | | | | | | Notes: svn path=/head/; revision=221411
| * Add a missing break. This bug was introduced in r221249.Michael Tuexen2011-05-031-0/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=221410
| * Convert the last use of xcopyout() to ddi_copyout() and remove the nowMarius Strobl2011-05-032-5/+2
| | | | | | | | | | | | | | | | | | | | unused xcopyin() as well as xcopyout(). MFC together with r219089. Approved by: mm Notes: svn path=/head/; revision=221409
| * - Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOPMarius Strobl2011-05-0372-1678/+1051
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE. Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@ Notes: svn path=/head/; revision=221407
| * Use make_dev_alias_p() added in r221397 to create alias dev entry.Alexander Motin2011-05-031-1/+2
| | | | | | | | | | | | | | It removes panic in case if alias name is already busy for some reason. Notes: svn path=/head/; revision=221400
| * Add make_dev_alias_p() function. It is similar to make_dev_alias(),Andrey V. Elsukov2011-05-032-10/+53
| | | | | | | | | | | | | | | | | | | | but it may return an error like make_dev_p() does. Reviewed by: kib (previous version) MFC after: 2 weeks Notes: svn path=/head/; revision=221397
* | Revert comment introduction. It seems I'm the only one who didn't knowAttilio Rao2011-05-041-4/+0
| | | | | | | | | | | | | | of the size mismatch. Notes: svn path=/projects/largeSMP/; revision=221443
* | MFCAttilio Rao2011-05-0327-111/+925
|\| | | | | | | Notes: svn path=/projects/largeSMP/; revision=221399
| * Enable the new PCI-PCI bridge driver on amd64 and i386 by default. It canJohn Baldwin2011-05-032-0/+4
| | | | | | | | | | | | | | be disabled via 'nooptions NEW_PCIB'. Notes: svn path=/head/; revision=221394
| * Reimplement how PCI-PCI bridges manage their I/O windows. Previously theJohn Baldwin2011-05-0312-8/+713
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver would verify that requests for child devices were confined to any existing I/O windows, but the driver relied on the firmware to initialize the windows and would never grow the windows for new requests. Now the driver actively manages the I/O windows. This is implemented by allocating a bus resource for each I/O window from the parent PCI bus and suballocating that resource to child devices. The suballocations are managed by creating an rman for each I/O window. The suballocated resources are mapped by passing the bus_activate_resource() call up to the parent PCI bus. Windows are grown when needed by using bus_adjust_resource() to adjust the resource allocated from the parent PCI bus. If the adjust request succeeds, the window is adjusted and the suballocation request for the child device is retried. When growing a window, the rman_first_free_region() and rman_last_free_region() routines are used to determine if the front or end of the existing I/O window is free. From using that, the smallest ranges that need to be added to either the front or back of the window are computed. The driver will first try to grow the window in whichever direction requires the smallest growth first followed by the other direction if that fails. Subtractive bridges will first attempt to satisfy requests for child resources from I/O windows (including attempts to grow the windows). If that fails, the request is passed up to the parent PCI bus directly however. The PCI-PCI bridge driver will try to use firmware-assigned ranges for child BARs first and only allocate a "fresh" range if that specific range cannot be accommodated in the I/O window. This allows systems where the firmware assigns resources during boot but later wipes the I/O windows (some ACPI BIOSen are known to do this) to "rediscover" the original I/O window ranges. The ACPI Host-PCI bridge driver has been adjusted to correctly honor hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge makes a wildcard request for an I/O window range. The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option is enabled. This is a transition aide to allow platforms that do not yet support bus_activate_resource() and bus_adjust_resource() in their Host-PCI bridge drivers (and possibly other drivers as needed) to use the old driver for now. Once all platforms support the new driver, the kernel option and old driver will be removed. PR: kern/143874 kern/149306 Tested by: mav Notes: svn path=/head/; revision=221393