summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,ian2014-05-144-68/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257794, r257795, r257992 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. Do not panic if pmap_mincore() is called. An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY. Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. Allow OF_decode_addr() to also be able to map resources on big-endian devices. Make tsec work with the device tree present on the RB800. Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree. Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-1415-15/+15
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC r257180, r257195, r257196, r257198, r257209, r257295ian2014-05-142-7/+12
| | | | | | | | | | | | Add some extra sanity checking and checks to printf format specifiers. Try even harder to find a console before giving up. Make devices with registers into the KVA region work reliably. Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC. Return NOKEY instead of 0 if there are no more key presses queued.
* MFC r257111, r257144, r257157, r257183ian2014-05-131-11/+33
| | | | | | | | | | Test UARTs physical address instead of virtual. Be a bit more flexible in how we find the console from the properties on /chosen, following the list of allowed console properties in ePAPR. Also do not require that stdin be defined and equal to stdout: stdin is nonstandard (for ePAPR) and console in an unexpected place is after all better than no console.
* MFC r257114, r257118ian2014-05-132-555/+11
| | | | | | | | | Use common OFW root code to set up fdtbus. This is an almost purely negative diff that should improve reliability somewhat. There should be no differences in behavior -- please report any that crop up. This has been tested on ARM and PPC systems. Make sure to get the right node when looking up #interrupt-cells.
* MFC r256994, r257016, r257055, r257059, r257060, r257075ian2014-05-135-3/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new interfaces to ofw_bus: - ofw_bus_map_intr() Maps an (iparent, IRQ) tuple to a system-global interrupt number in some platform dependent way. This is meant to be implemented as a replacement for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus hierarchy. - ofw_bus_config_intr() Configures an interrupt (previously mapped) based on firmware sense flags. This replaces manual interpretation of the sense field in bus drivers and will, in a follow-up, allow that interpretation to be redirected to the PIC drivers where it belongs. This will eventually replace the tables in /sys/dev/fdt/fdt_ARCH.c The PowerPC/AIM code has been converted to use these globally, with an implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly be integrated into pic_if.m and bounced through nexus into the PIC tree. Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The sparc64 driver will be modified to use this shortly. Allow PIC drivers to translate firmware sense codes for themselves. This is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not happen quite yet. Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs, which would try to treat the previously-mapped interrupts from fdt_decode_intr() as interrupt line numbers on the same parent PIC. Remove some of the code required for supporting ssm(4) on SPARC in favor of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated into this rework, this should be (trivially) revisited.
* MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:ian2014-05-138-46/+30
| | | | | | | | | Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. Use the new function all over the place.
* MFC r256870, r256898, r256899, r256900 (by nwhitehorn):ian2014-05-136-21/+37
| | | | | | | | | | | | | | Standards-conformance and code deduplication: - Use bus reference phandles in place of FDT offsets as IRQ domain keys - Unify the identical macio/fdt/mambo OpenPIC drivers into one - Be more forgiving (following ePAPR) about what we need from the device tree to identify an OpenPIC - Correctly map all IRQs into an interrupt domain - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of failing attachment for that device. Allow lots of interrupts (useful on multi-domain platforms) and do not set device_quiet() on all devices attached under nexus(4).
* MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):ian2014-05-131-5/+6
| | | | | | | | | | - Handle 2GB of ram - Allow the OFW interrupt mapping code to work with PCI devices not enumerated by Open Firmware, as in the case of FDT. - Provide an interface for PCI bus drivers that need some of ofw_pci's metadata during attach. - Use standard ofw_bus helpers instead of reinventing the wheel. - Make hard-wired TLB allocations be at minimum one page.
* MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.ian2014-05-131-1/+1
|
* MFC 265555ambrisko2014-05-126-0/+9409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dd mrsas(4) driver from LSI official support of newer MegaRAID SAS cards. LSI has been maintaining this driver outside of the FreeBSD tree. It overlaps support of ThunderBolt and Invader cards that mfi(4) supports. By default mfi(4) will attach to cards. If the tunable: hw.mfi.mrsas_enable=1 is set then mfi(4) will not probe and attach to these newer cards and allow mrsas(4) to attach. So by default this driver will not effect a FreeBSD system unless mfi(4) is removed from the kernel or the tunable is enabled. mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices show up as /dev/daX. mfiutil(8) does not work with mrsas. The FreeBSD version of MegaCli and StorCli from LSI do work with mrsas. It appears that StorCli only works with mrsas. MegaCli appears to work with mfi(4) and mrsas(4). It would be good to add mfiutil(4) support to mrsas, emulations modes, kernel logging, device aliases to ease the transition between mfi(4) and mrsas(4). Style issues should be resolved by LSI when they get committers approved. The plan is get this driver in FreeBSD 9.3 to improve HW support. Thanks to LSI for developing, testing and working with FreeBSD to make this driver co-exist in FreeBSD. This improves the overall support of MegaRAID SAS. Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com> Sponsored by: LSI
* MFC r265703davidcs2014-05-124-42/+30
| | | | | | | | Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
* MFC: 263302, 264461, 264772gnn2014-05-116-28/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 263302: fix mbuf leak if it does not fit in software queue 264461: Commit various fixes for the SolarFlare drivers, in particular this set of patches fixes support for systems with > 32 cores. Details include sfxge: RXQ index (not label) comes from FW in flush done/failed events Change the second argument name of the efx_rxq_flush_done_ev_t and efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label) comes from FW in flush done and failed events. sfxge: TXQ index (not label) comes from FW in flush done event Change the second argument name of the efx_txq_flush_done_ev_t prototype to highlight that TXQ index (not label) comes from FW in flush done event. sfxge: use TXQ type as label to support more than 32 TXQs There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload) in all other event queues. 264772: Check that port is started when MAC filter is set The MAC filter set may be called without softc_lock held in the case of SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING flag which implies port started, but it is not guaranteed to remain. softc_lock shared lock can't be held in the case of these ioctls processing, since it results in failure where kernel complains that non-sleepable lock is held in sleeping thread. Both problems are repeatable on LAG with LACP proto bring up. Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc.
* MFC r265411davidcs2014-05-1022-176/+22
| | | | | | | Modify Copyright information to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
* MFC mpr(4) driver changes.ken2014-05-092-6/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes r265386, r265424, and r265473. ------------------------------------------------------------------------ r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines Adjust #if statements inside mprsas_send_smpcmd() to more accurately reflect when unmapped I/O support was added. For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028. For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001. Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the i386 PAE build for non-unmapped I/O builds. These were fixed in mps(4) in revision 241145, but didn't make it into the mpr(4) driver. This change should only affect FreeBSD versions outside the above revisions, and thus doesn't affect head. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines Fix a problem with async notifications in the mpr(4) driver. This problem only occurs on versions of FreeBSD prior to the recent CAM locking changes. (i.e. stable/9 and older versions of stable/10) This change should be a no-op for head and stable/10. If a path isn't specified, xpt_register_async() will create a fully wildcarded path and acquire a lock (the XPT lock in older versions, and via xpt_path_lock() in newer versions) to call xpt_action() for the XPT_SASYNC_CB CCB. It will then drop the lock and if the requested event includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up to date with any device arrivals or path registrations. The issue is that before the locking changes, each SIM lock would get acquired in turn during the EDT tree traversal process. If a path is specified for xpt_register_async(), it won't acquire and drop its own lock, but instead expects the caller to hold its own SIM lock. That works for the first part of xpt_register_async(), but causes a recursive lock acquisition once the EDT traversal happens and it comes to the SIM in question. And it isn't possible to call xpt_action() without holding a SIM lock. The locking changes fix this by using the XPT topology lock for EDT traversal, so it is no longer an issue to hold the SIM lock while calling xpt_register_async(). The solution for FreeBSD versions before the locking changes is to request notification of all device arrivals (so we pass a NULL path into xpt_register_async()) and then filter out the arrivals that are not ours. Sponsored by: Spectra Logic Corporation ------------------------------------------------------------------------ ------------------------------------------------------------------------ r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN. This is more consistent with the existing mps(4) behavior. Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com> ------------------------------------------------------------------------ Sponsored by: LSI, Spectra Logic
* MFC r264849 & r264883smh2014-05-081-0/+4
| | | | | | | Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their values can be viewed. Sponsored by: Multiplay
* MFC r264878smh2014-05-081-1/+1
| | | | | | | Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still insufficient on some machines Sponsored by: Multiplay
* Merge r259393 from head:gavin2014-05-072-6/+5
| | | | | | | | | | | | Fix several panics when initialization of an ISA or PC-CARD device fails: o Assign sc->an_dev in an_probe() (which isn't really a probe function in the standard newbus sense) as we may need it for printing errors. o Use device_printf() rather than if_printf() in an_reset() - this is called from an_probe() long before the ifp structure is initialised in an_attach(). o Initialize the ifp structure early in an_attach() as we use if_printf() in cases where allocation of descriptors etc fails.
* Merge r256782 from head:gavin2014-05-072-0/+64
| | | | | Add 26 new device IDs to uslcom(4). This brings us in sync with Linux v3.12 rc5
* MFC r263311:jimharris2014-05-073-7/+44
| | | | | nvme: Allocate all MSI resources up front so that we can fall back to INTx if necessary.
* MFC r263310:jimharris2014-05-073-29/+73
| | | | | nvme: Close hole where nvd(4) would not be notified of all nvme(4) instances if modules loaded during boot.
* MFC r263278:jimharris2014-05-071-1/+2
| | | | nvme: NVMe specification dictates 4-byte alignment for PRPs (not 8).
* MFC r263277:jimharris2014-05-071-10/+0
| | | | | | | | | | nvme: Remove the software progress marker SET_FEATURE command during controller initialization. The spec says OS drivers should send this command after controller initialization completes successfully, but other NVMe OS drivers are not sending this command. This change will therefore reduce differences between the FreeBSD and other OS drivers.
* MFC r263276:jimharris2014-05-074-19/+14
| | | | Base the max number of SG elements on MAXPHYS.
* MFC r263275:jimharris2014-05-071-2/+10
| | | | | isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response.
* MFC r260382:jimharris2014-05-071-2/+23
| | | | | | | | | For IDENTIFY passthrough commands to Chatham prototype controllers, copy the spoofed identify data into the user buffer rather than issuing the command to the controller, since Chatham IDENTIFY data is always spoofed. While here, fix a bug in the spoofed data for Chatham submission and completion queue entry sizes.
* MFC r264355 by mav@:trasz2014-05-072-10/+10
| | | | Remove unused val argument value from SYSCTL_INT() calls.
* MFC r264549:trasz2014-05-072-12/+24
| | | | | | | | | Make it possible for the initiator side to operate in both proxy and normal mode; this makes it possible to compile with the former by default, but use it only when neccessary. That's especially important for the userland part. Sponsored by: The FreeBSD Foundation
* MFC r264545:trasz2014-05-071-1/+1
| | | | | | Fix typo. Sponsored by: The FreeBSD Foundation
* MFC r264348 by mav@:trasz2014-05-071-13/+32
| | | | | | | | | | | | | | | | | | | Improve use of socket buffer upcalls. Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups until we have enough data to read or space to write. Increase partial receive len from 1K to 128K to not wake up on every received packet. This significantly reduces locks congestion and CPU usage and improves throughput for large I/Os on NICs without TSO and LRO. MFC r264552 by mav@: Close the race in older code, that caused connection stuck after r264348. Sponsored by: iXsystems, Inc.
* MFC r264544:trasz2014-05-071-63/+65
| | | | | | | Add kern.iscsi.fail_on_disconnection; this is required for gmultipath to work. Sponsored by: The FreeBSD Foundation
* MFC r264538:trasz2014-05-071-1/+0
| | | | | | Remove useless debug. Sponsored by: The FreeBSD Foundation
* MFC r264537:trasz2014-05-071-1/+4
| | | | | | Be more strict with locking for is_waiting_for_iscsid variable. Sponsored by: The FreeBSD Foundation
* MFC r264536:trasz2014-05-072-31/+0
| | | | | | | Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway, because of ISCSIDFAIL. Sponsored by: The FreeBSD Foundation
* MFC r264530:trasz2014-05-072-4/+7
| | | | | | Properly pass the initiator address when running in proxy mode. Sponsored by: The FreeBSD Foundation
* MFC r264526:trasz2014-05-072-16/+21
| | | | | | | Properly identify target portal when running in proxy mode. While here, remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway. Sponsored by: The FreeBSD Foundation
* MFC r264525:trasz2014-05-071-0/+4
| | | | | | | Add some stuff to make it easier to figure out for the system administrator whether the ICL_KERNEL_PROXY stuff got compiled in correctly. Sponsored by: The FreeBSD Foundation
* MFC r263740:trasz2014-05-072-24/+34
| | | | | | Use a less unusual syntax in debug printfs. Sponsored by: The FreeBSD Foundation
* MFC r264163:trasz2014-05-071-3/+4
| | | | | | Remove hack to pass STAILQ to a function and do it properly instead. Sponsored by: The FreeBSD Foundation
* MFC r264122:trasz2014-05-072-37/+169
| | | | | | | Rework the iSCSI PDU transmit code to avoid lock contention and coalesce PDUs before sending. Sponsored by: The FreeBSD Foundation
* MFC r264110:trasz2014-05-072-9/+9
| | | | | | All the iSCSI sysctls are also tunables; advertise that. Sponsored by: The FreeBSD Foundation
* MFC r264109:trasz2014-05-074-27/+27
| | | | | | We don't need TAILQ for iSCSI PDUs; STAILQ is enough. Sponsored by: The FreeBSD Foundation
* MFC r264026:trasz2014-05-071-4/+1
| | | | | | Enable a KASSERT. Sponsored by: The FreeBSD Foundation
* MFC r264025:trasz2014-05-071-11/+29
| | | | | | | | | | | | Get rid of the "autoscaling", instead just set socket buffer sizes in the usual way. The only thing the old code did was making things less predictable. MFC r264058: Fix build, broken by r264025. Sponsored by: The FreeBSD Foundation
* MFC r264023:trasz2014-05-073-5/+9
| | | | | | | Instead of "icltx" and "iclrx", use thread names with prefix from upper layer, so that one can see which side of the stack the threads are for. Sponsored by: The FreeBSD Foundation
* MFC r264022:trasz2014-05-073-13/+20
| | | | | | | | Get rid of ICL lock; use upper-layer (initiator or target) lock instead. This avoids extra locking in icl_pdu_queue(); the upper layer needs to call it while holding its own lock anyway, to avoid sending PDUs out of order. Sponsored by: The FreeBSD Foundation
* MFC r263743:trasz2014-05-072-0/+10
| | | | | | Move the ic_outstanding_count under #ifdef DIAGNOSTIC. Sponsored by: The FreeBSD Foundation
* MFC r263742:trasz2014-05-071-2/+2
| | | | | | | Fix harmless warning after reconnecting a session and not doing anything with it. Sponsored by: The FreeBSD Foundation
* MFC r265102:kib2014-05-061-1/+1
| | | | | Fix two cases of recursive acquisitions of the vm object lock, only possible in rare failure situations.
* MFC r264610:mav2014-05-061-7/+7
| | | | Correct AMD chipsets identification.
OpenPOWER on IntegriCloud