Skip to content

Commit e657e07

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "This is what we usually expect at this stage of the game, lots of little things, mostly in drivers. With the occasional 'oops didn't mean to do that' kind of regressions in the core code." 1) Uninitialized data in __ip_vs_get_timeouts(), from Arnd Bergmann 2) Reject invalid ACK sequences in Fast Open sockets, from Jerry Chu. 3) Lost error code on return from _rtl_usb_receive(), from Christian Lamparter. 4) Fix reset resume on USB rt2x00, from Stanislaw Gruszka. 5) Release resources on error in pch_gbe driver, from Veaceslav Falico. 6) Default hop limit not set correctly in ip6_template_metrics[], fix from Li RongQing. 7) Gianfar PTP code requests wrong kind of resource during probe, fix from Wei Yang. 8) Fix VHOST net driver on big-endian, from Michael S Tsirkin. 9) Mallenox driver bug fixes from Jack Morgenstein, Or Gerlitz, Moni Shoua, Dotan Barak, and Uri Habusha. 10) usbnet leaks memory on TX path, fix from Hemant Kumar. 11) Use socket state test, rather than presence of FIN bit packet, to determine FIONREAD/SIOCINQ value. Fix from Eric Dumazet. 12) Fix cxgb4 build failure, from Vipul Pandya. 13) Provide a SYN_DATA_ACKED state to complement SYN_FASTOPEN in socket info dumps. From Yuchung Cheng. 14) Fix leak of security path in kfree_skb_partial(). Fix from Eric Dumazet. 15) Handle RX FIFO overflows more resiliently in pch_gbe driver, from Veaceslav Falico. 16) Fix MAINTAINERS file pattern for networking drivers, from Jean Delvare. 17) Add iPhone5 IDs to IPHETH driver, from Jay Purohit. 18) VLAN device type change restriction is too strict, and should not trigger for the automatically generated vlan0 device. Fix from Jiri Pirko. 19) Make PMTU/redirect flushing work properly again in ipv4, from Steffen Klassert. 20) Fix memory corruptions by using kfree_rcu() in netlink_release(). From Eric Dumazet. 21) More qmi_wwan device IDs, from Bjørn Mork. 22) Fix unintentional change of SNAT/DNAT hooks in generic NAT infrastructure, from Elison Niven. 23) Fix 3.6.x regression in xt_TEE netfilter module, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits) tilegx: fix some issues in the SW TSO support qmi_wwan/cdc_ether: move Novatel 551 and E362 to qmi_wwan net: usb: Fix memory leak on Tx data path net/mlx4_core: Unmap UAR also in the case of error flow net/mlx4_en: Don't use vlan tag value as an indication for vlan presence net/mlx4_en: Fix double-release-range in tx-rings bas_gigaset: fix pre_reset handling vhost: fix mergeable bufs on BE hosts gianfar_ptp: use iomem, not ioports resource tree in probe ipv6: Set default hoplimit as zero. NET_VENDOR_TI: make available for am33xx as well pch_gbe: fix error handling in pch_gbe_up() b43: Fix oops on unload when firmware not found mwifiex: clean up scan state on error mwifiex: return -EBUSY if specific scan request cannot be honored brcmfmac: fix potential NULL dereference Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz" ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation rt2x00: usb: fix reset resume rtlwifi: pass rx setup error code to caller ...
2 parents f761237 + 330ee00 commit e657e07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+724
-384
lines changed

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5062,7 +5062,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
50625062
S: Odd Fixes
50635063
F: drivers/net/
50645064
F: include/linux/if_*
5065-
F: include/linux/*device.h
5065+
F: include/linux/netdevice.h
5066+
F: include/linux/arcdevice.h
5067+
F: include/linux/etherdevice.h
5068+
F: include/linux/fcdevice.h
5069+
F: include/linux/fddidevice.h
5070+
F: include/linux/hippidevice.h
5071+
F: include/linux/inetdevice.h
50665072

50675073
NETXEN (1/10) GbE SUPPORT
50685074
M: Sony Chacko <[email protected]>

drivers/bcma/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus)
158158

159159
static void bcma_unregister_cores(struct bcma_bus *bus)
160160
{
161-
struct bcma_device *core;
161+
struct bcma_device *core, *tmp;
162162

163-
list_for_each_entry(core, &bus->cores, list) {
163+
list_for_each_entry_safe(core, tmp, &bus->cores, list) {
164+
list_del(&core->list);
164165
if (core->dev_registered)
165166
device_unregister(&core->dev);
166167
}

drivers/isdn/gigaset/bas-gigaset.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,13 @@ static void int_in_work(struct work_struct *work)
617617
if (rc == 0)
618618
/* success, resubmit interrupt read URB */
619619
rc = usb_submit_urb(urb, GFP_ATOMIC);
620-
if (rc != 0 && rc != -ENODEV) {
620+
621+
switch (rc) {
622+
case 0: /* success */
623+
case -ENODEV: /* device gone */
624+
case -EINVAL: /* URB already resubmitted, or terminal badness */
625+
break;
626+
default: /* failure: try to recover by resetting the device */
621627
dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc));
622628
rc = usb_lock_device_for_reset(ucs->udev, ucs->interface);
623629
if (rc == 0) {
@@ -2442,7 +2448,9 @@ static void gigaset_disconnect(struct usb_interface *interface)
24422448
}
24432449

24442450
/* gigaset_suspend
2445-
* This function is called before the USB connection is suspended.
2451+
* This function is called before the USB connection is suspended
2452+
* or before the USB device is reset.
2453+
* In the latter case, message == PMSG_ON.
24462454
*/
24472455
static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
24482456
{
@@ -2498,7 +2506,12 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
24982506
del_timer_sync(&ucs->timer_atrdy);
24992507
del_timer_sync(&ucs->timer_cmd_in);
25002508
del_timer_sync(&ucs->timer_int_in);
2501-
cancel_work_sync(&ucs->int_in_wq);
2509+
2510+
/* don't try to cancel int_in_wq from within reset as it
2511+
* might be the one requesting the reset
2512+
*/
2513+
if (message.event != PM_EVENT_ON)
2514+
cancel_work_sync(&ucs->int_in_wq);
25022515

25032516
gig_dbg(DEBUG_SUSPEND, "suspend complete");
25042517
return 0;

drivers/net/can/flexcan.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,22 @@
144144

145145
#define FLEXCAN_MB_CODE_MASK (0xf0ffffff)
146146

147-
/* FLEXCAN hardware feature flags */
147+
/*
148+
* FLEXCAN hardware feature flags
149+
*
150+
* Below is some version info we got:
151+
* SOC Version IP-Version Glitch- [TR]WRN_INT
152+
* Filter? connected?
153+
* MX25 FlexCAN2 03.00.00.00 no no
154+
* MX28 FlexCAN2 03.00.04.00 yes yes
155+
* MX35 FlexCAN2 03.00.00.00 no no
156+
* MX53 FlexCAN2 03.00.00.00 yes no
157+
* MX6s FlexCAN3 10.00.12.00 yes yes
158+
*
159+
* Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
160+
*/
148161
#define FLEXCAN_HAS_V10_FEATURES BIT(1) /* For core version >= 10 */
149-
#define FLEXCAN_HAS_BROKEN_ERR_STATE BIT(2) /* Broken error state handling */
162+
#define FLEXCAN_HAS_BROKEN_ERR_STATE BIT(2) /* [TR]WRN_INT not connected */
150163

151164
/* Structure of the message buffer */
152165
struct flexcan_mb {
@@ -205,7 +218,7 @@ static struct flexcan_devtype_data fsl_p1010_devtype_data = {
205218
};
206219
static struct flexcan_devtype_data fsl_imx28_devtype_data;
207220
static struct flexcan_devtype_data fsl_imx6q_devtype_data = {
208-
.features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_BROKEN_ERR_STATE,
221+
.features = FLEXCAN_HAS_V10_FEATURES,
209222
};
210223

211224
static const struct can_bittiming_const flexcan_bittiming_const = {

drivers/net/can/sja1000/peak_pci.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030

3131
#include "sja1000.h"
3232

33-
MODULE_AUTHOR("Wolfgang Grandegger <wg@grandegger.com>");
33+
MODULE_AUTHOR("Stephane Grosjean <s.grosjean@peak-system.com>");
3434
MODULE_DESCRIPTION("Socket-CAN driver for PEAK PCAN PCI family cards");
3535
MODULE_SUPPORTED_DEVICE("PEAK PCAN PCI/PCIe/PCIeC miniPCI CAN cards");
36+
MODULE_SUPPORTED_DEVICE("PEAK PCAN miniPCIe/cPCI PC/104+ PCI/104e CAN Cards");
3637
MODULE_LICENSE("GPL v2");
3738

3839
#define DRV_NAME "peak_pci"
@@ -64,7 +65,11 @@ struct peak_pci_chan {
6465
#define PEAK_PCI_DEVICE_ID 0x0001 /* for PCI/PCIe slot cards */
6566
#define PEAK_PCIEC_DEVICE_ID 0x0002 /* for ExpressCard slot cards */
6667
#define PEAK_PCIE_DEVICE_ID 0x0003 /* for nextgen PCIe slot cards */
67-
#define PEAK_MPCI_DEVICE_ID 0x0008 /* The miniPCI slot cards */
68+
#define PEAK_CPCI_DEVICE_ID 0x0004 /* for nextgen cPCI slot cards */
69+
#define PEAK_MPCI_DEVICE_ID 0x0005 /* for nextgen miniPCI slot cards */
70+
#define PEAK_PC_104P_DEVICE_ID 0x0006 /* PCAN-PC/104+ cards */
71+
#define PEAK_PCI_104E_DEVICE_ID 0x0007 /* PCAN-PCI/104 Express cards */
72+
#define PEAK_MPCIE_DEVICE_ID 0x0008 /* The miniPCIe slot cards */
6873

6974
#define PEAK_PCI_CHAN_MAX 4
7075

@@ -76,6 +81,10 @@ static DEFINE_PCI_DEVICE_TABLE(peak_pci_tbl) = {
7681
{PEAK_PCI_VENDOR_ID, PEAK_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
7782
{PEAK_PCI_VENDOR_ID, PEAK_PCIE_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
7883
{PEAK_PCI_VENDOR_ID, PEAK_MPCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
84+
{PEAK_PCI_VENDOR_ID, PEAK_MPCIE_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
85+
{PEAK_PCI_VENDOR_ID, PEAK_PC_104P_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
86+
{PEAK_PCI_VENDOR_ID, PEAK_PCI_104E_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
87+
{PEAK_PCI_VENDOR_ID, PEAK_CPCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
7988
#ifdef CONFIG_CAN_PEAK_PCIEC
8089
{PEAK_PCI_VENDOR_ID, PEAK_PCIEC_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
8190
#endif

drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ struct adapter_params {
251251
unsigned char rev; /* chip revision */
252252
unsigned char offload;
253253

254+
unsigned char bypass;
255+
254256
unsigned int ofldq_wr_cred;
255257
};
256258

@@ -642,6 +644,23 @@ extern int dbfifo_int_thresh;
642644
#define for_each_port(adapter, iter) \
643645
for (iter = 0; iter < (adapter)->params.nports; ++iter)
644646

647+
static inline int is_bypass(struct adapter *adap)
648+
{
649+
return adap->params.bypass;
650+
}
651+
652+
static inline int is_bypass_device(int device)
653+
{
654+
/* this should be set based upon device capabilities */
655+
switch (device) {
656+
case 0x440b:
657+
case 0x440c:
658+
return 1;
659+
default:
660+
return 0;
661+
}
662+
}
663+
645664
static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
646665
{
647666
return adap->params.vpd.cclk / 1000;

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,18 +3513,6 @@ static int adap_init0_no_config(struct adapter *adapter, int reset)
35133513
if (ret < 0)
35143514
goto bye;
35153515

3516-
#ifndef CONFIG_CHELSIO_T4_OFFLOAD
3517-
/*
3518-
* If we're a pure NIC driver then disable all offloading facilities.
3519-
* This will allow the firmware to optimize aspects of the hardware
3520-
* configuration which will result in improved performance.
3521-
*/
3522-
caps_cmd.ofldcaps = 0;
3523-
caps_cmd.iscsicaps = 0;
3524-
caps_cmd.rdmacaps = 0;
3525-
caps_cmd.fcoecaps = 0;
3526-
#endif
3527-
35283516
if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_VM)) {
35293517
if (!vf_acls)
35303518
caps_cmd.niccaps ^= htons(FW_CAPS_CONFIG_NIC_VM);
@@ -3745,6 +3733,7 @@ static int adap_init0(struct adapter *adap)
37453733
u32 v, port_vec;
37463734
enum dev_state state;
37473735
u32 params[7], val[7];
3736+
struct fw_caps_config_cmd caps_cmd;
37483737
int reset = 1, j;
37493738

37503739
/*
@@ -3898,6 +3887,9 @@ static int adap_init0(struct adapter *adap)
38983887
goto bye;
38993888
}
39003889

3890+
if (is_bypass_device(adap->pdev->device))
3891+
adap->params.bypass = 1;
3892+
39013893
/*
39023894
* Grab some of our basic fundamental operating parameters.
39033895
*/
@@ -3940,13 +3932,12 @@ static int adap_init0(struct adapter *adap)
39403932
adap->tids.aftid_end = val[1];
39413933
}
39423934

3943-
#ifdef CONFIG_CHELSIO_T4_OFFLOAD
39443935
/*
39453936
* Get device capabilities so we can determine what resources we need
39463937
* to manage.
39473938
*/
39483939
memset(&caps_cmd, 0, sizeof(caps_cmd));
3949-
caps_cmd.op_to_write = htonl(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
3940+
caps_cmd.op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
39503941
FW_CMD_REQUEST | FW_CMD_READ);
39513942
caps_cmd.retval_len16 = htonl(FW_LEN16(caps_cmd));
39523943
ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd),
@@ -3991,15 +3982,6 @@ static int adap_init0(struct adapter *adap)
39913982
adap->vres.ddp.size = val[4] - val[3] + 1;
39923983
adap->params.ofldq_wr_cred = val[5];
39933984

3994-
params[0] = FW_PARAM_PFVF(ETHOFLD_START);
3995-
params[1] = FW_PARAM_PFVF(ETHOFLD_END);
3996-
ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2,
3997-
params, val);
3998-
if ((val[0] != val[1]) && (ret >= 0)) {
3999-
adap->tids.uotid_base = val[0];
4000-
adap->tids.nuotids = val[1] - val[0] + 1;
4001-
}
4002-
40033985
adap->params.offload = 1;
40043986
}
40053987
if (caps_cmd.rdmacaps) {
@@ -4048,7 +4030,6 @@ static int adap_init0(struct adapter *adap)
40484030
}
40494031
#undef FW_PARAM_PFVF
40504032
#undef FW_PARAM_DEV
4051-
#endif /* CONFIG_CHELSIO_T4_OFFLOAD */
40524033

40534034
/*
40544035
* These are finalized by FW initialization, load their values now.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ struct tid_info {
102102
unsigned int ftid_base;
103103
unsigned int aftid_base;
104104
unsigned int aftid_end;
105+
/* Server filter region */
106+
unsigned int sftid_base;
107+
unsigned int nsftids;
105108

106109
spinlock_t atid_lock ____cacheline_aligned_in_smp;
107110
union aopen_entry *afree;

drivers/net/ethernet/freescale/gianfar_ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
478478
pr_err("no resource\n");
479479
goto no_resource;
480480
}
481-
if (request_resource(&ioport_resource, etsects->rsrc)) {
481+
if (request_resource(&iomem_resource, etsects->rsrc)) {
482482
pr_err("resource busy\n");
483483
goto no_resource;
484484
}

drivers/net/ethernet/mellanox/mlx4/en_tx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv,
143143
mlx4_bf_free(mdev->dev, &ring->bf);
144144
mlx4_qp_remove(mdev->dev, &ring->qp);
145145
mlx4_qp_free(mdev->dev, &ring->qp);
146-
mlx4_qp_release_range(mdev->dev, ring->qpn, 1);
147146
mlx4_en_unmap_buffer(&ring->wqres.buf);
148147
mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
149148
kfree(ring->bounce_buf);
@@ -712,7 +711,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
712711
if (bounce)
713712
tx_desc = mlx4_en_bounce_to_desc(priv, ring, index, desc_size);
714713

715-
if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) {
714+
if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tx_tag_present(skb)) {
716715
*(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn);
717716
op_own |= htonl((bf_index & 0xffff) << 8);
718717
/* Ensure new descirptor hits memory

drivers/net/ethernet/mellanox/mlx4/eq.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,18 @@ static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
837837
return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4);
838838
}
839839

840+
static void mlx4_unmap_uar(struct mlx4_dev *dev)
841+
{
842+
struct mlx4_priv *priv = mlx4_priv(dev);
843+
int i;
844+
845+
for (i = 0; i < mlx4_num_eq_uar(dev); ++i)
846+
if (priv->eq_table.uar_map[i]) {
847+
iounmap(priv->eq_table.uar_map[i]);
848+
priv->eq_table.uar_map[i] = NULL;
849+
}
850+
}
851+
840852
static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
841853
u8 intr, struct mlx4_eq *eq)
842854
{
@@ -1201,6 +1213,7 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
12011213
mlx4_free_irqs(dev);
12021214

12031215
err_out_bitmap:
1216+
mlx4_unmap_uar(dev);
12041217
mlx4_bitmap_cleanup(&priv->eq_table.bitmap);
12051218

12061219
err_out_free:
@@ -1225,10 +1238,7 @@ void mlx4_cleanup_eq_table(struct mlx4_dev *dev)
12251238
if (!mlx4_is_slave(dev))
12261239
mlx4_unmap_clr_int(dev);
12271240

1228-
for (i = 0; i < mlx4_num_eq_uar(dev); ++i)
1229-
if (priv->eq_table.uar_map[i])
1230-
iounmap(priv->eq_table.uar_map[i]);
1231-
1241+
mlx4_unmap_uar(dev);
12321242
mlx4_bitmap_cleanup(&priv->eq_table.bitmap);
12331243

12341244
kfree(priv->eq_table.uar_map);

0 commit comments

Comments
 (0)