Commit 6b7ec41e authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: remove TX buffer's pointer to its queue

qeth_tx_complete_buf() is the only remaining user of buf->q, and the
callers can easily provide this as a parameter instead.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 838e4cc8
...@@ -439,7 +439,6 @@ struct qeth_qdio_out_buffer { ...@@ -439,7 +439,6 @@ struct qeth_qdio_out_buffer {
struct sk_buff_head skb_list; struct sk_buff_head skb_list;
int is_header[QDIO_MAX_ELEMENTS_PER_BUFFER]; int is_header[QDIO_MAX_ELEMENTS_PER_BUFFER];
struct qeth_qdio_out_q *q;
struct list_head list_entry; struct list_head list_entry;
struct qaob *aob; struct qaob *aob;
}; };
......
...@@ -1290,10 +1290,10 @@ static void qeth_notify_skbs(struct qeth_qdio_out_q *q, ...@@ -1290,10 +1290,10 @@ static void qeth_notify_skbs(struct qeth_qdio_out_q *q,
} }
} }
static void qeth_tx_complete_buf(struct qeth_qdio_out_buffer *buf, bool error, static void qeth_tx_complete_buf(struct qeth_qdio_out_q *queue,
struct qeth_qdio_out_buffer *buf, bool error,
int budget) int budget)
{ {
struct qeth_qdio_out_q *queue = buf->q;
struct sk_buff *skb; struct sk_buff *skb;
/* Empty buffer? */ /* Empty buffer? */
...@@ -1342,7 +1342,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue, ...@@ -1342,7 +1342,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
QETH_TXQ_STAT_INC(queue, completion_irq); QETH_TXQ_STAT_INC(queue, completion_irq);
} }
qeth_tx_complete_buf(buf, error, budget); qeth_tx_complete_buf(queue, buf, error, budget);
for (i = 0; i < queue->max_elements; ++i) { for (i = 0; i < queue->max_elements; ++i) {
void *data = phys_to_virt(buf->buffer->element[i].addr); void *data = phys_to_virt(buf->buffer->element[i].addr);
...@@ -1386,7 +1386,7 @@ static void qeth_tx_complete_pending_bufs(struct qeth_card *card, ...@@ -1386,7 +1386,7 @@ static void qeth_tx_complete_pending_bufs(struct qeth_card *card,
notify = drain ? TX_NOTIFY_GENERALERROR : notify = drain ? TX_NOTIFY_GENERALERROR :
qeth_compute_cq_notification(aob->aorc, 1); qeth_compute_cq_notification(aob->aorc, 1);
qeth_notify_skbs(queue, buf, notify); qeth_notify_skbs(queue, buf, notify);
qeth_tx_complete_buf(buf, drain, budget); qeth_tx_complete_buf(queue, buf, drain, budget);
for (i = 0; for (i = 0;
i < aob->sb_count && i < queue->max_elements; i < aob->sb_count && i < queue->max_elements;
...@@ -2530,7 +2530,6 @@ static int qeth_alloc_out_buf(struct qeth_qdio_out_q *q, unsigned int bidx, ...@@ -2530,7 +2530,6 @@ static int qeth_alloc_out_buf(struct qeth_qdio_out_q *q, unsigned int bidx,
newbuf->buffer = q->qdio_bufs[bidx]; newbuf->buffer = q->qdio_bufs[bidx];
skb_queue_head_init(&newbuf->skb_list); skb_queue_head_init(&newbuf->skb_list);
lockdep_set_class(&newbuf->skb_list.lock, &qdio_out_skb_queue_key); lockdep_set_class(&newbuf->skb_list.lock, &qdio_out_skb_queue_key);
newbuf->q = q;
atomic_set(&newbuf->state, QETH_QDIO_BUF_EMPTY); atomic_set(&newbuf->state, QETH_QDIO_BUF_EMPTY);
q->bufs[bidx] = newbuf; q->bufs[bidx] = newbuf;
return 0; return 0;
......
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