summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/qdio.c')
-rw-r--r--drivers/s390/cio/qdio.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 40a3208c7cf..7a353db8564 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -48,11 +48,11 @@
#include <asm/debug.h>
#include <asm/s390_rdev.h>
#include <asm/qdio.h>
+#include <asm/airq.h>
#include "cio.h"
#include "css.h"
#include "device.h"
-#include "airq.h"
#include "qdio.h"
#include "ioasm.h"
#include "chsc.h"
@@ -96,7 +96,7 @@ static debug_info_t *qdio_dbf_slsb_in;
static volatile struct qdio_q *tiq_list=NULL; /* volatile as it could change
during a while loop */
static DEFINE_SPINLOCK(ttiq_list_lock);
-static int register_thinint_result;
+static void *tiqdio_ind;
static void tiqdio_tl(unsigned long);
static DECLARE_TASKLET(tiqdio_tasklet,tiqdio_tl,0);
@@ -399,7 +399,7 @@ qdio_get_indicator(void)
{
int i;
- for (i=1;i<INDICATORS_PER_CACHELINE;i++)
+ for (i = 0; i < INDICATORS_PER_CACHELINE; i++)
if (!indicator_used[i]) {
indicator_used[i]=1;
return indicators+i;
@@ -1911,8 +1911,7 @@ qdio_fill_thresholds(struct qdio_irq *irq_ptr,
}
}
-static int
-tiqdio_thinint_handler(void)
+static void tiqdio_thinint_handler(void *ind, void *drv_data)
{
QDIO_DBF_TEXT4(0,trace,"thin_int");
@@ -1925,7 +1924,6 @@ tiqdio_thinint_handler(void)
tiqdio_clear_global_summary();
tiqdio_inbound_checks();
- return 0;
}
static void
@@ -2445,7 +2443,7 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero)
real_addr_dev_st_chg_ind=0;
} else {
real_addr_local_summary_bit=
- virt_to_phys((volatile void *)indicators);
+ virt_to_phys((volatile void *)tiqdio_ind);
real_addr_dev_st_chg_ind=
virt_to_phys((volatile void *)irq_ptr->dev_st_chg_ind);
}
@@ -3740,23 +3738,25 @@ static void
tiqdio_register_thinints(void)
{
char dbf_text[20];
- register_thinint_result=
- s390_register_adapter_interrupt(&tiqdio_thinint_handler);
- if (register_thinint_result) {
- sprintf(dbf_text,"regthn%x",(register_thinint_result&0xff));
+
+ tiqdio_ind =
+ s390_register_adapter_interrupt(&tiqdio_thinint_handler, NULL);
+ if (IS_ERR(tiqdio_ind)) {
+ sprintf(dbf_text, "regthn%lx", PTR_ERR(tiqdio_ind));
QDIO_DBF_TEXT0(0,setup,dbf_text);
QDIO_PRINT_ERR("failed to register adapter handler " \
- "(rc=%i).\nAdapter interrupts might " \
+ "(rc=%li).\nAdapter interrupts might " \
"not work. Continuing.\n",
- register_thinint_result);
+ PTR_ERR(tiqdio_ind));
+ tiqdio_ind = NULL;
}
}
static void
tiqdio_unregister_thinints(void)
{
- if (!register_thinint_result)
- s390_unregister_adapter_interrupt(&tiqdio_thinint_handler);
+ if (tiqdio_ind)
+ s390_unregister_adapter_interrupt(tiqdio_ind);
}
static int
@@ -3768,8 +3768,8 @@ qdio_get_qdio_memory(void)
for (i=1;i<INDICATORS_PER_CACHELINE;i++)
indicator_used[i]=0;
indicators = kzalloc(sizeof(__u32)*(INDICATORS_PER_CACHELINE),
- GFP_KERNEL);
- if (!indicators)
+ GFP_KERNEL);
+ if (!indicators)
return -ENOMEM;
return 0;
}
@@ -3780,7 +3780,6 @@ qdio_release_qdio_memory(void)
kfree(indicators);
}
-
static void
qdio_unregister_dbf_views(void)
{