summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Accept any correct frames from any source when MONITOR mode is used.Kevin Lo2015-10-121-0/+13
| | | | | | | | Submitted by: Andriy Voskoboinyk <s3erios at gmail.com> Differential Revision: https://reviews.freebsd.org/D3812 Notes: svn path=/head/; revision=289173
* net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len ↵Adrian Chadd2015-10-1214-31/+2
| | | | | | | | | | (never used here) Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3776 Notes: svn path=/head/; revision=289168
* urtwn(4): split *reg and *var parts (no functional change).Adrian Chadd2015-10-124-192/+208
| | | | | | | | Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3775 Notes: svn path=/head/; revision=289167
* net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ↵Adrian Chadd2015-10-1223-70/+11
| | | | | | | | | | | | | ieee80211_raw_output(). This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still doing that. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3774 Notes: svn path=/head/; revision=289165
* net80211: free node reference in the ieee80211_parent_xmitpkt() when error ↵Adrian Chadd2015-10-128-39/+19
| | | | | | | | | | | | | happened. Move error handling into ieee80211_parent_xmitpkt() instead of spreading it between functions. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3772 Notes: svn path=/head/; revision=289164
* wpi(4): add support for TX fragmentation.Adrian Chadd2015-10-123-28/+96
| | | | | | | | | | | Tested: * Tested with Intel 3945BG, HOSTAP and STA modes Differential Revision: https://reviews.freebsd.org/D3770 Notes: svn path=/head/; revision=289163
* net80211: separate mbuf cleanup from ieee80211_fragment()Adrian Chadd2015-10-127-52/+31
| | | | | | | | | | | | | | | * Create ieee80211_free_mbuf() which frees a list of mbufs. * Use it in the fragment transmit path and ath / uath transmit paths. * Call it in xmit_pkt() if the transmission fails; otherwise fragments may be leaked. This should be a big no-op. Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3769 Notes: svn path=/head/; revision=289162
* NTB: MFV c336acd3: memcpy lockup workaroundConrad Meyer2015-10-111-2/+3
| | | | | | | | | | | | | The system will appear to lockup for long periods of time due to the NTB driver spending too much time in memcpy. Avoid this by reducing the number of packets that can be serviced on a given interrupt. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289157
* NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal sizeConrad Meyer2015-10-111-3/+5
| | | | | | | | | | | | | | The ring logic of the NTB receive buffer/transmit memory window requires there to be at least 2 payload sized allotments. For the minimal size case, split the buffer into two and set the transport_mtu to the appropriate size. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289156
* NTB: MFV 90f9e934: reset tx_index on link toggleConrad Meyer2015-10-111-2/+1
| | | | | | | | | | | | | | If the NTB link toggles, the driver could stop receiving due to the tx_index not being set to 0 on the transmitting size on a link-up event. This is due to the driver expecting the incoming data to start at the beginning of the receive buffer and not at a random place. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289155
* NTB: MFV b77b2637: Link toggle memory leakConrad Meyer2015-10-111-0/+8
| | | | | | | | | | | | | | | Each link-up will allocate a new NTB receive buffer when the NTB properties are negotiated with the remote system. These allocations did not check for existing buffers and thus did not free them. Now, the driver will check for an existing buffer and free it if not of the correct size, before trying to alloc a new one. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289154
* NTB: MFV 113fc505: Handle 64bit BAR sizesConrad Meyer2015-10-111-34/+65
| | | | | | | | | | | | | | | 64bit BAR sizes are permissible with an NTB device. To support them various modifications and clean-ups were required, most significantly using 2 32bit scratch pad registers for each BAR. Also, modify the driver to allow more than 2 Memory Windows. Authored by: Jon Mason Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289153
* NTB: MFV cc0f868d: fix pointer math issuesConrad Meyer2015-10-111-2/+2
| | | | | | | | | | | | ->remote_rx_info and ->rx_info are struct ntb_rx_info pointers. If we add sizeof(struct ntb_rx_info) then it goes too far. Authored by: Dan Carpenter Obtained from: Linux Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289152
* Correct flash layout (this is a 4M flash unit).Sean Bruno2015-10-111-22/+15
| | | | | | | | Remove "rootfs" entry and assign the 800K or so to the kernel partition as this unit boots from usb mass storage. Notes: svn path=/head/; revision=289147
* Make delete method set via kern.cam.da.X.delete_method persistent.Alexander Motin2015-10-111-37/+35
| | | | | | | | | | | | This allows to set delete method via tunable, before device capabilities are known. Also allow ZERO method for devices not reporting LBP, if user explicitly requests it -- it may be useful if storage supports compression and WRITE SAME, but does not support UNMAP. MFC after: 2 weeks Notes: svn path=/head/; revision=289146
* Remove legacy CHS geometry from dmesg and unify capacity outputs.Alexander Motin2015-10-113-17/+11
| | | | Notes: svn path=/head/; revision=289138
* Remove compatibility shims for legacy ATA device names.Alexander Motin2015-10-1120-128/+5
| | | | | | | | We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims. Notes: svn path=/head/; revision=289137
* Remove lock upgrade attempt from ctl_be_block_open_file().Alexander Motin2015-10-111-15/+0
| | | | | | | | | | | I am not sure what for it was done. Now open routine should automatically fall back to read-only if open for writing is impossible. In such case attempt to upgrade to write sounds strange. MFC after: 1 week Notes: svn path=/head/; revision=289136
* Use machine specific values cleaned from openwrt for the mac addressSean Bruno2015-10-111-1/+3
| | | | | | | location on the TP link mr3020 Notes: svn path=/head/; revision=289130
* wpi(4): do not count failures twice for ic_raw_xmit().Adrian Chadd2015-10-111-10/+3
| | | | | | | | | | | | Tested: * Tested with Intel 3945BG, STA mode Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3768 Notes: svn path=/head/; revision=289129
* wpi(4): move error handling upper (wpi_tx_data()/wpi_cmd2() -> ↵Adrian Chadd2015-10-111-30/+31
| | | | | | | | | | | | | | wpi_raw_xmit()/wpi_transmit()). Tested: * Tested with Intel 3945BG, STA mode Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3767 Notes: svn path=/head/; revision=289128
* wpi(4): fix possible race between TX/RX threads.Adrian Chadd2015-10-111-0/+2
| | | | | | | | | | | | Tested: * Tested with Intel 3945BG, STA mode Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3766 Notes: svn path=/head/; revision=289127
* wpi(4): do not allocate space for unused rings.Adrian Chadd2015-10-112-14/+4
| | | | | | | | | | | | Tested: * Tested with Intel 3945BG, STA mode Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3765 Notes: svn path=/head/; revision=289126
* wpi(4): do not override iv_recv_mgmt() in non-adhoc modes.Adrian Chadd2015-10-111-6/+7
| | | | | | | | | | | | Tested: * Tested with Intel 3945BG, IBSS and STA modes Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3764 Notes: svn path=/head/; revision=289125
* wpi(4): use more correct types.Adrian Chadd2015-10-113-55/+67
| | | | | | | | | | | | This change fixes some amount of -Wsign-conversion and -Wconversion warnings and sets correct sizes for some variables (as a result, some loop counters were touched too). Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3763 Notes: svn path=/head/; revision=289124
* Replace a local sx lock that allowed only one client at a time to accessIan Lepore2015-10-101-12/+11
| | | | | | | | an eeprom device with iicbus_request/release_bus(), which achieves the same effect and also keeps other i2c slave drivers from clashing on the bus. Notes: svn path=/head/; revision=289118
* There's no way a fbsd install + kernel will fit into 4MB of flash.Sean Bruno2015-10-101-13/+3
| | | | | | | | Assume and enforce the fact that this will always boot a rootfs from usb. Notes: svn path=/head/; revision=289117
* Change the default setting of kern.ipc.shm_allow_removed from 0 to 1.Edward Tomasz Napierala2015-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for manually changing this flag for Google Chrome users. It also improves compatibility with Linux applications running under Linuxulator compatibility layer, and possibly also helps in porting software from Linux. Generally speaking, the flag allows applications to create the shared memory segment, attach it, remove it, and then continue to use it and to reattach it later. This means that the kernel will automatically "clean up" after the application exits. It could be argued that it's against POSIX. However, SUSv3 says this about IPC_RMID: "Remove the shared memory identifier specified by shmid from the system and destroy the shared memory segment and shmid_ds data structure associated with it." From my reading, we break it in any case by deferring removal of the segment until it's detached; we won't break it any more by also deferring removal of the identifier. This is the behaviour exhibited by Linux since... probably always, and also by OpenBSD since the following commit: revision 1.54 date: 2011/10/27 07:56:28; author: robert; state: Exp; lines: +3 -8; Allow segments to be used even after they were marked for deletion with the IPC_RMID flag. This is permitted as an extension beyond the standards and this is similar to what other operating systems like linux do. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3603 Notes: svn path=/head/; revision=289112
* Provide better debug message on kernel module name clash.Edward Tomasz Napierala2015-10-101-6/+2
| | | | | | | | | Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289111
* Make geom_nop(4) collect statistics on all types of BIOs, not justEdward Tomasz Napierala2015-10-102-0/+42
| | | | | | | | | | | | | reads and writes. PR: kern/198405 Submitted by: Matthew D. Fuller <fullermd at over-yonder dot net> MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3679 Notes: svn path=/head/; revision=289110
* drm/i915: Remove "Attempting to unbind pinned buffer" messageJean-Sébastien Pédron2015-10-101-3/+1
| | | | | | | | | | | This error message is removed in later versions of Linux and currently, it spams users. PR: 200712 MFC after: 1 week Notes: svn path=/head/; revision=289109
* Update the AP135 reference design flash layout to be more useful.Adrian Chadd2015-10-101-17/+28
| | | | | | | | | | | | | | | | | | | | | | * Shuffle the kernel to be at the beginning * Give the kernel 2mb, the rootfs 6mb, and 'mib0' the rest * put the cfg parition just before the ART calibration data for the wifi part in the SoC * .. and make sure ART points to the right 64k region. I've updated the freebsd-wifi-build wiki the instructions on using this. If someone has an AP135 with 8MB SPI flash then this won't work; everything minus the big mib0 partition is just a bit over 8MB. Come see me if this ever happens (you'll likely just have to shrink the rootfs and the kernel a little in order to make it fit.) Tested: * AP135 reference board. Notes: svn path=/head/; revision=289106
* Translate iic hardware layer status values to errno return values.Ian Lepore2015-10-101-3/+9
| | | | Notes: svn path=/head/; revision=289105
* Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).Ian Lepore2015-10-101-0/+1
| | | | Notes: svn path=/head/; revision=289104
* iw_cxgbe: fix for page fault in cm_close_handler().Navdeep Parhar2015-10-101-8/+14
| | | | | | | | | | | | | | | | | | | | | | | This is roughly the iw_cxgbe equivalent of https://github.com/torvalds/linux/commit/be13b2dff8c4e41846477b22cc5c164ea5a6ac2e ----------------- RDMA/cxgb4: Connect_request_upcall fixes When processing an MPA Start Request, if the listening endpoint is DEAD, then abort the connection. If the IWCM returns an error, then we must abort the connection and release resources. Also abort_connection() should not post a CLOSE event, so clean that up too. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com> ----------------- Submitted by: Krishnamraju Eraparaju at chelsio dot com. Notes: svn path=/head/; revision=289103
* Flip on fast frames support for AR5416 and AR9300 series NICs.Adrian Chadd2015-10-102-8/+2
| | | | | | | | | | | | | | | | | | | | | | This was off because the net80211 aggregation code was using the same state pointers for both fast frames and ampdu tx support which led to some pretty unfortunate panic-y behaviour. Now that net80211 doesn't panic, let's flip this back on. It doesn't (yet) do the horrific sounding thing of A-MPDU aggregates of fast frames; that'll come next. It's a pre-requisite to supporting AMSDU + AMPDU anyway, which actually speeds things up quite considerably (think packing lots of little ACK frames into a single AMSDU.) Tested: * QCA955x SoC, AP mode * AR5416, STA mode * AR9170, STA mode (with local fast frame patches) Notes: svn path=/head/; revision=289099
* Fix more cases of iicbus-layer functions that must return IIC_Exxxx values.Ian Lepore2015-10-101-2/+2
| | | | Notes: svn path=/head/; revision=289098
* Return only IIC_Exxxx status values from iicbus-layer functions. Most ofIan Lepore2015-10-092-7/+22
| | | | | | | | | | | | | these functions are thin wrappers around calling the hardware-layer driver, but some of them do sanity checks and return an error. Since the hardware layer can only return IIC_Exxxxx status values, the iicbus helper functions must also adhere to that, so that drivers at higher layers can assume that any non-zero status value is an IIC_Exxxx value that provides details about what happened at the hardware layer (sometimes those details are important for certain slave drivers). Notes: svn path=/head/; revision=289097
* Add iic2errno(), a helper function to translate IIC_Exxxxx status values toIan Lepore2015-10-092-0/+24
| | | | | | | | | | | | | | | | | | errno values that are at least vaguely equivelent. Also add a new status value, IIC_ERESOURCE, to indicate a failure to acquire memory or other required resources to complete a transaction. The IIC_Exxxxxx values are supposed to communicate low-level details of the i2c transaction status between the lowest-layer hardware driver and higher-layer bus protocol and device drivers for slave devices on the bus. Most of those slave drivers just return all status values from the lower layers directly to their callers, resulting in crazy error reporting from a user's point of view (things like timeouts being reported as "no such process"). Now there's a helper function to make it easier to start cleaning up all those drivers. Notes: svn path=/head/; revision=289095
* Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.Ian Lepore2015-10-097-11/+11
| | | | | | | | | | | | | | | Make it clearer what each one means in the comments that define them. IIC_BUSBSY was used in many places to mean two different things, either "someone else has reserved the bus so you have to wait until they're done" or "the signal level on the bus was not in the state I expected before/after issuing some command". Now IIC_BUSERR is used consistantly to refer to protocol/signaling errors, and IIC_BUSBSY refers to ownership/reservation of the bus. Notes: svn path=/head/; revision=289093
* Mostly rewrite the imx i2c driver. This started out as an attempt to fixIan Lepore2015-10-091-170/+121
| | | | | | | | | | | | | | | | | | | | | | | | | one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed. While working on that problem I discovered that the driver's handling of error conditions in general didn't match the state transition diagram in the reference manual, and making that right resulted in a lot of code reorganization. Along the way various other changes also happened... - Remove a mutex that wasn't protecting anything. - Remove some mystery DELAY()s, document the few that remain. - Use pause_sbt(9) to yield the processor for the bulk of the time it takes to transfer each byte rather than busy-polling the whole time. - Disable the controller when no transfers are in progress; since we don't operate in slave mode, there's no reason to run the hardware. - Remove a bunch of unecessary code from probe(). Notes: svn path=/head/; revision=289091
* Bugfix: Exit the transfer loop if any read or write operation fails. Also,Ian Lepore2015-10-091-2/+5
| | | | | | | | | perform a stop operation on the bus if there was an error, otherwise the bus will remain hung forever. Consistantly use 'if (error != 0)' style in the function. Notes: svn path=/head/; revision=289084
* Style and whitespace cleanups. The only functional change is removal ofIan Lepore2015-10-091-12/+8
| | | | | | | a printf that appears to be left over from development debugging. Notes: svn path=/head/; revision=289083
* Add .gnu.versym VERSYM_HIDDEN flag and related maskEd Maste2015-10-091-0/+6
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289070
* Sort function prototypes and add missing 'static' keywords.Kevin Lo2015-10-091-114/+113
| | | | | | | | Submitted by: Andriy Voskoboinyk <s3erios at gmail dot com> Differential Revision: https://reviews.freebsd.org/D3847 Notes: svn path=/head/; revision=289066
* Remove root_mount_wait(). It's not used anywhere.Edward Tomasz Napierala2015-10-092-19/+0
| | | | | | | | | | Reviewed by: bapt@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3787 Notes: svn path=/head/; revision=289064
* Exploit r288122 to avoid pointlessly enqueueing a page that is about to beAlan Cox2015-10-091-1/+1
| | | | | | | | | | freed. Submitted by: kmacy Differential Revision: https://reviews.freebsd.org/D1674 Notes: svn path=/head/; revision=289059
* Fix missing semi-colon from r289055.Conrad Meyer2015-10-081-1/+1
| | | | | | | | Obtained from: mjg Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289058
* Remove comment obsoleted by r289056.Edward Tomasz Napierala2015-10-081-4/+0
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289057
* Remove unused SI_SUB_* #defines.Edward Tomasz Napierala2015-10-081-7/+0
| | | | | | | | | | Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3708 Notes: svn path=/head/; revision=289056