Skip to content

Commit 34f9f43

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' into 'net-next' to get the AF_PACKET bug fix that Daniel's direct transmit changes depend upon. Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 95dc192 + 66e56cd commit 34f9f43

37 files changed

Lines changed: 314 additions & 208 deletions

File tree

‎Documentation/devicetree/bindings/net/davinci_emac.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides information, what the device node
44
for the davinci_emac interface contains.
55

66
Required properties:
7-
- compatible: "ti,davinci-dm6467-emac";
7+
- compatible: "ti,davinci-dm6467-emac" or "ti,am3517-emac"
88
- reg: Offset and length of the register set for the device
99
- ti,davinci-ctrl-reg-offset: offset to control register
1010
- ti,davinci-ctrl-mod-reg-offset: offset to control module register

‎Documentation/networking/packet_mmap.txt‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@ Transmission process is similar to capture as shown below.
123123
[shutdown] close() --------> destruction of the transmission socket and
124124
deallocation of all associated resources.
125125

126+
Socket creation and destruction is also straight forward, and is done
127+
the same way as in capturing described in the previous paragraph:
128+
129+
int fd = socket(PF_PACKET, mode, 0);
130+
131+
The protocol can optionally be 0 in case we only want to transmit
132+
via this socket, which avoids an expensive call to packet_rcv().
133+
In this case, you also need to bind(2) the TX_RING with sll_protocol = 0
134+
set. Otherwise, htons(ETH_P_ALL) or any other protocol, for example.
135+
126136
Binding the socket to your network interface is mandatory (with zero copy) to
127137
know the header size of frames used in the circular buffer.
128138

‎MAINTAINERS‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4450,10 +4450,8 @@ M: Bruce Allan <bruce.w.allan@intel.com>
44504450
M: Carolyn Wyborny <carolyn.wyborny@intel.com>
44514451
M: Don Skidmore <donald.c.skidmore@intel.com>
44524452
M: Greg Rose <gregory.v.rose@intel.com>
4453-
M: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
44544453
M: Alex Duyck <alexander.h.duyck@intel.com>
44554454
M: John Ronciak <john.ronciak@intel.com>
4456-
M: Tushar Dave <tushar.n.dave@intel.com>
44574455
L: e1000-devel@lists.sourceforge.net
44584456
W: http://www.intel.com/support/feedback.htm
44594457
W: http://e1000.sourceforge.net/

‎drivers/net/bonding/bond_main.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4199,9 +4199,9 @@ static int bond_check_params(struct bond_params *params)
41994199
(arp_ip_count < BOND_MAX_ARP_TARGETS) && arp_ip_target[i]; i++) {
42004200
/* not complete check, but should be good enough to
42014201
catch mistakes */
4202-
__be32 ip = in_aton(arp_ip_target[i]);
4203-
if (!isdigit(arp_ip_target[i][0]) || ip == 0 ||
4204-
ip == htonl(INADDR_BROADCAST)) {
4202+
__be32 ip;
4203+
if (!in4_pton(arp_ip_target[i], -1, (u8 *)&ip, -1, NULL) ||
4204+
IS_IP_TARGET_UNUSABLE_ADDRESS(ip)) {
42054205
pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n",
42064206
arp_ip_target[i]);
42074207
arp_interval = 0;

‎drivers/net/bonding/bond_sysfs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,12 +1634,12 @@ static ssize_t bonding_show_packets_per_slave(struct device *d,
16341634
char *buf)
16351635
{
16361636
struct bonding *bond = to_bond(d);
1637-
int packets_per_slave = bond->params.packets_per_slave;
1637+
unsigned int packets_per_slave = bond->params.packets_per_slave;
16381638

16391639
if (packets_per_slave > 1)
16401640
packets_per_slave = reciprocal_value(packets_per_slave);
16411641

1642-
return sprintf(buf, "%d\n", packets_per_slave);
1642+
return sprintf(buf, "%u\n", packets_per_slave);
16431643
}
16441644

16451645
static ssize_t bonding_store_packets_per_slave(struct device *d,

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,6 +3114,11 @@ int bnx2x_sriov_configure(struct pci_dev *dev, int num_vfs_param)
31143114
{
31153115
struct bnx2x *bp = netdev_priv(pci_get_drvdata(dev));
31163116

3117+
if (!IS_SRIOV(bp)) {
3118+
BNX2X_ERR("failed to configure SR-IOV since vfdb was not allocated. Check dmesg for errors in probe stage\n");
3119+
return -EINVAL;
3120+
}
3121+
31173122
DP(BNX2X_MSG_IOV, "bnx2x_sriov_configure called with %d, BNX2X_NR_VIRTFN(bp) was %d\n",
31183123
num_vfs_param, BNX2X_NR_VIRTFN(bp));
31193124

‎drivers/net/ethernet/emulex/benet/be_hw.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
#define SLIPORT_ERROR_NO_RESOURCE1 0x2
6565
#define SLIPORT_ERROR_NO_RESOURCE2 0x9
6666

67+
#define SLIPORT_ERROR_FW_RESET1 0x2
68+
#define SLIPORT_ERROR_FW_RESET2 0x0
69+
6770
/********* Memory BAR register ************/
6871
#define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc
6972
/* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt

‎drivers/net/ethernet/emulex/benet/be_main.c‎

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,8 +2464,16 @@ void be_detect_error(struct be_adapter *adapter)
24642464
*/
24652465
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
24662466
adapter->hw_error = true;
2467-
dev_err(&adapter->pdev->dev,
2468-
"Error detected in the card\n");
2467+
/* Do not log error messages if its a FW reset */
2468+
if (sliport_err1 == SLIPORT_ERROR_FW_RESET1 &&
2469+
sliport_err2 == SLIPORT_ERROR_FW_RESET2) {
2470+
dev_info(&adapter->pdev->dev,
2471+
"Firmware update in progress\n");
2472+
return;
2473+
} else {
2474+
dev_err(&adapter->pdev->dev,
2475+
"Error detected in the card\n");
2476+
}
24692477
}
24702478

24712479
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
@@ -2932,28 +2940,35 @@ static void be_cancel_worker(struct be_adapter *adapter)
29322940
}
29332941
}
29342942

2935-
static int be_clear(struct be_adapter *adapter)
2943+
static void be_mac_clear(struct be_adapter *adapter)
29362944
{
29372945
int i;
29382946

2947+
if (adapter->pmac_id) {
2948+
for (i = 0; i < (adapter->uc_macs + 1); i++)
2949+
be_cmd_pmac_del(adapter, adapter->if_handle,
2950+
adapter->pmac_id[i], 0);
2951+
adapter->uc_macs = 0;
2952+
2953+
kfree(adapter->pmac_id);
2954+
adapter->pmac_id = NULL;
2955+
}
2956+
}
2957+
2958+
static int be_clear(struct be_adapter *adapter)
2959+
{
29392960
be_cancel_worker(adapter);
29402961

29412962
if (sriov_enabled(adapter))
29422963
be_vf_clear(adapter);
29432964

29442965
/* delete the primary mac along with the uc-mac list */
2945-
for (i = 0; i < (adapter->uc_macs + 1); i++)
2946-
be_cmd_pmac_del(adapter, adapter->if_handle,
2947-
adapter->pmac_id[i], 0);
2948-
adapter->uc_macs = 0;
2966+
be_mac_clear(adapter);
29492967

29502968
be_cmd_if_destroy(adapter, adapter->if_handle, 0);
29512969

29522970
be_clear_queues(adapter);
29532971

2954-
kfree(adapter->pmac_id);
2955-
adapter->pmac_id = NULL;
2956-
29572972
be_msix_disable(adapter);
29582973
return 0;
29592974
}
@@ -3812,6 +3827,8 @@ static int lancer_fw_download(struct be_adapter *adapter,
38123827
}
38133828

38143829
if (change_status == LANCER_FW_RESET_NEEDED) {
3830+
dev_info(&adapter->pdev->dev,
3831+
"Resetting adapter to activate new FW\n");
38153832
status = lancer_physdev_ctrl(adapter,
38163833
PHYSDEV_CONTROL_FW_RESET_MASK);
38173834
if (status) {
@@ -4363,13 +4380,13 @@ static int lancer_recover_func(struct be_adapter *adapter)
43634380
goto err;
43644381
}
43654382

4366-
dev_err(dev, "Error recovery successful\n");
4383+
dev_err(dev, "Adapter recovery successful\n");
43674384
return 0;
43684385
err:
43694386
if (status == -EAGAIN)
43704387
dev_err(dev, "Waiting for resource provisioning\n");
43714388
else
4372-
dev_err(dev, "Error recovery failed\n");
4389+
dev_err(dev, "Adapter recovery failed\n");
43734390

43744391
return status;
43754392
}

‎drivers/net/ethernet/marvell/mvneta.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ static void mvneta_rxq_drop_pkts(struct mvneta_port *pp,
13781378

13791379
dev_kfree_skb_any(skb);
13801380
dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr,
1381-
rx_desc->data_size, DMA_FROM_DEVICE);
1381+
MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE);
13821382
}
13831383

13841384
if (rx_done)
@@ -1424,7 +1424,7 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
14241424
}
14251425

14261426
dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr,
1427-
rx_desc->data_size, DMA_FROM_DEVICE);
1427+
MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE);
14281428

14291429
rx_bytes = rx_desc->data_size -
14301430
(ETH_FCS_LEN + MVNETA_MH_SIZE);

‎drivers/net/ethernet/nvidia/forcedeth.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5149,8 +5149,10 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64
51495149
{
51505150
struct fe_priv *np = netdev_priv(dev);
51515151
u8 __iomem *base = get_hwbase(dev);
5152-
int result;
5153-
memset(buffer, 0, nv_get_sset_count(dev, ETH_SS_TEST)*sizeof(u64));
5152+
int result, count;
5153+
5154+
count = nv_get_sset_count(dev, ETH_SS_TEST);
5155+
memset(buffer, 0, count * sizeof(u64));
51545156

51555157
if (!nv_link_test(dev)) {
51565158
test->flags |= ETH_TEST_FL_FAILED;
@@ -5194,7 +5196,7 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64
51945196
return;
51955197
}
51965198

5197-
if (!nv_loopback_test(dev)) {
5199+
if (count > NV_TEST_COUNT_BASE && !nv_loopback_test(dev)) {
51985200
test->flags |= ETH_TEST_FL_FAILED;
51995201
buffer[3] = 1;
52005202
}

0 commit comments

Comments
 (0)