aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sfc/efx.c24
-rw-r--r--drivers/net/sfc/ethtool.c34
-rw-r--r--drivers/net/sfc/falcon.c4
-rw-r--r--drivers/net/sfc/tx.c2
4 files changed, 32 insertions, 32 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 45c72eebb3a7..42539802b7ae 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1249,7 +1249,7 @@ static void efx_monitor(struct work_struct *data)
1249 */ 1249 */
1250static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) 1250static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
1251{ 1251{
1252 struct efx_nic *efx = net_dev->priv; 1252 struct efx_nic *efx = netdev_priv(net_dev);
1253 1253
1254 EFX_ASSERT_RESET_SERIALISED(efx); 1254 EFX_ASSERT_RESET_SERIALISED(efx);
1255 1255
@@ -1303,7 +1303,7 @@ static void efx_fini_napi(struct efx_nic *efx)
1303 */ 1303 */
1304static void efx_netpoll(struct net_device *net_dev) 1304static void efx_netpoll(struct net_device *net_dev)
1305{ 1305{
1306 struct efx_nic *efx = net_dev->priv; 1306 struct efx_nic *efx = netdev_priv(net_dev);
1307 struct efx_channel *channel; 1307 struct efx_channel *channel;
1308 1308
1309 efx_for_each_channel_with_interrupt(channel, efx) 1309 efx_for_each_channel_with_interrupt(channel, efx)
@@ -1321,7 +1321,7 @@ static void efx_netpoll(struct net_device *net_dev)
1321/* Context: process, rtnl_lock() held. */ 1321/* Context: process, rtnl_lock() held. */
1322static int efx_net_open(struct net_device *net_dev) 1322static int efx_net_open(struct net_device *net_dev)
1323{ 1323{
1324 struct efx_nic *efx = net_dev->priv; 1324 struct efx_nic *efx = netdev_priv(net_dev);
1325 EFX_ASSERT_RESET_SERIALISED(efx); 1325 EFX_ASSERT_RESET_SERIALISED(efx);
1326 1326
1327 EFX_LOG(efx, "opening device %s on CPU %d\n", net_dev->name, 1327 EFX_LOG(efx, "opening device %s on CPU %d\n", net_dev->name,
@@ -1337,7 +1337,7 @@ static int efx_net_open(struct net_device *net_dev)
1337 */ 1337 */
1338static int efx_net_stop(struct net_device *net_dev) 1338static int efx_net_stop(struct net_device *net_dev)
1339{ 1339{
1340 struct efx_nic *efx = net_dev->priv; 1340 struct efx_nic *efx = netdev_priv(net_dev);
1341 int rc; 1341 int rc;
1342 1342
1343 EFX_LOG(efx, "closing %s on CPU %d\n", net_dev->name, 1343 EFX_LOG(efx, "closing %s on CPU %d\n", net_dev->name,
@@ -1356,7 +1356,7 @@ static int efx_net_stop(struct net_device *net_dev)
1356/* Context: process, dev_base_lock or RTNL held, non-blocking. */ 1356/* Context: process, dev_base_lock or RTNL held, non-blocking. */
1357static struct net_device_stats *efx_net_stats(struct net_device *net_dev) 1357static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
1358{ 1358{
1359 struct efx_nic *efx = net_dev->priv; 1359 struct efx_nic *efx = netdev_priv(net_dev);
1360 struct efx_mac_stats *mac_stats = &efx->mac_stats; 1360 struct efx_mac_stats *mac_stats = &efx->mac_stats;
1361 struct net_device_stats *stats = &net_dev->stats; 1361 struct net_device_stats *stats = &net_dev->stats;
1362 1362
@@ -1403,7 +1403,7 @@ static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
1403/* Context: netif_tx_lock held, BHs disabled. */ 1403/* Context: netif_tx_lock held, BHs disabled. */
1404static void efx_watchdog(struct net_device *net_dev) 1404static void efx_watchdog(struct net_device *net_dev)
1405{ 1405{
1406 struct efx_nic *efx = net_dev->priv; 1406 struct efx_nic *efx = netdev_priv(net_dev);
1407 1407
1408 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d: %s\n", 1408 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d: %s\n",
1409 atomic_read(&efx->netif_stop_count), efx->port_enabled, 1409 atomic_read(&efx->netif_stop_count), efx->port_enabled,
@@ -1417,7 +1417,7 @@ static void efx_watchdog(struct net_device *net_dev)
1417/* Context: process, rtnl_lock() held. */ 1417/* Context: process, rtnl_lock() held. */
1418static int efx_change_mtu(struct net_device *net_dev, int new_mtu) 1418static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
1419{ 1419{
1420 struct efx_nic *efx = net_dev->priv; 1420 struct efx_nic *efx = netdev_priv(net_dev);
1421 int rc = 0; 1421 int rc = 0;
1422 1422
1423 EFX_ASSERT_RESET_SERIALISED(efx); 1423 EFX_ASSERT_RESET_SERIALISED(efx);
@@ -1445,7 +1445,7 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
1445 1445
1446static int efx_set_mac_address(struct net_device *net_dev, void *data) 1446static int efx_set_mac_address(struct net_device *net_dev, void *data)
1447{ 1447{
1448 struct efx_nic *efx = net_dev->priv; 1448 struct efx_nic *efx = netdev_priv(net_dev);
1449 struct sockaddr *addr = data; 1449 struct sockaddr *addr = data;
1450 char *new_addr = addr->sa_data; 1450 char *new_addr = addr->sa_data;
1451 1451
@@ -1469,7 +1469,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
1469/* Context: netif_tx_lock held, BHs disabled. */ 1469/* Context: netif_tx_lock held, BHs disabled. */
1470static void efx_set_multicast_list(struct net_device *net_dev) 1470static void efx_set_multicast_list(struct net_device *net_dev)
1471{ 1471{
1472 struct efx_nic *efx = net_dev->priv; 1472 struct efx_nic *efx = netdev_priv(net_dev);
1473 struct dev_mc_list *mc_list = net_dev->mc_list; 1473 struct dev_mc_list *mc_list = net_dev->mc_list;
1474 union efx_multicast_hash *mc_hash = &efx->multicast_hash; 1474 union efx_multicast_hash *mc_hash = &efx->multicast_hash;
1475 int promiscuous; 1475 int promiscuous;
@@ -1510,7 +1510,7 @@ static int efx_netdev_event(struct notifier_block *this,
1510 struct net_device *net_dev = ptr; 1510 struct net_device *net_dev = ptr;
1511 1511
1512 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) { 1512 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) {
1513 struct efx_nic *efx = net_dev->priv; 1513 struct efx_nic *efx = netdev_priv(net_dev);
1514 1514
1515 strcpy(efx->name, net_dev->name); 1515 strcpy(efx->name, net_dev->name);
1516 } 1516 }
@@ -1568,7 +1568,7 @@ static void efx_unregister_netdev(struct efx_nic *efx)
1568 if (!efx->net_dev) 1568 if (!efx->net_dev)
1569 return; 1569 return;
1570 1570
1571 BUG_ON(efx->net_dev->priv != efx); 1571 BUG_ON(netdev_priv(efx->net_dev) != efx);
1572 1572
1573 /* Free up any skbs still remaining. This has to happen before 1573 /* Free up any skbs still remaining. This has to happen before
1574 * we try to unregister the netdev as running their destructors 1574 * we try to unregister the netdev as running their destructors
@@ -2105,7 +2105,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
2105 NETIF_F_HIGHDMA | NETIF_F_TSO); 2105 NETIF_F_HIGHDMA | NETIF_F_TSO);
2106 if (lro) 2106 if (lro)
2107 net_dev->features |= NETIF_F_LRO; 2107 net_dev->features |= NETIF_F_LRO;
2108 efx = net_dev->priv; 2108 efx = netdev_priv(net_dev);
2109 pci_set_drvdata(pci_dev, efx); 2109 pci_set_drvdata(pci_dev, efx);
2110 rc = efx_init_struct(efx, type, pci_dev, net_dev); 2110 rc = efx_init_struct(efx, type, pci_dev, net_dev);
2111 if (rc) 2111 if (rc)
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index e2c75d101610..8a15be6548d2 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -183,7 +183,7 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {
183/* Identify device by flashing LEDs */ 183/* Identify device by flashing LEDs */
184static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds) 184static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds)
185{ 185{
186 struct efx_nic *efx = net_dev->priv; 186 struct efx_nic *efx = netdev_priv(net_dev);
187 187
188 efx->board_info.blink(efx, 1); 188 efx->board_info.blink(efx, 1);
189 schedule_timeout_interruptible(seconds * HZ); 189 schedule_timeout_interruptible(seconds * HZ);
@@ -195,7 +195,7 @@ static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds)
195int efx_ethtool_get_settings(struct net_device *net_dev, 195int efx_ethtool_get_settings(struct net_device *net_dev,
196 struct ethtool_cmd *ecmd) 196 struct ethtool_cmd *ecmd)
197{ 197{
198 struct efx_nic *efx = net_dev->priv; 198 struct efx_nic *efx = netdev_priv(net_dev);
199 int rc; 199 int rc;
200 200
201 mutex_lock(&efx->mac_lock); 201 mutex_lock(&efx->mac_lock);
@@ -209,7 +209,7 @@ int efx_ethtool_get_settings(struct net_device *net_dev,
209int efx_ethtool_set_settings(struct net_device *net_dev, 209int efx_ethtool_set_settings(struct net_device *net_dev,
210 struct ethtool_cmd *ecmd) 210 struct ethtool_cmd *ecmd)
211{ 211{
212 struct efx_nic *efx = net_dev->priv; 212 struct efx_nic *efx = netdev_priv(net_dev);
213 int rc; 213 int rc;
214 214
215 mutex_lock(&efx->mac_lock); 215 mutex_lock(&efx->mac_lock);
@@ -224,7 +224,7 @@ int efx_ethtool_set_settings(struct net_device *net_dev,
224static void efx_ethtool_get_drvinfo(struct net_device *net_dev, 224static void efx_ethtool_get_drvinfo(struct net_device *net_dev,
225 struct ethtool_drvinfo *info) 225 struct ethtool_drvinfo *info)
226{ 226{
227 struct efx_nic *efx = net_dev->priv; 227 struct efx_nic *efx = netdev_priv(net_dev);
228 228
229 strlcpy(info->driver, EFX_DRIVER_NAME, sizeof(info->driver)); 229 strlcpy(info->driver, EFX_DRIVER_NAME, sizeof(info->driver));
230 strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version)); 230 strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version));
@@ -376,7 +376,7 @@ static int efx_ethtool_get_stats_count(struct net_device *net_dev)
376 376
377static int efx_ethtool_self_test_count(struct net_device *net_dev) 377static int efx_ethtool_self_test_count(struct net_device *net_dev)
378{ 378{
379 struct efx_nic *efx = net_dev->priv; 379 struct efx_nic *efx = netdev_priv(net_dev);
380 380
381 return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL); 381 return efx_ethtool_fill_self_tests(efx, NULL, NULL, NULL);
382} 382}
@@ -384,7 +384,7 @@ static int efx_ethtool_self_test_count(struct net_device *net_dev)
384static void efx_ethtool_get_strings(struct net_device *net_dev, 384static void efx_ethtool_get_strings(struct net_device *net_dev,
385 u32 string_set, u8 *strings) 385 u32 string_set, u8 *strings)
386{ 386{
387 struct efx_nic *efx = net_dev->priv; 387 struct efx_nic *efx = netdev_priv(net_dev);
388 struct ethtool_string *ethtool_strings = 388 struct ethtool_string *ethtool_strings =
389 (struct ethtool_string *)strings; 389 (struct ethtool_string *)strings;
390 int i; 390 int i;
@@ -410,7 +410,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
410 struct ethtool_stats *stats, 410 struct ethtool_stats *stats,
411 u64 *data) 411 u64 *data)
412{ 412{
413 struct efx_nic *efx = net_dev->priv; 413 struct efx_nic *efx = netdev_priv(net_dev);
414 struct efx_mac_stats *mac_stats = &efx->mac_stats; 414 struct efx_mac_stats *mac_stats = &efx->mac_stats;
415 struct efx_ethtool_stat *stat; 415 struct efx_ethtool_stat *stat;
416 struct efx_channel *channel; 416 struct efx_channel *channel;
@@ -460,7 +460,7 @@ static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
460 460
461static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) 461static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
462{ 462{
463 struct efx_nic *efx = net_dev->priv; 463 struct efx_nic *efx = netdev_priv(net_dev);
464 int rc; 464 int rc;
465 465
466 rc = ethtool_op_set_tx_csum(net_dev, enable); 466 rc = ethtool_op_set_tx_csum(net_dev, enable);
@@ -483,7 +483,7 @@ static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
483 483
484static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable) 484static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable)
485{ 485{
486 struct efx_nic *efx = net_dev->priv; 486 struct efx_nic *efx = netdev_priv(net_dev);
487 487
488 /* No way to stop the hardware doing the checks; we just 488 /* No way to stop the hardware doing the checks; we just
489 * ignore the result. 489 * ignore the result.
@@ -495,7 +495,7 @@ static int efx_ethtool_set_rx_csum(struct net_device *net_dev, u32 enable)
495 495
496static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev) 496static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev)
497{ 497{
498 struct efx_nic *efx = net_dev->priv; 498 struct efx_nic *efx = netdev_priv(net_dev);
499 499
500 return efx->rx_checksum_enabled; 500 return efx->rx_checksum_enabled;
501} 501}
@@ -503,7 +503,7 @@ static u32 efx_ethtool_get_rx_csum(struct net_device *net_dev)
503static void efx_ethtool_self_test(struct net_device *net_dev, 503static void efx_ethtool_self_test(struct net_device *net_dev,
504 struct ethtool_test *test, u64 *data) 504 struct ethtool_test *test, u64 *data)
505{ 505{
506 struct efx_nic *efx = net_dev->priv; 506 struct efx_nic *efx = netdev_priv(net_dev);
507 struct efx_self_tests efx_tests; 507 struct efx_self_tests efx_tests;
508 int offline, already_up; 508 int offline, already_up;
509 int rc; 509 int rc;
@@ -561,14 +561,14 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
561/* Restart autonegotiation */ 561/* Restart autonegotiation */
562static int efx_ethtool_nway_reset(struct net_device *net_dev) 562static int efx_ethtool_nway_reset(struct net_device *net_dev)
563{ 563{
564 struct efx_nic *efx = net_dev->priv; 564 struct efx_nic *efx = netdev_priv(net_dev);
565 565
566 return mii_nway_restart(&efx->mii); 566 return mii_nway_restart(&efx->mii);
567} 567}
568 568
569static u32 efx_ethtool_get_link(struct net_device *net_dev) 569static u32 efx_ethtool_get_link(struct net_device *net_dev)
570{ 570{
571 struct efx_nic *efx = net_dev->priv; 571 struct efx_nic *efx = netdev_priv(net_dev);
572 572
573 return efx->link_up; 573 return efx->link_up;
574} 574}
@@ -576,7 +576,7 @@ static u32 efx_ethtool_get_link(struct net_device *net_dev)
576static int efx_ethtool_get_coalesce(struct net_device *net_dev, 576static int efx_ethtool_get_coalesce(struct net_device *net_dev,
577 struct ethtool_coalesce *coalesce) 577 struct ethtool_coalesce *coalesce)
578{ 578{
579 struct efx_nic *efx = net_dev->priv; 579 struct efx_nic *efx = netdev_priv(net_dev);
580 struct efx_tx_queue *tx_queue; 580 struct efx_tx_queue *tx_queue;
581 struct efx_rx_queue *rx_queue; 581 struct efx_rx_queue *rx_queue;
582 struct efx_channel *channel; 582 struct efx_channel *channel;
@@ -614,7 +614,7 @@ static int efx_ethtool_get_coalesce(struct net_device *net_dev,
614static int efx_ethtool_set_coalesce(struct net_device *net_dev, 614static int efx_ethtool_set_coalesce(struct net_device *net_dev,
615 struct ethtool_coalesce *coalesce) 615 struct ethtool_coalesce *coalesce)
616{ 616{
617 struct efx_nic *efx = net_dev->priv; 617 struct efx_nic *efx = netdev_priv(net_dev);
618 struct efx_channel *channel; 618 struct efx_channel *channel;
619 struct efx_tx_queue *tx_queue; 619 struct efx_tx_queue *tx_queue;
620 unsigned tx_usecs, rx_usecs; 620 unsigned tx_usecs, rx_usecs;
@@ -657,7 +657,7 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
657static int efx_ethtool_set_pauseparam(struct net_device *net_dev, 657static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
658 struct ethtool_pauseparam *pause) 658 struct ethtool_pauseparam *pause)
659{ 659{
660 struct efx_nic *efx = net_dev->priv; 660 struct efx_nic *efx = netdev_priv(net_dev);
661 enum efx_fc_type flow_control = efx->flow_control; 661 enum efx_fc_type flow_control = efx->flow_control;
662 int rc; 662 int rc;
663 663
@@ -680,7 +680,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
680static void efx_ethtool_get_pauseparam(struct net_device *net_dev, 680static void efx_ethtool_get_pauseparam(struct net_device *net_dev,
681 struct ethtool_pauseparam *pause) 681 struct ethtool_pauseparam *pause)
682{ 682{
683 struct efx_nic *efx = net_dev->priv; 683 struct efx_nic *efx = netdev_priv(net_dev);
684 684
685 pause->rx_pause = (efx->flow_control & EFX_FC_RX) ? 1 : 0; 685 pause->rx_pause = (efx->flow_control & EFX_FC_RX) ? 1 : 0;
686 pause->tx_pause = (efx->flow_control & EFX_FC_TX) ? 1 : 0; 686 pause->tx_pause = (efx->flow_control & EFX_FC_TX) ? 1 : 0;
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 9138ee5b7b7b..c7aa2f61cb1c 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -1951,7 +1951,7 @@ static int falcon_gmii_wait(struct efx_nic *efx)
1951static void falcon_mdio_write(struct net_device *net_dev, int phy_id, 1951static void falcon_mdio_write(struct net_device *net_dev, int phy_id,
1952 int addr, int value) 1952 int addr, int value)
1953{ 1953{
1954 struct efx_nic *efx = net_dev->priv; 1954 struct efx_nic *efx = netdev_priv(net_dev);
1955 unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK; 1955 unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK;
1956 efx_oword_t reg; 1956 efx_oword_t reg;
1957 1957
@@ -2019,7 +2019,7 @@ static void falcon_mdio_write(struct net_device *net_dev, int phy_id,
2019 * could be read, -1 will be returned. */ 2019 * could be read, -1 will be returned. */
2020static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr) 2020static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr)
2021{ 2021{
2022 struct efx_nic *efx = net_dev->priv; 2022 struct efx_nic *efx = netdev_priv(net_dev);
2023 unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK; 2023 unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK;
2024 efx_oword_t reg; 2024 efx_oword_t reg;
2025 int value = -1; 2025 int value = -1;
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 5e8374ab28ee..2a09101f67eb 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -367,7 +367,7 @@ inline int efx_xmit(struct efx_nic *efx,
367 */ 367 */
368int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev) 368int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
369{ 369{
370 struct efx_nic *efx = net_dev->priv; 370 struct efx_nic *efx = netdev_priv(net_dev);
371 return efx_xmit(efx, &efx->tx_queue[0], skb); 371 return efx_xmit(efx, &efx->tx_queue[0], skb);
372} 372}
373 373