1. 19 2月, 2014 2 次提交
    • T
      net: ethernet: update dependency and help text of mvneta · 4b636b53
      Thomas Petazzoni 提交于
      With the introduction of the support for Armada 375 and Armada 38x,
      the hidden Kconfig option MACH_ARMADA_370_XP is being renamed to
      MACH_MVEBU_V7. Therefore, the dependency that was used for the mvneta
      driver can no longer work. This commit replaces this dependency by a
      dependency on PLAT_ORION, which is used similarly for the mv643xx_eth
      driver.
      
      In addition to this, it takes this opportunity to adjust the
      description and help text to indicate that the driver can is also used
      for Armada 38x. Note that Armada 375 cannot use this driver as it has
      a completely different networking unit, which will require a separate
      driver.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NJason Cooper <jason@lakedaemon.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b636b53
    • R
      NET: fec: only enable napi if we are successful · ce5eaf02
      Russell King 提交于
      If napi is left enabled after a failed attempt to bring the interface
      up, we BUG:
      
      fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
      libphy: PHY fixed-0:00 not found
      fec 2188000.ethernet eth0: could not attach to PHY
      ------------[ cut here ]------------
      kernel BUG at include/linux/netdevice.h:502!
      Internal error: Oops - BUG: 0 [#1] SMP ARM
      ...
      PC is at fec_enet_open+0x4d0/0x500
      LR is at __dev_open+0xa4/0xfc
      
      Only enable napi after we are past all the failure paths.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce5eaf02
  2. 18 2月, 2014 3 次提交
    • T
      irtty-sir.c: Do not set_termios() on irtty_close() · 3eca5299
      Tommie Gannert 提交于
      Issuing set_termios() from irtty_close() causes kernel Oops for
      unplugged usb-serial devices.
      
      Since no other tty_ldisc calls set_termios() on close and no tty driver
      seem to check if tty->device_data is NULL or not on entry to set_termios(),
      the only solution I can come up with is to remove the irtty_stop_receiver()
      call, which only updates termios.
      Signed-off-by: NTommie Gannert <tommie@gannert.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3eca5299
    • J
      bonding: 802.3ad: make aggregator_identifier bond-private · 163c8ff3
      Jiri Bohac 提交于
      aggregator_identifier is used to assign unique aggregator identifiers
      to aggregators of a bond during device enslaving.
      
      aggregator_identifier is currently a global variable that is zeroed in
      bond_3ad_initialize().
      
      This sequence will lead to duplicate aggregator identifiers for eth1 and eth3:
      
      create bond0
      change bond0 mode to 802.3ad
      enslave eth0 to bond0 		//eth0 gets agg id 1
      enslave eth1 to bond0 		//eth1 gets agg id 2
      create bond1
      change bond1 mode to 802.3ad
      enslave eth2 to bond1		//aggregator_identifier is reset to 0
      				//eth2 gets agg id 1
      enslave eth3 to bond0 		//eth3 gets agg id 2
      
      Fix this by making aggregator_identifier private to the bond.
      Signed-off-by: NJiri Bohac <jbohac@suse.cz>
      Acked-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      163c8ff3
    • E
      usbnet: remove generic hard_header_len check · eb85569f
      Emil Goode 提交于
      This patch removes a generic hard_header_len check from the usbnet
      module that is causing dropped packages under certain circumstances
      for devices that send rx packets that cross urb boundaries.
      
      One example is the AX88772B which occasionally send rx packets that
      cross urb boundaries where the remaining partial packet is sent with
      no hardware header. When the buffer with a partial packet is of less
      number of octets than the value of hard_header_len the buffer is
      discarded by the usbnet module.
      
      With AX88772B this can be reproduced by using ping with a packet
      size between 1965-1976.
      
      The bug has been reported here:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=29082
      
      This patch introduces the following changes:
      - Removes the generic hard_header_len check in the rx_complete
        function in the usbnet module.
      - Introduces a ETH_HLEN check for skbs that are not cloned from
        within a rx_fixup callback.
      - For safety a hard_header_len check is added to each rx_fixup
        callback function that could be affected by this change.
        These extra checks could possibly be removed by someone
        who has the hardware to test.
      - Removes a call to dev_kfree_skb_any() and instead utilizes the
        dev->done list to queue skbs for cleanup.
      
      The changes place full responsibility on the rx_fixup callback
      functions that clone skbs to only pass valid skbs to the
      usbnet_skb_return function.
      Signed-off-by: NEmil Goode <emilgoode@gmail.com>
      Reported-by: NIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb85569f
  3. 17 2月, 2014 3 次提交
  4. 15 2月, 2014 2 次提交
  5. 14 2月, 2014 17 次提交
    • S
      net:phy:dp83640: Move all HW initialization to dp83640_config_init · 602b1099
      Stefan Sørensen 提交于
      phy_init_hw not does a full PHY reset after the driver probe has
      finished, so any hw initialization done in the probe will be lost.
      Part of the timestamping functionality of the dp83640 is set up in the
      probe and with that lost, enabling timestamping will cause a PHY
      lockup, requiring a hard reset / power cycle to recover.
      
      This patch moves all the HW initialization in dp83640_probe to
      dp83640_config_init.
      Signed-off-by: NStefan Sørensen <stefan.sorensen@spectralink.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      602b1099
    • H
      drivers: net: cpsw: fix buggy loop condition · 0d961b3b
      Heiko Schocher 提交于
      Commit 0cd8f9cc ("drivers: net: cpsw:
      enable promiscuous mode support")
      
      Enable promiscuous mode support for CPSW.
      
      Introduced a crash on an am335x based board (similiar to am335x-evm).
      Reason is buggy end condition in for loop in cpsw_set_promiscious()
      
      for (i = 0; i <= priv->data.slaves; i++)
      
      should be
      
      for (i = 0; i < priv->data.slaves; i++)
      
      Fix this ...
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Cc: Mugunthan V N <mugunthanvnm@ti.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Cc: Daniel Mack <zonque@gmail.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d961b3b
    • L
    • J
      USB2NET: SR9800: use %zu for size_t · 6726d971
      Jingoo Han 提交于
      Use %zu for size_t in order to avoid the following build
      warning in printks.
      
      drivers/net/usb/sr9800.c: In function 'sr9800_bind'
      drivers/net/usb/sr9800.c:826:2: warning: format '%ld' expects argument of type 'long int' but argument 5 has type 'size_t'
      [-Wformat]
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6726d971
    • U
      net: cpsw: catch of_get_phy_mode failing and propagate error · 89e10172
      Uwe Kleine-König 提交于
      It's wrong if the device tree doesn't provide a phy-mode property for
      the cpsw slaves as it is documented to be required in
      Documentation/devicetree/bindings/net/cpsw.txt.
      
      Anyhow it's nice to catch that problem, still more as it used to work
      without this property up to commit 388367a5 (drivers: net: cpsw: use
      cpsw-phy-sel driver to configure phy mode) which is in v3.13-rc1.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89e10172
    • A
      net: qmi_wwan: add support for Cinterion PXS8 and PHS8 · 9b2b6a2d
      Aleksander Morgado 提交于
      When the PXS8 and PHS8 devices show up with PID 0x0053 they will expose both a
      QMI port and a WWAN interface.
      
      CC: Hans-Christoph Schemmel <hans-christoph.schemmel@gemalto.com>
      CC: Christian Schmiedl <christian.schmiedl@gemalto.com>
      CC: Nicolaus Colberg <nicolaus.colberg@gemalto.com>
      CC: David McCullough <david.mccullough@accelecon.com>
      Signed-off-by: NAleksander Morgado <aleksander@aleksander.es>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b2b6a2d
    • M
      net: axienet: Fix compilation warnings · 91ff37ff
      Michal Simek 提交于
      Warning log:
      xilinx_axienet_main.c: In function 'axienet_start_xmit_done':
      xilinx_axienet_main.c:617:16: warning: operation on 'lp->tx_bd_ci' may be undefined [-Wsequence-point]
      xilinx_axienet_main.c: In function 'axienet_start_xmit':
      xilinx_axienet_main.c:703:18: warning: operation on 'lp->tx_bd_tail' may be undefined [-Wsequence-point]
      xilinx_axienet_main.c:719:17: warning: operation on 'lp->tx_bd_tail' may be undefined [-Wsequence-point]
      xilinx_axienet_main.c: In function 'axienet_recv':
      xilinx_axienet_main.c:792:16: warning: operation on 'lp->rx_bd_ci' may be undefined [-Wsequence-point]
      xilinx_axienet_main.c: In function 'axienet_of_probe':
      xilinx_axienet_main.c:1501:21: warning: unused variable 'rc' [-Wunused-variable]
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91ff37ff
    • M
      net: axienet: Fix compilation error · 9d5e8ec6
      Michal Simek 提交于
      Add missing header to fix compilation error.
      drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1575:22:
       error: undefined identifier 'irq_of_parse_and_map'
      drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1576:22:
       error: undefined identifier 'irq_of_parse_and_map'
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d5e8ec6
    • D
      bonding: Fix deadlock in bonding driver when using netpoll · f80889a5
      dingtianhong 提交于
      The bonding driver take write locks and spin locks that are shared
      by the tx path in enslave processing and notification processing,
      If the netconsole is in use, the bonding can call printk which puts
      us in the netpoll tx path, if the netconsole is attached to the bonding
      driver, result in deadlock.
      
      So add protection for these place, by checking the netpoll_block_tx
      state, we can defer the sending of the netconsole frames until a later
      time using the retransmit feature of netpoll_send_skb that is triggered
      on the return code NETDEV_TX_BUSY.
      
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Veaceslav Falico <vfalico@redhat.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f80889a5
    • C
      macvlan: unregister net device when netdev_upper_dev_link() fails · da37705c
      Cong Wang 提交于
      rtnl_newlink() doesn't unregister it for us on failure.
      
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NCong Wang <cwang@twopensource.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da37705c
    • S
      net: stmmac:sti: Add STi SOC glue driver. · d15891ca
      Srinivas Kandagatla 提交于
      STi series SOCs have a glue layer on top of the synopsis gmac IP, this
      glue layer needs to be configured before the gmac driver starts using
      the IP.
      
      This patch adds a support to this glue layer which is configured via
      stmmac setup, init, exit callbacks.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d15891ca
    • J
      net: fix macvtap type name in Kconfig · c7966b52
      Jan Luebbe 提交于
      The netlink kind (and iproute2 type option) is actually called
      'macvtap', not 'macvlan'.
      Signed-off-by: NJan Luebbe <jlu@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7966b52
    • R
      hostap: fix "hostap: proc: Use remove_proc_subtree()" · 4885c873
      Russell King - ARM Linux 提交于
      remove_proc_subtree() doesn't work here as local->ddev has already
      been removed, and NULLed out.  Use proc_remove() instead.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4885c873
    • S
      rtl8187: fix regression on MIPS without coherent DMA · b6213e41
      Stanislaw Gruszka 提交于
      This patch fixes regression caused by commit a16dad77 "MIPS: Fix
      potencial corruption". That commit fixes one corruption scenario in
      cost of adding another one, which actually start to cause crashes
      on Yeeloong laptop when rtl8187 driver is used.
      
      For correct DMA read operation on machines without DMA coherence, kernel
      have to invalidate cache, such it will refill later with new data that
      device wrote to memory, when that data is needed to process. We can only
      invalidate full cache line. Hence when cache line includes both dma
      buffer and some other data (written in cache, but not yet in main
      memory), the other data can not hit memory due to invalidation. That
      happen on rtl8187 where struct rtl8187_priv fields are located just
      before and after small buffers that are passed to USB layer and DMA
      is performed on them.
      
      To fix the problem we align buffers and reserve space after them to make
      them match cache line.
      
      This patch does not resolve all possible MIPS problems entirely, for
      that we have to assure that we always map cache aligned buffers for DMA,
      what can be complex or even not possible. But patch fixes visible and
      reproducible regression and seems other possible corruptions do not
      happen in practice, since Yeeloong laptop works stable without rtl8187
      driver.
      
      Bug report:
      https://bugzilla.kernel.org/show_bug.cgi?id=54391Reported-by: NPetr Pisar <petr.pisar@atlas.cz>
      Bisected-by: NTom Li <biergaizi2009@gmail.com>
      Reported-and-tested-by: NTom Li <biergaizi2009@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStanislaw Gruszka <stf_xl@wp.pl>
      Acked-by: NLarry Finger <Larry.Finger@lwfinger.next>
      Acked-by: NHin-Tak Leung <htl10@users.sourceforge.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b6213e41
    • D
      ath5k: shifting the wrong variable for AR5K_AR5210 · 4a0732d1
      Dan Carpenter 提交于
      In the original code we shift "AR5K_PHY(256) >> 28" which is zero but
      the intent was to shift the return value of ath5k_hw_reg_read() like we
      do a couple lines later.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4a0732d1
    • O
      rtlwifi: Fix incorrect return from rtl_ps_enable_nic() · 2e8c5e56
      Olivier Langlois 提交于
      rtl_ps_enable_nic() is called from loops that will loop until this function returns true or a
      maximum number of retries is performed.
      
      hw_init() returns non-zero on error. In that situation return false to
      restore the original design intent to retry hw init when it fails.
      Signed-off-by: NOlivier Langlois <olivier@trillion01.com>
      Cc: Stable <stable@vger.kernel.org>
      Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2e8c5e56
    • O
      rtlwifi: rtl8192ce: Fix too long disable of IRQs · f78bccd7
      Olivier Langlois 提交于
      rtl8192ce is disabling for too long the local interrupts during hw initiatialisation when performing scans
      
      The observable symptoms in dmesg can be:
      
      - underruns from ALSA playback
      - clock freezes (tstamps do not change for several dmesg entries until irqs are finaly reenabled):
      
      [  250.817669] rtlwifi:rtl_op_config():<0-0-0> 0x100
      [  250.817685] rtl8192ce:_rtl92ce_phy_set_rf_power_state():<0-1-0> IPS Set eRf nic enable
      [  250.817732] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.817796] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.817910] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818024] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818139] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818253] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818367] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
      [  250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:98053f15:10
      [  250.818472] rtl8192ce:rtl92ce_sw_led_on():<0-1-0> LedAddr:4E ledpin=1
      [  250.818472] rtl8192c_common:rtl92c_download_fw():<0-1-0> Firmware Version(49), Signature(0x88c1),Size(32)
      [  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():<0-1-0> PairwiseEncAlgorithm = 0 GroupEncAlgorithm = 0
      [  250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():<0-1-0> The SECR-value cc
      [  250.818472] rtl8192c_common:rtl92c_dm_check_txpower_tracking_thermal_meter():<0-1-0> Schedule TxPowerTracking direct call!!
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> rtl92c_dm_txpower_tracking_callback_thermalmeter
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Initial pathA ele_d reg0xc80 = 0x40000000, ofdm_index=0xc
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Initial reg0xa24 = 0x90e1317, cck_index=0xc, ch14 0
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf delta 0x1 delta_lck 0x0 delta_iqk 0x0
      [  250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> <===
      [  250.818472] rtl8192c_common:rtl92c_dm_initialize_txpower_tracking_thermalmeter():<0-1-0> pMgntInfo->txpower_tracking = 1
      [  250.818472] rtl8192ce:rtl92ce_led_control():<0-1-0> ledaction 3
      [  250.818472] rtl8192ce:rtl92ce_sw_led_on():<0-1-0> LedAddr:4E ledpin=1
      [  250.818472] rtlwifi:rtl_ips_nic_on():<0-1-0> before spin_unlock_irqrestore
      [  251.154656] PCM: Lost interrupts? [Q]-0 (stream=0, delta=15903, new_hw_ptr=293408, old_hw_ptr=277505)
      
      The exact code flow that causes that is:
      
      1. wpa_supplicant send a start_scan request to the nl80211 driver
      2. mac80211 module call rtl_op_config with IEEE80211_CONF_CHANGE_IDLE
      3.   rtl_ips_nic_on is called which disable local irqs
      4.     rtl92c_phy_set_rf_power_state() is called
      5.       rtl_ps_enable_nic() is called and hw_init()is executed and then the interrupts on the device are enabled
      
      A good solution could be to refactor the code to avoid calling rtl92ce_hw_init() with the irqs disabled
      but a quick and dirty solution that has proven to work is
      to reenable the irqs during the function rtl92ce_hw_init().
      
      I think that it is safe doing so since the device interrupt will only be enabled after the init function succeed.
      Signed-off-by: NOlivier Langlois <olivier@trillion01.com>
      Cc: Stable <stable@vger.kernel.org>
      Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f78bccd7
  6. 13 2月, 2014 1 次提交
  7. 12 2月, 2014 1 次提交
  8. 11 2月, 2014 3 次提交
  9. 10 2月, 2014 4 次提交
  10. 07 2月, 2014 4 次提交