Commit 3a5d9db7 authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by David S. Miller

ibmvnic: remove unused ->wait_capability

With previous bug fix, ->wait_capability flag is no longer needed and can
be removed.

Fixes: 249168ad ("ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs")
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.ibm.com>
Reviewed-by: default avatarDany Madden <drt@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48079e7f
...@@ -4884,10 +4884,8 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq, ...@@ -4884,10 +4884,8 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
} }
/* Done receiving requested capabilities, query IP offload support */ /* Done receiving requested capabilities, query IP offload support */
if (atomic_read(&adapter->running_cap_crqs) == 0) { if (atomic_read(&adapter->running_cap_crqs) == 0)
adapter->wait_capability = false;
send_query_ip_offload(adapter); send_query_ip_offload(adapter);
}
} }
static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
...@@ -5185,10 +5183,8 @@ static void handle_query_cap_rsp(union ibmvnic_crq *crq, ...@@ -5185,10 +5183,8 @@ static void handle_query_cap_rsp(union ibmvnic_crq *crq,
} }
out: out:
if (atomic_read(&adapter->running_cap_crqs) == 0) { if (atomic_read(&adapter->running_cap_crqs) == 0)
adapter->wait_capability = false;
send_request_cap(adapter, 0); send_request_cap(adapter, 0);
}
} }
static int send_query_phys_parms(struct ibmvnic_adapter *adapter) static int send_query_phys_parms(struct ibmvnic_adapter *adapter)
...@@ -5484,10 +5480,9 @@ static void ibmvnic_tasklet(struct tasklet_struct *t) ...@@ -5484,10 +5480,9 @@ static void ibmvnic_tasklet(struct tasklet_struct *t)
struct ibmvnic_crq_queue *queue = &adapter->crq; struct ibmvnic_crq_queue *queue = &adapter->crq;
union ibmvnic_crq *crq; union ibmvnic_crq *crq;
unsigned long flags; unsigned long flags;
bool done = false;
spin_lock_irqsave(&queue->lock, flags); spin_lock_irqsave(&queue->lock, flags);
while (!done) {
/* Pull all the valid messages off the CRQ */ /* Pull all the valid messages off the CRQ */
while ((crq = ibmvnic_next_crq(adapter)) != NULL) { while ((crq = ibmvnic_next_crq(adapter)) != NULL) {
/* This barrier makes sure ibmvnic_next_crq()'s /* This barrier makes sure ibmvnic_next_crq()'s
...@@ -5499,12 +5494,7 @@ static void ibmvnic_tasklet(struct tasklet_struct *t) ...@@ -5499,12 +5494,7 @@ static void ibmvnic_tasklet(struct tasklet_struct *t)
ibmvnic_handle_crq(crq, adapter); ibmvnic_handle_crq(crq, adapter);
crq->generic.first = 0; crq->generic.first = 0;
} }
}
/* if capabilities CRQ's were sent in this tasklet, the following
* tasklet must wait until all responses are received
*/
if (atomic_read(&adapter->running_cap_crqs) != 0)
adapter->wait_capability = true;
spin_unlock_irqrestore(&queue->lock, flags); spin_unlock_irqrestore(&queue->lock, flags);
} }
......
...@@ -919,7 +919,6 @@ struct ibmvnic_adapter { ...@@ -919,7 +919,6 @@ struct ibmvnic_adapter {
int login_rsp_buf_sz; int login_rsp_buf_sz;
atomic_t running_cap_crqs; atomic_t running_cap_crqs;
bool wait_capability;
struct ibmvnic_sub_crq_queue **tx_scrq ____cacheline_aligned; struct ibmvnic_sub_crq_queue **tx_scrq ____cacheline_aligned;
struct ibmvnic_sub_crq_queue **rx_scrq ____cacheline_aligned; struct ibmvnic_sub_crq_queue **rx_scrq ____cacheline_aligned;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment