Lines Matching refs:rbu_data
63 } rbu_data; variable
88 rbu_data.packet_read_count = 0; in init_packet_head()
89 rbu_data.num_packets = 0; in init_packet_head()
90 rbu_data.packetsize = 0; in init_packet_head()
91 rbu_data.imagesize = 0; in init_packet_head()
106 if (!rbu_data.packetsize) { in create_packet()
112 spin_unlock(&rbu_data.lock); in create_packet()
119 spin_lock(&rbu_data.lock); in create_packet()
136 packet_array_size = max_t(unsigned int, allocation_floor / rbu_data.packetsize, 1); in create_packet()
143 spin_lock(&rbu_data.lock); in create_packet()
153 spin_lock(&rbu_data.lock); in create_packet()
172 spin_lock(&rbu_data.lock); in create_packet()
182 ++rbu_data.num_packets; in create_packet()
218 if (!rbu_data.packetsize) { in packetize_data()
227 if ((temp + rbu_data.packetsize) < end) in packetize_data()
228 packet_length = rbu_data.packetsize; in packetize_data()
242 rbu_data.imagesize = length; in packetize_data()
289 if (0 == rbu_data.num_packets) in packet_read_list()
293 bytes_read = rbu_data.packet_read_count; in packet_read_list()
309 *pread_length = bytes_read - rbu_data.packet_read_count; in packet_read_list()
310 rbu_data.packet_read_count = bytes_read; in packet_read_list()
325 memset(newpacket->data, 0, rbu_data.packetsize); in packet_empty_list()
332 rbu_data.packet_read_count = 0; in packet_empty_list()
333 rbu_data.num_packets = 0; in packet_empty_list()
334 rbu_data.imagesize = 0; in packet_empty_list()
343 if (!rbu_data.image_update_buffer) in img_update_free()
349 memset(rbu_data.image_update_buffer, 0, in img_update_free()
350 rbu_data.image_update_buffer_size); in img_update_free()
351 free_pages((unsigned long) rbu_data.image_update_buffer, in img_update_free()
352 rbu_data.image_update_ordernum); in img_update_free()
357 rbu_data.image_update_ordernum = -1; in img_update_free()
358 rbu_data.image_update_buffer = NULL; in img_update_free()
359 rbu_data.image_update_buffer_size = 0; in img_update_free()
360 rbu_data.bios_image_size = 0; in img_update_free()
383 if (rbu_data.image_update_buffer_size >= size) { in img_update_realloc()
387 if ((size != 0) && (rbu_data.image_update_buffer == NULL)) { in img_update_realloc()
403 spin_unlock(&rbu_data.lock); in img_update_realloc()
408 spin_lock(&rbu_data.lock); in img_update_realloc()
418 rbu_data.image_update_buffer = image_update_buffer; in img_update_realloc()
419 rbu_data.image_update_buffer_size = size; in img_update_realloc()
420 rbu_data.bios_image_size = rbu_data.image_update_buffer_size; in img_update_realloc()
421 rbu_data.image_update_ordernum = ordernum; in img_update_realloc()
433 if (rbu_data.num_packets == 0) { in read_packet_data()
439 if (pos > rbu_data.imagesize) { in read_packet_data()
445 bytes_left = rbu_data.imagesize - pos; in read_packet_data()
451 if ((pos + count) > rbu_data.imagesize) { in read_packet_data()
452 rbu_data.packet_read_count = 0; in read_packet_data()
465 if ((rbu_data.image_update_buffer == NULL) || in read_rbu_mono_data()
466 (rbu_data.bios_image_size == 0)) { in read_rbu_mono_data()
468 rbu_data.image_update_buffer, in read_rbu_mono_data()
469 rbu_data.bios_image_size); in read_rbu_mono_data()
474 rbu_data.image_update_buffer, rbu_data.bios_image_size); in read_rbu_mono_data()
483 spin_lock(&rbu_data.lock); in data_read()
492 spin_unlock(&rbu_data.lock); in data_read()
499 rbu_data.entry_created = 0; in callbackfn_rbu()
507 spin_lock(&rbu_data.lock); in callbackfn_rbu()
510 memcpy(rbu_data.image_update_buffer, in callbackfn_rbu()
527 spin_unlock(&rbu_data.lock); in callbackfn_rbu()
549 spin_lock(&rbu_data.lock); in image_type_write()
573 if (!rbu_data.entry_created) { in image_type_write()
574 spin_unlock(&rbu_data.lock); in image_type_write()
583 rbu_data.entry_created = 1; in image_type_write()
585 spin_lock(&rbu_data.lock); in image_type_write()
589 spin_unlock(&rbu_data.lock); in image_type_write()
596 spin_unlock(&rbu_data.lock); in image_type_write()
608 spin_lock(&rbu_data.lock); in packet_size_read()
609 size = scnprintf(buffer, count, "%lu\n", rbu_data.packetsize); in packet_size_read()
610 spin_unlock(&rbu_data.lock); in packet_size_read()
620 spin_lock(&rbu_data.lock); in packet_size_write()
624 rbu_data.packetsize = temp; in packet_size_write()
626 spin_unlock(&rbu_data.lock); in packet_size_write()
645 spin_lock_init(&rbu_data.lock); in dcdrbu_init()
658 rbu_data.entry_created = 0; in dcdrbu_init()
668 spin_lock(&rbu_data.lock); in dcdrbu_exit()
671 spin_unlock(&rbu_data.lock); in dcdrbu_exit()