[
  [
    "linux-2.6.23/drivers/net/netconsole.c.orig", 
    "linux-2.6.23/drivers/net/netconsole.c", 
    [
      "--- linux-2.6.23/drivers/net/netconsole.c.orig", 
      "+++ linux-2.6.23/drivers/net/netconsole.c", 
      "@@ -62,24 +62,83 @@", 
      ".remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},", 
      "};", 
      "static int configured = 0;", 
      "+static char *message_buffer = NULL;", 
      "+static unsigned int message_buffer_length = 0;", 
      "+static unsigned int packet_number = 1;", 
      "", 
      "-#define MAX_PRINT_CHUNK 1000", 
      "+static void queue_message(const char *message, unsigned int length)", 
      "+{", 
      "+\tif (!message_buffer) {", 
      "+\t\t/* Allocate space for the new buffer but also first add", 
      "+\t\t   add a header containing packet number and time stamp", 
      "+\t\t   (secs, usecs). Also reserve space for a NULL termination", 
      "+\t\t   at the end. */", 
      "+\t\tunsigned int tmp = 0;", 
      "+\t\tunsigned long long current_time =", 
      "+\t\t\t(unsigned long long)jiffies * (1000000000 / HZ);", 
      "+\t\tunsigned long usecs = do_div(current_time, 1000000000) / 1000;", 
      "+\t\tmessage_buffer_length = 3 * sizeof(unsigned int) + length + 1;", 
      "+\t\tmessage_buffer = kmalloc(message_buffer_length, GFP_KERNEL);", 
      "+\t\ttmp = htonl(packet_number++);", 
      "+\t\tmemcpy(message_buffer, &tmp, sizeof(unsigned int));", 
      "+\t\ttmp = htonl(current_time);", 
      "+\t\tmemcpy(message_buffer + sizeof(unsigned int), &tmp,", 
      "+\t\t       sizeof(unsigned int));", 
      "+\t\ttmp = htonl(usecs);", 
      "+\t\tmemcpy(message_buffer + 2 * sizeof(unsigned int), &tmp,", 
      "+\t\t       sizeof(unsigned int));", 
      "+\t\tmemcpy(message_buffer + 3 * sizeof(unsigned int), message,", 
      "+\t\t       length);", 
      "+\t}", 
      "+\telse {", 
      "+\t\t/* Reallocate space for the new message, remove the", 
      "+\t\t   NULL termination at the end of the old message queue,", 
      "+\t\t   copy the new message to the end and include a new", 
      "+\t\t   NULL termination again. */", 
      "+\t\tchar *tmp = kmalloc(message_buffer_length - 1, GFP_KERNEL);", 
      "+\t\tmemcpy(tmp, message_buffer, message_buffer_length - 1);", 
      "+\t\tkfree(message_buffer);", 
      "+\t\tmessage_buffer = kmalloc(message_buffer_length + length,", 
      "+\t\t\t\t\t GFP_KERNEL);", 
      "+\t\tmemcpy(message_buffer, tmp, message_buffer_length - 1);", 
      "+\t\tmemcpy(message_buffer + message_buffer_length - 1, message,", 
      "+\t\t       length);", 
      "+\t\tmessage_buffer_length += length;", 
      "+\t\tkfree(tmp);", 
      "+\t}", 
      "+", 
      "+\t/* Note: The NULL termination is included inside the message_buffer */", 
      "+\tmessage_buffer[message_buffer_length - 1] = '\\0';", 
      "+}", 
      "", 
      "static void write_msg(struct console *con, const char *msg, unsigned int len)", 
      "{", 
      "-\tint frag, left;", 
      "unsigned long flags;", 
      "+\tunsigned int pos = 0;", 
      "+\tunsigned int new_starting_point = 0;", 
      "", 
      "if (!np.dev)", 
      "return;", 
      "", 
      "local_irq_save(flags);", 
      "", 
      "-\tfor(left = len; left; ) {", 
      "-\t\tfrag = min(left, MAX_PRINT_CHUNK);", 
      "-\t\tnetpoll_send_udp(&np, msg, frag);", 
      "-\t\tmsg += frag;", 
      "-\t\tleft -= frag;", 
      "+\t/* Queue messages up to the next new line */", 
      "+\twhile (pos < len) {", 
      "+\t\tif (msg[pos] == '\\n') {", 
      "+\t\t\tqueue_message(msg + new_starting_point,", 
      "+\t\t\t\t      pos - new_starting_point);", 
      "+\t\t\tnetpoll_send_udp(&np, message_buffer,", 
      "+\t\t\t\t\t message_buffer_length);", 
      "+\t\t\tkfree(message_buffer);", 
      "+\t\t\tmessage_buffer = NULL;", 
      "+\t\t\tmessage_buffer_length = 0;", 
      "+\t\t\tnew_starting_point = pos + 1;", 
      "+\t\t}", 
      "+\t\t++pos;", 
      "+\t}", 
      "+\tif (new_starting_point < len) {", 
      "+\t\tqueue_message(msg + new_starting_point,", 
      "+\t\t\t      len - new_starting_point);", 
      "}", 
      "", 
      "local_irq_restore(flags);"
    ]
  ], 
  [
    "linux-2.6.23/net/core/netpoll.c.orig", 
    "linux-2.6.23/net/core/netpoll.c", 
    [
      "--- linux-2.6.23/net/core/netpoll.c.orig", 
      "+++ linux-2.6.23/net/core/netpoll.c", 
      "@@ -710,7 +710,7 @@", 
      "np->name);", 
      "break;", 
      "}", 
      "-\t\t\tcond_resched();", 
      "+\t\t\tschedule();", 
      "}", 
      "", 
      "/* If carrier appears to come up instantly, we don't"
    ]
  ]
]