- Apr 14, 2015
-
-
Felix Fietkau authored
Keep incrementing ring->start and ring->end instead of pointing it to the actual ring slot entry. This simplifies the calculation of the number of free slots. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 01, 2015
-
-
Petri Gynther authored
Currently, MoCA fixed PHYs are always in link-up state, regardless of whether the link is actually up or not. Add code to properly detect MoCA link state changes and to reflect the new state in MoCA fixed PHY. Only GENET V3 and V4 MACs are capable of detecting MoCA link state changes. The code works as follows: 1. GENET MAC detects MoCA link state change and issues UMAC_IRQ_LINK_UP or UMAC_IRQ_LINK_DOWN interrupt. 2. Link up/down interrupt is processed in bcmgenet_irq_task(), which calls phy_mac_interrupt(). 3. phy_mac_interrupt() updates the fixed PHY phydev->link and kicks the PHY state machine. 4. PHY state machine proceeds to read the fixed PHY link status register. 5. When the fixed PHY link status register is being read, the new function bcmgenet_fixed_phy_link_update() gets called. It copies the fixed PHY phydev->link value to the fixed PHY status->link. 6. PHY state machine receives the new link state of the fixed PHY. 7. MoCA fixed PHY link state now correctly reflects the real MoCA hardware link state. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Yuval Mintz authored
When IOMM-vtd is active, once main kernel crashes unfinished DMAE transactions will be blocked, putting the HW in an error state which will cause further transactions to timeout. Current employed logic uses wrong macros, causing the first function to be the only function that cleanups that error state during its probe/load. This patch allows all the functions to successfully re-load in kdump kernel. Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Yuval Mintz authored
When running in a kdump kernel, it's very likely that due to sync. loss with management firmware the first PCI function to probe and reach the previous unload flow would decide it can reset the chip and continue onward. While doing so, it will only close its own Rx port. On a 4-port device where 2nd port on engine is a 1g-port, the 2nd port would allow ingress traffic after the chip is reset [assuming it was active on the first kernel]. This would later cause a HW attention. This changes driver flow to close both ports' 1g capabilities during the previous driver unload flow prior to the chip reset. Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 31, 2015
-
-
Richard Cochran authored
This patch changes the driver to use ns_to_timespec64() instead of open coding the same logic. Compile tested only. Signed-off-by:
Richard Cochran <richardcochran@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Richard Cochran authored
This patch changes the driver to use ns_to_timespec64() and timespec64_to_ns() instead of open coding the same logic. Compile tested only. Signed-off-by:
Richard Cochran <richardcochran@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
On phy_mac_interrupt() call, the new_link parameter should be 0 or 1. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Add #define UMAC_IRQ_LINK_EVENT to simplify link event handling code. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
If bcmgenet_init_dma() fails, it cleans up after itself. Rx and Tx DMAs are off, and NAPI instances haven't been netif_napi_add()'ed. Therefore, we need to skip calling bcmgenet_fini_dma() on the error handling path. bcmgenet_resume() already does this correctly. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
bcmgenet_fini_dma() is the only caller of __bcmgenet_fini_dma(). Move __bcmgenet_fini_dma() code inside bcmgenet_fini_dma(). Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Add #define for UMAC_IRQ_RXDMA_DONE and UMAC_IRQ_TXDMA_DONE in order to simplify the code that handles Rx and Tx default queue interrupts. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joe Perches authored
Use bool constants as the return values instead of 1 and 0. Signed-off-by:
Joe Perches <joe@perches.com> Acked-by:
Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Yuval Mintz authored
It's possible that due to errors [either on PCI or on device itself] registers reads would fail, returning all-Fs. This adds a check as early as possible so that driver will not read junk values and make incorrect probe decisions according to them; instead, gracefully fail the probe. Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Yaniv Rosner authored
Number of link changes are now being stored in shared memory [by all possible link owners], for management use [as well as possible debug information for dumps]. Signed-off-by:
Yaniv Rosner <Yaniv.Rosner@qlogic.com> Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Yaniv Rosner authored
Enable controlling Post2, coeff, IPreDriver and IFir according to NVRAM setup. Signed-off-by:
Yaniv Rosner <Yaniv.Rosner@qlogic.com> Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Richard Cochran authored
The device appears to use a 64 bit nanoseconds register, and so with this patch the driver should be ready for the year 2038. Compile tested only. Signed-off-by:
Richard Cochran <richardcochran@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Richard Cochran authored
This driver's clock is implemented using a timecounter, and so with this patch the driver is ready for the year 2038. Compile tested only. Signed-off-by:
Richard Cochran <richardcochran@gmail.com> Acked-by:
Sony Chacko <sony.chacko@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 29, 2015
-
-
Toshiaki Makita authored
To allow drivers to handle the features check for multiple tags, move the check to ndo_features_check(). As no drivers currently handle multiple tagged TSO, introduce dflt_features_check() and call it if the driver does not have ndo_features_check(). Signed-off-by:
Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 27, 2015
-
-
Petri Gynther authored
Add support for multiple Rx queues: 1. Add NAPI context per Rx queue 2. Modify Rx interrupt and Rx NAPI code to handle multiple Rx queues Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Introduce new bcmgenet functions to handle the NAPI calls to: netif_napi_add() napi_enable() napi_disable() netif_napi_del() Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Introduce new bcmgenet functions to handle the NAPI calls to: netif_napi_add() napi_enable() napi_disable() netif_napi_del() Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Use more meaningful variable names int0_enable and int1_enable when enabling bcmgenet interrupts. For Rx default queue interrupts, use: UMAC_IRQ_RXDMA_BDONE | UMAC_IRQ_RXDMA_PDONE For Tx default queue interrupts, use: UMAC_IRQ_TXDMA_BDONE | UMAC_IRQ_TXDMA_PDONE Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Do the two kcalloc() calls first, before proceeding into Rx/Tx DMA init. Makes the error case handling much simpler. Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Reviewed-by:
Jaedon Shin <jaedon.shin@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Remove unnecessary function parameter priv. Use ring->priv instead. Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Remove unused priv->int0_mask and priv->int1_mask. Signed-off-by:
Petri Gynther <pgynther@google.com> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 24, 2015
-
-
Yuval Mintz authored
Statistics' state-machine in bnx2x driver must be synced with various driver flows, but its current locking scheme manages to be wasteful [using 2 locks + additional local variable] and prone to race-conditions at the same time, as the state-machine and 'action' are being accessed under different locks. In addition, current 'safe exec' isn't in fact safe, since the only guarantee it gives is that DMA transactions are over, but ramrods might still be running. This patch cleans up said logic, leaving us with a single lock for the entire flow and removing the possible races. Changes from v2: - Switched into mutex locking from semaphore locking. - Release locks on error flows. Changes from v1: Failure to acquire lock fails flow instead of printing a warning and allowing access to the critical section. Signed-off-by:
Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by:
Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In case the interface is not used, power down the integrated GPHY during suspend. Similarly to bcmgenet_open(), bcmgenet_resume() powers on the GPHY prior to any UniMAC activity. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Power up the GPHY while we are bringing-up the network interface, and conversely, upon bring down, power the GPHY down. In order to avoid creating hardware hazards, make sure that the GPHY gets powered on during bcmgenet_open() prior to the UniMAC being reset as the UniMAC may start creating activity towards the GPHY if we reverse the steps. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Implement the GPHY power down sequence by setting all power down bits, putting the GPHY in reset, and finally cutting the 25Mhz reference clock. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
We were missing a number of extra steps and delays to power-up the GPHY, update the sequence to reflect the proper procedure here. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In preparation for implementing the power down GPHY sequence, rename bcmgenet_ephy_power_up to illustrate that it is not EPHY specific but PHY agnostic, and add an "enable" argument. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
The CK25_DIS bit controls whether a 25Mhz clock is fed to the GPHY or not, in preparation for powering down the integrated GPHY when relevant, make sure we clear that bit. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
If bcmgenet_power_down() fails, we would want to propagate a return value from bcmgenet_wol_power_down_cfg() to know about this. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 23, 2015
-
-
Felix Fietkau authored
Always use software checksumming, since the hardware does not have any checksum offload support. This significantly improves local TCP tx performance. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
This improves performance for routing and local rx Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
The start-of-frame and end-of-frame bits were accidentally swapped. In the current code it does not make any difference, since they are always used together. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 21, 2015
-
-
Rafał Miłecki authored
Home routers based on ARM SoCs like BCM4708 also have bcma bus with core supported by bgmac. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Rafał Miłecki authored
On ARM SoCs with bgmac Ethernet hardware we don't have any normal PHY. There is always a switch attached but it's not even controlled over MDIO like in case of MIPS devices. We need a fixed PHY to be able to send/receive packets from the switch. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 16, 2015
-
-
Michal Schmidt authored
E1x chips (57710, 57711(E)) have no support for encapsulation offload. bnx2x incorrectly advertises the support as available. Setting of those features is conditional on "!CHIP_IS_E1x(bp)", but the bp struct is not initialized yet at this point and consequently any chip passes the check. The check must use the "chip_is_e1x" local variable instead to work correctly. Signed-off-by:
Michal Schmidt <mschmidt@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Petri Gynther authored
Add support for Hardware Filter Block (HFB) so that incoming Rx traffic can be matched and directed to desired Rx queues. Signed-off-by:
Petri Gynther <pgynther@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-