Skip to content

Commit 9eb3591

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2 parents cf29576 + 07f12b2 commit 9eb3591

Some content is hidden

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

51 files changed

+408
-106
lines changed

arch/mips/net/ebpf_jit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
18191819

18201820
/* Update the icache */
18211821
flush_icache_range((unsigned long)ctx.target,
1822-
(unsigned long)(ctx.target + ctx.idx * sizeof(u32)));
1822+
(unsigned long)&ctx.target[ctx.idx]);
18231823

18241824
if (bpf_jit_enable > 1)
18251825
/* Dump JIT code */

drivers/net/dsa/lantiq_gswip.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,12 @@ static struct platform_driver gswip_driver = {
11631163

11641164
module_platform_driver(gswip_driver);
11651165

1166+
MODULE_FIRMWARE("lantiq/xrx300_phy11g_a21.bin");
1167+
MODULE_FIRMWARE("lantiq/xrx300_phy22f_a21.bin");
1168+
MODULE_FIRMWARE("lantiq/xrx200_phy11g_a14.bin");
1169+
MODULE_FIRMWARE("lantiq/xrx200_phy11g_a22.bin");
1170+
MODULE_FIRMWARE("lantiq/xrx200_phy22f_a14.bin");
1171+
MODULE_FIRMWARE("lantiq/xrx200_phy22f_a22.bin");
11661172
MODULE_AUTHOR("Hauke Mehrtens <[email protected]>");
11671173
MODULE_DESCRIPTION("Lantiq / Intel GSWIP driver");
11681174
MODULE_LICENSE("GPL v2");

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip,
922922
default:
923923
return U64_MAX;
924924
}
925-
value = (((u64)high) << 16) | low;
925+
value = (((u64)high) << 32) | low;
926926
return value;
927927
}
928928

@@ -3118,7 +3118,7 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
31183118
.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
31193119
.port_link_state = mv88e6352_port_link_state,
31203120
.port_get_cmode = mv88e6185_port_get_cmode,
3121-
.stats_snapshot = mv88e6320_g1_stats_snapshot,
3121+
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
31223122
.stats_set_histogram = mv88e6095_g1_stats_set_histogram,
31233123
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
31243124
.stats_get_strings = mv88e6095_stats_get_strings,
@@ -4620,6 +4620,14 @@ static int mv88e6xxx_smi_init(struct mv88e6xxx_chip *chip,
46204620
return 0;
46214621
}
46224622

4623+
static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip)
4624+
{
4625+
int i;
4626+
4627+
for (i = 0; i < mv88e6xxx_num_ports(chip); i++)
4628+
chip->ports[i].cmode = MV88E6XXX_PORT_STS_CMODE_INVALID;
4629+
}
4630+
46234631
static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
46244632
int port)
46254633
{
@@ -4656,6 +4664,8 @@ static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
46564664
if (err)
46574665
goto free;
46584666

4667+
mv88e6xxx_ports_cmode_init(chip);
4668+
46594669
mutex_lock(&chip->reg_lock);
46604670
err = mv88e6xxx_switch_reset(chip);
46614671
mutex_unlock(&chip->reg_lock);

drivers/net/dsa/mv88e6xxx/port.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
398398
cmode = 0;
399399
}
400400

401+
/* cmode doesn't change, nothing to do for us */
402+
if (cmode == chip->ports[port].cmode)
403+
return 0;
404+
401405
lane = mv88e6390x_serdes_get_lane(chip, port);
402406
if (lane < 0)
403407
return lane;
@@ -408,7 +412,7 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
408412
return err;
409413
}
410414

411-
err = mv88e6390_serdes_power(chip, port, false);
415+
err = mv88e6390x_serdes_power(chip, port, false);
412416
if (err)
413417
return err;
414418

@@ -424,7 +428,7 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
424428
if (err)
425429
return err;
426430

427-
err = mv88e6390_serdes_power(chip, port, true);
431+
err = mv88e6390x_serdes_power(chip, port, true);
428432
if (err)
429433
return err;
430434

drivers/net/dsa/mv88e6xxx/port.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define MV88E6185_PORT_STS_CMODE_1000BASE_X 0x0005
5353
#define MV88E6185_PORT_STS_CMODE_PHY 0x0006
5454
#define MV88E6185_PORT_STS_CMODE_DISABLED 0x0007
55+
#define MV88E6XXX_PORT_STS_CMODE_INVALID 0xff
5556

5657
/* Offset 0x01: MAC (or PCS or Physical) Control Register */
5758
#define MV88E6XXX_PORT_MAC_CTL 0x01

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ static int hw_atl_b0_hw_offload_set(struct aq_hw_s *self,
279279

280280
static int hw_atl_b0_hw_init_tx_path(struct aq_hw_s *self)
281281
{
282+
/* Tx TC/Queue number config */
283+
hw_atl_rpb_tps_tx_tc_mode_set(self, 1U);
284+
282285
hw_atl_thm_lso_tcp_flag_of_first_pkt_set(self, 0x0FF6U);
283286
hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(self, 0x0FF6U);
284287
hw_atl_thm_lso_tcp_flag_of_last_pkt_set(self, 0x0F7FU);

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,15 @@ void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en)
12741274
HW_ATL_TPB_TX_BUF_EN_SHIFT, tx_buff_en);
12751275
}
12761276

1277+
void hw_atl_rpb_tps_tx_tc_mode_set(struct aq_hw_s *aq_hw,
1278+
u32 tx_traf_class_mode)
1279+
{
1280+
aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TX_TC_MODE_ADDR,
1281+
HW_ATL_TPB_TX_TC_MODE_MSK,
1282+
HW_ATL_TPB_TX_TC_MODE_SHIFT,
1283+
tx_traf_class_mode);
1284+
}
1285+
12771286
void hw_atl_tpb_tx_buff_hi_threshold_per_tc_set(struct aq_hw_s *aq_hw,
12781287
u32 tx_buff_hi_threshold_per_tc,
12791288
u32 buffer)

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,10 @@ void hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(struct aq_hw_s *aq_hw,
605605

606606
/* tpb */
607607

608+
/* set TX Traffic Class Mode */
609+
void hw_atl_rpb_tps_tx_tc_mode_set(struct aq_hw_s *aq_hw,
610+
u32 tx_traf_class_mode);
611+
608612
/* set tx buffer enable */
609613
void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en);
610614

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,6 +1948,19 @@
19481948
/* default value of bitfield tx_buf_en */
19491949
#define HW_ATL_TPB_TX_BUF_EN_DEFAULT 0x0
19501950

1951+
/* register address for bitfield tx_tc_mode */
1952+
#define HW_ATL_TPB_TX_TC_MODE_ADDR 0x00007900
1953+
/* bitmask for bitfield tx_tc_mode */
1954+
#define HW_ATL_TPB_TX_TC_MODE_MSK 0x00000100
1955+
/* inverted bitmask for bitfield tx_tc_mode */
1956+
#define HW_ATL_TPB_TX_TC_MODE_MSKN 0xFFFFFEFF
1957+
/* lower bit position of bitfield tx_tc_mode */
1958+
#define HW_ATL_TPB_TX_TC_MODE_SHIFT 8
1959+
/* width of bitfield tx_tc_mode */
1960+
#define HW_ATL_TPB_TX_TC_MODE_WIDTH 1
1961+
/* default value of bitfield tx_tc_mode */
1962+
#define HW_ATL_TPB_TX_TC_MODE_DEFAULT 0x0
1963+
19511964
/* tx tx{b}_hi_thresh[c:0] bitfield definitions
19521965
* preprocessor definitions for the bitfield "tx{b}_hi_thresh[c:0]".
19531966
* parameter: buffer {b} | stride size 0x10 | range [0, 7]

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
504504
}
505505

506506
length >>= 9;
507+
if (unlikely(length >= ARRAY_SIZE(bnxt_lhint_arr))) {
508+
dev_warn_ratelimited(&pdev->dev, "Dropped oversize %d bytes TX packet.\n",
509+
skb->len);
510+
i = 0;
511+
goto tx_dma_error;
512+
}
507513
flags |= bnxt_lhint_arr[length];
508514
txbd->tx_bd_len_flags_type = cpu_to_le32(flags);
509515

0 commit comments

Comments
 (0)