1. 06 6月, 2014 5 次提交
    • A
      dm9000: clean up edge-triggered irq compatibility · 17ad78de
      Andrew Ruder 提交于
      DM9000 uses level-triggered interrupts.  Some systems (PXA270) only
      support edge-triggered interrupts on GPIOs.  Some changes are necessary
      to ensure that interrupts are not triggered while the GPIO interrupt is
      masked or we will miss the interrupt forever.
      
      * Make some helper functions called dm9000_mask_interrupts() and
        dm9000_unmask_interrupts() for readability.
      
      * dm9000_init_dm9000(): ensure that this function always leaves interrupts
        masked regardless of the state when it entered the function.  This is
        primarily to support the situation in dm9000_open where the logic used
        to go:
      
          dm9000_open()
              dm9000_init_dm9000()
                  unmask interrupts
              request_irq()
      
        If an interrupt occurred between unmasking the interrupt and
        requesting the irq, it would be missed forever as the edge event would
        never be seen by the GPIO hardware in the PXA270.  This allows us to
        change the logic to:
      
          dm9000_open()
              dm9000_init_dm9000()
                  dm9000_mask_interrupts()
              request_irq()
              dm9000_unmask_interrupts()
      
      * dm9000_timeout(), dm9000_drv_resume(): Add the missing
        dm9000_unmask_interrupts() now required by the change above.
      
      * dm9000_shutdown(): Use mask helper function
      
      * dm9000_interrupt(): Use mask/unmask helper functions
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17ad78de
    • A
      dm9000: clean up reset code · 751bb6fd
      Andrew Ruder 提交于
      * Change a hard-coded 0x3 to NCR_RST | NCR_MAC_LBK in dm9000_reset
      
      * Every single place where dm9000_init_dm9000 was ran, a dm9000_reset
        was called immediately before-hand.  Bring dm9000_reset into
        dm9000_init_dm9000.
      
      * The following commit updated the dm9000_probe reset routine to use NCR_RST
        | NCR_MAC_LBK:
      
          6741f40d DM9000B: driver initialization upgrade
      
        and a later commit added a bug-fix to always reset the chip twice:
      
          09ee9f87 dm9000: Implement full reset of DM9000 network device
      
        Unfortunately, since the changes in 6741f40d were made by replacing the
        dm9000_probe dm9000_reset with the adjusted iow(), the changes in
        09ee9f87 were not incorporated into the dm9000_probe reset.
        Furthermore, it bypassed the requisite reset-delay causing some boards
        to get at least one "read wrong id ..." dev_err message during
        dm9000_probe.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      751bb6fd
    • A
      dm9000: acquire irq flags from device tree · 6b50d038
      Andrew Ruder 提交于
      The DM9000 supports both active high interrupts and active low interrupts.
      This is configured via the attached EEPROM.  In the device-tree case, make sure
      that the DM9000 driver passes the correct flags to request_irq.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b50d038
    • S
      MPLS: Use mpls_features to activate software MPLS GSO segmentation · 3b392ddb
      Simon Horman 提交于
      If an MPLS packet requires segmentation then use mpls_features
      to determine if the software implementation should be used.
      
      As no driver advertises MPLS GSO segmentation this will always be
      the case.
      
      I had not noticed that this was necessary before as software MPLS GSO
      segmentation was already being used in my test environment. I believe that
      the reason for that is the skbs in question always had fragments and the
      driver I used does not advertise NETIF_F_FRAGLIST (which seems to be the
      case for most drivers). Thus software segmentation was activated by
      skb_gso_ok().
      
      This introduces the overhead of an extra call to skb_network_protocol()
      in the case where where CONFIG_NET_MPLS_GSO is set and
      skb->ip_summed == CHECKSUM_NONE.
      
      Thanks to Jesse Gross for prompting me to investigate this.
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Acked-by: NYAMAMOTO Takashi <yamamoto@valinux.co.jp>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b392ddb
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · d68de60f
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-06-05
      
      This series contains updates to i40e and i40evf.
      
      Jesse fixes an issue reported by Dave Jones where a couple of FD checks
      ended up using bitwise OR where it should have been bitwise AND.
      
      Neerav removes unused defines and macros for receive LRO.  Fix the driver
      from allowing the user to set a larger MTU size that the hardware was
      being configured to support.  Refactors send version which moves code in
      two places into a small helper function.
      
      Kamil modifies register diagnostics since register ranges can vary among
      the different NVMs to avoid false test results.  So now we try to identify
      the full range and use it for a register test and if we fail to define the
      proper register range, we will only test the first register from that
      group.  Then removes the check for large buffer since this was added in the
      case this structure changed in the future, since the AQ definition is now
      mature enough that this check is no longer necessary.
      
      Mitch fixes i40evf driver to allocate descriptors in groups of 32 since the
      hardware requires it.  Also fixes a crash when the ring size changed because
      it would change the count before deallocating resources, causing the driver
      to either free nonexistent buffers or leak leftover buffers.  Fixed the
      driver to notify the VF for all types of resets so the VF can attempt a
      graceful reinit.
      
      Shannon refactors stats collection to create a unifying stats update routine
      to call the various stat collection routines.  Removes rx_errors and
      rx_missed stats since they were removed from the chip design.  Added
      missing VSI statistics that the hardware offers but are not apart of the
      standard netdev stats.
      
      v2: dropped patch "i40e: Allow disabling of DCB via debugfs" from Neerav
          based on feedback from David Miller.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d68de60f
  2. 05 6月, 2014 35 次提交