| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
frames in a interface.
Ticket #7710
(cherry picked from commit d292b5ce7adecee7f57cee347735bc336ec225ee)
|
|
|
|
|
|
|
|
|
|
|
| |
As cs is stored in a uint32_t, use the last bit to store the
active high flag as it's unlikely that we will have that much CS.
Reviewed by: loos
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8614
(cherry picked from commit f5f9058ccaec11fccc18817f45fff8859798a317)
|
|
|
|
|
|
| |
It cannot be fixed, produces no useful output and is harmless with the actual code.
(cherry picked from commit f1e039d0090c45ff05a5127847e38d285cb57279)
|
|
|
|
| |
(cherry picked from commit 9f2c71f9b8e1a514c395897c0ada18fbc9070690)
|
|
|
|
|
|
| |
Ticket #7199
(cherry picked from commit b95dbdb097fd2d5b148098bcc68e1f57b7dab544)
|
|
|
|
|
|
| |
Sponsored by: ABT Systems Ltd
(cherry picked from commit 7168ae84d82220caac0bb5f5f5d68ccc4e20915b)
|
|
|
|
| |
(cherry picked from commit 9a726e85185cf7cc2ed17cd59389dfa45421b61d)
|
|
|
|
| |
(cherry picked from commit 1b380dbbb0d6e31219a011dc9240226de745944f)
|
|
|
|
| |
(cherry picked from commit 98135cfa4ef6f8bed339d3994e69b2cc6fb7a343)
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r315845, 315430, r317981, r315466
o Fix some overly long lines, whitespace and other bugs according to
style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4).
o In the mmc(4) bridges and sdhci(4) (bus) front-ends:
- Remove redundant assignments of the default bus_generic_print_child
device method,
- use DEVMETHOD_END,
- use NULL instead of 0 for pointers.
o Trim/adjust includes.
o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges
as kernel drivers and their dependency onto mmc(4).
o Add support for eMMC "partitions". Besides the user data area, i. e.
the default partition, eMMC v4.41 and later devices can additionally
provide up to:
1 enhanced user data area partition
2 boot partitions
1 RPMB (Replay Protected Memory Block) partition
4 general purpose partitions (optionally with a enhanced or extended
attribute)
Besides simply subdividing eMMC devices, some Intel NUCs having UEFI
code in the boot partitions etc., another use case for the partition
support is the activation of pseudo-SLC mode, which manufacturers of
eMMC chips typically associate with the enhanced user data area and/
or the enhanced attribute of general purpose partitions.
CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation.
o Now that properly issuing CMD6 is crucial (so data isn't written to
the wrong partition for example), make a step into the direction of
correctly handling the timeout for these commands in the MMC layer.
Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as
recommended by relevant specifications.
o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible
with Linux so that the GNU mmc-utils can be ported to and used with
FreeBSD (note that due to the remaining deficiencies outlined above
SANITIZE operations issued by/with `mmc` currently most likely will
fail). These latter have been added to ports as sysutils/mmc-utils.
Among others, the `mmc` tool of mmc-utils allows for partitioning
eMMC devices (tested working).
o For devices following the eMMC specification v4.41 or later, year 0
is 2013 rather than 1997; so correct this for assembling the device
ID string properly.
o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at
least for some of the above a matching pair is required.
o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC
controllers as such in order to match the PCI one.
Additionally, in the entry for the 80860F14 SDXC controller remove
the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Fix sscanf() format string to match an argument. This also fixes kernel
build after r310171.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix typos in bootverbose printfs... display the write-protect pin info,
not the card-detect pin info.
Remove a variable that has been unused since r311735 (it should have been
removed as part of those changes).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Configure the timer capture pin to input mode in the timer control
register, in addition to configuring it as input with the pinmux driver.
There was a control register bit commented as "no desc in datasheet". A
later revision of the manual reveals the bit to be an input/output control
for the timer pin. In addition to configuring capture or pulse mode, you
apparently have to separately configure the pin direction in the timer
control register.
Before this change, the timer block was apparently driving a signal onto a
pad configured by pinmux as input. Capture mode still accidentally worked
for me during testing because I was using a very strong signal source that
just out-muscled the weaker drive from the misconfigured pin.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add new helper routines for sdhci bridge drivers that use gpio pins for
card presence and write protect switch detection.
Use the new sdhci_fdt_gpio helper functions to add full support for FDT
gpio pins for detecting card insert/remove and write protect for ti_sdhci.
Include sys/systm.h for use of bootverbose.
Revert to ti_sdhci driver's historic behavior: assume an sd card is
writable if the fdt data doesn't provide a gpio pin for reading the write
protect switch and also doesn't contain a "wp-disable" property.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need
this on a few earlier arm SoCs.
Restrict where we need to define fdt_fixup_table to just PowerPC and
Marvell.
Add the missing void to function signatures in much of the arm code.
|
| |
| |
| |
| |
| | |
Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read
integer data from the device tree.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simplify the handling of small packets padding in cpsw:
- Pad small packets to 60 bytes and not 64 (exclude the CRC bytes);
- Pad the packet using m_append(9), if the packet has enough space for
padding, which is usually true, it will not be necessary append a newly
allocated mbuf to the chain.
Suggested by: yongari
MFC r312608:
Handle the rx queue stall while reading the packets from NIC (when the
descriptor state will not change anymore). This seems to eliminate the
race where we can miss a stalled queue under high load.
While here remove the unnecessary curly brackets.
Reported by: Konstantin Kormashev <konstantin@netgate.com>
MFC r312636:
Properly assemble an mbuf chain out of received fragments.
Remove the rx_batch hack, it makes no difference now that most of bugs have
been sorted out.
MFC r312637:
Be a little more pedantic here, the TRM says the hardware is supposed to
only clean the OWNER bit on SOP descriptors.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Handle the set capabilities ioctl, letting the hardware checksum be
disabled (Hi netmap!).
Only remove the CRC bytes from packets when the hardware tell us to do so.
Fixes the 'discard frame w/o leading ethernet header' issues.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| | |
The port number and the to_port_en flag are valid only on SOP descriptor.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The RX_FREEBUFFER registers are a write to increment field.
Writing the full queue size to it every time was makeing it overflow with a
lot of bogus values.
This fixes the interrupt storms on irq 40.
MFC r309347:
MDIO_PHYACCESS_ACK is only valid for read access, remove it from
miibus_writereg.
Reduce the DELAY() between reads while waiting for MII access.
Spotted by: yongari
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the etherswitch(4) support for TI CPSW.
Adds VLAN and port management abilities for etherswitchcfg(8).
The code is conditionally enabled for now, because it is not necessary on
single ethernet use cases.
Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| | |
Fix ti_gpio_detach() to avoid crashing if something goes wrong.
Sponsored by: Rubicon Communication, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if_cpsw overhaul:
- Fix RX and TX teardown:
. TX teardown would not reclaim the abandoned descriptors;
. Interrupt storms in RX teardown;
. Fixed the acknowledge of the teardown completion interrupt.
- Remove temporary lists for the descriptors;
- Simplified the descriptor handling (less writes and reads from
descriptors where possible);
- Better debug;
- Add support for the RX threshold interrupts:
With interrupt moderation only, an RX overrun is likely to happen. The
RX threshold is set to trigger a non paced interrupt everytime your RX
free buffers are under the minimum threshold, helping to prevent the rx
overrun.
The NIC now survive when pushed over its limits (where previously it would
lock up in a few seconds).
uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap
pkt-gen as source and sink). TCP forwarding rate is over 350Mb/s.
No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC)
for his fast ethernet.
Tested on: uFW, BBB
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Enable the TX completion interrupt for the cpsw NIC to assure the free tx
descriptors are reclaimed as soon as possible.
Without this the free buffers are reclaimed only on watchdog runs or after
trying to enqueue more packets.
Sponsored by: Rubicon Communications, LLC (Netgte)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix a typo.
Sort and remove unnecessary includes.
Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().
Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a sysctl to control the interrupt pacing on AM335x integrated switch.
The hardware can be set to limit the number of interrupts from 2 to 63
interrupts per ms.
To keep the compatibility with the TI documentation the sysctl take the
interval between the interrupts pulses: 16~500 us.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow the use of control module extensions to cope with specific platform
features.
Add a driver for the AM335x bandgap sensor, an on-die temperature sensor
as part of the AM335x control module extension.
TI says that the bandgap sensor is not very accurate on AM335x, but in our
tests it seems to be a good reference for the SoC temperature.
TI details:
http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace magic numbers with the proper register names.
Fix the build, revert r305119, move the control module register data to
am335x_scm.h and fix if_cpsw.c to include the correct header.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| | |
CS ivar is uint32_t, not int.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix device delete child function.
When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().
Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.
While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.
Tested by: Jan Henrik Sylvester <me@janh.de>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8070
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r304459:
INTRNG: Rework handling with resources. Partially revert r301453.
- Read interrupt properties at bus enumeration time and store
it into global mapping table.
- At bus_activate_resource() time, given mapping entry is resolved and
connected to real interrupt source. A copy of mapping entry is attached
to given resource.
- At bus_setup_intr() time, mapping entry stored in resource is used
for delivery of requested interrupt configuration.
- For MSI/MSIX interrupts, mapping entry is created within
pci_alloc_msi()/pci_alloc_msix() call.
- For legacy PCI interrupts, mapping entry must be created within
pcib_route_interrupt() by pcib driver itself.
r305527:
Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459
|
| |
| |
| |
| | |
ARM: Remove unused includes.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r306530:
Declare a module for evdev and add dependency to ukbd(4) and ums(4)
Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.
r306531:
Add dependency to evdev module (if required)
r306532:
Add dependency to evdev module
r306579:
Modularize evdev
- Convert "options EVDEV" to "device evdev" and "device uinput", add
modules for both new devices. They are isolated subsystems and do not
require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
events add option EVDEV_SUPPORT. Update all existing hybrid drivers
to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
is enough
- Add evdev module dependency to uinput
Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r305708:
Add evdev support to TI ADC/touchscreen driver
Add generic evdev support to touchscreen part of ti_adc: two absolute
coordinates + button touch to indicate pen position. Pressure value
reporting is not implemented yet.
Tested on: Beaglebone Black + 4DCAPE-43T + tslib
r305719:
Cleanup evdev support for TI ADC/TS
- evdev_set_methods call is not required if actual methods are no-ops
- evdev_set_serial is also optional if there is no meaningful input device
identifier
- evdev_set_id on the other hand is mandatory, so set virtual bus with
dummy vendor/product/version
Suggested by: Vladimir Kondratiev
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it
directly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If present, honor the USB port mode (host or peripheral) set on DTS, if not,
keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host.
This is only a workaround as in fact fact this hardware is capable of detect
the USB port mode based on type of cable and act according with the detected
mode. Unfortunately the driver does not handle that at moment.
Sponsored by: Rubicon Communications, LLC (Netgate)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host.
This is only a workaround as in fact fact this hardware is capable of detect
the USB port mode based on type of cable and act according with the detected
mode. Unfortunately the driver does not handle that at moment.
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC (Netgate)
(cherry picked from commit 4d828af2f5b1ea01fc109c4267cf54c1b5fe8104)
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Remove explicit mtx_lock/mtx_unlock around knlist_add and pass 0 as
locked parameter so knlist_add does the locking itself
Suggested by: kib@
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix TI PRUSS driver panic with INVARIANTS enabled
Value passed as islocked argument to knlist_add should
be consistent with actual lock state so add lock/unlock
calls around knlist_add
PR: 212120
Submitted by: Manuel Stuhn
|