summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
Commit message (Collapse)AuthorAgeFilesLines
* ethernet: chelsio: use eth_hw_addr_set()Jakub Kicinski2021-10-021-1/+2
| | | | | | | | Convert chelsio drivers from memcpy() and ether_addr_copy() to eth_hw_addr_set(). They lack includes. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: fix t4vf_eth_xmit()'s return typeLuc Van Oostenryck2020-06-281-1/+1
| | | | | | | | | | | The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Prefix adapter flags with CXGB4VFArjun Vynipadath2019-03-011-6/+6
| | | | | | | | | Some of these macros were conflicting with global namespace, hence prefixing them with CXGB4VF. Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Enter debugging mode if FW is inaccessibleArjun Vynipadath2019-02-281-0/+1
| | | | | | | | | If we are not able to reach firmware, enter debugging mode that will help us to get adapter logs. Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()Arjun Vynipadath2019-02-031-1/+2
| | | | | | | | | | | | | | {t4/t4_vf}_change_mac() API's were only doing additions to MPS_TCAM. This will fail, when the number of tcam entries is limited particularly in vf's. This fix programs hash region with the mac address, when TCAM addtion fails for {t4/t4vf}_change_mac(). Since the locally maintained driver list for hash entries is shared across mac_{sync/unsync}(), added an extra parameter if_mac to track the address added thorugh {t4/t4vf}_change_mac() Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4/cxgb4vf: add support for ndo_set_vf_vlanGanesh Goudar2018-01-241-0/+1
| | | | | | | | | implement ndo_set_vf_vlan for mgmt netdevice to configure the PCIe VF. Original work by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/cxgb4vf: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flagCasey Leedom2017-08-141-0/+1
| | | | | | | | | | | cxgb4vf Ethernet driver now queries PCIe configuration space to determine if it can send TLPs to it with the Relaxed Ordering Attribute set, just like the pf did. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Reviewed-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Synchronize access to mailboxHariprasad Shenai2016-06-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The issue comes when there are multiple threads attempting to use the mailbox facility at the same time. The issue is the for the Virtual Function Driver, the only way to get the Virtual Interface statistics is to issue mailbox commands to ask the firmware for the VI Stats. And, because the VI Stats command can only retrieve a smallish number of stats per mailbox command, we have to issue three mailbox commands in quick succession. When ethtool or netstat command to get interface stats and interface up/down is run in a loop for every 0.1 sec, we observed mailbox collisions. And out of the two commands one would fail with the present code, since we don't queue the second command. To overcome the above issue, added a queue to access the mailbox. Whenever a mailbox command is issued add it to the queue. If its at the head issue the mailbox command, else wait for the existing command to complete. Usually command takes less than a milli-second to complete. Also timeout from the loop, if the command under execution takes long time to run. In reality, the number of mailbox access collisions is going to be very rare since no one runs such abusive script. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add support to enable logging of firmware mailbox commands for VFHariprasad Shenai2016-04-291-0/+4
| | | | | | | | | | Add new /sys/kernel/debug/ support to dump firmware mailbox commands and replies for debugging purpose. Based on original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Use __dev_uc_sync/__dev_mc_sync to sync MAC addressHariprasad Shenai2016-02-181-0/+8
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Fix ethtool get_settings for VF driverHariprasad Shenai2014-12-221-0/+4
| | | | | | | Decode and display Port Type and Module Type for ethtool get_settings() call Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4/cxgb4vf: Use new interfaces to calculate BAR2 SGE Queue Register addressesHariprasad Shenai2014-12-091-0/+7
| | | | | | | | | | Use BAR2 Going To Sleep (GTS) for T5 and later. Use new BAR2 User Doorbells for T5 for both cxgb4 and cxgb4vf driver. Based on original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Move fl_starv_thres into adapter->sge data structureHariprasad Shenai2014-11-101-0/+8
| | | | | | | | | | | Move fl_starv_thres into adapter->sge data structure since it _could_ be different from adapter to adapter. Also move other per-adapter SGE values which had been treated as driver globals into adapter->sge. Based on original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: added much cleaner implementation of is_t4()Hariprasad Shenai2013-12-031-1/+0
| | | | | Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: Add support for Chelsio T5 adapterSantosh Rastapur2013-03-141-0/+1
| | | | | | Signed-off-by: Santosh Rastapur <santosh@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* remove init of dev->perm_addr in driversJiri Pirko2013-01-081-1/+0
| | | | | | | | perm_addr is initialized correctly in register_netdevice() so to init it in drivers is no longer needed. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: convert to SKB paged frag API.Ian Campbell2011-10-211-1/+1
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Casey Leedom <leedom@chelsio.com> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* chelsio: Move the Chelsio driversJeff Kirsher2011-08-101-0/+534
Moves the drivers for the Chelsio chipsets into drivers/net/ethernet/chelsio/ and the necessary Kconfig and Makefile changes. CC: Divy Le Ray <divy@chelsio.com> CC: Dimitris Michailidis <dm@chelsio.com> CC: Casey Leedom <leedom@chelsio.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>