Commit e58b0d90 authored by Steffen Maier's avatar Steffen Maier Committed by Martin Schwidefsky

[S390] qdio: fix kernel panic for zfcp 31-bit

The queue_start_poll function pointer field in struct qdio_initialize
had to change its type and become a vector of function pointers to
support asynchronous delivery of storage blocks so rename the field to
make the type change explicit and ensure no other user of qdio tries
to use the field the old way. During setting up the qdio queues, only
dereference vector elements if the vector is actually allocated.
Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: default avatarEinar Lueck <elelueck@de.ibm.com>
Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 91302143
...@@ -352,7 +352,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int, ...@@ -352,7 +352,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
* @no_output_qs: number of output queues * @no_output_qs: number of output queues
* @input_handler: handler to be called for input queues * @input_handler: handler to be called for input queues
* @output_handler: handler to be called for output queues * @output_handler: handler to be called for output queues
* @queue_start_poll: polling handlers (one per input queue or NULL) * @queue_start_poll_array: polling handlers (one per input queue or NULL)
* @int_parm: interruption parameter * @int_parm: interruption parameter
* @input_sbal_addr_array: address of no_input_qs * 128 pointers * @input_sbal_addr_array: address of no_input_qs * 128 pointers
* @output_sbal_addr_array: address of no_output_qs * 128 pointers * @output_sbal_addr_array: address of no_output_qs * 128 pointers
...@@ -372,7 +372,8 @@ struct qdio_initialize { ...@@ -372,7 +372,8 @@ struct qdio_initialize {
unsigned int no_output_qs; unsigned int no_output_qs;
qdio_handler_t *input_handler; qdio_handler_t *input_handler;
qdio_handler_t *output_handler; qdio_handler_t *output_handler;
void (**queue_start_poll) (struct ccw_device *, int, unsigned long); void (**queue_start_poll_array) (struct ccw_device *, int,
unsigned long);
int scan_threshold; int scan_threshold;
unsigned long int_parm; unsigned long int_parm;
void **input_sbal_addr_array; void **input_sbal_addr_array;
......
...@@ -177,7 +177,8 @@ static void setup_queues(struct qdio_irq *irq_ptr, ...@@ -177,7 +177,8 @@ static void setup_queues(struct qdio_irq *irq_ptr,
setup_queues_misc(q, irq_ptr, qdio_init->input_handler, i); setup_queues_misc(q, irq_ptr, qdio_init->input_handler, i);
q->is_input_q = 1; q->is_input_q = 1;
q->u.in.queue_start_poll = qdio_init->queue_start_poll[i]; q->u.in.queue_start_poll = qdio_init->queue_start_poll_array ?
qdio_init->queue_start_poll_array[i] : NULL;
setup_storage_lists(q, irq_ptr, input_sbal_array, i); setup_storage_lists(q, irq_ptr, input_sbal_array, i);
input_sbal_array += QDIO_MAX_BUFFERS_PER_Q; input_sbal_array += QDIO_MAX_BUFFERS_PER_Q;
......
...@@ -4521,7 +4521,7 @@ static int qeth_qdio_establish(struct qeth_card *card) ...@@ -4521,7 +4521,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
init_data.no_output_qs = card->qdio.no_out_queues; init_data.no_output_qs = card->qdio.no_out_queues;
init_data.input_handler = card->discipline.input_handler; init_data.input_handler = card->discipline.input_handler;
init_data.output_handler = card->discipline.output_handler; init_data.output_handler = card->discipline.output_handler;
init_data.queue_start_poll = queue_start_poll; init_data.queue_start_poll_array = queue_start_poll;
init_data.int_parm = (unsigned long) card; init_data.int_parm = (unsigned long) card;
init_data.input_sbal_addr_array = (void **) in_sbal_ptrs; init_data.input_sbal_addr_array = (void **) in_sbal_ptrs;
init_data.output_sbal_addr_array = (void **) out_sbal_ptrs; init_data.output_sbal_addr_array = (void **) out_sbal_ptrs;
......
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