diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-14 05:30:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 05:30:23 -0400 |
commit | df39e8ba56a788733d369068c7319e04b1da3cd5 (patch) | |
tree | 1e9be853bdb455e341cdbf957656f342cfa2eb9e /drivers/net/ehea | |
parent | f5572855ec492334d8c3ec0e0e86c31865d5cf07 (diff) | |
parent | 159d83363b629c91d020734207c1bc788b96af5a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ehea/ehea_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/rt2x00/rt61pci.c
net/ipv4/inet_timewait_sock.c
net/ipv6/raw.c
net/mac80211/ieee80211_sta.c
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r-- | drivers/net/ehea/ehea.h | 3 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 24 |
2 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 26acd05c80b5..f5dacceab95b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0089" | 43 | #define DRV_VERSION "EHEA_0090" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
@@ -371,6 +371,7 @@ struct ehea_port_res { | |||
371 | struct ehea_q_skb_arr rq2_skba; | 371 | struct ehea_q_skb_arr rq2_skba; |
372 | struct ehea_q_skb_arr rq3_skba; | 372 | struct ehea_q_skb_arr rq3_skba; |
373 | struct ehea_q_skb_arr sq_skba; | 373 | struct ehea_q_skb_arr sq_skba; |
374 | int sq_skba_size; | ||
374 | spinlock_t netif_queue; | 375 | spinlock_t netif_queue; |
375 | int queue_stopped; | 376 | int queue_stopped; |
376 | int swqe_refill_th; | 377 | int swqe_refill_th; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 0c1c360a85ca..9ff7538b7595 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -350,7 +350,8 @@ static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) | |||
350 | pr->rq1_skba.os_skbs = 0; | 350 | pr->rq1_skba.os_skbs = 0; |
351 | 351 | ||
352 | if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) { | 352 | if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) { |
353 | pr->rq1_skba.index = index; | 353 | if (nr_of_wqes > 0) |
354 | pr->rq1_skba.index = index; | ||
354 | pr->rq1_skba.os_skbs = fill_wqes; | 355 | pr->rq1_skba.os_skbs = fill_wqes; |
355 | return; | 356 | return; |
356 | } | 357 | } |
@@ -1465,7 +1466,9 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr, | |||
1465 | init_attr->act_nr_rwqes_rq2, | 1466 | init_attr->act_nr_rwqes_rq2, |
1466 | init_attr->act_nr_rwqes_rq3); | 1467 | init_attr->act_nr_rwqes_rq3); |
1467 | 1468 | ||
1468 | ret = ehea_init_q_skba(&pr->sq_skba, init_attr->act_nr_send_wqes + 1); | 1469 | pr->sq_skba_size = init_attr->act_nr_send_wqes + 1; |
1470 | |||
1471 | ret = ehea_init_q_skba(&pr->sq_skba, pr->sq_skba_size); | ||
1469 | ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1); | 1472 | ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1); |
1470 | ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1); | 1473 | ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1); |
1471 | ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1); | 1474 | ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1); |
@@ -2622,6 +2625,22 @@ void ehea_purge_sq(struct ehea_qp *orig_qp) | |||
2622 | } | 2625 | } |
2623 | } | 2626 | } |
2624 | 2627 | ||
2628 | void ehea_flush_sq(struct ehea_port *port) | ||
2629 | { | ||
2630 | int i; | ||
2631 | |||
2632 | for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) { | ||
2633 | struct ehea_port_res *pr = &port->port_res[i]; | ||
2634 | int swqe_max = pr->sq_skba_size - 2 - pr->swqe_ll_count; | ||
2635 | int k = 0; | ||
2636 | while (atomic_read(&pr->swqe_avail) < swqe_max) { | ||
2637 | msleep(5); | ||
2638 | if (++k == 20) | ||
2639 | break; | ||
2640 | } | ||
2641 | } | ||
2642 | } | ||
2643 | |||
2625 | int ehea_stop_qps(struct net_device *dev) | 2644 | int ehea_stop_qps(struct net_device *dev) |
2626 | { | 2645 | { |
2627 | struct ehea_port *port = netdev_priv(dev); | 2646 | struct ehea_port *port = netdev_priv(dev); |
@@ -2849,6 +2868,7 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2849 | if (dev->flags & IFF_UP) { | 2868 | if (dev->flags & IFF_UP) { |
2850 | mutex_lock(&port->port_lock); | 2869 | mutex_lock(&port->port_lock); |
2851 | netif_stop_queue(dev); | 2870 | netif_stop_queue(dev); |
2871 | ehea_flush_sq(port); | ||
2852 | ret = ehea_stop_qps(dev); | 2872 | ret = ehea_stop_qps(dev); |
2853 | if (ret) { | 2873 | if (ret) { |
2854 | mutex_unlock(&port->port_lock); | 2874 | mutex_unlock(&port->port_lock); |