* [RFC PATCH v3 4/4] ixgbe: Adding tx encapsulation capability
From: Joseph Gasparakis @ 2012-12-07 1:56 UTC (permalink / raw)
To: davem, shemminger, chrisw, gospo
Cc: Joseph Gasparakis, netdev, linux-kernel, dmitry, saeed.bishara,
Alexander Duyck
In-Reply-To: <1354845419-22483-1-git-send-email-joseph.gasparakis@intel.com>
This patch allows ixgbe to recognize encapsulated packets and do the tx
checksum offload in hardware. This patch is only for demonstration
purposes and should not be applied.
Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 46 ++++++++++++++++++++-----
1 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 484bbed..17ebfe0 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5966,17 +5966,42 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
if (!(first->tx_flags & IXGBE_TX_FLAGS_TXSW))
return;
}
+ vlan_macip_lens |= skb_network_offset(skb)
+ << IXGBE_ADVTXD_MACLEN_SHIFT;
} else {
u8 l4_hdr = 0;
- switch (first->protocol) {
- case __constant_htons(ETH_P_IP):
- vlan_macip_lens |= skb_network_header_len(skb);
+ union {
+ struct iphdr *ipv4;
+ struct ipv6hdr *ipv6;
+ u8 *raw;
+ } network_hdr;
+ union {
+ struct tcphdr *tcphdr;
+ u8 *raw;
+ } transport_hdr;
+
+ if (skb->encapsulation) {
+ network_hdr.raw = skb_inner_network_header(skb);
+ transport_hdr.raw = skb_inner_transport_header(skb);
+ vlan_macip_lens |= skb_inner_network_offset(skb) <<
+ IXGBE_ADVTXD_MACLEN_SHIFT;
+ } else {
+ network_hdr.raw = skb_network_header(skb);
+ transport_hdr.raw = skb_transport_header(skb);
+ vlan_macip_lens |= skb_network_offset(skb) <<
+ IXGBE_ADVTXD_MACLEN_SHIFT;
+ }
+
+ /* use first 4 bits to determine IP version */
+ switch (network_hdr.ipv4->version) {
+ case 4:
+ vlan_macip_lens |= transport_hdr.raw - network_hdr.raw;
type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;
- l4_hdr = ip_hdr(skb)->protocol;
+ l4_hdr = network_hdr.ipv4->protocol;
break;
- case __constant_htons(ETH_P_IPV6):
- vlan_macip_lens |= skb_network_header_len(skb);
- l4_hdr = ipv6_hdr(skb)->nexthdr;
+ case 6:
+ vlan_macip_lens |= transport_hdr.raw - network_hdr.raw;
+ l4_hdr = network_hdr.ipv6->nexthdr;
break;
default:
if (unlikely(net_ratelimit())) {
@@ -5990,7 +6015,7 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
switch (l4_hdr) {
case IPPROTO_TCP:
type_tucmd |= IXGBE_ADVTXD_TUCMD_L4T_TCP;
- mss_l4len_idx = tcp_hdrlen(skb) <<
+ mss_l4len_idx = (transport_hdr.tcphdr->doff * 4) <<
IXGBE_ADVTXD_L4LEN_SHIFT;
break;
case IPPROTO_SCTP:
@@ -6016,7 +6041,6 @@ static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
}
/* vlan_macip_lens: MACLEN, VLAN tag */
- vlan_macip_lens |= skb_network_offset(skb) << IXGBE_ADVTXD_MACLEN_SHIFT;
vlan_macip_lens |= first->tx_flags & IXGBE_TX_FLAGS_VLAN_MASK;
ixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, 0,
@@ -7377,6 +7401,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
netdev->hw_features = netdev->features;
+ netdev->hw_enc_features = NETIF_F_IP_CSUM |
+ NETIF_F_IPV6_CSUM |
+ NETIF_F_SG;
+
switch (adapter->hw.mac.type) {
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
--
1.7.6.4
^ permalink raw reply related
* [PATCH v3 3/4] vxlan: capture inner headers during encapsulation
From: Joseph Gasparakis @ 2012-12-07 1:56 UTC (permalink / raw)
To: davem, shemminger, chrisw, gospo
Cc: Joseph Gasparakis, netdev, linux-kernel, dmitry, saeed.bishara,
Peter P Waskiewicz Jr, Alexander Duyck
In-Reply-To: <1354845419-22483-1-git-send-email-joseph.gasparakis@intel.com>
Allow VXLAN to make use of Tx checksum offloading and Tx scatter-gather.
The advantage to these two changes is that it also allows the VXLAN to
make use of GSO.
Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/vxlan.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ce77b8b..88b31f2 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -876,6 +876,11 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop;
}
+ if (!skb->encapsulation) {
+ skb_reset_inner_headers(skb);
+ skb->encapsulation = 1;
+ }
+
/* Need space for new headers (invalidates iph ptr) */
if (skb_cow_head(skb, VXLAN_HEADROOM))
goto drop;
@@ -947,7 +952,8 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
vxlan_set_owner(dev, skb);
/* See iptunnel_xmit() */
- skb->ip_summed = CHECKSUM_NONE;
+ if (skb->ip_summed != CHECKSUM_PARTIAL)
+ skb->ip_summed = CHECKSUM_NONE;
ip_select_ident(iph, &rt->dst, NULL);
err = ip_local_out(skb);
@@ -1168,6 +1174,8 @@ static void vxlan_setup(struct net_device *dev)
dev->tx_queue_len = 0;
dev->features |= NETIF_F_LLTX;
dev->features |= NETIF_F_NETNS_LOCAL;
+ dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
+ dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM;
dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
spin_lock_init(&vxlan->hash_lock);
--
1.7.6.4
^ permalink raw reply related
* [PATCH v3 2/4] net: Handle encapsulated offloads before fragmentation or handing to lower dev
From: Joseph Gasparakis @ 2012-12-07 1:56 UTC (permalink / raw)
To: davem, shemminger, chrisw, gospo
Cc: Alexander Duyck, netdev, linux-kernel, dmitry, saeed.bishara
In-Reply-To: <1354845419-22483-1-git-send-email-joseph.gasparakis@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change allows the VXLAN to enable Tx checksum offloading even on
devices that do not support encapsulated checksum offloads. The
advantage to this is that it allows for the lower device to change due
to routing table changes without impacting features on the VXLAN itself.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
net/core/dev.c | 15 +++++++++++++--
net/ipv4/ip_output.c | 4 ++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 2a5f5586..7a2646a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2324,6 +2324,13 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
skb->vlan_tci = 0;
}
+ /* If encapsulation offload request, verify we are testing
+ * hardware encapsulation features instead of standard
+ * features for the netdev
+ */
+ if (skb->encapsulation)
+ features &= dev->hw_enc_features;
+
if (netif_needs_gso(skb, features)) {
if (unlikely(dev_gso_segment(skb, features)))
goto out_kfree_skb;
@@ -2339,8 +2346,12 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
* checksumming here.
*/
if (skb->ip_summed == CHECKSUM_PARTIAL) {
- skb_set_transport_header(skb,
- skb_checksum_start_offset(skb));
+ if (skb->encapsulation)
+ skb_set_inner_transport_header(skb,
+ skb_checksum_start_offset(skb));
+ else
+ skb_set_transport_header(skb,
+ skb_checksum_start_offset(skb));
if (!(features & NETIF_F_ALL_CSUM) &&
skb_checksum_help(skb))
goto out_kfree_skb;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 6537a40..3e98ed2 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -595,6 +595,10 @@ slow_path_clean:
}
slow_path:
+ /* for offloaded checksums cleanup checksum before fragmentation */
+ if ((skb->ip_summed == CHECKSUM_PARTIAL) && skb_checksum_help(skb))
+ goto fail;
+
left = skb->len - hlen; /* Space per frame */
ptr = hlen; /* Where to start from */
--
1.7.6.4
^ permalink raw reply related
* [PATCH v3 1/4] net: Add support for hardware-offloaded encapsulation
From: Joseph Gasparakis @ 2012-12-07 1:56 UTC (permalink / raw)
To: davem, shemminger, chrisw, gospo
Cc: Joseph Gasparakis, netdev, linux-kernel, dmitry, saeed.bishara,
Peter P Waskiewicz Jr, Alexander Duyck
In-Reply-To: <1354845419-22483-1-git-send-email-joseph.gasparakis@intel.com>
This patch adds support in the kernel for offloading in the NIC Tx and Rx
checksumming for encapsulated packets (such as VXLAN and IP GRE).
Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
include/linux/ip.h | 5 ++
include/linux/ipv6.h | 5 ++
include/linux/netdevice.h | 2 +
include/linux/skbuff.h | 90 ++++++++++++++++++++++++++++++++++++++++++++-
include/linux/tcp.h | 10 +++++
include/linux/udp.h | 5 ++
net/core/skbuff.c | 9 ++++
7 files changed, 125 insertions(+), 1 deletions(-)
diff --git a/include/linux/ip.h b/include/linux/ip.h
index 58b82a2..492bc65 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -25,6 +25,11 @@ static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
return (struct iphdr *)skb_network_header(skb);
}
+static inline struct iphdr *inner_ip_hdr(const struct sk_buff *skb)
+{
+ return (struct iphdr *)skb_inner_network_header(skb);
+}
+
static inline struct iphdr *ipip_hdr(const struct sk_buff *skb)
{
return (struct iphdr *)skb_transport_header(skb);
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 5e11905..eded08c 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -67,6 +67,11 @@ static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb)
return (struct ipv6hdr *)skb_network_header(skb);
}
+static inline struct ipv6hdr *inner_ipv6_hdr(const struct sk_buff *skb)
+{
+ return (struct ipv6hdr *)skb_inner_network_header(skb);
+}
+
static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb)
{
return (struct ipv6hdr *)skb_transport_header(skb);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e9929ab..58530bc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1063,6 +1063,8 @@ struct net_device {
netdev_features_t wanted_features;
/* mask of features inheritable by VLAN devices */
netdev_features_t vlan_features;
+ /* mask of features inherited by encapsulating devices */
+ netdev_features_t hw_enc_features;
/* Interface index. Unique device identifier */
int ifindex;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f2af494..d6933a0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -376,6 +376,8 @@ typedef unsigned char *sk_buff_data_t;
* @mark: Generic packet mark
* @dropcount: total number of sk_receive_queue overflows
* @vlan_tci: vlan tag control information
+ * @inner_transport_header: Inner transport layer header (encapsulation)
+ * @inner_network_header: Network layer header (encapsulation)
* @transport_header: Transport layer header
* @network_header: Network layer header
* @mac_header: Link layer header
@@ -471,7 +473,8 @@ struct sk_buff {
__u8 wifi_acked:1;
__u8 no_fcs:1;
__u8 head_frag:1;
- /* 8/10 bit hole (depending on ndisc_nodetype presence) */
+ __u8 encapsulation:1;
+ /* 7/9 bit hole (depending on ndisc_nodetype presence) */
kmemcheck_bitfield_end(flags2);
#ifdef CONFIG_NET_DMA
@@ -486,6 +489,8 @@ struct sk_buff {
__u32 avail_size;
};
+ sk_buff_data_t inner_transport_header;
+ sk_buff_data_t inner_network_header;
sk_buff_data_t transport_header;
sk_buff_data_t network_header;
sk_buff_data_t mac_header;
@@ -1435,12 +1440,53 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
skb->tail += len;
}
+static inline void skb_reset_inner_headers(struct sk_buff *skb)
+{
+ skb->inner_network_header = skb->network_header;
+ skb->inner_transport_header = skb->transport_header;
+}
+
static inline void skb_reset_mac_len(struct sk_buff *skb)
{
skb->mac_len = skb->network_header - skb->mac_header;
}
#ifdef NET_SKBUFF_DATA_USES_OFFSET
+static inline unsigned char *skb_inner_transport_header(const struct sk_buff
+ *skb)
+{
+ return skb->head + skb->inner_transport_header;
+}
+
+static inline void skb_reset_inner_transport_header(struct sk_buff *skb)
+{
+ skb->inner_transport_header = skb->data - skb->head;
+}
+
+static inline void skb_set_inner_transport_header(struct sk_buff *skb,
+ const int offset)
+{
+ skb_reset_inner_transport_header(skb);
+ skb->inner_transport_header += offset;
+}
+
+static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
+{
+ return skb->head + skb->inner_network_header;
+}
+
+static inline void skb_reset_inner_network_header(struct sk_buff *skb)
+{
+ skb->inner_network_header = skb->data - skb->head;
+}
+
+static inline void skb_set_inner_network_header(struct sk_buff *skb,
+ const int offset)
+{
+ skb_reset_inner_network_header(skb);
+ skb->inner_network_header += offset;
+}
+
static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
{
return skb->head + skb->transport_header;
@@ -1496,6 +1542,38 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
}
#else /* NET_SKBUFF_DATA_USES_OFFSET */
+static inline unsigned char *skb_inner_transport_header(const struct sk_buff
+ *skb)
+{
+ return skb->inner_transport_header;
+}
+
+static inline void skb_reset_inner_transport_header(struct sk_buff *skb)
+{
+ skb->inner_transport_header = skb->data;
+}
+
+static inline void skb_set_inner_transport_header(struct sk_buff *skb,
+ const int offset)
+{
+ skb->inner_transport_header = skb->data + offset;
+}
+
+static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
+{
+ return skb->inner_network_header;
+}
+
+static inline void skb_reset_inner_network_header(struct sk_buff *skb)
+{
+ skb->inner_network_header = skb->data;
+}
+
+static inline void skb_set_inner_network_header(struct sk_buff *skb,
+ const int offset)
+{
+ skb->inner_network_header = skb->data + offset;
+}
static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
{
@@ -1574,11 +1652,21 @@ static inline u32 skb_network_header_len(const struct sk_buff *skb)
return skb->transport_header - skb->network_header;
}
+static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
+{
+ return skb->inner_transport_header - skb->inner_network_header;
+}
+
static inline int skb_network_offset(const struct sk_buff *skb)
{
return skb_network_header(skb) - skb->data;
}
+static inline int skb_inner_network_offset(const struct sk_buff *skb)
+{
+ return skb_inner_network_header(skb) - skb->data;
+}
+
static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
{
return pskb_may_pull(skb, skb_network_offset(skb) + len);
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 60b7aac..4e1d228 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -35,6 +35,16 @@ static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
return tcp_hdr(skb)->doff * 4;
}
+static inline struct tcphdr *inner_tcp_hdr(const struct sk_buff *skb)
+{
+ return (struct tcphdr *)skb_inner_transport_header(skb);
+}
+
+static inline unsigned int inner_tcp_hdrlen(const struct sk_buff *skb)
+{
+ return inner_tcp_hdr(skb)->doff * 4;
+}
+
static inline unsigned int tcp_optlen(const struct sk_buff *skb)
{
return (tcp_hdr(skb)->doff - 5) * 4;
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 0b67d77..9d81de1 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -27,6 +27,11 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
return (struct udphdr *)skb_transport_header(skb);
}
+static inline struct udphdr *inner_udp_hdr(const struct sk_buff *skb)
+{
+ return (struct udphdr *)skb_inner_transport_header(skb);
+}
+
#define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SMALL ? 128 : 256)
static inline int udp_hashfn(struct net *net, unsigned num, unsigned mask)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 880722e2..ccbabf5 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -682,11 +682,14 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
new->transport_header = old->transport_header;
new->network_header = old->network_header;
new->mac_header = old->mac_header;
+ new->inner_transport_header = old->inner_transport_header;
+ new->inner_network_header = old->inner_transport_header;
skb_dst_copy(new, old);
new->rxhash = old->rxhash;
new->ooo_okay = old->ooo_okay;
new->l4_rxhash = old->l4_rxhash;
new->no_fcs = old->no_fcs;
+ new->encapsulation = old->encapsulation;
#ifdef CONFIG_XFRM
new->sp = secpath_get(old->sp);
#endif
@@ -892,6 +895,8 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
new->network_header += offset;
if (skb_mac_header_was_set(new))
new->mac_header += offset;
+ new->inner_transport_header += offset;
+ new->inner_network_header += offset;
#endif
skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size;
skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
@@ -1089,6 +1094,8 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
skb->network_header += off;
if (skb_mac_header_was_set(skb))
skb->mac_header += off;
+ skb->inner_transport_header += off;
+ skb->inner_network_header += off;
/* Only adjust this if it actually is csum_start rather than csum */
if (skb->ip_summed == CHECKSUM_PARTIAL)
skb->csum_start += nhead;
@@ -1188,6 +1195,8 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
n->network_header += off;
if (skb_mac_header_was_set(skb))
n->mac_header += off;
+ n->inner_transport_header += off;
+ n->inner_network_header += off;
#endif
return n;
--
1.7.6.4
^ permalink raw reply related
* [PATCH v3 net-next 0/4] tunneling: Add support for hardware-offloaded encapsulation
From: Joseph Gasparakis @ 2012-12-07 1:56 UTC (permalink / raw)
To: davem, shemminger, chrisw, gospo
Cc: Joseph Gasparakis, netdev, linux-kernel, dmitry, saeed.bishara
The series contains updates to add in the NIC Rx and Tx checksumming support
for encapsulated packets.
The sk_buff needs to somehow have information of the inner packet, and adding
three fields for the inner mac, network and transport headers was the prefered
approach.
Not adding these fields would mean that the drivers would need to parse the
sk_buff data in hot-path, having a negative impact in the performance.
Adding in sk_buff a pointer to the skbuff of the inner packet made sense, but
would be a complicated change as assumptions needed to be made with regards to
helper functions such as skb_clone() skb_copy(). Also code for the existing
encapsulation protocols (such as VXLAN and IP GRE) had to be reworked, so the
decision was to have the simple approach of adding these three fields.
v2 Makes sure that checksumming for IP GRE does not take place if the offload
flag is set in the skb's netdev features
v3 Fixes issues picked up by the community in v2 and is intended to provide
ability to demo vxlan Tx offloading with Intel's ixgbe. As part of this,
it provides an RFC patch for ixgbe to take advantage of the offloading
mechanism
Now it is possible to create a vxlan interface like this:
#ip link add vxlan0 type vxlan id 40 ttl 10 group 239.1.1.1 dev eth0
Then turn on/off the encapsulation offload mechanism by doing:
#ethtool -K eth0 tx-checksum-ip-generic on
In v3 ipgre work got paused (and therefore patches not included) and I will
come back to it when vxlan is accepted by the community.
^ permalink raw reply
* Re: [tcpdump-workers] vlan tagged packets and libpcap breakage
From: Eric W. Biederman @ 2012-12-07 1:41 UTC (permalink / raw)
To: ani; +Cc: Michael Richardson, tcpdump-workers, netdev, Francesco Ruggeri
In-Reply-To: <alpine.OSX.2.00.1212061730200.58531@animac.local>
Ani Sinha <ani@aristanetworks.com> writes:
>>
>> The patch is whitespace damaged. And one of your test is using ||
>> instead of &&
>
> OK, using alpine now :-)
>>
>> The test should be && not ||.
>
> aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-)
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
The code looks ok here. I don't know what format the tcpdump folks
want patches in. The typically format is an email with [PATCH] in
the subject.
You indentation now comes through clear.
It is a bit odd that you are indenting with spaces instead of tabs
in a file that is indented with tab. Again libpcap isn't my code so I
don't care but someone else might.
Eric
> ani
>
>
> pcap-linux.c | 50 +++++++++++++++++++++++++++++++-------------------
> 1 files changed, 31 insertions(+), 19 deletions(-)
>
> diff --git a/pcap-linux.c b/pcap-linux.c
> index a42c3ac..b2c1a08 100644
> --- a/pcap-linux.c
> +++ b/pcap-linux.c
> @@ -133,6 +133,7 @@ static const char rcsid[] _U_ =
> #include <sys/utsname.h>
> #include <sys/mman.h>
> #include <linux/if.h>
> +#include <linux/if_packet.h>
> #include <netinet/in.h>
> #include <linux/if_ether.h>
> #include <net/if_arp.h>
> @@ -1543,7 +1544,13 @@ pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
> continue;
>
> aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
> - if (aux->tp_vlan_tci == 0)
> +#if defined(TP_STATUS_VLAN_VALID)
> + if ((aux->tp_vlan_tci == 0) && !(aux->tp_status & TP_STATUS_VLAN_VALID))
> +#else
> + if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
> + TP_STATUS_VLAN_VALID flag, there is
> + nothing that we can do */
> +#endif
> continue;
>
> len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
> @@ -3936,7 +3926,12 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
> }
>
> #ifdef HAVE_TPACKET2
> - if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
> + if ((handle->md.tp_version == TPACKET_V2) &&
> +#if defined(TP_STATUS_VLAN_VALID)
> + (h.h2->tp_vlan_tci || (h.h2->tp_status & TP_STATUS_VLAN_VALID)) &&
> +#else
> + h.h2->tp_vlan_tci &&
> +#endif
> handle->md.vlan_offset != -1 &&
> tp_snaplen >= (unsigned int) handle->md.vlan_offset) {
> struct vlan_tag *tag;
^ permalink raw reply
* Re: [tcpdump-workers] vlan tagged packets and libpcap breakage
From: Ani Sinha @ 2012-12-07 1:31 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Michael Richardson, tcpdump-workers, netdev, Francesco Ruggeri
In-Reply-To: <87hanyekr3.fsf@xmission.com>
>
> The patch is whitespace damaged. And one of your test is using ||
> instead of &&
OK, using alpine now :-)
>
> The test should be && not ||.
aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-)
ani
pcap-linux.c | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/pcap-linux.c b/pcap-linux.c
index a42c3ac..b2c1a08 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -133,6 +133,7 @@ static const char rcsid[] _U_ =
#include <sys/utsname.h>
#include <sys/mman.h>
#include <linux/if.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
@@ -1543,7 +1544,13 @@ pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
continue;
aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
- if (aux->tp_vlan_tci == 0)
+#if defined(TP_STATUS_VLAN_VALID)
+ if ((aux->tp_vlan_tci == 0) && !(aux->tp_status & TP_STATUS_VLAN_VALID))
+#else
+ if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
+ TP_STATUS_VLAN_VALID flag, there is
+ nothing that we can do */
+#endif
continue;
len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
@@ -3936,7 +3926,12 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
}
#ifdef HAVE_TPACKET2
- if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
+ if ((handle->md.tp_version == TPACKET_V2) &&
+#if defined(TP_STATUS_VLAN_VALID)
+ (h.h2->tp_vlan_tci || (h.h2->tp_status & TP_STATUS_VLAN_VALID)) &&
+#else
+ h.h2->tp_vlan_tci &&
+#endif
handle->md.vlan_offset != -1 &&
tp_snaplen >= (unsigned int) handle->md.vlan_offset) {
struct vlan_tag *tag;
^ permalink raw reply related
* Re: [tcpdump-workers] vlan tagged packets and libpcap breakage
From: Ani Sinha @ 2012-12-07 1:28 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Michael Richardson, tcpdump-workers, netdev, Francesco Ruggeri
In-Reply-To: <87hanyekr3.fsf@xmission.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 221 bytes --]
>
> The patch is whitespace damaged. And one of your test is using ||
> instead of &&
>
OK, using alpine now :-)
>
> The test should be && not ||.
>
aargh! I am retarded! Fixed. Hopefully 3rd time is a charm :-)
ani
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1744 bytes --]
pcap-linux.c | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/pcap-linux.c b/pcap-linux.c
index a42c3ac..b2c1a08 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -133,6 +133,7 @@ static const char rcsid[] _U_ =
#include <sys/utsname.h>
#include <sys/mman.h>
#include <linux/if.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
@@ -1543,7 +1544,13 @@ pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
continue;
aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
- if (aux->tp_vlan_tci == 0)
+#if defined(TP_STATUS_VLAN_VALID)
+ if ((aux->tp_vlan_tci == 0) && !(aux->tp_status & TP_STATUS_VLAN_VALID))
+#else
+ if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
+ TP_STATUS_VLAN_VALID flag, there is
+ nothing that we can do */
+#endif
continue;
len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
@@ -3936,7 +3926,12 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
}
#ifdef HAVE_TPACKET2
- if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
+ if ((handle->md.tp_version == TPACKET_V2) &&
+#if defined(TP_STATUS_VLAN_VALID)
+ (h.h2->tp_vlan_tci || (h.h2->tp_status & TP_STATUS_VLAN_VALID)) &&
+#else
+ h.h2->tp_vlan_tci &&
+#endif
handle->md.vlan_offset != -1 &&
tp_snaplen >= (unsigned int) handle->md.vlan_offset) {
struct vlan_tag *tag;
^ permalink raw reply related
* [PATCH] net: phy: smsc: Fix config_init typo
From: Patrick Trantham @ 2012-12-07 1:16 UTC (permalink / raw)
To: David S. Miller
Cc: Patrick Trantham, Otavio Salvador, Jiri Kosina, netdev,
linux-kernel, Cong Ding
Correct a mistake made in the previous commit due to reckless
copy-and-pasting.
Signed-off-by: Patrick Trantham <patrick.trantham@fuel7.com>
---
drivers/net/phy/smsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 16dceed..eb3e08a 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -205,7 +205,7 @@ static struct phy_driver smsc_phy_driver[] = {
/* basic functions */
.config_aneg = genphy_config_aneg,
.read_status = lan87xx_read_status,
- .config_intr = smsc_phy_config_intr,
+ .config_init = smsc_phy_config_init,
/* IRQ related */
.ack_interrupt = smsc_phy_ack_interrupt,
--
1.7.9.5
^ permalink raw reply related
* Re: [Suggestion] net/atm : for sprintf, need check the total write length whether larger than a page.
From: Chen Gang @ 2012-12-07 1:07 UTC (permalink / raw)
To: chas williams - CONTRACTOR; +Cc: David Miller, netdev
In-Reply-To: <20121206090855.5f166746@thirdoffive.cmf.nrl.navy.mil>
于 2012年12月06日 22:08, chas williams - CONTRACTOR 写道:
> On Thu, 06 Dec 2012 09:15:10 +0800
> Chen Gang <gang.chen@asianux.com> wrote:
>
>> 于 2012年12月05日 22:55, chas williams - CONTRACTOR 写道:
>
>>> did you mean '\0' instead of '\n'? scnprintf() considers the trailing
>>> '\0' when formatting.
>>
>> no, originally, the end is "\n\0".
>>
>> I prefer we still compatible "\n" when the contents are very large.
>> if count already == (PAGE_SIZE - 1), we have no chance to append "\n" to the end.
>>
>> - pos += sprintf(pos, "\n");
>> + count += scnprintf(buf + count, PAGE_SIZE - count, "\n");
>
> i would make the code a bit messy to do this for not much gain. again,
> it isnt likely you would run into this in a normal situation.
surely.
thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
Chen Gang
Asianux Corporation
^ permalink raw reply
* Re: [tcpdump-workers] vlan tagged packets and libpcap breakage
From: Eric W. Biederman @ 2012-12-07 1:03 UTC (permalink / raw)
To: Ani Sinha; +Cc: Michael Richardson, tcpdump-workers, netdev, Francesco Ruggeri
In-Reply-To: <CAOxq_8NbmOtvyH6Q=AVeOUAj7DoFO8cnVUQA5sgyEG7jEJXpHA@mail.gmail.com>
Ani Sinha <ani@aristanetworks.com> writes:
> On Thu, Dec 6, 2012 at 2:19 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> Ani Sinha <ani@aristanetworks.com> writes:
>>>>
>>>
>>> May be this?
>>
>> Two things.
>>
>> - TP_STATUS_VLAN_VALID lives in the tp_status field not the tp_vlan_tci field.
>> - To work on older kernels with binaries compiled with newer headers you
>> first want to test for tp_vlan_tci == 0 and then look at the status field for
>> TP_STATUS_VALID.
>
>
> trying again :
The patch is whitespace damaged. And one of your test is using ||
instead of &&
Eric
> pcap-linux.c | 50 +++++++++++++++++++++++++++++++-------------------
> 1 files changed, 31 insertions(+), 19 deletions(-)
>
> diff --git a/pcap-linux.c b/pcap-linux.c
> index a42c3ac..8e355d3 100644
> --- a/pcap-linux.c
> +++ b/pcap-linux.c
> @@ -133,6 +133,7 @@ static const char rcsid[] _U_ =
> #include <sys/utsname.h>
> #include <sys/mman.h>
> #include <linux/if.h>
> +#include <linux/if_packet.h>
> #include <netinet/in.h>
> #include <linux/if_ether.h>
> #include <net/if_arp.h>
> @@ -1543,7 +1544,13 @@ pcap_read_packet(pcap_t *handle, pcap_handler
> callback, u_char *userdata)
> continue;
>
> aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
> - if (aux->tp_vlan_tci == 0)
> +#if defined(TP_STATUS_VLAN_VALID)
> + if ((aux->tp_vlan_tci == 0) ||
> !(aux->tp_status & TP_STATUS_VLAN_VALID))
The test should be && not ||.
> +#else
> + if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
> +
> TP_STATUS_VLAN_VALID flag, there is
> + nothing that we can do */
> +#endif
> continue;
>
> len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
> @@ -3936,7 +3926,12 @@ pcap_read_linux_mmap(pcap_t *handle, int
> max_packets, pcap_handler callback,
> }
>
> #ifdef HAVE_TPACKET2
> - if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
> + if ((handle->md.tp_version == TPACKET_V2) &&
> +#if defined(TP_STATUS_VLAN_VALID)
> + (h.h2->tp_vlan_tci || (h.h2->tp_status &
> TP_STATUS_VLAN_VALID)) &&
> +#else
> + h.h2->tp_vlan_tci &&
> +#endif
> handle->md.vlan_offset != -1 &&
> tp_snaplen >= (unsigned int) handle->md.vlan_offset) {
> struct vlan_tag *tag;
^ permalink raw reply
* Re: vlan tagged packets and libpcap breakage
From: Ani Sinha @ 2012-12-07 0:55 UTC (permalink / raw)
To: Eric W. Biederman
Cc: netdev, Michael Richardson, tcpdump-workers, Francesco Ruggeri
In-Reply-To: <87sj7iesdl.fsf@xmission.com>
On Thu, Dec 6, 2012 at 2:19 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
> Ani Sinha <ani@aristanetworks.com> writes:
>>>
>>
>> May be this?
>
> Two things.
>
> - TP_STATUS_VLAN_VALID lives in the tp_status field not the tp_vlan_tci field.
> - To work on older kernels with binaries compiled with newer headers you
> first want to test for tp_vlan_tci == 0 and then look at the status field for
> TP_STATUS_VALID.
trying again :
pcap-linux.c | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/pcap-linux.c b/pcap-linux.c
index a42c3ac..8e355d3 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -133,6 +133,7 @@ static const char rcsid[] _U_ =
#include <sys/utsname.h>
#include <sys/mman.h>
#include <linux/if.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
@@ -1543,7 +1544,13 @@ pcap_read_packet(pcap_t *handle, pcap_handler
callback, u_char *userdata)
continue;
aux = (struct tpacket_auxdata *)CMSG_DATA(cmsg);
- if (aux->tp_vlan_tci == 0)
+#if defined(TP_STATUS_VLAN_VALID)
+ if ((aux->tp_vlan_tci == 0) ||
!(aux->tp_status & TP_STATUS_VLAN_VALID))
+#else
+ if (aux->tp_vlan_tci == 0) /* this is ambigious but without the
+
TP_STATUS_VLAN_VALID flag, there is
+ nothing that we can do */
+#endif
continue;
len = packet_len > iov.iov_len ? iov.iov_len : packet_len;
@@ -3936,7 +3926,12 @@ pcap_read_linux_mmap(pcap_t *handle, int
max_packets, pcap_handler callback,
}
#ifdef HAVE_TPACKET2
- if (handle->md.tp_version == TPACKET_V2 && h.h2->tp_vlan_tci &&
+ if ((handle->md.tp_version == TPACKET_V2) &&
+#if defined(TP_STATUS_VLAN_VALID)
+ (h.h2->tp_vlan_tci || (h.h2->tp_status &
TP_STATUS_VLAN_VALID)) &&
+#else
+ h.h2->tp_vlan_tci &&
+#endif
handle->md.vlan_offset != -1 &&
tp_snaplen >= (unsigned int) handle->md.vlan_offset) {
struct vlan_tag *tag;
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
^ permalink raw reply related
* Re: [PATCH net 1/1] r8169: workaround for missing extended GigaMAC registers
From: Wang YanQing @ 2012-12-07 0:39 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, David Miller, Lee Chun-Yi, Hayes Wang
In-Reply-To: <20121205223452.GA24164@electric-eye.fr.zoreil.com>
On Wed, Dec 05, 2012 at 11:34:52PM +0100, Francois Romieu wrote:
> GigaMAC registers have been reported left unitialized in several
> situations:
> - after cold boot from power-off state
> - after S3 resume
>
> Tweaking rtl_hw_phy_config takes care of both.
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Cc: Hayes Wang <hayeswang@realtek.com>
> ---
> drivers/net/ethernet/realtek/r8169.c | 42 ++++++++++++++++++++----------------
> 1 file changed, 24 insertions(+), 18 deletions(-)
>
> YanQing and Chun-Yi, can you add your Signed-off-by to this patch ?
> It contains bits of everybody's work but it does not match any. :o)
>
> I apparently play in the safe bios league since I did not notice any
> difference before or after the patch.
>
> Beware, this patch seems to apply to net-next but doing so moves
> rtl_rar_exgmac_set from rtl8168e_2_hw_phy_config to rtl8168f_hw_phy_config.
>
> Hayes, your comments are welcome if any.
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 927aa33..b353003 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -3096,6 +3096,23 @@ static void rtl8168e_1_hw_phy_config(struct rtl8169_private *tp)
> rtl_writephy(tp, 0x0d, 0x0000);
> }
>
> +static void rtl_rar_exgmac_set(struct rtl8169_private *tp, u8 *addr)
> +{
> + const u16 w[] = {
> + addr[0] | (addr[1] << 8),
> + addr[2] | (addr[3] << 8),
> + addr[4] | (addr[5] << 8)
> + };
> + const struct exgmac_reg e[] = {
> + { .addr = 0xe0, ERIAR_MASK_1111, .val = w[0] | (w[1] << 16) },
> + { .addr = 0xe4, ERIAR_MASK_1111, .val = w[2] },
> + { .addr = 0xf0, ERIAR_MASK_1111, .val = w[0] << 16 },
> + { .addr = 0xf4, ERIAR_MASK_1111, .val = w[1] | (w[2] << 16) },
> + };
> +
> + rtl_write_exgmac_batch(tp, e, ARRAY_SIZE(e));
> +}
> +
> static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
> {
> static const struct phy_reg phy_reg_init[] = {
> @@ -3178,6 +3195,9 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
> rtl_w1w0_phy(tp, 0x19, 0x0000, 0x0001);
> rtl_w1w0_phy(tp, 0x10, 0x0000, 0x0400);
> rtl_writephy(tp, 0x1f, 0x0000);
> +
> + /* Broken BIOS workaround: feed GigaMAC registers with MAC address. */
> + rtl_rar_exgmac_set(tp, tp->dev->dev_addr);
> }
>
> static void rtl8168f_hw_phy_config(struct rtl8169_private *tp)
> @@ -3708,33 +3728,19 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
> static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr)
> {
> void __iomem *ioaddr = tp->mmio_addr;
> - u32 high;
> - u32 low;
> -
> - low = addr[0] | (addr[1] << 8) | (addr[2] << 16) | (addr[3] << 24);
> - high = addr[4] | (addr[5] << 8);
>
> rtl_lock_work(tp);
>
> RTL_W8(Cfg9346, Cfg9346_Unlock);
>
> - RTL_W32(MAC4, high);
> + RTL_W32(MAC4, addr[4] | addr[5] << 8);
> RTL_R32(MAC4);
>
> - RTL_W32(MAC0, low);
> + RTL_W32(MAC0, addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24);
> RTL_R32(MAC0);
>
> - if (tp->mac_version == RTL_GIGA_MAC_VER_34) {
> - const struct exgmac_reg e[] = {
> - { .addr = 0xe0, ERIAR_MASK_1111, .val = low },
> - { .addr = 0xe4, ERIAR_MASK_1111, .val = high },
> - { .addr = 0xf0, ERIAR_MASK_1111, .val = low << 16 },
> - { .addr = 0xf4, ERIAR_MASK_1111, .val = high << 16 |
> - low >> 16 },
> - };
> -
> - rtl_write_exgmac_batch(tp, e, ARRAY_SIZE(e));
> - }
> + if (tp->mac_version == RTL_GIGA_MAC_VER_34)
> + rtl_rar_exgmac_set(tp, addr);
>
> RTL_W8(Cfg9346, Cfg9346_Lock);
>
> --
> 1.7.11.7
Signed-off-by: Wang YanQing <udknight@gmail.com>
^ permalink raw reply
* [PATCH] drivers/net: fix up function prototypes after __dev* removals
From: Greg KH @ 2012-12-07 0:30 UTC (permalink / raw)
To: netdev; +Cc: wfp5p
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The __dev* removal patches for the network drivers ended up messing up
the function prototypes for a bunch of drivers. This patch fixes all of
them back up to be properly aligned.
Bonus is that this almost removes 100 lines of code, always a nice
surprise.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/c_can/c_can_pci.c | 2
drivers/net/can/cc770/cc770_platform.c | 4 -
drivers/net/can/mscan/mpc5xxx_can.c | 12 +----
drivers/net/can/sja1000/ems_pci.c | 2
drivers/net/can/sja1000/ems_pcmcia.c | 3 -
drivers/net/can/sja1000/kvaser_pci.c | 2
drivers/net/can/sja1000/peak_pci.c | 3 -
drivers/net/can/sja1000/plx_pci.c | 2
drivers/net/can/softing/softing_cs.c | 3 -
drivers/net/can/softing/softing_main.c | 2
drivers/net/ethernet/3com/3c509.c | 11 +---
drivers/net/ethernet/3com/3c59x.c | 7 +-
drivers/net/ethernet/8390/hydra.c | 2
drivers/net/ethernet/8390/zorro8390.c | 7 +-
drivers/net/ethernet/adaptec/starfire.c | 2
drivers/net/ethernet/alteon/acenic.c | 7 +-
drivers/net/ethernet/amd/a2065.c | 4 -
drivers/net/ethernet/amd/ariadne.c | 2
drivers/net/ethernet/amd/hplance.c | 9 +--
drivers/net/ethernet/amd/sunlance.c | 4 -
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 3 -
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 3 -
drivers/net/ethernet/atheros/atlx/atl1.c | 5 --
drivers/net/ethernet/atheros/atlx/atl2.c | 3 -
drivers/net/ethernet/broadcom/b44.c | 2
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 ++-----
drivers/net/ethernet/broadcom/tg3.c | 3 -
drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 3 -
drivers/net/ethernet/chelsio/cxgb/sge.c | 3 -
drivers/net/ethernet/chelsio/cxgb/subr.c | 7 +-
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 6 --
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 --
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 6 --
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 3 -
drivers/net/ethernet/cisco/enic/enic_main.c | 3 -
drivers/net/ethernet/dec/tulip/de2104x.c | 3 -
drivers/net/ethernet/dec/tulip/de4x5.c | 2
drivers/net/ethernet/dec/tulip/dmfe.c | 3 -
drivers/net/ethernet/dec/tulip/tulip_core.c | 6 --
drivers/net/ethernet/dec/tulip/winbond-840.c | 3 -
drivers/net/ethernet/emulex/benet/be_main.c | 3 -
drivers/net/ethernet/fealnx.c | 2
drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 3 -
drivers/net/ethernet/hp/hp100.c | 6 +-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 4 -
drivers/net/ethernet/ibm/emac/core.c | 8 +--
drivers/net/ethernet/ibm/emac/mal.c | 3 -
drivers/net/ethernet/ibm/ibmveth.c | 3 -
drivers/net/ethernet/icplus/ipg.c | 3 -
drivers/net/ethernet/intel/e100.c | 3 -
drivers/net/ethernet/intel/e1000/e1000_main.c | 3 -
drivers/net/ethernet/intel/e1000/e1000_param.c | 4 -
drivers/net/ethernet/intel/e1000e/netdev.c | 3 -
drivers/net/ethernet/intel/e1000e/param.c | 4 -
drivers/net/ethernet/intel/igb/igb_main.c | 3 -
drivers/net/ethernet/intel/igbvf/netdev.c | 3 -
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 -
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 -
drivers/net/ethernet/marvell/skge.c | 3 -
drivers/net/ethernet/marvell/sky2.c | 8 +--
drivers/net/ethernet/mellanox/mlx4/main.c | 3 -
drivers/net/ethernet/micrel/ksz884x.c | 3 -
drivers/net/ethernet/natsemi/macsonic.c | 3 -
drivers/net/ethernet/natsemi/natsemi.c | 3 -
drivers/net/ethernet/natsemi/ns83820.c | 2
drivers/net/ethernet/neterion/s2io.h | 3 -
drivers/net/ethernet/neterion/vxge/vxge-main.c | 15 ++----
drivers/net/ethernet/packetengines/yellowfin.c | 2
drivers/net/ethernet/qlogic/qla3xxx.c | 2
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 3 -
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 6 +-
drivers/net/ethernet/rdc/r6040.c | 3 -
drivers/net/ethernet/sfc/efx.c | 2
drivers/net/ethernet/sgi/ioc3-eth.c | 3 -
drivers/net/ethernet/silan/sc92031.c | 3 -
drivers/net/ethernet/sis/sis190.c | 9 +--
drivers/net/ethernet/sis/sis900.c | 2
drivers/net/ethernet/smsc/epic100.c | 3 -
drivers/net/ethernet/smsc/smc91x.c | 2
drivers/net/ethernet/smsc/smsc911x.c | 7 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 +--
drivers/net/ethernet/sun/cassini.c | 3 -
drivers/net/ethernet/sun/niu.c | 43 +++++++-----------
drivers/net/ethernet/sun/sunbmac.c | 2
drivers/net/ethernet/sun/sungem.c | 3 -
drivers/net/ethernet/sun/sunhme.c | 2
drivers/net/ethernet/sun/sunvnet.c | 3 -
drivers/net/ethernet/ti/tlan.c | 5 --
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 10 +---
drivers/net/ethernet/toshiba/tc35815.c | 2
drivers/net/ethernet/via/via-rhine.c | 3 -
drivers/net/ethernet/via/via-velocity.c | 5 --
drivers/net/fddi/defxx.c | 10 +---
drivers/net/hippi/rrunner.c | 3 -
drivers/net/irda/smsc-ircc2.c | 2
drivers/net/irda/via-ircc.c | 7 +-
drivers/net/phy/mdio-gpio.c | 4 -
drivers/net/wan/dscc4.c | 3 -
drivers/net/wan/hd64570.c | 3 -
drivers/net/wan/hd64572.c | 3 -
drivers/net/wan/lmc/lmc_main.c | 3 -
drivers/net/wan/pc300too.c | 2
drivers/net/wan/pci200syn.c | 2
drivers/net/wan/wanxl.c | 2
drivers/net/xen-netfront.c | 2
107 files changed, 188 insertions(+), 284 deletions(-)
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index a1f2631..b374be7 100644
--- a/drivers/net/can/c_can/c_can_pci.c
+++ b/drivers/net/can/c_can/c_can_pci.c
@@ -64,7 +64,7 @@ static void c_can_pci_write_reg_aligned_to_32bit(struct c_can_priv *priv,
}
static int c_can_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct c_can_pci_data *c_can_pci_data = (void *)ent->driver_data;
struct c_can_priv *priv;
diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
index 7d451cd..d0f6bfc 100644
--- a/drivers/net/can/cc770/cc770_platform.c
+++ b/drivers/net/can/cc770/cc770_platform.c
@@ -76,7 +76,7 @@ static void cc770_platform_write_reg(const struct cc770_priv *priv, int reg,
}
static int cc770_get_of_node_data(struct platform_device *pdev,
- struct cc770_priv *priv)
+ struct cc770_priv *priv)
{
struct device_node *np = pdev->dev.of_node;
const u32 *prop;
@@ -149,7 +149,7 @@ static int cc770_get_of_node_data(struct platform_device *pdev,
}
static int cc770_get_platform_data(struct platform_device *pdev,
- struct cc770_priv *priv)
+ struct cc770_priv *priv)
{
struct cc770_platform_data *pdata = pdev->dev.platform_data;
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 06a4561..668850e 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -49,8 +49,7 @@ static struct of_device_id mpc52xx_cdm_ids[] = {
};
static u32 mpc52xx_can_get_clock(struct platform_device *ofdev,
- const char *clock_name,
- int *mscan_clksrc)
+ const char *clock_name, int *mscan_clksrc)
{
unsigned int pvr;
struct mpc52xx_cdm __iomem *cdm;
@@ -102,8 +101,7 @@ static u32 mpc52xx_can_get_clock(struct platform_device *ofdev,
}
#else /* !CONFIG_PPC_MPC52xx */
static u32 mpc52xx_can_get_clock(struct platform_device *ofdev,
- const char *clock_name,
- int *mscan_clksrc)
+ const char *clock_name, int *mscan_clksrc)
{
return 0;
}
@@ -130,8 +128,7 @@ static struct of_device_id mpc512x_clock_ids[] = {
};
static u32 mpc512x_can_get_clock(struct platform_device *ofdev,
- const char *clock_name,
- int *mscan_clksrc)
+ const char *clock_name, int *mscan_clksrc)
{
struct mpc512x_clockctl __iomem *clockctl;
struct device_node *np_clock;
@@ -240,8 +237,7 @@ exit_put:
}
#else /* !CONFIG_PPC_MPC512x */
static u32 mpc512x_can_get_clock(struct platform_device *ofdev,
- const char *clock_name,
- int *mscan_clksrc)
+ const char *clock_name, int *mscan_clksrc)
{
return 0;
}
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index f232bc8..036a326 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -221,7 +221,7 @@ static void ems_pci_card_reset(struct ems_pci_card *card)
* CAN channel to SJA1000 Socket-CAN subsystem.
*/
static int ems_pci_add_card(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct sja1000_priv *priv;
struct net_device *dev;
diff --git a/drivers/net/can/sja1000/ems_pcmcia.c b/drivers/net/can/sja1000/ems_pcmcia.c
index 46fc313..5c2f3fb 100644
--- a/drivers/net/can/sja1000/ems_pcmcia.c
+++ b/drivers/net/can/sja1000/ems_pcmcia.c
@@ -166,8 +166,7 @@ static void ems_pcmcia_del_card(struct pcmcia_device *pdev)
* Probe PCI device for EMS CAN signature and register each available
* CAN channel to SJA1000 Socket-CAN subsystem.
*/
-static int ems_pcmcia_add_card(struct pcmcia_device *pdev,
- unsigned long base)
+static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)
{
struct sja1000_priv *priv;
struct net_device *dev;
diff --git a/drivers/net/can/sja1000/kvaser_pci.c b/drivers/net/can/sja1000/kvaser_pci.c
index 4efdaf2..37b0381 100644
--- a/drivers/net/can/sja1000/kvaser_pci.c
+++ b/drivers/net/can/sja1000/kvaser_pci.c
@@ -291,7 +291,7 @@ failure:
}
static int kvaser_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
int err;
struct net_device *master_dev = NULL;
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index 3faeb3d..d84888f 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -551,8 +551,7 @@ static void peak_pci_post_irq(const struct sja1000_priv *priv)
writew(chan->icr_mask, chan->cfg_base + PITA_ICR);
}
-static int peak_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int peak_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct sja1000_priv *priv;
struct peak_pci_chan *chan;
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 8b233f8..11d1062 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -485,7 +485,7 @@ static void plx_pci_del_card(struct pci_dev *pdev)
* available CAN channel to SJA1000 Socket-CAN subsystem.
*/
static int plx_pci_add_card(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct sja1000_priv *priv;
struct net_device *dev;
diff --git a/drivers/net/can/softing/softing_cs.c b/drivers/net/can/softing/softing_cs.c
index ce18ba5..c2c0a5b 100644
--- a/drivers/net/can/softing/softing_cs.c
+++ b/drivers/net/can/softing/softing_cs.c
@@ -193,8 +193,7 @@ static int softingcs_enable_irq(struct platform_device *pdev, int v)
/*
* pcmcia check
*/
-static int softingcs_probe_config(struct pcmcia_device *pcmcia,
- void *priv_data)
+static int softingcs_probe_config(struct pcmcia_device *pcmcia, void *priv_data)
{
struct softing_platform_data *pdat = priv_data;
struct resource *pres;
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c
index 50b1e0f..3a2b456 100644
--- a/drivers/net/can/softing/softing_main.c
+++ b/drivers/net/can/softing/softing_main.c
@@ -646,7 +646,7 @@ static const struct can_bittiming_const softing_btr_const = {
static struct net_device *softing_netdev_create(struct softing *card,
- uint16_t chip_id)
+ uint16_t chip_id)
{
struct net_device *netdev;
struct softing_priv *priv;
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 9300185..633c709 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -270,9 +270,8 @@ static int el3_isa_id_sequence(__be16 *phys_addr)
}
-static void el3_dev_fill(struct net_device *dev, __be16 *phys_addr,
- int ioaddr, int irq, int if_port,
- enum el3_cardtype type)
+static void el3_dev_fill(struct net_device *dev, __be16 *phys_addr, int ioaddr,
+ int irq, int if_port, enum el3_cardtype type)
{
struct el3_private *lp = netdev_priv(dev);
@@ -283,8 +282,7 @@ static void el3_dev_fill(struct net_device *dev, __be16 *phys_addr,
lp->type = type;
}
-static int el3_isa_match(struct device *pdev,
- unsigned int ndev)
+static int el3_isa_match(struct device *pdev, unsigned int ndev)
{
struct net_device *dev;
int ioaddr, isa_irq, if_port, err;
@@ -406,8 +404,7 @@ static struct pnp_device_id el3_pnp_ids[] = {
};
MODULE_DEVICE_TABLE(pnp, el3_pnp_ids);
-static int el3_pnp_probe(struct pnp_dev *pdev,
- const struct pnp_device_id *id)
+static int el3_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *id)
{
short i;
int ioaddr, irq, if_port;
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index 658e224..ed0feb3 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -1001,7 +1001,7 @@ static int __init vortex_eisa_init(void)
/* returns count (>= 0), or negative on error */
static int vortex_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
int rc, unit, pci_bar;
struct vortex_chip_info *vci;
@@ -1088,9 +1088,8 @@ static const struct net_device_ops vortex_netdev_ops = {
*
* NOTE: pdev can be NULL, for the case of a Compaq device
*/
-static int vortex_probe1(struct device *gendev,
- void __iomem *ioaddr, int irq,
- int chip_idx, int card_idx)
+static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,
+ int chip_idx, int card_idx)
{
struct vortex_private *vp;
int option;
diff --git a/drivers/net/ethernet/8390/hydra.c b/drivers/net/ethernet/8390/hydra.c
index bc81de1..fb3dd43 100644
--- a/drivers/net/ethernet/8390/hydra.c
+++ b/drivers/net/ethernet/8390/hydra.c
@@ -81,7 +81,7 @@ static struct zorro_driver hydra_driver = {
};
static int hydra_init_one(struct zorro_dev *z,
- const struct zorro_device_id *ent)
+ const struct zorro_device_id *ent)
{
int err;
diff --git a/drivers/net/ethernet/8390/zorro8390.c b/drivers/net/ethernet/8390/zorro8390.c
index ceb89d9..85ec4c2 100644
--- a/drivers/net/ethernet/8390/zorro8390.c
+++ b/drivers/net/ethernet/8390/zorro8390.c
@@ -286,9 +286,8 @@ static const struct net_device_ops zorro8390_netdev_ops = {
#endif
};
-static int zorro8390_init(struct net_device *dev,
- unsigned long board, const char *name,
- unsigned long ioaddr)
+static int zorro8390_init(struct net_device *dev, unsigned long board,
+ const char *name, unsigned long ioaddr)
{
int i;
int err;
@@ -397,7 +396,7 @@ static int zorro8390_init(struct net_device *dev,
}
static int zorro8390_init_one(struct zorro_dev *z,
- const struct zorro_device_id *ent)
+ const struct zorro_device_id *ent)
{
struct net_device *dev;
unsigned long board, ioaddr;
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c
index d67c192..549b775 100644
--- a/drivers/net/ethernet/adaptec/starfire.c
+++ b/drivers/net/ethernet/adaptec/starfire.c
@@ -642,7 +642,7 @@ static const struct net_device_ops netdev_ops = {
};
static int starfire_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct device *d = &pdev->dev;
struct netdev_private *np;
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c
index dfddce6..c0bc41a 100644
--- a/drivers/net/ethernet/alteon/acenic.c
+++ b/drivers/net/ethernet/alteon/acenic.c
@@ -455,7 +455,7 @@ static const struct net_device_ops ace_netdev_ops = {
};
static int acenic_probe_one(struct pci_dev *pdev,
- const struct pci_device_id *id)
+ const struct pci_device_id *id)
{
struct net_device *dev;
struct ace_private *ap;
@@ -2825,7 +2825,7 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev)
static void ace_copy(struct ace_regs __iomem *regs, const __be32 *src,
- u32 dest, int size)
+ u32 dest, int size)
{
void __iomem *tdest;
short tsize, i;
@@ -3091,8 +3091,7 @@ static void eeprom_stop(struct ace_regs __iomem *regs)
/*
* Read a whole byte from the EEPROM.
*/
-static int read_eeprom_byte(struct net_device *dev,
- unsigned long offset)
+static int read_eeprom_byte(struct net_device *dev, unsigned long offset)
{
struct ace_private *ap = netdev_priv(dev);
struct ace_regs __iomem *regs = ap->regs;
diff --git a/drivers/net/ethernet/amd/a2065.c b/drivers/net/ethernet/amd/a2065.c
index 818f6d6..3789aff 100644
--- a/drivers/net/ethernet/amd/a2065.c
+++ b/drivers/net/ethernet/amd/a2065.c
@@ -640,7 +640,7 @@ static void lance_set_multicast(struct net_device *dev)
}
static int a2065_init_one(struct zorro_dev *z,
- const struct zorro_device_id *ent);
+ const struct zorro_device_id *ent);
static void a2065_remove_one(struct zorro_dev *z);
@@ -671,7 +671,7 @@ static const struct net_device_ops lance_netdev_ops = {
};
static int a2065_init_one(struct zorro_dev *z,
- const struct zorro_device_id *ent)
+ const struct zorro_device_id *ent)
{
struct net_device *dev;
struct lance_private *priv;
diff --git a/drivers/net/ethernet/amd/ariadne.c b/drivers/net/ethernet/amd/ariadne.c
index 2ea7a23..98f4522 100644
--- a/drivers/net/ethernet/amd/ariadne.c
+++ b/drivers/net/ethernet/amd/ariadne.c
@@ -711,7 +711,7 @@ static const struct net_device_ops ariadne_netdev_ops = {
};
static int ariadne_init_one(struct zorro_dev *z,
- const struct zorro_device_id *ent)
+ const struct zorro_device_id *ent)
{
unsigned long board = z->resource.start;
unsigned long base_addr = board + ARIADNE_LANCE;
diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c
index 705333e..0c61fd5 100644
--- a/drivers/net/ethernet/amd/hplance.c
+++ b/drivers/net/ethernet/amd/hplance.c
@@ -46,10 +46,8 @@ struct hplance_private {
* plus board-specific init, open and close actions.
* Oh, and we need to tell the generic code how to read and write LANCE registers...
*/
-static int hplance_init_one(struct dio_dev *d,
- const struct dio_device_id *ent);
-static void hplance_init(struct net_device *dev,
- struct dio_dev *d);
+static int hplance_init_one(struct dio_dev *d, const struct dio_device_id *ent);
+static void hplance_init(struct net_device *dev, struct dio_dev *d);
static void hplance_remove_one(struct dio_dev *d);
static void hplance_writerap(void *priv, unsigned short value);
static void hplance_writerdp(void *priv, unsigned short value);
@@ -83,8 +81,7 @@ static const struct net_device_ops hplance_netdev_ops = {
};
/* Find all the HP Lance boards and initialise them... */
-static int hplance_init_one(struct dio_dev *d,
- const struct dio_device_id *ent)
+static int hplance_init_one(struct dio_dev *d, const struct dio_device_id *ent)
{
struct net_device *dev;
int err = -ENOMEM;
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
index 64dbffa..c2d696c 100644
--- a/drivers/net/ethernet/amd/sunlance.c
+++ b/drivers/net/ethernet/amd/sunlance.c
@@ -1305,8 +1305,8 @@ static const struct net_device_ops sparc_lance_ops = {
};
static int sparc_lance_probe_one(struct platform_device *op,
- struct platform_device *ledma,
- struct platform_device *lebuffer)
+ struct platform_device *ledma,
+ struct platform_device *lebuffer)
{
struct device_node *dp = op->dev.of_node;
static unsigned version_printed;
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 44bee4a..56d3f69 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2442,8 +2442,7 @@ static int atl1c_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
*/
-static int atl1c_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct atl1c_adapter *adapter;
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index dec5d2c..e4466a3 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -2235,8 +2235,7 @@ static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
*/
-static int atl1e_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct atl1e_adapter *adapter = NULL;
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 3e7327e..71b3d7d 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -144,7 +144,7 @@ struct atl1_option {
};
static int atl1_validate_option(int *value, struct atl1_option *opt,
- struct pci_dev *pdev)
+ struct pci_dev *pdev)
{
if (*value == OPTION_UNSET) {
*value = opt->def;
@@ -2934,8 +2934,7 @@ static const struct net_device_ops atl1_netdev_ops = {
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
*/
-static int atl1_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int atl1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct atl1_adapter *adapter;
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index 7dc9766..aab83a2 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -1338,8 +1338,7 @@ static const struct net_device_ops atl2_netdev_ops = {
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
*/
-static int atl2_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct atl2_adapter *adapter;
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index c64351f..219f622 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2142,7 +2142,7 @@ static const struct net_device_ops b44_netdev_ops = {
};
static int b44_init_one(struct ssb_device *sdev,
- const struct ssb_device_id *ent)
+ const struct ssb_device_id *ent)
{
struct net_device *dev;
struct b44 *bp;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 75aea83..abefccf 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9487,8 +9487,7 @@ static void bnx2x_prev_unload_close_mac(struct bnx2x *bp)
#define BNX2X_PREV_UNDI_BD(val) ((val) >> 16 & 0xffff)
#define BNX2X_PREV_UNDI_PROD(rcq, bd) ((bd) << 16 | (rcq))
-static void bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
- u8 inc)
+static void bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port, u8 inc)
{
u16 rcq, bd;
u32 tmp_reg = REG_RD(bp, BNX2X_PREV_UNDI_PROD_ADDR(port));
@@ -10050,8 +10049,7 @@ static int bnx2x_get_igu_cam_info(struct bnx2x *bp)
return 0;
}
-static void bnx2x_link_settings_supported(struct bnx2x *bp,
- u32 switch_cfg)
+static void bnx2x_link_settings_supported(struct bnx2x *bp, u32 switch_cfg)
{
int cfg_size = 0, idx, port = BP_PORT(bp);
@@ -11531,9 +11529,8 @@ static int bnx2x_set_coherency_mask(struct bnx2x *bp)
return 0;
}
-static int bnx2x_init_dev(struct pci_dev *pdev,
- struct net_device *dev,
- unsigned long board_type)
+static int bnx2x_init_dev(struct pci_dev *pdev, struct net_device *dev,
+ unsigned long board_type)
{
struct bnx2x *bp;
int rc;
@@ -11713,8 +11710,7 @@ err_out:
return rc;
}
-static void bnx2x_get_pcie_width_speed(struct bnx2x *bp,
- int *width, int *speed)
+static void bnx2x_get_pcie_width_speed(struct bnx2x *bp, int *width, int *speed)
{
u32 val = REG_RD(bp, PCICFG_OFFSET + PCICFG_LINK_CONTROL);
@@ -12018,8 +12014,7 @@ static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev,
return control & PCI_MSIX_FLAGS_QSIZE;
}
-static int bnx2x_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int bnx2x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev = NULL;
struct bnx2x *bp;
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 3f7b1c3..78ea90c 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -14873,8 +14873,7 @@ static bool tg3_10_100_only_device(struct tg3 *tp,
return false;
}
-static int tg3_get_invariants(struct tg3 *tp,
- const struct pci_device_id *ent)
+static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent)
{
u32 misc_ctrl_reg;
u32 pci_state_reg, grc_misc_cfg;
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
index 5f60623..c8fdeaa 100644
--- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
@@ -974,8 +974,7 @@ static const struct net_device_ops cxgb_netdev_ops = {
#endif
};
-static int init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int version_printed;
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 9a0a858..112665b 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -2071,8 +2071,7 @@ static void espibug_workaround(unsigned long data)
/*
* Creates a t1_sge structure and returns suggested resource parameters.
*/
-struct sge *t1_sge_create(struct adapter *adapter,
- struct sge_params *p)
+struct sge *t1_sge_create(struct adapter *adapter, struct sge_params *p)
{
struct sge *sge = kzalloc(sizeof(*sge), GFP_KERNEL);
int i;
diff --git a/drivers/net/ethernet/chelsio/cxgb/subr.c b/drivers/net/ethernet/chelsio/cxgb/subr.c
index 9527dc1..e0a03a3 100644
--- a/drivers/net/ethernet/chelsio/cxgb/subr.c
+++ b/drivers/net/ethernet/chelsio/cxgb/subr.c
@@ -893,7 +893,7 @@ static void power_sequence_xpak(adapter_t* adapter)
}
int t1_get_board_rev(adapter_t *adapter, const struct board_info *bi,
- struct adapter_params *p)
+ struct adapter_params *p)
{
p->chip_version = bi->chip_term;
p->is_asic = (p->chip_version != CHBT_TERM_FPGA);
@@ -1029,7 +1029,7 @@ void t1_free_sw_modules(adapter_t *adapter)
}
static void init_link_config(struct link_config *lc,
- const struct board_info *bi)
+ const struct board_info *bi)
{
lc->supported = bi->caps;
lc->requested_speed = lc->speed = SPEED_INVALID;
@@ -1049,8 +1049,7 @@ static void init_link_config(struct link_config *lc,
* Allocate and initialize the data structures that hold the SW state of
* the Terminator HW modules.
*/
-int t1_init_sw_modules(adapter_t *adapter,
- const struct board_info *bi)
+int t1_init_sw_modules(adapter_t *adapter, const struct board_info *bi)
{
unsigned int i;
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 4aa3b21..f15ee32 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3108,8 +3108,7 @@ static int cxgb_enable_msix(struct adapter *adap)
return err;
}
-static void print_port_info(struct adapter *adap,
- const struct adapter_info *ai)
+static void print_port_info(struct adapter *adap, const struct adapter_info *ai)
{
static const char *pci_variant[] = {
"PCI", "PCI-X", "PCI-X ECC", "PCI-X 266", "PCI Express"
@@ -3176,8 +3175,7 @@ static void cxgb3_init_iscsi_mac(struct net_device *dev)
#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \
NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
-static int init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int version_printed;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index bef893d..130dd9d 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2149,7 +2149,7 @@ static const struct file_operations mem_debugfs_fops = {
};
static void add_debugfs_mem(struct adapter *adap, const char *name,
- unsigned int idx, unsigned int size_mb)
+ unsigned int idx, unsigned int size_mb)
{
struct dentry *de;
@@ -4419,8 +4419,7 @@ static void free_some_resources(struct adapter *adapter)
#define VLAN_FEAT (NETIF_F_SG | NETIF_F_IP_CSUM | TSO_FLAGS | \
NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
-static int init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int func, i, err;
struct port_info *pi;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 8ea7736..45f2bea 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3440,8 +3440,7 @@ int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl)
return 0;
}
-static void get_pci_mode(struct adapter *adapter,
- struct pci_params *p)
+static void get_pci_mode(struct adapter *adapter, struct pci_params *p)
{
u16 val;
@@ -3460,8 +3459,7 @@ static void get_pci_mode(struct adapter *adapter,
* Initializes the SW state maintained for each link, including the link's
* capabilities and default speed/flow-control/autonegotiation settings.
*/
-static void init_link_config(struct link_config *lc,
- unsigned int caps)
+static void init_link_config(struct link_config *lc, unsigned int caps)
{
lc->supported = caps;
lc->requested_speed = 0;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index f866eb5..0188df7 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2463,7 +2463,7 @@ static const struct net_device_ops cxgb4vf_netdev_ops = {
* the PF Driver ...
*/
static int cxgb4vf_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
static int version_printed;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
index 9b70ccc..7127c7b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
@@ -253,8 +253,7 @@ static int hash_mac_addr(const u8 *addr)
* Initializes the SW state maintained for each link, including the link's
* capabilities and default speed/flow-control/autonegotiation settings.
*/
-static void init_link_config(struct link_config *lc,
- unsigned int caps)
+static void init_link_config(struct link_config *lc, unsigned int caps)
{
lc->supported = caps;
lc->requested_speed = 0;
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 930f03b..64866ff 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2275,8 +2275,7 @@ static void enic_iounmap(struct enic *enic)
iounmap(enic->bar[i].vaddr);
}
-static int enic_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct device *dev = &pdev->dev;
struct net_device *netdev;
diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c
index 0918e38..eaab73c 100644
--- a/drivers/net/ethernet/dec/tulip/de2104x.c
+++ b/drivers/net/ethernet/dec/tulip/de2104x.c
@@ -1962,8 +1962,7 @@ static const struct net_device_ops de_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int de_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int de_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
struct de_private *de;
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index c411aed..4c83003 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -2104,7 +2104,7 @@ static struct eisa_driver de4x5_eisa_driver = {
.driver = {
.name = "de4x5",
.probe = de4x5_eisa_probe,
- .remove = de4x5_eisa_remove,
+ .remove = de4x5_eisa_remove,
}
};
MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids);
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index 56a8fe7..8313930 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -367,8 +367,7 @@ static const struct net_device_ops netdev_ops = {
* Search DM910X board ,allocate space and register it
*/
-static int dmfe_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct dmfe_board_info *db; /* board information structure */
struct net_device *dev;
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 157c8e6..1e9443d 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -1191,8 +1191,7 @@ static void set_rx_mode(struct net_device *dev)
}
#ifdef CONFIG_TULIP_MWI
-static void tulip_mwi_config(struct pci_dev *pdev,
- struct net_device *dev)
+static void tulip_mwi_config(struct pci_dev *pdev, struct net_device *dev)
{
struct tulip_private *tp = netdev_priv(dev);
u8 cache;
@@ -1301,8 +1300,7 @@ DEFINE_PCI_DEVICE_TABLE(early_486_chipsets) = {
{ },
};
-static int tulip_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct tulip_private *tp;
/* See note below on the multiport cards. */
diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c
index 0a1bda8..c7b04ec 100644
--- a/drivers/net/ethernet/dec/tulip/winbond-840.c
+++ b/drivers/net/ethernet/dec/tulip/winbond-840.c
@@ -358,8 +358,7 @@ static const struct net_device_ops netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int w840_probe1(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
struct netdev_private *np;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index b003abc..f95612b 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -3994,8 +3994,7 @@ static inline char *func_name(struct be_adapter *adapter)
return be_physfn(adapter) ? "PF" : "VF";
}
-static int be_probe(struct pci_dev *pdev,
- const struct pci_device_id *pdev_id)
+static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
{
int status = 0;
struct be_adapter *adapter;
diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net/ethernet/fealnx.c
index 519c289..c706b7a 100644
--- a/drivers/net/ethernet/fealnx.c
+++ b/drivers/net/ethernet/fealnx.c
@@ -478,7 +478,7 @@ static const struct net_device_ops netdev_ops = {
};
static int fealnx_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct netdev_private *np;
int i, option, err, irq;
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
index 3f35b6a..2bafbd3 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
@@ -108,8 +108,7 @@ static struct mdiobb_ops bb_ops = {
.get_mdio_data = mdio_read,
};
-static int fs_mii_bitbang_init(struct mii_bus *bus,
- struct device_node *np)
+static int fs_mii_bitbang_init(struct mii_bus *bus, struct device_node *np)
{
struct resource res;
const u32 *data;
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index 598e576..e3c7c69 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -447,8 +447,8 @@ static const struct net_device_ops hp100_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int hp100_probe1(struct net_device *dev, int ioaddr,
- u_char bus, struct pci_dev *pci_dev)
+static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
+ struct pci_dev *pci_dev)
{
int i;
int err = -ENODEV;
@@ -2878,7 +2878,7 @@ static struct eisa_driver hp100_eisa_driver = {
.driver = {
.name = "hp100",
.probe = hp100_eisa_probe,
- .remove = hp100_eisa_remove,
+ .remove = hp100_eisa_remove,
}
};
#endif
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index e238130..19b64de 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -99,7 +99,7 @@ static struct ehea_bcmc_reg_array ehea_bcmc_regs;
static int ehea_probe_adapter(struct platform_device *dev,
- const struct of_device_id *id);
+ const struct of_device_id *id);
static int ehea_remove(struct platform_device *dev);
@@ -3258,7 +3258,7 @@ static void ehea_remove_device_sysfs(struct platform_device *dev)
}
static int ehea_probe_adapter(struct platform_device *dev,
- const struct of_device_id *id)
+ const struct of_device_id *id)
{
struct ehea_adapter *adapter;
const u64 *adapter_handle;
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index c791ad3..256bdb8 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -2262,7 +2262,7 @@ struct emac_depentry {
#define EMAC_DEP_COUNT 6
static int emac_check_deps(struct emac_instance *dev,
- struct emac_depentry *deps)
+ struct emac_depentry *deps)
{
int i, there = 0;
struct device_node *np;
@@ -2314,8 +2314,8 @@ static void emac_put_deps(struct emac_instance *dev)
of_dev_put(dev->tah_dev);
}
-static int emac_of_bus_notify(struct notifier_block *nb,
- unsigned long action, void *data)
+static int emac_of_bus_notify(struct notifier_block *nb, unsigned long action,
+ void *data)
{
/* We are only intereted in device addition */
if (action == BUS_NOTIFY_BOUND_DRIVER)
@@ -2368,7 +2368,7 @@ static int emac_wait_deps(struct emac_instance *dev)
}
static int emac_read_uint_prop(struct device_node *np, const char *name,
- u32 *val, int fatal)
+ u32 *val, int fatal)
{
int len;
const u32 *prop = of_get_property(np, name, &len);
diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
index 8becaaf..50ea12b 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -33,8 +33,7 @@
static int mal_count;
-int mal_register_commac(struct mal_instance *mal,
- struct mal_commac *commac)
+int mal_register_commac(struct mal_instance *mal, struct mal_commac *commac)
{
unsigned long flags;
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 35485f2..f2fdbb7 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1324,8 +1324,7 @@ static const struct net_device_ops ibmveth_netdev_ops = {
#endif
};
-static int ibmveth_probe(struct vio_dev *dev,
- const struct vio_device_id *id)
+static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
{
int rc, i;
struct net_device *netdev;
diff --git a/drivers/net/ethernet/icplus/ipg.c b/drivers/net/ethernet/icplus/ipg.c
index f80ae74..068d781 100644
--- a/drivers/net/ethernet/icplus/ipg.c
+++ b/drivers/net/ethernet/icplus/ipg.c
@@ -2199,8 +2199,7 @@ static const struct net_device_ops ipg_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int ipg_probe(struct pci_dev *pdev,
- const struct pci_device_id *id)
+static int ipg_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
unsigned int i = id->driver_data;
struct ipg_nic_private *sp;
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 50c2050..a59f077 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -2829,8 +2829,7 @@ static const struct net_device_ops e100_netdev_ops = {
.ndo_set_features = e100_set_features,
};
-static int e100_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct nic *nic;
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 840fb0d..294da56 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -938,8 +938,7 @@ static int e1000_init_hw_struct(struct e1000_adapter *adapter,
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int e1000_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct e1000_adapter *adapter;
diff --git a/drivers/net/ethernet/intel/e1000/e1000_param.c b/drivers/net/ethernet/intel/e1000/e1000_param.c
index 4e19aa0..750fc01 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_param.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_param.c
@@ -206,8 +206,8 @@ struct e1000_option {
};
static int e1000_validate_option(unsigned int *value,
- const struct e1000_option *opt,
- struct e1000_adapter *adapter)
+ const struct e1000_option *opt,
+ struct e1000_adapter *adapter)
{
if (*value == OPTION_UNSET) {
*value = opt->def;
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 829e814..fbf75fd 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6024,8 +6024,7 @@ static const struct net_device_ops e1000e_netdev_ops = {
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int e1000_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct e1000_adapter *adapter;
diff --git a/drivers/net/ethernet/intel/e1000e/param.c b/drivers/net/ethernet/intel/e1000e/param.c
index b3beed2..89d536d 100644
--- a/drivers/net/ethernet/intel/e1000e/param.c
+++ b/drivers/net/ethernet/intel/e1000e/param.c
@@ -173,8 +173,8 @@ struct e1000_option {
};
static int e1000_validate_option(unsigned int *value,
- const struct e1000_option *opt,
- struct e1000_adapter *adapter)
+ const struct e1000_option *opt,
+ struct e1000_adapter *adapter)
{
if (*value == OPTION_UNSET) {
*value = opt->def;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index de4ebb3..bd0f166 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1824,8 +1824,7 @@ void igb_set_fw_version(struct igb_adapter *adapter)
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int igb_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct igb_adapter *adapter;
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index b494309..277f5df 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2618,8 +2618,7 @@ static const struct net_device_ops igbvf_netdev_ops = {
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int igbvf_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct igbvf_adapter *adapter;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 2fa16de..c20a0e2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7183,8 +7183,7 @@ int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int ixgbe_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct ixgbe_adapter *adapter = NULL;
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 1e2f02a..257357a 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3242,8 +3242,7 @@ static void ixgbevf_assign_netdev_ops(struct net_device *dev)
* The OS initialization, configuring of the adapter private structure,
* and a hardware reset occur.
**/
-static int ixgbevf_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int ixgbevf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *netdev;
struct ixgbevf_adapter *adapter = NULL;
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 3d66e95..5544a1f 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -3869,8 +3869,7 @@ static void skge_show_addr(struct net_device *dev)
static int only_32bit_dma;
-static int skge_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int skge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev, *dev1;
struct skge_hw *hw;
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 6ddfbca..3269eb3 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4741,9 +4741,8 @@ static const struct net_device_ops sky2_netdev_ops[2] = {
};
/* Initialize network device */
-static struct net_device *sky2_init_netdev(struct sky2_hw *hw,
- unsigned port,
- int highmem, int wol)
+static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port,
+ int highmem, int wol)
{
struct sky2_port *sky2;
struct net_device *dev = alloc_etherdev(sizeof(*sky2));
@@ -4896,8 +4895,7 @@ static const char *sky2_name(u8 chipid, char *buf, int sz)
return buf;
}
-static int sky2_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev, *dev1;
struct sky2_hw *hw;
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 340551e..200cc0e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2224,8 +2224,7 @@ err_disable_pdev:
return err;
}
-static int mlx4_init_one(struct pci_dev *pdev,
- const struct pci_device_id *id)
+static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
printk_once(KERN_INFO "%s", mlx4_version);
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index f3f09b1..093d594 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6919,8 +6919,7 @@ static void read_other_addr(struct ksz_hw *hw)
#define PCI_VENDOR_ID_MICREL_KS 0x16c6
#endif
-static int pcidev_init(struct pci_dev *pdev,
- const struct pci_device_id *id)
+static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
{
struct net_device *dev;
struct dev_priv *priv;
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
index eaddbb7..0ffde69 100644
--- a/drivers/net/ethernet/natsemi/macsonic.c
+++ b/drivers/net/ethernet/natsemi/macsonic.c
@@ -421,8 +421,7 @@ static int mac_onboard_sonic_probe(struct net_device *dev)
}
static int mac_nubus_sonic_ethernet_addr(struct net_device *dev,
- unsigned long prom_addr,
- int id)
+ unsigned long prom_addr, int id)
{
int i;
for(i = 0; i < 6; i++)
diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c
index 77f7cd3..f4ad60c 100644
--- a/drivers/net/ethernet/natsemi/natsemi.c
+++ b/drivers/net/ethernet/natsemi/natsemi.c
@@ -797,8 +797,7 @@ static const struct net_device_ops natsemi_netdev_ops = {
#endif
};
-static int natsemi_probe1(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
struct netdev_private *np;
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c
index 0281755..77c070d 100644
--- a/drivers/net/ethernet/natsemi/ns83820.c
+++ b/drivers/net/ethernet/natsemi/ns83820.c
@@ -1942,7 +1942,7 @@ static const struct net_device_ops netdev_ops = {
};
static int ns83820_init_one(struct pci_dev *pci_dev,
- const struct pci_device_id *id)
+ const struct pci_device_id *id)
{
struct net_device *ndev;
struct ns83820 *dev;
diff --git a/drivers/net/ethernet/neterion/s2io.h b/drivers/net/ethernet/neterion/s2io.h
index 032f9b6..d89b6ed 100644
--- a/drivers/net/ethernet/neterion/s2io.h
+++ b/drivers/net/ethernet/neterion/s2io.h
@@ -1075,8 +1075,7 @@ static inline void SPECIAL_REG_WRITE(u64 val, void __iomem *addr, int order)
/*
* Prototype declaration.
*/
-static int s2io_init_nic(struct pci_dev *pdev,
- const struct pci_device_id *pre);
+static int s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre);
static void s2io_rem_nic(struct pci_dev *pdev);
static int init_shared_mem(struct s2io_nic *sp);
static void free_shared_mem(struct s2io_nic *sp);
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index bb5770f..7c87105 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -3372,9 +3372,8 @@ static const struct net_device_ops vxge_netdev_ops = {
};
static int vxge_device_register(struct __vxge_hw_device *hldev,
- struct vxge_config *config,
- int high_dma, int no_of_vpath,
- struct vxgedev **vdev_out)
+ struct vxge_config *config, int high_dma,
+ int no_of_vpath, struct vxgedev **vdev_out)
{
struct net_device *ndev;
enum vxge_hw_status status = VXGE_HW_OK;
@@ -3672,9 +3671,8 @@ static void verify_bandwidth(void)
/*
* Vpath configuration
*/
-static int vxge_config_vpaths(
- struct vxge_hw_device_config *device_config,
- u64 vpath_mask, struct vxge_config *config_param)
+static int vxge_config_vpaths(struct vxge_hw_device_config *device_config,
+ u64 vpath_mask, struct vxge_config *config_param)
{
int i, no_of_vpaths = 0, default_no_vpath = 0, temp;
u32 txdl_size, txdl_per_memblock;
@@ -3859,9 +3857,8 @@ static int vxge_config_vpaths(
}
/* initialize device configuratrions */
-static void vxge_device_config_init(
- struct vxge_hw_device_config *device_config,
- int *intr_type)
+static void vxge_device_config_init(struct vxge_hw_device_config *device_config,
+ int *intr_type)
{
/* Used for CQRQ/SRQ. */
device_config->dma_blockpool_initial =
diff --git a/drivers/net/ethernet/packetengines/yellowfin.c b/drivers/net/ethernet/packetengines/yellowfin.c
index 2800c44..fbaed4f 100644
--- a/drivers/net/ethernet/packetengines/yellowfin.c
+++ b/drivers/net/ethernet/packetengines/yellowfin.c
@@ -368,7 +368,7 @@ static const struct net_device_ops netdev_ops = {
};
static int yellowfin_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct net_device *dev;
struct yellowfin_private *np;
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index df6eb27..67a679a 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -3770,7 +3770,7 @@ static const struct net_device_ops ql3xxx_netdev_ops = {
};
static int ql3xxx_probe(struct pci_dev *pdev,
- const struct pci_device_id *pci_entry)
+ const struct pci_device_id *pci_entry)
{
struct net_device *ndev = NULL;
struct ql3_adapter *qdev = NULL;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 8d58092..a7554d9 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -54,8 +54,7 @@ static int qlcnic_config_npars;
module_param(qlcnic_config_npars, int, 0444);
MODULE_PARM_DESC(qlcnic_config_npars, "Configure NPARs (0=disabled, 1=enabled");
-static int qlcnic_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent);
+static int qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static void qlcnic_remove(struct pci_dev *pdev);
static int qlcnic_open(struct net_device *netdev);
static int qlcnic_close(struct net_device *netdev);
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index cae881c..f80cd97 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4491,8 +4491,8 @@ static void ql_release_all(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
}
-static int ql_init_device(struct pci_dev *pdev,
- struct net_device *ndev, int cards_found)
+static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,
+ int cards_found)
{
struct ql_adapter *qdev = netdev_priv(ndev);
int err = 0;
@@ -4657,7 +4657,7 @@ static void ql_timer(unsigned long data)
}
static int qlge_probe(struct pci_dev *pdev,
- const struct pci_device_id *pci_entry)
+ const struct pci_device_id *pci_entry)
{
struct net_device *ndev = NULL;
struct ql_adapter *qdev = NULL;
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index ae27e44..63c1312 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -1073,8 +1073,7 @@ static int r6040_mii_probe(struct net_device *dev)
return 0;
}
-static int r6040_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
struct r6040_private *lp;
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index e95cc7b..bf57b3c 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2670,7 +2670,7 @@ static int efx_pci_probe_main(struct efx_nic *efx)
* interfaces is brought up (i.e. efx_net_open).
*/
static int efx_pci_probe(struct pci_dev *pci_dev,
- const struct pci_device_id *entry)
+ const struct pci_device_id *entry)
{
struct net_device *net_dev;
struct efx_nic *efx;
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 4b1deec..dc171b4 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -1229,8 +1229,7 @@ static const struct net_device_ops ioc3_netdev_ops = {
.ndo_change_mtu = eth_change_mtu,
};
-static int ioc3_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
unsigned int sw_physid1, sw_physid2;
struct net_device *dev = NULL;
diff --git a/drivers/net/ethernet/silan/sc92031.c b/drivers/net/ethernet/silan/sc92031.c
index 2103449..b231532 100644
--- a/drivers/net/ethernet/silan/sc92031.c
+++ b/drivers/net/ethernet/silan/sc92031.c
@@ -1395,8 +1395,7 @@ static const struct net_device_ops sc92031_netdev_ops = {
#endif
};
-static int sc92031_probe(struct pci_dev *pdev,
- const struct pci_device_id *id)
+static int sc92031_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
int err;
void __iomem* port_base;
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index c114c4f..9a9c379 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1574,7 +1574,7 @@ static void sis190_set_rgmii(struct sis190_private *tp, u8 reg)
}
static int sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
- struct net_device *dev)
+ struct net_device *dev)
{
struct sis190_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
@@ -1616,7 +1616,7 @@ static int sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
* MAC address is read into @net_dev->dev_addr.
*/
static int sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
- struct net_device *dev)
+ struct net_device *dev)
{
static const u16 ids[] = { 0x0965, 0x0966, 0x0968 };
struct sis190_private *tp = netdev_priv(dev);
@@ -1693,8 +1693,7 @@ static inline void sis190_init_rxfilter(struct net_device *dev)
SIS_PCI_COMMIT();
}
-static int sis190_get_mac_addr(struct pci_dev *pdev,
- struct net_device *dev)
+static int sis190_get_mac_addr(struct pci_dev *pdev, struct net_device *dev)
{
int rc;
@@ -1846,7 +1845,7 @@ static const struct net_device_ops sis190_netdev_ops = {
};
static int sis190_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
static int printed_version = 0;
struct sis190_private *tp;
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index 88c6c42..5bffd97 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -435,7 +435,7 @@ static const struct net_device_ops sis900_netdev_ops = {
*/
static int sis900_probe(struct pci_dev *pci_dev,
- const struct pci_device_id *pci_id)
+ const struct pci_device_id *pci_id)
{
struct sis900_private *sis_priv;
struct net_device *net_dev;
diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c
index 347cccb..03b256a 100644
--- a/drivers/net/ethernet/smsc/epic100.c
+++ b/drivers/net/ethernet/smsc/epic100.c
@@ -318,8 +318,7 @@ static const struct net_device_ops epic_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
};
-static int epic_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int epic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int card_idx = -1;
void __iomem *ioaddr;
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index b085692..022b45b 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -1854,7 +1854,7 @@ static int smc_findirq(struct smc_local *lp)
* o GRAB the region
*/
static int smc_probe(struct net_device *dev, void __iomem *ioaddr,
- unsigned long irq_flags)
+ unsigned long irq_flags)
{
struct smc_local *lp = netdev_priv(dev);
static int version_printed = 0;
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index c52a5ce..39a7a49 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1032,7 +1032,7 @@ static int smsc911x_mii_probe(struct net_device *dev)
}
static int smsc911x_mii_init(struct platform_device *pdev,
- struct net_device *dev)
+ struct net_device *dev)
{
struct smsc911x_data *pdata = netdev_priv(dev);
int err = -ENXIO, i;
@@ -2296,9 +2296,8 @@ static const struct smsc911x_ops shifted_smsc911x_ops = {
};
#ifdef CONFIG_OF
-static int smsc911x_probe_config_dt(
- struct smsc911x_platform_config *config,
- struct device_node *np)
+static int smsc911x_probe_config_dt(struct smsc911x_platform_config *config,
+ struct device_node *np)
{
const char *mac;
u32 width = 0;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 5cf9eb6..064eaac 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -62,7 +62,7 @@ static void stmmac_default_data(void)
* to take "ownership" of the device or an error code(-ve no) otherwise.
*/
static int stmmac_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *id)
+ const struct pci_device_id *id)
{
int ret = 0;
void __iomem *addr = NULL;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index b77b913..b43d68b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -30,8 +30,8 @@
#ifdef CONFIG_OF
static int stmmac_probe_config_dt(struct platform_device *pdev,
- struct plat_stmmacenet_data *plat,
- const char **mac)
+ struct plat_stmmacenet_data *plat,
+ const char **mac)
{
struct device_node *np = pdev->dev.of_node;
@@ -60,8 +60,8 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
}
#else
static int stmmac_probe_config_dt(struct platform_device *pdev,
- struct plat_stmmacenet_data *plat,
- const char **mac)
+ struct plat_stmmacenet_data *plat,
+ const char **mac)
{
return -ENOSYS;
}
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index 85f971f..4c682a3 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -4916,8 +4916,7 @@ static const struct net_device_ops cas_netdev_ops = {
#endif
};
-static int cas_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int cas_version_printed = 0;
unsigned long casreg_len;
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 6023949..a0bdf07 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -8054,10 +8054,8 @@ static int niu_pci_eeprom_read16_swp(struct niu *np, u32 off)
return val;
}
-static int niu_pci_vpd_get_propname(struct niu *np,
- u32 off,
- char *namebuf,
- int namebuf_len)
+static int niu_pci_vpd_get_propname(struct niu *np, u32 off, char *namebuf,
+ int namebuf_len)
{
int i;
@@ -8102,8 +8100,7 @@ static void niu_vpd_parse_version(struct niu *np)
}
/* ESPC_PIO_EN_ENABLE must be set */
-static int niu_pci_vpd_scan_props(struct niu *np,
- u32 start, u32 end)
+static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end)
{
unsigned int found_mask = 0;
#define FOUND_MASK_MODEL 0x00000001
@@ -8279,8 +8276,7 @@ static u32 niu_pci_vpd_offset(struct niu *np)
return 0;
}
-static int niu_phy_type_prop_decode(struct niu *np,
- const char *phy_prop)
+static int niu_phy_type_prop_decode(struct niu *np, const char *phy_prop)
{
if (!strcmp(phy_prop, "mif")) {
/* 1G copper, MII */
@@ -8572,10 +8568,8 @@ static int niu_get_and_validate_port(struct niu *np)
return 0;
}
-static int phy_record(struct niu_parent *parent,
- struct phy_probe_info *p,
- int dev_id_1, int dev_id_2, u8 phy_port,
- int type)
+static int phy_record(struct niu_parent *parent, struct phy_probe_info *p,
+ int dev_id_1, int dev_id_2, u8 phy_port, int type)
{
u32 id = (dev_id_1 << 16) | dev_id_2;
u8 idx;
@@ -8670,7 +8664,7 @@ static void niu_n2_divide_channels(struct niu_parent *parent)
}
static void niu_divide_channels(struct niu_parent *parent,
- int num_10g, int num_1g)
+ int num_10g, int num_1g)
{
int num_ports = parent->num_ports;
int rx_chans_per_10g, rx_chans_per_1g;
@@ -8732,7 +8726,7 @@ static void niu_divide_channels(struct niu_parent *parent,
}
static void niu_divide_rdc_groups(struct niu_parent *parent,
- int num_10g, int num_1g)
+ int num_10g, int num_1g)
{
int i, num_ports = parent->num_ports;
int rdc_group, rdc_groups_per_port;
@@ -8776,9 +8770,8 @@ static void niu_divide_rdc_groups(struct niu_parent *parent,
}
}
-static int fill_phy_probe_info(struct niu *np,
- struct niu_parent *parent,
- struct phy_probe_info *info)
+static int fill_phy_probe_info(struct niu *np, struct niu_parent *parent,
+ struct phy_probe_info *info)
{
unsigned long flags;
int port, err;
@@ -9480,8 +9473,7 @@ static struct device_attribute niu_parent_attributes[] = {
};
static struct niu_parent *niu_new_parent(struct niu *np,
- union niu_parent_id *id,
- u8 ptype)
+ union niu_parent_id *id, u8 ptype)
{
struct platform_device *plat_dev;
struct niu_parent *p;
@@ -9545,8 +9537,7 @@ fail_unregister:
}
static struct niu_parent *niu_get_parent(struct niu *np,
- union niu_parent_id *id,
- u8 ptype)
+ union niu_parent_id *id, u8 ptype)
{
struct niu_parent *p, *tmp;
int port = np->port;
@@ -9670,10 +9661,10 @@ static void niu_driver_version(void)
pr_info("%s", version);
}
-static struct net_device *niu_alloc_and_init(
- struct device *gen_dev, struct pci_dev *pdev,
- struct platform_device *op, const struct niu_ops *ops,
- u8 port)
+static struct net_device *niu_alloc_and_init(struct device *gen_dev,
+ struct pci_dev *pdev,
+ struct platform_device *op,
+ const struct niu_ops *ops, u8 port)
{
struct net_device *dev;
struct niu *np;
@@ -9757,7 +9748,7 @@ static void niu_set_basic_features(struct net_device *dev)
}
static int niu_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
union niu_parent_id parent_id;
struct net_device *dev;
diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c
index 8fda910..be82f6d 100644
--- a/drivers/net/ethernet/sun/sunbmac.c
+++ b/drivers/net/ethernet/sun/sunbmac.c
@@ -1075,7 +1075,7 @@ static const struct net_device_ops bigmac_ops = {
};
static int bigmac_ether_init(struct platform_device *op,
- struct platform_device *qec_op)
+ struct platform_device *qec_op)
{
static int version_printed;
struct net_device *dev;
diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index c7bc056..5f3f9d5 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -2827,8 +2827,7 @@ static const struct net_device_ops gem_netdev_ops = {
#endif
};
-static int gem_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int gem_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
unsigned long gemreg_base, gemreg_len;
struct net_device *dev;
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 43babc3..a1bff49 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2928,7 +2928,7 @@ static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr)
#endif /* !(CONFIG_SPARC) */
static int happy_meal_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct quattro *qp = NULL;
#ifdef CONFIG_SPARC
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2852b70..e1b8955 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1132,8 +1132,7 @@ static void print_version(void)
const char *remote_macaddr_prop = "remote-mac-address";
-static int vnet_port_probe(struct vio_dev *vdev,
- const struct vio_device_id *id)
+static int vnet_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
{
struct mdesc_handle *hp;
struct vnet_port *port;
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index af16081..2272538 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -460,9 +460,8 @@ static int tlan_init_one(struct pci_dev *pdev,
*
**************************************************************/
-static int tlan_probe1(struct pci_dev *pdev,
- long ioaddr, int irq, int rev,
- const struct pci_device_id *ent)
+static int tlan_probe1(struct pci_dev *pdev, long ioaddr, int irq, int rev,
+ const struct pci_device_id *ent)
{
struct net_device *dev;
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
index d7c8af7..e321d0b 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
@@ -235,9 +235,8 @@ static void gelic_card_free_chain(struct gelic_card *card,
* returns 0 on success, <0 on failure
*/
static int gelic_card_init_chain(struct gelic_card *card,
- struct gelic_descr_chain *chain,
- struct gelic_descr *start_descr,
- int no)
+ struct gelic_descr_chain *chain,
+ struct gelic_descr *start_descr, int no)
{
int i;
struct gelic_descr *descr;
@@ -1469,7 +1468,7 @@ static const struct net_device_ops gelic_netdevice_ops = {
* fills out function pointers in the net_device structure
*/
static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
- struct napi_struct *napi)
+ struct napi_struct *napi)
{
netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT;
/* NAPI */
@@ -1489,8 +1488,7 @@ static void gelic_ether_setup_netdev_ops(struct net_device *netdev,
* gelic_ether_setup_netdev initializes the net_device structure
* and register it.
**/
-int gelic_net_setup_netdev(struct net_device *netdev,
- struct gelic_card *card)
+int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card)
{
int status;
u64 v1, v2;
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
index 5db09ef..9819349 100644
--- a/drivers/net/ethernet/toshiba/tc35815.c
+++ b/drivers/net/ethernet/toshiba/tc35815.c
@@ -786,7 +786,7 @@ static const struct net_device_ops tc35815_netdev_ops = {
};
static int tc35815_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
void __iomem *ioaddr = NULL;
struct net_device *dev;
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 53ccc51..7992b3e 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -856,8 +856,7 @@ static const struct net_device_ops rhine_netdev_ops = {
#endif
};
-static int rhine_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int rhine_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
struct rhine_private *rp;
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index dc9edd4..1bc7f9fd 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -2630,9 +2630,8 @@ static const struct net_device_ops velocity_netdev_ops = {
* Set up the initial velocity_info struct for the device that has been
* discovered.
*/
-static void velocity_init_info(struct pci_dev *pdev,
- struct velocity_info *vptr,
- const struct velocity_info_tbl *info)
+static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr,
+ const struct velocity_info_tbl *info)
{
memset(vptr, 0, sizeof(struct velocity_info));
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index 3c8aab7..502c8ff 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -962,9 +962,8 @@ static void dfx_bus_config_check(DFX_board_t *bp)
* returning from this routine.
*/
-static int dfx_driver_init(struct net_device *dev,
- const char *print_name,
- resource_size_t bar_start)
+static int dfx_driver_init(struct net_device *dev, const char *print_name,
+ resource_size_t bar_start)
{
DFX_board_t *bp = netdev_priv(dev);
struct device *bdev = bp->bus_dev;
@@ -3623,8 +3622,7 @@ static int __maybe_unused dfx_dev_register(struct device *);
static int __maybe_unused dfx_dev_unregister(struct device *);
#ifdef CONFIG_PCI
-static int dfx_pci_register(struct pci_dev *,
- const struct pci_device_id *);
+static int dfx_pci_register(struct pci_dev *, const struct pci_device_id *);
static void dfx_pci_unregister(struct pci_dev *);
static DEFINE_PCI_DEVICE_TABLE(dfx_pci_table) = {
@@ -3641,7 +3639,7 @@ static struct pci_driver dfx_pci_driver = {
};
static int dfx_pci_register(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
return dfx_register(&pdev->dev);
}
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index e54b84d..e5b19b0 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -88,8 +88,7 @@ static const struct net_device_ops rr_netdev_ops = {
* stack will need to know about I/O vectors or something similar.
*/
-static int rr_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int rr_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct net_device *dev;
static int version_disp;
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 82c5f30a..5290952 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -377,7 +377,7 @@ static int pnp_driver_registered;
#ifdef CONFIG_PNP
static int smsc_ircc_pnp_probe(struct pnp_dev *dev,
- const struct pnp_device_id *dev_id)
+ const struct pnp_device_id *dev_id)
{
unsigned int firbase, sirbase;
u8 dma, irq;
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 63efbf4..f9033c6 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -77,7 +77,7 @@ static int dongle_id = 0; /* default: probe */
module_param(dongle_id, int, 0);
/* Some prototypes */
-static int via_ircc_open(struct pci_dev *pdev, chipio_t * info,
+static int via_ircc_open(struct pci_dev *pdev, chipio_t *info,
unsigned int id);
static int via_ircc_dma_receive(struct via_ircc_cb *self);
static int via_ircc_dma_receive_complete(struct via_ircc_cb *self,
@@ -103,7 +103,7 @@ static void hwreset(struct via_ircc_cb *self);
static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase);
static int upload_rxdata(struct via_ircc_cb *self, int iobase);
static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id);
-static void via_remove_one (struct pci_dev *pdev);
+static void via_remove_one(struct pci_dev *pdev);
/* FIXME : Should use udelay() instead, even if we are x86 only - Jean II */
static void iodelay(int udelay)
@@ -286,8 +286,7 @@ static const struct net_device_ops via_ircc_fir_ops = {
* Open driver instance
*
*/
-static int via_ircc_open(struct pci_dev *pdev, chipio_t *info,
- unsigned int id)
+static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
{
struct net_device *dev;
struct via_ircc_cb *self;
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 36fe08a..2727498 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -104,8 +104,8 @@ static struct mdiobb_ops mdio_gpio_ops = {
};
static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
- struct mdio_gpio_platform_data *pdata,
- int bus_id)
+ struct mdio_gpio_platform_data *pdata,
+ int bus_id)
{
struct mii_bus *new_bus;
struct mdio_gpio_info *bitbang;
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index d502230..851dc7b 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -707,8 +707,7 @@ static void dscc4_free1(struct pci_dev *pdev)
kfree(ppriv);
}
-static int dscc4_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int dscc4_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct dscc4_pci_priv *priv;
struct dscc4_dev_priv *dpriv;
diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c
index c6e1a4b..62f01b7 100644
--- a/drivers/net/wan/hd64570.c
+++ b/drivers/net/wan/hd64570.c
@@ -676,8 +676,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev)
#ifdef NEED_DETECT_RAM
-static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase,
- u32 ramsize)
+static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize)
{
/* Round RAM size to 32 bits, fill from end to start */
u32 i = ramsize &= ~3;
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c
index f1685d9..6269a09 100644
--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -605,8 +605,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev)
}
-static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase,
- u32 ramsize)
+static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize)
{
/* Round RAM size to 32 bits, fill from end to start */
u32 i = ramsize &= ~3;
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 0e443fd..7ef435b 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -816,8 +816,7 @@ static const struct net_device_ops lmc_ops = {
.ndo_get_stats = lmc_get_stats,
};
-static int lmc_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
lmc_softc_t *sc;
struct net_device *dev;
diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c
index a51cfa7..53efc57 100644
--- a/drivers/net/wan/pc300too.c
+++ b/drivers/net/wan/pc300too.c
@@ -298,7 +298,7 @@ static const struct net_device_ops pc300_ops = {
};
static int pc300_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
card_t *card;
u32 __iomem *p;
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
index 037c423..ddbce54 100644
--- a/drivers/net/wan/pci200syn.c
+++ b/drivers/net/wan/pci200syn.c
@@ -277,7 +277,7 @@ static const struct net_device_ops pci200_ops = {
};
static int pci200_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
card_t *card;
u32 __iomem *p;
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index b72be12..6a24a5a 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -558,7 +558,7 @@ static const struct net_device_ops wanxl_ops = {
};
static int wanxl_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
card_t *card;
u32 ramsize, stat;
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 53451dd..c26e28b 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1408,7 +1408,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
* inform the backend of the appropriate details for those.
*/
static int netfront_probe(struct xenbus_device *dev,
- const struct xenbus_device_id *id)
+ const struct xenbus_device_id *id)
{
int err;
struct net_device *netdev;
^ permalink raw reply related
* Re: [PATCH] net: core: fix unused variable sparse warning
From: Cong Ding @ 2012-12-07 0:15 UTC (permalink / raw)
To: David S. Miller, Eric W. Biederman, Eric Dumazet, Pavel Emelyanov,
netdev, linux-kernel
In-Reply-To: <1354838913-20084-1-git-send-email-dinggnu@gmail.com>
On Fri, Dec 07, 2012 at 12:06:44AM +0000, Cong Ding wrote:
> the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
> defined, otherwise it causes the following sparse warning when we turn on
> CONFIG_SYSCTL.
sorry for disturbing again, the sparse warning is
net/core/neighbour.c:65:12: warning: ‘zero’ defined but not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: ‘unres_qlen_max’ defined but not used [-Wunused-variable]
it happens if we turn off CONFIG_SYSCTL.
>
> Signed-off-by: Cong Ding <dinggnu@gmail.com>
> ---
> net/core/neighbour.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 36fc692..4a15278 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -62,8 +62,10 @@ static void __neigh_notify(struct neighbour *n, int type, int flags);
> static void neigh_update_notify(struct neighbour *neigh);
> static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
>
> +#ifdef CONFIG_SYSCTL
> static int zero;
> static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
> +#endif
>
> static struct neigh_table *neigh_tables;
> #ifdef CONFIG_PROC_FS
> --
> 1.7.4.5
>
^ permalink raw reply
* Re: [PATCH net-next 0/1] fix vlan transmit performance
From: Andrew Gallatin @ 2012-12-07 0:10 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, netdev
In-Reply-To: <1354837321.2828.86.camel@bwh-desktop.uk.solarflarecom.com>
On 12/06/12 18:42, Ben Hutchings wrote:
>
> My answer would be: leave reorder_hdr enabled per default. In fact,
> perhaps the VLAN driver's TX path should ignore it if the underlying
> device has non-zero vlan_features. (It's already ignored if the
> underlying device has NETIF_F_VLAN_TX.)
Thanks for the feedback. I knew I was missing something!
I will try your approach, unless you beat me to it.
I assume sfc is also impacted by this..?
Drew
^ permalink raw reply
* [PATCH] net: core: fix unused variable sparse warning
From: Cong Ding @ 2012-12-07 0:06 UTC (permalink / raw)
To: David S. Miller, Eric W. Biederman, Eric Dumazet, Pavel Emelyanov,
netdev, linux-kernel
Cc: Cong Ding
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
net/core/neighbour.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 36fc692..4a15278 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -62,8 +62,10 @@ static void __neigh_notify(struct neighbour *n, int type, int flags);
static void neigh_update_notify(struct neighbour *neigh);
static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
+#ifdef CONFIG_SYSCTL
static int zero;
static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
+#endif
static struct neigh_table *neigh_tables;
#ifdef CONFIG_PROC_FS
--
1.7.4.5
^ permalink raw reply related
* Re: [PATCH] fix initializer entry defined twice issue
From: Cong Ding @ 2012-12-07 0:05 UTC (permalink / raw)
To: Patrick Trantham
Cc: David S. Miller, Otavio Salvador, Javier Martinez Canillas,
Jiri Kosina, netdev, linux-kernel
In-Reply-To: <50C13159.2070901@fuel7.com>
On Thu, Dec 06, 2012 at 05:59:21PM -0600, Patrick Trantham wrote:
> On 12/06/2012 05:16 PM, Cong Ding wrote:
> >the ".config_intr" is defined twice in both line 208 and 212.
> >
> >Signed-off-by: Cong Ding <dinggnu@gmail.com>
> >---
> > drivers/net/phy/smsc.c | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> >diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
> >index 16dceed..5cee6bd 100644
> >--- a/drivers/net/phy/smsc.c
> >+++ b/drivers/net/phy/smsc.c
> >@@ -205,7 +205,6 @@ static struct phy_driver smsc_phy_driver[] = {
> > /* basic functions */
> > .config_aneg = genphy_config_aneg,
> > .read_status = lan87xx_read_status,
> >- .config_intr = smsc_phy_config_intr,
> > /* IRQ related */
> > .ack_interrupt = smsc_phy_ack_interrupt,
>
> Hi Cong,
>
> That looks like a mistake from my previous patch to that file. Copy
> and paste fail.
>
> The line should read:
> .config_init = smsc_phy_config_init,
>
> I can submit a patch once I get off work unless you beat me to it.
Thanks for the note. It's better that you submit a patch together with your
code.
- cong
^ permalink raw reply
* Re: [PATCH] fix initializer entry defined twice issue
From: Patrick Trantham @ 2012-12-06 23:59 UTC (permalink / raw)
To: Cong Ding
Cc: David S. Miller, Otavio Salvador, Javier Martinez Canillas,
Jiri Kosina, netdev, linux-kernel
In-Reply-To: <1354835928-617-1-git-send-email-dinggnu@gmail.com>
On 12/06/2012 05:16 PM, Cong Ding wrote:
> the ".config_intr" is defined twice in both line 208 and 212.
>
> Signed-off-by: Cong Ding <dinggnu@gmail.com>
> ---
> drivers/net/phy/smsc.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
> index 16dceed..5cee6bd 100644
> --- a/drivers/net/phy/smsc.c
> +++ b/drivers/net/phy/smsc.c
> @@ -205,7 +205,6 @@ static struct phy_driver smsc_phy_driver[] = {
> /* basic functions */
> .config_aneg = genphy_config_aneg,
> .read_status = lan87xx_read_status,
> - .config_intr = smsc_phy_config_intr,
>
> /* IRQ related */
> .ack_interrupt = smsc_phy_ack_interrupt,
Hi Cong,
That looks like a mistake from my previous patch to that file. Copy and
paste fail.
The line should read:
.config_init = smsc_phy_config_init,
I can submit a patch once I get off work unless you beat me to it.
regards,
Patrick
^ permalink raw reply
* [PATCH] net: gro: fix possible panic in skb_gro_receive()
From: Eric Dumazet @ 2012-12-06 23:54 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
commit 2e71a6f8084e (net: gro: selective flush of packets) added
a bug for skbs using frag_list. This part of the GRO stack is rarely
used, as it needs skb not using a page fragment for their skb->head.
Most drivers do use a page fragment, but some of them use GFP_KERNEL
allocations for the initial fill of their RX ring buffer.
napi_gro_flush() overwrite skb->prev that was used for these skb to
point to the last skb in frag_list.
Fix this using a separate field in struct napi_gro_cb to point to the
last fragment.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/linux/netdevice.h | 3 +++
net/core/dev.c | 2 ++
net/core/skbuff.c | 6 +++---
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f8eda02..a848ffc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1488,6 +1488,9 @@ struct napi_gro_cb {
/* Used in ipv6_gro_receive() */
int proto;
+
+ /* used in skb_gro_receive() slow path */
+ struct sk_buff *last;
};
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
diff --git a/net/core/dev.c b/net/core/dev.c
index c0946cb..e5942bf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3451,6 +3451,8 @@ static int napi_gro_complete(struct sk_buff *skb)
struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
int err = -ENOENT;
+ BUILD_BUG_ON(sizeof(struct napi_gro_cb) > sizeof(skb->cb));
+
if (NAPI_GRO_CB(skb)->count == 1) {
skb_shinfo(skb)->gso_size = 0;
goto out;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 4007c14..3f0636c 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3004,7 +3004,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
skb_shinfo(nskb)->gso_size = pinfo->gso_size;
pinfo->gso_size = 0;
skb_header_release(p);
- nskb->prev = p;
+ NAPI_GRO_CB(nskb)->last = p;
nskb->data_len += p->len;
nskb->truesize += p->truesize;
@@ -3030,8 +3030,8 @@ merge:
__skb_pull(skb, offset);
- p->prev->next = skb;
- p->prev = skb;
+ NAPI_GRO_CB(p)->last->next = skb;
+ NAPI_GRO_CB(p)->last = skb;
skb_header_release(skb);
done:
^ permalink raw reply related
* Re: [PATCH net-next] rps: overflow prevention for saturated cpus
From: Rick Jones @ 2012-12-06 23:45 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: netdev, David Miller, Eric Dumazet, Tom Herbert
In-Reply-To: <CA+FuTSc=-TE4X=VWmdXMLhE_jn6CtjUpauznt4evrRLi-DOd2g@mail.gmail.com>
On 12/06/2012 03:04 PM, Willem de Bruijn wrote:
> On Thu, Dec 6, 2012 at 5:25 PM, Rick Jones <rick.jones2@hp.com> wrote:
>> I thought (one of) the ideas behind RFS at least was to give the CPU
>> scheduler control over where network processing took place instead of it
>> being dictated solely by the addressing. I would have expected the CPU
>> scheduler to migrate some work off the saturated CPU. Or will this only
>> affect RPS and not RFS?
>
> I wrote it with RPS in mind, indeed. With RFS, for sufficiently
> multithreaded applications that are unpinned, the scheduler will
> likely spread the threads across as many cpus as possible. In that
> case, the mechanism will not kick in, or as quickly. Even with RFS,
> pinned threads and single-threaded applications will likely also
> benefit during high load from redirecting kernel receive
> processing away from the cpu that runs the application thread. I
> haven't tested that case independently.
Unless that single-threaded application (or single receiving thread) is
pinned to a CPU, isn't there a non-trivial chance that incoming traffic
flowing up different CPUs will cause it to be bounced from one CPU to
another, taking its cache lines with it and not just the "intra-stack"
cache lines?
Long (?) ago and far away it was possible to say that a given IRQ should
be potentially serviced by more than one CPU (if I recall though not
phrase correctly). Didn't that get taken away because it did such nasty
things like reordering and such? (Admittedly, I'm really stretching the
limits of my dimm memory there)
>> What kind of workload is this targeting that calls for
>> such intra-flow parallelism?
>
> Packet processing middeboxes that rather operate in degraded mode
> (reordering) than drop packets. Intrusion detection systems and proxies,
> for instance. These boxes are actually likely to have RPS enabled and
> RFS disabled.
>
>> With respect to the examples given, what happens when it is TCP traffic
>> rather than UDP?
>
> That should be identical. RFS is supported for both protocols. In the
> test, it is turned off to demonstrate the effect solely with RPS.
Will it be identical with TCP? If anything, I would think causing
reordering of the TCP segments within flows would only further increase
the workload of the middlebox because it will increase the ACK rates.
Perhaps quite significantly if GRO was effective at the receivers before
the reordering started.
At least unless/until the reordering is bad enough to cause the sending
TCPs to fast retransmit and so throttle back. And unless we are talking
about being overloaded by massive herds of "mice" I'd think that the TCP
flows would be throttling back to what the single CPU in the middlebox
could handle.
rick
^ permalink raw reply
* Re: [PATCH net-next 1/1] vlan: restore offload use on vlan transmit
From: Ben Hutchings @ 2012-12-06 23:43 UTC (permalink / raw)
To: Andrew Gallatin; +Cc: davem, netdev
In-Reply-To: <1354827296-12009-2-git-send-email-gallatin@myri.com>
On Thu, 2012-12-06 at 15:54 -0500, Andrew Gallatin wrote:
> This patch copies the vlan device's dev->features to its
> dev->vlan_features, which allows packets to arrive at
> vlan_dev_hard_start_xmit() with their offloads intact.
>
> When a packet destined for a vlan interface is transmitted, it passes
> through dev_hard_start_xmit() (and netif_skb_features()) twice. First
> on its way to vlan_dev_hard_start_xmit(), and then again on its way to
> the backing device's xmit handler. If the vlan device does not setup
> its dev->vlan_features, then netif_skb_features() will strip the
> features on the first trip through it (on the way to
> vlan_dev_hard_start_xmit()).
>
> Signed-off-by: Andrew Gallatin <gallatin@myri.com>
> ---
> net/8021q/vlan_dev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 4a6d31a..9d4b3c9 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -559,6 +559,7 @@ static int vlan_dev_init(struct net_device *dev)
>
> dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
> dev->gso_max_size = real_dev->gso_max_size;
> + dev->vlan_features = dev->features;
To repeat myself: no, this will result in the features being transferred
to VLAN devices stacked on top of this one (to an arbitrary depth!).
Ben.
> /* ipv6 shared card related stuff */
> dev->dev_id = real_dev->dev_id;
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH net-next 0/1] fix vlan transmit performance
From: Ben Hutchings @ 2012-12-06 23:42 UTC (permalink / raw)
To: Andrew Gallatin; +Cc: davem, netdev
In-Reply-To: <1354827296-12009-1-git-send-email-gallatin@myri.com>
On Thu, 2012-12-06 at 15:54 -0500, Andrew Gallatin wrote:
> Hi,
>
> When doing some 10GbE perf measurments on very old athlon64
> machines with myri10ge, I noticed that I was seeing CPU saturation
> when transmitting vlan tagged traffic. I think I traced the
> problem to this line in netif_skb_features():
>
> features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
>
> The problem seems to be that packets travel through this function
> twice, first on their way to the vlan xmit handler, and then on
> their way to the backing device's xmit handler. On the first
> pass, "skb->dev" is the vlan device, and skb->dev->vlan_features
> is blank. This causes netif_skb_features() to strip the offloads
> away.
On the first pass through dev_hard_start_xmit(), we should have:
if (protocol == htons(ETH_P_8021Q)) { // false
...
} else if (!vlan_tx_tag_present(skb)) { // true
return harmonize_features(skb, protocol, features);
}
// not executed
features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX);
...
Then the VLAN tag gets inserted in vlan_dev_hard_start_xmit(), and for
the second pass we used the vlan_features of the underlying device.
However, when reorder_hdr is off and the underlying device doesn't have
NETIF_F_VLAN_TX, the VLAN tag is inserted before the first pass, in
vlan_dev_hard_header(). Then, as you've seen, all TX offload features
get disabled. (Prior to Linux 2.6.37 this configuration was
*completely* broken as the TX path didn't make consistent decisions
about whether offload features could be used.)
My answer would be: leave reorder_hdr enabled per default. In fact,
perhaps the VLAN driver's TX path should ignore it if the underlying
device has non-zero vlan_features. (It's already ignored if the
underlying device has NETIF_F_VLAN_TX.)
> The following patch (just copy dev->features to dev->vlan_features in
> vlan_dev_init()) seems to be the simplest way to fix it. Perhaps this
> is wrong, and there is a better way?
[...]
It's wrong, because those features would then be recursively transferred
to further stacked VLAN devices.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* RE: [net-next 6/8] bna: Add Stats Clear Counter
From: Rasesh Mody @ 2012-12-06 23:23 UTC (permalink / raw)
To: Ben Hutchings
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Adapter Linux Open SRC Team
In-Reply-To: <1354827275.2828.37.camel@bwh-desktop.uk.solarflarecom.com>
>From: Ben Hutchings [mailto:bhutchings@solarflare.com]
>Sent: Thursday, December 06, 2012 12:55 PM
>
>On Thu, 2012-12-06 at 12:34 -0800, Rasesh Mody wrote:
>> >From: Ben Hutchings [mailto:bhutchings@solarflare.com]
>> >Sent: Wednesday, December 05, 2012 6:20 PM
>> >Subject: Re: [net-next 6/8] bna: Add Stats Clear Counter
>> >
>> >On Wed, 2012-12-05 at 15:01 -0800, Rasesh Mody wrote:
>> >> Added Stats clear counter to the bfi_enet_stats_mac structure and
>> >> ethtool stats
>> >>
>> >> Signed-off-by: Rasesh Mody <rmody@brocade.com>
>> >
>> >Since this structure appears to be part of the firmware interface,
>> >you should combine this (and any other interface changes) with the
>> >change to the requested firmware version (7/8).
>>
>> Ben,
>>
>> Thanks for the feedback. Yes, bfi_enet_stats_mac is a part of firmware
>> interface update.
>>
>> In future submission, I will plan to take care of combining such
>> firmware interface updates/changes and the firmware request version
>> change into single patch. Please let me know if you think it is
>> required for this patch set.
>
>That's not my decision.
I have resubmitted the patch set to address you feedback.
Thanks,
Rasesh
^ permalink raw reply
* [net-next 7/7] bna: Driver Version Updated to 3.1.2.1
From: Rasesh Mody @ 2012-12-06 23:17 UTC (permalink / raw)
To: davem, netdev; +Cc: bhutchings, adapter_linux_open_src_team, Rasesh Mody
In-Reply-To: <1354835868-27016-1-git-send-email-rmody@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
drivers/net/ethernet/brocade/bna/bnad.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index 134d534..72ba586 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -71,7 +71,7 @@ struct bnad_rx_ctrl {
#define BNAD_NAME "bna"
#define BNAD_NAME_LEN 64
-#define BNAD_VERSION "3.0.23.0"
+#define BNAD_VERSION "3.1.2.1"
#define BNAD_MAILBOX_MSIX_INDEX 0
#define BNAD_MAILBOX_MSIX_VECTORS 1
--
1.7.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox