aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/common
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix iw_cxgbe build in the projects branch.Navdeep Parhar2017-11-141-0/+3
| | | | | | | | | | | | | | Submitted by: Krishnamraju Eraparaju @ Chelsio Notes: svn path=/projects/bsd_rdma_4_9/; revision=325797
* | Merge ^/head r325505 through r325662.Hans Petter Selasky2017-11-101-2/+9
|\| | | | | | | Notes: svn path=/projects/bsd_rdma_4_9/; revision=325663
| * cxgbe(4): Do not request settings not supported by the port.Navdeep Parhar2017-11-091-2/+9
| | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=325596
* | Update the iw_cxgbe bits in the projects branch.Navdeep Parhar2017-11-072-0/+97
|/ | | | | | | | Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Notes: svn path=/projects/bsd_rdma_4_9/; revision=325522
* cxgbe(4): Read the MPS buffer group map from the firmware as it could beNavdeep Parhar2017-10-242-4/+25
| | | | | | | | | | | | different from hardware defaults. The congestion channel map, which is still fixed, needs to be tracked separately now. Change the congestion setting for TOE rx queues to match the drivers on other OSes while here. MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=324945
* cxgbe(4): Remove write only variable from t4_port_init.Navdeep Parhar2017-08-281-3/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=322962
* cxgbe(4): Verify that the driver accesses the firmware mailbox in aNavdeep Parhar2017-08-281-0/+3
| | | | | | | | | thread-safe manner. MFC after: 3 days Notes: svn path=/head/; revision=322960
* cxgbe(4): Dump the mailbox contents in the same format as CH_DUMP_MBOX.Navdeep Parhar2017-08-251-3/+3
| | | | | | | | MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=322914
* cxgbe(4): Save the last reported link parameters and compare them withNavdeep Parhar2017-08-121-8/+9
| | | | | | | | | | | | | the current state to determine whether to generate a link-state change notification. This fixes a bug introduced in r321063 that caused the driver to sometimes skip these notifications. Reported by: Jason Eggleston @ LLNW MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=322425
* cxgbe(4): Allow the TOE timer tunables to be set with microsecondNavdeep Parhar2017-08-041-5/+2
| | | | | | | | | | | precision. These timers are already displayed in microseconds in the sysctl MIB. Add variables to track these tunables while here. MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=322055
* cxgbe(4): Initial import of the "collect" component of Chelsio unifiedNavdeep Parhar2017-08-031-1/+10
| | | | | | | | | | | | | | | debug (cudbg) code, hooked up to the main driver via an ioctl. The ioctl can be used to collect the chip's internal state in a compressed dump file. These dumps can be decoded with the "view" component of cudbg. Obtained from: Chelsio Communications MFC after: 2 months Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=322014
* cxgbe(4): Some updates to the common code.Navdeep Parhar2017-07-262-247/+420
| | | | | | | | | | | | | - Updated register ranges. - Helper routines for access to TP registers. - Updated routine to read flash parameters. Obtained from: Chelsio Communications MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=321582
* cxgbe(4): Display some more TOE parameters related to retransmissionNavdeep Parhar2017-07-241-0/+9
| | | | | | | | | | | | and keepalive in the sysctl MIB. Provide tunables to change some of these parameters. These are supposed to be setup by the firmware so these tunables are for experimentation only. MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=321435
* cxgbe(4): Install the firmware bundled with the driver to the card if itNavdeep Parhar2017-07-232-0/+27
| | | | | | | | | | | | doesn't seem to have one. This lets the driver recover automatically from incomplete firmware upgrades (panic, reboot, power loss, etc. in the middle of an upgrade). MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=321390
* cxgbe(4): Various link/media related improvements.Navdeep Parhar2017-07-172-124/+145
| | | | | | | | | | | | | | | | | | | | | | | | - Deal with changes to port_type, and not just port_mod when a transceiver is changed. This fixes hot swapping of transceivers of different types (QSFP+ or QSA or QSFP28 in a QSFP28 port, SFP+ or SFP28 in a SFP28 port, etc.). - Always refresh media information for ifconfig if the port is down. The firmware does not generate tranceiver-change interrupts unless at least one VI is enabled on the physical port. Before this change ifconfig diplayed potentially stale information for ports that were administratively down. - Always recalculate and reapply L1 config on a transceiver change. - Display PAUSE settings in ifconfig. The driver sysctls for this continue to work as well. MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=321063
* cxgbe(4): Do not request an FEC setting that the port does not support.Navdeep Parhar2017-06-121-0/+1
| | | | | | | | MFC after: 3 days. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=319872
* cxgbe(4): Support routines for Tx traffic scheduling.Navdeep Parhar2017-05-022-0/+80
| | | | | | | | | | | | | | | | - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=317702
* cxgbe: Add a tunable to configure the SGE time scaler, which isNavdeep Parhar2017-04-152-8/+17
| | | | | | | | | | | | | | available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev.<nexus>.<n>.holdoff_timers shows the final values of the timers in microseconds. MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=316971
* cxgbe: Query some more RDMA related parameters from the firmware.Navdeep Parhar2017-04-131-0/+3
| | | | | | | | MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=316774
* cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs.Navdeep Parhar2017-03-291-1/+2
| | | | | | | | MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=316172
* cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the cryptoNavdeep Parhar2017-01-101-1/+594
| | | | | | | | | | | engine. Obtained from: Chelsio Communications MFC after: 2 weeks Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=311846
* cxgbe(4): Updates to link configuration.Navdeep Parhar2016-12-302-23/+57
| | | | | | | | | | | | | | | | | | | | - Update struct link_settings and associated shared code. - Add tunables to control FEC and autonegotiation. All ports inherit these values as their initial settings. hw.cxgbe.fec hw.cxgbe.autoneg - Add per-port sysctls to control FEC and autonegotiation. These can be modified at any time. dev.<port>.<n>.fec dev.<port>.<n>.autoneg MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=310807
* cxgbe(4): Fix typo in an unused macro.Navdeep Parhar2016-12-161-1/+1
| | | | | | | | MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=310152
* cxgbe(4): Deal with compressed error vectors.Navdeep Parhar2016-12-153-5/+10
| | | | | | | | MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=310100
* cxgbe(4): unsigned short isn't large enough to store link speed (whichNavdeep Parhar2016-12-071-2/+2
| | | | | | | | | is in Mbps) for 100Gbps links. MFC after: 3 days Notes: svn path=/head/; revision=309666
* cxgbe(4): Update firmwares from version 1.16.12.0 to 1.16.22.0.Navdeep Parhar2016-12-061-2/+1
| | | | | | | | | Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=309613
* cxgbe(4): Include firmware for T6 cards in the driver. Update allNavdeep Parhar2016-11-302-6/+16
| | | | | | | | | | | firmwares to 1.16.12.0. Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=309302
* cxgbe(4): Accurate statistics for all chip settings.Navdeep Parhar2016-10-281-8/+14
| | | | | | | | | | There are 4 independent knobs in T5+ chips to include or exclude PAUSE frames from the "total frames" and "multicast frames" counters in either direction. This change lets the driver deal with any combination of these settings. Notes: svn path=/head/; revision=308066
* cxgbe(4): Dump any mailbox command that times out.Navdeep Parhar2016-10-221-0/+15
| | | | Notes: svn path=/head/; revision=307759
* cxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.Navdeep Parhar2016-09-171-0/+4
| | | | | | | Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=305906
* cxgbe(4): Add support for additional port types and link speeds.Navdeep Parhar2016-09-111-2/+12
| | | | | | | Sponsored by: Chelsio Communications. Notes: svn path=/head/; revision=305713
* cxgbe(4): Update the pad_boundary calculation for T6, which has aNavdeep Parhar2016-09-112-2/+15
| | | | | | | | | different range of boundaries. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=305699
* cxgbe(4): Set up fl_starve_threshold2 accurately for T6.Navdeep Parhar2016-09-112-3/+6
| | | | | | | Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=305695
* Chelsio T4/T5 VF driver.John Baldwin2016-09-073-2/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) and as such the VF device driver currently depends on the PF4 driver. Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf PCI device driver that attaches to the VF device. It then creates child cxgbev/cxlv devices representing ports assigned to the VF. By default, the PF driver assigns a single port to each VF. t4vf_hw.c contains VF-specific routines from the shared code used to fetch VF-specific parameters from the firmware. t4_vf.c contains the VF-specific PCI device driver and includes its own attach routine. VF devices are required to use a different firmware request when transmitting packets (which in turn requires a different CPL message to encapsulate messages). This alternate firmware request does not permit chaining multiple packets in a single message, so each packet results in a firmware request. In addition, the different CPL message requires more detailed information when enabling hardware checksums, so parse_pkt() on VF devices must examine L2 and L3 headers for all packets (not just TSO packets) for VF devices. Finally, L2 checksums on non-UDP/non-TCP packets do not work reliably (the firmware trashes the IPv4 fragment field), so IPv4 checksums for such packets are calculated in software. Most of the other changes in the non-VF-specific code are to expose various variables and functions private to the PF driver so that they can be used by the VF driver. Note that a limited subset of cxgbetool functions are supported on VF devices including register dumps, scheduler classes, and clearing of statistics. In addition, TOE is not supported on VF devices, only for the PF interfaces. Reviewed by: np MFC after: 2 months Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7599 Notes: svn path=/head/; revision=305549
* cxgbe(4): Provide more details about the card in the sysctl MIB.Navdeep Parhar2016-08-272-3/+128
| | | | | | | | | | | | | | | | | | | | dev.t5nex.0.%desc: Chelsio T580-CR dev.t5nex.0.hw_revision: 1 dev.t5nex.0.sn: PT13140042 dev.t5nex.0.pn: 110117150A0 dev.t5nex.0.ec: 0000000000000000 dev.t5nex.0.na: 0007432AF490 dev.t5nex.0.vpd_version: 3 dev.t5nex.0.scfg_version: 53255 dev.t5nex.0.bs_version: 1.1.0.0 dev.t5nex.0.er_version: 1.0.0.68 dev.t5nex.0.tp_version: 0.1.4.9 dev.t5nex.0.firmware_version: 1.16.2.0 Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=304873
* Adjust t4_port_init() to work with VF devices.John Baldwin2016-08-191-17/+20
| | | | | | | | | | | | | | Specifically, the FW_PORT_CMD may or may not work for a VF (the PF driver can choose whether or not to permit access to this command), so don't attempt to fetch port information on a VF if permission is denied by the PF. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7511 Notes: svn path=/head/; revision=304482
* Add structures for VF-specific adapter parameters.John Baldwin2016-08-191-2/+42
| | | | | | | | | | | While here, mark which parameters are PF-specific and which are VF-specific. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7508 Notes: svn path=/head/; revision=304479
* Add support for register dumps on VF devices.John Baldwin2016-08-151-6/+61
| | | | | | | | | | | | | - Add handling of VF register sets to t4_get_regs_len() and t4_get_regs(). - While here, use t4_get_regs_len() in the ioctl handler for regdump instead of inlining it. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7484 Notes: svn path=/head/; revision=304170
* Update mailbox writes to work with VF devices.John Baldwin2016-08-151-4/+31
| | | | | | | | | | | | | | | - Use alternate register locations for the data and control registers for VFs. - Do a dummy read to force the writes to the mailbox data registers to post before the write to the control register on VFs. - Do not check the PCI-e firmware register for errors on VFs. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7483 Notes: svn path=/head/; revision=304169
* Make SGE parameter handling more VF-friendly.John Baldwin2016-08-152-0/+7
| | | | | | | | | | | | | | | | | | | | Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() for PF devices and change t4_read_chip_settings() to pull these values out of the params structure instead of reading registers directly. This will permit t4_read_chip_settings() to be reused for VF devices which cannot read SGE registers directly. While here, move the call to t4_init_sge_params() to get_params__post_init(). The VF driver will populate the SGE parameters structure via a different method before calling t4_read_chip_settings(). Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7476 Notes: svn path=/head/; revision=304168
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-3/+3
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys: use our roundup2/rounddown2() macros when param.h is available.Pedro F. Giffuni2016-04-211-2/+2
| | | | | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted. Notes: svn path=/head/; revision=298433
* cxgbe(4): Always read the entire mailbox into the reply buffer.Navdeep Parhar2016-04-121-1/+1
| | | | | | | | | | | The size of the reply can be different from the size of the command in case a debug firmware asserts. fw_asrt() needs the entire reply in order to decode the location of the assert. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=297875
* Rename the 'M_B' macro in t4_regs.h to 'CXGBE_M_B'.John Baldwin2016-04-121-2/+2
| | | | | | | | | | | | | This fixes a conflict with the M_B macro in powerpc's <machine/db_machdep.h> exposed by the recent addition of DDB commands to the cxgbe driver. Discussed with: np Reported by: bz Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=297863
* cxgbe(4): Tidy up PAUSE frame accounting.Navdeep Parhar2016-03-171-0/+15
| | | | | | | | | | | | | | Figure out if the chip is counting PAUSE frames in the "normal" stats and take them out if it is. This fixes a bug in the tx stats because the default hardware behavior is different for Tx and Rx but the driver was treating both the same way. The result was that OPACKETS, OBYTES, and OMCASTS were under-reported (if tx_pause > 0) before this change. Note that the mac_stats sysctl still gives you the raw value of these statistics straight from the device registers. Notes: svn path=/head/; revision=296975
* cxgbe(4): Add sysctls to display the TP microcode version and theNavdeep Parhar2016-03-111-0/+1
| | | | | | | | | | | | | | expansion rom version (if there's one). trantor:~# sysctl dev.t4nex dev.t5nex | grep _version dev.t4nex.0.firmware_version: 1.15.28.0 dev.t4nex.0.tp_version: 0.1.9.4 dev.t5nex.0.firmware_version: 1.15.28.0 dev.t5nex.0.exprom_version: 1.0.0.68 dev.t5nex.0.tp_version: 0.1.4.9 Notes: svn path=/head/; revision=296641
* cxgbe(4): Improvements to the code that deals with the firmware's log.Navdeep Parhar2016-03-101-0/+1
| | | | | | | | | | | - Query the location of the log very early during attach. Refresh the location later after establishing contact with the firmware. - Save the log's location as a flat address in devlog_params. - Use a memory window instead of backdoor access to the EDC/MC to read the log. Notes: svn path=/head/; revision=296627
* cxgbe(4): Add general purpose routines that offer safe access to theNavdeep Parhar2016-03-101-19/+0
| | | | | | | | chip's memory windows. Convert existing users of these windows to the new routines. Notes: svn path=/head/; revision=296603
* cxgbe(4): Reshuffle and rototill t4_hw.c, solely to reduce diffs withNavdeep Parhar2016-03-081-817/+920
| | | | | | | | | the internal shared code. Obtained from: Chelsio Communications Notes: svn path=/head/; revision=296544
* cxgbe(4): Minor updates to the shared routines that deal with firmware images.Navdeep Parhar2016-03-082-85/+58
| | | | Notes: svn path=/head/; revision=296496