ibmasm.h (278d72ae8803ffcd16070c95fe1d53f4466dc741) | ibmasm.h (8818760512424f60ad9fafb7a087b007a9274eb3) |
---|---|
1 2/* 3 * IBM ASM Service Processor Device Driver 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 81 unchanged lines hidden (view full) --- 90 91struct command { 92 struct list_head queue_node; 93 wait_queue_head_t wait; 94 unsigned char *buffer; 95 size_t buffer_size; 96 int status; 97 struct kobject kobj; | 1 2/* 3 * IBM ASM Service Processor Device Driver 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 81 unchanged lines hidden (view full) --- 90 91struct command { 92 struct list_head queue_node; 93 wait_queue_head_t wait; 94 unsigned char *buffer; 95 size_t buffer_size; 96 int status; 97 struct kobject kobj; |
98 spinlock_t *lock; |
|
98}; 99#define to_command(c) container_of(c, struct command, kobj) 100 101static inline void command_put(struct command *cmd) 102{ | 99}; 100#define to_command(c) container_of(c, struct command, kobj) 101 102static inline void command_put(struct command *cmd) 103{ |
104 unsigned long flags; 105 106 spin_lock_irqsave(cmd->lock, flags); |
|
103 kobject_put(&cmd->kobj); | 107 kobject_put(&cmd->kobj); |
108 spin_unlock_irqrestore(cmd->lock, flags); |
|
104} 105 106static inline void command_get(struct command *cmd) 107{ 108 kobject_get(&cmd->kobj); 109} 110 111 --- 42 unchanged lines hidden (view full) --- 154 char devname[IBMASM_NAME_SIZE]; 155 unsigned int number; 156 struct ibmasm_remote *remote; 157 int serial_line; 158 struct device *dev; 159}; 160 161/* command processing */ | 109} 110 111static inline void command_get(struct command *cmd) 112{ 113 kobject_get(&cmd->kobj); 114} 115 116 --- 42 unchanged lines hidden (view full) --- 159 char devname[IBMASM_NAME_SIZE]; 160 unsigned int number; 161 struct ibmasm_remote *remote; 162 int serial_line; 163 struct device *dev; 164}; 165 166/* command processing */ |
162extern struct command *ibmasm_new_command(size_t buffer_size); | 167extern struct command *ibmasm_new_command(struct service_processor *sp, size_t buffer_size); |
163extern void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); 164extern void ibmasm_wait_for_response(struct command *cmd, int timeout); 165extern void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); 166 167/* event processing */ 168extern int ibmasm_event_buffer_init(struct service_processor *sp); 169extern void ibmasm_event_buffer_exit(struct service_processor *sp); 170extern void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size); --- 44 unchanged lines hidden --- | 168extern void ibmasm_exec_command(struct service_processor *sp, struct command *cmd); 169extern void ibmasm_wait_for_response(struct command *cmd, int timeout); 170extern void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size); 171 172/* event processing */ 173extern int ibmasm_event_buffer_init(struct service_processor *sp); 174extern void ibmasm_event_buffer_exit(struct service_processor *sp); 175extern void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size); --- 44 unchanged lines hidden --- |