- 27 12月, 2017 7 次提交
-
-
由 Fuyun Liang 提交于
When checking whether auto-negotiation is on, driver only needs to check the value of mac.autoneg(SW) directly, and does not need to query it from hardware. Because this value is always synchronized with the auto-negotiation state of hardware. This patch removes the mac auto-negotiation state query. Signed-off-by: NFuyun Liang <liangfuyun1@huawei.com> Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
This patch adds offload command related to "ethtool -K". Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
This patch adds vlan offload config commands, initializes the rules of tx/rx vlan tag handle for hw. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
This patch sets vlan masked, in order to avoid the received packets being filtered. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
Add configuration for rss_size_max in hdev but not hardcode it. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NMingguang Qu <qumingguang@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
This patch adds the support to change tqps number for PF driver by using ehtool -L command. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NMingguang Qu <qumingguang@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Peng Li 提交于
This patch adds the support to query tqps number for PF driver by using ehtool -l command. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NMingguang Qu <qumingguang@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 12月, 2017 3 次提交
-
-
由 Salil Mehta 提交于
All PF mailbox events are conveyed through a common interrupt (vector 0). This interrupt vector is shared by reset and mailbox. This patch adds the handling of mailbox interrupt event and its deferred processing in context to a separate mailbox task. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Salil Mehta 提交于
This patch is required to support ring-vector binding and reset of TQPs requested by the VF driver to the PF driver. Mailbox handler is added with corresponding VF commands/messages to handle the request. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Salil Mehta 提交于
Command queue provides the provision of Mailbox command which can be used for communication between PF and VF. PF handles messages from various VFs for fetching various information like, queue, vlan, link status related etc. It also handles the request from various VFs to perform certain privileged operations. This patch adds the support of a message handler for handling such various command requests from VF. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 12月, 2017 3 次提交
-
-
由 Salil Mehta 提交于
In exisiting code, the way to detect if driver/client reset should be executed or if hardware should be be soft resetted was overly complex. Existing code use to read the interrupt status register from task context to figure out if the interrupt source event was reset and then use clear the interrupt source for reset while waiting for the hardware to finish the reset. This behaviour again was confusing and overly complex in terms of the flow. This patch simplifies the handling of the requested reset and the pending reset(i.e. reset which have already been asserted by the software and hardware has acknowledged back to driver that it is processing the hardware reset through interrupt) Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Salil Mehta 提交于
Existing common service task was being used to service the reset requests. This patch tries to make the handling of reset cleaner by separating task to handle the reset requests. This might in turn help in adapting similar handling approach for other interrupt events like mailbox, sharing vector 0 interrupt. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Salil Mehta 提交于
The reset interrupt event shares common miscellaneous interrupt Vector 0. In the existing reset interrupt handling we disable the Vector 0 interrupt in misc interrupt handler and re-enable them later in context to common service task. This also means other event sources like mailbox would also be deferred or if the interrupt event was due to mailbox(which shall be supported for VF soon), it could delay the reset handling. This patch reorganizes the reset interrupt handling logic and makes it more fair to other events. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Signed-off-by: Nlipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 14 11月, 2017 1 次提交
-
-
由 Salil Mehta 提交于
This patch migrates the HNS3 driver code from use of depricated PCI MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. Signed-off-by: NSalil Mehta <salil.mehta@huawei.com> Suggested-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 11 11月, 2017 1 次提交
-
-
由 Fuyun Liang 提交于
When checking whether auto-negotiation is on, driver only needs to check the value of mac.autoneg(SW) directly, and does not need to query it from hardware. Because this value is always synchronized with the auto-negotiation state of hardware. This patch removes mac auto-negotiation state query in hclge_update_speed_duplex(). Fixes: 46a3df9f (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: NFuyun Liang <liangfuyun1@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 11月, 2017 6 次提交
-
-
由 qumingguang 提交于
All member of Struct hdev->hw_stats is initialized to 0 as hdev is allocated by devm_kzalloc. But in reset process, hdev will not be allocated again, so need clear hdev->hw_stats in reset process, otherwise the statistic will be wrong after reset. This patch set all of the statistic counters to zero after reset. Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
This patch adds reset support for PF,it include : global reset, core reset, IMP reset, PF reset.The core reset will Reset all datapath of all functions except IMP, MAC and PCI interface. Global reset is equal with the core reset plus all MAC reset. IMP reset is caused by watchdog timer expiration, the same with core reset in the reset flow. PF reset will reset whole physical function. Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
This patch adds initialization and deinitialization for misc interrupt. This interrupt will be used to handle reset message(IRQ). Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
There is no necessary to reallocate the descriptor and remap the descriptor memory in reset process, But there is still some other action exist in both reset process and initialization process. To reuse the common interface in reset process and initialization process, This patch moves out the descriptor allocate and memory maping from interface cmdq_init. Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 qumingguang 提交于
It needs initialize mdio in initialization process, but reset process does not reset mdio, so do not initialize mdio in reset process. This patch move out the mdio configuration function from the mac_init. So mac_init can be used both in reset process and initialization process. Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
This patch refactor the mapping of tqp to vport, making the maping function can be used both in the reset process and initialization process. Signed-off-by: Nqumingguang <qumingguang@huawei.com> Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 10月, 2017 3 次提交
-
-
由 Lipeng 提交于
When reusing a command description read from HW, driver should set IN_VLD bit, WR bit and NO_INTR bit. If IN_VLD bit and NO_INTR bit are not set, the command fails and driver prints error message: [ 135.261284] hns3 0000:7d:00.0: cmdq execute failed for get_mac_vlan_cmd_status,status=2. [ 135.270983] hns3 0000:7d:00.0: add mac addr failed for cmd_send, ret =-5. This patch fixes the bug. Fixes: 46a3df9f (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
HNS3 driver initialize hdev->roce_client and vport->roce.client in hclge_init_client_instance, and need set hdev->roce_client and vport->roce.client NULL. If do not set them NULL when uninit, it will fail in the scene: insmod hns3.ko, hns-roce.ko, hns-roce-hw-v3.ko successfully, but rmmod hns3.ko after rmmod hns-roce-hw-v2.ko and hns-roce.ko. This patch fixes the issue. Fixes: 46a3df9f (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
Roce driver works base on HNS3 driver.If insmod Roce driver before NIC driver there is a error because do not check nic_client. This patch adds nic_client check when initialize roce base information. Fixes: 46a3df9f (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 24 10月, 2017 1 次提交
-
-
由 Lipeng 提交于
This patch gets vf count by standard function pci_sriov_get_totalvfs, instead of info from NIC HW. Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 22 10月, 2017 1 次提交
-
-
由 Yunsheng Lin 提交于
This patch adds mac loopback selftest support for ethtool cmd by checking if a transmitted packet can be received correctly when mac loopback is enabled. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 18 10月, 2017 1 次提交
-
-
由 Kees Cook 提交于
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches test of .data field to .function, since .data will be going away. Cc: Yisen Zhuang <yisen.zhuang@huawei.com> Cc: Salil Mehta <salil.mehta@huawei.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: lipeng <lipeng321@huawei.com> Cc: Lin Yun Sheng <linyunsheng@huawei.com> Cc: Kejian Yan <yankejian@huawei.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: netdev@vger.kernel.org Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 11 10月, 2017 2 次提交
-
-
由 Lipeng 提交于
This patch add support for ethtool's ETHTOOL_GRXFH in hns3_get_rxnfc(). Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lipeng 提交于
This patch supports the ethtool's set_rxnfc(). Signed-off-by: NLipeng <lipeng321@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 10月, 2017 4 次提交
-
-
由 Yunsheng Lin 提交于
This patch fixes the following warning from sparse: warning: symbol 'hns3_set_multicast_list' was not declared. Should it be static. hns3_set_multicast_list turns out to be not used, so delete it. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
This patch fixes a lot of endian issues detected by sparse. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
The hclge_tm module has already added _cmd to the end of struct that used to send cmd to firmware. This will help us finding the endian issues. This patch adds the _cmd to the end of struct that used to send cmd to firmware in hclge_main module. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
This patch fixes a shifting true in hclge_main module. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 10月, 2017 1 次提交
-
-
由 Christophe JAILLET 提交于
If this sanity check fails, we must free 'rss_indir'. Otherwise there is a memory leak. 'goto err' as done in the other error handling paths to fix it. Fixes: 46a3df9f ("net: hns3: Fix for setting rss_size incorrectly") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 9月, 2017 4 次提交
-
-
由 Yunsheng Lin 提交于
The hclge_dcb module calls the interface from hclge_main/tm and provide interface for the dcb netlink interface. This patch also update Makefiles required to build the DCB supported code in HNS3 Ethernet driver and update the existing Kconfig file in the hisilicon folder. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
This patch add some interface and export some interface from hclge_tm and hclgc_main to support the upcoming DCB feature. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
Current buffer allocation can only happen at init, when doing buffer reallocation after init, care must be taken care of memory which priv_buf points to. This patch fixes it by using a dynamic allocated temporary memory. Because we only do buffer reallocation at init or when setting up the DCB parameter, and priv_buf is only used at buffer allocation process, so it is ok to use a dynamic allocated temporary memory. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
This patch add support of dynamically assigning tx buffer to TC when the TC is enabled. It will save buffer for rx direction to avoid packet loss. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 21 9月, 2017 2 次提交
-
-
由 Yunsheng Lin 提交于
rss_size is 1, 2, 4, 8, 16, 32, 64, 128, but acutal tc queue size can be any u16 less than 128. If tc queue size is 5, we set the rss_size to 8, indirection table will be used to limit the size of actual queue size. It may cause dropping of receiving packet in hardware if rss_size is not set correctly. For now, each TC has the same rss size. Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
When hdev doesn't support DCB, rx private buffer is not allocated, otherwise there is not enough buffer for rx shared buffer, causing buffer allocation process to fail. This patch fixes by checking the dcb capability in hclge_rx_buffer_calc. Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-