From a24006ed12616bde1bbdb26868495906a212d8dc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 31 Oct 2012 15:33:52 +0000 Subject: ptp: Enable clock drivers along with associated net/PHY drivers Where a PTP clock driver is associated with a net or PHY driver, it should be enabled automatically whenever that driver is enabled. Therefore: - Make PTP clock drivers select rather than depending on PTP_1588_CLOCK - Remove separate boolean options for PTP clock drivers that are built as part of net driver modules. (This also fixes cases where the PTP subsystem is wrongly forced to be built-in.) - Set 'default y' for PTP clock drivers that depend on specific net drivers but are built separately Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/ethernet/sfc/Kconfig | 7 ------- drivers/net/ethernet/sfc/Makefile | 3 +-- drivers/net/ethernet/sfc/net_driver.h | 2 -- drivers/net/ethernet/sfc/nic.h | 26 -------------------------- 4 files changed, 1 insertion(+), 37 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig index 25906c1d1b15..fb3cbc27063c 100644 --- a/drivers/net/ethernet/sfc/Kconfig +++ b/drivers/net/ethernet/sfc/Kconfig @@ -34,10 +34,3 @@ config SFC_SRIOV This enables support for the SFC9000 I/O Virtualization features, allowing accelerated network performance in virtualized environments. -config SFC_PTP - bool "Solarflare SFC9000-family PTP support" - depends on SFC && PTP_1588_CLOCK && !(SFC=y && PTP_1588_CLOCK=m) - default y - ---help--- - This enables support for the Precision Time Protocol (PTP) - on SFC9000-family NICs diff --git a/drivers/net/ethernet/sfc/Makefile b/drivers/net/ethernet/sfc/Makefile index e11f2ecf69d9..945bf06e69ef 100644 --- a/drivers/net/ethernet/sfc/Makefile +++ b/drivers/net/ethernet/sfc/Makefile @@ -2,9 +2,8 @@ sfc-y += efx.o nic.o falcon.o siena.o tx.o rx.o filter.o \ falcon_xmac.o mcdi_mac.o \ selftest.o ethtool.o qt202x_phy.o mdio_10g.o \ tenxpress.o txc43128_phy.o falcon_boards.o \ - mcdi.o mcdi_phy.o mcdi_mon.o + mcdi.o mcdi_phy.o mcdi_mon.o ptp.o sfc-$(CONFIG_SFC_MTD) += mtd.o sfc-$(CONFIG_SFC_SRIOV) += siena_sriov.o -sfc-$(CONFIG_SFC_PTP) += ptp.o obj-$(CONFIG_SFC) += sfc.o diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index 576a31091165..2487f582ab04 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -868,9 +868,7 @@ struct efx_nic { struct work_struct peer_work; #endif -#ifdef CONFIG_SFC_PTP struct efx_ptp_data *ptp_data; -#endif /* The following fields may be written more often */ diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index 438cef11f727..7a9647a3c565 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h @@ -252,7 +252,6 @@ extern int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf, bool spoofchk); struct ethtool_ts_info; -#ifdef CONFIG_SFC_PTP extern void efx_ptp_probe(struct efx_nic *efx); extern int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd); extern int efx_ptp_get_ts_info(struct net_device *net_dev, @@ -260,31 +259,6 @@ extern int efx_ptp_get_ts_info(struct net_device *net_dev, extern bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); extern int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); extern void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev); -#else -static inline void efx_ptp_probe(struct efx_nic *efx) {} -static inline int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd) -{ - return -EOPNOTSUPP; -} -static inline int efx_ptp_get_ts_info(struct net_device *net_dev, - struct ethtool_ts_info *ts_info) -{ - ts_info->so_timestamping = (SOF_TIMESTAMPING_SOFTWARE | - SOF_TIMESTAMPING_RX_SOFTWARE); - ts_info->phc_index = -1; - - return 0; -} -static inline bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb) -{ - return false; -} -static inline int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb) -{ - return NETDEV_TX_OK; -} -static inline void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev) {} -#endif extern const struct efx_nic_type falcon_a1_nic_type; extern const struct efx_nic_type falcon_b0_nic_type; -- cgit v1.2.3 From 3ba368c43565f31528b3aea585bb4119fded4eb1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 1 Nov 2012 11:22:22 +0000 Subject: sfc: Select PTP_1588_CLOCK This was missed in commit a24006ed12616bde1bbdb26868495906a212d8dc ('ptp: Enable clock drivers along with associated net/PHY drivers') which enabled sfc's clock driver unconditionally. Reported-by: kbuild test robot Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/ethernet/sfc/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig index fb3cbc27063c..3ab2c4289a47 100644 --- a/drivers/net/ethernet/sfc/Kconfig +++ b/drivers/net/ethernet/sfc/Kconfig @@ -5,6 +5,7 @@ config SFC select CRC32 select I2C select I2C_ALGOBIT + select PTP_1588_CLOCK ---help--- This driver supports 10-gigabit Ethernet cards based on the Solarflare SFC4000 and SFC9000-family controllers. -- cgit v1.2.3 From ff33c0e1885cda44dd14c79f70df4706f83582a0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 16 Nov 2012 12:47:39 +0000 Subject: net: Remove bogus dependencies on INET Various drivers depend on INET because they used to select INET_LRO, but they have all been converted to use GRO which has no such dependency. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/ethernet/chelsio/Kconfig | 4 ++-- drivers/net/ethernet/cisco/Kconfig | 2 +- drivers/net/ethernet/cisco/enic/Kconfig | 2 +- drivers/net/ethernet/emulex/Kconfig | 2 +- drivers/net/ethernet/emulex/benet/Kconfig | 2 +- drivers/net/ethernet/intel/Kconfig | 2 +- drivers/net/ethernet/mellanox/Kconfig | 2 +- drivers/net/ethernet/neterion/Kconfig | 2 +- drivers/net/ethernet/sfc/Kconfig | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig index 2de50f95798f..a71c0f317a93 100644 --- a/drivers/net/ethernet/chelsio/Kconfig +++ b/drivers/net/ethernet/chelsio/Kconfig @@ -5,7 +5,7 @@ config NET_VENDOR_CHELSIO bool "Chelsio devices" default y - depends on PCI || INET + depends on PCI ---help--- If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from @@ -48,7 +48,7 @@ config CHELSIO_T1_1G config CHELSIO_T3 tristate "Chelsio Communications T3 10Gb Ethernet support" - depends on PCI && INET + depends on PCI select FW_LOADER select MDIO ---help--- diff --git a/drivers/net/ethernet/cisco/Kconfig b/drivers/net/ethernet/cisco/Kconfig index 94606f7ee13a..1c7b884e3371 100644 --- a/drivers/net/ethernet/cisco/Kconfig +++ b/drivers/net/ethernet/cisco/Kconfig @@ -5,7 +5,7 @@ config NET_VENDOR_CISCO bool "Cisco devices" default y - depends on PCI && INET + depends on PCI ---help--- If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from diff --git a/drivers/net/ethernet/cisco/enic/Kconfig b/drivers/net/ethernet/cisco/enic/Kconfig index 9cc706a6cffd..b63f8d8a4261 100644 --- a/drivers/net/ethernet/cisco/enic/Kconfig +++ b/drivers/net/ethernet/cisco/enic/Kconfig @@ -4,6 +4,6 @@ config ENIC tristate "Cisco VIC Ethernet NIC Support" - depends on PCI && INET + depends on PCI ---help--- This enables the support for the Cisco VIC Ethernet card. diff --git a/drivers/net/ethernet/emulex/Kconfig b/drivers/net/ethernet/emulex/Kconfig index 7a28a6433944..1b8d638c6cb1 100644 --- a/drivers/net/ethernet/emulex/Kconfig +++ b/drivers/net/ethernet/emulex/Kconfig @@ -5,7 +5,7 @@ config NET_VENDOR_EMULEX bool "Emulex devices" default y - depends on PCI && INET + depends on PCI ---help--- If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from diff --git a/drivers/net/ethernet/emulex/benet/Kconfig b/drivers/net/ethernet/emulex/benet/Kconfig index 804db04a2bd0..231129dd1764 100644 --- a/drivers/net/ethernet/emulex/benet/Kconfig +++ b/drivers/net/ethernet/emulex/benet/Kconfig @@ -1,6 +1,6 @@ config BE2NET tristate "ServerEngines' 10Gbps NIC - BladeEngine" - depends on PCI && INET + depends on PCI ---help--- This driver implements the NIC functionality for ServerEngines' 10Gbps network adapter - BladeEngine. diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 73d28d51b5d9..ddee4060948a 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig @@ -166,7 +166,7 @@ config IXGB config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" - depends on PCI && INET + depends on PCI select MDIO select PTP_1588_CLOCK ---help--- diff --git a/drivers/net/ethernet/mellanox/Kconfig b/drivers/net/ethernet/mellanox/Kconfig index d8099a7903d3..bcdbc14aeff0 100644 --- a/drivers/net/ethernet/mellanox/Kconfig +++ b/drivers/net/ethernet/mellanox/Kconfig @@ -5,7 +5,7 @@ config NET_VENDOR_MELLANOX bool "Mellanox devices" default y - depends on PCI && INET + depends on PCI ---help--- If you have a network (Ethernet) card belonging to this class, say Y and read the Ethernet-HOWTO, available from diff --git a/drivers/net/ethernet/neterion/Kconfig b/drivers/net/ethernet/neterion/Kconfig index ff26b54bd3fb..87abb4f10c43 100644 --- a/drivers/net/ethernet/neterion/Kconfig +++ b/drivers/net/ethernet/neterion/Kconfig @@ -32,7 +32,7 @@ config S2IO config VXGE tristate "Exar X3100 Series 10GbE PCIe Server Adapter" - depends on PCI && INET + depends on PCI ---help--- This driver supports Exar Corp's X3100 Series 10 GbE PCIe I/O Virtualized Server Adapter. diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig index 3ab2c4289a47..435b4f1e3488 100644 --- a/drivers/net/ethernet/sfc/Kconfig +++ b/drivers/net/ethernet/sfc/Kconfig @@ -1,6 +1,6 @@ config SFC tristate "Solarflare SFC4000/SFC9000-family support" - depends on PCI && INET + depends on PCI select MDIO select CRC32 select I2C -- cgit v1.2.3 From 0e0c3408a5414d4e1f8ca7fadcb513c13bd747e8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 6 Sep 2012 02:11:04 +0100 Subject: sfc: Fix byte order warnings for ethtool RX filter interface sparse has got a bit more picky since I last ran it over this. Add forced casts for use of ~0 as a big-endian value. Undo the pointless optimisation of parameter validation with '|'; using '||' avoids these warnings. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/ethtool.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c index 90f078eff8e6..8e61cd06f66a 100644 --- a/drivers/net/ethernet/sfc/ethtool.c +++ b/drivers/net/ethernet/sfc/ethtool.c @@ -816,6 +816,9 @@ static int efx_ethtool_reset(struct net_device *net_dev, u32 *flags) /* MAC address mask including only MC flag */ static const u8 mac_addr_mc_mask[ETH_ALEN] = { 0x01, 0, 0, 0, 0, 0 }; +#define IP4_ADDR_FULL_MASK ((__force __be32)~0) +#define PORT_FULL_MASK ((__force __be16)~0) + static int efx_ethtool_get_class_rule(struct efx_nic *efx, struct ethtool_rx_flow_spec *rule) { @@ -865,12 +868,12 @@ static int efx_ethtool_get_class_rule(struct efx_nic *efx, &spec, &proto, &ip_entry->ip4dst, &ip_entry->pdst, &ip_entry->ip4src, &ip_entry->psrc); EFX_WARN_ON_PARANOID(rc); - ip_mask->ip4src = ~0; - ip_mask->psrc = ~0; + ip_mask->ip4src = IP4_ADDR_FULL_MASK; + ip_mask->psrc = PORT_FULL_MASK; } rule->flow_type = (proto == IPPROTO_TCP) ? TCP_V4_FLOW : UDP_V4_FLOW; - ip_mask->ip4dst = ~0; - ip_mask->pdst = ~0; + ip_mask->ip4dst = IP4_ADDR_FULL_MASK; + ip_mask->pdst = PORT_FULL_MASK; return rc; } @@ -971,7 +974,7 @@ static int efx_ethtool_set_class_rule(struct efx_nic *efx, /* Check for unsupported extensions */ if ((rule->flow_type & FLOW_EXT) && - (rule->m_ext.vlan_etype | rule->m_ext.data[0] | + (rule->m_ext.vlan_etype || rule->m_ext.data[0] || rule->m_ext.data[1])) return -EINVAL; @@ -986,16 +989,16 @@ static int efx_ethtool_set_class_rule(struct efx_nic *efx, IPPROTO_TCP : IPPROTO_UDP); /* Must match all of destination, */ - if ((__force u32)~ip_mask->ip4dst | - (__force u16)~ip_mask->pdst) + if (!(ip_mask->ip4dst == IP4_ADDR_FULL_MASK && + ip_mask->pdst == PORT_FULL_MASK)) return -EINVAL; /* all or none of source, */ - if ((ip_mask->ip4src | ip_mask->psrc) && - ((__force u32)~ip_mask->ip4src | - (__force u16)~ip_mask->psrc)) + if ((ip_mask->ip4src || ip_mask->psrc) && + !(ip_mask->ip4src == IP4_ADDR_FULL_MASK && + ip_mask->psrc == PORT_FULL_MASK)) return -EINVAL; /* and nothing else */ - if (ip_mask->tos | rule->m_ext.vlan_tci) + if (ip_mask->tos || rule->m_ext.vlan_tci) return -EINVAL; if (ip_mask->ip4src) -- cgit v1.2.3 From 3f978ef36cca9bb10c88a56baec1d9d1cb072b98 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 6 Sep 2012 02:11:06 +0100 Subject: sfc: Fix byte order warning in self-test Add necessary cast when setting a bogus checksum. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index ce72ae4f399f..f6651d35d615 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -373,7 +373,7 @@ static void efx_iterate_state(struct efx_nic *efx) /* saddr set later and used as incrementing count */ payload->ip.daddr = htonl(INADDR_LOOPBACK); payload->ip.ihl = 5; - payload->ip.check = htons(0xdead); + payload->ip.check = (__force __sum16) htons(0xdead); payload->ip.tot_len = htons(sizeof(*payload) - sizeof(struct ethhdr)); payload->ip.version = IPVERSION; payload->ip.protocol = IPPROTO_UDP; -- cgit v1.2.3 From d5e8cc6c946e0857826dcfbb3585068858445bfe Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 6 Sep 2012 16:52:31 +0100 Subject: sfc: Really disable flow control while flushing Receiving pause frames can block TX queue flushes. Earlier changes work around this by reconfiguring the MAC during flushes for VFs, but during flushes for the PF we would only change the fc_disable counter. Unless the MAC is reconfigured for some other reason during the flush (which I would not expect to happen) this had no effect at all. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/falcon.c | 2 ++ drivers/net/ethernet/sfc/net_driver.h | 2 ++ drivers/net/ethernet/sfc/nic.c | 3 +-- drivers/net/ethernet/sfc/nic.h | 2 ++ drivers/net/ethernet/sfc/siena.c | 15 ++++++++++++++- drivers/net/ethernet/sfc/siena_sriov.c | 6 ++---- 6 files changed, 23 insertions(+), 7 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c index 12b573a8e82b..49bcd196e10d 100644 --- a/drivers/net/ethernet/sfc/falcon.c +++ b/drivers/net/ethernet/sfc/falcon.c @@ -1792,6 +1792,7 @@ const struct efx_nic_type falcon_a1_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats, @@ -1834,6 +1835,7 @@ const struct efx_nic_type falcon_b0_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats, diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index 2487f582ab04..1014556df0e7 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -907,6 +907,7 @@ static inline unsigned int efx_port_num(struct efx_nic *efx) * @remove_port: Free resources allocated by probe_port() * @handle_global_event: Handle a "global" event (may be %NULL) * @prepare_flush: Prepare the hardware for flushing the DMA queues + * @finish_flush: Clean up after flushing the DMA queues * @update_stats: Update statistics not provided by event handling * @start_stats: Start the regular fetching of statistics * @stop_stats: Stop the regular fetching of statistics @@ -954,6 +955,7 @@ struct efx_nic_type { void (*remove_port)(struct efx_nic *efx); bool (*handle_global_event)(struct efx_channel *channel, efx_qword_t *); void (*prepare_flush)(struct efx_nic *efx); + void (*finish_flush)(struct efx_nic *efx); void (*update_stats)(struct efx_nic *efx); void (*start_stats)(struct efx_nic *efx); void (*stop_stats)(struct efx_nic *efx); diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index aab7cacb2e34..e10b7ec046c3 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -680,7 +680,6 @@ int efx_nic_flush_queues(struct efx_nic *efx) struct efx_tx_queue *tx_queue; int rc = 0; - efx->fc_disable++; efx->type->prepare_flush(efx); efx_for_each_channel(channel, efx) { @@ -742,7 +741,7 @@ int efx_nic_flush_queues(struct efx_nic *efx) atomic_set(&efx->rxq_flush_outstanding, 0); } - efx->fc_disable--; + efx->type->finish_flush(efx); return rc; } diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index 7a9647a3c565..1b0003323498 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h @@ -344,6 +344,8 @@ static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx) /* Global Resources */ extern int efx_nic_flush_queues(struct efx_nic *efx); +extern void siena_prepare_flush(struct efx_nic *efx); +extern void siena_finish_flush(struct efx_nic *efx); extern void falcon_start_nic_stats(struct efx_nic *efx); extern void falcon_stop_nic_stats(struct efx_nic *efx); extern void falcon_setup_xaui(struct efx_nic *efx); diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c index 84b41bf08a38..3553d77a3fdc 100644 --- a/drivers/net/ethernet/sfc/siena.c +++ b/drivers/net/ethernet/sfc/siena.c @@ -127,6 +127,18 @@ static void siena_remove_port(struct efx_nic *efx) efx_nic_free_buffer(efx, &efx->stats_buffer); } +void siena_prepare_flush(struct efx_nic *efx) +{ + if (efx->fc_disable++ == 0) + efx_mcdi_set_mac(efx); +} + +void siena_finish_flush(struct efx_nic *efx) +{ + if (--efx->fc_disable == 0) + efx_mcdi_set_mac(efx); +} + static const struct efx_nic_register_test siena_register_tests[] = { { FR_AZ_ADR_REGION, EFX_OWORD32(0x0003FFFF, 0x0003FFFF, 0x0003FFFF, 0x0003FFFF) }, @@ -659,7 +671,8 @@ const struct efx_nic_type siena_a0_nic_type = { .reset = siena_reset_hw, .probe_port = siena_probe_port, .remove_port = siena_remove_port, - .prepare_flush = efx_port_dummy_op_void, + .prepare_flush = siena_prepare_flush, + .finish_flush = siena_finish_flush, .update_stats = siena_update_nic_stats, .start_stats = siena_start_nic_stats, .stop_stats = siena_stop_nic_stats, diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index d49b53dc2a50..6e62a018ea32 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c @@ -695,8 +695,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) return VFDI_RC_ENOMEM; rtnl_lock(); - if (efx->fc_disable++ == 0) - efx_mcdi_set_mac(efx); + siena_prepare_flush(efx); rtnl_unlock(); /* Flush all the initialized queues */ @@ -733,8 +732,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) } rtnl_lock(); - if (--efx->fc_disable == 0) - efx_mcdi_set_mac(efx); + siena_finish_flush(efx); rtnl_unlock(); /* Irrespective of success/failure, fini the queues */ -- cgit v1.2.3 From b8e0251730775cc970d2453dedd454b8ae071dd9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 6 Sep 2012 23:54:15 +0100 Subject: sfc: Delete redundant page_addr variable from efx_init_rx_buffers_page() Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/rx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c index 9e0ad1b75c33..d780a0d096b4 100644 --- a/drivers/net/ethernet/sfc/rx.c +++ b/drivers/net/ethernet/sfc/rx.c @@ -187,7 +187,6 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue) struct efx_nic *efx = rx_queue->efx; struct efx_rx_buffer *rx_buf; struct page *page; - void *page_addr; struct efx_rx_page_state *state; dma_addr_t dma_addr; unsigned index, count; @@ -207,12 +206,10 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue) __free_pages(page, efx->rx_buffer_order); return -EIO; } - page_addr = page_address(page); - state = page_addr; + state = page_address(page); state->refcnt = 0; state->dma_addr = dma_addr; - page_addr += sizeof(struct efx_rx_page_state); dma_addr += sizeof(struct efx_rx_page_state); split: @@ -230,7 +227,6 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue) /* Use the second half of the page */ get_page(page); dma_addr += (PAGE_SIZE >> 1); - page_addr += (PAGE_SIZE >> 1); ++count; goto split; } -- cgit v1.2.3 From bbec969b7f57a6ab5683145b99da869f99080e2a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 11 Sep 2012 18:25:13 +0100 Subject: sfc: Fix check for failure of MC_CMD_FLUSH_RX_QUEUES efx_mcdi_rpc_start() returns a negative value on error or zero on success. However one caller that can't properly handle failure then does WARN_ON(rc > 0). Change it to WARN_ON(rc < 0). Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/mcdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index aea43cbd0520..e1967fbad161 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -1216,7 +1216,7 @@ int efx_mcdi_flush_rxqs(struct efx_nic *efx) rc = efx_mcdi_rpc(efx, MC_CMD_FLUSH_RX_QUEUES, (u8 *)qid, count * sizeof(*qid), NULL, 0, NULL); - WARN_ON(rc > 0); + WARN_ON(rc < 0); kfree(qid); -- cgit v1.2.3 From 778cdaf639e34288c298f1d3d3503d0724ceabc7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 18 Sep 2012 01:56:50 +0100 Subject: sfc: Remove confusing MMIO functions efx_writed_table() uses a step of 16 bytes but efx_readd_table() uses a step of 4 bytes. Why are they different? Firstly, register access is asymmetric: - The EVQ_RPTR table and RX_INDIRECTION_TBL can (or must?) be written as dwords even though they have a step size of 16 bytes, unlike most other CSRs. - In general, a read of any width is valid for registers, so long as it does not cross register boundaries. There is also no latching behaviour in the BIU, contrary to rumour. We write to the EVQ_RPTR table with efx_writed_table() but never read it back as it's write-only. We write to the RX_INDIRECTION_TBL with efx_writed_table(), but only read it back for the register dump, where we use efx_reado_table() as for any other table with step size of 16. We read MC_TREG_SMEM with efx_readd_table() for the register dump, but normally read and write it with efx_readd() and efx_writed() using offsets calculated in bytes. Since these functions are trivial and have few callers, it's clearer to open-code them at the call sites. While we're at it, update the comments on the BIU behaviour again. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/io.h | 43 +++++++++++----------------------- drivers/net/ethernet/sfc/nic.c | 19 ++++++++++----- drivers/net/ethernet/sfc/siena_sriov.c | 2 +- 3 files changed, 28 insertions(+), 36 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h index 751d1ec112cc..96759aee1c6c 100644 --- a/drivers/net/ethernet/sfc/io.h +++ b/drivers/net/ethernet/sfc/io.h @@ -22,22 +22,21 @@ * * Notes on locking strategy: * - * Most CSRs are 128-bit (oword) and therefore cannot be read or - * written atomically. Access from the host is buffered by the Bus - * Interface Unit (BIU). Whenever the host reads from the lowest - * address of such a register, or from the address of a different such - * register, the BIU latches the register's value. Subsequent reads - * from higher addresses of the same register will read the latched - * value. Whenever the host writes part of such a register, the BIU - * collects the written value and does not write to the underlying - * register until all 4 dwords have been written. A similar buffering - * scheme applies to host access to the NIC's 64-bit SRAM. + * Many CSRs are very wide and cannot be read or written atomically. + * Writes from the host are buffered by the Bus Interface Unit (BIU) + * up to 128 bits. Whenever the host writes part of such a register, + * the BIU collects the written value and does not write to the + * underlying register until all 4 dwords have been written. A + * similar buffering scheme applies to host access to the NIC's 64-bit + * SRAM. * - * Access to different CSRs and 64-bit SRAM words must be serialised, - * since interleaved access can result in lost writes or lost - * information from read-to-clear fields. We use efx_nic::biu_lock - * for this. (We could use separate locks for read and write, but - * this is not normally a performance bottleneck.) + * Writes to different CSRs and 64-bit SRAM words must be serialised, + * since interleaved access can result in lost writes. We use + * efx_nic::biu_lock for this. + * + * We also serialise reads from 128-bit CSRs and SRAM with the same + * spinlock. This may not be necessary, but it doesn't really matter + * as there are no such reads on the fast path. * * The DMA descriptor pointers (RX_DESC_UPD and TX_DESC_UPD) are * 128-bit but are special-cased in the BIU to avoid the need for @@ -204,20 +203,6 @@ static inline void efx_reado_table(struct efx_nic *efx, efx_oword_t *value, efx_reado(efx, value, reg + index * sizeof(efx_oword_t)); } -/* Write a 32-bit CSR forming part of a table, or 32-bit SRAM */ -static inline void efx_writed_table(struct efx_nic *efx, efx_dword_t *value, - unsigned int reg, unsigned int index) -{ - efx_writed(efx, value, reg + index * sizeof(efx_oword_t)); -} - -/* Read a 32-bit CSR forming part of a table, or 32-bit SRAM */ -static inline void efx_readd_table(struct efx_nic *efx, efx_dword_t *value, - unsigned int reg, unsigned int index) -{ - efx_readd(efx, value, reg + index * sizeof(efx_dword_t)); -} - /* Page-mapped register block size */ #define EFX_PAGE_BLOCK_SIZE 0x2000 diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index e10b7ec046c3..368659d6362a 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -765,8 +765,13 @@ void efx_nic_eventq_read_ack(struct efx_channel *channel) EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr & channel->eventq_mask); - efx_writed_table(efx, ®, efx->type->evq_rptr_tbl_base, - channel->channel); + + /* For Falcon A1, EVQ_RPTR_KER is documented as having a step size + * of 4 bytes, but it is really 16 bytes just like later revisions. + */ + efx_writed(efx, ®, + efx->type->evq_rptr_tbl_base + + FR_BZ_EVQ_RPTR_STEP * channel->channel); } /* Use HW to insert a SW defined event */ @@ -1564,7 +1569,9 @@ void efx_nic_push_rx_indir_table(struct efx_nic *efx) for (i = 0; i < FR_BZ_RX_INDIRECTION_TBL_ROWS; i++) { EFX_POPULATE_DWORD_1(dword, FRF_BZ_IT_QUEUE, efx->rx_indir_table[i]); - efx_writed_table(efx, &dword, FR_BZ_RX_INDIRECTION_TBL, i); + efx_writed(efx, &dword, + FR_BZ_RX_INDIRECTION_TBL + + FR_BZ_RX_INDIRECTION_TBL_STEP * i); } } @@ -2028,15 +2035,15 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) for (i = 0; i < table->rows; i++) { switch (table->step) { - case 4: /* 32-bit register or SRAM */ - efx_readd_table(efx, buf, table->offset, i); + case 4: /* 32-bit SRAM */ + efx_readd(efx, buf, table->offset + 4 * i); break; case 8: /* 64-bit SRAM */ efx_sram_readq(efx, efx->membase + table->offset, buf, i); break; - case 16: /* 128-bit register */ + case 16: /* 128-bit-readable register */ efx_reado_table(efx, buf, table->offset, i); break; case 32: /* 128-bit register, interleaved */ diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index 6e62a018ea32..90f8d1604f5f 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c @@ -993,7 +993,7 @@ static void efx_sriov_reset_vf(struct efx_vf *vf, struct efx_buffer *buffer) FRF_AZ_EVQ_BUF_BASE_ID, buftbl); efx_writeo_table(efx, ®, FR_BZ_EVQ_PTR_TBL, abs_evq); EFX_POPULATE_DWORD_1(ptr, FRF_AZ_EVQ_RPTR, 0); - efx_writed_table(efx, &ptr, FR_BZ_EVQ_RPTR, abs_evq); + efx_writed(efx, &ptr, FR_BZ_EVQ_RPTR + FR_BZ_EVQ_RPTR_STEP * abs_evq); mutex_unlock(&vf->status_lock); } -- cgit v1.2.3 From ef492f11efed9a6a1686bf914fb74468df59385c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 1 Dec 2012 01:55:27 +0000 Subject: sfc: Correctly initialise reset_method in siena_test_chip() Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/siena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c index 3553d77a3fdc..ba40f67e4f05 100644 --- a/drivers/net/ethernet/sfc/siena.c +++ b/drivers/net/ethernet/sfc/siena.c @@ -170,7 +170,7 @@ static const struct efx_nic_register_test siena_register_tests[] = { static int siena_test_chip(struct efx_nic *efx, struct efx_self_tests *tests) { - enum reset_type reset_method = reset_method; + enum reset_type reset_method = RESET_TYPE_ALL; int rc, rc2; efx_reset_down(efx, reset_method); -- cgit v1.2.3 From c3771a35bebeea16c4fd94d1116010cc02b1f75e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 19 Sep 2012 00:31:18 +0100 Subject: sfc: Do not initialise buffer in efx_alloc_special_buffer() Currently we initialise the newly allocated buffer to all-1s, which is important for event queues but not for descriptor queues. And since we also do that in efx_nic_init_eventq(), it is completely pointless to do it here. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/nic.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index 368659d6362a..1327f29d086f 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -255,9 +255,6 @@ static int efx_alloc_special_buffer(struct efx_nic *efx, buffer->entries = len / EFX_BUF_SIZE; BUG_ON(buffer->dma_addr & (EFX_BUF_SIZE - 1)); - /* All zeros is a potentially valid event so memset to 0xff */ - memset(buffer->addr, 0xff, len); - /* Select new buffer ID */ buffer->index = efx->next_buffer_table; efx->next_buffer_table += buffer->entries; -- cgit v1.2.3 From 876be083b669c43203c0ee8709d749896e1d8d60 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 1 Oct 2012 20:58:35 +0100 Subject: sfc: Reset driver's MAC stats after MC reboot seen If the MC reboots then the stats it reports to us will have been reset. We need to reset ours to get efx_update_diff_stat() working properly. (Ideally we would maintain stats across the reboot, but as this should only happen immediately after a firmware upgrade it's not really worth the trouble.) Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/mcdi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index e1967fbad161..3ef71a0f99a8 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -207,7 +207,9 @@ out: return 0; } -/* Test and clear MC-rebooted flag for this port/function */ +/* Test and clear MC-rebooted flag for this port/function; reset + * software state as necessary. + */ int efx_mcdi_poll_reboot(struct efx_nic *efx) { unsigned int addr = FR_CZ_MC_TREG_SMEM + MCDI_STATUS(efx); @@ -223,6 +225,11 @@ int efx_mcdi_poll_reboot(struct efx_nic *efx) if (value == 0) return 0; + /* MAC statistics have been cleared on the NIC; clear our copy + * so that efx_update_diff_stat() can continue to work. + */ + memset(&efx->mac_stats, 0, sizeof(efx->mac_stats)); + EFX_ZERO_DWORD(reg); efx_writed(efx, ®, addr); -- cgit v1.2.3 From 525d9e824018cd7cc8d8d44832ddcd363abfe6e1 Mon Sep 17 00:00:00 2001 From: Daniel Pieczko Date: Tue, 2 Oct 2012 13:36:18 +0100 Subject: sfc: Work-around flush timeout when flushes have completed We sometimes hit a "failed to flush" timeout on some TX queues, but the flushes have completed and the flush completion events seem to go missing. In this case, we can check the TX_DESC_PTR_TBL register and drain the queues if the flushes had finished. [bwh: Minor fixes to coding style] Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/nic.c | 56 ++++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 4 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index 1014556df0e7..2d756c1d7142 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -200,6 +200,7 @@ struct efx_tx_queue { /* Members shared between paths and sometimes updated */ unsigned int empty_read_count ____cacheline_aligned_in_smp; #define EFX_EMPTY_COUNT_VALID 0x80000000 + atomic_t flush_outstanding; }; /** diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index 1327f29d086f..0ad790cc473c 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -73,6 +73,8 @@ _EFX_CHANNEL_MAGIC(_EFX_CHANNEL_MAGIC_TX_DRAIN, \ (_tx_queue)->queue) +static void efx_magic_event(struct efx_channel *channel, u32 magic); + /************************************************************************** * * Solarstorm hardware access @@ -491,6 +493,9 @@ static void efx_flush_tx_queue(struct efx_tx_queue *tx_queue) struct efx_nic *efx = tx_queue->efx; efx_oword_t tx_flush_descq; + WARN_ON(atomic_read(&tx_queue->flush_outstanding)); + atomic_set(&tx_queue->flush_outstanding, 1); + EFX_POPULATE_OWORD_2(tx_flush_descq, FRF_AZ_TX_FLUSH_DESCQ_CMD, 1, FRF_AZ_TX_FLUSH_DESCQ, tx_queue->queue); @@ -666,6 +671,47 @@ static bool efx_flush_wake(struct efx_nic *efx) && atomic_read(&efx->rxq_flush_pending) > 0)); } +static bool efx_check_tx_flush_complete(struct efx_nic *efx) +{ + bool i = true; + efx_oword_t txd_ptr_tbl; + struct efx_channel *channel; + struct efx_tx_queue *tx_queue; + + efx_for_each_channel(channel, efx) { + efx_for_each_channel_tx_queue(tx_queue, channel) { + efx_reado_table(efx, &txd_ptr_tbl, + FR_BZ_TX_DESC_PTR_TBL, tx_queue->queue); + if (EFX_OWORD_FIELD(txd_ptr_tbl, + FRF_AZ_TX_DESCQ_FLUSH) || + EFX_OWORD_FIELD(txd_ptr_tbl, + FRF_AZ_TX_DESCQ_EN)) { + netif_dbg(efx, hw, efx->net_dev, + "flush did not complete on TXQ %d\n", + tx_queue->queue); + i = false; + } else if (atomic_cmpxchg(&tx_queue->flush_outstanding, + 1, 0)) { + /* The flush is complete, but we didn't + * receive a flush completion event + */ + netif_dbg(efx, hw, efx->net_dev, + "flush complete on TXQ %d, so drain " + "the queue\n", tx_queue->queue); + /* Don't need to increment drain_pending as it + * has already been incremented for the queues + * which did not drain + */ + efx_magic_event(channel, + EFX_CHANNEL_MAGIC_TX_DRAIN( + tx_queue)); + } + } + } + + return i; +} + /* Flush all the transmit queues, and continue flushing receive queues until * they're all flushed. Wait for the DRAIN events to be recieved so that there * are no more RX and TX events left on any channel. */ @@ -726,7 +772,8 @@ int efx_nic_flush_queues(struct efx_nic *efx) timeout); } - if (atomic_read(&efx->drain_pending)) { + if (atomic_read(&efx->drain_pending) && + !efx_check_tx_flush_complete(efx)) { netif_err(efx, hw, efx->net_dev, "failed to flush %d queues " "(rx %d+%d)\n", atomic_read(&efx->drain_pending), atomic_read(&efx->rxq_flush_outstanding), @@ -1018,9 +1065,10 @@ efx_handle_tx_flush_done(struct efx_nic *efx, efx_qword_t *event) if (qid < EFX_TXQ_TYPES * efx->n_tx_channels) { tx_queue = efx_get_tx_queue(efx, qid / EFX_TXQ_TYPES, qid % EFX_TXQ_TYPES); - - efx_magic_event(tx_queue->channel, - EFX_CHANNEL_MAGIC_TX_DRAIN(tx_queue)); + if (atomic_cmpxchg(&tx_queue->flush_outstanding, 1, 0)) { + efx_magic_event(tx_queue->channel, + EFX_CHANNEL_MAGIC_TX_DRAIN(tx_queue)); + } } } -- cgit v1.2.3 From c2f3b8e3a44b6fe9e36704e30157ebe1a88c08b1 Mon Sep 17 00:00:00 2001 From: Daniel Pieczko Date: Wed, 17 Oct 2012 13:21:23 +0100 Subject: sfc: lock TX queues when calling netif_device_detach() The assertion of netif_device_present() at the top of efx_hard_start_xmit() may fail if we don't do this. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/efx.c | 4 ++-- drivers/net/ethernet/sfc/efx.h | 13 +++++++++++++ drivers/net/ethernet/sfc/selftest.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 4f86d0cd516a..6f073d014ad3 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2279,7 +2279,7 @@ int efx_reset(struct efx_nic *efx, enum reset_type method) netif_info(efx, drv, efx->net_dev, "resetting (%s)\n", RESET_TYPE(method)); - netif_device_detach(efx->net_dev); + efx_device_detach_sync(efx); efx_reset_down(efx, method); rc = efx->type->reset(efx, method); @@ -2758,7 +2758,7 @@ static int efx_pm_freeze(struct device *dev) if (efx->state != STATE_DISABLED) { efx->state = STATE_UNINIT; - netif_device_detach(efx->net_dev); + efx_device_detach_sync(efx); efx_stop_all(efx); efx_stop_interrupts(efx, false); diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index f11170bc48bf..50247dfe8f57 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h @@ -163,4 +163,17 @@ extern void efx_link_status_changed(struct efx_nic *efx); extern void efx_link_set_advertising(struct efx_nic *efx, u32); extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); +static inline void efx_device_detach_sync(struct efx_nic *efx) +{ + struct net_device *dev = efx->net_dev; + + /* Lock/freeze all TX queues so that we can be sure the + * TX scheduler is stopped when we're done and before + * netif_device_present() becomes false. + */ + netif_tx_lock(dev); + netif_device_detach(dev); + netif_tx_unlock(dev); +} + #endif /* EFX_EFX_H */ diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index f6651d35d615..2069f51b2aa9 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -722,7 +722,7 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, /* Detach the device so the kernel doesn't transmit during the * loopback test and the watchdog timeout doesn't fire. */ - netif_device_detach(efx->net_dev); + efx_device_detach_sync(efx); if (efx->type->test_chip) { rc_reset = efx->type->test_chip(efx, tests); -- cgit v1.2.3 From ebf98e797b4e26ad52ace1511a0b503ee60a6cd4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 1 Dec 2012 02:21:17 +0000 Subject: sfc: Fix timekeeping in efx_mcdi_poll() efx_mcdi_poll() uses get_seconds() to read the current time and to implement a polling timeout. The use of this function was chosen partly because it could easily be replaced in a co-sim environment with a macro that read the simulated time. Unfortunately the real get_seconds() returns the system time (real time) which is subject to adjustment by e.g. ntpd. If the system time is adjusted forward during a polled MCDI operation, the effective timeout can be shorter than the intended 10 seconds, resulting in a spurious failure. It is also possible for a backward adjustment to delay detection of a areal failure. Use jiffies instead, and change MCDI_RPC_TIMEOUT to be denominated in jiffies. Also correct rounding of the timeout: check time > finish (or rather time_after(time, finish)) and not time >= finish. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/mcdi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index 3ef71a0f99a8..0095ce95150b 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -22,7 +22,7 @@ ************************************************************************** */ -#define MCDI_RPC_TIMEOUT 10 /*seconds */ +#define MCDI_RPC_TIMEOUT (10 * HZ) #define MCDI_PDU(efx) \ (efx_port_num(efx) ? MC_SMEM_P1_PDU_OFST : MC_SMEM_P0_PDU_OFST) @@ -120,7 +120,7 @@ static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen) static int efx_mcdi_poll(struct efx_nic *efx) { struct efx_mcdi_iface *mcdi = efx_mcdi(efx); - unsigned int time, finish; + unsigned long time, finish; unsigned int respseq, respcmd, error; unsigned int pdu = FR_CZ_MC_TREG_SMEM + MCDI_PDU(efx); unsigned int rc, spins; @@ -136,7 +136,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) * and poll once a jiffy (approximately) */ spins = TICK_USEC; - finish = get_seconds() + MCDI_RPC_TIMEOUT; + finish = jiffies + MCDI_RPC_TIMEOUT; while (1) { if (spins != 0) { @@ -146,7 +146,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) schedule_timeout_uninterruptible(1); } - time = get_seconds(); + time = jiffies; rmb(); efx_readd(efx, ®, pdu); @@ -158,7 +158,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) EFX_DWORD_FIELD(reg, MCDI_HEADER_RESPONSE)) break; - if (time >= finish) + if (time_after(time, finish)) return -ETIMEDOUT; } @@ -257,7 +257,7 @@ static int efx_mcdi_await_completion(struct efx_nic *efx) if (wait_event_timeout( mcdi->wq, atomic_read(&mcdi->state) == MCDI_STATE_COMPLETED, - msecs_to_jiffies(MCDI_RPC_TIMEOUT * 1000)) == 0) + MCDI_RPC_TIMEOUT) == 0) return -ETIMEDOUT; /* Check if efx_mcdi_set_mode() switched us back to polled completions. -- cgit v1.2.3 From b9cc977d9d4d1866ee83df38815f4b3b34d99dd9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 28 Nov 2012 04:12:41 +0000 Subject: sfc: Make module parameters really boolean Most of the module parameters treated as boolean are currently exposed as type int or uint. Defining them with the proper type is useful documentation for both users and developers. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/efx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 6f073d014ad3..d858f310b2b2 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -106,8 +106,8 @@ static struct workqueue_struct *reset_workqueue; * * This is only used in MSI-X interrupt mode */ -static unsigned int separate_tx_channels; -module_param(separate_tx_channels, uint, 0444); +static bool separate_tx_channels; +module_param(separate_tx_channels, bool, 0444); MODULE_PARM_DESC(separate_tx_channels, "Use separate channels for TX and RX"); @@ -160,8 +160,8 @@ static unsigned int rss_cpus; module_param(rss_cpus, uint, 0444); MODULE_PARM_DESC(rss_cpus, "Number of CPUs to use for Receive-Side Scaling"); -static int phy_flash_cfg; -module_param(phy_flash_cfg, int, 0644); +static bool phy_flash_cfg; +module_param(phy_flash_cfg, bool, 0644); MODULE_PARM_DESC(phy_flash_cfg, "Set PHYs into reflash mode initially"); static unsigned irq_adapt_low_thresh = 8000; -- cgit v1.2.3 From 87d1fc11303473a2bd74eedb8377ff80d853972b Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:23:32 -0500 Subject: sfc: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Solarflare linux maintainers Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/sfc/efx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index d858f310b2b2..e95cc7bb2e02 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2669,7 +2669,7 @@ static int efx_pci_probe_main(struct efx_nic *efx) * transmission; this is left to the first time one of the network * interfaces is brought up (i.e. efx_net_open). */ -static int __devinit efx_pci_probe(struct pci_dev *pci_dev, +static int efx_pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *entry) { struct net_device *net_dev; -- cgit v1.2.3 From 1dd06ae8db716e17ec7e06244b858606edf378c0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 6 Dec 2012 14:30:56 +0000 Subject: drivers/net: fix up function prototypes after __dev* removals 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 Signed-off-by: David S. Miller --- 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 +-- .../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 +- .../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 +- .../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(-) (limited to 'drivers/net/ethernet/sfc') diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c index a1f263170683..b374be7891a2 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 7d451cd75006..d0f6bfc45aea 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 06a4561955ca..668850e441dc 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 f232bc8d0872..036a326836b2 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 46fc313214a2..5c2f3fbbf5ae 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 4efdaf26eaea..37b0381f532e 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 3faeb3d84362..d84888f03d92 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 8b233f8c95f2..11d1062a9449 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 ce18ba52e4b9..c2c0a5bb0b21 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 50b1e0f21f1c..3a2b45601ec2 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 9300185da976..633c709b9d99 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 658e224b3613..ed0feb3cc6fa 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 bc81de1b7d4f..fb3dd4399cf3 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 ceb89d90230e..85ec4c2d2645 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 d67c192b6505..549b77500579 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 dfddce6342e5..c0bc41a784ca 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 818f6d6cdbe0..3789affbc0e5 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 2ea7a231ef10..98f4522fd17b 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 705333e0eff9..0c61fd50d882 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 64dbffa0a7e2..c2d696c88e46 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 44bee4a2b9b3..56d3f697e0c7 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 dec5d2cfd386..e4466a36d106 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 3e7327ec3901..71b3d7daa21d 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 7dc9766bb5ba..aab83a2d4e07 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 c64351f486cd..219f6226fcb1 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 2f6a19bfad5a..940ef859dc60 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)); @@ -10072,8 +10071,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); @@ -11553,9 +11551,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; @@ -11735,8 +11732,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); @@ -12042,8 +12038,7 @@ static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev, struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *); -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 3f7b1c309c63..78ea90c40e19 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 5f60623dd7fd..c8fdeaae56c0 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 5328804779f4..d84872e88171 100644 --- a/drivers/net/ethernet/chelsio/cxgb/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c @@ -2059,8 +2059,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 9527dc196f87..e0a03a31e7c4 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 4aa3b21c6f7f..f15ee326d5c1 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 bef893d4c68a..130dd9d5b493 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 8ea773630d10..45f2bea2e929 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 f866eb5e35de..0188df705719 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 9b70cccf8437..7127c7b9efde 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 930f03bd1263..64866ff1aea0 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 0918e3879abe..eaab73cf27ca 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 c411aedd8e60..4c830030fb06 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 56a8fe7d4ef2..83139307861c 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 157c8e6e93f9..1e9443d9fb57 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 0a1bda857e76..c7b04ecf5b49 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 b003abc24227..f95612b907ae 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 519c2895e8f7..c706b7a9397e 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 3f35b6a983e9..2bafbd37c247 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 598e576ddf51..e3c7c697fc45 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 e238130574ca..19b64de7124b 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 c791ad3907b2..256bdb8e1994 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 8becaaf6eb5c..50ea12bfb579 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 35485f2c144c..f2fdbb79837e 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 f80ae745908d..068d78151658 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 50c205098626..a59f0779e1c3 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 840fb0d39034..294da56b824c 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 4e19aa0657f4..750fc0194f37 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 829e81471ae7..fbf75fdca994 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 b3beed2232fd..89d536dd7ff5 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 06513d9e9fb7..31cfe2ec75df 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -1833,8 +1833,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 b494309ee942..277f5dfe3d90 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 fb165b6ffada..20a5af6d87d0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7186,8 +7186,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 1e2f02ac268d..257357ae66c3 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 3d66e959a0cc..5544a1fe2f94 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 6ddfbcae7807..3269eb38cc57 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 340551eebedf..200cc0ec8052 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 f3f09b18a707..093d594435e1 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 eaddbb7c24ab..0ffde69c8d01 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 77f7cd37ad30..f4ad60c97eae 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 0281755200a7..77c070de621e 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 032f9b6d850d..d89b6ed82c51 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 bb5770fc6503..7c87105ca049 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 2800c449de4e..fbaed4fa72fa 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 df6eb27fa101..67a679aaf29a 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 8d58092bd060..a7554d9aab0c 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 cae881c18f0b..f80cd975daed 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 ae27e4463f97..63c13125db6c 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 e95cc7bb2e02..bf57b3cb16ab 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 4b1deec9189a..dc171b4961e4 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 2103449a2dfe..b2315324cc6d 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 c114c4f9cea8..9a9c379420d1 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 88c6c4243cb3..5bffd9749a58 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 347cccbeb53c..03b256af7ed5 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 b085692f3893..022b45bc14ff 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 c52a5cefa192..39a7a49d98e0 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 5cf9eb6dd65f..064eaac9616f 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 b77b913df116..b43d68b40e50 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 85f971fe2611..4c682a3d0424 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 6023949be3bd..a0bdf0779466 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 8fda91009226..be82f6d13c51 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 c7bc0561b8eb..5f3f9d52757d 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 43babc33a2c9..a1bff49a8155 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 2852b7099eee..e1b895530827 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 af16081677e7..22725386c5de 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 d7c8af7cca02..e321d0b6fc88 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 5db09efae927..9819349eaa1e 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 53ccc5174d08..7992b3e05d3d 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 dc9edd48c933..1bc7f9fd2583 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 3c8aab70f5e7..502c8ff1d985 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 e54b84d5ad76..e5b19b056909 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 82c5f30aabab..5290952b60c2 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 63efbf4b51c8..f9033c6a888c 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 36fe08ac74bd..27274986ab56 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 d50223050cf4..851dc7b7e8b0 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 c6e1a4b9e4fb..62f01b74cbd6 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 f1685d9624c8..6269a09c7369 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 0e443fd0803b..7ef435bab425 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 a51cfa7c6540..53efc57fcace 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 037c423a6328..ddbce54040e2 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 b72be1280361..6a24a5a70cc7 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 53451dd7b602..c26e28b4bd9f 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; -- cgit v1.2.3