16 Jun, 2017
1 commit
-
A common pattern with skb_put() is to just want to memcpy()
some data into the new space, introduce skb_put_data() for
this.An spatch similar to the one for skb_put_zero() converts many
of the places using it:@@
identifier p, p2;
expression len, skb, data;
type t, t2;
@@
(
-p = skb_put(skb, len);
+p = skb_put_data(skb, data, len);
|
-p = (t)skb_put(skb, len);
+p = skb_put_data(skb, data, len);
)
(
p2 = (t2)p;
-memcpy(p2, data, len);
|
-memcpy(p, data, len);
)@@
type t, t2;
identifier p, p2;
expression skb, data;
@@
t *p;
...
(
-p = skb_put(skb, sizeof(t));
+p = skb_put_data(skb, data, sizeof(t));
|
-p = (t *)skb_put(skb, sizeof(t));
+p = skb_put_data(skb, data, sizeof(t));
)
(
p2 = (t2)p;
-memcpy(p2, data, sizeof(*p));
|
-memcpy(p, data, sizeof(*p));
)@@
expression skb, len, data;
@@
-memcpy(skb_put(skb, len), data, len);
+skb_put_data(skb, data, len);(again, manually post-processed to retain some comments)
Reviewed-by: Stephen Hemminger
Signed-off-by: Johannes Berg
Signed-off-by: David S. Miller
14 Jun, 2017
1 commit
-
Remove unnecessary setting of flag IFF_BROADCAST, since ether_setup
already does this.Signed-off-by: Zhang Shengju
Signed-off-by: David S. Miller
24 Mar, 2017
1 commit
-
Conflicts:
drivers/net/ethernet/broadcom/genet/bcmmii.c
drivers/net/hyperv/netvsc.c
kernel/bpf/hashtab.cAlmost entirely overlapping changes.
Signed-off-by: David S. Miller
23 Mar, 2017
2 commits
-
The extended device socket cannot turn on/off while system is running.
So when system boots up and the device is not power on, the fjes driver
does not need be loaded.To check the status of the device, the patch adds ACPI _STA method check.
Signed-off-by: Yasuaki Ishimatsu
CC: Taku Izumi
Signed-off-by: David S. Miller -
The fjes driver is used only by FUJITSU servers and almost of all
servers in the world never use it. But currently if ACPI PNP0C02
is defined in the ACPI table, the following message is always shown:"FUJITSU Extended Socket Network Device Driver - version 1.2
- Copyright (c) 2015 FUJITSU LIMITED"The message makes users confused because there is no reason that
the message is shown in other vendor servers.To avoid the confusion, the patch adds a check that the server
has a extended socket device or not.Signed-off-by: Yasuaki Ishimatsu
CC: Taku Izumi
Signed-off-by: David S. Miller
16 Mar, 2017
1 commit
-
This patch fixes netdev->features for Extended Socket network device.
Currently Extended Socket network device's netdev->feature claims
NETIF_F_HW_CSUM, however this is completely wrong. There's no feature
of checksum offloading.
That causes invalid TCP/UDP checksum and packet rejection when IP
forwarding from Extended Socket network device to other network device.NETIF_F_HW_CSUM should be omitted.
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller
13 Mar, 2017
1 commit
-
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.As I don't have the hardware, I'd be very pleased if
someone may test this patch.Signed-off-by: Philippe Reynes
Signed-off-by: David S. Miller
31 Jan, 2017
1 commit
-
napi_complete_done() allows to opt-in for gro_flush_timeout,
added back in linux-3.19, commit 3b47d30396ba
("net: gro: add a per device gro flush timer")This allows for more efficient GRO aggregation without
sacrifying latencies.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
09 Jan, 2017
1 commit
-
The network device operation for reading statistics is only called
in one place, and it ignores the return value. Having a structure
return value is potentially confusing because some future driver could
incorrectly assume that the return value was used.Fix all drivers with ndo_get_stats64 to have a void function.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
21 Oct, 2016
1 commit
-
firewire-net:
- set min/max_mtu
- remove fwnet_change_mtunes:
- set max_mtu
- clean up nes_netdev_change_mtuxpnet:
- set min/max_mtu
- remove xpnet_dev_change_mtuhippi:
- set min/max_mtu
- remove hippi_change_mtubatman-adv:
- set max_mtu
- remove batadv_interface_change_mtu
- initialization is a little async, not 100% certain that max_mtu is set
in the optimal place, don't have hardware to test withrionet:
- set min/max_mtu
- remove rionet_change_mtuslip:
- set min/max_mtu
- streamline sl_change_mtuum/net_kern:
- remove pointless ndo_change_mtuhsi/clients/ssi_protocol:
- use core MTU range checking
- remove now redundant ssip_pn_set_mtuipoib:
- set a default max MTU value
- Note: ipoib's actual max MTU can vary, depending on if the device is in
connected mode or not, so we'll just set the max_mtu value to the max
possible, and let the ndo_change_mtu function continue to validate any new
MTU change requests with checks for CM or not. Note that ipoib has no
min_mtu set, and thus, the network core's mtu > 0 check is the only lower
bounds here.mptlan:
- use net core MTU range checking
- remove now redundant mpt_lan_change_mtufddi:
- min_mtu = 21, max_mtu = 4470
- remove now redundant fddi_change_mtu (including export)fjes:
- min_mtu = 8192, max_mtu = 65536
- The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to
get past the core net MTU range checks so fjes_change_mtu can validate a
new MTU against what it supports (see fjes_support_mtu in fjes_hw.c)hsr:
- min_mtu = 0 (calls ether_setup, max_mtu is 1500)f_phonet:
- min_mtu = 6, max_mtu = 65541u_ether:
- min_mtu = 14, max_mtu = 15412phonet/pep-gprs:
- min_mtu = 576, max_mtu = 65530
- remove redundant gprs_set_mtuCC: netdev@vger.kernel.org
CC: linux-rdma@vger.kernel.org
CC: Stefan Richter
CC: Faisal Latif
CC: linux-rdma@vger.kernel.org
CC: Cliff Whickman
CC: Robin Holt
CC: Jes Sorensen
CC: Marek Lindner
CC: Simon Wunderlich
CC: Antonio Quartulli
CC: Sathya Prakash
CC: Chaitra P B
CC: Suganath Prabu Subramani
CC: MPT-FusionLinux.pdl@broadcom.com
CC: Sebastian Reichel
CC: Felipe Balbi
CC: Arvid Brodin
CC: Remi Denis-Courmont
Signed-off-by: Jarod Wilson
Signed-off-by: David S. Miller
18 Oct, 2016
1 commit
-
phys_addr_t may be wider than a pointer and has to be printed
using the special %pap format string, as pointed out by
this new warning.arch/x86/include/../../../drivers/net/fjes/fjes_trace.h: In function ‘trace_raw_output_fjes_hw_start_debug_req’:
arch/x86/include/../../../drivers/net/fjes/fjes_trace.h:212:563: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]Note that this has to pass the address by reference instead of
casting it to a different type.Fixes: b6ba737d0b29 ("fjes: ethtool -w and -W support for fjes driver")
Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller
15 Oct, 2016
6 commits
-
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds debugfs entry to show EP status information.
You can get each EP's status information like the following:# cat /sys/kernel/debug/fjes/fjes.0/status
EPID STATUS SAME_ZONE CONNECTED
ep0 shared Y Y
ep1 - - -
ep2 unshared N N
ep3 unshared N N
ep4 unshared N N
ep5 unshared N N
ep6 unshared N N
ep7 unshared N NSigned-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds implementation of supporting
ethtool -w and -W for fjes driver.You can enable and disable firmware debug mode by
using ethtool -W, and also retrieve firmware
activity information by using ethtool -w.This is useful for debugging.
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds tracepoints in fjes driver.
This is useful for debugging purpose.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch enhances ethtool -S for fjes driver so that
EP related statistics can be retrieved.The following statistics can be displayed via ethtool -S:
ep%d_com_regist_buf_exec
ep%d_com_unregist_buf_exec
ep%d_send_intr_rx
ep%d_send_intr_unshare
ep%d_send_intr_zoneupdate
ep%d_recv_intr_rx
ep%d_recv_intr_unshare
ep%d_recv_intr_stop
ep%d_recv_intr_zoneupdate
ep%d_tx_buffer_full
ep%d_tx_dropped_not_shared
ep%d_tx_dropped_ver_mismatch
ep%d_tx_dropped_buf_size_mismatch
ep%d_tx_dropped_vlanid_mismatchSigned-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds implementation of supporting
ethtool -d for fjes driver. By using ethtool -d,
you can get registers dump of Exetnded socket device.# ethtool -d es0
Offset Values
------ ------
0x0000: 01 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0020: 02 00 00 80 02 00 00 80 64 a6 58 08 07 00 00 00
0x0030: 00 00 00 00 28 80 00 00 00 00 f9 e3 06 00 00 00
0x0040: 00 00 00 00 18 00 00 00 80 a4 58 08 07 00 00 00
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0080: 00 00 00 00 00 00 e0 7f 00 00 01 00 00 00 01 00
0x0090: 00 00 00 00Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller
16 Aug, 2016
1 commit
-
The field "owner" is set by core. Thus delete an extra initialisation.
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Markus Elfring
Signed-off-by: David S. Miller
04 Jun, 2016
1 commit
-
alloc_workqueue replaces deprecated create_workqueue().
The workqueue adapter->txrx_wq has workitem
&adapter->raise_intr_rxdata_task per adapter. Extended Socket Network
Device is shared memory based, so someone's transmission denotes other's
reception. raise_intr_rxdata_task raises interruption of receivers from
the sender in order to notify receivers.The workqueue adapter->control_wq has workitem
&adapter->interrupt_watch_task per adapter. interrupt_watch_task is used
to prevent delay of interrupts.Dedicated workqueues have been used in both cases since the workitems
on the workqueues are involved in normal device operation and require
forward progress under memory pressure.max_active has been set to 0 since there is no need for throttling
the number of active work items.Since network devices may be used for memory reclaim,
WQ_MEM_RECLAIM has been set to guarantee forward progress.Signed-off-by: Bhaktipriya Shridhar
Signed-off-by: David S. Miller
10 May, 2016
1 commit
-
commit-bd5a256 introduces a deadlock bug in fjes_change_mtu().
This spin_lock_irqsave() is obviously unnecessary.This patch eliminates unnecessary spin_lock_irqsave() in
fjes_change_mtu()Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller
05 May, 2016
2 commits
-
Replace all trans_start updates with netif_trans_update helper.
change was done via spatch:struct net_device *d;
@@
- d->trans_start = jiffies
+ netif_trans_update(d)Compile tested only.
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: MPT-FusionLinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Florian Westphal
Acked-by: Felipe Balbi
Acked-by: Mugunthan V N
Acked-by: Antonio Quartulli
Signed-off-by: David S. Miller -
a trans_start struct member exists twice:
- in struct net_device (legacy)
- in struct netdev_queueInstead of open-coding dev->trans_start usage to obtain the current
trans_start value, use dev_trans_start() instead.This is not exactly the same, as dev_trans_start also considers
the trans_start values of the netdev queues owned by the device
and provides the most recent one.For legacy devices this doesn't matter as dev_trans_start can cope
with netdev trans_start values of 0 (they are ignored).This is a prerequisite to eventual removal of dev->trans_start.
Cc: linux-rdma@vger.kernel.org
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller
17 Apr, 2016
6 commits
-
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch introduces spinlock of rx_status for
proper excusive control.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch enhances the fjes_change_mtu() method
by introducing new flag named FJES_RX_MTU_CHANGING_DONE
in rx_status. At the same time, default MTU value is
changed into 65510 bytes.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
In fjes_raise_intr_rxdata_task(), there's a bug of bitwise
check because of missing "& FJES_RX_POLL_WORK".
This patch fixes this bug.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
There are bugs of acounting statistics in fjes_xmit_frame().
Accounting self stats is wrong. accounting stats of other
EPs to be transmitted is right.
This patch fixes this bug.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch optimizes the following timeout value.
- FJES_DEVICE_RESET_TIMEOUT
- FJES_COMMAND_REQ_TIMEOUT
- FJES_COMMAND_REQ_BUFF_TIMEOUTSigned-off-by: Taku Izumi
Signed-off-by: David S. Miller
12 Apr, 2016
1 commit
-
Use the function resource_size instead of explicit computation.
Problem found using Coccinelle.
Signed-off-by: Vaishali Thakkar
Signed-off-by: David S. Miller
16 Nov, 2015
1 commit
-
minor change, indenting is one tab out.
Signed-off-by: Colin Ian King
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller
08 Nov, 2015
1 commit
-
The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: David S. Miller
16 Oct, 2015
1 commit
-
Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len,
eedump_len & regdump_len fields in their .get_drvinfo() ethtool op.
It's not necessary as these fields is filled in ethtool_get_drvinfo().v2: removed unused variable
v3: removed another unused variableSigned-off-by: Ivan Vecera
Signed-off-by: David S. Miller
18 Sep, 2015
1 commit
-
Dan Carpenter reported off-by-one error of fjes at
http://www.mail-archive.com/netdev@vger.kernel.org/msg77520.htmlActually this is a bug.
ep_shm_info[epidx].{es_status, zone} should be update
inside for loop.This patch fixes this bug.
Reported-by: Dan Carpenter
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller
25 Aug, 2015
7 commits
-
This patch adds implementation for ethtool support.
Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds implementation of handling IRQ
of other receiver's receive cancellation request.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds epstop_task.
This task is used to process other receiver's
cancellation request.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds update_zone_task.
Zoning information can be changed by user.
This task is used to monitor if zoning information is
changed or not.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds unshare_watch_task.
Shared buffer's status can be changed into unshared.
This task is used to monitor shared buffer's status.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds force_close_task.
This task is used to close network device forcibly.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller -
This patch adds interrupt_watch_task.
This task is used to prevent delay of interrupts.Signed-off-by: Taku Izumi
Signed-off-by: David S. Miller