diff options
| author | David S. Miller <davem@davemloft.net> | 2009-03-23 16:35:04 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-03-23 16:35:04 -0400 |
| commit | 8be7cdccacfbfc707e7370cad9bb168defed636f (patch) | |
| tree | 8416607b62ec352176c81afd6f4e7b571ceb957f | |
| parent | ecd4137320b59759bbe57eef89040ee3e5e66039 (diff) | |
| parent | 61fa9dcf9329cb92c220f7b656410fbe5e72f933 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ucc_geth.c
| -rw-r--r-- | drivers/dca/dca-sysfs.c | 21 | ||||
| -rw-r--r-- | drivers/net/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/net/benet/be.h | 1 | ||||
| -rw-r--r-- | drivers/net/benet/be_main.c | 60 | ||||
| -rw-r--r-- | drivers/net/dm9000.c | 6 | ||||
| -rw-r--r-- | drivers/net/dnet.c | 6 | ||||
| -rw-r--r-- | drivers/net/sungem.c | 9 | ||||
| -rw-r--r-- | drivers/net/ucc_geth.c | 36 | ||||
| -rw-r--r-- | drivers/net/ucc_geth.h | 3 | ||||
| -rw-r--r-- | include/linux/dca.h | 20 | ||||
| -rw-r--r-- | net/wireless/nl80211.c | 11 |
11 files changed, 113 insertions, 62 deletions
diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c index bb538b9690e0..ee916c9857ee 100644 --- a/drivers/dca/dca-sysfs.c +++ b/drivers/dca/dca-sysfs.c | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the Free | ||
| 6 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 7 | * any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along with | ||
| 15 | * this program; if not, write to the Free Software Foundation, Inc., 59 | ||
| 16 | * Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 17 | * | ||
| 18 | * The full GNU General Public License is included in this distribution in the | ||
| 19 | * file called COPYING. | ||
| 20 | */ | ||
| 21 | |||
| 1 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 2 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 3 | #include <linux/device.h> | 24 | #include <linux/device.h> |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 533cc411ee48..e5ffc1c606c1 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
| @@ -1051,7 +1051,7 @@ config NI65 | |||
| 1051 | 1051 | ||
| 1052 | config DNET | 1052 | config DNET |
| 1053 | tristate "Dave ethernet support (DNET)" | 1053 | tristate "Dave ethernet support (DNET)" |
| 1054 | depends on NET_ETHERNET | 1054 | depends on NET_ETHERNET && HAS_IOMEM |
| 1055 | select PHYLIB | 1055 | select PHYLIB |
| 1056 | help | 1056 | help |
| 1057 | The Dave ethernet interface (DNET) is found on Qong Board FPGA. | 1057 | The Dave ethernet interface (DNET) is found on Qong Board FPGA. |
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 63d593d53153..f327be57ca96 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
| @@ -194,6 +194,7 @@ struct be_adapter { | |||
| 194 | struct be_eq_obj rx_eq; | 194 | struct be_eq_obj rx_eq; |
| 195 | struct be_rx_obj rx_obj; | 195 | struct be_rx_obj rx_obj; |
| 196 | u32 big_page_size; /* Compounded page size shared by rx wrbs */ | 196 | u32 big_page_size; /* Compounded page size shared by rx wrbs */ |
| 197 | bool rx_post_starved; /* Zero rx frags have been posted to BE */ | ||
| 197 | 198 | ||
| 198 | struct vlan_group *vlan_grp; | 199 | struct vlan_group *vlan_grp; |
| 199 | u16 num_vlans; | 200 | u16 num_vlans; |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 897a63de5bdb..0ecaffb70e58 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
| @@ -273,26 +273,6 @@ static void be_rx_eqd_update(struct be_adapter *adapter) | |||
| 273 | rx_eq->cur_eqd = eqd; | 273 | rx_eq->cur_eqd = eqd; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | static void be_worker(struct work_struct *work) | ||
| 277 | { | ||
| 278 | struct be_adapter *adapter = | ||
| 279 | container_of(work, struct be_adapter, work.work); | ||
| 280 | int status; | ||
| 281 | |||
| 282 | /* Check link */ | ||
| 283 | be_link_status_update(adapter); | ||
| 284 | |||
| 285 | /* Get Stats */ | ||
| 286 | status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); | ||
| 287 | if (!status) | ||
| 288 | netdev_stats_update(adapter); | ||
| 289 | |||
| 290 | /* Set EQ delay */ | ||
| 291 | be_rx_eqd_update(adapter); | ||
| 292 | |||
| 293 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); | ||
| 294 | } | ||
| 295 | |||
| 296 | static struct net_device_stats *be_get_stats(struct net_device *dev) | 276 | static struct net_device_stats *be_get_stats(struct net_device *dev) |
| 297 | { | 277 | { |
| 298 | struct be_adapter *adapter = netdev_priv(dev); | 278 | struct be_adapter *adapter = netdev_priv(dev); |
| @@ -493,7 +473,7 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu) | |||
| 493 | * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, | 473 | * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, |
| 494 | * set the BE in promiscuous VLAN mode. | 474 | * set the BE in promiscuous VLAN mode. |
| 495 | */ | 475 | */ |
| 496 | static void be_vids_config(struct net_device *netdev) | 476 | static void be_vid_config(struct net_device *netdev) |
| 497 | { | 477 | { |
| 498 | struct be_adapter *adapter = netdev_priv(netdev); | 478 | struct be_adapter *adapter = netdev_priv(netdev); |
| 499 | u16 vtag[BE_NUM_VLANS_SUPPORTED]; | 479 | u16 vtag[BE_NUM_VLANS_SUPPORTED]; |
| @@ -536,7 +516,7 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid) | |||
| 536 | adapter->num_vlans++; | 516 | adapter->num_vlans++; |
| 537 | adapter->vlan_tag[vid] = 1; | 517 | adapter->vlan_tag[vid] = 1; |
| 538 | 518 | ||
| 539 | be_vids_config(netdev); | 519 | be_vid_config(netdev); |
| 540 | } | 520 | } |
| 541 | 521 | ||
| 542 | static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) | 522 | static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) |
| @@ -547,7 +527,7 @@ static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) | |||
| 547 | adapter->vlan_tag[vid] = 0; | 527 | adapter->vlan_tag[vid] = 0; |
| 548 | 528 | ||
| 549 | vlan_group_set_device(adapter->vlan_grp, vid, NULL); | 529 | vlan_group_set_device(adapter->vlan_grp, vid, NULL); |
| 550 | be_vids_config(netdev); | 530 | be_vid_config(netdev); |
| 551 | } | 531 | } |
| 552 | 532 | ||
| 553 | static void be_set_multicast_filter(struct net_device *netdev) | 533 | static void be_set_multicast_filter(struct net_device *netdev) |
| @@ -900,8 +880,11 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
| 900 | page_info->last_page_user = true; | 880 | page_info->last_page_user = true; |
| 901 | 881 | ||
| 902 | if (posted) { | 882 | if (posted) { |
| 903 | be_rxq_notify(&adapter->ctrl, rxq->id, posted); | ||
| 904 | atomic_add(posted, &rxq->used); | 883 | atomic_add(posted, &rxq->used); |
| 884 | be_rxq_notify(&adapter->ctrl, rxq->id, posted); | ||
| 885 | } else if (atomic_read(&rxq->used) == 0) { | ||
| 886 | /* Let be_worker replenish when memory is available */ | ||
| 887 | adapter->rx_post_starved = true; | ||
| 905 | } | 888 | } |
| 906 | 889 | ||
| 907 | return; | 890 | return; |
| @@ -1305,6 +1288,31 @@ int be_poll_tx(struct napi_struct *napi, int budget) | |||
| 1305 | return 1; | 1288 | return 1; |
| 1306 | } | 1289 | } |
| 1307 | 1290 | ||
| 1291 | static void be_worker(struct work_struct *work) | ||
| 1292 | { | ||
| 1293 | struct be_adapter *adapter = | ||
| 1294 | container_of(work, struct be_adapter, work.work); | ||
| 1295 | int status; | ||
| 1296 | |||
| 1297 | /* Check link */ | ||
| 1298 | be_link_status_update(adapter); | ||
| 1299 | |||
| 1300 | /* Get Stats */ | ||
| 1301 | status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); | ||
| 1302 | if (!status) | ||
| 1303 | netdev_stats_update(adapter); | ||
| 1304 | |||
| 1305 | /* Set EQ delay */ | ||
| 1306 | be_rx_eqd_update(adapter); | ||
| 1307 | |||
| 1308 | if (adapter->rx_post_starved) { | ||
| 1309 | adapter->rx_post_starved = false; | ||
| 1310 | be_post_rx_frags(adapter); | ||
| 1311 | } | ||
| 1312 | |||
| 1313 | schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); | ||
| 1314 | } | ||
| 1315 | |||
| 1308 | static void be_msix_enable(struct be_adapter *adapter) | 1316 | static void be_msix_enable(struct be_adapter *adapter) |
| 1309 | { | 1317 | { |
| 1310 | int i, status; | 1318 | int i, status; |
| @@ -1422,6 +1430,8 @@ static int be_open(struct net_device *netdev) | |||
| 1422 | if (status != 0) | 1430 | if (status != 0) |
| 1423 | goto do_none; | 1431 | goto do_none; |
| 1424 | 1432 | ||
| 1433 | be_vid_config(netdev); | ||
| 1434 | |||
| 1425 | status = be_cmd_set_flow_control(ctrl, true, true); | 1435 | status = be_cmd_set_flow_control(ctrl, true, true); |
| 1426 | if (status != 0) | 1436 | if (status != 0) |
| 1427 | goto if_destroy; | 1437 | goto if_destroy; |
| @@ -1856,8 +1866,6 @@ static int be_resume(struct pci_dev *pdev) | |||
