- Aug 31, 2019
-
-
Michael Chan authored
This call will handle fatal firmware errors by forcing a reset on the firmware. The master function driver will carry out the forced reset. The sequence will go through the same bnxt_fw_reset_task() workqueue. This fatal reset differs from the non-fatal reset at the beginning stages. From the BNXT_FW_RESET_STATE_ENABLE_DEV state onwards where the firmware is coming out of reset, it is practically identical to the non-fatal reset. The next patch will add the periodic heartbeat check and the devlink reporter to report the fatal event and to initiate the bnxt_fw_exception() call. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
This state handles driver initiated chip reset during error recovery. Only the master function will perform this step during error recovery. The next patch will add code to initiate this reset from the master function. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Add a flag to mark that the firmware has encountered fatal condition. The driver will not send any more firmware messages and will return error to the caller. Fix up some clean up functions to continue and not abort when the firmware message function returns error. This is preparation work to fully handle firmware error recovery under fatal conditions. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Vasundhara Volam authored
Retain the VF MAC address, default VLAN, TX rate control, trust settings of VFs after firmware reset. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Vasundhara Volam authored
Add devlink health reporter for the firmware reset event. Once we get the notification from firmware about the impending reset, the driver will report this to devlink and the call to bnxt_fw_reset() will be initiated to complete the reset sequence. Cc: Jiri Pirko <jiri@mellanox.com> Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Add the bnxt_fw_reset() main function to handle firmware reset. This is triggered by firmware to initiate an orderly reset, for example when a non-fatal exception condition has been detected. bnxt_fw_reset() will first wait for all VFs to shutdown and then start the bnxt_fw_reset_task() work queue to go through the sequence of reset, re-probe, and re-initialization. The next patch will add the devlink reporter to start the sequence and call bnxt_fw_reset(). Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
This event from firmware signals a coordinated reset initiated by the firmware. It may be triggered by some error conditions encountered in the firmware or other orderly reset conditions. We store the parameters from this event. Subsequent patches will add logic to handle reset itself using devlink reporters. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Vasundhara Volam authored
Create new FW devlink_health_reporter, to know the current health status of FW. Command example and output: $ devlink health show pci/0000:af:00.0 reporter fw pci/0000:af:00.0: name fw state healthy error 0 recover 0 FW status: Healthy; Reset count: 1 Cc: Jiri Pirko <jiri@mellanox.com> Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The new flag will be set in subsequent patches when firmware is going through reset. If bnxt_close() is called while the new flag is set, the FW reset sequence will have to be aborted because the NIC is prematurely closed before FW reset has completed. We also reject SRIOV configurations while FW reset is in progress. v2: No longer drop rtnl_lock() in close and wait for FW reset to complete. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Handle the async event from the firmware that enables firmware health monitoring. Store initial health metrics. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Pre-map the GRC registers for periodic firmware health monitoring. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Call the new firmware API HWRM_ERROR_RECOVERY_QCFG if it is supported to discover the firmware health and recovery capabilities and settings. This feature allows the driver to reset the chip if firmware crashes and becomes unresponsive. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
During IF_UP, newer firmware has a new status flag that indicates that firmware has reset. Add new function bnxt_fw_init_one() to re-probe the firmware and re-setup VF resources on the PF if necessary. If the re-probe fails, set a flag to prevent bnxt_open() from proceeding again. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Vasundhara Volam authored
When VFs need to be reconfigured dynamically after firmwware reset, the configuration sequence on the PF needs to be changed to register the VF buffers first. Otherwise, some VF firmware commands may not succeed as there may not be PF buffers ready for the re-directed firmware commands. This sequencing did not matter much before when we only supported the normal bring-up of VFs. Signed-off-by:
Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Refactor the hardware/firmware configuration portion in bnxt_sriov_enable() into a new function bnxt_cfg_hw_sriov(). This new function can be called after a firmware reset to reconfigure the VFs previously enabled. v2: straight refactor of the code. Reordering done in the next patch. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
In preparation for the new firmware reset feature, some of the logic in bnxt_init_one() and related functions will be called again after firmware has reset. Reset some of the flags and capabilities so that everything that can change can be re-initialized. Refactor some functions to probe firmware versions and capabilities. Check some buffers before allocating as they may have been allocated previously. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
If the silent parameter is set, suppress all messages when there is no response from firmware. When polling for firmware to come out of reset, no response may be normal and we want to suppress the error messages. Also, don't poll for the firmware DMA response if Bus Master is disabled. This is in preparation for error recovery when firmware may be in error or reset state or Bus Master is disabled. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
There are 4 functions handling message forwarding for SR-IOV. They check for non-zero firmware response code and then return -1. There is no need to do this anymore. The main messaging function will now return standard error code. Since we don't need to examine the response, we can use the hwrm_send_message() variant which will take the mutex automatically. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The main firmware messaging function returns the firmware defined error code and many callers have to convert to standard error code for proper propagation to userspace. Convert bnxt_hwrm_do_send_msg() to return standard error code so we can do away with all the special error code handling by the many callers. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Replace the non-standard -1 code with -EBUSY when there is no firmware response after waiting for the maximum timeout. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The same message is printed 3 times in the code, so use a common function to do that. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Thomas Bogendoerfer says: ==================== ioc3-eth improvements In my patch series for splitting out the serial code from ioc3-eth by using a MFD device there was one big patch for ioc3-eth.c, which wasn't really usefull for reviews. This series contains the ioc3-eth changes splitted in smaller steps and few more cleanups. Only the conversion to MFD will be done later in a different series. Changes in v3: - no need to check skb == NULL before passing it to dev_kfree_skb_any - free memory allocated with get_page(s) with free_page(s) - allocate rx ring with just GFP_KERNEL - add required alignment for rings in comments Changes in v2: - use net_err_ratelimited for printing various ioc3 errors - added missing clearing of rx buf valid flags into ioc3_alloc_rings - use __func__ for printing out of memory messages ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
netif_stop_queue()/netif_wake_qeue() aren't needed for changing multicast filters. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
emcr in private struct wasn't always protected by spinlock. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
The half/full duplex settings for inter packet gap counters/timer were reversed. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
replace open coded checksum folding by csum_fold. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Replace the homegrown DMA memory allocation, which only works on SGI-IP27 machines, with the generic dma allocations. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Move common code for rx buffer setup into ioc3_alloc_skb and deal with allocation failures. Also clean up allocation size calculation. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Do tx ring cleaning and freeing of rx buffers, when chip is shutdown and allocate buffers before bringing chip up. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
ioc3_init did everything from reset to init rings to starting the chip. This change move out chip start into a new function as preparation for easier handling of receive buffer allocation failures. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
After allocation of descriptor memory is now done once in probe handling of tx ring is completely done by ioc3_clean_tx_ring. So we remove the remaining tx ring actions out of ioc3_alloc_rings and ioc3_free_rings and rename it to ioc3_[alloc|free]_rx_bufs to better describe what they are doing. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Move clearing of the descriptor valid bit into ioc3_alloc_rings. This makes ioc3_clean_rx_ring obsolete. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Memory for descriptor rings are allocated/freed, when interface is brought up/down. Since the size of the rings is not changeable by hardware, we now allocate rings now during probe and free it, when device is removed. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Descriptor ring sizes of the IOC3 are more or less fixed size. To make clearer where there is a relation to ring sizes use defines. Reviewed-by:
Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Before massaging the driver further fix oddities found by checkpatch like - wrong indention - comment formatting - use of printk instead or netdev_xxx/pr_xxx Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Break up the big ioc3 register struct into functional pieces to make use in sub-function drivers more straightforward. And while doing that get rid of all volatile access by using readX/writeX. Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Bogendoerfer authored
Removed not needed disabling of ethernet interrupts in IP27 platform code. Acked-by:
Paul Burton <paul.burton@mips.com> Signed-off-by:
Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Colin Ian King authored
The subtraction of the two pointers is automatically scaled by the size of the size of the object the pointers point to, so the division by sizeof(*i2400m->barker) is incorrect. This has been broken since day one of the driver and is only debug, so remove the debug completely. Also move && in condition to clean up a checkpatch warning. Addresses-Coverity: ("Extra sizeof expression") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 30, 2019
-
-
Gustavo A. R. Silva authored
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct spider_net_card { ... struct spider_net_descr darray[0]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct spider_net_card) + (tx_descriptors + rx_descriptors) * sizeof(struct spider_net_descr) with: struct_size(card, darray, tx_descriptors + rx_descriptors) Notice that, in this case, variable alloc_size is not necessary, hence it is removed. Building: allmodconfig powerpc. This code was detected with the help of Coccinelle. Signed-off-by:
Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Heiner Kallweit says: ==================== r8169: add support for RTL8125 This series adds support for the 2.5Gbps chip RTl8125. It can be found on PCIe network cards, and on an increasing number of consumer gaming mainboards. Series is partially based on the r8125 vendor driver. Tested with a Delock 89531 PCIe card against a Netgear GS110MX Multi-Gig switch. Firmware isn't strictly needed, but on some systems there may be compatibility issues w/o firmware. Firmware has been submitted to linux-firmware. v2: - split first patch into 6 smaller ones to facilitate bisecting ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-