diff options
Diffstat (limited to 'drivers/misc/ibmasm/lowlevel.c')
-rw-r--r-- | drivers/misc/ibmasm/lowlevel.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/misc/ibmasm/lowlevel.c b/drivers/misc/ibmasm/lowlevel.c index 5156de2759d8..47949a2c7e94 100644 --- a/drivers/misc/ibmasm/lowlevel.c +++ b/drivers/misc/ibmasm/lowlevel.c | |||
@@ -46,8 +46,8 @@ int ibmasm_send_i2o_message(struct service_processor *sp) | |||
46 | 46 | ||
47 | message = get_i2o_message(sp->base_address, mfa); | 47 | message = get_i2o_message(sp->base_address, mfa); |
48 | 48 | ||
49 | memcpy(&message->header, &header, sizeof(struct i2o_header)); | 49 | memcpy_toio(&message->header, &header, sizeof(struct i2o_header)); |
50 | memcpy(&message->data, command->buffer, command_size); | 50 | memcpy_toio(&message->data, command->buffer, command_size); |
51 | 51 | ||
52 | set_mfa_inbound(sp->base_address, mfa); | 52 | set_mfa_inbound(sp->base_address, mfa); |
53 | 53 | ||
@@ -59,23 +59,27 @@ irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id, struct pt_regs *reg | |||
59 | u32 mfa; | 59 | u32 mfa; |
60 | struct service_processor *sp = (struct service_processor *)dev_id; | 60 | struct service_processor *sp = (struct service_processor *)dev_id; |
61 | void __iomem *base_address = sp->base_address; | 61 | void __iomem *base_address = sp->base_address; |
62 | char tsbuf[32]; | ||
62 | 63 | ||
63 | if (!sp_interrupt_pending(base_address)) | 64 | if (!sp_interrupt_pending(base_address)) |
64 | return IRQ_NONE; | 65 | return IRQ_NONE; |
65 | 66 | ||
67 | dbg("respond to interrupt at %s\n", get_timestamp(tsbuf)); | ||
68 | |||
66 | if (mouse_interrupt_pending(sp)) { | 69 | if (mouse_interrupt_pending(sp)) { |
67 | ibmasm_handle_mouse_interrupt(sp); | 70 | ibmasm_handle_mouse_interrupt(sp, regs); |
68 | mfa = get_mfa_outbound(base_address); | ||
69 | clear_mouse_interrupt(sp); | 71 | clear_mouse_interrupt(sp); |
70 | set_mfa_outbound(base_address, mfa); | ||
71 | return IRQ_HANDLED; | ||
72 | } | 72 | } |
73 | 73 | ||
74 | mfa = get_mfa_outbound(base_address); | 74 | mfa = get_mfa_outbound(base_address); |
75 | if (valid_mfa(mfa)) { | 75 | if (valid_mfa(mfa)) { |
76 | struct i2o_message *msg = get_i2o_message(base_address, mfa); | 76 | struct i2o_message *msg = get_i2o_message(base_address, mfa); |
77 | ibmasm_receive_message(sp, &msg->data, incoming_data_size(msg)); | 77 | ibmasm_receive_message(sp, &msg->data, incoming_data_size(msg)); |
78 | } | 78 | } else |
79 | dbg("didn't get a valid MFA\n"); | ||
80 | |||
79 | set_mfa_outbound(base_address, mfa); | 81 | set_mfa_outbound(base_address, mfa); |
82 | dbg("finished interrupt at %s\n", get_timestamp(tsbuf)); | ||
83 | |||
80 | return IRQ_HANDLED; | 84 | return IRQ_HANDLED; |
81 | } | 85 | } |