summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
Commit message (Collapse)AuthorAgeFilesLines
* hso: always read interface number from the current altsettingAleksander Morgado2015-02-201-4/+9
| | | | | | | | | Always read bInterfaceNumber from the current altsetting, not from the first one available in the altsetting array. This is coming from code review, not related to any specific bug. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: support setting rx coalescehayeswang2015-02-191-0/+57
| | | | | | | | Support setting the rx coalesce. Then someone could change the rx agg timeout value through ethtool. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: change rx early size when the mtu is changedhayeswang2015-02-191-1/+15
| | | | | | | | The rx early size is calculated with the mtu, so it has to be re-calculated when the mtu is changed. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: separate USB_RX_EARLY_AGGhayeswang2015-02-191-26/+32
| | | | | | | | | | | | Separate USB_RX_EARLY_AGG into USB_RX_EARLY_TIMEOUT and USB_RX_EARLY_SIZE. Replace r8153_set_rx_agg() with r8153_set_rx_early_timeout() and r8153_set_rx_early_size(). Set the default timeout value according to the USB speed. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: restore hw settingshayeswang2015-02-151-2/+57
| | | | | | | | | | | | | | | | | | | | | | There is a capability which let the hw could change the settings automatically when the power change to ON. However, the USB reset would reset the settings to the hw default, so the driver has to restore the relative settings. Otherwise, it would influence the functions of the hw, and the compatibility for the USB hub and USB host controller. The relative settings are as following. - set the power down scale to 96. - enable the power saving function of USB 2.0. - disable the ALDPS of ECM mode. - set burst mode depending on the burst size. - enable the flow control of endpoint full. - set fifo empty boundary to 32448 bytes. - enable the function of exiting LPM when Rx OK occurs. - set the connect timer to 1. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hso: fix rx parsing logic when skb allocation failsAleksander Morgado2015-02-131-1/+1
| | | | | | | | | | | | | | | If skb allocation fails once the IP header has been received, the rx state is being set to WAIT_SYNC. The logic, though, shouldn't directly return, as the buffer may contain a full packet, and therefore the WAIT_SYNC state needs to be processed (resetting state to WAIT_IP, clearing rx_buf_size and re-initializing rx_buf_missing). So, just let the while loop continue so that in the next iteration the WAIT_SYNC state cleanly stops the loop. The WAIT_SYNC processing will be done just after that, only if the end of packet is flagged. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: use BIT macrohayeswang2015-02-081-17/+17
| | | | | | | Use BIT macro to replace (1 << bits). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: replace get_protocol with vlan_get_protocolhayeswang2015-02-081-14/+2Star
| | | | | | | | vlan_get_protocol() has been defined and use it to replace get_protocol(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: adjust the line feed for hw_featureshayeswang2015-02-081-2/+1Star
| | | | | | | | Keep NETIF_F_HW_VLAN_CTAG_RX and NETIF_F_HW_VLAN_CTAG_TX at the same line. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: check RTL8152_UNPLUG for rtl8152_closehayeswang2015-02-081-1/+1
| | | | | | | It is unnecessary to accress the hw register if the device is unplugged. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: check linking status with netif_carrier_okhayeswang2015-02-081-14/+9Star
| | | | | | | Replace (tp->speed & LINK_STATUS) with netif_carrier_ok(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: adjust lpm timerhayeswang2015-02-081-3/+3
| | | | | | | | Set LPM timer to 500us, except for RTL_VER_04 which doesn't link at USB 3.0. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: adjust rx_bottomhayeswang2015-02-081-2/+13
| | | | | | | | If a error occurs when submitting rx, skip the remaining submissions and try to submit them again next time. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hso: Use static attribute groups for sysfs entryTakashi Iwai2015-02-061-7/+10
| | | | | | | | | Pass the static attribute groups and the driver data via tty_port_register_device_attr() instead of manual device_create_file() and device_remove_file() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-02-052-51/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/vxlan.c drivers/vhost/net.c include/linux/if_vlan.h net/core/dev.c The net/core/dev.c conflict was the overlap of one commit marking an existing function static whilst another was adding a new function. In the include/linux/if_vlan.h case, the type used for a local variable was changed in 'net', whereas the function got rewritten to fix a stacked vlan bug in 'net-next'. In drivers/vhost/net.c, Al Viro's iov_iter conversions in 'net-next' overlapped with an endainness fix for VHOST 1.0 in 'net'. In drivers/net/vxlan.c, vxlan_find_vni() added a 'flags' parameter in 'net-next' whereas in 'net' there was a bug fix to pass in the correct network namespace pointer in calls to this function. Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: usb: sr9700: Use 'SR_' prefix for the common register macrosChen Gang2015-02-042-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commone register macors (e.g. RSR) is too commont to drivers, it may be conflict with the architectures (e.g. xtensa, sh). The related warnings (with allmodconfig under xtensa): CC [M] drivers/net/usb/sr9700.o In file included from drivers/net/usb/sr9700.c:24:0: drivers/net/usb/sr9700.h:65:0: warning: "RSR" redefined #define RSR 0x06 ^ In file included from ./arch/xtensa/include/asm/bitops.h:22:0, from include/linux/bitops.h:36, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/net/usb/sr9700.c:13: ./arch/xtensa/include/asm/processor.h:190:0: note: this is the location of the previous definition #define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v)); ^ Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: fix rfkill name conflictsOlivier Sobrie2015-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | By using only the usb interface number for the rfkill name, we might have a name conflicts in case two similar hso devices are connected. In this patch, the name of the hso rfkill interface embed the value of a counter that is incremented each time a new rfkill interface is added. Suggested-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: add missing cancel_work_sync in disconnect()Olivier Sobrie2015-02-011-0/+2
| | | | | | | | | | | | | | | | For hso serial devices, two cancel_work_sync were missing in the disconnect method. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: update serial_table in usb disconnect methodOlivier Sobrie2015-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serial_table is used to map the minor number of the usb serial device to its associated context. The table is updated in the probe method and in hso_serial_ref_free() which is called either from the tty cleanup method or from the usb disconnect method. This patch ensures that the serial_table is updated in the disconnect method and no more from the cleanup method to avoid the following potential race condition. - hso_disconnect() is called for usb interface "x". Because the serial port was open and because the cleanup method of the tty_port hasn't been called yet, hso_serial_ref_free() is not run. - hso_probe() is called and fails for a new hso serial usb interface "y". The function hso_free_interface() is called and iterates over the element of serial_table to find the device associated to the usb interface context. If the usb interface context of usb interface "y" has been created at the same place as for usb interface "x", then the cleanup functions are called for usb interfaces "x" and "y" and hso_serial_ref_free() is called for both interfaces. - release_tty() is called for serial port linked to usb interface "x" and possibly crash because the tty_port structure contained in the hso_device structure has been freed. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: move tty_unregister outside hso_serial_common_free()Olivier Sobrie2015-02-011-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function hso_serial_common_free() is called either by the cleanup method of the tty or by the usb disconnect method. In the former case, the usb_disconnect() has been already called and the sysfs group associated to the device has been removed. By calling tty_unregister directly from the usb_disconnect() method, we avoid a warning due to the removal of the sysfs group of the usb device. Example of warning: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 778 at fs/sysfs/group.c:225 sysfs_remove_group+0x50/0x94() sysfs group c0645a88 not found for kobject 'ttyHS5' Modules linked in: CPU: 0 PID: 778 Comm: kworker/0:3 Tainted: G W 3.18.0+ #105 Workqueue: events release_one_tty [<c000dfe4>] (unwind_backtrace) from [<c000c014>] (show_stack+0x14/0x1c) [<c000c014>] (show_stack) from [<c0016bac>] (warn_slowpath_common+0x5c/0x7c) [<c0016bac>] (warn_slowpath_common) from [<c0016c60>] (warn_slowpath_fmt+0x30/0x40) [<c0016c60>] (warn_slowpath_fmt) from [<c00ddd14>] (sysfs_remove_group+0x50/0x94) [<c00ddd14>] (sysfs_remove_group) from [<c0221e44>] (device_del+0x30/0x190) [<c0221e44>] (device_del) from [<c0221fb0>] (device_unregister+0xc/0x18) [<c0221fb0>] (device_unregister) from [<c0221fec>] (device_destroy+0x30/0x3c) [<c0221fec>] (device_destroy) from [<c01fe1dc>] (tty_unregister_device+0x2c/0x5c) [<c01fe1dc>] (tty_unregister_device) from [<c029a428>] (hso_serial_common_free+0x2c/0x88) [<c029a428>] (hso_serial_common_free) from [<c029a4c0>] (hso_serial_ref_free+0x3c/0xb8) [<c029a4c0>] (hso_serial_ref_free) from [<c01ff430>] (release_one_tty+0x30/0x84) [<c01ff430>] (release_one_tty) from [<c00271d4>] (process_one_work+0x21c/0x3c8) [<c00271d4>] (process_one_work) from [<c0027758>] (worker_thread+0x3d8/0x560) [<c0027758>] (worker_thread) from [<c002be4c>] (kthread+0xc0/0xcc) [<c002be4c>] (kthread) from [<c0009630>] (ret_from_fork+0x14/0x24) ---[ end trace cb88537fdc8fa208 ]--- Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: replace reset_device work by usb_queue_reset_device()Olivier Sobrie2015-02-011-24/+1Star
| | | | | | | | | | | | | | | | | | There is no need for a dedicated reset work in the hso driver since there is already a reset work foreseen in usb_interface that does the same. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: rename hso_dev into serial in hso_free_interface()Olivier Sobrie2015-02-011-6/+6
| | | | | | | | | | | | | | | | | | | | In other functions of the driver, variables of type "struct hso_serial" are denoted by "serial" and variables of type "struct hso_device" are denoted by "hso_dev". This patch makes the hso_free_interface() consistent with these notations. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: fix small indentation errorOlivier Sobrie2015-02-011-2/+2
| | | | | | | | | | | | | | Simply remove the useless extra tab. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: fix memory leak in hso_create_rfkill()Olivier Sobrie2015-02-011-9/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | When the rfkill interface was created, a buffer containing the name of the rfkill node was allocated. This buffer was never freed when the device disappears. To fix the problem, we put the name given to rfkill_alloc() in the hso_net structure. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: fix memory leak when device disconnectsOlivier Sobrie2015-02-011-0/+1
| | | | | | | | | | | | | | | | In the disconnect path, tx_buffer should freed like tx_data to avoid a memory leak when the device disconnects. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: fix crash when device disappears while serial port is openOlivier Sobrie2015-02-011-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the device disappear, the function hso_disconnect() is called to perform cleanup. In the cleanup function, hso_free_interface() calls tty_port_tty_hangup() in view of scheduling a work to hang up the tty if needed. If the port was not open then hso_serial_ref_free() is called directly to cleanup everything. Otherwise, hso_serial_ref_free() is called when the last fd associated to the port is closed. For each open port, tty_release() will call the close method, hso_serial_close(), which drops the last kref and call hso_serial_ref_free() which unregisters, destroys the tty port and finally frees the structure in which the tty_port structure is included. Later, in tty_release(), more precisely when release_tty() is called, the tty_port previously freed is accessed to cancel the tty buf workqueue and it leads to a crash. In view of avoiding this crash, we add a cleanup method that is called at the end of the hangup process and we drop the last kref in this function when all the ports have been closed, when tty_port is no more needed and when it is safe to free the structure containing the tty_port structure. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | hso: remove useless header file timer.hOlivier Sobrie2015-02-011-1/+0Star
| | | | | | | | | | | | | | No timer related function is used in this driver. Signed-off-by: Olivier Sobrie <olivier@sobrie.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-01-281-24/+6Star
|\| | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/boot/dts/imx6sx-sdb.dts net/sched/cls_bpf.c Two simple sets of overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8152: remove sram_readhayeswang2015-01-191-18/+6Star
| | | | | | | | | | | | | | | | | | | | Read OCP register 0xa43a~0xa43b would clear some flags which the hw would use, and it may let the device lost. However, the unit of reading is 4 bytes. That is, it would read 0xa438~0xa43b when calling sram_read() to read OCP_SRAM_DATA. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8152: remove generic_ocp_read before writinghayeswang2015-01-191-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | For ocp_write_word() and ocp_write_byte(), there is a generic_ocp_read() which is used to read the whole 4 byte data, keep the unchanged bytes, and modify the expected bytes. However, the "byen" could be used to determine which bytes of the 4 bytes to write, so the action could be removed. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | usbnet: re-use native hex2bin()Andy Shevchenko2015-01-251-9/+8Star
| | | | | | | | | | | | | | | | Call hex2bin() library function, instead of doing conversion here. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-01-151-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/xen-netfront.c Minor overlapping changes in xen-netfront.c, mostly to do with some buffer management changes alongside the split of stats into TX and RX. Signed-off-by: David S. Miller <davem@davemloft.net>
| * usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb()Alexey Khoroshilov2015-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e4c7f259c5be ("USB: kaweth.c: use GFP_ATOMIC under spin_lock") makes sure that kaweth_internal_control_msg() allocates memory with GFP_ATOMIC, but kaweth_internal_control_msg() also calls usb_start_wait_urb() that still allocates memory with GFP_NOIO. The patch fixes usb_start_wait_urb() as well. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: replace tasklet with NAPIhayeswang2015-01-141-35/+85
| | | | | | | | | | | | | | | | | | | | Replace tasklet with NAPI. Add rx_queue to queue the remaining rx packets if the number of the rx packets is more than the request from poll(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: rename vlan_tx_* helpers since "tx" is misleading thereJiri Pirko2015-01-131-2/+2
| | | | | | | | | | | | | | The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: check the status before submitting rxhayeswang2015-01-121-0/+5
| | | | | | | | | | | | | | | | Don't submit the rx if the device is unplugged, stopped, or linking down. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: call rtl_start_rx after netif_carrier_onhayeswang2015-01-121-1/+2
|/ | | | | | | | Remove rtl_start_rx() from rtl_enable() and put it after calling netif_carrier_on(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: support ndo_features_checkhayeswang2015-01-061-0/+17
| | | | | | | | | Support ndo_features_check to avoid: - the transport offset is more than the hw limitation when using hw checksum. - the skb->len of a GSO packet is more than the limitation. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qmi_wwan: Set random MAC on devices with buggy fwKristian Evensen2015-01-021-3/+7
| | | | | | | | | | | | | | Some buggy firmwares export an incorrect MAC address (00:a0:c6:00:00:00). This makes for example checking devices for random MAC addresses tricky, and you might end up with multiple network interfaces with the same address. This patch tries to fix, or at least improve, the situation by setting the MAC address of devices with this firmware bug to a random address. I tested the patch with two devices that has this firmware bug (Huawei E398 and E392), and network traffic worked fine after changing the address. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8152: redefine REALTEK_USB_DEVICEhayeswang2014-12-091-6/+20
| | | | | | | | | | | | Redefine REALTEK_USB_DEVICE for the desired USB interface for probe(). There are three USB interfaces for the device. USB_CLASS_COMM and USB_CLASS_CDC_DATA are for ECM mode (config #2). USB_CLASS_VENDOR_SPEC is for the vendor mode (config #1). However, we are not interesting in USB_CLASS_CDC_DATA for probe(), so redefine REALTEK_USB_DEVICE to ignore the USB interface class of USB_CLASS_CDC_DATA. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-11-221-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ieee802154/fakehard.c A bug fix went into 'net' for ieee802154/fakehard.c, which is removed in 'net-next'. Add build fix into the merge from Stephen Rothwell in openvswitch, the logging macros take a new initial 'log' argument, a new call was added in 'net' so when we merge that in here we have to explicitly add the new 'log' arg to it else the build fails. Signed-off-by: David S. Miller <davem@davemloft.net>
| * qmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G ModemMartin Hauke2014-11-161-0/+1
| | | | | | | | | | | | | | | | Added the USB VID/PID for the HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) Signed-off-by: Martin Hauke <mardnh@gmx.de> Acked-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: USB: Deletion of unnecessary checks before the function call "kfree"Markus Elfring2014-11-212-4/+2Star
| | | | | | | | | | | | | | | | | | | | The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: adjust rtl_start_rxhayeswang2014-11-211-0/+19
| | | | | | | | | | | | | | | | | | If there is a error for r8152_submit_rx(), add the remaining rx buffers to the list. Then the remaining rx buffers could be submitted later. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: adjust r8152_submit_rxhayeswang2014-11-211-20/+20
| | | | | | | | | | | | | | | | | | The behavior of handling the returned status from r8152_submit_rx() is almost same, so let r8152_submit_rx() deal with the error directly. This could avoid the duplicate code. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | vlan: kill vlan_put_tag helperJiri Pirko2014-11-211-1/+1
| | | | | | | | | | | | | | | | Since both tx and rx paths work with skb->vlan_tci, there's no need for this function anymore. Switch users directly to __vlan_hwaccel_put_tag. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* | usbnet: rtl8150: remove unused variableSudip Mukherjee2014-11-191-2/+1Star
| | | | | | | | | | | | | | remove unused variable Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-11-141-13/+1Star
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/chelsio/cxgb4vf/sge.c drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c sge.c was overlapping two changes, one to use the new __dev_alloc_page() in net-next, and one to use s->fl_pg_order in net. ixgbe_phy.c was a set of overlapping whitespace changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * asix: Do full reset during ax88772_bindCharles Keepax2014-11-071-13/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3cc81d85ee01 ("asix: Don't reset PHY on if_up for ASIX 88772") causes the ethernet on Arndale to no longer function. This appears to be because the Arndale ethernet requires a full reset before it will function correctly, however simply reverting the above patch causes problems with ethtool settings getting reset. It seems the problem is that the ethernet is not properly reset during bind, and indeed the code in ax88772_bind that resets the device is a very small subset of the actual ax88772_reset function. This patch uses ax88772_reset in place of the existing reset code in ax88772_bind which removes some code duplication and fixes the ethernet on Arndale. It is still possible that the original patch causes some issues with suspend and resume but that seems like a separate issue and I haven't had a chance to test that yet. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Tested-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | r8152: check RTL8152_UNPLUG and netif_running before autoresumehayeswang2014-11-121-3/+6
| | | | | | | | | | | | | | | | If the device is unplugged or !netif_running(), the workqueue doesn't need to wake the device, and could return directly. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>