Skip to content

Commit d69f58e

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.47' into linux-linaro-lsk-v4.4
This is the 4.4.47 stable release
2 parents efa59a0 + 4686ea2 commit d69f58e

22 files changed

Lines changed: 141 additions & 55 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 46
3+
SUBLEVEL = 47
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,8 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
732732
unsigned int c_index, last_c_index, last_tx_cn, num_tx_cbs;
733733
unsigned int pkts_compl = 0, bytes_compl = 0;
734734
struct bcm_sysport_cb *cb;
735-
struct netdev_queue *txq;
736735
u32 hw_ind;
737736

738-
txq = netdev_get_tx_queue(ndev, ring->index);
739-
740737
/* Compute how many descriptors have been processed since last call */
741738
hw_ind = tdma_readl(priv, TDMA_DESC_RING_PROD_CONS_INDEX(ring->index));
742739
c_index = (hw_ind >> RING_CONS_INDEX_SHIFT) & RING_CONS_INDEX_MASK;
@@ -767,9 +764,6 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
767764

768765
ring->c_index = c_index;
769766

770-
if (netif_tx_queue_stopped(txq) && pkts_compl)
771-
netif_tx_wake_queue(txq);
772-
773767
netif_dbg(priv, tx_done, ndev,
774768
"ring=%d c_index=%d pkts_compl=%d, bytes_compl=%d\n",
775769
ring->index, ring->c_index, pkts_compl, bytes_compl);
@@ -781,16 +775,33 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
781775
static unsigned int bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv,
782776
struct bcm_sysport_tx_ring *ring)
783777
{
778+
struct netdev_queue *txq;
784779
unsigned int released;
785780
unsigned long flags;
786781

782+
txq = netdev_get_tx_queue(priv->netdev, ring->index);
783+
787784
spin_lock_irqsave(&ring->lock, flags);
788785
released = __bcm_sysport_tx_reclaim(priv, ring);
786+
if (released)
787+
netif_tx_wake_queue(txq);
788+
789789
spin_unlock_irqrestore(&ring->lock, flags);
790790

791791
return released;
792792
}
793793

794+
/* Locked version of the per-ring TX reclaim, but does not wake the queue */
795+
static void bcm_sysport_tx_clean(struct bcm_sysport_priv *priv,
796+
struct bcm_sysport_tx_ring *ring)
797+
{
798+
unsigned long flags;
799+
800+
spin_lock_irqsave(&ring->lock, flags);
801+
__bcm_sysport_tx_reclaim(priv, ring);
802+
spin_unlock_irqrestore(&ring->lock, flags);
803+
}
804+
794805
static int bcm_sysport_tx_poll(struct napi_struct *napi, int budget)
795806
{
796807
struct bcm_sysport_tx_ring *ring =
@@ -1275,7 +1286,7 @@ static void bcm_sysport_fini_tx_ring(struct bcm_sysport_priv *priv,
12751286
napi_disable(&ring->napi);
12761287
netif_napi_del(&ring->napi);
12771288

1278-
bcm_sysport_tx_reclaim(priv, ring);
1289+
bcm_sysport_tx_clean(priv, ring);
12791290

12801291
kfree(ring->cbs);
12811292
ring->cbs = NULL;

drivers/net/ethernet/mellanox/mlxsw/pci.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,21 +206,21 @@ MLXSW_ITEM32(pci, eqe, owner, 0x0C, 0, 1);
206206
/* pci_eqe_cmd_token
207207
* Command completion event - token
208208
*/
209-
MLXSW_ITEM32(pci, eqe, cmd_token, 0x08, 16, 16);
209+
MLXSW_ITEM32(pci, eqe, cmd_token, 0x00, 16, 16);
210210

211211
/* pci_eqe_cmd_status
212212
* Command completion event - status
213213
*/
214-
MLXSW_ITEM32(pci, eqe, cmd_status, 0x08, 0, 8);
214+
MLXSW_ITEM32(pci, eqe, cmd_status, 0x00, 0, 8);
215215

216216
/* pci_eqe_cmd_out_param_h
217217
* Command completion event - output parameter - higher part
218218
*/
219-
MLXSW_ITEM32(pci, eqe, cmd_out_param_h, 0x0C, 0, 32);
219+
MLXSW_ITEM32(pci, eqe, cmd_out_param_h, 0x04, 0, 32);
220220

221221
/* pci_eqe_cmd_out_param_l
222222
* Command completion event - output parameter - lower part
223223
*/
224-
MLXSW_ITEM32(pci, eqe, cmd_out_param_l, 0x10, 0, 32);
224+
MLXSW_ITEM32(pci, eqe, cmd_out_param_l, 0x08, 0, 32);
225225

226226
#endif

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static netdev_tx_t mlxsw_sp_port_xmit(struct sk_buff *skb,
390390
dev_kfree_skb_any(skb_orig);
391391
return NETDEV_TX_OK;
392392
}
393+
dev_consume_skb_any(skb_orig);
393394
}
394395

395396
if (eth_skb_pad(skb)) {

drivers/net/ethernet/mellanox/mlxsw/switchx2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ static netdev_tx_t mlxsw_sx_port_xmit(struct sk_buff *skb,
313313
dev_kfree_skb_any(skb_orig);
314314
return NETDEV_TX_OK;
315315
}
316+
dev_consume_skb_any(skb_orig);
316317
}
317318
mlxsw_sx_txhdr_construct(skb, &tx_info);
318319
len = skb->len;

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,19 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
13301330
buffer = PTR_ALIGN(priv->tx_align[q], DPTR_ALIGN) +
13311331
entry / NUM_TX_DESC * DPTR_ALIGN;
13321332
len = PTR_ALIGN(skb->data, DPTR_ALIGN) - skb->data;
1333+
/* Zero length DMA descriptors are problematic as they seem to
1334+
* terminate DMA transfers. Avoid them by simply using a length of
1335+
* DPTR_ALIGN (4) when skb data is aligned to DPTR_ALIGN.
1336+
*
1337+
* As skb is guaranteed to have at least ETH_ZLEN (60) bytes of
1338+
* data by the call to skb_put_padto() above this is safe with
1339+
* respect to both the length of the first DMA descriptor (len)
1340+
* overflowing the available data and the length of the second DMA
1341+
* descriptor (skb->len - len) being negative.
1342+
*/
1343+
if (len == 0)
1344+
len = DPTR_ALIGN;
1345+
13331346
memcpy(buffer, skb->data, len);
13341347
dma_addr = dma_map_single(ndev->dev.parent, buffer, len, DMA_TO_DEVICE);
13351348
if (dma_mapping_error(ndev->dev.parent, dma_addr))

drivers/net/phy/bcm63xx.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ MODULE_DESCRIPTION("Broadcom 63xx internal PHY driver");
2121
MODULE_AUTHOR("Maxime Bizon <mbizon@freebox.fr>");
2222
MODULE_LICENSE("GPL");
2323

24+
static int bcm63xx_config_intr(struct phy_device *phydev)
25+
{
26+
int reg, err;
27+
28+
reg = phy_read(phydev, MII_BCM63XX_IR);
29+
if (reg < 0)
30+
return reg;
31+
32+
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
33+
reg &= ~MII_BCM63XX_IR_GMASK;
34+
else
35+
reg |= MII_BCM63XX_IR_GMASK;
36+
37+
err = phy_write(phydev, MII_BCM63XX_IR, reg);
38+
return err;
39+
}
40+
2441
static int bcm63xx_config_init(struct phy_device *phydev)
2542
{
2643
int reg, err;
@@ -55,7 +72,7 @@ static struct phy_driver bcm63xx_driver[] = {
5572
.config_aneg = genphy_config_aneg,
5673
.read_status = genphy_read_status,
5774
.ack_interrupt = bcm_phy_ack_intr,
58-
.config_intr = bcm_phy_config_intr,
75+
.config_intr = bcm63xx_config_intr,
5976
.driver = { .owner = THIS_MODULE },
6077
}, {
6178
/* same phy as above, with just a different OUI */
@@ -68,7 +85,7 @@ static struct phy_driver bcm63xx_driver[] = {
6885
.config_aneg = genphy_config_aneg,
6986
.read_status = genphy_read_status,
7087
.ack_interrupt = bcm_phy_ack_intr,
71-
.config_intr = bcm_phy_config_intr,
88+
.config_intr = bcm63xx_config_intr,
7289
.driver = { .owner = THIS_MODULE },
7390
} };
7491

drivers/net/usb/cdc_ether.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ static const struct driver_info wwan_info = {
462462
#define SAMSUNG_VENDOR_ID 0x04e8
463463
#define LENOVO_VENDOR_ID 0x17ef
464464
#define NVIDIA_VENDOR_ID 0x0955
465+
#define HP_VENDOR_ID 0x03f0
465466

466467
static const struct usb_device_id products[] = {
467468
/* BLACKLIST !!
@@ -608,6 +609,13 @@ static const struct usb_device_id products[] = {
608609
.driver_info = 0,
609610
},
610611

612+
/* HP lt2523 (Novatel E371) - handled by qmi_wwan */
613+
{
614+
USB_DEVICE_AND_INTERFACE_INFO(HP_VENDOR_ID, 0x421d, USB_CLASS_COMM,
615+
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
616+
.driver_info = 0,
617+
},
618+
611619
/* AnyDATA ADU960S - handled by qmi_wwan */
612620
{
613621
USB_DEVICE_AND_INTERFACE_INFO(0x16d5, 0x650a, USB_CLASS_COMM,

drivers/net/usb/qmi_wwan.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@ static const struct usb_device_id products[] = {
485485
USB_CDC_PROTO_NONE),
486486
.driver_info = (unsigned long)&qmi_wwan_info,
487487
},
488+
{ /* HP lt2523 (Novatel E371) */
489+
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d,
490+
USB_CLASS_COMM,
491+
USB_CDC_SUBCLASS_ETHERNET,
492+
USB_CDC_PROTO_NONE),
493+
.driver_info = (unsigned long)&qmi_wwan_info,
494+
},
488495
{ /* HP lt4112 LTE/HSPA+ Gobi 4G Module (Huawei me906e) */
489496
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7),
490497
.driver_info = (unsigned long)&qmi_wwan_info,

drivers/net/usb/r8152.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ static u8 r8152_rx_csum(struct r8152 *tp, struct rx_desc *rx_desc)
16451645
u8 checksum = CHECKSUM_NONE;
16461646
u32 opts2, opts3;
16471647

1648-
if (tp->version == RTL_VER_01)
1648+
if (!(tp->netdev->features & NETIF_F_RXCSUM))
16491649
goto return_result;
16501650

16511651
opts2 = le32_to_cpu(rx_desc->opts2);
@@ -3442,6 +3442,8 @@ static bool delay_autosuspend(struct r8152 *tp)
34423442
*/
34433443
if (!sw_linking && tp->rtl_ops.in_nway(tp))
34443444
return true;
3445+
else if (!skb_queue_empty(&tp->tx_queue))
3446+
return true;
34453447
else
34463448
return false;
34473449
}
@@ -4221,6 +4223,11 @@ static int rtl8152_probe(struct usb_interface *intf,
42214223
NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
42224224
NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
42234225

4226+
if (tp->version == RTL_VER_01) {
4227+
netdev->features &= ~NETIF_F_RXCSUM;
4228+
netdev->hw_features &= ~NETIF_F_RXCSUM;
4229+
}
4230+
42244231
netdev->ethtool_ops = &ops;
42254232
netif_set_gso_max_size(netdev, RTL_LIMITED_TSO_SIZE);
42264233

0 commit comments

Comments
 (0)