Commit 5382fe11 authored by Jan Glauber's avatar Jan Glauber Committed by Martin Schwidefsky

[S390] qdio: remove memset hack

Remove memset hack that relied on the layout of struct qdio_q
to avoid deletion of the slib pointer.
Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent f3eb20fa
...@@ -296,10 +296,8 @@ struct qdio_q { ...@@ -296,10 +296,8 @@ struct qdio_q {
struct qdio_irq *irq_ptr; struct qdio_irq *irq_ptr;
struct sl *sl; struct sl *sl;
/* /*
* Warning: Leave this member at the end so it won't be cleared in * A page is allocated under this pointer and used for slib and sl.
* qdio_fill_qs. A page is allocated under this pointer and used for * slib is 2048 bytes big and sl points to offset PAGE_SIZE / 2.
* slib and sl. slib is 2048 bytes big and sl points to offset
* PAGE_SIZE / 2.
*/ */
struct slib *slib; struct slib *slib;
} __attribute__ ((aligned(256))); } __attribute__ ((aligned(256)));
......
...@@ -106,10 +106,12 @@ int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs, int nr_output_qs ...@@ -106,10 +106,12 @@ int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs, int nr_output_qs
static void setup_queues_misc(struct qdio_q *q, struct qdio_irq *irq_ptr, static void setup_queues_misc(struct qdio_q *q, struct qdio_irq *irq_ptr,
qdio_handler_t *handler, int i) qdio_handler_t *handler, int i)
{ {
/* must be cleared by every qdio_establish */ struct slib *slib = q->slib;
memset(q, 0, ((char *)&q->slib) - ((char *)q));
memset(q->slib, 0, PAGE_SIZE);
/* queue must be cleared for qdio_establish */
memset(q, 0, sizeof(*q));
memset(slib, 0, PAGE_SIZE);
q->slib = slib;
q->irq_ptr = irq_ptr; q->irq_ptr = irq_ptr;
q->mask = 1 << (31 - i); q->mask = 1 << (31 - i);
q->nr = i; q->nr = i;
......
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