Skip to content

Commit 3a5d9db

Browse files
sukadevdavem330
authored andcommitted
ibmvnic: remove unused ->wait_capability
With previous bug fix, ->wait_capability flag is no longer needed and can be removed. Fixes: 249168a ("ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs") Signed-off-by: Sukadev Bhattiprolu <[email protected]> Reviewed-by: Dany Madden <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 48079e7 commit 3a5d9db

File tree

2 files changed

+14
-25
lines changed

2 files changed

+14
-25
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4884,10 +4884,8 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
48844884
}
48854885

48864886
/* Done receiving requested capabilities, query IP offload support */
4887-
if (atomic_read(&adapter->running_cap_crqs) == 0) {
4888-
adapter->wait_capability = false;
4887+
if (atomic_read(&adapter->running_cap_crqs) == 0)
48894888
send_query_ip_offload(adapter);
4890-
}
48914889
}
48924890

48934891
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,
51855183
}
51865184

51875185
out:
5188-
if (atomic_read(&adapter->running_cap_crqs) == 0) {
5189-
adapter->wait_capability = false;
5186+
if (atomic_read(&adapter->running_cap_crqs) == 0)
51905187
send_request_cap(adapter, 0);
5191-
}
51925188
}
51935189

51945190
static int send_query_phys_parms(struct ibmvnic_adapter *adapter)
@@ -5484,27 +5480,21 @@ static void ibmvnic_tasklet(struct tasklet_struct *t)
54845480
struct ibmvnic_crq_queue *queue = &adapter->crq;
54855481
union ibmvnic_crq *crq;
54865482
unsigned long flags;
5487-
bool done = false;
54885483

54895484
spin_lock_irqsave(&queue->lock, flags);
5490-
while (!done) {
5491-
/* Pull all the valid messages off the CRQ */
5492-
while ((crq = ibmvnic_next_crq(adapter)) != NULL) {
5493-
/* This barrier makes sure ibmvnic_next_crq()'s
5494-
* crq->generic.first & IBMVNIC_CRQ_CMD_RSP is loaded
5495-
* before ibmvnic_handle_crq()'s
5496-
* switch(gen_crq->first) and switch(gen_crq->cmd).
5497-
*/
5498-
dma_rmb();
5499-
ibmvnic_handle_crq(crq, adapter);
5500-
crq->generic.first = 0;
5501-
}
5485+
5486+
/* Pull all the valid messages off the CRQ */
5487+
while ((crq = ibmvnic_next_crq(adapter)) != NULL) {
5488+
/* This barrier makes sure ibmvnic_next_crq()'s
5489+
* crq->generic.first & IBMVNIC_CRQ_CMD_RSP is loaded
5490+
* before ibmvnic_handle_crq()'s
5491+
* switch(gen_crq->first) and switch(gen_crq->cmd).
5492+
*/
5493+
dma_rmb();
5494+
ibmvnic_handle_crq(crq, adapter);
5495+
crq->generic.first = 0;
55025496
}
5503-
/* if capabilities CRQ's were sent in this tasklet, the following
5504-
* tasklet must wait until all responses are received
5505-
*/
5506-
if (atomic_read(&adapter->running_cap_crqs) != 0)
5507-
adapter->wait_capability = true;
5497+
55085498
spin_unlock_irqrestore(&queue->lock, flags);
55095499
}
55105500

drivers/net/ethernet/ibm/ibmvnic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,6 @@ struct ibmvnic_adapter {
919919
int login_rsp_buf_sz;
920920

921921
atomic_t running_cap_crqs;
922-
bool wait_capability;
923922

924923
struct ibmvnic_sub_crq_queue **tx_scrq ____cacheline_aligned;
925924
struct ibmvnic_sub_crq_queue **rx_scrq ____cacheline_aligned;

0 commit comments

Comments
 (0)