[PATCH 451/641] Staging: sep: fix a conversion thinko

Previous thread: none

Next thread: [merged] comedi-null-dereference-of-amcc-in-v_pci_card_list_init.patch removed from -mm tree by akpm on Tuesday, September 15, 2009 - 2:06 pm. (1 message)
From: Greg KH
Date: Tuesday, September 15, 2009 - 12:05 pm

Here is the bit staging update for the 2.6.31 merge window.

There are a lot of new drivers in here:
	- microsoft hyper-v drivers
	- wireless drivers
	- cowloop
	- others that I can't remember
and lots of cleanups and fixes as well, and a lot of drivers have been
removed due to lack of activity, or because they duplicate other drivers
in the kernel tree.  See the shortlog below for details.

All of these are contained within the drivers/staging tree, and have
been in the linux-next and -mm trees for a while now.

Overall, we almost broke even with our cleanups and removals for what
was done here:
 1267 files changed, 297615 insertions(+), 214568 deletions(-)

So only a small amount of new crap added :)

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging-2.6.git/

The patches will be sent as a follow-on to this message to the
driver-devel list for people to see.

thanks,

greg k-h

--------------

 drivers/staging/Kconfig                            |   36 +-
 drivers/staging/Makefile                           |   20 +-
 drivers/staging/agnx/pci.c                         |    2 +-
 drivers/staging/altpciechdma/altpciechdma.c        |    2 +-
 drivers/staging/android/binder.c                   |  713 +-
 drivers/staging/android/lowmemorykiller.c          |   41 +-
 drivers/staging/android/lowmemorykiller.txt        |   16 -
 drivers/staging/asus_oled/asus_oled.c              |  404 +-
 drivers/staging/at76_usb/Kconfig                   |    8 -
 drivers/staging/at76_usb/Makefile                  |    1 -
 drivers/staging/at76_usb/TODO                      |    7 -
 drivers/staging/at76_usb/at76_usb.c                | 5579 -----------
 drivers/staging/at76_usb/at76_usb.h                |  706 --
 drivers/staging/b3dfg/b3dfg.c                      |   41 +-
 drivers/staging/comedi/comedi.h                    | 1002 +-
 drivers/staging/comedi/comedi_compat32.c           |  115 +-
 drivers/staging/comedi/comedi_compat32.h           |    4 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

I moved the continual,

if (binder_debug_mask & mask)
	printk()

into a single macro so it's all in one place. It could be refined further
from there.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |  512 ++++++++++++++++++++------------------
 1 files changed, 266 insertions(+), 246 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 17d89a8..8921393 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -100,6 +100,12 @@ static int binder_set_stop_on_user_error(const char *val,
 module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
 	param_get_int, &binder_stop_on_user_error, S_IWUSR | S_IRUGO);
 
+#define binder_debug(mask, x...) \
+	do { \
+		if (binder_debug_mask & mask) \
+			printk(KERN_INFO x); \
+	} while (0)
+
 #define binder_user_error(x...) \
 	do { \
 		if (binder_debug_mask & BINDER_DEBUG_USER_ERROR) \
@@ -468,9 +474,9 @@ static void binder_set_nice(long nice)
 		return;
 	}
 	min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
-	if (binder_debug_mask & BINDER_DEBUG_PRIORITY_CAP)
-		printk(KERN_INFO "binder: %d: nice value %ld not allowed use "
-		       "%ld instead\n", current->pid, nice, min_nice);
+	binder_debug(BINDER_DEBUG_PRIORITY_CAP,
+		     "binder: %d: nice value %ld not allowed use "
+		     "%ld instead\n", current->pid, nice, min_nice);
 	set_user_nice(current, min_nice);
 	if (min_nice < 20)
 		return;
@@ -500,9 +506,9 @@ static void binder_insert_free_buffer(struct binder_proc *proc,
 
 	new_buffer_size = binder_buffer_size(proc, new_buffer);
 
-	if (binder_debug_mask & BINDER_DEBUG_BUFFER_ALLOC)
-		printk(KERN_INFO "binder: %d: add free buffer, size %zd, "
-		       "at %p\n", proc->pid, new_buffer_size, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

I removed the binder_transaction_buffer_release predefine, and put
the actual function in place of it.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |  138 ++++++++++++++++++-------------------
 1 files changed, 67 insertions(+), 71 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 8921393..e1e6ade 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1270,7 +1270,73 @@ static void binder_send_failed_reply(struct binder_transaction *t,
 
 static void binder_transaction_buffer_release(struct binder_proc *proc,
 					      struct binder_buffer *buffer,
-					      size_t *failed_at);
+					      size_t *failed_at)
+{
+	size_t *offp, *off_end;
+	int debug_id = buffer->debug_id;
+
+	binder_debug(BINDER_DEBUG_TRANSACTION,
+		     "binder: %d buffer release %d, size %zd-%zd, failed at %p\n",
+		     proc->pid, buffer->debug_id,
+		     buffer->data_size, buffer->offsets_size, failed_at);
+
+	if (buffer->target_node)
+		binder_dec_node(buffer->target_node, 1, 0);
+
+	offp = (size_t *)(buffer->data + ALIGN(buffer->data_size, sizeof(void *)));
+	if (failed_at)
+		off_end = failed_at;
+	else
+		off_end = (void *)offp + buffer->offsets_size;
+	for (; offp < off_end; offp++) {
+		struct flat_binder_object *fp;
+		if (*offp > buffer->data_size - sizeof(*fp) ||
+		    buffer->data_size < sizeof(*fp) ||
+		    !IS_ALIGNED(*offp, sizeof(void *))) {
+			printk(KERN_ERR "binder: transaction release %d bad"
+					"offset %zd, size %zd\n", debug_id, *offp, buffer->data_size);
+			continue;
+		}
+		fp = (struct flat_binder_object *)(buffer->data + *offp);
+		switch (fp->type) {
+		case BINDER_TYPE_BINDER:
+		case BINDER_TYPE_WEAK_BINDER: {
+			struct binder_node *node = binder_get_node(proc, fp->binder);
+			if (node == ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

Declare the binder_deferred_state enum, and use the new enum
for one of the binder_defer_work function arguments. This
should keep the argument within the confines of the enum
instead of the whole int range.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index e1e6ade..7720711 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -243,7 +243,7 @@ struct binder_buffer {
 	uint8_t data[0];
 };
 
-enum {
+enum binder_deferred_state {
 	BINDER_DEFERRED_PUT_FILES    = 0x01,
 	BINDER_DEFERRED_FLUSH        = 0x02,
 	BINDER_DEFERRED_RELEASE      = 0x04,
@@ -326,7 +326,8 @@ struct binder_transaction {
 	uid_t	sender_euid;
 };
 
-static void binder_defer_work(struct binder_proc *proc, int defer);
+static void
+binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer);
 
 /*
  * copied from get_unused_fd_flags
@@ -3071,7 +3072,8 @@ static void binder_deferred_func(struct work_struct *work)
 }
 static DECLARE_WORK(binder_deferred_work, binder_deferred_func);
 
-static void binder_defer_work(struct binder_proc *proc, int defer)
+static void
+binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer)
 {
 	mutex_lock(&binder_deferred_lock);
 	proc->deferred_work |= defer;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

Replaced a manual hlist_head declaration with a macro based one.
Also reorganized the globals to be grouped better.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7720711..021f08c 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -31,18 +31,21 @@
 #include <linux/sched.h>
 #include <linux/uaccess.h>
 #include <linux/vmalloc.h>
+
 #include "binder.h"
 
 static DEFINE_MUTEX(binder_lock);
+static DEFINE_MUTEX(binder_deferred_lock);
+
 static HLIST_HEAD(binder_procs);
+static HLIST_HEAD(binder_deferred_list);
+static HLIST_HEAD(binder_dead_nodes);
+
+static struct proc_dir_entry *binder_proc_dir_entry_root;
+static struct proc_dir_entry *binder_proc_dir_entry_proc;
 static struct binder_node *binder_context_mgr_node;
 static uid_t binder_context_mgr_uid = -1;
 static int binder_last_id;
-static struct proc_dir_entry *binder_proc_dir_entry_root;
-static struct proc_dir_entry *binder_proc_dir_entry_proc;
-static struct hlist_head binder_dead_nodes;
-static HLIST_HEAD(binder_deferred_list);
-static DEFINE_MUTEX(binder_deferred_lock);
 
 static int binder_read_proc_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

An initial cleanup of all the binder_stat statements. The binder
command and return stats still need some assistance tho.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |   54 ++++++++++++++++++++++---------------
 1 files changed, 32 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 021f08c..bf2244e 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -117,7 +117,7 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error,
 			binder_stop_on_user_error = 2; \
 	} while (0)
 
-enum {
+enum binder_stat_types {
 	BINDER_STAT_PROC,
 	BINDER_STAT_THREAD,
 	BINDER_STAT_NODE,
@@ -137,6 +137,16 @@ struct binder_stats {
 
 static struct binder_stats binder_stats;
 
+static inline void binder_stats_deleted(enum binder_stat_types type)
+{
+	binder_stats.obj_deleted[type]++;
+}
+
+static inline void binder_stats_created(enum binder_stat_types type)
+{
+	binder_stats.obj_created[type]++;
+}
+
 struct binder_transaction_log_entry {
 	int debug_id;
 	int call_type;
@@ -937,7 +947,7 @@ static struct binder_node *binder_new_node(struct binder_proc *proc,
 	node = kzalloc(sizeof(*node), GFP_KERNEL);
 	if (node == NULL)
 		return NULL;
-	binder_stats.obj_created[BINDER_STAT_NODE]++;
+	binder_stats_created(BINDER_STAT_NODE);
 	rb_link_node(&node->rb_node, parent, p);
 	rb_insert_color(&node->rb_node, &proc->nodes);
 	node->debug_id = ++binder_last_id;
@@ -1025,7 +1035,7 @@ static int binder_dec_node(struct binder_node *node, int strong, int internal)
 					     node->debug_id);
 			}
 			kfree(node);
-			binder_stats.obj_deleted[BINDER_STAT_NODE]++;
+			binder_stats_deleted(BINDER_STAT_NODE);
 		}
 	}
 
@@ -1074,7 +1084,7 @@ static struct binder_ref *binder_get_ref_for_node(struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

This file has a lot of long line problems due to the massive indent issues
that exist. This just cleans up some of the really really long ones.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index bf2244e..7e15f6e 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1308,7 +1308,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
 		    buffer->data_size < sizeof(*fp) ||
 		    !IS_ALIGNED(*offp, sizeof(void *))) {
 			printk(KERN_ERR "binder: transaction release %d bad"
-					"offset %zd, size %zd\n", debug_id, *offp, buffer->data_size);
+					"offset %zd, size %zd\n", debug_id,
+					*offp, buffer->data_size);
 			continue;
 		}
 		fp = (struct flat_binder_object *)(buffer->data + *offp);
@@ -1317,7 +1318,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
 		case BINDER_TYPE_WEAK_BINDER: {
 			struct binder_node *node = binder_get_node(proc, fp->binder);
 			if (node == NULL) {
-				printk(KERN_ERR "binder: transaction release %d bad node %p\n", debug_id, fp->binder);
+				printk(KERN_ERR "binder: transaction release %d"
+				       " bad node %p\n", debug_id, fp->binder);
 				break;
 			}
 			binder_debug(BINDER_DEBUG_TRANSACTION,
@@ -1329,7 +1331,9 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
 		case BINDER_TYPE_WEAK_HANDLE: {
 			struct binder_ref *ref = binder_get_ref(proc, fp->handle);
 			if (ref == NULL) {
-				printk(KERN_ERR "binder: transaction release %d bad handle %ld\n", debug_id, fp->handle);
+				printk(KERN_ERR "binder: transaction release %d"
+				       " bad handle %ld\n", debug_id,
+				       fp->handle);
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

I moved the struct shrinker down so that the predefine isn't needed.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/lowmemorykiller.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index f934393..fb066a3 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -19,12 +19,6 @@
 #include <linux/oom.h>
 #include <linux/sched.h>
 
-static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask);
-
-static struct shrinker lowmem_shrinker = {
-	.shrink = lowmem_shrink,
-	.seeks = DEFAULT_SEEKS * 16
-};
 static uint32_t lowmem_debug_level = 2;
 static int lowmem_adj[6] = {
 	0,
@@ -140,6 +134,11 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
 	return rem;
 }
 
+static struct shrinker lowmem_shrinker = {
+	.shrink = lowmem_shrink,
+	.seeks = DEFAULT_SEEKS * 16
+};
+
 static int __init lowmem_init(void)
 {
 	register_shrinker(&lowmem_shrinker);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:03 pm

From: Daniel Walker <dwalker@fifo99.com>

Move the lowmemorykiller.txt into the actual source file which is really the
correct place for it, and delete lowmemorykiller.txt.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/lowmemorykiller.c   |   16 ++++++++++++++++
 drivers/staging/android/lowmemorykiller.txt |   16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)
 delete mode 100644 drivers/staging/android/lowmemorykiller.txt

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index fb066a3..f13c6fc 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -1,5 +1,21 @@
 /* drivers/misc/lowmemorykiller.c
  *
+ * The lowmemorykiller driver lets user-space specify a set of memory thresholds
+ * where processes with a range of oom_adj values will get killed. Specify the
+ * minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the
+ * number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both
+ * files take a comma separated list of numbers in ascending order.
+ *
+ * For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
+ * "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes
+ * with a oom_adj value of 8 or higher when the free memory drops below 4096 pages
+ * and kill processes with a oom_adj value of 0 or higher when the free memory
+ * drops below 1024 pages.
+ *
+ * The driver considers memory used for caches to be free, but if a large
+ * percentage of the cached memory is locked this can be very inaccurate
+ * and processes may not get killed until the normal oom killer is triggered.
+ *
  * Copyright (C) 2007-2008 Google, Inc.
  *
  * This software is licensed under the terms of the GNU General Public
diff --git ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Daniel Walker <dwalker@fifo99.com>

Clean up 3 or so checkpatch errors from one of my prior patches.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7e15f6e..c6dc58e 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -785,8 +785,8 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc,
 	if (is_async) {
 		proc->free_async_space -= size + sizeof(struct binder_buffer);
 		binder_debug(BINDER_DEBUG_BUFFER_ALLOC_ASYNC,
-		             "binder: %d: binder_alloc_buf size %zd "
-		             "async free %zd\n", proc->pid, size,
+			     "binder: %d: binder_alloc_buf size %zd "
+			     "async free %zd\n", proc->pid, size,
 			     proc->free_async_space);
 	}
 
@@ -1146,7 +1146,7 @@ static void binder_delete_ref(struct binder_ref *ref)
 		binder_debug(BINDER_DEBUG_DEAD_BINDER,
 			     "binder: %d delete ref %d desc %d "
 			     "has death notification\n", ref->proc->pid,
-		             ref->debug_id, ref->desc);
+			     ref->debug_id, ref->desc);
 		list_del(&ref->death->work.entry);
 		kfree(ref->death);
 		binder_stats_deleted(BINDER_STAT_DEATH);
@@ -2331,7 +2331,7 @@ retry:
 				if (!weak && !strong) {
 					binder_debug(BINDER_DEBUG_INTERNAL_REFS,
 						     "binder: %d:%d node %d u%p c%p deleted\n",
-					    	     proc->pid, thread->pid, node->debug_id,
+						     proc->pid, thread->pid, node->debug_id,
 						     node->ptr, node->cookie);
 					rb_erase(&node->rb_node, &proc->nodes);
 					kfree(node);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2860/md4.h |   42 ------------------------------------------
 drivers/staging/rt2870/md4.h |   42 ------------------------------------------
 2 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 drivers/staging/rt2860/md4.h
 delete mode 100644 drivers/staging/rt2870/md4.h

diff --git a/drivers/staging/rt2860/md4.h b/drivers/staging/rt2860/md4.h
deleted file mode 100644
index f1e5b52..0000000
--- a/drivers/staging/rt2860/md4.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *************************************************************************
- * Ralink Tech Inc.
- * 5F., No.36, Taiyuan St., Jhubei City,
- * Hsinchu County 302,
- * Taiwan, R.O.C.
- *
- * (c) Copyright 2002-2007, Ralink Technology, Inc.
- *
- * This program is free software; you can redistribute it and/or modify  *
- * it under the terms of the GNU General Public License as published by  *
- * the Free Software Foundation; either version 2 of the License, or     *
- * (at your option) any later version.                                   *
- *                                                                       *
- * This program is distributed in the hope that it will be useful,       *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- * GNU General Public License for more details.                          *
- *                                                                       *
- * You should have received a copy of the GNU General Public License     *
- * along with this program; if not, write to the                         *
- * Free Software Foundation, Inc.,                                       *
- * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
- *                       ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/internal.h   |  115 -------
 drivers/staging/rtl8187se/ieee80211/rtl_crypto.h |  399 ----------------------
 2 files changed, 0 insertions(+), 514 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/ieee80211/internal.h
 delete mode 100644 drivers/staging/rtl8187se/ieee80211/rtl_crypto.h

diff --git a/drivers/staging/rtl8187se/ieee80211/internal.h b/drivers/staging/rtl8187se/ieee80211/internal.h
deleted file mode 100644
index ddc2235..0000000
--- a/drivers/staging/rtl8187se/ieee80211/internal.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Cryptographic API.
- *
- * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- */
-#ifndef _CRYPTO_INTERNAL_H
-#define _CRYPTO_INTERNAL_H
-
-
-//#include <linux/crypto.h>
-#include "rtl_crypto.h"
-#include <linux/mm.h>
-#include <linux/highmem.h>
-#include <linux/init.h>
-#include <asm/hardirq.h>
-#include <asm/softirq.h>
-#include <asm/kmap_types.h>
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
-#define list_for_each_entry(pos, head, member)				\
-	for (pos = list_entry((head)->next, typeof(*pos), member),	\
-		     prefetch(pos->member.next);			\
-	     &pos->member != (head); 					\
-	     pos = list_entry(pos->member.next, typeof(*pos), member),	\
-		     prefetch(pos->member.next))
-
-static inline void cond_resched(void)
-{
-	if (need_resched()) {
-		set_current_state(TASK_RUNNING);
-		schedule();
-	}
-}
-#endif
-
-extern enum km_type crypto_km_types[];
-
-static inline enum km_type crypto_kmap_type(int out)
-{
-	return ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211_crypt.h |   86 ---------------------------
 1 files changed, 0 insertions(+), 86 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/ieee80211_crypt.h

diff --git a/drivers/staging/rtl8187se/ieee80211_crypt.h b/drivers/staging/rtl8187se/ieee80211_crypt.h
deleted file mode 100644
index b58a3bc..0000000
--- a/drivers/staging/rtl8187se/ieee80211_crypt.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Original code based on Host AP (software wireless LAN access point) driver
- * for Intersil Prism2/2.5/3.
- *
- * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
- * <jkmaline@cc.hut.fi>
- * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
- *
- * Adaption to a generic IEEE 802.11 stack by James Ketrenos
- * <jketreno@linux.intel.com>
- *
- * Copyright (c) 2004, Intel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. See README and COPYING for
- * more details.
- */
-
-/*
- * This file defines the interface to the ieee80211 crypto module.
- */
-#ifndef IEEE80211_CRYPT_H
-#define IEEE80211_CRYPT_H
-
-#include <linux/skbuff.h>
-
-struct ieee80211_crypto_ops {
-	const char *name;
-
-	/* init new crypto context (e.g., allocate private data space,
-	 * select IV, etc.); returns NULL on failure or pointer to allocated
-	 * private data on success */
-	void * (*init)(int keyidx);
-
-	/* deinitialize crypto context and free allocated private data */
-	void (*deinit)(void *priv);
-
-	/* encrypt/decrypt return < 0 on error or >= 0 on success. The return
-	 * value from decrypt_mpdu is passed as the keyidx value for
-	 * decrypt_msdu. skb must have enough head and tail room for ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211_crypt.h |   86 ---------------------------
 1 files changed, 0 insertions(+), 86 deletions(-)
 delete mode 100644 drivers/staging/rtl8192su/ieee80211_crypt.h

diff --git a/drivers/staging/rtl8192su/ieee80211_crypt.h b/drivers/staging/rtl8192su/ieee80211_crypt.h
deleted file mode 100644
index b58a3bc..0000000
--- a/drivers/staging/rtl8192su/ieee80211_crypt.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Original code based on Host AP (software wireless LAN access point) driver
- * for Intersil Prism2/2.5/3.
- *
- * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
- * <jkmaline@cc.hut.fi>
- * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
- *
- * Adaption to a generic IEEE 802.11 stack by James Ketrenos
- * <jketreno@linux.intel.com>
- *
- * Copyright (c) 2004, Intel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. See README and COPYING for
- * more details.
- */
-
-/*
- * This file defines the interface to the ieee80211 crypto module.
- */
-#ifndef IEEE80211_CRYPT_H
-#define IEEE80211_CRYPT_H
-
-#include <linux/skbuff.h>
-
-struct ieee80211_crypto_ops {
-	const char *name;
-
-	/* init new crypto context (e.g., allocate private data space,
-	 * select IV, etc.); returns NULL on failure or pointer to allocated
-	 * private data on success */
-	void * (*init)(int keyidx);
-
-	/* deinitialize crypto context and free allocated private data */
-	void (*deinit)(void *priv);
-
-	/* encrypt/decrypt return < 0 on error or >= 0 on success. The return
-	 * value from decrypt_mpdu is passed as the keyidx value for
-	 * decrypt_msdu. skb must have enough head and tail room for ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    9 -------
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   26 --------------------
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |    5 +---
 drivers/staging/rtl8187se/r8180_core.c             |   16 ------------
 drivers/staging/rtl8187se/r8180_wx.c               |    5 ----
 5 files changed, 1 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index c6cb2e7..1ef415e 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -188,15 +188,6 @@ typedef struct ieee_param {
 }ieee_param;
 
 
-#if WIRELESS_EXT < 17
-#define IW_QUAL_QUAL_INVALID   0x10
-#define IW_QUAL_LEVEL_INVALID  0x20
-#define IW_QUAL_NOISE_INVALID  0x40
-#define IW_QUAL_QUAL_UPDATED   0x1
-#define IW_QUAL_LEVEL_UPDATED  0x2
-#define IW_QUAL_NOISE_UPDATED  0x4
-#endif
-
 #define MSECS(t) msecs_to_jiffies(t)
 #define msleep_interruptible_rtl  msleep_interruptible
 
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
index c0a3c4b..961bcd2 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -605,8 +605,6 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri
 	return 0;
 }
 
-
-#if WIRELESS_EXT >= 18
 static void ieee80211_michael_mic_failure(struct net_device *dev,
 				       struct ieee80211_hdr *hdr,
 				       int keyidx)
@@ -627,30 +625,6 @@ static void ieee80211_michael_mic_failure(struct net_device *dev,
 	wrqu.data.length = sizeof(ev);
 	wireless_send_event(dev, IWEVMICHAELMICFAILURE, &wrqu, (char *) &ev);
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h |   51 -----------------------
 1 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 1ef415e..d3d84b6 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -105,57 +105,6 @@
 
 #define	IEEE_CRYPT_ALG_NAME_LEN			16
 
-#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rtl
-#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rtl
-#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rtl
-////////////////////////////////
-// added for kernel conflict under FC5
-#define ieee80211_wx_get_name   ieee80211_wx_get_name_rtl
-#define free_ieee80211          free_ieee80211_rtl
-#define alloc_ieee80211        alloc_ieee80211_rtl
-///////////////////////////////
-
-//error in ubuntu2.6.22,so add these
-#define ieee80211_wake_queue ieee80211_wake_queue_rtl
-#define ieee80211_stop_queue ieee80211_stop_queue_rtl
-
-#define ieee80211_rx ieee80211_rx_rtl
-
-#define ieee80211_register_crypto_ops	ieee80211_register_crypto_ops_rtl
-#define ieee80211_unregister_crypto_ops	ieee80211_unregister_crypto_ops_rtl
-#define ieee80211_get_crypto_ops	ieee80211_get_crypto_ops_rtl
-#define ieee80211_crypt_deinit_entries	ieee80211_crypt_deinit_entries_rtl
-#define ieee80211_crypt_deinit_handler	ieee80211_crypt_deinit_handler_rtl
-#define ieee80211_crypt_delayed_deinit	ieee80211_crypt_delayed_deinit_rtl
-
-#define ieee80211_txb_free	ieee80211_txb_free_rtl
-#define ieee80211_wx_get_essid	ieee80211_wx_get_essid_rtl
-#define ieee80211_wx_set_essid	ieee80211_wx_set_essid_rtl
-#define ieee80211_wx_set_rate	ieee80211_wx_set_rate_rtl
-#define ieee80211_wx_get_rate	ieee80211_wx_get_rate_rtl
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/dot11d.c       |   10 ----------
 drivers/staging/rtl8187se/ieee80211/dot11d.h       |    2 --
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |    1 -
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index 54bcdcf..9314632 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -130,16 +130,6 @@ Dot11d_UpdateCountryIe(
 	pDot11dInfo->State = DOT11D_STATE_LEARNED;
 }
 
-void dump_chnl_map(u8 * channel_map)
-{
-	int i;
-	printk("Channel List:");
-	for(i=1; i<= MAX_CHANNEL_NUMBER; i++)
-		if(channel_map[i] > 0)
-			printk(" %d(%d)", i, channel_map[i]);
-	printk("\n");
-}
-
 u8
 DOT11D_GetMaxTxPwrInDbm(
 	struct ieee80211_device *dev,
diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.h b/drivers/staging/rtl8187se/ieee80211/dot11d.h
index 82576b5..029c2ca 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.h
@@ -97,6 +97,4 @@ int ToLegalChannel(
 	struct ieee80211_device * dev,
 	u8 channel
 );
-
-void dump_chnl_map(u8 * channel_map);
 #endif // #ifndef __INC_DOT11D_H
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index e581649..9fcc246 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -449,7 +449,6 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
 #endif
 	down(&ieee->scan_sem);
 //	printk("==================> Sync scan\n");
-//	dump_chnl_map(channel_map);
 
 	while(1)
 	{
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    3 -
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   13 +-----
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   42 ++------------------
 .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |   12 +----
 4 files changed, 10 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index d3d84b6..fcc65a9 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -45,14 +45,11 @@
 #endif
 */
 
-//#ifdef JOHN_HWSEC
 #define KEY_TYPE_NA		0x0
 #define KEY_TYPE_WEP40 		0x1
 #define KEY_TYPE_TKIP		0x2
 #define KEY_TYPE_CCMP		0x4
 #define KEY_TYPE_WEP104		0x5
-//#endif
-
 
 #define aSifsTime					10
 
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
index 21f09c6..2651811 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -118,7 +118,6 @@ static inline void xor_block(u8 *b, u8 *a, size_t len)
 		b[i] ^= a[i];
 }
 
-#ifndef JOHN_CCMP
 static void ccmp_init_blocks(struct crypto_tfm *tfm,
 			     struct ieee80211_hdr *hdr,
 			     u8 *pn, size_t dlen, u8 *b0, u8 *auth,
@@ -196,7 +195,6 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm,
 	b0[14] = b0[15] = 0;
 	ieee80211_ccmp_aes_encrypt(tfm, b0, s0);
 }
-#endif
 
 static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 {
@@ -204,14 +202,13 @@ static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 	int data_len, i;
 	u8 *pos;
 	struct ieee80211_hdr *hdr;
-#ifndef JOHN_CCMP
 	int blocks, last, len;
 	u8 *mic;
 	u8 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |   16 +--------
 .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c     |   25 -------------
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |    5 +--
 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c |   38 +------------------
 drivers/staging/rtl8192su/r8192U_core.c            |   16 +--------
 drivers/staging/rtl8192su/r8192U_wx.c              |   24 +-----------
 6 files changed, 7 insertions(+), 117 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 7d97300..b1f49f0 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -379,13 +379,11 @@ enum	_ReasonCode{
 #define ieee80211_wx_get_scan		ieee80211_wx_get_scan_rsl
 #define ieee80211_wx_set_encode		ieee80211_wx_set_encode_rsl
 #define ieee80211_wx_get_encode		ieee80211_wx_get_encode_rsl
-#if WIRELESS_EXT >= 18
+
 #define ieee80211_wx_set_mlme		ieee80211_wx_set_mlme_rsl
 #define ieee80211_wx_set_auth		ieee80211_wx_set_auth_rsl
 #define ieee80211_wx_set_encode_ext	ieee80211_wx_set_encode_ext_rsl
 #define ieee80211_wx_get_encode_ext	ieee80211_wx_get_encode_ext_rsl
-#endif
-
 
 typedef struct ieee_param {
 	u32 cmd;
@@ -416,16 +414,6 @@ typedef struct ieee_param {
 	} u;
 }ieee_param;
 
-
-#if WIRELESS_EXT < 17
-#define IW_QUAL_QUAL_INVALID   0x10
-#define IW_QUAL_LEVEL_INVALID  0x20
-#define IW_QUAL_NOISE_INVALID  0x40
-#define IW_QUAL_QUAL_UPDATED   0x1
-#define IW_QUAL_LEVEL_UPDATED  0x2
-#define IW_QUAL_NOISE_UPDATED  0x4
-#endif
-
 #define MSECS(t) msecs_to_jiffies(t)
 #define msleep_interruptible_rsl  msleep_interruptible
 
@@ -2552,7 +2540,6 @@ extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 extern int ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* s/WLAN_AUTH_LEAP/RTL_WLAN_AUTH_LEAP/g
* s/struct ieee80211_hdr/struct rtl_ieee80211_hdr/g
* switch to use <linux/ieee80211.h>

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |  131 +-------------------
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |    5 +-
 drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c |    4 +-
 3 files changed, 9 insertions(+), 131 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 363ea6b..707175a 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -33,6 +33,7 @@
 
 #include <linux/delay.h>
 #include <linux/wireless.h>
+#include <linux/ieee80211.h>
 
 #include "rtl819x_HT.h"
 #include "rtl819x_BA.h"
@@ -392,62 +393,19 @@ typedef struct ieee_param {
 
 
 /* Frame control field constants */
-#define IEEE80211_FCTL_VERS		0x0003
-#define IEEE80211_FCTL_FTYPE		0x000c
-#define IEEE80211_FCTL_STYPE		0x00f0
 #define IEEE80211_FCTL_FRAMETYPE	0x00fc
-#define IEEE80211_FCTL_TODS		0x0100
-#define IEEE80211_FCTL_FROMDS		0x0200
 #define IEEE80211_FCTL_DSTODS		0x0300 //added by david
-#define IEEE80211_FCTL_MOREFRAGS	0x0400
-#define IEEE80211_FCTL_RETRY		0x0800
-#define IEEE80211_FCTL_PM		0x1000
-#define IEEE80211_FCTL_MOREDATA		0x2000
 #define IEEE80211_FCTL_WEP		0x4000
-#define IEEE80211_FCTL_ORDER		0x8000
-
-#define IEEE80211_FTYPE_MGMT		0x0000
-#define IEEE80211_FTYPE_CTL		0x0004
-#define IEEE80211_FTYPE_DATA		0x0008
 
 /* management */
-#define IEEE80211_STYPE_ASSOC_REQ	0x0000
-#define IEEE80211_STYPE_ASSOC_RESP 	0x0010
-#define IEEE80211_STYPE_REASSOC_REQ	0x0020
-#define IEEE80211_STYPE_REASSOC_RESP	0x0030
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Mithlesh Thukral <mithlesh@linsyssoft.com>

scripts/checkpatch.pl error fixes. This is a TODO item.
This patch fixes most of the errors reported by checkpatch.pl in
wlan-ng directory of staging tree.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/hfa384x_usb.c  |  202 ++++++++++++++++----------------
 drivers/staging/wlan-ng/p80211conv.c   |   12 +-
 drivers/staging/wlan-ng/p80211netdev.c |   54 +++++-----
 drivers/staging/wlan-ng/p80211req.c    |   12 +-
 drivers/staging/wlan-ng/p80211wep.c    |   12 +-
 drivers/staging/wlan-ng/p80211wext.c   |   66 +++++-----
 drivers/staging/wlan-ng/prism2fw.c     |   46 ++++----
 drivers/staging/wlan-ng/prism2mgmt.c   |   20 ++--
 drivers/staging/wlan-ng/prism2mib.c    |  144 +++++++++++-----------
 drivers/staging/wlan-ng/prism2sta.c    |  148 ++++++++++++-----------
 drivers/staging/wlan-ng/prism2usb.c    |   10 +-
 11 files changed, 365 insertions(+), 361 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 51d9e52..deb8ba9 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -160,13 +160,13 @@ static void dbprint_urb(struct urb *urb);
 #endif
 
 static void
-hfa384x_int_rxmonitor(wlandevice_t * wlandev, hfa384x_usb_rxfrm_t * rxfrm);
+hfa384x_int_rxmonitor(wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *rxfrm);
 
 static void hfa384x_usb_defer(struct work_struct *data);
 
-static int submit_rx_urb(hfa384x_t * hw, gfp_t flags);
+static int submit_rx_urb(hfa384x_t *hw, gfp_t flags);
 
-static int submit_tx_urb(hfa384x_t * hw, struct urb *tx_urb, gfp_t flags);
+static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t flags);
 
 /*---------------------------------------------------*/
 /* Callbacks */
@@ -175,22 +175,22 @@ static void hfa384x_ctlxout_callback(struct urb *urb);
 static void hfa384x_usbin_callback(struct urb ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Alan Cox <alan@linux.intel.com>

UTF-8 for copyright symbols etc included. Typedefs and anything else which
would cause actual code changes skipped.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/et131x/et1310_address_map.h | 2138 +++++++++++++-------------
 drivers/staging/et131x/et1310_eeprom.c      |   46 +-
 drivers/staging/et131x/et1310_eeprom.h      |    6 +-
 drivers/staging/et131x/et1310_jagcore.c     |   20 +-
 drivers/staging/et131x/et1310_jagcore.h     |   17 +-
 drivers/staging/et131x/et1310_mac.c         |  112 +-
 drivers/staging/et131x/et1310_mac.h         |    8 +-
 drivers/staging/et131x/et1310_phy.c         |  202 ++--
 drivers/staging/et131x/et1310_phy.h         |  904 ++++++------
 drivers/staging/et131x/et1310_pm.c          |   19 +-
 drivers/staging/et131x/et1310_pm.h          |    8 +-
 drivers/staging/et131x/et1310_rx.c          |  115 +-
 drivers/staging/et131x/et1310_rx.h          |  194 ++--
 drivers/staging/et131x/et1310_tx.c          |  120 +-
 drivers/staging/et131x/et1310_tx.h          |  102 +-
 drivers/staging/et131x/et131x_adapter.h     |   72 +-
 drivers/staging/et131x/et131x_config.c      |   38 +-
 drivers/staging/et131x/et131x_debug.c       |   12 +-
 drivers/staging/et131x/et131x_debug.h       |   24 +-
 drivers/staging/et131x/et131x_defs.h        |   12 +-
 drivers/staging/et131x/et131x_initpci.c     |   74 +-
 drivers/staging/et131x/et131x_initpci.h     |    6 +-
 drivers/staging/et131x/et131x_isr.c         |   44 +-
 drivers/staging/et131x/et131x_isr.h         |    6 +-
 drivers/staging/et131x/et131x_netdev.c      |  123 +-
 drivers/staging/et131x/et131x_netdev.h      |    6 +-
 drivers/staging/et131x/et131x_version.h     |    6 +-
 27 files changed, 2188 insertions(+), 2246 deletions(-)

diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 3c85999..388ac40 100644
--- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Always use includes from ieee80211/ subdirectory.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/dot11d.h          |  102 -
 drivers/staging/rtl8192su/ieee80211.h       | 2901 ---------------------------
 drivers/staging/rtl8192su/r8192S_firmware.c |    1 -
 drivers/staging/rtl8192su/r8192S_phy.c      |    2 +-
 drivers/staging/rtl8192su/r8192U.h          |    2 +-
 drivers/staging/rtl8192su/r8192U_core.c     |    4 +-
 drivers/staging/rtl8192su/r8192U_wx.c       |    2 +-
 drivers/staging/rtl8192su/r8192U_wx.h       |    1 -
 drivers/staging/rtl8192su/r819xU_firmware.c |    1 -
 drivers/staging/rtl8192su/r819xU_phy.c      |    2 +-
 10 files changed, 6 insertions(+), 3012 deletions(-)
 delete mode 100644 drivers/staging/rtl8192su/dot11d.h
 delete mode 100644 drivers/staging/rtl8192su/ieee80211.h

diff --git a/drivers/staging/rtl8192su/dot11d.h b/drivers/staging/rtl8192su/dot11d.h
deleted file mode 100644
index 15b7a4b..0000000
--- a/drivers/staging/rtl8192su/dot11d.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef __INC_DOT11D_H
-#define __INC_DOT11D_H
-
-#ifdef ENABLE_DOT11D
-#include "ieee80211.h"
-
-//#define ENABLE_DOT11D
-
-//#define DOT11D_MAX_CHNL_NUM 83
-
-typedef struct _CHNL_TXPOWER_TRIPLE {
-	u8 FirstChnl;
-	u8  NumChnls;
-	u8  MaxTxPowerInDbm;
-}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
-
-typedef enum _DOT11D_STATE {
-	DOT11D_STATE_NONE = 0,
-	DOT11D_STATE_LEARNED,
-	DOT11D_STATE_DONE,
-}DOT11D_STATE;
-
-typedef struct _RT_DOT11D_INFO {
-	//DECLARE_RT_OBJECT(RT_DOT11D_INFO);
-
-	bool bEnabled; // dot11MultiDomainCapabilityEnabled
-
-	u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.
-	u8  CountryIeBuf[MAX_IE_LEN];
-	u8  CountryIeSrcAddr[6]; // Source AP of the country IE.
-	u8  CountryIeWatchdog;
-
-	u8  channel_map[MAX_CHANNEL_NUMBER+1];  //!!!Value 0: ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |  157 ------
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |  540 --------------------
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |  229 ---------
 3 files changed, 0 insertions(+), 926 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 0fb0dae..9226052 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -109,13 +109,6 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
 	struct ieee80211_hdr_QOS *hdr_4addr_QoS;
 	u8 tid;
 
-#ifdef _RTL8187_EXT_PATCH_
-	if(ieee->iw_mode == ieee->iw_ext_mode)
-	{
-		tid = (hdr->addr2[ETH_ALEN-2] ^ hdr->addr2[ETH_ALEN-1]) & IEEE80211_QOS_TID;
-	}
-	else
-#endif
 	if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
 	  hdr_4addr_QoS = (struct ieee80211_hdr_QOS *)hdr;
 	  tid = le16_to_cpu(hdr_4addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
@@ -183,13 +176,6 @@ static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,
 	struct ieee80211_hdr_QOS *hdr_4addr_QoS;
 	u8 tid;
 
-#ifdef _RTL8187_EXT_PATCH_
-	if(ieee->iw_mode == ieee->iw_ext_mode)
-	{
-		tid = (hdr->addr2[ETH_ALEN-2] ^ hdr->addr2[ETH_ALEN-1]) & IEEE80211_QOS_TID;
-	}
-	else
-#endif
 	if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
 	  hdr_4addr_QoS = (struct ieee80211_hdr_QOS *)hdr;
 	  tid = le16_to_cpu(hdr_4addr_QoS->QOS_ctl) & IEEE80211_QOS_TID;
@@ -364,13 +350,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb,
 		return 0;
 
 	hdr = (struct ieee80211_hdr *) skb->data;
-#ifdef _RTL8187_EXT_PATCH_
-	if((ieee->iw_mode == ieee->iw_ext_mode) && ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/dot11d.c       |   11 +-
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |  120 ------
 .../staging/rtl8192su/ieee80211/ieee80211_crypt.c  |   14 -
 .../staging/rtl8192su/ieee80211/ieee80211_crypt.h  |    7 -
 .../rtl8192su/ieee80211/ieee80211_crypt_ccmp.c     |   51 +---
 .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c     |  229 +-----------
 .../rtl8192su/ieee80211/ieee80211_crypt_wep.c      |  113 +-----
 .../staging/rtl8192su/ieee80211/ieee80211_module.c |   51 +---
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |    9 -
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |  176 +---------
 .../rtl8192su/ieee80211/ieee80211_softmac_wx.c     |   44 +---
 drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c |    9 +-
 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c |  118 +------
 .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c   |    9 -
 .../staging/rtl8192su/ieee80211/rtl819x_TSProc.c   |   12 +-
 drivers/staging/rtl8192su/r8192S_firmware.c        |   18 +-
 drivers/staging/rtl8192su/r8192S_phy.c             |   14 -
 drivers/staging/rtl8192su/r8192S_phy.h             |    5 +-
 drivers/staging/rtl8192su/r8192U.h                 |   40 +--
 drivers/staging/rtl8192su/r8192U_core.c            |  388 +-------------------
 drivers/staging/rtl8192su/r8192U_dm.c              |   60 +---
 drivers/staging/rtl8192su/r8192U_dm.h              |    8 -
 drivers/staging/rtl8192su/r8192U_pm.c              |    9 +-
 drivers/staging/rtl8192su/r8192U_wx.c              |   19 +-
 drivers/staging/rtl8192su/r819xU_firmware.c        |   13 +-
 drivers/staging/rtl8192su/r819xU_phy.c             |   14 -
 drivers/staging/rtl8192su/r819xU_phy.h             |    4 -
 27 files changed, 77 insertions(+), 1488 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/dot11d.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/rtl8187se/TODO

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
new file mode 100644
index 0000000..74e79c7
--- /dev/null
+++ b/drivers/staging/rtl8187se/TODO
@@ -0,0 +1,21 @@
+TODO:
+- prepare private ieee80211 stack for merge with rtl8192su's version:
+  - remove [IN]_OPENSUSE_SLED definitions
+  - remove ENABLE_IPS ifdefs
+  - rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
+  - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
+  - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
+  - add hwsec_active flag to struct ieee80211_device
+  - add bHwSec flag to cb_desc structure
+  - switch ieee80211.h to use <linux/ieee80211.h>
+- switch to use shared "librtl" instead of private ieee80211 stack
+- switch to use LIB80211
+- switch to use MAC80211
+- switch to use EEPROM_93CX6
+- use kernel coding style
+- checkpatch.pl fixes
+- sparse fixes
+- integrate with drivers/net/wireless/rtl818x
+
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
+Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile                 |    3 -
 drivers/staging/rtl8187se/ieee80211/dot11d.c       |    2 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |   10 ---
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   12 ----
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |   62 --------------------
 drivers/staging/rtl8187se/r8180_core.c             |   20 ------
 drivers/staging/rtl8187se/r8180_rtl8225z2.c        |    6 --
 drivers/staging/rtl8187se/r8180_wx.c               |   14 -----
 drivers/staging/rtl8187se/r8185b_init.c            |    4 -
 9 files changed, 0 insertions(+), 133 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 6bc7e29..5784598 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -17,9 +17,6 @@ EXTRA_CFLAGS += -DSW_DIG
 EXTRA_CFLAGS += -DRATE_ADAPT
 EXTRA_CFLAGS += -DCONFIG_RTL8180_PM
 
-#+YJ,080626
-EXTRA_CFLAGS += -DENABLE_DOT11D
-
 #enable it for legacy power save, disable it for leisure  power save
 EXTRA_CFLAGS += -DENABLE_LPS
 
diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index 9314632..d879869 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -1,4 +1,3 @@
-#ifdef ENABLE_DOT11D
 //-----------------------------------------------------------------------------
 //	File:
 //		Dot11d.c
@@ -233,4 +232,3 @@ EXPORT_SYMBOL(DOT11D_ScanComplete);
 EXPORT_SYMBOL(IsLegalChannel);
 EXPORT_SYMBOL(ToLegalChannel);
 #endif
-#endif
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index fcc65a9..61e667a 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile                 |    1 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    2 --
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |    6 ------
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |   15 ---------------
 drivers/staging/rtl8187se/r8185b_init.c            |    2 --
 5 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 6663b1d..02f1e58 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -4,7 +4,6 @@
 #EXTRA_CFLAGS += -std=gnu89
 #EXTRA_CFLAGS += -O2
 #CC            = gcc
-EXTRA_CFLAGS += -DTHOMAS_TURBO
 #CFLAGS += -DCONFIG_RTL8185B
 #CFLAGS += -DCONFIG_RTL818x_S
 
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 61e667a..0a5e715 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -956,9 +956,7 @@ struct ieee80211_network {
 //by amy 080312
 	u8 HighestOperaRate;
 //by amy 080312
-#ifdef THOMAS_TURBO
 	u8 Turbo_Enable;//enable turbo mode, added by thomas
-#endif
 	u16 CountryIeLen;
 	u8 CountryIeBuf[MAX_IE_LEN];
 };
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 5b972b6..5d42a42 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -1159,9 +1159,7 @@ inline int ieee80211_network_init(
 //by amy 080312
 	network->HighestOperaRate = 0;
 //by amy 080312
-#ifdef THOMAS_TURBO
 	network->Turbo_Enable = 0;
-#endif
 	network->CountryIeLen = 0;
 	memset(network->CountryIeBuf, 0, MAX_IE_LEN);
 
@@ -1338,7 +1336,6 @@ inline int ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

CONFIG_RTL8185B is defined in drivers/staging/rtl8187se/r8180_hw.h.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile          |    1 -
 drivers/staging/rtl8187se/r8180.h           |    4 -
 drivers/staging/rtl8187se/r8180_93cx6.h     |    2 -
 drivers/staging/rtl8187se/r8180_core.c      |  289 ---------------------------
 drivers/staging/rtl8187se/r8180_dm.c        |    4 -
 drivers/staging/rtl8187se/r8180_hw.h        |   61 ------
 drivers/staging/rtl8187se/r8180_rtl8225.h   |    2 -
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |    4 -
 drivers/staging/rtl8187se/r8185b_init.c     |    2 -
 9 files changed, 0 insertions(+), 369 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index b8c8922..df72276 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -4,7 +4,6 @@
 #EXTRA_CFLAGS += -std=gnu89
 #EXTRA_CFLAGS += -O2
 #CC            = gcc
-#CFLAGS += -DCONFIG_RTL8185B
 
 #added for EeePC testing
 EXTRA_CFLAGS += -DENABLE_IPS
diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h
index 9b93be1..ad43cfa 100644
--- a/drivers/staging/rtl8187se/r8180.h
+++ b/drivers/staging/rtl8187se/r8180.h
@@ -64,7 +64,6 @@
 #define DEFAULT_RETRY_DATA 7
 #define PRISM_HDR_SIZE 64
 
-#ifdef CONFIG_RTL8185B
 
 #define MGNT_QUEUE						0
 #define BK_QUEUE						1
@@ -199,7 +198,6 @@ typedef	union _ThreeWire{
 	u16			longData;
 }ThreeWireReg;
 
-#endif
 
 typedef struct buffer
 {
@@ -659,7 +657,6 @@ typedef struct r8180_priv
 	short ack_tx_to_ieee;
 
 	u8 PowerProfile;
-#ifdef CONFIG_RTL8185B
 	u32 CSMethod;
 	u8 cck_txpwr_base;
 	u8 ofdm_txpwr_base;
@@ -675,7 +672,6 @@ typedef struct r8180_priv
 	u32 IntrMask;
 
 	struct 	ChnlAccessSetting  ChannelAccessSetting;
-#endif
 }r8180_priv;
 
 #define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile      |    1 -
 drivers/staging/rtl8187se/r8180_core.c  |   83 ---------------
 drivers/staging/rtl8187se/r8185b_init.c |  168 -------------------------------
 3 files changed, 0 insertions(+), 252 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index df72276..0ad7842 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -1,6 +1,5 @@
 
 #EXTRA_CFLAGS += -DCONFIG_IEEE80211_NOWEP=y
-#EXTRA_CFLAGS += -DCONFIG_RTL8180_IOMAP
 #EXTRA_CFLAGS += -std=gnu89
 #EXTRA_CFLAGS += -O2
 #CC            = gcc
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index f5cbd32..9cf8287 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -59,7 +59,6 @@ double __extendsfdf2(float a) {return a;}
 //#define DEBUG_RX
 //#define DEBUG_RX_SKB
 
-//#define CONFIG_RTL8180_IO_MAP
 #include <linux/syscalls.h>
 //#include <linux/fcntl.h>
 //#include <asm/uaccess.h>
@@ -78,8 +77,6 @@ double __extendsfdf2(float a) {return a;}
 
 #include "ieee80211/dot11d.h"
 
-//#define CONFIG_RTL8180_IO_MAP
-
 #ifndef PCI_VENDOR_ID_BELKIN
 	#define PCI_VENDOR_ID_BELKIN 0x1799
 #endif
@@ -202,39 +199,6 @@ static struct pci_driver rtl8180_pci_driver = {
 
 
 
-#ifdef CONFIG_RTL8180_IO_MAP
-
-u8 read_nic_byte(struct net_device *dev, int x)
-{
-        return 0xff&inb(dev->base_addr +x);
-}
-
-u32 read_nic_dword(struct net_device *dev, int x)
-{
-        return inl(dev->base_addr +x);
-}
-
-u16 read_nic_word(struct net_device *dev, int x)
-{
-        return inw(dev->base_addr +x);
-}
-
-void write_nic_byte(struct net_device *dev, int x,u8 y)
-{
-        outb(y&0xff,dev->base_addr +x);
-}
-
-void write_nic_word(struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/dot11d.c       |   10 -
 .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |   13 -
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |    7 -
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   19 -
 .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |    5 -
 .../staging/rtl8187se/ieee80211/ieee80211_module.c |   88 ----
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   56 +--
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |  289 +-----------
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |   19 -
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    4 -
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |   63 +---
 drivers/staging/rtl8187se/r8180_core.c             |  522 +-------------------
 drivers/staging/rtl8187se/r8180_dm.c               |   12 -
 drivers/staging/rtl8187se/r8180_max2820.c          |   69 ---
 drivers/staging/rtl8187se/r8180_rtl8225.c          |  200 +--------
 drivers/staging/rtl8187se/r8180_rtl8225z2.c        |  375 --------------
 drivers/staging/rtl8187se/r8180_rtl8255.c          |   33 +--
 drivers/staging/rtl8187se/r8180_wx.c               |   29 --
 drivers/staging/rtl8187se/r8185b_init.c            |  285 +-----------
 19 files changed, 13 insertions(+), 2085 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index d879869..309bb8b 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -222,13 +222,3 @@ int ToLegalChannel(
 
 	return default_chn;
 }
-
-#if ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

Move module_params to near the end of the source file so that
their references are already known/defined.  Fixes build errors:

drivers/staging/android/lowmemorykiller.c: In function '__check_cost':
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared (first use in this function)
drivers/staging/android/lowmemorykiller.c: At top level:
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared here (not in a function)
drivers/staging/android/lowmemorykiller.c:60: warning: type defaults to 'int' in declaration of 'type name'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/lowmemorykiller.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index f13c6fc..935d281 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -57,13 +57,6 @@ static int lowmem_minfree_size = 4;
 			printk(x);			\
 	} while (0)
 
-module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
-module_param_array_named(adj, lowmem_adj, int, &lowmem_adj_size,
-			 S_IRUGO | S_IWUSR);
-module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
-			 S_IRUGO | S_IWUSR);
-module_param_named(debug_level, lowmem_debug_level, uint, S_IRUGO | S_IWUSR);
-
 static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
 {
 	struct task_struct *p;
@@ -166,6 +159,13 @@ static void __exit lowmem_exit(void)
 	unregister_shrinker(&lowmem_shrinker);
 }
 
+module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR);
+module_param_array_named(adj, lowmem_adj, int, &lowmem_adj_size,
+			 S_IRUGO | S_IWUSR);
+module_param_array_named(minfree, lowmem_minfree, uint, &lowmem_minfree_size,
+			 S_IRUGO | ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_core.c |  384 +-------------------------------
 1 files changed, 3 insertions(+), 381 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 1bf3818..08960f8 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -24,30 +24,8 @@
    add RTL8185 and RTL8225 support, and to David Young also.
 */
 
-#undef DEBUG_TX_DESC2
 #undef RX_DONT_PASS_UL
-#undef DEBUG_EPROM
-#undef DEBUG_RX_VERBOSE
 #undef DUMMY_RX
-#undef DEBUG_ZERO_RX
-#undef DEBUG_RX_SKB
-#undef DEBUG_TX_FRAG
-#undef DEBUG_RX_FRAG
-#undef DEBUG_TX_FILLDESC
-#undef DEBUG_TX
-#undef DEBUG_IRQ
-#undef DEBUG_RX
-#undef DEBUG_RXALLOC
-#undef DEBUG_REGISTERS
-#undef DEBUG_RING
-#undef DEBUG_IRQ_TASKLET
-#undef DEBUG_TX_ALLOC
-#undef DEBUG_TX_DESC
-
-//#define DEBUG_TX
-//#define DEBUG_TX_DESC2
-//#define DEBUG_RX
-//#define DEBUG_RX_SKB
 
 #include <linux/syscalls.h>
 //#include <linux/fcntl.h>
@@ -462,10 +440,6 @@ void rtl8180_proc_init_one(struct net_device *dev)
 short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
 		struct buffer **bufferhead)
 {
-#ifdef DEBUG_RING
-	DMESG("adding buffer to TX/RX struct");
-#endif
-
         struct buffer *tmp;
 
 	if(! *buffer){
@@ -622,168 +596,12 @@ short check_nic_enought_desc(struct net_device *dev, int priority)
 	return (required+2 < get_curr_tx_free_desc(dev,priority));
 }
 
-
-/* This function is only for debuging purpose */
-void check_tx_ring(struct net_device *dev, int pri)
-{
-	static int maxlog =3;
-	struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
-	u32* tmp;
-	struct buffer *buf;
-	int i;
-	int nic;
-	u32* tail;
-	u32* head;
-	u32* begin;
-	u32 nicbegin;
-	struct buffer* buffer;
-
-	maxlog ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h |   49 -----------------------
 1 files changed, 0 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index b1f49f0..363ea6b 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -214,55 +214,6 @@ typedef struct cb_desc {
 #define	MGN_MCS14_SG		0x9e
 #define	MGN_MCS15_SG		0x9f
 
-
-//----------------------------------------------------------------------------
-//		802.11 Management frame Reason Code field
-//----------------------------------------------------------------------------
-enum	_ReasonCode{
-	unspec_reason	= 0x1,
-	auth_not_valid	= 0x2,
-	deauth_lv_ss	= 0x3,
-	inactivity		= 0x4,
-	ap_overload 	= 0x5,
-	class2_err		= 0x6,
-	class3_err		= 0x7,
-	disas_lv_ss 	= 0x8,
-	asoc_not_auth	= 0x9,
-
-	//----MIC_CHECK
-	mic_failure 	= 0xe,
-	//----END MIC_CHECK
-
-	// Reason code defined in 802.11i D10.0 p.28.
-	invalid_IE		= 0x0d,
-	four_way_tmout	= 0x0f,
-	two_way_tmout	= 0x10,
-	IE_dismatch 	= 0x11,
-	invalid_Gcipher = 0x12,
-	invalid_Pcipher = 0x13,
-	invalid_AKMP	= 0x14,
-	unsup_RSNIEver = 0x15,
-	invalid_RSNIE	= 0x16,
-	auth_802_1x_fail= 0x17,
-	ciper_reject		= 0x18,
-
-	// Reason code defined in 7.3.1.7, 802.1e D13.0, p.42. Added by Annie, 2005-11-15.
-	QoS_unspec		= 0x20, // 32
-	QAP_bandwidth	= 0x21, // 33
-	poor_condition	= 0x22, // 34
-	no_facility 	= 0x23, // 35
-							// Where is 36???
-	req_declined	= 0x25, // 37
-	invalid_param	= 0x26, // 38
-	req_not_honored= 0x27,	// 39
-	TS_not_created	= 0x2F, // 47
-	DL_not_allowed	= 0x30, // 48
-	dest_not_exist	= 0x31, // 49
-	dest_not_QSTA	= 0x32, // 50
-};
-
-
-
 #define aSifsTime	 (((priv->ieee80211->current_network.mode ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* remove empty rtl8225_host_usb_init()
* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_rtl8225.c   |  255 +++++++++++----------------
 drivers/staging/rtl8187se/r8180_rtl8225.h   |    1 -
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |    5 +-
 3 files changed, 105 insertions(+), 156 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_rtl8225.c b/drivers/staging/rtl8187se/r8180_rtl8225.c
index a132f6a..80ea2c6 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225.c
@@ -16,35 +16,23 @@
 #include "r8180_rtl8225.h"
 
 
-u8 rtl8225_gain[]={
-	0x23,0x88,0x7c,0xa5,// -82dbm
-	0x23,0x88,0x7c,0xb5,// -82dbm
-	0x23,0x88,0x7c,0xc5,// -82dbm
-	0x33,0x80,0x79,0xc5,// -78dbm
-	0x43,0x78,0x76,0xc5,// -74dbm
-	0x53,0x60,0x73,0xc5,// -70dbm
-	0x63,0x58,0x70,0xc5,// -66dbm
+u8 rtl8225_gain[] = {
+	0x23, 0x88, 0x7c, 0xa5,	/* -82dBm */
+	0x23, 0x88, 0x7c, 0xb5,	/* -82dBm */
+	0x23, 0x88, 0x7c, 0xc5,	/* -82dBm */
+	0x33, 0x80, 0x79, 0xc5,	/* -78dBm */
+	0x43, 0x78, 0x76, 0xc5,	/* -74dBm */
+	0x53, 0x60, 0x73, 0xc5,	/* -70dBm */
+	0x63, 0x58, 0x70, 0xc5,	/* -66dBm */
 };
 
-u32 rtl8225_chan[] ={
-              0,
-		0x0080, //ch1
-		0x0100, //ch2
-		0x0180, //ch3
-		0x0200, //ch4
-		0x0280,
-		0x0300,
-		0x0380,
-		0x0400,
-		0x0480,
-		0x0500,
-		0x0580,
-		0x0600,
-		0x0680,
-		0x074A, //ch14
+u32 rtl8225_chan[] = {
+	0,
+	0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380,
+	0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x074A,
 };
 
-u16 rtl8225bcd_rxgain[]={
+u16 rtl8225bcd_rxgain[] = {
 	0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
 	0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
 	0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/TODO |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/rtl8192su/TODO

diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
new file mode 100644
index 0000000..0d0ffce
--- /dev/null
+++ b/drivers/staging/rtl8192su/TODO
@@ -0,0 +1,23 @@
+TODO:
+- make ieee80211 stack private (may conflict with libipw currently)
+- prepare private ieee80211 stack for merge with rtl8187se's version:
+  - remove JOHN_DUMP[_DESC] ifdefs
+  - remove [IN]_OPENSUSE_SLED definitions
+  - remove superflous container_of definition from ieee80211.h
+  - remove superfluous ieee80211_* definitions from ieee80211.h
+  - remove rtl8192su's specific dead code
+  - cleanup ieee80211.h
+  - move rtl8192su's specific code out from ieee80211.h
+  - abstract rtl819su's specific code
+  - use list_for_each_safe() in ieee80211_crypto_deinit
+- switch to use shared "librtl" instead of private ieee80211 stack
+- switch to use LIB80211
+- switch to use MAC80211
+- switch to use EEPROM_93CX6
+- use kernel coding style
+- checkpatch.pl fixes
+- sparse fixes
+- integrate with drivers/net/wireless/rtl818x
+
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
+Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile      |    1 -
 drivers/staging/rtl8187se/r8180_core.c  |    7 -------
 drivers/staging/rtl8187se/r8180_pm.c    |    2 --
 drivers/staging/rtl8187se/r8180_pm.h    |    2 --
 drivers/staging/rtl8187se/r8185b_init.c |    2 --
 5 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 5784598..6663b1d 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -15,7 +15,6 @@ EXTRA_CFLAGS += -DTX_TRACK
 EXTRA_CFLAGS += -DHIGH_POWER
 EXTRA_CFLAGS += -DSW_DIG
 EXTRA_CFLAGS += -DRATE_ADAPT
-EXTRA_CFLAGS += -DCONFIG_RTL8180_PM
 
 #enable it for legacy power save, disable it for leisure  power save
 EXTRA_CFLAGS += -DENABLE_LPS
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 225561c..6afc4ef 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -74,9 +74,7 @@ double __extendsfdf2(float a) {return a;}
 #include "r8180_wx.h"
 #include "r8180_dm.h"
 
-#ifdef CONFIG_RTL8180_PM
 #include "r8180_pm.h"
-#endif
 
 #include "ieee80211/dot11d.h"
 
@@ -199,13 +197,8 @@ static struct pci_driver rtl8180_pci_driver = {
 	.id_table	= rtl8180_pci_id_tbl,	          /* PCI_ID table  */
 	.probe		= rtl8180_pci_probe,	          /* probe fn      */
 	.remove		= __devexit_p(rtl8180_pci_remove),/* remove fn     */
-#ifdef CONFIG_RTL8180_PM
 	.suspend	= rtl8180_suspend,	          /* PM suspend fn */
 	.resume		= rtl8180_resume,                 /* PM resume fn  */
-#else
-	.suspend	= NULL,			          /* PM suspend fn */
-	.resume      	= NULL,			          /* PM resume fn  */
-#endif
 	.shutdown	= rtl8180_shutdown,
 };
 
diff --git a/drivers/staging/rtl8187se/r8180_pm.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* merge r8180_rtl8225.c with r8180_rtl8225z2.c
* make functions static
* make tables static const
* remove unused rtl8225_set_gain()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile          |    1 -
 drivers/staging/rtl8187se/r8180_rtl8225.c   |  298 ---------------------------
 drivers/staging/rtl8187se/r8180_rtl8225.h   |    5 +-
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |  275 ++++++++++++++++++++++++-
 4 files changed, 272 insertions(+), 307 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/r8180_rtl8225.c

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index c0c399b..15cbecf 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -22,7 +22,6 @@ rtl8187se-objs :=			\
 		r8180_core.o		\
 		r8180_93cx6.o		\
 		r8180_wx.o		\
-		r8180_rtl8225.o		\
 		r8180_rtl8225z2.o	\
 		r8185b_init.o		\
 		r8180_dm.o		\
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225.c b/drivers/staging/rtl8187se/r8180_rtl8225.c
deleted file mode 100644
index 80ea2c6..0000000
--- a/drivers/staging/rtl8187se/r8180_rtl8225.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
-  This is part of the rtl8180-sa2400 driver
-  released under the GPL (See file COPYING for details).
-  Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
-
-  This files contains programming code for the rtl8225
-  radio frontend.
-
-  *Many* thanks to Realtek Corp. for their great support!
-
-*/
-
-
-
-#include "r8180_hw.h"
-#include "r8180_rtl8225.h"
-
-
-u8 rtl8225_gain[] = {
-	0x23, 0x88, 0x7c, 0xa5,	/* -82dBm */
-	0x23, 0x88, 0x7c, 0xb5,	/* -82dBm */
-	0x23, 0x88, 0x7c, 0xc5,	/* -82dBm */
-	0x33, 0x80, 0x79, 0xc5,	/* -78dBm */
-	0x43, 0x78, 0x76, 0xc5,	/* -74dBm */
-	0x53, 0x60, 0x73, 0xc5,	/* -70dBm */
-	0x63, 0x58, 0x70, 0xc5,	/* -66dBm */
-};
-
-u32 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* remove unused rtl8180_{save_state,enable_wake}()
* remove commented out code
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_pm.c |   32 ++++++++------------------------
 drivers/staging/rtl8187se/r8180_pm.h |    2 --
 2 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_pm.c b/drivers/staging/rtl8187se/r8180_pm.c
index ddc70c8..56a5ff9 100644
--- a/drivers/staging/rtl8187se/r8180_pm.c
+++ b/drivers/staging/rtl8187se/r8180_pm.c
@@ -15,16 +15,9 @@
 #include "r8180_pm.h"
 #include "r8180.h"
 
-int rtl8180_save_state (struct pci_dev *dev, u32 state)
-{
-        printk(KERN_NOTICE "r8180 save state call (state %u).\n", state);
-	return(-EAGAIN);
-}
-
-int rtl8180_suspend (struct pci_dev *pdev, pm_message_t state)
+int rtl8180_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
-//	struct r8180_priv *priv = ieee80211_priv(dev);
 
 	if (!netif_running(dev))
 		goto out_pci_suspend;
@@ -37,27 +30,28 @@ int rtl8180_suspend (struct pci_dev *pdev, pm_message_t state)
 out_pci_suspend:
 	pci_save_state(pdev);
 	pci_disable_device(pdev);
-	pci_set_power_state(pdev,pci_choose_state(pdev,state));
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
 	return 0;
 }
 
-int rtl8180_resume (struct pci_dev *pdev)
+int rtl8180_resume(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
-//	struct r8180_priv *priv = ieee80211_priv(dev);
 	int err;
 	u32 val;
 
 	pci_set_power_state(pdev, PCI_D0);
 
 	err = pci_enable_device(pdev);
-	if(err) {
+	if (err) {
 		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
 				dev->name);
 
 		return err;
 	}
+
 	pci_restore_state(pdev);
+
 	/*
 	 * Suspend/Resume resets the PCI configuration space, so we have to
 	 * ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* merge r8180_pm.c with r8180_core.c
* make functions static

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile      |    1 -
 drivers/staging/rtl8187se/r8180_core.c  |   63 +++++++++++++++++++++++++-
 drivers/staging/rtl8187se/r8180_pm.c    |   74 -------------------------------
 drivers/staging/rtl8187se/r8180_pm.h    |   24 ----------
 drivers/staging/rtl8187se/r8185b_init.c |    2 -
 5 files changed, 61 insertions(+), 103 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/r8180_pm.c
 delete mode 100644 drivers/staging/rtl8187se/r8180_pm.h

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 15cbecf..98b2300 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -25,7 +25,6 @@ rtl8187se-objs :=			\
 		r8180_rtl8225z2.o	\
 		r8185b_init.o		\
 		r8180_dm.o		\
-		r8180_pm.o		\
 		ieee80211/dot11d.o			\
 		ieee80211/ieee80211_softmac.o		\
 		ieee80211/ieee80211_rx.o		\
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 1864682..6875606 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -22,6 +22,9 @@
 
    A big big thanks goes also to Realtek corp. for their help in my attempt to
    add RTL8185 and RTL8225 support, and to David Young also.
+
+   Power management interface routines.
+   Written by Mariusz Matuszek.
 */
 
 #undef RX_DONT_PASS_UL
@@ -37,8 +40,6 @@
 #include "r8180_wx.h"
 #include "r8180_dm.h"
 
-#include "r8180_pm.h"
-
 #include "ieee80211/dot11d.h"
 
 #ifndef PCI_VENDOR_ID_BELKIN
@@ -121,6 +122,64 @@ static void rtl8180_shutdown (struct pci_dev *pdev)
 	pci_disable_device(pdev);
 }
 
+static int rtl8180_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+	struct net_device *dev = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

CONFIG_RTL818x_S is defined in drivers/staging/rtl8187se/r8180_hw.h.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile          |    1 -
 drivers/staging/rtl8187se/r8180_core.c      |   40 ------
 drivers/staging/rtl8187se/r8180_dm.c        |   24 ----
 drivers/staging/rtl8187se/r8180_hw.h        |   18 ---
 drivers/staging/rtl8187se/r8180_rtl8225.c   |   21 ---
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |   41 ------
 drivers/staging/rtl8187se/r8185b_init.c     |  192 ---------------------------
 7 files changed, 0 insertions(+), 337 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 02f1e58..b8c8922 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -5,7 +5,6 @@
 #EXTRA_CFLAGS += -O2
 #CC            = gcc
 #CFLAGS += -DCONFIG_RTL8185B
-#CFLAGS += -DCONFIG_RTL818x_S
 
 #added for EeePC testing
 EXTRA_CFLAGS += -DENABLE_IPS
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 6afc4ef..6b029fe 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -2479,10 +2479,8 @@ void rtl8180_rx(struct net_device *dev)
 		}else {
 			padding = 0;
 		}
-#ifdef CONFIG_RTL818X_S
                padding = 0;
 #endif
-#endif
 		priv->rx_prevlen+=len;
 
 		if(priv->rx_prevlen > MAX_FRAG_THRESHOLD + 100){
@@ -3862,14 +3860,12 @@ void watch_dog_adaptive(unsigned long data)
 	}
 #endif
 
-#ifdef CONFIG_RTL818X_S
 	// Tx Power Tracking on 87SE.
 #ifdef TX_TRACK
 	//if( priv->bTxPowerTrack )	//lzm mod 080826
 	if( CheckTxPwrTracking((struct net_device *)data));
 		TxPwrTracking87SE((struct net_device *)data);
 #endif
-#endif
 
 	// Perform DIG immediately.
 #ifdef SW_DIG
@@ -4024,11 +4020,7 @@ short rtl8180_init(struct net_device *dev)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Always use includes from ieee80211/ subdirectory.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/dot11d.h          |  101 --
 drivers/staging/rtl8187se/ieee80211.h       | 1755 ---------------------------
 drivers/staging/rtl8187se/r8180.h           |    2 +-
 drivers/staging/rtl8187se/r8180_core.c      |    2 +-
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |    2 +-
 drivers/staging/rtl8187se/r8180_wx.c        |    2 +-
 drivers/staging/rtl8187se/r8180_wx.h        |    2 +-
 drivers/staging/rtl8187se/r8185b_init.c     |    2 +-
 8 files changed, 6 insertions(+), 1862 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/dot11d.h
 delete mode 100644 drivers/staging/rtl8187se/ieee80211.h

diff --git a/drivers/staging/rtl8187se/dot11d.h b/drivers/staging/rtl8187se/dot11d.h
deleted file mode 100644
index 2417da9..0000000
--- a/drivers/staging/rtl8187se/dot11d.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef __INC_DOT11D_H
-#define __INC_DOT11D_H
-
-#include "ieee80211.h"
-
-//#define ENABLE_DOT11D
-
-//#define DOT11D_MAX_CHNL_NUM 83
-
-typedef struct _CHNL_TXPOWER_TRIPLE {
-	u8 FirstChnl;
-	u8  NumChnls;
-	u8  MaxTxPowerInDbm;
-}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
-
-typedef enum _DOT11D_STATE {
-	DOT11D_STATE_NONE = 0,
-	DOT11D_STATE_LEARNED,
-	DOT11D_STATE_DONE,
-}DOT11D_STATE;
-
-typedef struct _RT_DOT11D_INFO {
-	//DECLARE_RT_OBJECT(RT_DOT11D_INFO);
-
-	bool bEnabled; // dot11MultiDomainCapabilityEnabled
-
-	u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.
-	u8  CountryIeBuf[MAX_IE_LEN];
-	u8  CountryIeSrcAddr[6]; // Source AP of the country IE.
-	u8  CountryIeWatchdog;
-
-	u8  channel_map[MAX_CHANNEL_NUMBER+1];  //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan)
-	//u8  ChnlListLen; // #Bytes valid in ChnlList[].
-	//u8  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_hw.h |  314 +---------------------------------
 1 files changed, 5 insertions(+), 309 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_hw.h b/drivers/staging/rtl8187se/r8180_hw.h
index e09f9a3..db29691 100644
--- a/drivers/staging/rtl8187se/r8180_hw.h
+++ b/drivers/staging/rtl8187se/r8180_hw.h
@@ -29,18 +29,10 @@
 #define BIT5	0x00000020
 #define BIT6	0x00000040
 #define BIT7	0x00000080
-#define BIT8	0x00000100
 #define BIT9	0x00000200
-#define BIT10	0x00000400
 #define BIT11	0x00000800
-#define BIT12	0x00001000
 #define BIT13	0x00002000
-#define BIT14	0x00004000
 #define BIT15	0x00008000
-#define BIT16	0x00010000
-#define BIT17	0x00020000
-#define BIT18	0x00040000
-#define BIT19	0x00080000
 #define BIT20	0x00100000
 #define BIT21	0x00200000
 #define BIT22	0x00400000
@@ -57,29 +49,14 @@
 #define MAX_SLEEP_TIME (10000)
 #define MIN_SLEEP_TIME (50)
 
-#define BB_ANTATTEN_CHAN14	0x0c
-#define BB_ANTENNA_B 0x40
-
-#define BB_HOST_BANG (1<<30)
 #define BB_HOST_BANG_EN (1<<2)
 #define BB_HOST_BANG_CLK (1<<1)
-#define BB_HOST_BANG_DATA	 1
-
-#define ANAPARAM_TXDACOFF_SHIFT 27
-#define ANAPARAM_PWR0_MASK ((1<<30)|(1<<29)|(1<<28))
-#define ANAPARAM_PWR0_SHIFT 28
-#define ANAPARAM_PWR1_MASK ((1<<26)|(1<<25)|(1<<24)|(1<<23)|(1<<22)|(1<<21)|(1<<20))
-#define ANAPARAM_PWR1_SHIFT 20
 
 #define MAC0 0
-#define MAC1 1
-#define MAC2 2
-#define MAC3 3
 #define MAC4 4
-#define MAC5 5
+
 #define CMD 0x37
 #define CMD_RST_SHIFT 4
-#define CMD_RESERVED_MASK ((1<<1) | (1<<5) | (1<<6) | (1<<7))
 #define CMD_RX_ENABLE_SHIFT 3
 #define CMD_TX_ENABLE_SHIFT 2
 
@@ -96,13 +73,9 @@
 #define EPROM_W_SHIFT 1
 #define EPROM_R_SHIFT 0
 #define CONFIG2_DMA_POLLING_MODE_SHIFT 3
-#define INTA 0x3e
+
 #define INTA_TXOVERFLOW (1<<15)
 #define INTA_TIMEOUT ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |   67 +------
 .../staging/rtl8187se/ieee80211/ieee80211_crypt.c  |    4 -
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   53 +-----
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |  206 ++------------------
 .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |  103 +---------
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |    6 +-
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |   98 +---------
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |   11 -
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    8 -
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |   60 ------
 drivers/staging/rtl8187se/r8180.h                  |    4 -
 drivers/staging/rtl8187se/r8180_core.c             |  120 +-----------
 drivers/staging/rtl8187se/r8180_dm.c               |   20 +--
 drivers/staging/rtl8187se/r8180_dm.h               |   18 --
 14 files changed, 54 insertions(+), 724 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 5833608..c6cb2e7 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -29,10 +29,7 @@
 #include <linux/jiffies.h>
 #include <linux/timer.h>
 #include <linux/sched.h>
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
 #include <linux/wireless.h>
-#endif
 
 /*
 #ifndef bool
@@ -47,11 +44,7 @@
 #define false  0
 #endif
 */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
-#ifndef bool
-typedef enum{false = 0, true} bool;
-#endif
-#endif
+
 //#ifdef JOHN_HWSEC
 #define KEY_TYPE_NA		0x0
 #define KEY_TYPE_WEP40 		0x1
@@ -112,7 +105,6 @@ typedef enum{false = 0, true} bool;
 
 #define	IEEE_CRYPT_ALG_NAME_LEN			16
 
-#if (LINUX_VERSION_CODE > ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/EndianFree.h   |  199 ---------
 drivers/staging/rtl8192su/ieee80211/aes.c          |  469 --------------------
 drivers/staging/rtl8192su/ieee80211/api.c          |  246 ----------
 drivers/staging/rtl8192su/ieee80211/arc4.c         |  103 -----
 drivers/staging/rtl8192su/ieee80211/autoload.c     |   40 --
 drivers/staging/rtl8192su/ieee80211/cipher.c       |  299 -------------
 drivers/staging/rtl8192su/ieee80211/compress.c     |   64 ---
 .../staging/rtl8192su/ieee80211/crypto_compat.h    |   90 ----
 drivers/staging/rtl8192su/ieee80211/digest.c       |  108 -----
 drivers/staging/rtl8192su/ieee80211/internal.h     |  115 -----
 drivers/staging/rtl8192su/ieee80211/kmap_types.h   |   20 -
 drivers/staging/rtl8192su/ieee80211/michael_mic.c  |  194 --------
 drivers/staging/rtl8192su/ieee80211/proc.c         |  116 -----
 drivers/staging/rtl8192su/ieee80211/rtl_crypto.h   |  399 -----------------
 drivers/staging/rtl8192su/ieee80211/scatterwalk.c  |  126 ------
 drivers/staging/rtl8192su/ieee80211/scatterwalk.h  |   51 ---
 16 files changed, 0 insertions(+), 2639 deletions(-)
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/EndianFree.h
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/aes.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/api.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/arc4.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/autoload.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/cipher.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/compress.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/crypto_compat.h
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/digest.c
 delete mode 100644 drivers/staging/rtl8192su/ieee80211/internal.h
 delete mode 100644 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_core.c    |    4 -
 drivers/staging/rtl8187se/r8180_rtl8225.c |  369 -----------------------------
 drivers/staging/rtl8187se/r8180_rtl8225.h |    4 -
 3 files changed, 0 insertions(+), 377 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 08960f8..1864682 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3613,10 +3613,6 @@ DMESG output to andreamrl@tiscali.it THANKS");
 	priv->rf_init = rtl8225z2_rf_init;
 	priv->rf_set_chan = rtl8225z2_rf_set_chan;
 	priv->rf_set_sens = NULL;
-	//priv->rf_sleep = rtl8225_rf_sleep;
-	//priv->rf_wakeup = rtl8225_rf_wakeup;
-
-
 
 	if(!priv->card_8185){
 		if(priv->antb)
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225.c b/drivers/staging/rtl8187se/r8180_rtl8225.c
index 81c4620..a132f6a 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225.c
@@ -178,17 +178,6 @@ void write_rtl8225(struct net_device *dev, u8 adr, u16 data)
 		rtl8185_rf_pins_enable(dev);
 }
 
-void rtl8225_rf_close(struct net_device *dev)
-{
-	write_rtl8225(dev, 0x4, 0x1f);
-
-	force_pci_posting(dev);
-	mdelay(1);
-
-	rtl8180_set_anaparam(dev, RTL8225_ANAPARAM_OFF);
-	rtl8185_set_anaparam2(dev, RTL8225_ANAPARAM2_OFF);
-}
-
 void rtl8225_SetTXPowerLevel(struct net_device *dev, short ch)
 {
 	struct r8180_priv *priv = ieee80211_priv(dev);
@@ -354,361 +343,3 @@ void rtl8225_host_pci_init(struct net_device *dev)
 void rtl8225_host_usb_init(struct net_device *dev)
 {
 }
-
-void rtl8225_rf_sleep(struct net_device *dev)
-{
-	write_rtl8225(dev,0x4,0xdff);
-	force_pci_posting(dev);
-	mdelay(1);
-	rtl8180_set_anaparam(dev, RTL8225_ANAPARAM_SLEEP);
-	rtl8185_set_anaparam2(dev, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile        |    4 -
 drivers/staging/rtl8187se/r8180_core.c    |    4 -
 drivers/staging/rtl8187se/r8180_gct.c     |  296 -----
 drivers/staging/rtl8187se/r8180_gct.h     |   25 -
 drivers/staging/rtl8187se/r8180_max2820.c |  171 ---
 drivers/staging/rtl8187se/r8180_max2820.h |   21 -
 drivers/staging/rtl8187se/r8180_rtl8255.c | 1807 -----------------------------
 drivers/staging/rtl8187se/r8180_rtl8255.h |   19 -
 drivers/staging/rtl8187se/r8180_sa2400.c  |  233 ----
 drivers/staging/rtl8187se/r8180_sa2400.h  |   26 -
 drivers/staging/rtl8187se/r8180_wx.c      |    1 -
 drivers/staging/rtl8187se/r8185b_init.c   |    4 -
 12 files changed, 0 insertions(+), 2611 deletions(-)
 delete mode 100644 drivers/staging/rtl8187se/r8180_gct.c
 delete mode 100644 drivers/staging/rtl8187se/r8180_gct.h
 delete mode 100644 drivers/staging/rtl8187se/r8180_max2820.c
 delete mode 100644 drivers/staging/rtl8187se/r8180_max2820.h
 delete mode 100644 drivers/staging/rtl8187se/r8180_rtl8255.c
 delete mode 100644 drivers/staging/rtl8187se/r8180_rtl8255.h
 delete mode 100644 drivers/staging/rtl8187se/r8180_sa2400.c
 delete mode 100644 drivers/staging/rtl8187se/r8180_sa2400.h

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 0ad7842..c0c399b 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -20,13 +20,9 @@ EXTRA_CFLAGS += -DENABLE_LPS
 
 rtl8187se-objs :=			\
 		r8180_core.o		\
-		r8180_sa2400.o		\
 		r8180_93cx6.o		\
 		r8180_wx.o		\
-		r8180_max2820.o		\
-		r8180_gct.o		\
 		r8180_rtl8225.o		\
-		r8180_rtl8255.o		\
 		r8180_rtl8225z2.o	\
 		r8185b_init.o		\
 		r8180_dm.o		\
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 121a5d1..1bf3818 100644
--- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180.h |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h
index ad43cfa..8216d7e 100644
--- a/drivers/staging/rtl8187se/r8180.h
+++ b/drivers/staging/rtl8187se/r8180.h
@@ -52,30 +52,16 @@
 
 #define DEFAULT_FRAG_THRESHOLD 2342U
 #define MIN_FRAG_THRESHOLD     256U
-//#define	MAX_FRAG_THRESHOLD     2342U
 #define DEFAULT_RTS_THRESHOLD 2342U
 #define MIN_RTS_THRESHOLD 0U
 #define MAX_RTS_THRESHOLD 2342U
 #define DEFAULT_BEACONINTERVAL 0x64U
-#define DEFAULT_BEACON_ESSID "Rtl8180"
 
-#define DEFAULT_SSID ""
 #define DEFAULT_RETRY_RTS 7
 #define DEFAULT_RETRY_DATA 7
-#define PRISM_HDR_SIZE 64
 
-
-#define MGNT_QUEUE						0
-#define BK_QUEUE						1
-#define BE_QUEUE						2
-#define VI_QUEUE						3
-#define VO_QUEUE						4
-#define HIGH_QUEUE						5
 #define BEACON_QUEUE					6
 
-#define LOW_QUEUE						BE_QUEUE
-#define NORMAL_QUEUE					MGNT_QUEUE
-
 #define aSifsTime 	10
 
 #define sCrcLng         4
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* make read_rtl8225() static
* make tables static const
* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_rtl8225z2.c |  894 +++++++++------------------
 1 files changed, 279 insertions(+), 615 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
index b09c8d1..b648751 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
@@ -236,34 +236,31 @@ static void rtl8225_SetTXPowerLevel(struct net_device *dev, short ch)
 	mdelay(1);
 }
 
-//2005.11.16
-u8 rtl8225z2_threshold[]={
+static const u8 rtl8225z2_threshold[] = {
         0x8d, 0x8d, 0x8d, 0x8d, 0x9d, 0xad, 0xbd,
 };
 
-//      0xd 0x19 0x1b 0x21
-u8 rtl8225z2_gain_bg[]={
-	0x23, 0x15, 0xa5, // -82-1dbm
-        0x23, 0x15, 0xb5, // -82-2dbm
-        0x23, 0x15, 0xc5, // -82-3dbm
-        0x33, 0x15, 0xc5, // -78dbm
-        0x43, 0x15, 0xc5, // -74dbm
-        0x53, 0x15, 0xc5, // -70dbm
-        0x63, 0x15, 0xc5, // -66dbm
+static const u8 rtl8225z2_gain_bg[] = {
+	0x23, 0x15, 0xa5, /* -82-1dBm */
+	0x23, 0x15, 0xb5, /* -82-2dBm */
+	0x23, 0x15, 0xc5, /* -82-3dBm */
+	0x33, 0x15, 0xc5, /* -78dBm */
+	0x43, 0x15, 0xc5, /* -74dBm */
+	0x53, 0x15, 0xc5, /* -70dBm */
+	0x63, 0x15, 0xc5, /* -66dBm */
 };
 
-u8 rtl8225z2_gain_a[]={
-	0x13,0x27,0x5a,//,0x37,// -82dbm
-	0x23,0x23,0x58,//,0x37,// -82dbm
-	0x33,0x1f,0x56,//,0x37,// -82dbm
-	0x43,0x1b,0x54,//,0x37,// -78dbm
-	0x53,0x17,0x51,//,0x37,// -74dbm
-	0x63,0x24,0x4f,//,0x37,// -70dbm
-	0x73,0x0f,0x4c,//,0x37,// -66dbm
+static const u8 rtl8225z2_gain_a[] = {
+	0x13, 0x27, 0x5a, /* -82dBm */
+	0x23, 0x23, 0x58, /* -82dBm */
+	0x33, 0x1f, 0x56, /* -82dBm */
+	0x43, 0x1b, 0x54, /* -78dBm */
+	0x53, 0x17, 0x51, /* ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/r8180_core.c | 1412 ++++++--------------------------
 1 files changed, 245 insertions(+), 1167 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 6875606..08e0034 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -31,8 +31,7 @@
 #undef DUMMY_RX
 
 #include <linux/syscalls.h>
-//#include <linux/fcntl.h>
-//#include <asm/uaccess.h>
+
 #include "r8180_hw.h"
 #include "r8180.h"
 #include "r8180_rtl8225.h" /* RTL8225 Radio frontend */
@@ -52,7 +51,6 @@
 static struct pci_device_id rtl8180_pci_id_tbl[] __devinitdata = {
         {
                 .vendor = PCI_VENDOR_ID_REALTEK,
-//                .device = 0x8180,
                 .device = 0x8199,
                 .subvendor = PCI_ANY_ID,
                 .subdevice = PCI_ANY_ID,
@@ -70,7 +68,6 @@ static struct pci_device_id rtl8180_pci_id_tbl[] __devinitdata = {
 
 static char* ifname = "wlan%d";
 static int hwseqnum = 0;
-//static char* ifname = "ath%d";
 static int hwwep = 0;
 static int channels = 0x3fff;
 
@@ -82,28 +79,12 @@ MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>");
 MODULE_DESCRIPTION("Linux driver for Realtek RTL8180 / RTL8185 WiFi cards");
 
 
-
-/*
-MODULE_PARM(ifname, "s");
-MODULE_PARM_DESC(devname," Net interface name, wlan%d=default");
-
-MODULE_PARM(hwseqnum,"i");
-MODULE_PARM_DESC(hwseqnum," Try to use hardware 802.11 header sequence numbers. Zero=default");
-
-MODULE_PARM(hwwep,"i");
-MODULE_PARM_DESC(hwwep," Try to use hardware WEP support. Still broken and not available on all cards");
-
-MODULE_PARM(channels,"i");
-MODULE_PARM_DESC(channels," Channel bitmask for specific locales. NYI");
-*/
-
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

Add includes to drivers/staging/vt6656.  These came from the includes directory
in the upstream source archive.  Trailing whitespace was stripped.  This is
GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/device_cfg.h |  146 +++++++++++
 drivers/staging/vt6656/iocmd.h      |  478 +++++++++++++++++++++++++++++++++++
 drivers/staging/vt6656/iowpa.h      |  159 ++++++++++++
 drivers/staging/vt6656/ttype.h      |   11 +-
 4 files changed, 791 insertions(+), 3 deletions(-)
 create mode 100644 drivers/staging/vt6656/device_cfg.h
 create mode 100644 drivers/staging/vt6656/iocmd.h
 create mode 100644 drivers/staging/vt6656/iowpa.h

diff --git a/drivers/staging/vt6656/device_cfg.h b/drivers/staging/vt6656/device_cfg.h
new file mode 100644
index 0000000..c0492bd
--- /dev/null
+++ b/drivers/staging/vt6656/device_cfg.h
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * File: device_cfg.h
+ *
+ * Purpose: Driver configuration header
+ * Author: Lyndon Chen
+ *
+ * Date: Dec 9, 2005
+ *
+ */
+#ifndef __DEVICE_CONFIG_H
+#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

Build vt6656.ko, not vntwusb.ko.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/device_cfg.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/vt6656/device_cfg.h b/drivers/staging/vt6656/device_cfg.h
index c0492bd..f272c98 100644
--- a/drivers/staging/vt6656/device_cfg.h
+++ b/drivers/staging/vt6656/device_cfg.h
@@ -89,7 +89,7 @@ struct _version {
 #define VCAM_SIZE           32
 #define TX_QUEUE_NO         8
 
-#define DEVICE_NAME         "vntwusb"
+#define DEVICE_NAME         "vt6656"
 #define DEVICE_FULL_DRV_NAM "VIA Networking Wireless LAN USB Driver"
 
 #ifndef MAJOR_VERSION
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

drivers/staging/vt6656/main_usb.c: Drop obsolete fsuid/fsgid accesses.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/main_usb.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 3368e83..f181d23 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1655,15 +1655,17 @@ static UCHAR *Config_FileOperation(PSDevice pDevice) {
     UCHAR    *buffer=NULL;
     struct file   *filp=NULL;
     mm_segment_t old_fs = get_fs();
-    int oldfsuid=0,oldfsgid=0;
+    //int oldfsuid=0,oldfsgid=0;
     int result=0;
 
     set_fs (KERNEL_DS);
-//Make sure a caller can read or write power as root
-   oldfsuid=current->fsuid;
-   oldfsgid=current->fsgid;
+    /* Can't do this anymore, so we rely on correct filesystem permissions:
+    //Make sure a caller can read or write power as root
+    oldfsuid=current->fsuid;
+    oldfsgid=current->fsgid;
     current->fsuid = 0;
     current->fsgid = 0;
+    */
 
     //open file
       filp = filp_open(config_path, O_RDWR, 0);
@@ -1697,8 +1699,11 @@ error1:
 
 error2:
   set_fs (old_fs);
+
+  /*
   current->fsuid=oldfsuid;
   current->fsgid=oldfsgid;
+  */
 
 if(result!=0) {
     if(buffer)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

vt6656: Replace net_device->priv accesses with netdev_priv calls.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/hostap.c   |    4 ++-
 drivers/staging/vt6656/iwctl.c    |   66 ++++++++++++++++++------------------
 drivers/staging/vt6656/main_usb.c |   28 +++++++---------
 drivers/staging/vt6656/wpactl.c   |    6 ++-
 4 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
index 78312f8..b6ca36a 100644
--- a/drivers/staging/vt6656/hostap.c
+++ b/drivers/staging/vt6656/hostap.c
@@ -103,6 +103,7 @@ static int          msglevel                =MSG_LEVEL_INFO;
 
 static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 {
+    PSDevice apdev_priv;
 	struct net_device *dev = pDevice->dev;
 	int ret;
 
@@ -113,7 +114,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 		return -ENOMEM;
 	memset(pDevice->apdev, 0, sizeof(struct net_device));
 
-	pDevice->apdev->priv = pDevice;
+    apdev_priv = netdev_priv(pDevice->apdev);
+    *apdev_priv = *pDevice;
 	memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
 	pDevice->apdev->hard_start_xmit = pDevice->tx_80211;
 	pDevice->apdev->type = ARPHRD_IEEE80211;
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index a2ca0e1..e6f8c18 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -113,7 +113,7 @@ static int          msglevel                =MSG_LEVEL_INFO;
 
 struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
 {
-	PSDevice pDevice = dev->priv;
+	PSDevice pDevice = netdev_priv(dev);
 	long ldBm;
 
 	pDevice->wstats.status = pDevice->eOPMode;
@@ -172,7 +172,7 @@ static int iwctl_commit(struct net_device *dev,
 //2008-0409-02, <Mark> by Einsn Liu
 /*
 #ifdef Safe_Close
-  PSDevice	        pDevice = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

vt6656: use net_device_ops for management functions

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/hostap.c   |    7 ++++++-
 drivers/staging/vt6656/main_usb.c |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
index b6ca36a..223604d 100644
--- a/drivers/staging/vt6656/hostap.c
+++ b/drivers/staging/vt6656/hostap.c
@@ -117,7 +117,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
     apdev_priv = netdev_priv(pDevice->apdev);
     *apdev_priv = *pDevice;
 	memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
-	pDevice->apdev->hard_start_xmit = pDevice->tx_80211;
+
+	const struct net_device_ops apdev_netdev_ops = {
+		.ndo_start_xmit         = pDevice->tx_80211,
+	};
+	pDevice->apdev->netdev_ops = &apdev_netdev_ops;
+
 	pDevice->apdev->type = ARPHRD_IEEE80211;
 
 	pDevice->apdev->base_addr = dev->base_addr;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 12a9ae0..228b3ec 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -837,6 +837,17 @@ static int vntwusb_resume(struct usb_interface *intf)
 }
 #endif
 
+
+static const struct net_device_ops device_netdev_ops = {
+    .ndo_open               = device_open,
+    .ndo_stop               = device_close,
+    .ndo_do_ioctl           = device_ioctl,
+    .ndo_get_stats          = device_get_stats,
+    .ndo_start_xmit         = device_xmit,
+    .ndo_set_multicast_list = device_set_multi,
+};
+
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 
 static int
@@ -896,12 +907,8 @@ vntwusb_found1(struct usb_device *udev, UINT interface, const struct usb_device_
     pDevice->tx_80211 = device_dma0_tx_80211;
     pDevice->sMgmtObj.pAdapter = (PVOID)pDevice;
 
-    ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

vt6656: replace call to info with printk call.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/main_usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 228b3ec..722b739 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -2392,7 +2392,7 @@ static struct usb_driver vntwusb_driver = {
 
 static int __init vntwusb_init_module(void)
 {
-	info(DEVICE_FULL_DRV_NAM " " DEVICE_VERSION);
+    printk(KERN_NOTICE DEVICE_FULL_DRV_NAM " " DEVICE_VERSION);
     return usb_register(&vntwusb_driver);
 }
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

Integrate drivers/staging/vt6656 into build system.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig         |    2 +
 drivers/staging/Makefile        |    1 +
 drivers/staging/vt6656/Kconfig  |    5 +
 drivers/staging/vt6656/Makefile |  243 ++++++--------------------------------
 4 files changed, 47 insertions(+), 204 deletions(-)
 create mode 100644 drivers/staging/vt6656/Kconfig

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 530a29c..f77b35e 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -123,6 +123,8 @@ source "drivers/staging/serqt_usb2/Kconfig"
 
 source "drivers/staging/vt6655/Kconfig"
 
+source "drivers/staging/vt6656/Kconfig"
+
 source "drivers/staging/cpc-usb/Kconfig"
 
 source "drivers/staging/pata_rdc/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 783dba4..b215035 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_LINE6_USB)		+= line6/
 obj-$(CONFIG_USB_SERIAL_QUATECH2)	+= serqt_usb2/
 obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
 obj-$(CONFIG_VT6655)		+= vt6655/
+obj-$(CONFIG_VT6656)		+= vt6656/
 obj-$(CONFIG_USB_CPC)		+= cpc-usb/
 obj-$(CONFIG_RDC_17F3101X)	+= pata_rdc/
 obj-$(CONFIG_FB_UDL)		+= udlfb/
diff --git a/drivers/staging/vt6656/Kconfig b/drivers/staging/vt6656/Kconfig
new file mode 100644
index 0000000..f823a74
--- /dev/null
+++ b/drivers/staging/vt6656/Kconfig
@@ -0,0 +1,5 @@
+config VT6656
+	tristate "VIA Technologies VT6656 support"
+	---help---
+	This is a vendor-written driver for VIA VT6656.
+
diff --git a/drivers/staging/vt6656/Makefile b/drivers/staging/vt6656/Makefile
index 7d20efe..4467bb1 100644
--- a/drivers/staging/vt6656/Makefile
+++ b/drivers/staging/vt6656/Makefile
@@ -1,204 +1,39 @@
-#
-# Build options:
-#
-#
-
-HOSTAP := 1
-
-
-KSP := ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

Fix this build error when CONFIG_WIRELESS_EXT is not set:
drivers/staging/vt6655/device_main.c:1153: error: 'struct net_device'
	has no member named 'wireless_handlers'

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/device_main.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index f43ca41..0a11d7f 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1146,14 +1146,9 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
     dev->irq                = pcid->irq;
     dev->netdev_ops         = &device_netdev_ops;
 
-#ifdef WIRELESS_EXT
-//Einsn Modify for ubuntu-7.04
-//	dev->wireless_handlers->get_wireless_stats = iwctl_get_wireless_stats;
-#if WIRELESS_EXT > 12
+#ifdef CONFIG_WIRELESS_EXT
 	dev->wireless_handlers = (struct iw_handler_def *)&iwctl_handler_def;
-//	netdev->wireless_handlers = NULL;
-#endif /* WIRELESS_EXT > 12 */
-#endif /* WIRELESS_EXT */
+#endif
 
     rc = register_netdev(dev);
     if (rc)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

As the driver is in mainline now we can remove such dependencies.
WIRELESS_EXT is 22 now.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/device.h      |    4 --
 drivers/staging/vt6655/device_main.c |   20 +-------
 drivers/staging/vt6655/hostap.h      |    8 ---
 drivers/staging/vt6655/iwctl.c       |   77 -------------------------------
 drivers/staging/vt6655/iwctl.h       |   83 ----------------------------------
 5 files changed, 2 insertions(+), 190 deletions(-)

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 264d1bb..6726b2c 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -70,16 +70,12 @@
 #endif
 /* Include Wireless Extension definition and check version - Jean II */
 #include <linux/wireless.h>
-#if WIRELESS_EXT > 12
 #include <net/iw_handler.h>	// New driver API
-#endif	/* WIRELESS_EXT > 12 */
 
 //2008-0409-07, <Add> by Einsn Liu
-#if WIRELESS_EXT > 17
 #ifndef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 #define WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 #endif
-#endif
 //2008-4-14<add> by chester for led issue
 //#define FOR_LED_ON_NOTEBOOK
 //
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 0a11d7f..8846026 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -3412,7 +3412,6 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
     switch(cmd) {
 
 #ifdef WIRELESS_EXT
-//#if WIRELESS_EXT < 13
 
 	case SIOCGIWNAME:
 		rc = iwctl_giwname(dev, NULL, (char *)&(wrq->u.name), NULL);
@@ -3588,7 +3587,6 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
 		}
 		break;
 
-#if WIRELESS_EXT > 9
 		// Get the current Tx-Power
 	case SIOCGIWTXPOW:
         ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Pranith Kumar <pranith.hacks@gmail.com>

This fixes a number of warnings in the otus driver.

Signed-off-by: D Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/otus/ioctl.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index ce04218..dd32705 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -2045,6 +2045,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
 	struct zsKeyInfo keyInfo;
 	struct usbdrv_private *macp = dev->ml_priv;
 	u16_t vapId = 0;
+	int ii;
 
 	/* zmw_get_wlan_dev(dev); */
 
@@ -2168,7 +2169,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
 		/* DUMP key context */
 		/* #ifdef WPA_DEBUG */
 		if (keyInfo.keyLength > 0) {
-			int ii;
 			printk(KERN_WARNING
 						"Otus: Key Context:\n");
 			for (ii = 0; ii < keyInfo.keyLength; ) {
@@ -2266,7 +2266,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
 		/* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data,
 		* zdparm->u.generic_elem.len);
 		*/
-		int ii;
 		u8_t len = zdparm->u.generic_elem.len;
 		u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data;
 
@@ -2401,7 +2400,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 	struct athr_wlan_param zdparm;
 	struct usbdrv_private *macp = dev->ml_priv;
 
-	int err = 0;
+	int err = 0, val = 0;
 	int changed = 0;
 
 	/* regp = macp->regp; */
@@ -2445,7 +2444,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 			err = -EPERM;
 			break;
 		}
-		int val = *((int *) wrq->u.name);
+		val = *((int *) wrq->u.name);
 		if ((val < 0) || (val > 2)) {
 			err = -EINVAL;
 			break;
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/otus/ioctl.c    |   18 +-----------------
 drivers/staging/otus/usbdrv.c   |   14 --------------
 drivers/staging/otus/wrap_buf.c |    3 ---
 drivers/staging/otus/wrap_dbg.c |    3 ---
 drivers/staging/otus/wrap_ev.c  |    7 -------
 drivers/staging/otus/wrap_mem.c |    3 ---
 drivers/staging/otus/wrap_mis.c |    3 ---
 drivers/staging/otus/wrap_pkt.c |    4 ----
 drivers/staging/otus/wrap_sec.c |    3 ---
 drivers/staging/otus/wrap_usb.c |    3 ---
 drivers/staging/otus/wwrap.c    |    3 ---
 drivers/staging/otus/zdcompat.h |   10 ----------
 12 files changed, 1 insertions(+), 73 deletions(-)

diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index dd32705..6808e69 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -58,9 +58,7 @@
 #define ZD_MAX_KEY_SIZE			    32
 #define ZD_MAX_GENERIC_SIZE		    64
 
-#if WIRELESS_EXT > 12
 #include <net/iw_handler.h>
-#endif
 
 extern u16_t zfLnxGetVapId(zdev_t *dev);
 
@@ -248,7 +246,6 @@ int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq)
 	return 0;
 }
 
-#if WIRELESS_EXT > 14
 /*
  * Encode a WPA or RSN information element as a custom
  * element using the hostap format.
@@ -269,7 +266,6 @@ u32 encode_ie(void *buf, u32 bufsize, const u8 *ie, u32 ielen,
 		p += sprintf(p, "%02x", ie[i]);
 	return (i == ielen ? p - (u8 *)buf:0);
 }
-#endif  /* WIRELESS_EXT > 14 */
 
 /*
  * Translate scan data returned from the card to a card independent
@@ -284,9 +280,7 @@ char *usbdrv_translate_scan(struct net_device *dev,
 	char *current_val;     /* For rates */
 	char *last_ev;
 	int i;
-	#if WIRELESS_EXT > 14
-		char    buf[64*2 + 30];
-	#endif
+	char    buf[64*2 + ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Julia Lawall <julia@diku.dk>

Apparently, the NULL test is not necessary at this point.

The semantic patch that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/otus/wwrap.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c
index 4084ad0..53d2a45 100644
--- a/drivers/staging/otus/wwrap.c
+++ b/drivers/staging/otus/wwrap.c
@@ -1015,11 +1015,6 @@ void kevent(struct work_struct *work)
                container_of(work, struct usbdrv_private, kevent);
     zdev_t *dev = macp->device;
 
-    if (macp == NULL)
-    {
-        return;
-    }
-
     if (test_and_set_bit(0, (void *)&smp_kevent_Lock))
     {
         //schedule_work(&macp->kevent);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Figo.zhang <figo1802@gmail.com>

vfree() does it's own NULL checking,so no need for check before
calling it.

'pages' is local variable argment,so in v2, it is no need assignment
 to NULL.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/drivers.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 5157c89..dc53aee 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -509,9 +509,8 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
 			async->prealloc_buf =
 			    vmap(pages, n_pages, VM_MAP, PAGE_KERNEL_NOCACHE);
 		}
-		if (pages) {
-			vfree(pages);
-		}
+		vfree(pages);
+
 		if (async->prealloc_buf == NULL) {
 			/* Some allocation failed above. */
 			if (async->buf_page_list) {
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Robert P. J. Day <rpjday@crashcourse.ca>

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/comedi_ksyms.c     |    3 ---
 drivers/staging/comedi/kcomedilib/ksyms.c |    4 ----
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/comedi_ksyms.c b/drivers/staging/comedi/comedi_ksyms.c
index a732e34..87803e6 100644
--- a/drivers/staging/comedi/comedi_ksyms.c
+++ b/drivers/staging/comedi/comedi_ksyms.c
@@ -22,9 +22,6 @@
 */
 
 #define __NO_VERSION__
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
 
 #include "comedidev.h"
 
diff --git a/drivers/staging/comedi/kcomedilib/ksyms.c b/drivers/staging/comedi/kcomedilib/ksyms.c
index 314765d..19293d1 100644
--- a/drivers/staging/comedi/kcomedilib/ksyms.c
+++ b/drivers/staging/comedi/kcomedilib/ksyms.c
@@ -21,10 +21,6 @@
 
 */
 
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
 #include "../comedi.h"
 #include "../comedilib.h"
 #include "../comedidev.h"
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Roel Kluin <roel.kluin@gmail.com>

If `cmd->chanlist_len' is 0, then we write ppl[-1].

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/drivers/s626.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 6549d11..80d2787 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -1707,7 +1707,8 @@ static int s626_ai_load_polllist(uint8_t * ppl, struct comedi_cmd *cmd)
 		else
 			ppl[n] = (CR_CHAN((cmd->chanlist)[n])) | (RANGE_10V);
 	}
-	ppl[n - 1] |= EOPL;
+	if (n != 0)
+		ppl[n - 1] |= EOPL;
 
 	return n;
 }
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Huang Weiyi <weiyi.huang@gmail.com>

Remove unused #include <linux/version.h>'s in
drivers/staging/cpc-usb/cpc-usb_drv.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/cpc-usb/cpc-usb_drv.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/cpc-usb/cpc-usb_drv.c b/drivers/staging/cpc-usb/cpc-usb_drv.c
index 9bf3f98..c5eca46 100644
--- a/drivers/staging/cpc-usb/cpc-usb_drv.c
+++ b/drivers/staging/cpc-usb/cpc-usb_drv.c
@@ -28,7 +28,6 @@
 #include <asm/uaccess.h>
 #include <linux/usb.h>
 
-#include <linux/version.h>
 
 #include <linux/proc_fs.h>
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Moritz Muehlenhoff <jmm@debian.org>

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/hfa384x_usb.c  |    3 ---
 drivers/staging/wlan-ng/p80211netdev.c |    3 ---
 drivers/staging/wlan-ng/p80211netdev.h |    3 ---
 drivers/staging/wlan-ng/p80211wep.c    |   15 ---------------
 drivers/staging/wlan-ng/p80211wext.c   |    3 ---
 drivers/staging/wlan-ng/prism2mgmt.c   |    3 ---
 drivers/staging/wlan-ng/prism2sta.c    |    3 ---
 7 files changed, 0 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index deb8ba9..925678b 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -128,9 +128,6 @@
 
 #define SUBMIT_URB(u,f)  usb_submit_urb(u,f)
 
-/*================================================================*/
-/* Project Includes */
-
 #include "p80211types.h"
 #include "p80211hdr.h"
 #include "p80211mgmt.h"
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index e397b32..0f030f8 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -76,9 +76,6 @@
 #include <net/iw_handler.h>
 #include <net/net_namespace.h>
 
-/*================================================================*/
-/* Project Includes */
-
 #include "p80211types.h"
 #include "p80211hdr.h"
 #include "p80211conv.h"
diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h
index f4fcd2b..8bd9dfb 100644
--- a/drivers/staging/wlan-ng/p80211netdev.h
+++ b/drivers/staging/wlan-ng/p80211netdev.h
@@ -57,9 +57,6 @@
 #include <linux/wireless.h>
 #include <linux/netdevice.h>
 
-/*================================================================*/
-/* Constants */
-
 #undef netdevice_t
 typedef struct net_device netdevice_t;
 
diff --git a/drivers/staging/wlan-ng/p80211wep.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Moritz Muehlenhoff <jmm@debian.org>

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/p80211netdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 0f030f8..dd96a42 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -448,7 +448,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
 failed:
 	/* Free up the WEP buffer if it's not the same as the skb */
 	if ((p80211_wep.data) && (p80211_wep.data != skb->data))
-		kfree(p80211_wep.data);
+		kzfree(p80211_wep.data);
 
 	/* we always free the skb here, never in a lower level. */
 	if (!result)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

From: Moritz Muehlenhoff <jmm@debian.org>

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/p80211netdev.c |    3 ---
 drivers/staging/wlan-ng/p80211wext.c   |    8 --------
 2 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index dd96a42..22424c8 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -764,9 +764,6 @@ int wlan_setup(wlandevice_t *wlandev)
 		dev->ml_priv = wlandev;
 		dev->netdev_ops = &p80211_netdev_ops;
 
-#if (WIRELESS_EXT < 21)
-		dev->get_wireless_stats = p80211wext_get_wireless_stats;
-#endif
 		dev->wireless_handlers = &p80211wext_handler_def;
 
 		netif_stop_queue(dev);
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c
index c3b4274..74d8022 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -689,9 +689,6 @@ static int p80211wext_giwessid(netdevice_t *dev,
 		data->flags = 1;
 		memcpy(essid, wlandev->ssid.data, data->length);
 		essid[data->length] = 0;
-#if (WIRELESS_EXT < 21)
-		data->length++;
-#endif
 	} else {
 		memset(essid, 0, sizeof(wlandev->ssid.data));
 		data->length = 0;
@@ -724,11 +721,6 @@ static int p80211wext_siwessid(netdevice_t *dev,
 
 	msg.msgcode = DIDmsg_lnxreq_autojoin;
 
-#if (WIRELESS_EXT < 21)
-	if (length)
-		length--;
-#endif
-
 	/* Trim the last '\0' to fit the SSID format */
 	if (length && essid[length - 1] == '\0')
 		length--;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Karl Relton <karllinuxtest.relton@ntlworld.com>

Convert prism2_usb firmware loading to load firmware in pre-compiled
binary 'ihex' format rather than ascii 'srec' format. This moves the
srec processing and sorting of records out of kernel space into a
pre-compiler. The driver now just works with the binary image, but
still does the 'pda plugging' of that image at runtime, as required
by the prism hardware.

Some Notes:

- The firmware is now expected to be in the same 'ihex' (.fw) format
  used by other drivers.

- The now driver assumes the data records are already sorted into ascending
  address order.

- Plug and crc records are still recognised by special address locations
  as in original srec processing.

- The srec S7 start address record is assumed to have been converted
  into a data record with another special address location (0xff400000),
  with the original start address being stored as a 4 byte data word
  (little endian).

Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/prism2fw.c |  465 ++++++++++--------------------------
 1 files changed, 131 insertions(+), 334 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index c62b475..7d76a7f 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -47,84 +47,28 @@
 
 /*================================================================*/
 /* System Includes */
-#include <linux/sort.h>
-#include <linux/firmware.h>
+#include <linux/ihex.h>
 
 /*================================================================*/
 /* Local Constants */
 
-#define PRISM2_USB_FWFILE	"prism2_ru.hex"
+#define PRISM2_USB_FWFILE	"prism2_ru.fw"
 
 #define S3DATA_MAX		5000
 #define S3PLUG_MAX		200
 #define S3CRC_MAX		200
 #define S3INFO_MAX		50
-#define SREC_LINE_MAX		264
-#define S3LEN_TXTOFFSET		2
-#define S3LEN_TXTLEN		2
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Moritz Muehlenhoff <jmm@debian.org>

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/p80211hdr.h   |   15 ---------------
 drivers/staging/wlan-ng/p80211meta.h  |    6 ------
 drivers/staging/wlan-ng/p80211mgmt.h  |    6 ------
 drivers/staging/wlan-ng/p80211msg.h   |    6 ------
 drivers/staging/wlan-ng/p80211types.h |    4 ----
 5 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h
index 1703c92..419de4d 100644
--- a/drivers/staging/wlan-ng/p80211hdr.h
+++ b/drivers/staging/wlan-ng/p80211hdr.h
@@ -60,17 +60,8 @@
 #ifndef _P80211HDR_H
 #define _P80211HDR_H
 
-/*================================================================*/
-/* System Includes */
-
 #include <linux/if_ether.h>
 
-/*================================================================*/
-/* Project Includes */
-
-/*================================================================*/
-/* Constants */
-
 /*--- Sizes -----------------------------------------------*/
 #define WLAN_CRC_LEN			4
 #define WLAN_BSSID_LEN			6
@@ -121,9 +112,6 @@
 #define WLAN_FSTYPE_CFPOLL		0x06
 #define WLAN_FSTYPE_CFACK_CFPOLL	0x07
 
-/*================================================================*/
-/* Macros */
-
 /*--- FC Macros ----------------------------------------------*/
 /* Macros to get/set the bitfields of the Frame Control Field */
 /*  GET_FC_??? - takes the host byte-order value of an FC     */
@@ -157,9 +145,6 @@
 
 #define DOT11_RATE5_ISBASIC_GET(r)     (((u8)(r)) & BIT(7))
 
-/*================================================================*/
-/* Types */
-
 /* Generic 802.11 Header types */
 
 typedef struct p80211_hdr_a3 {
diff --git a/drivers/staging/wlan-ng/p80211meta.h b/drivers/staging/wlan-ng/p80211meta.h
index c1a677b..b9badcf 100644
--- a/drivers/staging/wlan-ng/p80211meta.h
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

The patch is of the "works as far as it goes" variety, in that the
module compiles and loads, the device nodes are registered and the unit
switched on, but nothing actually works. On the other hand, it doesn't
panic the kernel, as far as I know.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig                     |    2 +
 drivers/staging/Makefile                    |    1 +
 drivers/staging/quatech_usb2/Kconfig        |   15 +
 drivers/staging/quatech_usb2/Makefile       |    1 +
 drivers/staging/quatech_usb2/quatech_usb2.c |  611 +++++++++++++++++++++++++++
 5 files changed, 630 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/quatech_usb2/Kconfig
 create mode 100644 drivers/staging/quatech_usb2/Makefile
 create mode 100644 drivers/staging/quatech_usb2/quatech_usb2.c

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index f77b35e..549ae79 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -121,6 +121,8 @@ source "drivers/staging/octeon/Kconfig"
 
 source "drivers/staging/serqt_usb2/Kconfig"
 
+source "drivers/staging/quatech_usb2/Kconfig"
+
 source "drivers/staging/vt6655/Kconfig"
 
 source "drivers/staging/vt6656/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index b215035..cb14ff2 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_PLAN9AUTH)		+= p9auth/
 obj-$(CONFIG_HECI)		+= heci/
 obj-$(CONFIG_LINE6_USB)		+= line6/
 obj-$(CONFIG_USB_SERIAL_QUATECH2)	+= serqt_usb2/
+obj-$(CONFIG_USB_SERIAL_QUATECH_USB2)	+= quatech_usb2/
 obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
 obj-$(CONFIG_VT6655)		+= vt6655/
 obj-$(CONFIG_VT6656)		+= vt6656/
diff --git a/drivers/staging/quatech_usb2/Kconfig b/drivers/staging/quatech_usb2/Kconfig
new file mode 100644
index 0000000..1494f42
--- /dev/null
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

Part two of the driver implementation has finally got done. It
implements the rest of open and the callback for reads from the box. I
seem to have finally found a structure that can be made to work, with a
single set of URBs for bulk read and write for the whole device, which
are used by all the ports. I've rationalised a few things, but there
will still be a lot of clean-up needed.

This one definitely can panic the kernel when a port is opened for
reading, but I'm off on holiday so I thought I'd post where I have got
to so far. I haven't tried to debug why it panics with a null pointer
dereference yet.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |  584 +++++++++++++++++++++++----
 1 files changed, 515 insertions(+), 69 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index 3544e70..0eaea2e 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -38,6 +38,7 @@ static int debug;
 #define QU2BOXPWRON 0x8000		/* magic number to turn FPGA power on */
 #define QU2BOX232 0x40			/* RS232 mode on MEI devices */
 #define QU2BOXSPD9600 0x60		/* set speed to 9600 baud */
+#define FIFO_DEPTH 1024			/* size of hardware fifos */
 /* directions for USB transfers */
 #define USBD_TRANSFER_DIRECTION_IN    0xc0
 #define USBD_TRANSFER_DIRECTION_OUT   0x40
@@ -84,6 +85,12 @@ static int debug;
 #define SERIAL_LSR_FE       0x08
 #define SERIAL_LSR_BI       0x10
 
+/* handy macros for doing escape sequence parsing on data reads */
+#define THISCHAR	((unsigned char *)(urb->transfer_buffer))[i]
+#define NEXTCHAR	((unsigned char *)(urb->transfer_buffer))[i + 1]
+#define THIRDCHAR	((unsigned char *)(urb->transfer_buffer))[i + 2]
+#define FOURTHCHAR	((unsigned char *)(urb->transfer_buffer))[i + 3]
+#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

This patch implements close(), read(), write() and some ioctls, and
fixes some implementation issues in open(). Compared to the previous
patch it doesn't suffer an oops in the module code, however if you try
to open any of the serial devices a second time then an oops occurs in
tty_open(), presumably because my code isn't playing nicely on the
previous close():

Aug 13 11:44:01 [kernel] WARNING: at drivers/char/tty_io.c:1268 tty_open+0x3e5/0x46d()
Aug 13 11:44:01 [kernel] Hardware name: HP Compaq dc5100 MT(PW097ET)
Aug 13 11:44:01 [kernel] Modules linked in: quatech_usb2(C) usbserial snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd snd_pcm snd_timer usbcore snd ohci1394 psmouse ide_cd_mod cdrom tg3 soundcore snd_page_alloc ieee1394 libphy intel_agp agpgart floppy evdev [last unloaded: usbserial]
Aug 13 11:44:01 [kernel] Pid: 26765, comm: stty Tainted: G         C 2.6.31-rc5-git3-gkh #7
Aug 13 11:44:01 [kernel] Call Trace:
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10264e2>] warn_slowpath_common+0x88/0xb0
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c102652b>] warn_slowpath_null+0x21/0x3b
Aug 13 11:44:01 [kernel]  [<c11dbef8>] tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10883d1>] chrdev_open+0x77/0x113
Aug 13 11:44:01 [kernel]  [<c1083a5d>] __dentry_open+0xb8/0x230
Aug 13 11:44:01 [kernel]  [<c108835a>] ? chrdev_open+0x0/0x113
Aug 13 11:44:01 [kernel]  [<c1084993>] nameidata_to_filp+0x61/0x6a
Aug 13 11:44:01 [kernel]  [<c1091144>] do_filp_open+0x248/0x7cd
Aug 13 11:44:01 [kernel]  [<c106f14f>] ? __do_fault+0x2ba/0x3b2
Aug 13 11:44:01 [kernel]  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

The following patch re-writes the write_room method to work in the
obvious sort of way, so it keeps it's promises to the layers above.
Based on feedback from Alan Cox.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |   99 +++++++++++++++++++-------
 1 files changed, 72 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index bbbf9b8..55a25e5 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -38,7 +38,7 @@ static int debug;
 #define QU2BOXPWRON 0x8000		/* magic number to turn FPGA power on */
 #define QU2BOX232 0x40			/* RS232 mode on MEI devices */
 #define QU2BOXSPD9600 0x60		/* set speed to 9600 baud */
-#define FIFO_DEPTH 1024			/* size of hardware fifos */
+#define QT2_FIFO_DEPTH 1024			/* size of hardware fifos */
 #define QT2_TX_HEADER_LENGTH	5
 /* length of the header sent to the box with each write URB */
 
@@ -146,18 +146,32 @@ static struct usb_driver quausb2_usb_driver = {
  * value of the line status flags from the port
  * @param shadowMSR Last received state of the modem status register, holds
  * the value of the modem status received from the port
- * @param xmit_pending_bytes Number of bytes waiting to be sent out of
- * the serial port
- * @param xmit_fifo_room_bytes free space available in the transmit fifo
- * for this port on the box
  * @param rcv_flush Flag indicating that a receive flush has occured on
  * the hardware.
  * @param xmit_flush Flag indicating that a transmit flush has been processed by
  * the hardware.
- * @param fifo_empty_flag Flag indicating that the (per-port) buffer on the
- * device is empty.
- * @param tx_fifo_room	Number of bytes room left in the buffer
- * @param tx_pending_bytes Number of bytes waiting to be sent
+ * @param ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

Patch to remove TIOCMGET and TIOCMSET from the driver ioctl method, as
they never get used (error in vendor driver).

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |   32 +++++++++++---------------
 1 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index 55a25e5..a877e48 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -860,7 +860,10 @@ static int qt2_chars_in_buffer(struct tty_struct *tty)
 	return chars;
 }
 
-
+/* called when userspace does an ioctl() on the device. Note that
+ * TIOCMGET and TIOCMSET are filtered off to their own methods before they get
+ * here, so we don't have to handle them.
+ */
 static int qt2_ioctl(struct tty_struct *tty, struct file *file,
 		     unsigned int cmd, unsigned long arg)
 {
@@ -887,22 +890,12 @@ static int qt2_ioctl(struct tty_struct *tty, struct file *file,
 	dbg("%s(): port %d, UartNumber %d, tty =0x%p", __func__,
 	    port->number, UartNumber, tty);
 
-	if (cmd == TIOCMGET) {
-		return qt2_tiocmget(tty, file);
-		/* same as tiocmget function */
-	} else if (cmd == TIOCMSET) {
-		if (copy_from_user(&value, (unsigned int *)arg,
-			sizeof(unsigned int)))
-			return -EFAULT;
-		return qt2_tiocmset(tty, file, value, 0);
-		/* same as tiocmset function */
-	} else if (cmd == TIOCMBIS || cmd == TIOCMBIC) {
-		status = qt2_box_get_register(port->serial, UartNumber,
-				QT2_MODEM_CONTROL_REGISTER, &mcr_value);
-		if (status < 0)
+	if (cmd == TIOCMBIS || cmd == TIOCMBIC) {
+		if (qt2_box_get_register(port->serial, UartNumber,
+			QT2_MODEM_CONTROL_REGISTER, &mcr_value) < 0)
 			return -ESPIPE;
 		if (copy_from_user(&value, (unsigned int *)arg,
-			sizeof(unsigned int)))
+			sizeof(value)))
 			return ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

It seems I can't count.

Patch to fix chars_in_buffer() method (broken in vendor driver), and
subsequently simplify the close() method, making it somewhat less
broken. There is quite a bit more improvement to do on this method
though.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |   41 ++++++++-------------------
 1 files changed, 12 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index a877e48..7705856 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -619,7 +619,10 @@ int qt2_open(struct tty_struct *tty, struct usb_serial_port *port)
 	return 0;
 }
 
-/* called when a port is closed by userspace */
+/* called when a port is closed by userspace. It won't be called, however,
+ * until calls to chars_in_buffer() reveal that the port has completed
+ * sending buffered data, and there is nothing else to do. Thus we don't have
+ * to rely on forcing data through in this function. */
 /* Setting close_pending should keep new data from being written out,
  * once all the data in the enpoint buffers is moved out we won't get
  * any more. */
@@ -644,26 +647,8 @@ static void qt2_close(struct usb_serial_port *port)
 	/* get the device private data */
 	port_extra = qt2_get_port_private(port); /* port private data */
 
-	/* to check we have successfully flushed the buffers on the hardware,
-	 * we set the flags indicating flushes have occured to false, then ask
-	 * for flushes to occur, then sit in a timed loop until either we
-	 * get notified back that the flushes have happened (good) or we get
-	 * tired of waiting for the flush to happen and give up (bad).
-	 */
-	port_extra->rcv_flush = false;
-	port_extra->xmit_flush = false;
-	qt2_box_flush(serial, port->number, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

This patch imports the implementation of the set_termios method from the
vendor driver into the staging driver. The common terminal setting
changes should be supported.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |  330 +++++++++++++++++++++------
 1 files changed, 263 insertions(+), 67 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index 7705856..f719219 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -52,12 +52,12 @@ static int debug;
 #define QT_OPEN_CLOSE_CHANNEL		0xca
 /*#define QT_GET_SET_PREBUF_TRIG_LVL	0xcc
 #define QT_SET_ATF			0xcd*/
-#define QT2_GET_SET_REGISTER		0xc0
-#define QT_GET_SET_UART			0xc1
-/*#define QT_HW_FLOW_CONTROL_MASK		0xc5
-#define QT_SW_FLOW_CONTROL_MASK		0xc6
-#define QT_SW_FLOW_CONTROL_DISABLE	0xc7
-#define QT_BREAK_CONTROL 		0xc8
+#define QT2_GET_SET_REGISTER			0xc0
+#define QT2_GET_SET_UART			0xc1
+#define QT2_HW_FLOW_CONTROL_MASK		0xc5
+#define QT2_SW_FLOW_CONTROL_MASK		0xc6
+#define QT2_SW_FLOW_CONTROL_DISABLE	0xc7
+/*#define QT_BREAK_CONTROL 		0xc8
 #define QT_STOP_RECEIVE			0xe0*/
 #define QT2_FLUSH_DEVICE		0xc4
 #define QT_GET_SET_QMCR			0xe1
@@ -66,34 +66,35 @@ static int debug;
 #define QT2_FLUSH_RX			0x00
 #define QT2_FLUSH_TX			0x01
 
-/* port setting constants */
-#define  SERIAL_MCR_DTR             0x01
-#define  SERIAL_MCR_RTS             0x02
-#define  SERIAL_MCR_LOOP            0x10
+/* port setting constants, used to set up serial port speeds, flow
+ * control and so on */
+#define QT2_SERIAL_MCR_DTR	0x01
+#define QT2_SERIAL_MCR_RTS	0x02
+#define QT2_SERIAL_MCR_LOOP	0x10
 
-#define  SERIAL_MSR_CTS             0x10
-#define  SERIAL_MSR_CD              0x80
-#define  SERIAL_MSR_RI              0x40
-#define  SERIAL_MSR_DSR        ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

This patch imports the implementation of the break_ctl, throttle and
unthrottle methods from the vendor driver into the staging driver. This
compiles but is not yet tested.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/quatech_usb2.c |  220 ++++++++++++++++++++++-----
 1 files changed, 180 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index f719219..b06e90d 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -56,11 +56,11 @@ static int debug;
 #define QT2_GET_SET_UART			0xc1
 #define QT2_HW_FLOW_CONTROL_MASK		0xc5
 #define QT2_SW_FLOW_CONTROL_MASK		0xc6
-#define QT2_SW_FLOW_CONTROL_DISABLE	0xc7
-/*#define QT_BREAK_CONTROL 		0xc8
-#define QT_STOP_RECEIVE			0xe0*/
-#define QT2_FLUSH_DEVICE		0xc4
-#define QT_GET_SET_QMCR			0xe1
+#define QT2_SW_FLOW_CONTROL_DISABLE		0xc7
+#define QT2_BREAK_CONTROL 			0xc8
+#define QT2_STOP_RECEIVE			0xe0
+#define QT2_FLUSH_DEVICE			0xc4
+#define QT2_GET_SET_QMCR			0xe1
 
 /* sorts of flush we can do on */
 #define QT2_FLUSH_RX			0x00
@@ -138,31 +138,21 @@ static struct usb_driver quausb2_usb_driver = {
 	.no_dynamic_id = 1,
 };
 
-/** structure in which to keep all the messy stuff that this driver needs
- * alongside the usb_serial_port structure
- * @param read_urb_busy Flag indicating that port->read_urb is in use
- * @param close_pending flag indicating that this port is in the process of
+/**
+ * quatech2_port: Structure in which to keep all the messy stuff that this
+ * driver needs alongside the usb_serial_port structure
+ * @read_urb_busy: Flag indicating that port->read_urb is in use
+ * @close_pending: flag indicating that this port is in the process of
  * being closed (and so no new reads / writes should be started).
- * @param shadowLSR ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Forest Bond <forest@alittletooquiet.net>

Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/80211hdr.h           |  358 ++
 drivers/staging/vt6656/80211mgr.c           | 1050 ++++++
 drivers/staging/vt6656/80211mgr.h           |  867 +++++
 drivers/staging/vt6656/Makefile             |  204 ++
 drivers/staging/vt6656/aes_ccmp.c           |  410 +++
 drivers/staging/vt6656/aes_ccmp.h           |   48 +
 drivers/staging/vt6656/baseband.c           | 2129 ++++++++++++
 drivers/staging/vt6656/baseband.h           |  163 +
 drivers/staging/vt6656/bssdb.c              | 1777 ++++++++++
 drivers/staging/vt6656/bssdb.h              |  370 ++
 drivers/staging/vt6656/card.c               | 1147 ++++++
 drivers/staging/vt6656/card.h               |  109 +
 drivers/staging/vt6656/channel.c            |  535 +++
 drivers/staging/vt6656/channel.h            |   58 +
 drivers/staging/vt6656/control.c            |  116 +
 drivers/staging/vt6656/control.h            |  103 +
 drivers/staging/vt6656/country.h            |  163 +
 drivers/staging/vt6656/datarate.c           |  518 +++
 drivers/staging/vt6656/datarate.h           |  110 +
 drivers/staging/vt6656/desc.h               |  453 +++
 drivers/staging/vt6656/device.h             |  988 ++++++
 drivers/staging/vt6656/dpc.c                | 1673 +++++++++
 drivers/staging/vt6656/dpc.h                |   94 +
 drivers/staging/vt6656/firmware.c           |  887 +++++
 drivers/staging/vt6656/firmware.h           |   66 +
 drivers/staging/vt6656/hostap.c             |  881 +++++
 drivers/staging/vt6656/hostap.h             |   94 +
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

This is the vendor driver for the Ralink RT3090 chipset.

It should be later cleaned and ported to use the existing rt2x00
infrastructure or just replaced by the proper version.

[ Unfortunately since it follows the same design/implementation like
  rt{286,287,307}0 drivers (already present in the staging tree)
  it is highly unlikely that it will see much love from the wireless
  development community.. ]

However since the development of the cleaner/proper version can take
significant time lets give distros (i.e. openSUSE seems to already
have the package with the original vendor driver) and users "something"
to use in the meantime.

I forward ported it to 2.6.31-rc1, ported to the Linux build system
and did some initial cleanups.  More fixes/cleanups to come later
(it seems that the driver can be made to share most of its code with
the other Ralink drivers already present in the staging tree).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig                          |    2 +
 drivers/staging/Makefile                         |    1 +
 drivers/staging/rt3090/Kconfig                   |    5 +
 drivers/staging/rt3090/Makefile                  |   80 +
 drivers/staging/rt3090/action.h                  |   66 +
 drivers/staging/rt3090/ap.h                      |  512 ++
 drivers/staging/rt3090/ap_apcli.h                |  276 +
 drivers/staging/rt3090/ap_autoChSel.h            |   79 +
 drivers/staging/rt3090/ap_autoChSel_cmm.h        |   66 +
 drivers/staging/rt3090/ap_cfg.h                  |  118 +
 drivers/staging/rt3090/ap_ids.h                  |   82 +
 drivers/staging/rt3090/ap_mbss.h                 |   72 +
 drivers/staging/rt3090/ap_uapsd.h                |  636 ++
 drivers/staging/rt3090/ap_wds.h                  |  212 +
 drivers/staging/rt3090/chips/rt3090.c            |  123 +
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:04 pm

From: Mithlesh Thukral <mithlesh@linsyssoft.com>

Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/comedi.h                    | 1002 +++++-----
 drivers/staging/comedi/comedi_compat32.c           |  115 +-
 drivers/staging/comedi/comedi_compat32.h           |    4 +-
 drivers/staging/comedi/comedi_fops.c               |  278 ++--
 drivers/staging/comedi/comedidev.h                 |   85 +-
 drivers/staging/comedi/comedilib.h                 |   77 +-
 drivers/staging/comedi/drivers.c                   |  179 +-
 drivers/staging/comedi/drivers/8253.h              |   69 +-
 drivers/staging/comedi/drivers/8255.c              |   54 +-
 drivers/staging/comedi/drivers/8255.h              |   16 +-
 drivers/staging/comedi/drivers/acl7225b.c          |   22 +-
 drivers/staging/comedi/drivers/adl_pci6208.c       |   93 +-
 drivers/staging/comedi/drivers/adl_pci7296.c       |   39 +-
 drivers/staging/comedi/drivers/adl_pci7432.c       |   57 +-
 drivers/staging/comedi/drivers/adl_pci8164.c       |  126 +-
 drivers/staging/comedi/drivers/adl_pci9111.c       |  361 ++--
 drivers/staging/comedi/drivers/adl_pci9118.c       |  532 +++---
 drivers/staging/comedi/drivers/adq12b.c            |  371 ++--
 drivers/staging/comedi/drivers/adv_pci1710.c       |  417 +++--
 drivers/staging/comedi/drivers/adv_pci1723.c       |   73 +-
 drivers/staging/comedi/drivers/adv_pci_dio.c       |  306 ++--
 drivers/staging/comedi/drivers/aio_aio12_8.c       |   36 +-
 drivers/staging/comedi/drivers/aio_iiro_16.c       |   30 +-
 drivers/staging/comedi/drivers/amplc_dio200.c      |  314 ++--
 drivers/staging/comedi/drivers/amplc_pc236.c       |  118 +-
 drivers/staging/comedi/drivers/amplc_pc263.c       |  101 +-
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

This patch contains changes made in the course of successfully reading
data from the device. These consist of a number of corrections and
additions to debug messages, and a fix for incorrect calculation of the
number of characters in the device FIFO which affected the operation of
the write_room method.
The use of semaphores to control access to port settings is replaced by
the preferred use of mutexes as this is the only code that uses them.

Aug 18 17:09:32 [kernel] BUG: unable to handle kernel paging request at f82f122c
Aug 18 17:09:32 [kernel] IP: [<c11e1a63>] tty_port_close_start+0x8c/0x15e
Aug 18 17:09:32 [kernel] *pde = 00000000
Aug 18 17:09:32 [kernel] Modules linked in: snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect quatech_usb2(C) usbserial uhci_hcd ehci_hcd snd_intel8x0 snd_ac97_codec ac97_bus usbcore tg3 snd_pcm snd_timer libphy snd intel_agp psmouse evdev ohci1394 soundcore ide_cd_mod cdrom ieee1394 snd_page_alloc agpgart floppy
Aug 18 17:09:32 [kernel] Pid: 4192, comm: cat Tainted: G         C (2.6.31-rc6-gkh #9) HP Compaq dc5100 MT(PW097ET)
Aug 18 17:09:32 [kernel] EIP: 0060:[<c11e1a63>] EFLAGS: 00010046 CPU: 0
Aug 18 17:09:32 [kernel] EIP is at tty_port_close_start+0x8c/0x15e
Aug 18 17:09:32 [kernel] EAX: 00000000 EBX: 00000246 ECX: ebacc380 EDX: 00000000
Aug 18 17:09:32 [kernel] ESI: f72f1204 EDI: e6073000 EBP: e60b3ce4 ESP: e60b3ccc
Aug 18 17:09:32 [kernel]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
Aug 18 17:09:32 [kernel]  bcc17886 e60b3d2c bcc17886 f72f1200 f72f1204 e6073000 e60b3d10 f8b01a67
Aug 18 17:09:32 [kernel] <0> 00000000 e60b3d10 c11d9343 e60730a0 ebacc380 bcc17886 e6073000 00000000
Aug 18 17:09:32 [kernel] <0> ebacc380 e60b3d90 c11da71c 00000000 f7802480 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Richard Ash <richard@audacityteam.org>

This patch implements several improvements to the set_termios method
suggested by Alan Cox:
* Correct check for whether any changes are being requested.
* Inform callers that mark/space parity isn't supported by always
clearing the bit.
* Pass back the actual used baud rate in case it doesn't match what was
requested.

Remaining known issues are that IXANY flow control is not supported, but
we don't tell the caller that, and input and output XON/XOFF flow
control are either both on or both off, but we don't indicate that back
to the caller either.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/quatech_usb2/TODO           |    8 +++++++
 drivers/staging/quatech_usb2/quatech_usb2.c |   30 +++++++++++++++++---------
 2 files changed, 27 insertions(+), 11 deletions(-)
 create mode 100644 drivers/staging/quatech_usb2/TODO

diff --git a/drivers/staging/quatech_usb2/TODO b/drivers/staging/quatech_usb2/TODO
new file mode 100644
index 0000000..67f61db
--- /dev/null
+++ b/drivers/staging/quatech_usb2/TODO
@@ -0,0 +1,8 @@
+Incomplete list of things that this driver does not yet implement completely or
+at all. some of these may not be possible to implement because the hardware
+support does not exist. Others may be possible, but the magic control codes to
+make them happen are unknown, and some may just need the driver support to
+implement them writing.
+
+* Mark/Space parity is not implemented (reported back correctly)
+* IXANY flow control mode is not implemented (flag ignored completely)
diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index deb222c..2acef94 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -83,8 +83,8 @@ static int debug;
 #define QT2_SERIAL_6_DATA	0x01
 #define QT2_SERIAL_5_DATA	0x00
 
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/bssdb.c      |    9 --
 drivers/staging/vt6656/device.h     |    5 -
 drivers/staging/vt6656/device_cfg.h |    4 -
 drivers/staging/vt6656/dpc.c        |   15 ---
 drivers/staging/vt6656/iwctl.c      |   56 ---------
 drivers/staging/vt6656/kcompat.h    |  232 -----------------------------------
 drivers/staging/vt6656/main_usb.c   |  111 -----------------
 drivers/staging/vt6656/usbpipe.c    |  132 --------------------
 drivers/staging/vt6656/wcmd.c       |    5 -
 drivers/staging/vt6656/wmgr.c       |   15 ---
 10 files changed, 0 insertions(+), 584 deletions(-)

diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index 563fddc..58348cf 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -1300,12 +1300,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-//2008-4-3 modify by Chester for wpa
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
              pDevice->skb->mac_header = pDevice->skb->data;
-#else
-            pDevice->skb->mac.raw = pDevice->skb->data;
-#endif
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1345,11 +1340,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming );
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
                 pDevice->skb->mac_header = pDevice->skb->data;
-#else
-   ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

Make vt665x depended on WIRELESS_EXT and remove remain ifdef's

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/Kconfig       |    2 +-
 drivers/staging/vt6655/device.h      |    2 --
 drivers/staging/vt6655/device_main.c |    8 --------
 drivers/staging/vt6655/iwctl.c       |   10 ----------
 drivers/staging/vt6655/iwctl.h       |    4 ----
 drivers/staging/vt6656/Kconfig       |    1 +
 drivers/staging/vt6656/main_usb.c    |    2 --
 7 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/vt6655/Kconfig b/drivers/staging/vt6655/Kconfig
index a01b1e4..9bec95a 100644
--- a/drivers/staging/vt6655/Kconfig
+++ b/drivers/staging/vt6655/Kconfig
@@ -1,6 +1,6 @@
 config VT6655
    tristate "VIA Technologies VT6655 support"
-   depends on PCI
+   depends on WIRELESS_EXT && PCI
    ---help---
    This is a vendor-written driver for VIA VT6655.
 
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 6726b2c..287b141 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -950,9 +950,7 @@ typedef struct __device_info {
     UINT                    uChannel;
     BOOL                    bMACSuspend;
 
-#ifdef WIRELESS_EXT
 	struct iw_statistics	wstats;		// wireless stats
-#endif /* WIRELESS_EXT */
     BOOL                    bCommit;
 
 } DEVICE_INFO, *PSDevice;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 8846026..8800286 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1146,9 +1146,7 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
     dev->irq                = pcid->irq;
     dev->netdev_ops         = &device_netdev_ops;
 
-#ifdef CONFIG_WIRELESS_EXT
 	dev->wireless_handlers ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/device.h   |    7 ---
 drivers/staging/vt6656/hostap.h   |    8 ---
 drivers/staging/vt6656/iwctl.c    |   84 ------------------------------------
 drivers/staging/vt6656/iwctl.h    |   86 -------------------------------------
 drivers/staging/vt6656/main_usb.c |   39 +----------------
 5 files changed, 1 insertions(+), 223 deletions(-)

diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 91e2f8f..c4f9a03 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -72,16 +72,11 @@
 #endif
 /* Include Wireless Extension definition and check version - Jean II */
 #include <linux/wireless.h>
-#if WIRELESS_EXT > 12
 #include <net/iw_handler.h>	// New driver API
-#endif	/* WIRELESS_EXT > 12 */
 
-//2008-0409-07, <Add> by Einsn Liu
-#if WIRELESS_EXT > 17
 #ifndef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 #define WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 #endif
-#endif
 
 //2007-0920-01<Add>by MikeLiu
 #ifndef SndEvt_ToAPI
@@ -910,9 +905,7 @@ typedef struct __device_info {
 #endif
     UINT                    uChannel;
 
-#ifdef WIRELESS_EXT
 	struct iw_statistics	wstats;		// wireless stats
-#endif /* WIRELESS_EXT */
     BOOL                    bCommit;
 
 } DEVICE_INFO, *PSDevice;
diff --git a/drivers/staging/vt6656/hostap.h b/drivers/staging/vt6656/hostap.h
index 1fcb2f0..c5ad349 100644
--- a/drivers/staging/vt6656/hostap.h
+++ b/drivers/staging/vt6656/hostap.h
@@ -37,14 +37,6 @@
 
 /*---------------------  Export Definitions -------------------------*/
 
-#if WIRELESS_EXT < 9
-struct iw_point {
-	caddr_t pointer;
-	__u16 length;
-	__u16 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

Fix this build error when CONFIG_WIRELESS_EXT is not set
at76_usb.c:5322: error: 'struct net_device' has no member named 'wireless_data'
at76_usb.c:5325: error: 'struct net_device' has no member named 'wireless_handlers'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/at76_usb/at76_usb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c
index c165c50..97aef78 100644
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -5319,10 +5319,12 @@ static int at76_init_new_device(struct at76_priv *priv,
 
 	/* Add pointers to enable iwspy support. */
 	priv->wireless_data.spy_data = &priv->spy_data;
+#ifdef CONFIG_WIRELESS_EXT
 	netdev->wireless_data = &priv->wireless_data;
+	netdev->wireless_handlers = &at76_handler_def;
+#endif
 
 	netdev->watchdog_timeo = 2 * HZ;
-	netdev->wireless_handlers = &at76_handler_def;
 	dev_alloc_name(netdev, "wlan%d");
 
 	ret = register_netdev(priv->netdev);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/at76_usb/at76_usb.c |  127 +++++++++++++++-------------------
 1 files changed, 56 insertions(+), 71 deletions(-)

diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c
index 97aef78..4db9b97 100644
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -558,20 +558,6 @@ static char *hex2str(void *buf, int len)
 	return ret;
 }
 
-#define MAC2STR_BUFFERS 4
-
-static inline char *mac2str(u8 *mac)
-{
-	static atomic_t a = ATOMIC_INIT(0);
-	static char bufs[MAC2STR_BUFFERS][6 * 3];
-	char *str;
-
-	str = bufs[atomic_inc_return(&a) & (MAC2STR_BUFFERS - 1)];
-	sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
-		mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-	return str;
-}
-
 /* LED trigger */
 static int tx_activity;
 static void at76_ledtrig_tx_timerfunc(unsigned long data);
@@ -1071,13 +1057,12 @@ static void at76_dump_mib_mac_addr(struct at76_priv *priv)
 		goto exit;
 	}
 
-	at76_dbg(DBG_MIB, "%s: MIB MAC_ADDR: mac_addr %s res 0x%x 0x%x",
-		 priv->netdev->name,
-		 mac2str(m->mac_addr), m->res[0], m->res[1]);
+	at76_dbg(DBG_MIB, "%s: MIB MAC_ADDR: mac_addr %pM res 0x%x 0x%x",
+		 priv->netdev->name, m->mac_addr, m->res[0], m->res[1]);
 	for (i = 0; i < ARRAY_SIZE(m->group_addr); i++)
-		at76_dbg(DBG_MIB, "%s: MIB MAC_ADDR: group addr %d: %s, "
+		at76_dbg(DBG_MIB, "%s: MIB MAC_ADDR: group addr %d: %pM, "
 			 "status %d", priv->netdev->name, i,
-			 mac2str(m->group_addr[i]), m->group_addr_status[i]);
+			 m->group_addr[i], m->group_addr_status[i]);
 exit:
 	kfree(m);
 }
@@ -1140,7 +1125,7 @@ static void at76_dump_mib_mac_mgmt(struct at76_priv *priv)
 	at76_dbg(DBG_MIB, "%s: MIB MAC_MGMT: beacon_period %d CFP_max_duration "
 		 "%d medium_occupancy_limit %d station_id 0x%x ATIM_window %d "
 		 "CFP_mode %d ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/wlan-ng/prism2sta.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 926db7c..50f301d 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1444,9 +1444,7 @@ void prism2sta_processing_defer(struct work_struct *data)
 	}
 
 	wlandev->linkstatus = (hw->link_status == HFA384x_LINK_CONNECTED);
-#ifdef WIRELESS_EXT
 	p80211wext_event_associated(wlandev, wlandev->linkstatus);
-#endif
 
 failed:
 	return;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |    1 -
 drivers/staging/rtl8192su/ieee80211/Makefile       |    3 +-
 drivers/staging/rtl8192su/ieee80211/dot11d.c       |    2 -
 drivers/staging/rtl8192su/ieee80211/dot11d.h       |    4 --
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |    8 ----
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |   12 -----
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |   44 --------------------
 .../rtl8192su/ieee80211/ieee80211_softmac_wx.c     |    4 --
 drivers/staging/rtl8192su/r8192S_phy.c             |    4 --
 drivers/staging/rtl8192su/r8192U_core.c            |   22 ----------
 drivers/staging/rtl8192su/r8192U_wx.c              |    6 ---
 drivers/staging/rtl8192su/r819xU_phy.c             |    4 --
 12 files changed, 1 insertions(+), 113 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index f010ab5..d3dde35 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -7,7 +7,6 @@ EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y
 EXTRA_CFLAGS += -DJACKSON_NEW_RX
 EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TURBO
 #EXTRA_CFLAGS += -DUSE_ONE_PIPE
-EXTRA_CFLAGS += -DENABLE_DOT11D
 
 EXTRA_CFLAGS += -DRTL8192SU
 EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
diff --git a/drivers/staging/rtl8192su/ieee80211/Makefile b/drivers/staging/rtl8192su/ieee80211/Makefile
index 295a18f..a500bfa 100644
--- a/drivers/staging/rtl8192su/ieee80211/Makefile
+++ b/drivers/staging/rtl8192su/ieee80211/Makefile
@@ -5,8 +5,7 @@ EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
 EXTRA_CFLAGS += -DRTL8192SU
 #EXTRA_CFLAGS += -DJOHN_NOCPY
 EXTRA_CFLAGS += -DTHOMAS_TURBO
-#flags to enable or disble 80211D feature
-EXTRA_CFLAGS += -DENABLE_DOT11D
+
 ieee80211-rsl-objs := ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |   10 ----------
 drivers/staging/rtl8192su/r8192U_pm.c   |    2 --
 drivers/staging/rtl8192su/r8192U_pm.h   |    2 --
 4 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index d3dde35..b23c095 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -27,7 +27,6 @@ EXTRA_CFLAGS += -DRTL8192SU_ASIC_VERIFICATION
 EXTRA_CFLAGS += -DRTL8192SU_USB_PHY_TEST=0
 
 #EXTRA_CFLAGS += -DMUTIPLE_BULK_OUT
-EXTRA_CFLAGS += -DCONFIG_RTL8192_PM
 
 r8192s_usb-objs :=		\
 	r8180_93cx6.o		\
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 62f5145..b4dc7e8 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -76,9 +76,7 @@ double __extendsfdf2(float a) {return a;}
 //#include "r8192xU_phyreg.h"
 #include <linux/usb.h>
 
-#ifdef CONFIG_RTL8192_PM
 #include "r8192U_pm.h"
-#endif
 
 #include "ieee80211/dot11d.h"
 
@@ -97,9 +95,7 @@ double __extendsfdf2(float a) {return a;}
 //#include "r8192xU_phyreg.h"
 #include <linux/usb.h>
 
-#ifdef CONFIG_RTL8192_PM
 #include "r8192U_pm.h"
-#endif
 
 #include "ieee80211/dot11d.h"
 
@@ -222,15 +218,9 @@ static struct usb_driver rtl8192_usb_driver = {
 	.id_table	= rtl8192_usb_id_tbl,	          /* PCI_ID table  */
 	.probe		= rtl8192_usb_probe,	          /* probe fn      */
 	.disconnect	= rtl8192_usb_disconnect,	  /* remove fn     */
-#ifdef CONFIG_RTL8192_PM
 	.suspend	= rtl8192U_suspend,	          /* PM suspend fn */
 	.resume		= rtl8192U_resume,                 /* PM resume fn  */
 	.reset_resume   = rtl8192U_resume,                 /* PM reset resume fn  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Robert P. J. Day <rpjday@crashcourse.ca>

Given that EXPORT_SYMTAB was removed long ago, remove the Makefile
references to it.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/Makefile     |    2 +-
 drivers/staging/vt6655/Makefile.arm |    2 +-
 drivers/staging/vt6655/Makefile.x86 |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/Makefile b/drivers/staging/vt6655/Makefile
index 7d76e7e..260c81d 100644
--- a/drivers/staging/vt6655/Makefile
+++ b/drivers/staging/vt6655/Makefile
@@ -1,5 +1,5 @@
 # TODO: all of these should be removed
-EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DMODULE  -DEXPORT_SYMTAB -D__NO_VERSION__
+EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -D__NO_VERSION__
 EXTRA_CFLAGS += -DHOSTAP
 
 vt6655-y +=	device_main.o \
diff --git a/drivers/staging/vt6655/Makefile.arm b/drivers/staging/vt6655/Makefile.arm
index 2d2ccad..3dd5431 100644
--- a/drivers/staging/vt6655/Makefile.arm
+++ b/drivers/staging/vt6655/Makefile.arm
@@ -118,7 +118,7 @@ OBJS :=	device_main.o card.o mac.o baseband.o wctl.o 80211mgr.o \
 CC := /usr/local/bin/arm-linux-gcc
 LD := /usr/local/bin/arm-linux-ld
 
-CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE  -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
+CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE -D__NO_VERSION__ -O2 -pipe
 #CFLAGS += -Wstrict-prototypes -fomit-frame-pointer
 COPTS+= -march=armv4 -fno-strict-aliasing -fno-common
 #COPTS+= -mapcs-32 -mtune=xscale  -mshort-load-bytes -msoft-float -mfp=2
diff --git a/drivers/staging/vt6655/Makefile.x86 b/drivers/staging/vt6655/Makefile.x86
index 69082f0..b853446 100644
--- a/drivers/staging/vt6655/Makefile.x86
+++ b/drivers/staging/vt6655/Makefile.x86
@@ -128,7 +128,7 @@ test_cc = $(shell which $(cc) > /dev/null 2>&1 && echo $(cc))
 CC := $(foreach cc, $(CC), $(test_cc))
 CC := $(firstword $(CC))
 
-CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U.h      |   13 -------------
 drivers/staging/rtl8192su/r8192U_core.c |   15 ---------------
 3 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 6cfd8af..969ec43 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -6,7 +6,6 @@ EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y
 
 EXTRA_CFLAGS += -DJACKSON_NEW_RX
 EXTRA_CFLAGS += -DTHOMAS_BEACON
-#EXTRA_CFLAGS += -DUSE_ONE_PIPE
 
 EXTRA_CFLAGS += -DRTL8192SU
 EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
diff --git a/drivers/staging/rtl8192su/r8192U.h b/drivers/staging/rtl8192su/r8192U.h
index 2a9ccab..0e1213f 100644
--- a/drivers/staging/rtl8192su/r8192U.h
+++ b/drivers/staging/rtl8192su/r8192U.h
@@ -1085,18 +1085,6 @@ typedef struct _rt_firmware_info_819xUsb{
 #define NUM_OF_FIRMWARE_QUEUE		10
 #define NUM_OF_PAGES_IN_FW		0x100
 
-#ifdef USE_ONE_PIPE
-#define NUM_OF_PAGE_IN_FW_QUEUE_BE	0x000
-#define NUM_OF_PAGE_IN_FW_QUEUE_BK	0x000
-#define NUM_OF_PAGE_IN_FW_QUEUE_VI	0x0ff
-#define NUM_OF_PAGE_IN_FW_QUEUE_VO	0x000
-#define NUM_OF_PAGE_IN_FW_QUEUE_HCCA	0
-#define NUM_OF_PAGE_IN_FW_QUEUE_CMD	0x0
-#define NUM_OF_PAGE_IN_FW_QUEUE_MGNT	0x00
-#define NUM_OF_PAGE_IN_FW_QUEUE_HIGH	0
-#define NUM_OF_PAGE_IN_FW_QUEUE_BCN	0x0
-#define NUM_OF_PAGE_IN_FW_QUEUE_PUB	0x00
-#else
 
 #define NUM_OF_PAGE_IN_FW_QUEUE_BE	0x020
 #define NUM_OF_PAGE_IN_FW_QUEUE_BK	0x020
@@ -1109,7 +1097,6 @@ typedef struct _rt_firmware_info_819xUsb{
 #define NUM_OF_PAGE_IN_FW_QUEUE_BCN	0x4
 #define NUM_OF_PAGE_IN_FW_QUEUE_PUB	0x18
 
-#endif
 
 #define APPLIED_RESERVED_QUEUE_IN_FW	0x80000000
 #define RSVD_FW_QUEUE_PAGE_BK_SHIFT	0x00
diff --git ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    2 -
 drivers/staging/rtl8192su/r8192S_hw.h   |   26 ----
 drivers/staging/rtl8192su/r8192S_phy.c  |    5 -
 drivers/staging/rtl8192su/r8192U.h      |    6 -
 drivers/staging/rtl8192su/r8192U_core.c |  197 -------------------------------
 5 files changed, 0 insertions(+), 236 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 969ec43..11cf9f1 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,8 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-#EXTRA_CFLAGS += -DEEPROM_OLD_FORMAT_SUPPORT
-
 #EXTRA_CFLAGS += -DUSB_RX_AGGREGATION_SUPPORT=0
 #EXTRA_CFLAGS += -DUSB_TX_DRIVER_AGGREGATION_ENABLE=0
 #EXTRA_CFLAGS += -DRTL8192SU_DISABLE_CCK_RATE=0
diff --git a/drivers/staging/rtl8192su/r8192S_hw.h b/drivers/staging/rtl8192su/r8192S_hw.h
index 7a3d850..1647550 100644
--- a/drivers/staging/rtl8192su/r8192S_hw.h
+++ b/drivers/staging/rtl8192su/r8192S_hw.h
@@ -1282,17 +1282,11 @@ Default: 00b.
 #define 		EEPROM_Default_TxPower		0x1010
 #define		EEPROM_Default_HT2T_TxPwr		0x10
 
-#ifdef EEPROM_OLD_FORMAT_SUPPORT
-#define 		EEPROM_Default_TxPowerBase	0x0
-#define 		EEPROM_Default_ThermalMeter	0x12
-#define 		EEPROM_Default_PwDiff			0x4
-#else
 #define		EEPROM_Default_LegacyHTTxPowerDiff	0x3
 #define		EEPROM_Default_ThermalMeter		0x12
 #define		EEPROM_Default_AntTxPowerDiff		0x0
 #define		EEPROM_Default_TxPwDiff_CrystalCap	0x5
 #define		EEPROM_Default_TxPowerLevel		0x22
-#endif
 
 #define		EEPROM_CHANNEL_PLAN_FCC				0x0
 #define		EEPROM_CHANNEL_PLAN_IC				0x1
@@ -1330,25 +1324,6 @@ Default: 00b.
 
 
 	// <Roger_Notes> The followin are for different ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |    1 -
 drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h   |    6 -
 .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c   |   15 -
 drivers/staging/rtl8192su/r8192U.h                 |   32 --
 drivers/staging/rtl8192su/r8192U_core.c            |  471 --------------------
 drivers/staging/rtl8192su/r8192U_dm.c              |   98 ----
 drivers/staging/rtl8192su/r819xU_HTType.h          |    6 -
 7 files changed, 0 insertions(+), 629 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 11cf9f1..c51889d 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-#EXTRA_CFLAGS += -DUSB_RX_AGGREGATION_SUPPORT=0
 #EXTRA_CFLAGS += -DUSB_TX_DRIVER_AGGREGATION_ENABLE=0
 #EXTRA_CFLAGS += -DRTL8192SU_DISABLE_CCK_RATE=0
 EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h
index 16a7462..22a3d45 100644
--- a/drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h
+++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h
@@ -327,12 +327,6 @@ typedef struct _RT_HIGH_THROUGHPUT{
 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
 	u8				UsbTxAggrNum;
 #endif
-#ifdef USB_RX_AGGREGATION_SUPPORT
-	u8				UsbRxFwAggrEn;
-	u8				UsbRxFwAggrPageNum;
-	u8				UsbRxFwAggrPacketNum;
-	u8				UsbRxFwAggrTimeout;
-#endif
 
 	// Add for Broadcom(Linksys) IOT. Joseph
 	u8				bIsPeerBcm;
diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c
index d263cdf..eca9ac2 100644
--- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |    2 +-
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |    2 --
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |    6 ------
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |   20 --------------------
 4 files changed, 1 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index b23c095..6cfd8af 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -5,7 +5,7 @@ EXTRA_CFLAGS += -O2
 EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y
 
 EXTRA_CFLAGS += -DJACKSON_NEW_RX
-EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TURBO
+EXTRA_CFLAGS += -DTHOMAS_BEACON
 #EXTRA_CFLAGS += -DUSE_ONE_PIPE
 
 EXTRA_CFLAGS += -DRTL8192SU
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 8dff410..0641454 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -1443,9 +1443,7 @@ struct ieee80211_network {
         u8 wmm_info;
         struct ieee80211_wmm_ac_param wmm_param[4];
         u8 QoS_Enable;
-#ifdef THOMAS_TURBO
 	u8 Turbo_Enable;//enable turbo mode, added by thomas
-#endif
 	u16 CountryIeLen;
 	u8 CountryIeBuf[MAX_IE_LEN];
         // HT Related, by amy, 2008.04.29
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
index c175aa4..a369747 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
@@ -1880,7 +1880,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 				break;
 			}
 
-#ifdef THOMAS_TURBO
                         if (info_element->len == 7 &&
                ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |   24 ------------------------
 2 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 4037f92..784d96f 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-#EXTRA_CFLAGS += -DRTL8192SU_DISABLE_CCK_RATE=0
 EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
 EXTRA_CFLAGS += -DDISABLE_BB_RF=0
 EXTRA_CFLAGS += -DRTL8192SU_USE_PARAM_TXPWR=0
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 5170723..908adc2 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -2981,10 +2981,6 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb)
 	/* DWORD 0 */
 	tx_desc->TxHT = (tcb_desc->data_rate&0x80)?1:0;
 
-#ifdef RTL8192SU_DISABLE_CCK_RATE
-		if(tx_hal_is_cck_rate(tcb_desc->data_rate))
-			tcb_desc->data_rate = MGN_6M;
-#endif
 
 	tx_desc->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate);
 	//tx_desc->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur;
@@ -3567,11 +3563,7 @@ void rtl8192SU_net_update(struct net_device *dev)
 	//update Basic rate: RR, BRSR
 	rtl8192_config_rate(dev, &rate_config);	//HalSetBrateCfg
 
-#ifdef RTL8192SU_DISABLE_CCK_RATE
-	priv->basic_rate = rate_config  = rate_config & 0x150; // Disable CCK 11M, 5.5M, 2M, and 1M rates.
-#else
 	priv->basic_rate = rate_config  = rate_config & 0x15f;
-#endif
 
 	// Set RRSR rate table.
 	write_nic_byte(dev, RRSR, rate_config&0xff);
@@ -3700,11 +3692,7 @@ void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 3880461..abdf53d 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DRTL8192SU_USE_PARAM_TXPWR=0
 EXTRA_CFLAGS += -DRTL8192SU_FPGA_UNSPECIFIED_NETWORK=0
 #EXTRA_CFLAGS += -DRTL8192SU_FPGA_2MAC_VERIFICATION #=0
 EXTRA_CFLAGS += -DRTL8192SU_ASIC_VERIFICATION
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 21d9d76..5c643d7 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -5513,12 +5513,7 @@ rtl8192SU_ReadAdapterInfo8192SUsb(struct net_device* dev)
 	else
 	{
 		priv->AutoloadFailFlag=FALSE;
-#if RTL8192SU_USE_PARAM_TXPWR
-		priv->bTXPowerDataReadFromEEPORM = FALSE;
-#else
 		priv->bTXPowerDataReadFromEEPORM = TRUE;
-#endif
-
 	}
        // Read IC Version && Channel Plan
 	if(!priv->AutoloadFailFlag)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |    1 -
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |    8 -
 drivers/staging/rtl8192su/ieee80211/rtl819x_HT.h   |    3 -
 .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c   |    3 -
 drivers/staging/rtl8192su/r8192U.h                 |   31 --
 drivers/staging/rtl8192su/r8192U_core.c            |  327 --------------------
 drivers/staging/rtl8192su/r819xU_HTType.h          |    3 -
 7 files changed, 0 insertions(+), 376 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index c51889d..4037f92 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-#EXTRA_CFLAGS += -DUSB_TX_DRIVER_AGGREGATION_ENABLE=0
 #EXTRA_CFLAGS += -DRTL8192SU_DISABLE_CCK_RATE=0
 EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
 EXTRA_CFLAGS += -DDISABLE_BB_RF=0
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
index e10060f..5dc1bd3 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
@@ -2237,11 +2237,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
 #if 1
 	/* if xmit available, just xmit it immediately, else just insert it to the wait queue */
 	for(i = 0; i < txb->nr_frags; i++) {
-#ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
-		if ((skb_queue_len(&ieee->skb_drv_aggQ[queue_index]) != 0) ||
-#else
 		if ((skb_queue_len(&ieee->skb_waitQ[queue_index]) != 0) ||
-#endif
 		(!ieee->check_nic_enough_desc(ieee->dev,queue_index))||\
 		     ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile     |    1 -
 drivers/staging/rtl8192su/r8192S_phy.c |   12 ------------
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index fb026f1..3880461 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DDISABLE_BB_RF=0
 EXTRA_CFLAGS += -DRTL8192SU_USE_PARAM_TXPWR=0
 EXTRA_CFLAGS += -DRTL8192SU_FPGA_UNSPECIFIED_NETWORK=0
 #EXTRA_CFLAGS += -DRTL8192SU_FPGA_2MAC_VERIFICATION #=0
diff --git a/drivers/staging/rtl8192su/r8192S_phy.c b/drivers/staging/rtl8192su/r8192S_phy.c
index b8586e6..02bfa19 100644
--- a/drivers/staging/rtl8192su/r8192S_phy.c
+++ b/drivers/staging/rtl8192su/r8192S_phy.c
@@ -418,9 +418,6 @@ u32 rtl8192_QueryBBReg(struct net_device* dev, u32 RegAddr, u32 BitMask)
 
   	u32	ReturnValue = 0, OriginalValue, BitShift;
 
-#if (DISABLE_BB_RF == 1)
-	return 0;
-#endif
 
 	RT_TRACE(COMP_RF, "--->PHY_QueryBBReg(): RegAddr(%#x), BitMask(%#x)\n", RegAddr, BitMask);
 
@@ -481,9 +478,6 @@ void rtl8192_setBBreg(struct net_device* dev, u32 RegAddr, u32 BitMask, u32 Data
 {
 	u32	OriginalValue, BitShift, NewValue;
 
-#if (DISABLE_BB_RF == 1)
-	return;
-#endif
 
 	RT_TRACE(COMP_RF, "--->PHY_SetBBReg(): RegAddr(%#x), BitMask(%#x), Data(%#x)\n", RegAddr, BitMask, Data);
 
@@ -557,9 +551,6 @@ u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u3
 	u32 Original_Value, Readback_Value, BitShift;//, flags;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
-#if (DISABLE_BB_RF == 1)
-	return 0;
-#endif
 
 	RT_TRACE(COMP_RF, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |    1 -
 .../rtl8192su/ieee80211/ieee80211_softmac_wx.c     |    4 ----
 drivers/staging/rtl8192su/r8192S_phy.c             |    2 --
 drivers/staging/rtl8192su/r8192U_core.c            |    3 ---
 4 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 784d96f..fb026f1 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DRTL8192S_DISABLE_FW_DM=0
 EXTRA_CFLAGS += -DDISABLE_BB_RF=0
 EXTRA_CFLAGS += -DRTL8192SU_USE_PARAM_TXPWR=0
 EXTRA_CFLAGS += -DRTL8192SU_FPGA_UNSPECIFIED_NETWORK=0
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
index 9e7f957..0d4bcc8 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
@@ -330,13 +330,11 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 #ifndef RTL8192SE
 	ieee->InitialGainHandler(ieee->dev,IG_Backup);
 #endif
-#if(RTL8192S_DISABLE_FW_DM == 0)
 	if (ieee->SetFwCmdHandler)
 	{
 		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_HALT);
 		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_HIGH_PWR_DISABLE);
 	}
-#endif
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
 		b40M = 1;
 		chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
@@ -361,13 +359,11 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 #ifndef RTL8192SE
 	ieee->InitialGainHandler(ieee->dev,IG_Restore);
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |   22 ----------------------
 2 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index abdf53d..e781c7a 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DRTL8192SU_FPGA_UNSPECIFIED_NETWORK=0
 #EXTRA_CFLAGS += -DRTL8192SU_FPGA_2MAC_VERIFICATION #=0
 EXTRA_CFLAGS += -DRTL8192SU_ASIC_VERIFICATION
 EXTRA_CFLAGS += -DRTL8192SU_USB_PHY_TEST=0
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 5c643d7..eb5f901 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -2957,19 +2957,6 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb)
 	memset(tx_desc, 0, sizeof(tx_desc_819x_usb));
 
 
-#if RTL8192SU_FPGA_UNSPECIFIED_NETWORK
-		if(IsQoSDataFrame(skb->data))
-		{
-			tcb_desc->bAMPDUEnable = TRUE;
-			tx_desc->NonQos = 0;
-		}
-		else
-			tcb_desc->bAMPDUEnable = FALSE;
-
-		tcb_desc->bPacketBW = TRUE;
-		priv->CurrentChannelBW = HT_CHANNEL_WIDTH_20_40;
-#endif
-
 #if (defined (RTL8192SU_FPGA_2MAC_VERIFICATION)||defined (RTL8192SU_ASIC_VERIFICATION))
 		tx_desc->NonQos = (IsQoSDataFrame(skb->data)==TRUE)? 0:1;
 #endif
@@ -7280,15 +7267,6 @@ start:
 
 // <Roger_Notes> We return status here for temporal FPGA verification. 2008.05.12.
 //
-#if RTL8192SU_FPGA_UNSPECIFIED_NETWORK
-	//
-	// To send specific number of packets to verify MAC Lookback mode.
-	//
-	//SendRandomTxPkt(Adapter, 0); // ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile          |    1 -
 drivers/staging/rtl8192su/r8192S_firmware.c |    2 +-
 drivers/staging/rtl8192su/r8192U_core.c     |   12 ++++++------
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index e781c7a..02d4614 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-#EXTRA_CFLAGS += -DRTL8192SU_FPGA_2MAC_VERIFICATION #=0
 EXTRA_CFLAGS += -DRTL8192SU_ASIC_VERIFICATION
 EXTRA_CFLAGS += -DRTL8192SU_USB_PHY_TEST=0
 
diff --git a/drivers/staging/rtl8192su/r8192S_firmware.c b/drivers/staging/rtl8192su/r8192S_firmware.c
index 08d38b2..287927b 100644
--- a/drivers/staging/rtl8192su/r8192S_firmware.c
+++ b/drivers/staging/rtl8192su/r8192S_firmware.c
@@ -320,7 +320,7 @@ FirmwareCheckReady(struct net_device *dev,	u8 LoadFWStatus)
 
 		RT_TRACE(COMP_FIRMWARE, "FirmwareCheckReady(): Current RCR settings(%#x)\n", tmpU4b);
 
-#if (defined (RTL8192SU_FPGA_2MAC_VERIFICATION) ||defined (RTL8192SU_ASIC_VERIFICATION))
+#if defined (RTL8192SU_ASIC_VERIFICATION)
 #ifdef NOT_YET   //YJ,TMP
 		priv->TransmitConfig = read_nic_dword(dev, TCR);
 		RT_TRACE(COMP_FIRMWARE, "FirmwareCheckReady(): Current TCR settings(%x)\n", priv->TransmitConfig);
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index eb5f901..37abb68 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -2957,7 +2957,7 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb)
 	memset(tx_desc, 0, sizeof(tx_desc_819x_usb));
 
 
-#if ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile          |    1 -
 drivers/staging/rtl8192su/r8192S_firmware.c |    2 --
 drivers/staging/rtl8192su/r8192U_core.c     |   18 ------------------
 3 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 02d4614..58073da 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,7 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DRTL8192SU_ASIC_VERIFICATION
 EXTRA_CFLAGS += -DRTL8192SU_USB_PHY_TEST=0
 
 #EXTRA_CFLAGS += -DMUTIPLE_BULK_OUT
diff --git a/drivers/staging/rtl8192su/r8192S_firmware.c b/drivers/staging/rtl8192su/r8192S_firmware.c
index 287927b..8ca173e 100644
--- a/drivers/staging/rtl8192su/r8192S_firmware.c
+++ b/drivers/staging/rtl8192su/r8192S_firmware.c
@@ -320,13 +320,11 @@ FirmwareCheckReady(struct net_device *dev,	u8 LoadFWStatus)
 
 		RT_TRACE(COMP_FIRMWARE, "FirmwareCheckReady(): Current RCR settings(%#x)\n", tmpU4b);
 
-#if defined (RTL8192SU_ASIC_VERIFICATION)
 #ifdef NOT_YET   //YJ,TMP
 		priv->TransmitConfig = read_nic_dword(dev, TCR);
 		RT_TRACE(COMP_FIRMWARE, "FirmwareCheckReady(): Current TCR settings(%x)\n", priv->TransmitConfig);
 		pHalData->FwRsvdTxPageCfg = read_nic_byte(dev, FW_RSVD_PG_CRTL);
 #endif
-#endif
 
 		// Set to normal mode.
 		write_nic_byte(dev, LBKMD_SEL, LBK_NORMAL);
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 37abb68..55aeaf6 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -2957,9 +2957,7 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    2 --
 drivers/staging/rtl8192su/r8192U_core.c |   17 -----------------
 2 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 58073da..8c1cd54 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -12,8 +12,6 @@ EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
-EXTRA_CFLAGS += -DRTL8192SU_USB_PHY_TEST=0
-
 #EXTRA_CFLAGS += -DMUTIPLE_BULK_OUT
 
 r8192s_usb-objs :=		\
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 55aeaf6..48e1610 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -6683,23 +6683,6 @@ static void rtl8192SU_MacConfigAfterFwDownload(struct net_device *dev)
 	tmpU1b = read_nic_byte_E(dev, 0x5C);
 	write_nic_byte_E(dev, 0x5C, tmpU1b|BIT7);
 
-	//
-	// Revise USB PHY to solve the issue of Rx payload error, Rivesed by Roger,  2008-04-10
-	// Suggest by SD1 Alex.
-	//
-	// <Roger_Notes> The following operation are ONLY for USB PHY test chip.
-	// 2008.10.07.
-	//
-#if RTL8192SU_USB_PHY_TEST
-	write_nic_byte(dev, 0x41,0xf4);
-	write_nic_byte(dev, 0x40,0x00);
-	write_nic_byte(dev, 0x42,0x00);
-	write_nic_byte(dev, 0x42,0x01);
-	write_nic_byte(dev, 0x40,0x0f);
-	write_nic_byte(dev, 0x42,0x00);
-	write_nic_byte(dev, 0x42,0x01);
-#endif
-
 #if 0 //LZM 090219
 	//
 	// Suggested by SD1 Alex, 2008-06-14.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile         |    1 -
 drivers/staging/rtl8192su/r8192S_phy.c     |   36 ----------------------------
 drivers/staging/rtl8192su/r8192S_rtl6052.c |   11 --------
 3 files changed, 0 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 8c1cd54..2cbc32c 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -8,7 +8,6 @@ EXTRA_CFLAGS += -DJACKSON_NEW_RX
 EXTRA_CFLAGS += -DTHOMAS_BEACON
 
 EXTRA_CFLAGS += -DRTL8192SU
-EXTRA_CFLAGS += -DRTL8190_Download_Firmware_From_Header=1
 EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
diff --git a/drivers/staging/rtl8192su/r8192S_phy.c b/drivers/staging/rtl8192su/r8192S_phy.c
index 02bfa19..515a56e 100644
--- a/drivers/staging/rtl8192su/r8192S_phy.c
+++ b/drivers/staging/rtl8192su/r8192S_phy.c
@@ -1331,13 +1331,7 @@ extern bool PHY_MACConfig8192S(struct net_device* dev)
 	//
 	// Config MAC
 	//
-#if RTL8190_Download_Firmware_From_Header
 	rtStatus = phy_ConfigMACWithHeaderFile(dev);
-#else
-	// Not make sure EEPROM, add later
-	RT_TRACE(COMP_INIT, "Read MACREG.txt\n");
-	//rtStatus = phy_ConfigMACWithParaFile(dev, RTL819X_PHY_MACREG);// lzm del it temp
-#endif
 	return (rtStatus == RT_STATUS_SUCCESS) ? true:false;
 
 }
@@ -1545,7 +1539,6 @@ phy_BB8192S_Config_ParaFile(struct net_device* dev)
 	// 1. Read PHY_REG.TXT BB INIT!!
 	// We will seperate as 1T1R/1T2R/1T2R_GREEN/2T2R
 	//
-#if RTL8190_Download_Firmware_From_Header
 	if (priv->rf_type == RF_1T2R || priv->rf_type == RF_2T2R ||
 	    priv->rf_type == RF_1T1R ||priv->rf_type == RF_2T2R_GREEN)
 	{
@@ -1557,26 +1550,6 @@ phy_BB8192S_Config_ParaFile(struct net_device* dev)
 		}
 	}else
 		rtStatus = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |    8 --------
 2 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 2cbc32c..25f30ae 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -8,7 +8,6 @@ EXTRA_CFLAGS += -DJACKSON_NEW_RX
 EXTRA_CFLAGS += -DTHOMAS_BEACON
 
 EXTRA_CFLAGS += -DRTL8192SU
-EXTRA_CFLAGS += -DRTL8192S_PREPARE_FOR_NORMAL_RELEASE
 EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
 #EXTRA_CFLAGS += -DMUTIPLE_BULK_OUT
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 48e1610..f2571cc 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -6572,7 +6572,6 @@ static void rtl8192SU_SetHwRegAmpduMinSpace(struct net_device *dev, u8 MinSpaceC
 	u8	MinSpacingToSet;
 	u8	SecMinSpace;
 
-#ifdef RTL8192S_PREPARE_FOR_NORMAL_RELEASE
 	MinSpacingToSet = MinSpaceCfg;
 	if(MinSpacingToSet <= 7)
 	{
@@ -6593,13 +6592,6 @@ static void rtl8192SU_SetHwRegAmpduMinSpace(struct net_device *dev, u8 MinSpaceC
 		write_nic_byte(dev, AMPDU_MIN_SPACE, priv->MinSpaceCfg);
 	}
 
-#else
-	MinSpacingToSet = MinSpaceCfg;
-	MinSpacingToSet &= 0x07; // We only care about bit[2:0]
-	priv->MinSpaceCfg |= MinSpacingToSet;
-	RT_TRACE(COMP_SEC, "Set AMPDU_MIN_SPACE: %x\n", priv->MinSpaceCfg);
-	write_nic_byte(dev, AMPDU_MIN_SPACE, priv->MinSpaceCfg);//FIXLZM
-#endif
 }
 #endif
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile      |    1 -
 drivers/staging/rtl8192su/r8192U_core.c |   11 -----------
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index 25f30ae..4ab0af8 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -8,7 +8,6 @@ EXTRA_CFLAGS += -DJACKSON_NEW_RX
 EXTRA_CFLAGS += -DTHOMAS_BEACON
 
 EXTRA_CFLAGS += -DRTL8192SU
-EXTRA_CFLAGS += -DRTL8192SU_DISABLE_IQK=1
 
 #EXTRA_CFLAGS += -DMUTIPLE_BULK_OUT
 
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index f2571cc..e8b0714 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -7033,17 +7033,6 @@ start:
 		//PHY_SetBBReg(Adapter, rOFDM0_TRxPathEnable, bMaskByte0, 0x11);
 	}
 
-#if (RTL8192SU_DISABLE_IQK==0)
-		// For 1T2R IQK only currently.
-		if (priv->card_8192_version == VERSION_8192S_BCUT)
-		{
-			PHY_IQCalibrateBcut(dev);
-		}
-		else if (priv->card_8192_version == VERSION_8192S_ACUT)
-		{
-			PHY_IQCalibrate(dev);
-		}
-#endif
 
 	//LZM 090219
 	// Set CCK and OFDM Block "ON"
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Marcin Slusarz <marcin.slusarz@gmail.com>

Original author didn't bother to change strings for rt3070 driver. Fix it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2860/rt_linux.h      |   33 ++++++++++++++++---------------
 drivers/staging/rt2860/sta_ioctl.c     |    7 +-----
 drivers/staging/rt2870/2870_main_dev.c |    4 +-
 drivers/staging/rt2870/rt2870.h        |    4 +++
 4 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
index 25b53ac..b434824 100644
--- a/drivers/staging/rt2860/rt_linux.h
+++ b/drivers/staging/rt2860/rt_linux.h
@@ -90,22 +90,23 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
 
 // add by kathy
 
-#ifdef RT2860
-#define STA_PROFILE_PATH			"/etc/Wireless/RT2860STA/RT2860STA.dat"
-#define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin"
-#define STA_NIC_DEVICE_NAME			"RT2860STA"
-#define STA_DRIVER_VERSION			"1.8.1.1"
-#endif
-#ifdef RT2870
-#define STA_PROFILE_PATH			"/etc/Wireless/RT2870STA/RT2870STA.dat"
-#define STA_RT2870_IMAGE_FILE_NAME  "/etc/Wireless/RT2870STA/rt2870.bin"
-#define STA_NIC_DEVICE_NAME			"RT2870STA"
-#ifndef RT30xx
-#define STA_DRIVER_VERSION			"1.4.0.0"
-#endif
-#ifdef RT30xx
-#define STA_DRIVER_VERSION			"2.0.1.0"
-#endif
+/* order of "if defined()" is important, because for 3070 driver
+   both RT2870 and RT3070 are defined */
+#if defined(RT2860)
+ #define STA_PROFILE_PATH			"/etc/Wireless/RT2860STA/RT2860STA.dat"
+ #define STA_RTMP_FIRMWARE_FILE_NAME "/etc/Wireless/RT2860STA/RT2860STA.bin"
+ #define STA_NIC_DEVICE_NAME			"RT2860STA"
+ #define STA_DRIVER_VERSION			"1.8.1.1"
+#elif defined(RT3070)
+ #define STA_PROFILE_PATH			"/etc/Wireless/RT3070STA/RT3070STA.dat"
+ #define STA_RT2870_IMAGE_FILE_NAME  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 .../rtl8192su/ieee80211/ieee80211_softmac_wx.c     |    4 -
 drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c |    2 +-
 .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c   |   16 +-
 drivers/staging/rtl8192su/r8192S_Efuse.c           |   27 --
 drivers/staging/rtl8192su/r8192S_firmware.c        |   28 +--
 drivers/staging/rtl8192su/r8192S_firmware.h        |    5 -
 drivers/staging/rtl8192su/r8192S_hw.h              |  101 -----
 drivers/staging/rtl8192su/r8192S_phy.c             |  417 +-------------------
 8 files changed, 12 insertions(+), 588 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
index 0d4bcc8..8591013 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c
@@ -327,9 +327,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 
 	ieee->state = IEEE80211_LINKED_SCANNING;
 	ieee->link_change(ieee->dev);
-#ifndef RTL8192SE
 	ieee->InitialGainHandler(ieee->dev,IG_Backup);
-#endif
 	if (ieee->SetFwCmdHandler)
 	{
 		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_HALT);
@@ -356,9 +354,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 		ieee->set_chan(ieee->dev, chan);
 	}
 
-#ifndef RTL8192SE
 	ieee->InitialGainHandler(ieee->dev,IG_Restore);
-#endif
 	if (ieee->SetFwCmdHandler)
 	{
 		ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_RESUME);
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
index 25a7052..1d7c910 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
@@ -495,7 +495,7 @@ void ieee80211_query_protectionmode(struct ieee80211_device* ieee, cb_desc* tcb_
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Marcin Slusarz <marcin.slusarz@gmail.com>

othwerwise lockdep complains:
"INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator."

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2860/rt_main_dev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
index 35c59d5..8fd1aaf 100644
--- a/drivers/staging/rt2860/rt_main_dev.c
+++ b/drivers/staging/rt2860/rt_main_dev.c
@@ -190,7 +190,7 @@ int rt28xx_close(IN PNET_DEV dev)
 	BOOLEAN 		Cancelled = FALSE;
 	UINT32			i = 0;
 #ifdef RT2870
-	DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup);
+	DECLARE_WAIT_QUEUE_HEAD_ONSTACK(unlink_wakeup);
 	DECLARE_WAITQUEUE(wait, current);
 
 	//RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_REMOVE_IN_PROGRESS);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Marcin Slusarz <marcin.slusarz@gmail.com>

According to FCC (*1) and *2 there's really RT2070L inside, but according
to *2 RT3070 and RT2070 are compatible.

*1 https://fjallfoss.fcc.gov/oetcf/eas/reports/ViewExhibitReport.cfm?mode=Exhibits&Re...
(look for "Internal Photos")
*2 http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=5&t=5245

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2870/rt2870.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/rt2870/rt2870.h b/drivers/staging/rt2870/rt2870.h
index 2b8872b..030cc9b 100644
--- a/drivers/staging/rt2870/rt2870.h
+++ b/drivers/staging/rt2870/rt2870.h
@@ -219,6 +219,7 @@
 	{USB_DEVICE(0x0789,0x0163)}, /* Logitec 2870 */		\
 	{USB_DEVICE(0x0789,0x0164)}, /* Logitec 2870 */		\
 	{USB_DEVICE(0x1EDA,0x2310)}, /* AirTies 3070 */		\
+	{USB_DEVICE(0x1737,0x0077)}, /* Linksys WUSB54GC-EU v3 */	\
 	{ }/* Terminating entry */                      \
 }
 #endif
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/desc.h        |    9 -
 drivers/staging/vt6655/device.h      |   92 ------------
 drivers/staging/vt6655/device_main.c |  268 ----------------------------------
 drivers/staging/vt6655/dpc.c         |  106 -------------
 drivers/staging/vt6655/hostap.c      |   29 ----
 drivers/staging/vt6655/kcompat.h     |    4 -
 drivers/staging/vt6655/wctl.c        |    4 -
 7 files changed, 0 insertions(+), 512 deletions(-)

diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h
index c0fc1d3..087a3e0 100644
--- a/drivers/staging/vt6655/desc.h
+++ b/drivers/staging/vt6655/desc.h
@@ -41,12 +41,6 @@
 #if !defined(__TETHER_H__)
 #include "tether.h"
 #endif
-// #ifdef PRIVATE_OBJ
-//#if !defined(__DEVICE_MODULE_H)
-//#include "device_module.h"
-//#endif
-
-
 
 
 /*---------------------  Export Definitions -------------------------*/
@@ -237,9 +231,6 @@
 
 typedef struct tagDEVICE_RD_INFO {
     struct sk_buff* skb;
-#ifdef PRIVATE_OBJ
-    ref_sk_buff ref_skb;
-#endif
     dma_addr_t  skb_dma;
     dma_addr_t  curr_desc;
 } DEVICE_RD_INFO,   *PDEVICE_RD_INFO;
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 287b141..38cc942 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -137,11 +137,6 @@
 //#define	TASK_LET
 //PLICE_DEBUG<-
 
-// #ifdef PRIVATE_OBJ
-//#if !defined(__DEVICE_MODULE_H)
-//#include "device_module.h"
-//#endif
-
 
 /*---------------------  Export Definitions -------------------------*/
 
@@ -203,93 +198,9 @@
 
 
 // BUILD OBJ mode
-#ifdef PRIVATE_OBJ
-
-#undef dev_kfree_skb
-#undef dev_kfree_skb_irq
-#undef dev_alloc_skb
-#undef kfree
-#undef del_timer
-#undef ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/Makefile.arm |  181 ------------------------------
 drivers/staging/vt6655/Makefile.x86 |  209 -----------------------------------
 2 files changed, 0 insertions(+), 390 deletions(-)
 delete mode 100644 drivers/staging/vt6655/Makefile.arm
 delete mode 100644 drivers/staging/vt6655/Makefile.x86

diff --git a/drivers/staging/vt6655/Makefile.arm b/drivers/staging/vt6655/Makefile.arm
deleted file mode 100644
index 3dd5431..0000000
--- a/drivers/staging/vt6655/Makefile.arm
+++ /dev/null
@@ -1,181 +0,0 @@
-#
-#
-# Build options:
-#   PRIV_OBJ   := 1 for object version
-#   BIG_ENDIAN := 1 for big-endian mode
-#
-#   arm-linux-tools chain are located at:
-#     /usr/local/bin/arm-linux-gcc
-#     /usr/local/bin/arm-linux-ld
-#
-
-IO_MAP := 0
-HOSTAP := 1
-PRIV_OBJ := 1
-BIG_ENDIAN := 1
-
-test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
-KSP := $(foreach dir, $(KSP), $(test_dir))
-
-KSRC := $(firstword $(KSP))
-
-#ifeq (,$(KSRC))
-#  $(error Linux kernel source not found)
-#endif
-
-# check kernel version
-KVER := $(shell uname -r | cut -c1-3 | sed 's/2\.[56]/2\.6/')
-KERVER2=$(shell uname -r | cut -d. -f2)
-
-ifeq ($(KVER), 2.6)
-# 2.6 kernel
-TARGET = viawget.ko
-
-else
-TARGET = viawget.o
-
-endif
-
-INSTDIR	:= $(shell find /lib/modules/$(shell uname -r) -name $(TARGET) -printf "%h\n" | sort | head -1)
-ifeq (,$(INSTDIR))
-	ifeq (,$(KERVER2))
-		ifneq (,$(wildcard /lib/modules/$(shell uname -r)/kernel))
-			INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
-		else
-			INSTDIR := /lib/modules/$(shell uname -r)/net
-		endif
-	else
-		ifneq ($(KERVER2),2)
-			INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
-		else
-			INSTDIR := ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Julia Lawall <julia@diku.dk>

list_entry, which is an alias for container_of, cannot return NULL, as
there is no way to add a NULL value to a doubly linked list.

A simplified version of the semantic match that findds this problem is as
follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
expression x,E;
statement S1,S2;
position p,p1;
@@

*x = list_entry@p(...)
... when != x = E
*if@p1 (x == NULL) S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/b3dfg/b3dfg.c |   41 +++++++++++++++++------------------------
 1 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/b3dfg/b3dfg.c b/drivers/staging/b3dfg/b3dfg.c
index eec9c99..94c5d27 100644
--- a/drivers/staging/b3dfg/b3dfg.c
+++ b/drivers/staging/b3dfg/b3dfg.c
@@ -632,18 +632,15 @@ static void transfer_complete(struct b3dfg_dev *fgdev)
 	fgdev->cur_dma_frame_addr = 0;
 
 	buf = list_entry(fgdev->buffer_queue.next, struct b3dfg_buffer, list);
-	if (buf) {
-		dev_dbg(dev, "handle frame completion\n");
-		if (fgdev->cur_dma_frame_idx == B3DFG_FRAMES_PER_BUFFER - 1) {
-
-			/* last frame of that triplet completed */
-			dev_dbg(dev, "triplet completed\n");
-			buf->state = B3DFG_BUFFER_POPULATED;
-			list_del_init(&buf->list);
-			wake_up_interruptible(&fgdev->buffer_waitqueue);
-		}
-	} else {
-		dev_err(dev, "got frame but no buffer!\n");
+
+	dev_dbg(dev, "handle frame completion\n");
+	if (fgdev->cur_dma_frame_idx == B3DFG_FRAMES_PER_BUFFER - 1) {
+
+		/* last frame of that triplet completed */
+		dev_dbg(dev, "triplet completed\n");
+		buf->state = B3DFG_BUFFER_POPULATED;
+		list_del_init(&buf->list);
+		wake_up_interruptible(&fgdev->buffer_waitqueue);
 	}
 }
 
@@ -663,19 +660,15 @@ static bool setup_next_frame_transfer(struct b3dfg_dev *fgdev, int idx)
 	dev_dbg(dev, "program DMA transfer for next frame: %d\n", idx);
 
 	buf = list_entry(fgdev->buffer_queue.next, struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO                     |    1 -
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |    5 -----
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |    5 -----
 .../rtl8187se/ieee80211/ieee80211_crypt_wep.c      |    5 -----
 4 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index 74e79c7..a080cc9 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
-  - remove [IN]_OPENSUSE_SLED definitions
   - remove ENABLE_IPS ifdefs
   - rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
   - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
index 39fcabc..72056d7 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
@@ -31,11 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Host AP crypt: CCMP");
 MODULE_LICENSE("GPL");
 
-#ifdef OPENSUSE_SLED
-#ifndef IN_OPENSUSE_SLED
-#define IN_OPENSUSE_SLED 1
-#endif
-#endif
 
 #define AES_BLOCK_LEN 16
 #define CCMP_HDR_LEN 8
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
index 369a283..85be626 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
@@ -31,11 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Host AP crypt: TKIP");
 MODULE_LICENSE("GPL");
 
-#ifdef OPENSUSE_SLED
-#ifndef IN_OPENSUSE_SLED
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
index ed62146..8d8bdd0 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -39,12 +39,6 @@ static const char *ieee80211_modes[] = {
 	"?", "a", "b", "ab", "g", "ag", "bg", "abg"
 };
 
-#ifdef FEDORACORE_9
-#define IN_FEDORACORE_9 1
-#else
-#define IN_FEDORACORE_9 0
-#endif
-
 #define MAX_CUSTOM_LEN 64
 static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
 		                           char *start, char *stop,
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |  190 --------------------
 1 files changed, 0 insertions(+), 190 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index c76ffb1..8ab921a 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -237,51 +237,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 	return 0;
 
-	#ifdef NOT_YET
-	if (ieee->iw_mode == IW_MODE_MASTER) {
-		printk(KERN_DEBUG "%s: Master mode not yet suppported.\n",
-		       ieee->dev->name);
-		return 0;
-/*
-  hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr *)
-  skb->data);*/
-	}
-
-	if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) {
-		if (stype == WLAN_FC_STYPE_BEACON &&
-		    ieee->iw_mode == IW_MODE_MASTER) {
-			struct sk_buff *skb2;
-			/* Process beacon frames also in kernel driver to
-			 * update STA(AP) table statistics */
-			skb2 = skb_clone(skb, GFP_ATOMIC);
-			if (skb2)
-				hostap_rx(skb2->dev, skb2, rx_stats);
-		}
-
-		/* send management frames to the user space daemon for
-		 * processing */
-		ieee->apdevstats.rx_packets++;
-		ieee->apdevstats.rx_bytes += skb->len;
-		prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
-		return 0;
-	}
-
-	    if (ieee->iw_mode == IW_MODE_MASTER) {
-		if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
-			printk(KERN_DEBUG "%s: unknown management frame "
-			       "(type=0x%02x, stype=0x%02x) dropped\n",
-			       skb->dev->name, type, stype);
-			return -1;
-		}
-
-		hostap_rx(skb->dev, skb, rx_stats);
-		return 0;
-	}
-
-	printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: management frame "
-	       "received in non-Host AP mode\n", ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/Makefile                 |    2 -
 drivers/staging/rtl8187se/TODO                     |    1 -
 .../rtl8187se/ieee80211/ieee80211_softmac.c        |   38 --------------------
 drivers/staging/rtl8187se/r8180_core.c             |    4 --
 drivers/staging/rtl8187se/r8180_wx.c               |    6 ---
 drivers/staging/rtl8187se/r8185b_init.c            |    2 -
 6 files changed, 0 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile
index 98b2300..ac35cff 100644
--- a/drivers/staging/rtl8187se/Makefile
+++ b/drivers/staging/rtl8187se/Makefile
@@ -4,8 +4,6 @@
 #EXTRA_CFLAGS += -O2
 #CC            = gcc
 
-#added for EeePC testing
-EXTRA_CFLAGS += -DENABLE_IPS
 EXTRA_CFLAGS += -DSW_ANTE
 EXTRA_CFLAGS += -DTX_TRACK
 EXTRA_CFLAGS += -DHIGH_POWER
diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index a080cc9..10c4f34 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
-  - remove ENABLE_IPS ifdefs
   - rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
   - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
   - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 02b0b4e..59b2ab4 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -574,7 +574,6 @@ out:
 		DOT11D_ScanComplete(ieee);
 }
 
-#ifdef ENABLE_IPS
 void ieee80211_softmac_scan_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

ieee80211_hdr name is too generic so use ieee80211_hdr_4addr one instead
(which matches the naming used by rtl8192su driver).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO                     |    1 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    4 +-
 .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     |   10 ++--
 .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c     |   26 ++++++------
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   42 ++++++++++---------
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    8 +---
 drivers/staging/rtl8187se/r8180_core.c             |    4 +-
 7 files changed, 46 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index 10c4f34..4e1b599 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
-  - rename struct ieee80211_hdr to struct ieee80211_hdr_4addr
   - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
   - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
   - add hwsec_active flag to struct ieee80211_device
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 0a5e715..f8701c1 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -170,7 +170,7 @@ struct ieee_ibss_seq {
 	struct list_head list;
 };
 
-struct ieee80211_hdr {
+struct ieee80211_hdr_4addr {
 	u16 frame_ctl;
 	u16 duration_id;
 	u8 addr1[ETH_ALEN];
@@ -1450,7 +1450,7 @@ extern void ieee80211_txb_free(struct ieee80211_txb *);
 extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 			struct ieee80211_rx_stats *rx_stats);
 extern void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
and QOS_ctl field to qos_ctl (to match the naming used by rtl8192su).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO                     |    1 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    4 ++--
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   18 +++++++++---------
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index e3c5f7b..13eb6df 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
-  - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
   - add hwsec_active flag to struct ieee80211_device
   - add bHwSec flag to cb_desc structure
   - switch ieee80211.h to use <linux/ieee80211.h>
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 76a6cf7..93141bf 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -180,7 +180,7 @@ struct ieee80211_hdr_4addr {
 	u8 addr4[ETH_ALEN];
 } __attribute__ ((packed));
 
-struct ieee80211_hdr_QOS {
+struct ieee80211_hdr_4addrqos {
 	u16 frame_ctl;
 	u16 duration_id;
 	u8 addr1[ETH_ALEN];
@@ -188,7 +188,7 @@ struct ieee80211_hdr_QOS {
 	u8 addr3[ETH_ALEN];
 	u16 seq_ctl;
 	u8 addr4[ETH_ALEN];
-	u16 QOS_ctl;
+	u16 qos_ctl;
 } __attribute__ ((packed));
 
 struct ieee80211_hdr_3addr {
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 6144155..5e2e79b 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -105,12 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
and QOS_ctl field to qos_ctl (to match the naming used by rtl8192su).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO                     |    1 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h    |    4 +-
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |   20 ++++++++----------
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   21 ++++++++++---------
 4 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index 4e1b599..e3c5f7b 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
-  - rename struct ieee80211_hdr_3addr_QOS to struct ieee80211_hdr_3addrqos
   - rename struct ieee80211_hdr_QOS to struct ieee80211_hdr_4addrqos
   - add hwsec_active flag to struct ieee80211_device
   - add bHwSec flag to cb_desc structure
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index f8701c1..76a6cf7 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -200,14 +200,14 @@ struct ieee80211_hdr_3addr {
 	u16 seq_ctl;
 } __attribute__ ((packed));
 
-struct ieee80211_hdr_3addr_QOS {
+struct ieee80211_hdr_3addrqos {
 	u16 frame_ctl;
 	u16 duration_id;
 	u8 addr1[ETH_ALEN];
 	u8 addr2[ETH_ALEN];
 	u8 addr3[ETH_ALEN];
 	u16 seq_ctl;
-	u16 QOS_ctl;
+	u16 qos_ctl;
 } __attribute__ ((packed));
 
 enum eap_type {
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 367ee47..6144155 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

While at it:
* remove some commented out code
* remove some unused definitions

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/TODO                  |    1 -
 drivers/staging/rtl8187se/ieee80211/ieee80211.h |  122 +----------------------
 2 files changed, 1 insertions(+), 122 deletions(-)

diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO
index 13eb6df..c09a916 100644
--- a/drivers/staging/rtl8187se/TODO
+++ b/drivers/staging/rtl8187se/TODO
@@ -2,7 +2,6 @@ TODO:
 - prepare private ieee80211 stack for merge with rtl8192su's version:
   - add hwsec_active flag to struct ieee80211_device
   - add bHwSec flag to cb_desc structure
-  - switch ieee80211.h to use <linux/ieee80211.h>
 - switch to use shared "librtl" instead of private ieee80211 stack
 - switch to use LIB80211
 - switch to use MAC80211
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 93141bf..c5278e9 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -30,20 +30,7 @@
 #include <linux/timer.h>
 #include <linux/sched.h>
 #include <linux/wireless.h>
-
-/*
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef true
-#define true   1
-#endif
-
-#ifndef false
-#define false  0
-#endif
-*/
+#include <linux/ieee80211.h>
 
 #define KEY_TYPE_NA		0x0
 #define KEY_TYPE_WEP40 		0x1
@@ -247,61 +234,8 @@ struct eapol {
 #define	MAX_FRAG_THRESHOLD     2346U
 
 /* Frame control field constants */
-#define IEEE80211_FCTL_VERS		0x0002
-#define IEEE80211_FCTL_FTYPE		0x000c
-#define IEEE80211_FCTL_STYPE		0x00f0
-#define IEEE80211_FCTL_TODS		0x0100
-#define IEEE80211_FCTL_FROMDS		0x0200
 #define IEEE80211_FCTL_DSTODS		0x0300 //added by david
-#define IEEE80211_FCTL_MOREFRAGS	0x0400
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h |   28 ++++++++++++----------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 5261cdd..3222c22 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -457,19 +457,21 @@ Total: 28-2340 bytes
 */
 
 /* Management Frame Information Element Types */
-#define MFIE_TYPE_SSID       0
-#define MFIE_TYPE_RATES      1
-#define MFIE_TYPE_FH_SET     2
-#define MFIE_TYPE_DS_SET     3
-#define MFIE_TYPE_CF_SET     4
-#define MFIE_TYPE_TIM        5
-#define MFIE_TYPE_IBSS_SET   6
-#define MFIE_TYPE_COUNTRY  7 //+YJ,080625
-#define MFIE_TYPE_CHALLENGE  16
-#define MFIE_TYPE_ERP        42
-#define MFIE_TYPE_RSN	     48
-#define MFIE_TYPE_RATES_EX   50
-#define MFIE_TYPE_GENERIC    221
+enum {
+	MFIE_TYPE_SSID = 0,
+	MFIE_TYPE_RATES = 1,
+	MFIE_TYPE_FH_SET = 2,
+	MFIE_TYPE_DS_SET = 3,
+	MFIE_TYPE_CF_SET = 4,
+	MFIE_TYPE_TIM = 5,
+	MFIE_TYPE_IBSS_SET = 6,
+	MFIE_TYPE_COUNTRY = 7,
+	MFIE_TYPE_CHALLENGE = 16,
+	MFIE_TYPE_ERP = 42,
+	MFIE_TYPE_RSN = 48,
+	MFIE_TYPE_RATES_EX = 50,
+	MFIE_TYPE_GENERIC = 221,
+};
 
 struct ieee80211_header_data {
 	u16 frame_ctl;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:05 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Reorder the code in ieee80211.h for easier comparisions with
rtl8192su's version of the file.

While at it:
* use IEEE80211_4ADDR_LEN for IEEE80211_LEN definition
* remove unused country_code_type_t typedef
* make some minor coding style fixes

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h |  391 +++++++++++------------
 1 files changed, 193 insertions(+), 198 deletions(-)

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index c5278e9..5261cdd 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -133,102 +133,14 @@ typedef struct ieee_param {
    represents the 2304 bytes of real data, plus a possible 8 bytes of
    WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
 
-
-#define IEEE80211_HLEN			30
-#define IEEE80211_FRAME_LEN		(IEEE80211_DATA_LEN + IEEE80211_HLEN)
-
-/* this is stolen and modified from the madwifi driver*/
-#define IEEE80211_FC0_TYPE_MASK		0x0c
-#define IEEE80211_FC0_TYPE_DATA		0x08
-#define IEEE80211_FC0_SUBTYPE_MASK	0xB0
-#define IEEE80211_FC0_SUBTYPE_QOS	0x80
-
-#define IEEE80211_QOS_HAS_SEQ(fc) \
-	(((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
-	 (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
-
-/* this is stolen from ipw2200 driver */
-#define IEEE_IBSS_MAC_HASH_SIZE 31
-struct ieee_ibss_seq {
-	u8 mac[ETH_ALEN];
-	u16 seq_num[17];
-	u16 frag_num[17];
-	unsigned long packet_time[17];
-	struct list_head list;
-};
-
-struct ieee80211_hdr_4addr {
-	u16 frame_ctl;
-	u16 duration_id;
-	u8 addr1[ETH_ALEN];
-	u8 addr2[ETH_ALEN];
-	u8 addr3[ETH_ALEN];
-	u16 seq_ctl;
-	u8 addr4[ETH_ALEN];
-} __attribute__ ((packed));
-
-struct ieee80211_hdr_4addrqos {
-	u16 frame_ctl;
-	u16 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/TODO                     |    1 -
 .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c     |   12 ------------
 drivers/staging/rtl8192su/r8192U_core.c            |    8 --------
 3 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
index 0b89c9d..c8140d5 100644
--- a/drivers/staging/rtl8192su/TODO
+++ b/drivers/staging/rtl8192su/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8187se's version:
-  - remove JOHN_DUMP[_DESC] ifdefs
   - remove [IN]_OPENSUSE_SLED definitions
   - remove superflous container_of definition from ieee80211.h
   - remove rtl8192su's specific dead code
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
index 174af0c..f6ceaa3 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
@@ -502,18 +502,6 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 	skb_pull(skb, 8);
 	skb_trim(skb, skb->len - 4);
 
-//john's test
-#ifdef JOHN_DUMP
-if( ((u16*)skb->data)[0] & 0x4000){
-        printk("@@ rx decrypted skb->data");
-        int i;
-        for(i=0;i<skb->len;i++){
-                if( (i%24)==0 ) printk("\n");
-                printk("%2x ", ((u8*)skb->data)[i]);
-        }
-        printk("\n");
-}
-#endif /*JOHN_DUMP*/
 	return keyidx;
 }
 
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index ea96b11..d22e4e0 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -1966,14 +1966,6 @@ short rtl8192SU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

* rename ieee80211_{init,exit}() to ieee80211_debug_{init,exit}()
* make private ieee80211 stack really private
* cleanup Makefile
* remove superfluous ieee80211_* defines
* remove superfluous EXPORT_SYMBOLs

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/Makefile                 |   15 ++---
 drivers/staging/rtl8192su/TODO                     |    2 -
 drivers/staging/rtl8192su/ieee80211/dot11d.c       |    9 ---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |   72 --------------------
 .../staging/rtl8192su/ieee80211/ieee80211_crypt.c  |   17 +----
 .../rtl8192su/ieee80211/ieee80211_crypt_ccmp.c     |   11 +---
 .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c     |   10 +--
 .../rtl8192su/ieee80211/ieee80211_crypt_wep.c      |   10 +--
 .../staging/rtl8192su/ieee80211/ieee80211_module.c |   11 +---
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |    3 -
 .../rtl8192su/ieee80211/ieee80211_softmac.c        |   22 ------
 .../rtl8192su/ieee80211/ieee80211_softmac_wx.c     |   19 -----
 drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c |    3 -
 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c |    9 ---
 .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c   |    2 -
 .../staging/rtl8192su/ieee80211/rtl819x_TSProc.c   |    2 -
 drivers/staging/rtl8192su/r8192U_core.c            |   55 +++++++++++++++
 17 files changed, 70 insertions(+), 202 deletions(-)

diff --git a/drivers/staging/rtl8192su/Makefile b/drivers/staging/rtl8192su/Makefile
index aa9f806..52dc09b 100644
--- a/drivers/staging/rtl8192su/Makefile
+++ b/drivers/staging/rtl8192su/Makefile
@@ -21,9 +21,11 @@ r8192s_usb-objs :=		\
 	r8192S_firmware.o	\
 	r8192S_Efuse.o		\
 	r8192U_core.o		\
-	r8192U_pm.o
-
-ieee80211-rsl-objs ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c |  124 --------------------
 drivers/staging/rtl8192su/r8192S_firmware.c        |    5 -
 drivers/staging/rtl8192su/r8192S_phy.c             |   23 ----
 3 files changed, 0 insertions(+), 152 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
index e1784f9..8e56f97 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c
@@ -236,51 +236,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 	return 0;
 
-	#ifdef NOT_YET
-	if (ieee->iw_mode == IW_MODE_MASTER) {
-		printk(KERN_DEBUG "%s: Master mode not yet suppported.\n",
-		       ieee->dev->name);
-		return 0;
-/*
-  hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr_4addr *)
-  skb->data);*/
-	}
-
-	if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) {
-		if (stype == WLAN_FC_STYPE_BEACON &&
-		    ieee->iw_mode == IW_MODE_MASTER) {
-			struct sk_buff *skb2;
-			/* Process beacon frames also in kernel driver to
-			 * update STA(AP) table statistics */
-			skb2 = skb_clone(skb, GFP_ATOMIC);
-			if (skb2)
-				hostap_rx(skb2->dev, skb2, rx_stats);
-		}
-
-		/* send management frames to the user space daemon for
-		 * processing */
-		ieee->apdevstats.rx_packets++;
-		ieee->apdevstats.rx_bytes += skb->len;
-		prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
-		return 0;
-	}
-
-	    if (ieee->iw_mode == IW_MODE_MASTER) {
-		if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
-			printk(KERN_DEBUG "%s: unknown management frame "
-			       "(type=0x%02x, stype=0x%02x) dropped\n",
-			       skb->dev->name, type, stype);
-			return -1;
-		}
-
-		hostap_rx(skb->dev, skb, rx_stats);
-		return ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/TODO                     |    1 -
 .../rtl8192su/ieee80211/ieee80211_crypt_ccmp.c     |    4 ----
 .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c     |    4 ----
 .../rtl8192su/ieee80211/ieee80211_crypt_wep.c      |    3 ---
 4 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
index c8140d5..a1c4bf2 100644
--- a/drivers/staging/rtl8192su/TODO
+++ b/drivers/staging/rtl8192su/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8187se's version:
-  - remove [IN]_OPENSUSE_SLED definitions
   - remove superflous container_of definition from ieee80211.h
   - remove rtl8192su's specific dead code
   - cleanup ieee80211.h
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c
index 10922a9..7bc956e 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c
@@ -31,10 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Host AP crypt: CCMP");
 MODULE_LICENSE("GPL");
 
-#ifndef OPENSUSE_SLED
-#define OPENSUSE_SLED 0
-#endif
-
 #define AES_BLOCK_LEN 16
 #define CCMP_HDR_LEN 8
 #define CCMP_MIC_LEN 8
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
index f6ceaa3..9b9438f 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c
@@ -31,10 +31,6 @@ MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Host AP crypt: TKIP");
 MODULE_LICENSE("GPL");
 
-#ifndef OPENSUSE_SLED
-#define OPENSUSE_SLED 0
-#endif
-
 struct ieee80211_tkip_data {
 #define TKIP_KEY_LEN ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/TODO                  |    1 -
 drivers/staging/rtl8192su/ieee80211/ieee80211.h |   14 --------------
 2 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
index a1c4bf2..b13be9e 100644
--- a/drivers/staging/rtl8192su/TODO
+++ b/drivers/staging/rtl8192su/TODO
@@ -1,6 +1,5 @@
 TODO:
 - prepare private ieee80211 stack for merge with rtl8187se's version:
-  - remove superflous container_of definition from ieee80211.h
   - remove rtl8192su's specific dead code
   - cleanup ieee80211.h
   - move rtl8192su's specific code out from ieee80211.h
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 03862d3..75be60d 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -47,20 +47,6 @@
 #define IWEVCUSTOM 0x8c02
 #endif
 
-#ifndef container_of
-/**
- * container_of - cast a member of a structure out to the containing structure
- *
- * @ptr:        the pointer to the member.
- * @type:       the type of the container struct this is embedded in.
- * @member:     the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({                      \
-        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
-        (type *)( (char *)__mptr - offsetof(type,member) );})
-#endif
-
 #define KEY_TYPE_NA		0x0
 #define KEY_TYPE_WEP40 		0x1
 #define KEY_TYPE_TKIP		0x2
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h |   26 -----------------------
 1 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 75be60d..279574d 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -472,32 +472,6 @@ do { if (ieee80211_debug_level & (level)) \
 #define IEEE80211_DEBUG_RX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
 #define IEEE80211_DEBUG_QOS(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_QOS, f, ## a)
 
-#ifdef CONFIG_IEEE80211_DEBUG
-/* Added by Annie, 2005-11-22. */
-#define MAX_STR_LEN     64
-/* I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.*/
-#define PRINTABLE(_ch)  (_ch>'!' && _ch<'~')
-#define IEEE80211_PRINT_STR(_Comp, _TitleString, _Ptr, _Len)                            	\
-                        if((_Comp) & level)   							\
-                        {                                                                       \
-                                int             __i;                                            \
-                                u8  buffer[MAX_STR_LEN];                                    	\
-                                int length = (_Len<MAX_STR_LEN)? _Len : (MAX_STR_LEN-1) ;  	\
-                                memset(buffer, 0, MAX_STR_LEN);                      		\
-                                memcpy(buffer, (u8 *)_Ptr, length );            		\
-                                for( __i=0; __i<MAX_STR_LEN; __i++ )                            \
-                                {                                                               \
-                                     if( !PRINTABLE(buffer[__i]) )   buffer[__i] = '?';     ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |    3 -
 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c |   55 --------------------
 2 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 279574d..df8c4f9 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -2220,9 +2220,6 @@ extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
 				   struct iw_request_info *info,
 				   union iwreq_data *wrqu, char *key);
-extern int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
-                            struct iw_request_info *info,
-                            union iwreq_data* wrqu, char *extra);
 extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
                             struct iw_request_info *info,
                             union iwreq_data* wrqu, char *extra);
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c
index 47dc210..adaf457 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c
@@ -675,61 +675,6 @@ done:
         return ret;
 }
 
-int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
-			       struct iw_request_info *info,
-			       union iwreq_data *wrqu, char *extra)
-{
-	struct iw_point *encoding = &wrqu->encoding;
-	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
-	struct ieee80211_crypt_data *crypt;
-	int idx, max_key_len;
-
-	max_key_len = encoding->length - sizeof(*ext);
-	if (max_key_len < 0)
-		return -EINVAL;
-
-	idx = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Pavel Machek <pavel@ucw.cz>

This provides Makefile/Kconfig glue for HTC Dream staging parts.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Brian Swetland <swetland@google.com>
Cc: Iliyan Malchev <ibm@android.com>
Cc: San Mehat <san@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig  |    4 ++++
 drivers/staging/Makefile |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 549ae79..c1a0ca4 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -131,6 +131,10 @@ source "drivers/staging/cpc-usb/Kconfig"
 
 source "drivers/staging/pata_rdc/Kconfig"
 
+source "drivers/staging/dream/smd/Kconfig"
+
+source "drivers/staging/dream/camera/Kconfig"
+
 source "drivers/staging/udlfb/Kconfig"
 
 endif # !STAGING_EXCLUDE_BUILD
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index cb14ff2..aa65ed2 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -48,3 +48,5 @@ obj-$(CONFIG_VT6656)		+= vt6656/
 obj-$(CONFIG_USB_CPC)		+= cpc-usb/
 obj-$(CONFIG_RDC_17F3101X)	+= pata_rdc/
 obj-$(CONFIG_FB_UDL)		+= udlfb/
+obj-$(CONFIG_MSM_ADSP)		+= dream/qdsp5/ dream/smd/
+obj-$(CONFIG_MSM_CAMERA)	+= dream/camera/
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Move rtl8192su specific code out from ieee80211.h to ieee80211_r8192s.h.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rtl8192su/ieee80211/ieee80211.h    |  433 +-------------------
 .../staging/rtl8192su/ieee80211/ieee80211_r8192s.h |  436 ++++++++++++++++++++
 2 files changed, 437 insertions(+), 432 deletions(-)
 create mode 100644 drivers/staging/rtl8192su/ieee80211/ieee80211_r8192s.h

diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 139f86c..f22d024 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -45,135 +45,6 @@
 #define KEY_TYPE_CCMP		0x4
 #define KEY_TYPE_WEP104		0x5
 
-/* added for rtl819x tx procedure */
-#define MAX_QUEUE_SIZE		0x10
-
-/* 8190 queue mapping */
-enum {
-	BK_QUEUE	= 0,
-	BE_QUEUE	= 1,
-	VI_QUEUE	= 2,
-	VO_QUEUE	= 3,
-	HCCA_QUEUE	= 4,
-	TXCMD_QUEUE	= 5,
-	MGNT_QUEUE	= 6,
-	HIGH_QUEUE	= 7,
-	BEACON_QUEUE	= 8,
-
-	LOW_QUEUE	= BE_QUEUE,
-	NORMAL_QUEUE	= MGNT_QUEUE
-};
-
-#define SWRF_TIMEOUT				50
-
-/* LEAP related */
-/* Flag byte: byte 8, numbered from 0. */
-#define IE_CISCO_FLAG_POSITION		0x08
-#define SUPPORT_CKIP_MIC		0x08	/* bit3 */
-#define SUPPORT_CKIP_PK			0x10	/* bit4 */
-
-/* defined for skb cb field, at most 28 byte */
-typedef struct cb_desc {
-        /* Tx Desc Related flags (8-9) */
-	u8 bLastIniPkt:1;
-	u8 bCmdOrInit:1;
-        u8 bFirstSeg:1;
-        u8 bLastSeg:1;
-        u8 bEncrypt:1;
-        u8 bTxDisableRateFallBack:1;
-        u8 bTxUseDriverAssingedRate:1;
-	u8 bHwSec:1; /* indicate whether use Hw security */
-
-        u8 reserved1;
-
-        /* Tx Firmware Relaged flags (10-11)*/
-        u8 bCTSEnable:1;
-        u8 bRTSEnable:1;
-        u8 bUseShortGI:1;
-        u8 bUseShortPreamble:1;
-        u8 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: Hank Janssen <hjanssen@microsoft.com>

These are the header files for the different Linux Hyper-V drivers to
use.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/NetVscApi.h  |  145 +++++++++++++++++
 drivers/staging/hv/include/StorVscApi.h |  137 ++++++++++++++++
 drivers/staging/hv/include/VmbusApi.h   |  262 ++++++++++++++++++++++++++++++
 drivers/staging/hv/include/logging.h    |  134 ++++++++++++++++
 drivers/staging/hv/include/osd.h        |  263 +++++++++++++++++++++++++++++++
 drivers/staging/hv/include/vmbus.h      |  111 +++++++++++++
 6 files changed, 1052 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/hv/include/NetVscApi.h
 create mode 100644 drivers/staging/hv/include/StorVscApi.h
 create mode 100644 drivers/staging/hv/include/VmbusApi.h
 create mode 100644 drivers/staging/hv/include/logging.h
 create mode 100644 drivers/staging/hv/include/osd.h
 create mode 100644 drivers/staging/hv/include/vmbus.h

diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h
new file mode 100644
index 0000000..8e780b0
--- /dev/null
+++ b/drivers/staging/hv/include/NetVscApi.h
@@ -0,0 +1,145 @@
+/*
+ *
+ * Copyright (c) 2009, Microsoft Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

From: miaofng <miaofng@126.com>

Signed-off-by: miaofng <miaofng@126.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/main_usb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 8a6814d..7e40ceb 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -879,13 +879,14 @@ vntwusb_found1(struct usb_interface *intf, const struct usb_device_id *id)
 
 //2008-07-21-01<Add>by MikeLiu
 //register wpadev
+#if 0
    if(wpa_set_wpadev(pDevice, 1)!=0) {
      printk("Fail to Register WPADEV?\n");
         unregister_netdev(pDevice->dev);
         free_netdev(netdev);
         kfree(pDevice);
    }
-
+#endif
          usb_device_reset(pDevice);
 
 #ifdef SndEvt_ToAPI
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.

The hv_vmbus code should now build properly, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c                 |    4 ++--
 drivers/staging/hv/Channel.h                 |    2 +-
 drivers/staging/hv/ChannelInterface.h        |    2 +-
 drivers/staging/hv/ChannelMgmt.c             |    4 ++--
 drivers/staging/hv/ChannelMgmt.h             |    8 ++++----
 drivers/staging/hv/Connection.c              |    2 +-
 drivers/staging/hv/Hv.c                      |    2 +-
 drivers/staging/hv/Hv.h                      |   16 ++++++++--------
 drivers/staging/hv/RingBuffer.c              |    2 +-
 drivers/staging/hv/RingBuffer.h              |    2 +-
 drivers/staging/hv/Sources.c                 |    1 +
 drivers/staging/hv/Vmbus.c                   |    2 +-
 drivers/staging/hv/VmbusPrivate.h            |    4 ++--
 drivers/staging/hv/include/ChannelMessages.h |    2 +-
 drivers/staging/hv/osd.c                     |    3 ++-
 drivers/staging/hv/vmbus_drv.c               |   15 ++++++++-------
 16 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 0b78604..45b8c1b 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -22,8 +22,8 @@
  */
 
 
-#include "osd.h"
-#include "logging.h"
+#include "include/osd.h"
+#include "include/logging.h"
 
 #include "VmbusPrivate.h"
 
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 117b2e1..6fa49ce 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -25,7 +25,7 @@
 #ifndef _CHANNEL_H_
 #define _CHANNEL_H_
 
-#include "osd.h"
+#include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

First cut at what needs to be done to this codebase.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/TODO |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/hv/TODO

diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
new file mode 100644
index 0000000..c70fd4f
--- /dev/null
+++ b/drivers/staging/hv/TODO
@@ -0,0 +1,15 @@
+TODO:
+	- fix checkpatch warnings/errors
+	- fix sparse issues
+	- remove compatibility layer
+	- fix HANDLE usage to be "real" pointers
+	- audit the vmbus to verify it is working properly with the
+	  driver model
+	- see if the vmbus can be merged with the other virtual busses
+	  in the kernel
+	- audit the network driver
+	- audit the block driver
+	- audit the scsi driver
+
+Please send patches for this code to Greg Kroah-Hartman <gregkh@suse.de>
+and Hank Janssen <hjanssen@microsoft.com>
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

x86-64 needs a different config check.  Thanks to Hank for the debugging
to determine the fix for this.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 0932107..4f080f0 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -165,7 +165,7 @@ HvDoHypercall (
     void*   Output
     )
 {
-#ifdef x86_64
+#ifdef CONFIG_X86_64
     UINT64 hvStatus=0;
     UINT64 inputAddress = (Input)? GetPhysicalAddress(Input) : 0;
 	UINT64 outputAddress = (Output)? GetPhysicalAddress(Output) : 0;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Add the Hyper-V virtual bus to the kernel build system.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig     |    2 ++
 drivers/staging/Makefile    |    1 +
 drivers/staging/hv/Kconfig  |    8 ++++++++
 drivers/staging/hv/Makefile |    3 +++
 4 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/hv/Kconfig
 create mode 100644 drivers/staging/hv/Makefile

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index c1a0ca4..34aa21e 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -137,5 +137,7 @@ source "drivers/staging/dream/camera/Kconfig"
 
 source "drivers/staging/udlfb/Kconfig"
 
+source "drivers/staging/hv/Kconfig"
+
 endif # !STAGING_EXCLUDE_BUILD
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index aa65ed2..bc84a0e 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -50,3 +50,4 @@ obj-$(CONFIG_RDC_17F3101X)	+= pata_rdc/
 obj-$(CONFIG_FB_UDL)		+= udlfb/
 obj-$(CONFIG_MSM_ADSP)		+= dream/qdsp5/ dream/smd/
 obj-$(CONFIG_MSM_CAMERA)	+= dream/camera/
+obj-$(CONFIG_HYPERV)		+= hv/
diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
new file mode 100644
index 0000000..40d922b
--- /dev/null
+++ b/drivers/staging/hv/Kconfig
@@ -0,0 +1,8 @@
+config HYPERV
+	tristate "Microsoft Hyper-V client drivers"
+	depends on X86
+	default n
+	help
+	  Select this option to run Linux as a Hyper-V client operating
+	  system.
+
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
new file mode 100644
index 0000000..9908360
--- /dev/null
+++ b/drivers/staging/hv/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_HYPERV)		+= hv_vmbus.o
+
+hv_vmbus-objs := vmbus_drv.o osd.o Sources.o
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.
Some minor scsi api changes were needed as well.

The hv_storvsc code should now build properly, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c     |    9 +++++----
 drivers/staging/hv/storvsc_drv.c |   11 ++++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 8a1d776..c8279b7 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -21,12 +21,13 @@
  *
  */
 
+#define KERNEL_2_6_27
 
-#include "logging.h"
+#include "include/logging.h"
 
-#include "StorVscApi.h"
-#include "VmbusPacketFormat.h"
-#include "vstorage.h"
+#include "include/StorVscApi.h"
+#include "include/VmbusPacketFormat.h"
+#include "include/vstorage.h"
 
 
 //
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index d5a337b..0a1c144 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -21,6 +21,7 @@
  *
  */
 
+#define KERNEL_2_6_27
 
 #include <linux/init.h>
 #include <linux/module.h>
@@ -40,10 +41,10 @@
 #include <scsi/scsi_dbg.h>
 #endif
 
-#include "logging.h"
-#include "vmbus.h"
+#include "include/logging.h"
+#include "include/vmbus.h"
 
-#include "StorVscApi.h"
+#include "include/StorVscApi.h"
 
 //
 // #defines
@@ -296,7 +297,7 @@ static int storvsc_probe(struct device *device)
 #if defined(KERNEL_2_6_27)
 	host_device_ctx->request_pool =
 	    kmem_cache_create
-	    (device_ctx->device.bus_id,
+	    (dev_name(&device_ctx->device),
 	     sizeof(struct storvsc_cmd_request) + storvsc_drv_obj->RequestExtSize,
 	     0,
 	     SLAB_HWCACHE_ALIGN, NULL);
@@ -1250,7 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.
Lots of block api changes were needed, and I don't think I got it
all correct.  It would be great of someone who knows the block api better
could review it.

The hv_blkvsc code should now build, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c     |    2 +-
 drivers/staging/hv/blkvsc_drv.c |   23 ++++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 58b9698..be53e65 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -21,7 +21,7 @@
  */
 
 
-#include "../storvsc/StorVsc.c"
+#include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
 
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 2f67981..a4852f5 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -20,6 +20,7 @@
  *
  */
 
+#define KERNEL_2_6_27
 
 #include <linux/init.h>
 #include <linux/module.h>
@@ -34,10 +35,10 @@
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_dbg.h>
 
-#include "logging.h"
-#include "vmbus.h"
+#include "include/logging.h"
+#include "include/vmbus.h"
 
-#include "StorVscApi.h"
+#include "include/StorVscApi.h"
 
 //
 // #defines
@@ -313,7 +314,7 @@ static int blkvsc_probe(struct device *device)
 	ASSERT(sizeof(struct blkvsc_request_group) <= sizeof(struct blkvsc_request));
 
 #ifdef KERNEL_2_6_27
-        blkdev->request_pool = kmem_cache_create(device_ctx->device.bus_id,
+        blkdev->request_pool = kmem_cache_create(dev_name(&device_ctx->device),
                 sizeof(struct blkvsc_request) + storvsc_drv_obj->RequestExtSize, 0,
              ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Add the Hyper-V virtual block driver to the kernel build system.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig  |    7 +++++++
 drivers/staging/hv/Makefile |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index 52e8921..a94c1d6 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -12,3 +12,10 @@ config HYPERV_STORAGE
 	default n
 	help
 	 Select this option to enable the Hyper-V virtual storage driver.
+
+config HYPERV_BLOCK
+	tristate "Microsoft Hyper-V virtual block driver"
+	depends on BLOCK
+	default n
+	help
+	  Select this option to enable the Hyper-V virtual block driver.
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index 1ef9ad2..5fadadc 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -1,5 +1,7 @@
 obj-$(CONFIG_HYPERV)		+= hv_vmbus.o
 obj-$(CONFIG_HYPERV_STORAGE)	+= hv_storvsc.o
+obj-$(CONFIG_HYPERV_BLOCK)	+= hv_blkvsc.o
 
 hv_vmbus-objs := vmbus_drv.o osd.o Sources.o
 hv_storvsc-objs := storvsc_drv.o osd.o StorVsc.o
+hv_blkvsc-objs := blkvsc_drv.o osd.o BlkVsc.o
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Add the Hyper-V virtual scsi driver to the kernel build system.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig  |    6 ++++++
 drivers/staging/hv/Makefile |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index 40d922b..52e8921 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -6,3 +6,9 @@ config HYPERV
 	  Select this option to run Linux as a Hyper-V client operating
 	  system.
 
+config HYPERV_STORAGE
+	tristate "Microsoft Hyper-V virtual storage driver"
+	depends on SCSI
+	default n
+	help
+	 Select this option to enable the Hyper-V virtual storage driver.
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index 9908360..1ef9ad2 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -1,3 +1,5 @@
 obj-$(CONFIG_HYPERV)		+= hv_vmbus.o
+obj-$(CONFIG_HYPERV_STORAGE)	+= hv_storvsc.o
 
 hv_vmbus-objs := vmbus_drv.o osd.o Sources.o
+hv_storvsc-objs := storvsc_drv.o osd.o StorVsc.o
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

driver_data is gone now from struct device, so use the proper functions
to access it instead.

Thanks to Bill Pemberton for pointing out this build error.

Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/storvsc_drv.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 0a1c144..1a05134 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -279,7 +279,7 @@ static int storvsc_probe(struct device *device)
 		return -ENOMEM;
 	}
 
-	device->driver_data = host;
+	dev_set_drvdata(device, host);
 
 	host_device_ctx = (struct host_device_context*)host->hostdata;
 	memset(host_device_ctx, 0, sizeof(struct host_device_context));
@@ -380,7 +380,7 @@ static int storvsc_remove(struct device *device)
 	struct device_context *device_ctx = device_to_device_context(device);
 	DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
 
-	struct Scsi_Host *host = (struct Scsi_Host *)device->driver_data;
+	struct Scsi_Host *host = dev_get_drvdata(device);
 	struct host_device_context *host_device_ctx=(struct host_device_context*)host->hostdata;
 
 
@@ -1125,7 +1125,7 @@ static void storvsc_host_rescan_callback(void* context)
 	DEVICE_OBJECT* device_obj = (DEVICE_OBJECT*)context;
 #endif
 	struct device_context* device_ctx = to_device_context(device_obj);
-	struct Scsi_Host *host = (struct Scsi_Host *)device_ctx->device.driver_data;
+	struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device);
 	struct scsi_device *sdev;
 	struct host_device_context *host_device_ctx;
 	struct scsi_device **sdevs_remove_list;
@@ -1293,7 +1293,7 @@ static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[], un
 static void storvsc_host_rescan(DEVICE_OBJECT* device_obj)
 {
 	struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

The driver was changed to use net_device_ops, as that is needed to build
and operate properly now.

The hv_netvsc code should now build with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c               |    3 ++-
 drivers/staging/hv/NetVsc.h               |    8 ++++----
 drivers/staging/hv/RndisFilter.c          |    5 +++--
 drivers/staging/hv/RndisFilter.h          |    4 ++--
 drivers/staging/hv/include/nvspprotocol.h |    2 +-
 drivers/staging/hv/netvsc_drv.c           |   21 +++++++++++++--------
 6 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 6cc3143..f9a3d18 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -20,8 +20,9 @@
  *
  */
 
+#define KERNEL_2_6_27
 
-#include "logging.h"
+#include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
 
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index 37d0744..e92cfc1 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -24,12 +24,12 @@
 #ifndef _NETVSC_H_
 #define _NETVSC_H_
 
-#include "VmbusPacketFormat.h"
-#include "nvspprotocol.h"
+#include "include/VmbusPacketFormat.h"
+#include "include/nvspprotocol.h"
 
-#include "List.h"
+#include "include/List.h"
 
-#include "NetVscApi.h"
+#include "include/NetVscApi.h"
 //
 // #defines
 //
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 57b828b..c2cac21 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -21,10 +21,11 @@
  *
  */
 
+#define KERNEL_2_6_27
 
-#include "logging.h"
+#include "include/logging.h"
 
-#include "NetVscApi.h"
+#include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

driver_data is gone now from struct device, so use the proper functions
to access it instead.

Thanks to Bill Pemberton for pointing out this build error.

Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index a4852f5..04d980f 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -341,7 +341,7 @@ static int blkvsc_probe(struct device *device)
 	blkdev->target = device_info.TargetId; // this identified the device 0 or 1
 	blkdev->path = device_info.PathId; // this identified the ide ctrl 0 or 1
 
-	device->driver_data = blkdev;
+	dev_set_drvdata(device, blkdev);
 
 	// Calculate the major and device num
 	if (blkdev->path == 0)
@@ -457,7 +457,7 @@ Cleanup:
 
 static void blkvsc_shutdown(struct device *device)
 {
-	struct block_device_context *blkdev = (struct block_device_context*)device->driver_data;
+	struct block_device_context *blkdev = dev_get_drvdata(device);
 	unsigned long flags;
 
 	if (!blkdev)
@@ -786,7 +786,7 @@ static int blkvsc_remove(struct device *device)
 
 	struct device_context *device_ctx = device_to_device_context(device);
 	DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
-	struct block_device_context *blkdev = (struct block_device_context*)device->driver_data;
+	struct block_device_context *blkdev = dev_get_drvdata(device);
 	unsigned long flags;
 
 	DPRINT_ENTER(BLKVSC_DRV);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Add the Hyper-V virtual network driver to the kernel build system.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig  |    7 +++++++
 drivers/staging/hv/Makefile |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index a94c1d6..932bfd6 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -19,3 +19,10 @@ config HYPERV_BLOCK
 	default n
 	help
 	  Select this option to enable the Hyper-V virtual block driver.
+
+config HYPERV_NET
+	tristate "Microsoft Hyper-V virtual network driver"
+	depends on NET
+	default n
+	help
+	  Select this option to enable the Hyper-V virtual network driver.
diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index 5fadadc..d4142e2 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -1,7 +1,9 @@
 obj-$(CONFIG_HYPERV)		+= hv_vmbus.o
 obj-$(CONFIG_HYPERV_STORAGE)	+= hv_storvsc.o
 obj-$(CONFIG_HYPERV_BLOCK)	+= hv_blkvsc.o
+obj-$(CONFIG_HYPERV_NET)	+= hv_netvsc.o
 
 hv_vmbus-objs := vmbus_drv.o osd.o Sources.o
 hv_storvsc-objs := storvsc_drv.o osd.o StorVsc.o
 hv_blkvsc-objs := blkvsc_drv.o osd.o BlkVsc.o
+hv_netvsc-objs := netvsc_drv.o osd.o NetVsc.o RndisFilter.o
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

driver_data is gone now from struct device, so use the proper functions
to access it instead.

Thanks to Bill Pemberton for pointing out this build error.

Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/netvsc_drv.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 71931f5..cd3f3b5 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -209,14 +209,14 @@ static int netvsc_probe(struct device *device)
 
 	net_device_ctx = netdev_priv(net);
 	net_device_ctx->device_ctx = device_ctx;
-	device->driver_data = net;
+	dev_set_drvdata(device, net);
 
 	// Notify the netvsc driver of the new device
 	ret = net_drv_obj->Base.OnDeviceAdd(device_obj, (void*)&device_info);
 	if (ret != 0)
 	{
 		free_netdev(net);
-		device->driver_data = NULL;
+		dev_set_drvdata(device, NULL);
 
 		DPRINT_ERR(NETVSC_DRV, "unable to add netvsc device (ret %d)", ret);
 		return ret;
@@ -262,7 +262,7 @@ static int netvsc_remove(struct device *device)
 	NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
 
 	struct device_context *device_ctx = device_to_device_context(device);
-	struct net_device *net = (struct net_device *)device_ctx->device.driver_data;
+	struct net_device *net = dev_get_drvdata(&device_ctx->device);
 	DEVICE_OBJECT *device_obj = &device_ctx->device_obj;
 
 	DPRINT_ENTER(NETVSC_DRV);
@@ -536,7 +536,7 @@ Desc:	Link up/down notification
 static void netvsc_linkstatus_callback(DEVICE_OBJECT *device_obj, unsigned int status)
 {
 	struct device_context* device_ctx = to_device_context(device_obj);
-	struct net_device* net = (struct net_device *)device_ctx->device.driver_data;
+	struct net_device* net = dev_get_drvdata(&device_ctx->device);
 
 	DPRINT_ENTER(NETVSC_DRV);
 
@@ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The PVOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c                   |   20 ++++++++++----------
 drivers/staging/hv/Channel.h                   |   16 ++++++++--------
 drivers/staging/hv/ChannelInterface.c          |   16 ++++++++--------
 drivers/staging/hv/ChannelMgmt.c               |    8 ++++----
 drivers/staging/hv/ChannelMgmt.h               |    4 ++--
 drivers/staging/hv/Connection.c                |    6 +++---
 drivers/staging/hv/Hv.c                        |    2 +-
 drivers/staging/hv/Hv.h                        |    2 +-
 drivers/staging/hv/NetVsc.c                    |    8 ++++----
 drivers/staging/hv/NetVsc.h                    |    4 ++--
 drivers/staging/hv/RingBuffer.c                |   18 +++++++++---------
 drivers/staging/hv/RingBuffer.h                |    8 ++++----
 drivers/staging/hv/StorVsc.c                   |    6 +++---
 drivers/staging/hv/VmbusPrivate.h              |    2 +-
 drivers/staging/hv/include/NetVscApi.h         |    8 ++++----
 drivers/staging/hv/include/StorVscApi.h        |    4 ++--
 drivers/staging/hv/include/VmbusApi.h          |   18 +++++++++---------
 drivers/staging/hv/include/VmbusPacketFormat.h |    2 +-
 drivers/staging/hv/include/osd.h               |    5 ++---
 drivers/staging/hv/include/rndis.h             |    4 ++--
 drivers/staging/hv/osd.c                       |    4 ++--
 21 files changed, 82 insertions(+), 83 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 45b8c1b..e3dba14 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -32,7 +32,7 @@
 //
 static int
 VmbusChannelCreateGpadlHeader(
-	PVOID					Kbuffer,	// must be phys and virt contiguous
+	void *					Kbuffer,	// must be phys and virt contiguous
 	UINT32					Size,		// page-size multiple
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The INTERNAL typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.h          |   24 ++++++++++++------------
 drivers/staging/hv/ChannelInterface.c |   22 +++++++++++-----------
 drivers/staging/hv/ChannelInterface.h |    4 ++--
 drivers/staging/hv/ChannelMgmt.h      |   10 +++++-----
 drivers/staging/hv/Hv.h               |   12 ++++++------
 drivers/staging/hv/RingBuffer.h       |   16 ++++++++--------
 drivers/staging/hv/VmbusPrivate.h     |   24 ++++++++++--------------
 7 files changed, 54 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 6fa49ce..00433e1 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -62,7 +62,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
 // Routines
 //
 
-INTERNAL int
+static int
 VmbusChannelOpen(
 	VMBUS_CHANNEL			*Channel,
 	UINT32					SendRingBufferSize,
@@ -73,12 +73,12 @@ VmbusChannelOpen(
 	PVOID					Context
 	);
 
-INTERNAL void
+static void
 VmbusChannelClose(
 	VMBUS_CHANNEL		*Channel
 	);
 
-INTERNAL int
+static int
 VmbusChannelSendPacket(
 	VMBUS_CHANNEL		*Channel,
 	const PVOID			Buffer,
@@ -88,7 +88,7 @@ VmbusChannelSendPacket(
 	UINT32				Flags
 );
 
-INTERNAL int
+static int
 VmbusChannelSendPacketPageBuffer(
 	VMBUS_CHANNEL		*Channel,
 	PAGE_BUFFER			PageBuffers[],
@@ -98,7 +98,7 @@ VmbusChannelSendPacketPageBuffer(
 	UINT64				RequestId
 	);
 
-INTERNAL int
+static int
 VmbusChannelSendPacketMultiPageBuffer(
 	VMBUS_CHANNEL		*Channel,
 	MULTIPAGE_BUFFER	*MultiPageBuffer,
@@ -107,7 +107,7 @@ VmbusChannelSendPacketMultiPageBuffer(
 	UINT64				RequestId
 );
 
-INTERNAL int
+static int
 VmbusChannelEstablishGpadl(
 	VMBUS_CHANNEL		*Channel,
 	PVOID				Kbuffer,	// from kmalloc()
@@ -115,13 +115,13 @@ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The VOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c      |    2 +-
 drivers/staging/hv/ChannelMgmt.c  |    6 +++---
 drivers/staging/hv/ChannelMgmt.h  |    2 +-
 drivers/staging/hv/Connection.c   |    6 +++---
 drivers/staging/hv/Hv.c           |    4 ++--
 drivers/staging/hv/Hv.h           |   12 ++++++------
 drivers/staging/hv/RingBuffer.c   |    2 +-
 drivers/staging/hv/RndisFilter.c  |    4 ++--
 drivers/staging/hv/VmbusPrivate.h |   16 ++++++++--------
 drivers/staging/hv/include/List.h |   14 +++++++-------
 drivers/staging/hv/include/osd.h  |    3 +--
 drivers/staging/hv/osd.c          |    8 ++++----
 12 files changed, 39 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index e3dba14..07fb5c7 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -677,7 +677,7 @@ Description:
 	Close the specified channel
 
 --*/
-VOID
+void
 VmbusChannelClose(
 	VMBUS_CHANNEL	*Channel
 	)
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 73d47ba..9d8f4ef 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -672,7 +672,7 @@ Description:
 	This is invoked in the vmbus worker thread context.
 
 --*/
-VOID
+void
 VmbusOnChannelMessage(
 	void *Context
 	)
@@ -722,7 +722,7 @@ Description:
 --*/
 int
 VmbusChannelRequestOffers(
-	VOID
+	void
 	)
 {
 	int ret=0;
@@ -785,7 +785,7 @@ Description:
 --*/
 void
 VmbusChannelReleaseUnattachedChannels(
-	VOID
+	void
 	)
 {
 	LIST_ENTRY *entry;
diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 6d2805e..511b80f 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -59,7 +59,7 @@ typedef struct _VMBUS_CHANNEL {
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The UINT8 and INT8 typedefs are now removed from the Hyper-V driver
code.

Had to include <linux/kernel.h> in a few places to get the
build to work properly as well.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c                    |    2 +-
 drivers/staging/hv/Channel.c                   |    6 +++---
 drivers/staging/hv/ChannelMgmt.c               |    4 ++--
 drivers/staging/hv/ChannelMgmt.h               |    4 ++--
 drivers/staging/hv/NetVsc.c                    |    1 +
 drivers/staging/hv/RingBuffer.h                |    4 ++--
 drivers/staging/hv/RndisFilter.c               |    1 +
 drivers/staging/hv/StorVsc.c                   |    1 +
 drivers/staging/hv/Vmbus.c                     |    2 +-
 drivers/staging/hv/include/ChannelMessages.h   |    2 +-
 drivers/staging/hv/include/HvSynicApi.h        |   14 +++++++-------
 drivers/staging/hv/include/StorVscApi.h        |    2 +-
 drivers/staging/hv/include/VmbusPacketFormat.h |    6 +++---
 drivers/staging/hv/include/osd.h               |    2 --
 14 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index be53e65..dc38232 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -20,7 +20,7 @@
  *
  */
 
-
+#include <linux/kernel.h>
 #include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 07fb5c7..04268b8 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -21,7 +21,7 @@
  *
  */
 
-
+#include <linux/kernel.h>
 #include "include/osd.h"
 #include "include/logging.h"
 
@@ -162,8 +162,8 @@ VmbusChannelGetDebugInfo(
 	)
 {
 	HV_MONITOR_PAGE *monitorPage;
-    UINT8 monitorGroup    = (UINT8)Channel->OfferMsg.MonitorId / 32;
-    UINT8 monitorOffset   = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The UINT16 and INT16 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c                       |    6 +++---
 drivers/staging/hv/Channel.h                       |   16 ++++++++--------
 drivers/staging/hv/include/ChannelMessages.h       |    4 ++--
 drivers/staging/hv/include/HvHcApi.h               |    4 ++--
 drivers/staging/hv/include/HvStatus.h              |    2 +-
 drivers/staging/hv/include/HvSynicApi.h            |   10 +++++-----
 drivers/staging/hv/include/VmbusChannelInterface.h |    4 ++--
 drivers/staging/hv/include/VmbusPacketFormat.h     |   14 +++++++-------
 drivers/staging/hv/include/nvspprotocol.h          |    8 ++++----
 drivers/staging/hv/include/osd.h                   |    2 --
 10 files changed, 34 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 04268b8..17c505d 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -777,7 +777,7 @@ VmbusChannelSendPacket(
 	desc.Type = Type;//VmbusPacketTypeDataInBand;
 	desc.Flags = Flags;//VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
     desc.DataOffset8 = sizeof(VMPACKET_DESCRIPTOR) >> 3; // in 8-bytes granularity
-    desc.Length8 = (UINT16)(packetLenAligned >> 3);
+    desc.Length8 = (u16)(packetLenAligned >> 3);
     desc.TransactionId = RequestId;
 
 	bufferList[0].Data = &desc;
@@ -851,7 +851,7 @@ VmbusChannelSendPacketPageBuffer(
 	desc.Type = VmbusPacketTypeDataUsingGpaDirect;
 	desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
     desc.DataOffset8 = descSize >> 3; // in 8-bytes grandularity
-    desc.Length8 = (UINT16)(packetLenAligned >> 3);
+    desc.Length8 = (u16)(packetLenAligned >> 3);
     desc.TransactionId = RequestId;
 	desc.RangeCount = PageCount;
 
@@ -936,7 +936,7 @@ VmbusChannelSendPacketMultiPageBuffer(
 	desc.Type ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The USHORT typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h      |    1 -
 drivers/staging/hv/include/vstorage.h |    8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 4e54f66..48d8c49 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -100,7 +100,6 @@ typedef struct _DLIST_ENTRY {
 
 typedef unsigned long long	ULONGLONG;
 typedef unsigned int		ULONG;
-typedef unsigned short		USHORT;
 
 //
 // signed types
diff --git a/drivers/staging/hv/include/vstorage.h b/drivers/staging/hv/include/vstorage.h
index 442c8c3..680788b 100644
--- a/drivers/staging/hv/include/vstorage.h
+++ b/drivers/staging/hv/include/vstorage.h
@@ -141,7 +141,7 @@ C_ASSERT(SENSE_BUFFER_SIZE == 0x12);
 
 typedef struct
 {
-    USHORT Length;
+    unsigned short Length;
     unsigned char SrbStatus;
     unsigned char ScsiStatus;
 
@@ -178,7 +178,7 @@ C_ASSERT((sizeof(VMSCSI_REQUEST) % 4) == 0);
 
 typedef struct
 {
-    USHORT ProtocolVersion;
+    unsigned short ProtocolVersion;
     unsigned char  PathId;
     unsigned char  TargetId;
 
@@ -213,7 +213,7 @@ typedef struct
     // Major (MSW) and minor (LSW) version numbers.
     //
 
-    USHORT MajorMinor;
+    unsigned short MajorMinor;
 
 
     //
@@ -222,7 +222,7 @@ typedef struct
     // indicate incompatibility--but it does indicate mismatched builds.
     //
 
-    USHORT Revision;
+    unsigned short Revision;
 
 } VMSTORAGE_PROTOCOL_VERSION, *PVMSTORAGE_PROTOCOL_VERSION;
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The ULONGLONG and LONGLONG typedefs are now removed from the Hyper-V
driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/VmbusPacketFormat.h |    2 +-
 drivers/staging/hv/include/osd.h               |    3 ---
 drivers/staging/hv/include/vstorage.h          |    2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/include/VmbusPacketFormat.h b/drivers/staging/hv/include/VmbusPacketFormat.h
index 78c4ca0..04c3a02 100644
--- a/drivers/staging/hv/include/VmbusPacketFormat.h
+++ b/drivers/staging/hv/include/VmbusPacketFormat.h
@@ -44,7 +44,7 @@ typedef struct
             volatile u32  In;        // Offset in bytes from the ring base
             volatile u32  Out;       // Offset in bytes from the ring base
         };
-        volatile LONGLONG    InOut;
+        volatile long long InOut;
     };
 
     //
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 48d8c49..3090354 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -97,15 +97,12 @@ typedef struct _DLIST_ENTRY {
 //
 // unsigned types
 //
-
-typedef unsigned long long	ULONGLONG;
 typedef unsigned int		ULONG;
 
 //
 // signed types
 //
 typedef int					LONG;
-typedef long long			LONGLONG;
 
 //
 // Other types
diff --git a/drivers/staging/hv/include/vstorage.h b/drivers/staging/hv/include/vstorage.h
index 680788b..9b6d3a1 100644
--- a/drivers/staging/hv/include/vstorage.h
+++ b/drivers/staging/hv/include/vstorage.h
@@ -196,7 +196,7 @@ typedef struct
     //  vendor specific data in the inquirydata
     //
 
-    ULONGLONG UniqueId;
+    unsigned long long UniqueId;
 
 } VMSTORAGE_CHANNEL_PROPERTIES, *PVMSTORAGE_CHANNEL_PROPERTIES;
 
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The ULONG_PTR typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    4 ++--
 drivers/staging/hv/Connection.c  |    8 ++++----
 drivers/staging/hv/Hv.c          |    8 ++++----
 drivers/staging/hv/NetVsc.c      |   34 +++++++++++++++++-----------------
 drivers/staging/hv/RndisFilter.c |   16 ++++++++--------
 drivers/staging/hv/StorVsc.c     |   16 ++++++++--------
 drivers/staging/hv/include/osd.h |    8 +++-----
 drivers/staging/hv/netvsc_drv.c  |    4 ++--
 drivers/staging/hv/osd.c         |    8 ++++----
 9 files changed, 52 insertions(+), 54 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index fd063da..c16f67c 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -228,9 +228,9 @@ VmbusChannelOpen(
 	out = PageAlloc((SendRingBufferSize + RecvRingBufferSize) >> PAGE_SHIFT);
 	//out = MemAllocZeroed(sendRingBufferSize + recvRingBufferSize);
 	ASSERT(out);
-	ASSERT(((ULONG_PTR)out & (PAGE_SIZE-1)) == 0);
+	ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0);
 
-	in = (void*)((ULONG_PTR)out + SendRingBufferSize);
+	in = (void*)((unsigned long)out + SendRingBufferSize);
 
 	NewChannel->RingBufferPages = out;
 	NewChannel->RingBufferPageCount = (SendRingBufferSize + RecvRingBufferSize) >> PAGE_SHIFT;
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 0e9f0d7..7d8e47e 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -79,7 +79,7 @@ VmbusConnect(
 	}
 
 	gVmbusConnection.RecvInterruptPage = gVmbusConnection.InterruptPage;
-	gVmbusConnection.SendInterruptPage = (void*)((ULONG_PTR)gVmbusConnection.InterruptPage + (PAGE_SIZE >> 1));
+	gVmbusConnection.SendInterruptPage = (void*)((unsigned long)gVmbusConnection.InterruptPage + (PAGE_SIZE >> 1));
 
 	// Setup the ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The ULONG and LONG typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c            |    2 +-
 drivers/staging/hv/include/StorVscApi.h |    2 +-
 drivers/staging/hv/include/osd.h        |   10 ----------
 drivers/staging/hv/include/vstorage.h   |   12 ++++++------
 4 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 370162b..9cbd064 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -62,7 +62,7 @@ typedef struct _STORVSC_DEVICE{
 
 	//  Each unique Port/Path/Target represents 1 channel ie scsi controller. In reality, the pathid, targetid is always 0
 	// and the port is set by us
-	ULONG						PortNumber;
+	unsigned int						PortNumber;
     unsigned char						PathId;
     unsigned char						TargetId;
 
diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h
index 4df77da..f50fee7 100644
--- a/drivers/staging/hv/include/StorVscApi.h
+++ b/drivers/staging/hv/include/StorVscApi.h
@@ -117,7 +117,7 @@ typedef struct _STORVSC_DRIVER_OBJECT {
 } STORVSC_DRIVER_OBJECT;
 
 typedef struct _STORVSC_DEVICE_INFO {
-	ULONG	PortNumber;
+	unsigned int	PortNumber;
     unsigned char	PathId;
     unsigned char	TargetId;
 } STORVSC_DEVICE_INFO;
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index e06f455..366e890 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -95,16 +95,6 @@ typedef struct _DLIST_ENTRY {
 } DLIST_ENTRY;
 
 //
-// unsigned types
-//
-typedef unsigned int		ULONG;
-
-//
-// signed types
-//
-typedef int					LONG;
-
-//
 // Other types
 //
 typedef unsigned long		SIZE_T;
diff --git a/drivers/staging/hv/include/vstorage.h b/drivers/staging/hv/include/vstorage.h
index ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The SIZE_T typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Connection.c   |    2 +-
 drivers/staging/hv/Hv.c           |    2 +-
 drivers/staging/hv/Hv.h           |    2 +-
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 drivers/staging/hv/include/osd.h  |    3 +--
 drivers/staging/hv/osd.c          |    2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 7d8e47e..d5815f9 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -386,7 +386,7 @@ Description:
 int
 VmbusPostMessage(
 	void *			buffer,
-	SIZE_T			bufferLen
+	size_t			bufferLen
 	)
 {
 	int ret=0;
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 5862575..0e73977 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -397,7 +397,7 @@ HvPostMessage(
 	HV_CONNECTION_ID connectionId,
 	HV_MESSAGE_TYPE  messageType,
 	void *            payload,
-	SIZE_T           payloadSize
+	size_t           payloadSize
 	)
 {
 	struct alignedInput {
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index a3c76e2..bb70724 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -163,7 +163,7 @@ HvPostMessage(
 	HV_CONNECTION_ID connectionId,
 	HV_MESSAGE_TYPE  messageType,
 	void *            payload,
-	SIZE_T           payloadSize
+	size_t           payloadSize
 	);
 
 static HV_STATUS
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index 383ab32..671a1e1 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -149,7 +149,7 @@ VmbusDisconnect(
 static int
 VmbusPostMessage(
 	void *			buffer,
-	SIZE_T			bufSize
+	size_t			bufSize
 	);
 
 static int
diff --git a/drivers/staging/hv/include/osd.h ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

No one was even using them...

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 3917390..d1c8a42 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -101,8 +101,6 @@ typedef struct _DLIST_ENTRY {
 typedef unsigned char		BOOL;
 typedef unsigned char		BOOLEAN;
 typedef void*				HANDLE;
-typedef u32				DWORD;
-typedef unsigned char		BYTE;
 
 typedef struct {
 	unsigned char	Data[16];
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The BOOL and BOOLEAN typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c               |    2 +-
 drivers/staging/hv/Hv.h                        |    2 +-
 drivers/staging/hv/NetVsc.c                    |    2 +-
 drivers/staging/hv/RndisFilter.c               |    2 +-
 drivers/staging/hv/include/ChannelMessages.h   |    6 +++---
 drivers/staging/hv/include/List.h              |    2 +-
 drivers/staging/hv/include/NetVscApi.h         |    4 ++--
 drivers/staging/hv/include/VmbusPacketFormat.h |    2 +-
 drivers/staging/hv/include/osd.h               |    2 --
 9 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 68f2580..b10db08 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -240,7 +240,7 @@ VmbusChannelProcessOffer(
 	VMBUS_CHANNEL* newChannel=(VMBUS_CHANNEL*)context;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
-	BOOL fNew=TRUE;
+	bool fNew=TRUE;
 	VMBUS_CHANNEL* channel;
 
 	DPRINT_ENTER(VMBUS);
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index bb70724..dbe9bb8 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -113,7 +113,7 @@ typedef struct {
 	u64	GuestId;			// XenLinux or native Linux. If XenLinux, the hypercall and synic pages has already been initialized
 	void*	HypercallPage;
 
-	BOOL	SynICInitialized;
+	bool	SynICInitialized;
 	// This is used as an input param to HvCallSignalEvent hypercall. The input param is immutable
 	// in our usage and must be dynamic mem (vs stack or global).
 	HV_INPUT_SIGNAL_EVENT_BUFFER *SignalEventBuffer;
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 8515bcd..ba83b2c 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -1344,7 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Remove the unneeded #defines from osd.c

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/osd.c |   42 ------------------------------------------
 1 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index f857cfd..91668df 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -21,15 +21,12 @@
  *
  */
 
-#define KERNEL_2_6_27
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/vmalloc.h>
-//#include <linux/config.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
@@ -86,20 +83,11 @@ typedef struct _WORKITEM {
 
 void LogMsg(const char *fmt, ...)
 {
-#ifdef KERNEL_2_6_5
-	char buf[1024];
-#endif
 	va_list args;
 
 	va_start(args, fmt);
-#ifdef KERNEL_2_6_5
-	vsnprintf(buf, 1024, fmt, args);
-	va_end(args);
-	printk(buf);
-#else
 	vprintk(fmt, args);
 	va_end(args);
-#endif
 }
 
 void BitSet(unsigned int* addr, int bit)
@@ -130,30 +118,12 @@ int BitTestAndSet(unsigned int* addr, int bit)
 
 int InterlockedIncrement(int *val)
 {
-#ifdef KERNEL_2_6_5
-	int i;
-	local_irq_disable();
-	i = atomic_read((atomic_t*)val);
-	atomic_set((atomic_t*)val, i+1);
-	local_irq_enable();
-	return i+1;
-#else
 	return atomic_inc_return((atomic_t*)val);
-#endif
 }
 
 int InterlockedDecrement(int *val)
 {
-#ifdef KERNEL_2_6_5
-	int i;
-	local_irq_disable();
-	i = atomic_read((atomic_t*)val);
-	atomic_set((atomic_t*)val, i-1);
-	local_irq_enable();
-	return i-1;
-#else
 	return atomic_dec_return((atomic_t*)val);
-#endif
 }
 
 #ifndef atomic_cmpxchg
@@ -428,11 +398,7 @@ unsigned long Virtual2Physical(void * VirtAddr)
 	return pfn << PAGE_SHIFT;
 }
 
-#ifdef KERNEL_2_6_27
 void WorkItemCallback(struct work_struct *work)
-#else
-void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The kernel has the "correct" min() and max() functions, so use those.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h |    3 ---
 drivers/staging/hv/storvsc_drv.c |    4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 1a9e4de..dfc20c3 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -67,9 +67,6 @@
 #define ALIGN_DOWN(value, align)		( (value) & ~(align-1) )
 #define NUM_PAGES_SPANNED(addr, len)	( (ALIGN_UP(addr+len, PAGE_SIZE) - ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
 
-#define MIN(a, b)       ((a) < (b)? (a): (b))
-#define MAX(a, b)       ((a) > (b)? (a): (b))
-
 #define LOWORD(dw)		((unsigned short) (dw))
 #define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
 
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 1a05134..3547c03 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -623,7 +623,7 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl, struct s
 			dest = bounce_addr + bounce_sgl[j].length;
 			destlen = PAGE_SIZE - bounce_sgl[j].length;
 
-			copylen = MIN(srclen, destlen);
+			copylen = min(srclen, destlen);
 			memcpy((void*)dest, (void*)src, copylen);
 
 			total_copied += copylen;
@@ -698,7 +698,7 @@ static unsigned int copy_from_bounce_buffer(struct scatterlist *orig_sgl, struct
 			src = bounce_addr + bounce_sgl[j].offset;
 			srclen = bounce_sgl[j].length - bounce_sgl[j].offset;
 
-			copylen = MIN(srclen, destlen);
+			copylen = min(srclen, destlen);
 			memcpy((void*)dest, (void*)src, copylen);
 
 			total_copied += copylen;
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

The kernel provides all of this, and actually gets it correct, so don't
try to redefine these types of things.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c      |    1 +
 drivers/staging/hv/NetVsc.c      |    1 +
 drivers/staging/hv/RndisFilter.c |    1 +
 drivers/staging/hv/StorVsc.c     |    2 ++
 drivers/staging/hv/Vmbus.c       |    1 +
 drivers/staging/hv/include/osd.h |   28 ----------------------------
 6 files changed, 6 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index fe5edaf..dc91aae 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -21,6 +21,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index ba83b2c..ca0348a 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -23,6 +23,7 @@
 #define KERNEL_2_6_27
 
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 7478fdb..92fc052 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -24,6 +24,7 @@
 #define KERNEL_2_6_27
 
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include "include/logging.h"
 
 #include "include/NetVscApi.h"
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 9cbd064..2d7f2ca 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -24,6 +24,8 @@
 #define KERNEL_2_6_27
 
 #include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/mm.h>
 #include "include/logging.h"
 
 #include "include/StorVscApi.h"
diff --git ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Use the correct __attribute__((packed)) one if it's really needed.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RingBuffer.h  |    2 +-
 drivers/staging/hv/include/osd.h |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/RingBuffer.h b/drivers/staging/hv/RingBuffer.h
index c5ecf41..ba2d8a9 100644
--- a/drivers/staging/hv/RingBuffer.h
+++ b/drivers/staging/hv/RingBuffer.h
@@ -43,7 +43,7 @@ typedef struct _RING_BUFFER {
 	// volatile u32 InterruptMask;
 	// Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!!
     u8		Buffer[0];
-} STRUCT_PACKED RING_BUFFER;
+} __attribute__((packed)) RING_BUFFER;
 
 typedef struct _RING_BUFFER_INFO {
     RING_BUFFER*	RingBuffer;
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index fa0ae8c..5bb72bc 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -30,9 +30,6 @@
 //
 
 
-#define STRUCT_PACKED		__attribute__((__packed__))
-#define STRUCT_ALIGNED(x)	__attribute__((__aligned__(x)))
-
 #define UNUSED_VAR(v)		v  __attribute__((__unused__))
 
 #define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

This isn't needed at all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h |    2 --
 drivers/staging/hv/netvsc_drv.c  |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 5bb72bc..18f5233 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -30,8 +30,6 @@
 //
 
 
-#define UNUSED_VAR(v)		v  __attribute__((__unused__))
-
 #define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
 #define ALIGN_DOWN(value, align)		( (value) & ~(align-1) )
 #define NUM_PAGES_SPANNED(addr, len)	( (ALIGN_UP(addr+len, PAGE_SIZE) - ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 502a4bd..54f66da 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -154,7 +154,7 @@ Desc:	Set the multicast list
 
 Remark:	No-op here
 --*/
-static void netvsc_set_multicast_list(UNUSED_VAR(struct net_device *net))
+static void netvsc_set_multicast_list(struct net_device *net)
 {
 }
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

This isn't needed, or even used, at all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/VmbusChannelInterface.h |    9 ---------
 drivers/staging/hv/include/osd.h                   |    2 --
 2 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/hv/include/VmbusChannelInterface.h b/drivers/staging/hv/include/VmbusChannelInterface.h
index c334b88..ead74f2 100644
--- a/drivers/staging/hv/include/VmbusChannelInterface.h
+++ b/drivers/staging/hv/include/VmbusChannelInterface.h
@@ -98,15 +98,6 @@ typedef struct
 #pragma pack(pop)
 
 
-//
-// Verify the MAX_PIPE_USER_DEFINED_BYTES value.
-//
-//C_ASSERT(MAX_PIPE_USER_DEFINED_BYTES ==
-//         MAX_USER_DEFINED_BYTES -
-//         (FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Pipe.UserDefined) -
-//          FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined)));
-//
-
 typedef u32 GPADL_HANDLE;
 
 //
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 18f5233..ba44e68 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -37,8 +37,6 @@
 #define LOWORD(dw)		((unsigned short) (dw))
 #define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
 
-#define FIELD_OFFSET(t, f)    ((unsigned int)(unsigned long)&(((t *)0)->f))
-
 #ifdef FALSE
 #undef FALSE
 #endif
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Don't define things that are either already provided (like NULL), or you
shouldn't use (like TRUE and FALSE).

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |    4 ++--
 drivers/staging/hv/Hv.c          |    8 ++++----
 drivers/staging/hv/NetVsc.c      |    4 ++--
 drivers/staging/hv/RndisFilter.c |   10 +++++-----
 drivers/staging/hv/include/osd.h |   14 --------------
 5 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index b10db08..ff9c9d0 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -240,7 +240,7 @@ VmbusChannelProcessOffer(
 	VMBUS_CHANNEL* newChannel=(VMBUS_CHANNEL*)context;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
-	bool fNew=TRUE;
+	bool fNew = true;
 	VMBUS_CHANNEL* channel;
 
 	DPRINT_ENTER(VMBUS);
@@ -255,7 +255,7 @@ VmbusChannelProcessOffer(
 		if (!memcmp(&channel->OfferMsg.Offer.InterfaceType, &newChannel->OfferMsg.Offer.InterfaceType,sizeof(GUID)) &&
 			!memcmp(&channel->OfferMsg.Offer.InterfaceInstance, &newChannel->OfferMsg.Offer.InterfaceInstance, sizeof(GUID)))
 		{
-			fNew = FALSE;
+			fNew = false;
 			break;
 		}
 	}
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 0e73977..0e543ee 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -31,7 +31,7 @@
 
 // The one and only
 HV_CONTEXT gHvContext={
-	.SynICInitialized = FALSE,
+	.SynICInitialized = false,
 	.HypercallPage = NULL,
 	.SignalEventParam = NULL,
 	.SignalEventBuffer = NULL,
@@ -571,8 +571,8 @@ HvSynicInit (
 
 	sharedSint.AsUINT64 = 0;
     sharedSint.Vector = irqVector; //HV_SHARED_SINT_IDT_VECTOR + 0x20;
-    sharedSint.Masked = FALSE;
-    sharedSint.AutoEoi = TRUE;
+    sharedSint.Masked = false;
+    sharedSint.AutoEoi = true;
 
 	DPRINT_DBG(VMBUS, "HV_X64_MSR_SINT1 msr set to: ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    9 +++------
 drivers/staging/hv/ChannelMgmt.c |    3 +--
 drivers/staging/hv/Hv.c          |    2 +-
 drivers/staging/hv/NetVsc.c      |    2 +-
 drivers/staging/hv/RndisFilter.c |    1 -
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    5 -----
 7 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index c16f67c..8d3bc9a 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -260,8 +260,7 @@ VmbusChannelOpen(
 		SendRingBufferSize);
 
 	// Create and init the channel open message
-	openInfo =
-		(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL));
+	openInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
 	ASSERT(openInfo != NULL);
 
 	openInfo->WaitEvent = WaitEventCreate();
@@ -630,8 +629,7 @@ VmbusChannelTeardownGpadl(
 
 	ASSERT(GpadlHandle != 0);
 
-	info =
-		(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN));
+	info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN), GFP_KERNEL);
 	ASSERT(info != NULL);
 
 	info->WaitEvent = WaitEventCreate();
@@ -693,8 +691,7 @@ VmbusChannelClose(
 	TimerStop(Channel->PollTimer);
 
 	// Send a closing message
-	info =
-		(VMBUS_CHANNEL_MSGINFO*)MemAlloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL));
+	info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL);
 	ASSERT(info != NULL);
 
 	//info->waitEvent = WaitEventCreate();
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ff9c9d0..eafc938 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Use the "real" kzalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    8 ++++----
 drivers/staging/hv/Connection.c  |    4 ++--
 drivers/staging/hv/NetVsc.c      |    4 ++--
 drivers/staging/hv/RndisFilter.c |    4 ++--
 drivers/staging/hv/StorVsc.c     |    2 +-
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    7 -------
 7 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 8d3bc9a..9818ecb 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -226,7 +226,7 @@ VmbusChannelOpen(
 
 	// Allocate the ring buffer
 	out = PageAlloc((SendRingBufferSize + RecvRingBufferSize) >> PAGE_SHIFT);
-	//out = MemAllocZeroed(sendRingBufferSize + recvRingBufferSize);
+	//out = kzalloc(sendRingBufferSize + recvRingBufferSize, GFP_KERNEL);
 	ASSERT(out);
 	ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0);
 
@@ -421,7 +421,7 @@ VmbusChannelCreateGpadlHeader(
 	{
 		// fill in the header
 		msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pfnCount*sizeof(u64);
-		msgHeader =  MemAllocZeroed(msgSize);
+		msgHeader =  kzalloc(msgSize, GFP_KERNEL);
 
 		INITIALIZE_LIST_HEAD(&msgHeader->SubMsgList);
 		msgHeader->MessageSize=msgSize;
@@ -458,7 +458,7 @@ VmbusChannelCreateGpadlHeader(
 			}
 
 			msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_BODY) + pfnCurr*sizeof(u64);
-			msgBody =  MemAllocZeroed(msgSize);
+			msgBody = kzalloc(msgSize, GFP_KERNEL);
 			ASSERT(msgBody);
 			msgBody->MessageSize = msgSize;
 			(*MessageCount)++;
@@ -481,7 +481,7 @@ VmbusChannelCreateGpadlHeader(
 	{
 		// everything fits in a header
 		msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |    3 +--
 drivers/staging/hv/Hv.c          |    2 +-
 drivers/staging/hv/NetVsc.c      |    2 +-
 drivers/staging/hv/Vmbus.c       |    2 +-
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    5 -----
 6 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index eafc938..44bc61e 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -143,13 +143,12 @@ VMBUS_CHANNEL* AllocVmbusChannel(void)
 {
 	VMBUS_CHANNEL* channel;
 
-	channel = (VMBUS_CHANNEL*) MemAllocAtomic(sizeof(VMBUS_CHANNEL));
+	channel = kzalloc(sizeof(VMBUS_CHANNEL), GFP_ATOMIC);
 	if (!channel)
 	{
 		return NULL;
 	}
 
-	memset(channel, 0,sizeof(VMBUS_CHANNEL));
 	channel->InboundLock = SpinlockCreate();
 	if (!channel->InboundLock)
 	{
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 4ddaf6e..5ac9006 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -414,7 +414,7 @@ HvPostMessage(
 		return -1;
 	}
 
-	addr = (unsigned long)MemAllocAtomic(sizeof(struct alignedInput));
+	addr = (unsigned long)kmalloc(sizeof(struct alignedInput), GFP_ATOMIC);
 
 	if (!addr)
 	{
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 61132e4..3fb44cd 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -1480,7 +1480,7 @@ NetVscOnChannelCallback(
 		}
 		else if (ret == -2) // Handle large packet
 		{
-			buffer = MemAllocAtomic(bytesRecvd);
+			buffer = kmalloc(bytesRecvd, GFP_ATOMIC);
 			if (buffer == NULL)
 			{
 				// Try again next time around
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 080594d..4ad40be 100644
--- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:06 pm

Use the "real" kfree call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    8 ++++----
 drivers/staging/hv/ChannelMgmt.c |   14 +++++++-------
 drivers/staging/hv/Connection.c  |    6 +++---
 drivers/staging/hv/Hv.c          |    4 ++--
 drivers/staging/hv/NetVsc.c      |   12 ++++++------
 drivers/staging/hv/RndisFilter.c |    8 ++++----
 drivers/staging/hv/StorVsc.c     |    2 +-
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    5 -----
 9 files changed, 27 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 9818ecb..de6d2cf 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -311,7 +311,7 @@ Cleanup:
 	SpinlockRelease(gVmbusConnection.ChannelMsgLock);
 
 	WaitEventClose(openInfo->WaitEvent);
-	MemFree(openInfo);
+	kfree(openInfo);
 
 	DPRINT_EXIT(VMBUS);
 
@@ -597,7 +597,7 @@ Cleanup:
 	SpinlockRelease(gVmbusConnection.ChannelMsgLock);
 
 	WaitEventClose(msgInfo->WaitEvent);
-	MemFree(msgInfo);
+	kfree(msgInfo);
 
 	DPRINT_EXIT(VMBUS);
 
@@ -658,7 +658,7 @@ VmbusChannelTeardownGpadl(
 	SpinlockRelease(gVmbusConnection.ChannelMsgLock);
 
 	WaitEventClose(info->WaitEvent);
-	MemFree(info);
+	kfree(info);
 
 	DPRINT_EXIT(VMBUS);
 
@@ -720,7 +720,7 @@ VmbusChannelClose(
 
 	PageFree(Channel->RingBufferPages, Channel->RingBufferPageCount);
 
-	MemFree(info);
+	kfree(info);
 
 	// If we are closing the channel during an error path in opening the channel, don't free the channel
 	// since the caller will free the channel
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 44bc61e..a19ff89 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -152,7 +152,7 @@ VMBUS_CHANNEL* AllocVmbusChannel(void)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |   18 ++++++++++--------
 drivers/staging/hv/ChannelMgmt.c |   10 +---------
 drivers/staging/hv/ChannelMgmt.h |    2 +-
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index de6d2cf..757aba6 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -991,18 +991,19 @@ VmbusChannelRecvPacket(
 	u32 packetLen;
 	u32 userLen;
 	int ret;
+	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
 	*BufferActualLen = 0;
 	*RequestId = 0;
 
-	SpinlockAcquire(Channel->InboundLock);
+	spin_lock_irqsave(&Channel->inbound_lock, flags);
 
 	ret = RingBufferPeek(&Channel->Inbound, &desc, sizeof(VMPACKET_DESCRIPTOR));
 	if (ret != 0)
 	{
-		SpinlockRelease(Channel->InboundLock);
+		spin_unlock_irqrestore(&Channel->inbound_lock, flags);
 
 		//DPRINT_DBG(VMBUS, "nothing to read!!");
 		DPRINT_EXIT(VMBUS);
@@ -1026,7 +1027,7 @@ VmbusChannelRecvPacket(
 
 	if (userLen > BufferLen)
 	{
-		SpinlockRelease(Channel->InboundLock);
+		spin_unlock_irqrestore(&Channel->inbound_lock, flags);
 
 		DPRINT_ERR(VMBUS, "buffer too small - got %d needs %d", BufferLen, userLen);
 		DPRINT_EXIT(VMBUS);
@@ -1039,7 +1040,7 @@ VmbusChannelRecvPacket(
 	// Copy over the packet to the user buffer
 	ret = RingBufferRead(&Channel->Inbound, Buffer, userLen, (desc.DataOffset8 << 3));
 
-	SpinlockRelease(Channel->InboundLock);
+	spin_unlock_irqrestore(&Channel->inbound_lock, flags);
 
 	DPRINT_EXIT(VMBUS);
 
@@ -1068,18 +1069,19 @@ VmbusChannelRecvPacketRaw(
 	u32 packetLen;
 	u32 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RingBuffer.c |   24 +++++++++++++-----------
 drivers/staging/hv/RingBuffer.h |    2 +-
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index 34d4ada..21fc4cc 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -315,7 +315,7 @@ RingBufferInit(
 	RingInfo->RingSize = BufferLen;
 	RingInfo->RingDataSize = BufferLen - sizeof(RING_BUFFER);
 
-	RingInfo->RingLock = SpinlockCreate();
+	spin_lock_init(&RingInfo->ring_lock);
 
 	return 0;
 }
@@ -334,7 +334,6 @@ RingBufferCleanup(
 	RING_BUFFER_INFO* RingInfo
 	)
 {
-	SpinlockClose(RingInfo->RingLock);
 }
 
 /*++
@@ -360,6 +359,7 @@ RingBufferWrite(
 
 	volatile u32 nextWriteLocation;
 	u64 prevIndices=0;
+	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -370,7 +370,7 @@ RingBufferWrite(
 
 	totalBytesToWrite += sizeof(u64);
 
-	SpinlockAcquire(OutRingInfo->RingLock);
+	spin_lock_irqsave(&OutRingInfo->ring_lock, flags);
 
 	GetRingBufferAvailBytes(OutRingInfo, &byteAvailToRead, &byteAvailToWrite);
 
@@ -384,7 +384,7 @@ RingBufferWrite(
 	{
 		DPRINT_DBG(VMBUS, "No more space left on outbound ring buffer (needed %u, avail %u)", totalBytesToWrite, byteAvailToWrite);
 
-		SpinlockRelease(OutRingInfo->RingLock);
+		spin_unlock_irqrestore(&OutRingInfo->ring_lock, flags);
 
 		DPRINT_EXIT(VMBUS);
 
@@ -418,7 +418,7 @@ RingBufferWrite(
 
 	//DumpRingInfo(OutRingInfo, "AFTER ");
 
-	SpinlockRelease(OutRingInfo->RingLock);
+	spin_unlock_irqrestore(&OutRingInfo->ring_lock, flags);
 
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index bc5557a..9f462b9 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -54,7 +54,7 @@ typedef struct _RNDIS_DEVICE {
 	u32					LinkStatus;
 	u32					NewRequestId;
 
-	HANDLE					RequestLock;
+	spinlock_t request_lock;
 	LIST_ENTRY				RequestList;
 
 	unsigned char					HwMacAddr[HW_MACADDR_LEN];
@@ -216,12 +216,7 @@ static inline RNDIS_DEVICE* GetRndisDevice(void)
 		return NULL;
 	}
 
-	device->RequestLock = SpinlockCreate();
-	if (!device->RequestLock)
-	{
-		kfree(device);
-		return NULL;
-	}
+	spin_lock_init(&device->request_lock);
 
 	INITIALIZE_LIST_HEAD(&device->RequestList);
 
@@ -232,7 +227,6 @@ static inline RNDIS_DEVICE* GetRndisDevice(void)
 
 static inline void PutRndisDevice(RNDIS_DEVICE *Device)
 {
-	SpinlockClose(Device->RequestLock);
 	kfree(Device);
 }
 
@@ -241,6 +235,7 @@ static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageTy
 	RNDIS_REQUEST *request;
 	RNDIS_MESSAGE *rndisMessage;
 	RNDIS_SET_REQUEST *set;
+	unsigned long flags;
 
 	request = kzalloc(sizeof(RNDIS_REQUEST), GFP_KERNEL);
 	if (!request)
@@ -265,18 +260,20 @@ static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageTy
 	set->RequestId = InterlockedIncrement((int*)&Device->NewRequestId);
 
 	// Add to the request ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c |   19 +++++++++----------
 drivers/staging/hv/NetVsc.h |    2 +-
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index a915599..7a7a382 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -807,7 +807,7 @@ NetVscOnDeviceAdd(
 
 	// Initialize the NetVSC channel extension
 	netDevice->ReceiveBufferSize = NETVSC_RECEIVE_BUFFER_SIZE;
-	netDevice->ReceivePacketListLock = SpinlockCreate();
+	spin_lock_init(&netDevice->receive_packet_list_lock);
 
 	netDevice->SendBufferSize = NETVSC_SEND_BUFFER_SIZE;
 
@@ -876,8 +876,6 @@ Cleanup:
 			kfree(packet);
 		}
 
-		SpinlockClose(netDevice->ReceivePacketListLock);
-
 		ReleaseOutboundNetDevice(Device);
 		ReleaseInboundNetDevice(Device);
 
@@ -952,7 +950,6 @@ NetVscOnDeviceRemove(
 		kfree(netvscPacket);
 	}
 
-	SpinlockClose(netDevice->ReceivePacketListLock);
 	WaitEventClose(netDevice->ChannelInitEvent);
 	FreeNetDevice(netDevice);
 
@@ -1118,6 +1115,7 @@ NetVscOnReceive(
 
 	int i=0, j=0;
 	int count=0, bytesRemain=0;
+	unsigned long flags;
 
 	DPRINT_ENTER(NETVSC);
 
@@ -1164,7 +1162,7 @@ NetVscOnReceive(
 
 	// Grab free packets (range count + 1) to represent this xfer page packet. +1 to represent
 	// the xfer page packet itself. We grab it here so that we know exactly how many we can fulfil
-	SpinlockAcquire(netDevice->ReceivePacketListLock);
+	spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
 	while (!IsListEmpty(&netDevice->ReceivePacketList))
 	{
 		entry = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c      |   27 +++++++++++++++------------
 drivers/staging/hv/ChannelMgmt.c  |   20 ++++++++++++--------
 drivers/staging/hv/Connection.c   |   10 ++++------
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 4 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 757aba6..3f48ac7 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -214,6 +214,7 @@ VmbusChannelOpen(
 	VMBUS_CHANNEL_OPEN_CHANNEL* openMsg;
 	VMBUS_CHANNEL_MSGINFO* openInfo;
 	void *in, *out;
+	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -280,9 +281,9 @@ VmbusChannelOpen(
 		memcpy(openMsg->UserData, UserData, UserDataLen);
 	}
 
-	SpinlockAcquire(gVmbusConnection.ChannelMsgLock);
+	spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
 	INSERT_TAIL_LIST(&gVmbusConnection.ChannelMsgList, &openInfo->MsgListEntry);
-	SpinlockRelease(gVmbusConnection.ChannelMsgLock);
+	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
 	DPRINT_DBG(VMBUS, "Sending channel open msg...");
 
@@ -306,9 +307,9 @@ VmbusChannelOpen(
 	}
 
 Cleanup:
-	SpinlockAcquire(gVmbusConnection.ChannelMsgLock);
+	spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
 	REMOVE_ENTRY_LIST(&openInfo->MsgListEntry);
-	SpinlockRelease(gVmbusConnection.ChannelMsgLock);
+	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
 	WaitEventClose(openInfo->WaitEvent);
 	kfree(openInfo);
@@ -531,6 +532,7 @@ VmbusChannelEstablishGpadl(
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
 	u32 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c      |    5 +++--
 drivers/staging/hv/ChannelMgmt.c  |   14 ++++++++------
 drivers/staging/hv/Connection.c   |    8 ++++----
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 4 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 3f48ac7..196c7a6 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -686,6 +686,7 @@ VmbusChannelClose(
 	int ret=0;
 	VMBUS_CHANNEL_CLOSE_CHANNEL* msg;
 	VMBUS_CHANNEL_MSGINFO* info;
+	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -729,9 +730,9 @@ VmbusChannelClose(
 	// since the caller will free the channel
 	if (Channel->State == CHANNEL_OPEN_STATE)
 	{
-		SpinlockAcquire(gVmbusConnection.ChannelLock);
+		spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
 		REMOVE_ENTRY_LIST(&Channel->ListEntry);
-		SpinlockRelease(gVmbusConnection.ChannelLock);
+		spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
 
 		FreeVmbusChannel(Channel);
 	}
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ddc7918..00b4ace 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -233,11 +233,12 @@ VmbusChannelProcessOffer(
 	LIST_ENTRY* curr;
 	bool fNew = true;
 	VMBUS_CHANNEL* channel;
+	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
 	// Make sure this is a new offer
-	SpinlockAcquire(gVmbusConnection.ChannelLock);
+	spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
 
 	ITERATE_LIST_ENTRIES(anchor, curr, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Use the "real" udelay call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c      |    9 +++++----
 drivers/staging/hv/StorVsc.c     |    7 ++++---
 drivers/staging/hv/include/osd.h |    2 --
 drivers/staging/hv/osd.c         |    5 -----
 4 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 7a7a382..3039812 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -24,6 +24,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/delay.h>
 #include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
@@ -200,7 +201,7 @@ static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device)
 	// Busy wait until the ref drop to 2, then set it to 1
 	while (InterlockedCompareExchange(&netDevice->RefCount, 1, 2) != 2)
 	{
-		Sleep(100);
+		udelay(100);
 	}
 
 	return netDevice;
@@ -217,7 +218,7 @@ static inline NETVSC_DEVICE* ReleaseInboundNetDevice(DEVICE_OBJECT *Device)
 	// Busy wait until the ref drop to 1, then set it to 0
 	while (InterlockedCompareExchange(&netDevice->RefCount, 0, 1) != 1)
 	{
-		Sleep(100);
+		udelay(100);
 	}
 
 	Device->Extension = NULL;
@@ -923,7 +924,7 @@ NetVscOnDeviceRemove(
 	{
 		DPRINT_INFO(NETVSC, "waiting for %d requests to complete...", netDevice->NumOutstandingSends);
 
-		Sleep(100);
+		udelay(100);
 	}
 
 	DPRINT_INFO(NETVSC, "Disconnecting from netvsp...");
@@ -1318,7 +1319,7 @@ retry_send_cmplt:
 
 		if (retries < 4)
 		{
-			Sleep(100);
+			udelay(100);
 			goto retry_send_cmplt;
 		}
 		else
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 2cf4963..e15f570 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -26,6 +26,7 @@
 #include <linux/kernel.h>
 #include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Now that there are no users of the wrapper functions for spinlocks,
remove them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h |    5 -----
 drivers/staging/hv/osd.c         |   37 -------------------------------------
 2 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 1ec7609..d6568f5 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -137,11 +137,6 @@ extern int	WaitEventWait(HANDLE hWait);
 // If >0, hWait got signaled. If ==0, timeout. If < 0, error
 extern int	WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs);
 
-extern HANDLE SpinlockCreate(void);
-extern void SpinlockClose(HANDLE hSpin);
-extern void SpinlockAcquire(HANDLE hSpin);
-extern void	SpinlockRelease(HANDLE hSpin);
-
 
 #define GetVirtualAddress Physical2LogicalAddr
 void* Physical2LogicalAddr(unsigned long PhysAddr);
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index cdd5300..2740827 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -61,11 +61,6 @@ typedef struct _WAITEVENT {
 	wait_queue_head_t event;
 } WAITEVENT;
 
-typedef struct _SPINLOCK {
-	spinlock_t		lock;
-	unsigned long	flags;
-} SPINLOCK;
-
 typedef struct _WORKQUEUE {
 	struct workqueue_struct *queue;
 } WORKQUEUE;
@@ -323,38 +318,6 @@ int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs)
 	return ret;
 }
 
-HANDLE SpinlockCreate(void)
-{
-	SPINLOCK* spin = kmalloc(sizeof(SPINLOCK), GFP_KERNEL);
-	if (!spin)
-	{
-		return NULL;
-	}
-	spin_lock_init(&spin->lock);
-
-	return spin;
-}
-
-void SpinlockAcquire(HANDLE hSpin)
-{
-	SPINLOCK* spin = (SPINLOCK* )hSpin;
-
-	spin_lock_irqsave(&spin->lock, spin->flags);
-}
-
-void SpinlockRelease(HANDLE hSpin)
-{
-	SPINLOCK* spin = (SPINLOCK* )hSpin;
-
-	spin_unlock_irqrestore(&spin->lock, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Use the "real" mb call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RingBuffer.c  |    4 ++--
 drivers/staging/hv/Vmbus.c       |    2 +-
 drivers/staging/hv/include/osd.h |    2 --
 drivers/staging/hv/osd.c         |    5 -----
 4 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index 21fc4cc..e995468 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -411,7 +411,7 @@ RingBufferWrite(
 												sizeof(u64));
 
 	// Make sure we flush all writes before updating the writeIndex
-	MemoryFence();
+	mb();
 
 	// Now, update the write location
 	SetNextWriteLocation(OutRingInfo, nextWriteLocation);
@@ -532,7 +532,7 @@ RingBufferRead(
 
 	// Make sure all reads are done before we update the read index since
 	// the writer may start writing to the read area once the read index is updated
-	MemoryFence();
+	mb();
 
 	// Update the read index
 	SetNextReadLocation(InRingInfo, nextReadLocation);
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 4ad40be..72bb08f 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -426,7 +426,7 @@ VmbusOnMsgDPC(
 		// Make sure the write to MessageType (ie set to HvMessageTypeNone) happens
 		// before we read the MessagePending and EOMing. Otherwise, the EOMing will not deliver
 		// any more messages since there is no empty slot
-		MemoryFence();
+		mb();
 
 		if (msg->Header.MessageFlags.MessagePending)
 		{
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 504d585..467196d 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -119,8 +119,6 @@ extern void PageFree(void* page, unsigned int count);
 extern void* MemMapIO(unsigned long phys, unsigned long ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Use the "real" printk call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/logging.h |   54 +++++++++++++++++++--------------
 drivers/staging/hv/include/osd.h     |    2 -
 drivers/staging/hv/osd.c             |   13 --------
 3 files changed, 31 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/hv/include/logging.h b/drivers/staging/hv/include/logging.h
index c36eaf8..54af17a 100644
--- a/drivers/staging/hv/include/logging.h
+++ b/drivers/staging/hv/include/logging.h
@@ -53,11 +53,10 @@
 							BLKVSC_DRV)
 
 // Logging Level
-#define CRITICAL_LVL				2
-#define ERROR_LVL					3
-#define WARNING_LVL					4
-#define INFO_LVL					6
-#define DEBUG_LVL					7
+#define ERROR_LVL				3
+#define WARNING_LVL				4
+#define INFO_LVL				6
+#define DEBUG_LVL				7
 #define DEBUG_LVL_ENTEREXIT			8
 #define DEBUG_RING_LVL				9
 
@@ -65,44 +64,53 @@ extern unsigned int vmbus_loglevel;
 
 #define ASSERT(expr)	\
         if (!(expr)) {	\
-		LogMsg("<%d>Assertion failed! %s,%s,%s,line=%d\n", CRITICAL_LVL, #expr,__FILE__,__FUNCTION__,__LINE__);	\
+		printk(KERN_CRIT "Assertion failed! %s,%s,%s,line=%d\n", \
+		       #expr, __FILE__, __func__, __LINE__);	\
 		__asm__ __volatile__("int3");	\
         }
 
 #define DPRINT(mod, lvl, fmt, args...) do {\
-	if (mod & (HIWORD(vmbus_loglevel))) \
-		(lvl <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": %s() " fmt "\n", DEBUG_LVL, __FUNCTION__, ## args)):(0);\
+	if ((mod & (HIWORD(vmbus_loglevel))) &&	\
+	    (lvl <= LOWORD(vmbus_loglevel)))	\
+		printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
 	} while (0)
 
 #define DPRINT_DBG(mod, fmt, args...) do {\
-	if (mod & (HIWORD(vmbus_loglevel))) \
-		(DEBUG_LVL <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": %s() " fmt "\n", DEBUG_LVL, __FUNCTION__, ## args)):(0);\
+	if ((mod & (HIWORD(vmbus_loglevel))) &&		\
+	    ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Use the "real" print_hex_dump_bytes call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c     |    3 ++-
 drivers/staging/hv/StorVsc.c         |    2 +-
 drivers/staging/hv/blkvsc_drv.c      |    5 +++--
 drivers/staging/hv/include/logging.h |   22 ----------------------
 4 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 00b4ace..0af4402 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -687,7 +687,8 @@ VmbusOnChannelMessage(
 	if (hdr->MessageType >= ChannelMessageCount)
 	{
 		DPRINT_ERR(VMBUS, "Received invalid channel message type %d size %d", hdr->MessageType, size);
-		PrintBytes((unsigned char *)msg->u.Payload, size);
+		print_hex_dump_bytes("", DUMP_PREFIX_NONE,
+				     (unsigned char *)msg->u.Payload, size);
 		kfree(msg);
 		return;
 	}
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index e15f570..21bd21d 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -713,7 +713,7 @@ StorVscOnIORequest(
 		return -2;
 	}
 
-	//PrintBytes(Request->Cdb, Request->CdbLen);
+	/* print_hex_dump_bytes("", DUMP_PREFIX_NONE, Request->Cdb, Request->CdbLen); */
 
 	requestExtension->Request = Request;
 	requestExtension->Device  = Device;
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 04d980f..c306e0e 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -578,7 +578,7 @@ static int blkvsc_do_inquiry(struct block_device_context *blkdev)
 
 	buf = kmap(page_buf);
 
-	//PrintBytes(buf, 64);
+	/* print_hex_dump_bytes("", DUMP_PREFIX_NONE, buf, 64); */
 	// be to le
 	device_type = buf[0] & 0x1F;
 
@@ -603,7 +603,8 @@ static int blkvsc_do_inquiry(struct block_device_context ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

No one was even using them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |   14 --------------
 2 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 2d5cd4d..3878a2f 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -121,7 +121,6 @@ extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
 extern void TimerClose(HANDLE hTimer);
 extern int TimerStop(HANDLE hTimer);
 extern void TimerStart(HANDLE hTimer, u32 expirationInUs);
-extern size_t GetTickCount(void);
 
 extern HANDLE WaitEventCreate(void);
 extern void WaitEventClose(HANDLE hWait);
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 42da804..3cc2bb3 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -232,20 +232,6 @@ void TimerClose(HANDLE hTimer)
 	kfree(t);
 }
 
-size_t GetTickCount(void)
-{
-	return jiffies;
-}
-
-signed long long GetTimestamp(void)
-{
-	struct timeval t;
-
-	do_gettimeofday(&t);
-
-	return  timeval_to_ns(&t);
-}
-
 HANDLE WaitEventCreate(void)
 {
 	WAITEVENT* wait = kmalloc(sizeof(WAITEVENT), GFP_KERNEL);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

After LogMsg was converted to printk, lots of build warnings showed up
as no one was checking the arguments to LogMsg.  This patch fixes them
all.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c          |    6 +++---
 drivers/staging/hv/StorVsc.c     |   16 ++++++++--------
 drivers/staging/hv/blkvsc_drv.c  |   12 ++++++------
 drivers/staging/hv/storvsc_drv.c |    2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 9ef3a02..3a833ad 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -300,9 +300,9 @@ HvInit (
 		goto Cleanup;
 	}
 
-    DPRINT_INFO(VMBUS, "Hypercall page VA=0x%08x, PA=0x%08x",
-               (unsigned long)gHvContext.HypercallPage,
-               (unsigned long)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT);
+	DPRINT_INFO(VMBUS, "Hypercall page VA=%p, PA=0x%0llx",
+		    gHvContext.HypercallPage,
+		    (u64)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT);
 
 	// Setup the global signal event param for the signal event hypercall
 	gHvContext.SignalEventBuffer = kmalloc(sizeof(HV_INPUT_SIGNAL_EVENT_BUFFER), GFP_KERNEL);
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 21bd21d..98d6fd3 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -348,7 +348,7 @@ StorVscOnDeviceAdd(
 	deviceInfo->PathId = storDevice->PathId;
 	deviceInfo->TargetId = storDevice->TargetId;
 
-	DPRINT_DBG(STORVSC, "assigned port %u, path %u target %u\n", storDevice->PortNumber, storDevice->PathId, storDevice->TargetId);
+	DPRINT_DBG(STORVSC, "assigned port %lu, path %u target %u\n", storDevice->PortNumber, storDevice->PathId, storDevice->TargetId);
 
 Cleanup:
 	DPRINT_EXIT(STORVSC);
@@ -404,7 +404,7 @@ static int StorVscChannelInit(DEVICE_OBJECT *Device)
 
 	if (vstorPacket->Operation != ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Nicolas Palix <npalix@diku.dk>

Here is a short excerpt of the semantic patch performing
this transformation:
(http://www.emn.fr/x-info/coccinelle/)

//<smpl>
@@
expression E1,E2,E3;
@@
- kzalloc(E1*sizeof(E2),E3)
+ kcalloc(E1,sizeof(E2),E3)

@@
expression E1,E3;
type T;
@@
- kzalloc(E1*sizeof(T),E3)
+ kcalloc(E1,sizeof(T),E3)
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/storvsc_drv.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 62aeb27..b4a82eb 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -473,7 +473,7 @@ static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl, unsigne
 
 	num_pages = ALIGN_UP(len, PAGE_SIZE) >> PAGE_SHIFT;
 
-	bounce_sgl = kzalloc(num_pages * sizeof(struct scatterlist), GFP_ATOMIC);
+	bounce_sgl = kcalloc(num_pages, sizeof(struct scatterlist), GFP_ATOMIC);
 	if (!bounce_sgl)
 	{
 		return NULL;
@@ -928,14 +928,14 @@ static void storvsc_host_rescan_callback(struct work_struct *work)
 	DPRINT_ENTER(STORVSC_DRV);
 
 	host_device_ctx = (struct host_device_context*)host->hostdata;
-	lun_list = kzalloc(sizeof(unsigned int)*STORVSC_MAX_LUNS_PER_TARGET, GFP_ATOMIC);
+	lun_list = kcalloc(STORVSC_MAX_LUNS_PER_TARGET, sizeof(unsigned int), GFP_ATOMIC);
 	if (!lun_list)
 	{
 		DPRINT_ERR(STORVSC_DRV, "unable to allocate lun list");
 		return;
 	}
 
-	sdevs_remove_list = kzalloc(sizeof(void*)*STORVSC_MAX_LUNS_PER_TARGET, GFP_ATOMIC);
+	sdevs_remove_list = kcalloc(STORVSC_MAX_LUNS_PER_TARGET, sizeof(void *), GFP_ATOMIC);
 	if (!sdevs_remove_list)
 	{
 		kfree(lun_list);
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Moritz Muehlenhoff <jmm@debian.org>

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c        |    2 -
 drivers/staging/hv/RndisFilter.c   |    2 -
 drivers/staging/hv/Sources.c       |    2 -
 drivers/staging/hv/StorVsc.c       |    2 -
 drivers/staging/hv/TODO            |    1 -
 drivers/staging/hv/blkvsc_drv.c    |   51 ---------
 drivers/staging/hv/include/vmbus.h |   11 --
 drivers/staging/hv/netvsc_drv.c    |   27 -----
 drivers/staging/hv/storvsc_drv.c   |  218 ------------------------------------
 drivers/staging/hv/vmbus_drv.c     |  115 -------------------
 10 files changed, 0 insertions(+), 431 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 3039812..b4b7010 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -20,8 +20,6 @@
  *
  */
 
-#define KERNEL_2_6_27
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 9f462b9..714f23e 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -21,8 +21,6 @@
  *
  */
 
-#define KERNEL_2_6_27
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "include/logging.h"
diff --git a/drivers/staging/hv/Sources.c b/drivers/staging/hv/Sources.c
index 573700f..3db16a7 100644
--- a/drivers/staging/hv/Sources.c
+++ b/drivers/staging/hv/Sources.c
@@ -21,8 +21,6 @@
  *
  */
 
-#define KERNEL_2_6_27
-
 #include "Vmbus.c"
 #include "Hv.c"
 #include "Connection.c"
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 98d6fd3..439c447 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -21,8 +21,6 @@
  *
  */
 
-#define KERNEL_2_6_27
-
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Right now they can not be built into the kernel due to global
symbol name conflicts that this code is causing.

Thanks to Nicolas Palix <npalix@diku.dk> for pointing this out.

Reported-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index 932bfd6..226ed0a 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -1,6 +1,6 @@
 config HYPERV
 	tristate "Microsoft Hyper-V client drivers"
-	depends on X86
+	depends on X86 && m
 	default n
 	help
 	  Select this option to run Linux as a Hyper-V client operating
@@ -8,21 +8,21 @@ config HYPERV
 
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
-	depends on SCSI
+	depends on SCSI && m
 	default n
 	help
 	 Select this option to enable the Hyper-V virtual storage driver.
 
 config HYPERV_BLOCK
 	tristate "Microsoft Hyper-V virtual block driver"
-	depends on BLOCK
+	depends on BLOCK && m
 	default n
 	help
 	  Select this option to enable the Hyper-V virtual block driver.
 
 config HYPERV_NET
 	tristate "Microsoft Hyper-V virtual network driver"
-	depends on NET
+	depends on NET && m
 	default n
 	help
 	  Select this option to enable the Hyper-V virtual network driver.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c |    4 ++--
 drivers/staging/hv/Vmbus.c   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 196c7a6..2af8959 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -557,7 +557,7 @@ VmbusChannelEstablishGpadl(
 
 	DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d", Kbuffer, Size, msgCount);
 
-	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %d", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %ld", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 	ret = VmbusPostMessage(gpadlMsg, msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 	if (ret != 0)
@@ -576,7 +576,7 @@ VmbusChannelEstablishGpadl(
 			gpadlBody->Header.MessageType = ChannelMessageGpadlBody;
 			gpadlBody->Gpadl = nextGpadlHandle;
 
-			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %d", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %ld", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 			DumpGpadlBody(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 			ret = VmbusPostMessage(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 72bb08f..a202a2d 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -123,7 +123,7 @@ VmbusInitialize(
 	DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++", VMBUS_REVISION_NUMBER);
 	DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++", VMBUS_MESSAGE_SINT);
 
-	DPRINT_DBG(VMBUS, "sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER)=%d, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

There were a few places that used %lx when they should have used %x
and a few places that used %d when they should have used %ld

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index ee6d88e..50057e6 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -271,7 +271,7 @@ StorVscInitialize(
 
 	DPRINT_ENTER(STORVSC);
 
-	DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%d sizeof(STORVSC_REQUEST_EXTENSION)=%d sizeof(VSTOR_PACKET)=%d, sizeof(VMSCSI_REQUEST)=%d",
+	DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%ld sizeof(STORVSC_REQUEST_EXTENSION)=%ld sizeof(VSTOR_PACKET)=%ld, sizeof(VMSCSI_REQUEST)=%ld",
 		sizeof(STORVSC_REQUEST), sizeof(STORVSC_REQUEST_EXTENSION), sizeof(VSTOR_PACKET), sizeof(VMSCSI_REQUEST));
 
 	/* Make sure we are at least 2 pages since 1 page is used for control */
@@ -357,7 +357,7 @@ StorVscOnDeviceAdd(
 	deviceInfo->PathId = storDevice->PathId;
 	deviceInfo->TargetId = storDevice->TargetId;
 
-	DPRINT_DBG(STORVSC, "assigned port %lu, path %u target %u\n", storDevice->PortNumber, storDevice->PathId, storDevice->TargetId);
+	DPRINT_DBG(STORVSC, "assigned port %u, path %u target %u\n", storDevice->PortNumber, storDevice->PathId, storDevice->TargetId);
 
 Cleanup:
 	DPRINT_EXIT(STORVSC);
@@ -413,7 +413,7 @@ static int StorVscChannelInit(DEVICE_OBJECT *Device)
 
 	if (vstorPacket->Operation != VStorOperationCompleteIo || vstorPacket->Status != 0)
 	{
-		DPRINT_ERR(STORVSC, "BEGIN_INITIALIZATION_OPERATION failed (op %d status 0x%lx)", vstorPacket->Operation, vstorPacket->Status);
+		DPRINT_ERR(STORVSC, "BEGIN_INITIALIZATION_OPERATION failed (op %d status 0x%x)", vstorPacket->Operation, vstorPacket->Status);
 		goto ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 9c4bfb6..8f70b40 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -411,7 +411,7 @@ static int blkvsc_probe(struct device *device)
 	/* go! */
 	add_disk(blkdev->gd);
 
-	DPRINT_INFO(BLKVSC_DRV, "%s added!! capacity %llu sector_size %d", blkdev->gd->disk_name, blkdev->capacity, blkdev->sector_size);
+	DPRINT_INFO(BLKVSC_DRV, "%s added!! capacity %lu sector_size %d", blkdev->gd->disk_name, (unsigned long) blkdev->capacity, blkdev->sector_size);
 
 	return ret;
 
@@ -904,10 +904,10 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req, void (*reque
 
 	STORVSC_REQUEST *storvsc_req;
 
-	DPRINT_DBG(BLKVSC_DRV, "blkvsc_submit_request() - req %p type %s start_sector %llu count %ld offset %d len %d\n",
+	DPRINT_DBG(BLKVSC_DRV, "blkvsc_submit_request() - req %p type %s start_sector %lu count %ld offset %d len %d\n",
 		blkvsc_req,
 		(blkvsc_req->write)?"WRITE":"READ",
-		blkvsc_req->sector_start,
+		(unsigned long) blkvsc_req->sector_start,
 		blkvsc_req->sector_count,
 		blkvsc_req->request.DataBuffer.Offset,
 		blkvsc_req->request.DataBuffer.Length);
@@ -972,7 +972,7 @@ static int blkvsc_do_request(struct block_device_context *blkdev, struct request
 	int pending=0;
 	struct blkvsc_request_group *group=NULL;
 
-	DPRINT_DBG(BLKVSC_DRV, "blkdev %p req %p sect %llu \n", blkdev, req, blk_rq_pos(req));
+	DPRINT_DBG(BLKVSC_DRV, "blkdev %p req %p sect %lu \n", blkdev, req, (unsigned long) blk_rq_pos(req));
 
 	/* Create a group to tie req to list of blkvsc_reqs */
 	group = (struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

blkvsc_open() had the wrong parameter list for  struct
block_device_operations

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 8f70b40..d8a3b25 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -124,7 +124,7 @@ static int blkvsc_probe(struct device *dev);
 static int blkvsc_remove(struct device *device);
 static void blkvsc_shutdown(struct device *device);
 
-static int blkvsc_open(struct inode *inode, struct file *filep);
+static int blkvsc_open(struct block_device *bdev,  fmode_t mode);
 static int blkvsc_release(struct inode *inode, struct file *filep);
 static int blkvsc_media_changed(struct gendisk *gd);
 static int blkvsc_revalidate_disk(struct gendisk *gd);
@@ -1320,9 +1320,9 @@ static void blkvsc_request(struct request_queue *queue)
 	}
 }
 
-static int blkvsc_open(struct inode *inode, struct file *filep)
+static int blkvsc_open(struct block_device *bdev,  fmode_t mode)
 {
-	struct block_device_context *blkdev = inode->i_bdev->bd_disk->private_data;
+	struct block_device_context *blkdev = bdev->bd_disk->private_data;
 
 	DPRINT_DBG(BLKVSC_DRV, "- users %d disk %s\n", blkdev->users, blkdev->gd->disk_name);
 
@@ -1331,7 +1331,7 @@ static int blkvsc_open(struct inode *inode, struct file *filep)
 	if (!blkdev->users && blkdev->device_type == DVD_TYPE)
 	{
 		spin_unlock(&blkdev->lock);
-		check_disk_change(inode->i_bdev);
+		check_disk_change(bdev);
 		spin_lock(&blkdev->lock);
 	}
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

blkvsc_release() had the wrong parameter list for  struct
block_device_operations

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index d8a3b25..4bf77ee 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -125,7 +125,7 @@ static int blkvsc_remove(struct device *device);
 static void blkvsc_shutdown(struct device *device);
 
 static int blkvsc_open(struct block_device *bdev,  fmode_t mode);
-static int blkvsc_release(struct inode *inode, struct file *filep);
+static int blkvsc_release(struct gendisk *disk, fmode_t mode);
 static int blkvsc_media_changed(struct gendisk *gd);
 static int blkvsc_revalidate_disk(struct gendisk *gd);
 static int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg);
@@ -1341,9 +1341,9 @@ static int blkvsc_open(struct block_device *bdev,  fmode_t mode)
 	return 0;
 }
 
-static int blkvsc_release(struct inode *inode, struct file *filep)
+static int blkvsc_release(struct gendisk *disk, fmode_t mode)
 {
-	struct block_device_context *blkdev = inode->i_bdev->bd_disk->private_data;
+	struct block_device_context *blkdev = disk->private_data;
 
 	DPRINT_DBG(BLKVSC_DRV, "- users %d disk %s\n", blkdev->users, blkdev->gd->disk_name);
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

blkvsc_ioctl() had the wrong parameter list for  struct
block_device_operations

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 4bf77ee..5322e57 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -129,8 +129,8 @@ static int blkvsc_release(struct gendisk *disk, fmode_t mode);
 static int blkvsc_media_changed(struct gendisk *gd);
 static int blkvsc_revalidate_disk(struct gendisk *gd);
 static int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg);
-static int blkvsc_ioctl(struct inode *inode, struct file *filep, unsigned cmd, unsigned long arg);
-
+static int blkvsc_ioctl(struct block_device *bd, fmode_t mode,
+			unsigned cmd, unsigned long argument);
 static void blkvsc_request(struct request_queue *queue);
 static void blkvsc_request_completion(STORVSC_REQUEST* request);
 static int blkvsc_do_request(struct block_device_context *blkdev, struct request *req);
@@ -1451,9 +1451,9 @@ int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg)
     return 0;
 }
 
-static int blkvsc_ioctl(struct inode *inode, struct file *filep, unsigned cmd, unsigned long arg)
+static int blkvsc_ioctl(struct block_device *bd, fmode_t mode,
+			unsigned cmd, unsigned long argument)
 {
-	struct block_device *bd = inode->i_bdev;
 	struct block_device_context *blkdev = bd->bd_disk->private_data;
 	int ret=0;
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Remove preprocessor check for X2V_LINUX in osd.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/osd.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 442cc7d..e683735 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -168,15 +168,7 @@ void PageUnmapVirtualAddress(void* VirtAddr)
 
 void *MemMapIO(unsigned long phys, unsigned long size)
 {
-#if X2V_LINUX
-#ifdef __x86_64__
-	return (void*)(phys + 0xFFFF83000C000000);
-#else /* i386 */
-	return (void*)(phys + 0xfb000000);
-#endif
-#else
 	return (void*)GetVirtualAddress(phys); /* return ioremap_nocache(phys, size); */
-#endif
 }
 
 void MemUnmapIO(void *virt)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 72d41cc..111e149 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -239,7 +239,7 @@ NetVscInitialize(
 
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%d, sizeof(NVSP_MESSAGE)=%d, sizeof(VMTRANSFER_PAGE_PACKET_HEADER)=%d",
+	DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%ld, sizeof(NVSP_MESSAGE)=%ld, sizeof(VMTRANSFER_PAGE_PACKET_HEADER)=%ld",
 		sizeof(NETVSC_PACKET), sizeof(NVSP_MESSAGE), sizeof(VMTRANSFER_PAGE_PACKET_HEADER));
 
 	/* Make sure we are at least 2 pages since 1 page is used for control */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index d971e86..9191667 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -409,7 +409,7 @@ RndisFilterReceiveResponse(
 		}
 		else
 		{
-			DPRINT_ERR(NETVSC, "rndis response buffer overflow detected (size %u max %u)", Response->MessageLength, sizeof(RNDIS_FILTER_PACKET));
+			DPRINT_ERR(NETVSC, "rndis response buffer overflow detected (size %u max %lu)", Response->MessageLength, sizeof(RNDIS_FILTER_PACKET));
 
 			if (Response->NdisMessageType == REMOTE_NDIS_RESET_CMPLT) /* does not have a request id field */
 			{
@@ -539,7 +539,7 @@ RndisFilterOnReceive(
 
 	if ((rndisHeader->NdisMessageType != REMOTE_NDIS_PACKET_MSG) && (rndisHeader->MessageLength > sizeof(RNDIS_MESSAGE)))
 	{
-		DPRINT_ERR(NETVSC, "incoming rndis message buffer overflow detected (got %u, max %u)...marking it an error!",
+		DPRINT_ERR(NETVSC, "incoming rndis message buffer overflow detected (got %u, max %lu)...marking it an error!",
 			rndisHeader->MessageLength, sizeof(RNDIS_MESSAGE));
 	}
 
@@ -744,7 +744,7 @@ RndisFilterInit(
 {
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(RNDIS_FILTER_PACKET) == %d", sizeof(RNDIS_FILTER_PACKET));
+	DPRINT_DBG(NETVSC, "sizeof(RNDIS_FILTER_PACKET) == %ld", sizeof(RNDIS_FILTER_PACKET));
 
 	Driver->RequestExtSize = sizeof(RNDIS_FILTER_PACKET);
 	Driver->AdditionalRequestPageBufferCount = 1; /* For rndis header */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/storvsc_drv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 648708a..3c677f0 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -943,7 +943,7 @@ static void storvsc_host_rescan_callback(struct work_struct *work)
 		return;
 	}
 
-	DPRINT_INFO(STORVSC_DRV, "rescanning host for new scsi devices...", device_obj, host_device_ctx->target, host_device_ctx->path);
+	DPRINT_INFO(STORVSC_DRV, "rescanning host for new scsi devices...");
 
 	/* Rescan for new device */
 	scsi_scan_target(&host->shost_gendev, host_device_ctx->path, host_device_ctx->target, SCAN_WILD_CARD, 1);
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/vmbus_drv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index a86e404..74419a7 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -647,7 +647,7 @@ static int vmbus_child_device_register(DEVICE_OBJECT* root_device_obj, DEVICE_OB
 	ret = child_device_ctx->probe_error;
 
 	if (ret)
-		DPRINT_ERR(VMBUS_DRV, "unable to register child device (%p) (%d)", &child_device_ctx->device);
+		DPRINT_ERR(VMBUS_DRV, "unable to register child device (%p)", &child_device_ctx->device);
 	else
 		DPRINT_INFO(VMBUS_DRV, "child device (%p) registered", &child_device_ctx->device);
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/vmbus_drv.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 74419a7..cede0ac 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -380,7 +380,12 @@ int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 	tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_event_dpc, (unsigned long)vmbus_drv_obj);
 
 	/* Now, register the bus driver with LDM */
-	bus_register(&vmbus_drv_ctx->bus);
+	ret = bus_register(&vmbus_drv_ctx->bus);
+	if (ret)
+	{
+		ret = -1;
+		goto cleanup;
+	}
 
 	/* Get the interrupt resource */
 	ret = request_irq(vmbus_irq,
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

vmbus_ctl_table_hdr, vmbus_dev_ctl_table, vmbus_ctl_table, and
vmus_root_ctl_table were never used.  This removes them.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/vmbus_drv.c |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index fd6f18e..406fd86 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -101,34 +101,6 @@ static int vmbus_irq = VMBUS_IRQ;
 
 /* Setup /proc/sys/bus/vmbus/vmbus_loglevel */
 /* Allow usage of sysctl cmd to set the logging level */
-static struct ctl_table_header *vmbus_ctl_table_hdr;
-
-static ctl_table vmbus_dev_ctl_table[] = {
-	{ .ctl_name	= 8461,
-	  .procname	= "vmbus_loglevel",
-	  .data		= &vmbus_loglevel,
-	  .maxlen	= sizeof(vmbus_loglevel),
-	  .mode		= 0644,
-	  .proc_handler	= &proc_dointvec },
-	{ }
-};
-
-static ctl_table vmbus_ctl_table[] = {
-	{ .ctl_name	= CTL_DEV,
-	  .procname	= "vmbus",
-	  .mode		= 0555,
-	  .child	= vmbus_dev_ctl_table },
-	{ }
-};
-
-static ctl_table vmus_root_ctl_table[] = {
-	{ .ctl_name	= CTL_BUS,
-	  .procname	= "bus",
-	  .mode		= 0555,
-	  .child	= vmbus_ctl_table },
-	{ }
-};
-
 
 /* Set up per device attributes in /sys/bus/vmbus/devices/<bus device> */
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c    |    2 +-
 drivers/staging/hv/include/vmbus.h |    3 +--
 drivers/staging/hv/netvsc_drv.c    |    2 +-
 drivers/staging/hv/storvsc_drv.c   |    2 +-
 drivers/staging/hv/vmbus_drv.c     |   20 +++++++++++++++++---
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 5322e57..f1efc3e 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -192,7 +192,7 @@ int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 	drv_ctx->shutdown = blkvsc_shutdown;
 
 	/* The driver belongs to vmbus */
-	vmbus_child_driver_register(drv_ctx);
+	ret = vmbus_child_driver_register(drv_ctx);
 
 	DPRINT_EXIT(BLKVSC_DRV);
 
diff --git a/drivers/staging/hv/include/vmbus.h b/drivers/staging/hv/include/vmbus.h
index 463f77e..c1a8c55 100644
--- a/drivers/staging/hv/include/vmbus.h
+++ b/drivers/staging/hv/include/vmbus.h
@@ -82,8 +82,7 @@ static inline struct driver_context *driver_to_driver_context(struct device_driv
 
 /* Vmbus interface */
 
-void
-vmbus_child_driver_register(
+int vmbus_child_driver_register(
 	struct driver_context* driver_ctx
 	);
 
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 8cf552a..82f7700 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -114,7 +114,7 @@ int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 	drv_ctx->remove = netvsc_remove;
 
 	/* The driver belongs to vmbus */
-	vmbus_child_driver_register(drv_ctx);
+	ret = vmbus_child_driver_register(drv_ctx);
 
 	DPRINT_EXIT(NETVSC_DRV);
 
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 3c677f0..cbea8a2 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c |    4 ++--
 drivers/staging/hv/Channel.h |    4 ++--
 drivers/staging/hv/Vmbus.c   |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index bd82154..e2c833f 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -831,7 +831,7 @@ VmbusChannelSendPacketPageBuffer(
 {
 	int ret=0;
 	int i=0;
-	VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
+	struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc;
 	u32 descSize;
 	u32 packetLen;
 	u32 packetLenAligned;
@@ -845,7 +845,7 @@ VmbusChannelSendPacketPageBuffer(
 	DumpVmbusChannel(Channel);
 
 	/* Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the largest size we support */
-	descSize = sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER));
+	descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER));
 	packetLen = descSize + BufferLen;
 	packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
 
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index be65d64..54b79f0 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -32,7 +32,7 @@
 
 
 /* The format must be the same as VMDATA_GPA_DIRECT */
-typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
+struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
     u16				Type;
     u16				DataOffset8;
     u16				Length8;
@@ -41,7 +41,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
 	u32				Reserved;
 	u32				RangeCount;
     PAGE_BUFFER			Range[MAX_PAGE_BUFFER_COUNT];
-} VMBUS_CHANNEL_PACKET_PAGE_BUFFER;
+};
 
 
 /* The format must be the same as VMDATA_GPA_DIRECT */
diff --git a/drivers/staging/hv/Vmbus.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

physAddr was declared but never used in HvInit()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 264a90f..2a8a652 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -232,7 +232,6 @@ HvInit (
     int maxLeaf;
 	HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
 	void* virtAddr=0;
-	unsigned long physAddr=0;
 
 	DPRINT_ENTER(VMBUS);
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c |    4 ++--
 drivers/staging/hv/Channel.h |    4 ++--
 drivers/staging/hv/Vmbus.c   |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index e2c833f..674f141 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -912,7 +912,7 @@ VmbusChannelSendPacketMultiPageBuffer(
 )
 {
 	int ret=0;
-	VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
+	struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc;
 	u32 descSize;
 	u32 packetLen;
 	u32 packetLenAligned;
@@ -930,7 +930,7 @@ VmbusChannelSendPacketMultiPageBuffer(
 	ASSERT(PfnCount <= MAX_MULTIPAGE_BUFFER_COUNT);
 
 	/* Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is the largest size we support */
-	descSize = sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) - ((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount)*sizeof(u64));
+	descSize = sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) - ((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount)*sizeof(u64));
 	packetLen = descSize + BufferLen;
 	packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
 
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 54b79f0..5dac07b 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -45,7 +45,7 @@ struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
 
 
 /* The format must be the same as VMDATA_GPA_DIRECT */
-typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
+struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
     u16				Type;
     u16				DataOffset8;
     u16				Length8;
@@ -54,7 +54,7 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
 	u32				Reserved;
 	u32				RangeCount;		/* Always 1 in this case */
 	MULTIPAGE_BUFFER	Range;
-} ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Connection.c   |    2 +-
 drivers/staging/hv/VmbusPrivate.h |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 68f3a07..7b480f0 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -29,7 +29,7 @@
 /* Globals */
 
 
-VMBUS_CONNECTION gVmbusConnection = {
+struct VMBUS_CONNECTION gVmbusConnection = {
 	.ConnectState		= Disconnected,
 	.NextGpadlHandle	= 0xE1E10,
 };
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index ec9bfa4..0adc02a 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -63,7 +63,7 @@ enum VMBUS_CONNECT_STATE {
 
 #define MAX_SIZE_CHANNEL_MESSAGE			HV_MESSAGE_PAYLOAD_BYTE_COUNT
 
-typedef struct _VMBUS_CONNECTION {
+struct VMBUS_CONNECTION {
 
 	enum VMBUS_CONNECT_STATE					ConnectState;
 
@@ -94,7 +94,7 @@ typedef struct _VMBUS_CONNECTION {
 	spinlock_t channel_lock;
 
 	HANDLE								WorkQueue;
-} VMBUS_CONNECTION;
+};
 
 
 typedef struct _VMBUS_MSGINFO {
@@ -112,7 +112,7 @@ typedef struct _VMBUS_MSGINFO {
 
 /* Externs */
 
-extern VMBUS_CONNECTION gVmbusConnection;
+extern struct VMBUS_CONNECTION gVmbusConnection;
 
 
 /* General vmbus interface */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/VmbusPrivate.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index ad17088..ec9bfa4 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -54,18 +54,18 @@
 /* Data types */
 
 
-typedef enum {
+enum VMBUS_CONNECT_STATE {
 	Disconnected,
 	Connecting,
 	Connected,
 	Disconnecting
-} VMBUS_CONNECT_STATE;
+};
 
 #define MAX_SIZE_CHANNEL_MESSAGE			HV_MESSAGE_PAYLOAD_BYTE_COUNT
 
 typedef struct _VMBUS_CONNECTION {
 
-	VMBUS_CONNECT_STATE					ConnectState;
+	enum VMBUS_CONNECT_STATE					ConnectState;
 
 	u32								NextGpadlHandle;
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Note that this struct doesn't appear to be used anywhere and can
probably be removed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/VmbusPrivate.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index 0adc02a..40e5962 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -97,7 +97,7 @@ struct VMBUS_CONNECTION {
 };
 
 
-typedef struct _VMBUS_MSGINFO {
+struct VMBUS_MSGINFO {
 	/* Bookkeeping stuff */
 	LIST_ENTRY			MsgListEntry;
 
@@ -106,7 +106,7 @@ typedef struct _VMBUS_MSGINFO {
 
 	/* The message itself */
 	unsigned char		Msg[0];
-} VMBUS_MSGINFO;
+};
 
 
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

WORKQUEUE was a wrapper around struct workqueue_struct so just use
that instead.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h  |    2 +-
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 drivers/staging/hv/include/osd.h  |    8 +++++---
 drivers/staging/hv/osd.c          |   30 ++++++++++--------------------
 4 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index c4aa95c..5831d19 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -64,7 +64,7 @@ typedef struct _VMBUS_CHANNEL {
 	RING_BUFFER_INFO			Outbound;	/* send to parent */
 	RING_BUFFER_INFO			Inbound;	/* receive from parent */
 	spinlock_t inbound_lock;
-	HANDLE						ControlWQ;
+	struct workqueue_struct *ControlWQ;
 
 	/* Channel callback are invoked in this workqueue context */
 	/* HANDLE						dataWorkQueue; */
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index 40e5962..7182d4d 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -93,7 +93,7 @@ struct VMBUS_CONNECTION {
 	LIST_ENTRY							ChannelList;
 	spinlock_t channel_lock;
 
-	HANDLE								WorkQueue;
+	struct workqueue_struct *WorkQueue;
 };
 
 
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index faae7cc..6a5675f 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -143,9 +143,11 @@ void* PageMapVirtualAddress(unsigned long Pfn);
 void PageUnmapVirtualAddress(void* VirtAddr);
 
 
-extern HANDLE WorkQueueCreate(char* name);
-extern void WorkQueueClose(HANDLE hWorkQueue);
-extern int WorkQueueQueueWorkItem(HANDLE hWorkQueue, PFN_WORKITEM_CALLBACK workItem, void* context);
+extern struct workqueue_struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c      |   66 +++++++++++++++++++-------------------
 drivers/staging/hv/NetVsc.h      |    4 +-
 drivers/staging/hv/RndisFilter.c |   14 ++++----
 3 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 111e149..c0d5dc3 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -71,12 +71,12 @@ NetVscInitializeReceiveBufferWithNetVsp(
 
 static int
 NetVscDestroySendBuffer(
-	NETVSC_DEVICE	*NetDevice
+	struct NETVSC_DEVICE	*NetDevice
 	);
 
 static int
 NetVscDestroyReceiveBuffer(
-	NETVSC_DEVICE	*NetDevice
+	struct NETVSC_DEVICE	*NetDevice
 	);
 
 static int
@@ -113,11 +113,11 @@ NetVscSendReceiveCompletion(
 	u64			TransactionId
 	);
 
-static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device)
+static inline struct NETVSC_DEVICE *AllocNetDevice(DEVICE_OBJECT *Device)
 {
-	NETVSC_DEVICE *netDevice;
+	struct NETVSC_DEVICE *netDevice;
 
-	netDevice = kzalloc(sizeof(NETVSC_DEVICE), GFP_KERNEL);
+	netDevice = kzalloc(sizeof(struct NETVSC_DEVICE), GFP_KERNEL);
 	if (!netDevice)
 		return NULL;
 
@@ -130,7 +130,7 @@ static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device)
 	return netDevice;
 }
 
-static inline void FreeNetDevice(NETVSC_DEVICE *Device)
+static inline void FreeNetDevice(struct NETVSC_DEVICE *Device)
 {
 	ASSERT(Device->RefCount == 0);
 	Device->Device->Extension = NULL;
@@ -139,11 +139,11 @@ static inline void FreeNetDevice(NETVSC_DEVICE *Device)
 
 
 /* Get the net device object iff exists and its refcount > 1 */
-static inline NETVSC_DEVICE* GetOutboundNetDevice(DEVICE_OBJECT	*Device)
+static inline struct NETVSC_DEVICE *GetOutboundNetDevice(DEVICE_OBJECT	*Device)
 {
-	NETVSC_DEVICE *netDevice;
+	struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Nicolas Palix <npalix@diku.dk>

Remove typedef DEVICE_OBJECT and use a struct named hv_device instead.
Remove typedef PDEVICE_OBJECT which aliases a pointer and use
struct hv_device * instead.

Here is the semantic patch to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_PDEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;

@rm_DEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT
+struct hv_device
{...}
-DEVICE_OBJECT
;

@fixtypedef_PDEVICE_OBJECT@
typedef PDEVICE_OBJECT;
@@
-PDEVICE_OBJECT
+struct hv_device*

@fixtypedef_DEVICE_OBJECT@
typedef DEVICE_OBJECT;
@@
-DEVICE_OBJECT
+struct hv_device

@fixstruct__DEVICE_OBJECT@
@@
struct
-_DEVICE_OBJECT
+hv_device
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c             |    4 +-
 drivers/staging/hv/ChannelInterface.c   |   20 ++++++------
 drivers/staging/hv/ChannelInterface.h   |    2 +-
 drivers/staging/hv/ChannelMgmt.h        |    2 +-
 drivers/staging/hv/NetVsc.c             |   52 +++++++++++++++---------------
 drivers/staging/hv/NetVsc.h             |    2 +-
 drivers/staging/hv/RndisFilter.c        |   24 +++++++-------
 drivers/staging/hv/StorVsc.c            |   50 +++++++++++++++---------------
 drivers/staging/hv/Vmbus.c              |   22 ++++++------
 drivers/staging/hv/VmbusPrivate.h       |    8 ++--
 drivers/staging/hv/blkvsc_drv.c         |    4 +-
 drivers/staging/hv/include/NetVscApi.h  |   14 ++++----
 drivers/staging/hv/include/StorVscApi.h |    6 ++--
 drivers/staging/hv/include/VmbusApi.h   |   43 +++++++++++++------------
 drivers/staging/hv/include/vmbus.h      |    4 +-
 drivers/staging/hv/netvsc_drv.c         |   16 +++++-----
 drivers/staging/hv/storvsc_drv.c        |   10 +++---
 drivers/staging/hv/vmbus_drv.c          |   22 ++++++------
 18 files changed, 153 insertions(+), 152 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

The return value of driver_for_each_device() is now checked.  A
non-zero value simply generates a warning message, but it's better
than not checking at all.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c  |   11 +++++++++--
 drivers/staging/hv/netvsc_drv.c  |   11 +++++++++--
 drivers/staging/hv/storvsc_drv.c |   10 ++++++++--
 3 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index d595c3b..dff950b 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -218,8 +218,8 @@ void blkvsc_drv_exit(void)
 {
 	STORVSC_DRIVER_OBJECT *storvsc_drv_obj=&g_blkvsc_drv.drv_obj;
 	struct driver_context *drv_ctx=&g_blkvsc_drv.drv_ctx;
-
 	struct device *current_dev=NULL;
+	int ret;
 
 	DPRINT_ENTER(BLKVSC_DRV);
 
@@ -228,7 +228,14 @@ void blkvsc_drv_exit(void)
 		current_dev = NULL;
 
 		/* Get the device */
-		driver_for_each_device(&drv_ctx->driver, NULL, (void*)&current_dev, blkvsc_drv_exit_cb);
+		ret = driver_for_each_device(&drv_ctx->driver, NULL,
+					     (void *) &current_dev,
+					     blkvsc_drv_exit_cb);
+
+		if (ret)
+			DPRINT_WARN(BLKVSC_DRV,
+				    "driver_for_each_device returned %d", ret);
+
 
 		if (current_dev == NULL)
 			break;
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index f0df216..9010f0e 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -638,8 +638,8 @@ void netvsc_drv_exit(void)
 {
 	NETVSC_DRIVER_OBJECT *netvsc_drv_obj=&g_netvsc_drv.drv_obj;
 	struct driver_context *drv_ctx=&g_netvsc_drv.drv_ctx;
-
 	struct device *current_dev=NULL;
+	int ret;
 
 	DPRINT_ENTER(NETVSC_DRV);
 
@@ -648,7 +648,14 @@ void netvsc_drv_exit(void)
 		current_dev = NULL;
 
 		/* Get the device ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

This variable generated an unused variable warning due to other code
in the fuction being commented out.  This comments out the variable
defination so that the code compiles without warnings.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index dff950b..988de64 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -1461,7 +1461,7 @@ int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg)
 static int blkvsc_ioctl(struct block_device *bd, fmode_t mode,
 			unsigned cmd, unsigned long argument)
 {
-	struct block_device_context *blkdev = bd->bd_disk->private_data;
+/*	struct block_device_context *blkdev = bd->bd_disk->private_data; */
 	int ret=0;
 
 	switch (cmd)
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Remove the WAITEVENT typedef and also replace HANDLE types that use
the WaitEvent calls with struct osd_waitevent.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h  |    2 +-
 drivers/staging/hv/NetVsc.h       |    2 +-
 drivers/staging/hv/RndisFilter.c  |    2 +-
 drivers/staging/hv/StorVsc.c      |    2 +-
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 drivers/staging/hv/include/osd.h  |   18 ++++++++++++------
 drivers/staging/hv/osd.c          |   32 +++++++++++---------------------
 7 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 6208cd8..7cf0173 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -115,7 +115,7 @@ typedef struct _VMBUS_CHANNEL_MSGINFO {
 	LIST_ENTRY		SubMsgList;
 
 	/* Synchronize the request/response if needed */
-	HANDLE			WaitEvent;
+	struct osd_waitevent *WaitEvent;
 
 	VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
 
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index f7c1680..7636654 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -78,7 +78,7 @@ struct NETVSC_DEVICE {
 	PNVSP_1_RECEIVE_BUFFER_SECTION	ReceiveSections;
 
 	/* Used for NetVSP initialization protocol */
-	HANDLE							ChannelInitEvent;
+	struct osd_waitevent *ChannelInitEvent;
 	NVSP_MESSAGE					ChannelInitPacket;
 
 	NVSP_MESSAGE					RevokePacket;
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index cac0727..38b9a11 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -61,7 +61,7 @@ typedef struct _RNDIS_DEVICE {
 
 typedef struct _RNDIS_REQUEST {
 	LIST_ENTRY					ListEntry;
-	HANDLE						WaitEvent;
+	struct osd_waitevent *WaitEvent;
 
 	/* FIXME: We ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Remove the TIMER typedef and also replace HANDLE types that use
the timer calls.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h |    2 +-
 drivers/staging/hv/include/osd.h |   19 +++++++++++++------
 drivers/staging/hv/osd.c         |   23 ++++++-----------------
 3 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 7cf0173..71173d0 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -47,7 +47,7 @@ typedef struct _VMBUS_CHANNEL {
 
 	struct hv_device *DeviceObject;
 
-	HANDLE						PollTimer; /* SA-111 workaround */
+	struct osd_timer *PollTimer; /* SA-111 workaround */
 
 	VMBUS_CHANNEL_STATE			State;
 
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 470d802..2cd2cf0 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -48,6 +48,10 @@ typedef struct _DLIST_ENTRY {
 /* typedef unsigned char		GUID[16]; */
 typedef void*				HANDLE;
 
+typedef void (*PFN_WORKITEM_CALLBACK)(void* context);
+typedef void (*PFN_TIMER_CALLBACK)(void* context);
+
+
 typedef struct {
 	unsigned char	Data[16];
 } GUID;
@@ -57,9 +61,12 @@ struct osd_waitevent {
 	wait_queue_head_t event;
 };
 
+struct osd_timer {
+	struct timer_list timer;
+	PFN_TIMER_CALLBACK callback;
+	void* context;
+};
 
-typedef void (*PFN_WORKITEM_CALLBACK)(void* context);
-typedef void (*PFN_TIMER_CALLBACK)(void* context);
 
 
 #ifdef __x86_64__
@@ -123,10 +130,10 @@ extern void PageFree(void* page, unsigned int count);
 extern void* MemMapIO(unsigned long phys, unsigned long size);
 extern void MemUnmapIO(void* virt);
 
-extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
-extern void TimerClose(HANDLE ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c          |    4 ++--
 drivers/staging/hv/Hv.h          |    4 ++--
 drivers/staging/hv/include/osd.h |    1 -
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 2a8a652..0883179 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -235,8 +235,8 @@ HvInit (
 
 	DPRINT_ENTER(VMBUS);
 
-	memset(gHvContext.synICEventPage, 0, sizeof(HANDLE)*MAX_NUM_CPUS);
-	memset(gHvContext.synICMessagePage, 0, sizeof(HANDLE)*MAX_NUM_CPUS);
+	memset(gHvContext.synICEventPage, 0, sizeof(void *) * MAX_NUM_CPUS);
+	memset(gHvContext.synICMessagePage, 0, sizeof(void *) * MAX_NUM_CPUS);
 
 	if (!HvQueryHypervisorPresence())
 	{
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index a62ac33..b5ea3dc 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -119,8 +119,8 @@ typedef struct {
 	HV_INPUT_SIGNAL_EVENT_BUFFER *SignalEventBuffer;
 	HV_INPUT_SIGNAL_EVENT *SignalEventParam; /* 8-bytes aligned of the buffer above */
 
-	HANDLE	synICMessagePage[MAX_NUM_CPUS];
-	HANDLE	synICEventPage[MAX_NUM_CPUS];
+	void *synICMessagePage[MAX_NUM_CPUS];
+	void *synICEventPage[MAX_NUM_CPUS];
 } HV_CONTEXT;
 
 extern HV_CONTEXT gHvContext;
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 2cd2cf0..2a47d14 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -46,7 +46,6 @@ typedef struct _DLIST_ENTRY {
 /* Other types */
 
 /* typedef unsigned char		GUID[16]; */
-typedef void*				HANDLE;
 
 typedef void (*PFN_WORKITEM_CALLBACK)(void* context);
 typedef void (*PFN_TIMER_CALLBACK)(void* context);
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

This fixes the printk() warnings on all platforms now (x86-64 and i386).

Cc: Hank Janssen  <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    4 ++--
 drivers/staging/hv/NetVsc.c      |    2 +-
 drivers/staging/hv/RndisFilter.c |    6 +++---
 drivers/staging/hv/StorVsc.c     |    2 +-
 drivers/staging/hv/Vmbus.c       |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 5ebc8de..68f3442 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -555,7 +555,7 @@ VmbusChannelEstablishGpadl(
 
 	DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d", Kbuffer, Size, msgCount);
 
-	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %d", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %zd", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 	ret = VmbusPostMessage(gpadlMsg, msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 	if (ret != 0)
@@ -574,7 +574,7 @@ VmbusChannelEstablishGpadl(
 			gpadlBody->Header.MessageType = ChannelMessageGpadlBody;
 			gpadlBody->Gpadl = nextGpadlHandle;
 
-			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %d", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %zd", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 			DumpGpadlBody(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 			ret = VmbusPostMessage(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index dbafaee..e2a75ce 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -239,7 +239,7 @@ NetVscInitialize(
 
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%d, sizeof(NVSP_MESSAGE)=%d, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Nicolas Palix <npalix@diku.dk>

typedef DRIVER_OBJECT and PDRIVER_OBJECT are removed and their usages
are replace by the use of struct hv_driver and struct hv_driver *
respectively.

Here is the semantic patch generated to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_DRIVER_OBJECT@
@@
-typedef struct _DRIVER_OBJECT
+struct hv_driver
{...}
-DRIVER_OBJECT
;

@rm_PDRIVER_OBJECT@
@@
-typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
+struct hv_driver;

@fixtypedef_DRIVER_OBJECT@
typedef DRIVER_OBJECT;
@@
-DRIVER_OBJECT
+struct hv_driver

@fixstruct__DRIVER_OBJECT@
@@
struct
-_DRIVER_OBJECT
+hv_driver

@fixtypedef_PDRIVER_OBJECT@
typedef PDRIVER_OBJECT;
@@
-PDRIVER_OBJECT
+struct hv_driver*
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c             |    2 +-
 drivers/staging/hv/NetVsc.c             |    6 +++---
 drivers/staging/hv/RndisFilter.c        |    4 ++--
 drivers/staging/hv/StorVsc.c            |    6 +++---
 drivers/staging/hv/Vmbus.c              |   20 ++++++++++----------
 drivers/staging/hv/include/NetVscApi.h  |    4 ++--
 drivers/staging/hv/include/StorVscApi.h |    6 +++---
 drivers/staging/hv/include/VmbusApi.h   |   26 ++++++++++----------------
 drivers/staging/hv/include/vmbus.h      |    4 ++--
 drivers/staging/hv/vmbus_drv.c          |    2 +-
 10 files changed, 37 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 059b134..d2bde5d 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -41,7 +41,7 @@ BlkVscOnDeviceAdd(
 
 int
 BlkVscInitialize(
-	DRIVER_OBJECT *Driver
+	struct hv_driver *Driver
 	)
 {
 	STORVSC_DRIVER_OBJECT* storDriver = (STORVSC_DRIVER_OBJECT*)Driver;
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index e2a75ce..d653f95 100644
--- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

This should fix up the rest of the printk() warnings on an i386 build

Cc: Hank Janssen  <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    4 ++--
 drivers/staging/hv/NetVsc.c      |    2 +-
 drivers/staging/hv/RndisFilter.c |    6 +++---
 drivers/staging/hv/StorVsc.c     |    2 +-
 drivers/staging/hv/Vmbus.c       |    2 +-
 drivers/staging/hv/blkvsc_drv.c  |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 674f141..5ebc8de 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -555,7 +555,7 @@ VmbusChannelEstablishGpadl(
 
 	DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d", Kbuffer, Size, msgCount);
 
-	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %ld", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %d", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 	ret = VmbusPostMessage(gpadlMsg, msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 	if (ret != 0)
@@ -574,7 +574,7 @@ VmbusChannelEstablishGpadl(
 			gpadlBody->Header.MessageType = ChannelMessageGpadlBody;
 			gpadlBody->Gpadl = nextGpadlHandle;
 
-			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %ld", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %d", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 
 			DumpGpadlBody(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
 			ret = VmbusPostMessage(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index ab4660f..dbafaee 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -239,7 +239,7 @@ NetVscInitialize(
 
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%ld, sizeof(NVSP_MESSAGE)=%ld, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Nicolas Palix <npalix@diku.dk>

typedef NETVSC_PACKET and PNETVSC_PACKET are removed and their usages
are replace by the use of struct hv_netvsc_packet and
struct hv_netvsc_packet * respectively.

Here is the semantic patch generated to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_NETVSC_PACKET@
@@
-typedef struct _NETVSC_PACKET
+struct hv_netvsc_packet
{...}
-NETVSC_PACKET
;

@rm_PNETVSC_PACKET@
@@
-typedef struct _NETVSC_PACKET *PNETVSC_PACKET;
+struct hv_netvsc_packet;

@fixtypedef_NETVSC_PACKET@
typedef NETVSC_PACKET;
@@
-NETVSC_PACKET
+struct hv_netvsc_packet

@fixstruct__NETVSC_PACKET@
@@
struct
-_NETVSC_PACKET
+hv_netvsc_packet

@fixtypedef_PNETVSC_PACKET@
typedef PNETVSC_PACKET;
@@
-PNETVSC_PACKET
+struct hv_netvsc_packet*
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c            |   32 ++++++++++++++++----------------
 drivers/staging/hv/NetVsc.h            |    2 +-
 drivers/staging/hv/RndisFilter.c       |   16 ++++++++--------
 drivers/staging/hv/include/NetVscApi.h |   10 +++++-----
 drivers/staging/hv/netvsc_drv.c        |   16 ++++++++--------
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index d653f95..b24a870 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -93,7 +93,7 @@ NetVscOnSendCompletion(
 static int
 NetVscOnSend(
 	struct hv_device *Device,
-	NETVSC_PACKET	*Packet
+	struct hv_netvsc_packet	*Packet
 	);
 
 static void
@@ -239,8 +239,8 @@ NetVscInitialize(
 
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%zd, sizeof(NVSP_MESSAGE)=%zd, sizeof(VMTRANSFER_PAGE_PACKET_HEADER)=%zd",
-		sizeof(NETVSC_PACKET), sizeof(NVSP_MESSAGE), sizeof(VMTRANSFER_PAGE_PACKET_HEADER));
+	DPRINT_DBG(NETVSC, "sizeof(struct hv_netvsc_packet)=%zd, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Nicolas Palix <npalix@diku.dk>

typedef STORVSC_REQUEST and PSTORVSC_REQUEST are removed and their
usages are replace by the use of struct hv_storvsc_request and
struct hv_storvsc_request * respectively.

Here is the semantic patch generated to perform this transformation:
(http://coccinelle.lip6.fr/)

//<smpl>
@rm_STORVSC_REQUEST@
@@
-typedef struct _STORVSC_REQUEST
+struct hv_storvsc_request
{...}
-STORVSC_REQUEST
;

@rm_PSTORVSC_REQUEST@
@@
-typedef struct _STORVSC_REQUEST *PSTORVSC_REQUEST;
+struct hv_storvsc_request;

@fixtypedef_STORVSC_REQUEST@
typedef STORVSC_REQUEST;
@@
-STORVSC_REQUEST
+struct hv_storvsc_request

@fixstruct__STORVSC_REQUEST@
@@
struct
-_STORVSC_REQUEST
+hv_storvsc_request

@fixtypedef_PSTORVSC_REQUEST@
typedef PSTORVSC_REQUEST;
@@
-PSTORVSC_REQUEST
+struct hv_storvsc_request*
//</smpl>

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c            |   10 +++++-----
 drivers/staging/hv/blkvsc_drv.c         |   18 +++++++++---------
 drivers/staging/hv/include/StorVscApi.h |   10 +++++-----
 drivers/staging/hv/storvsc_drv.c        |    6 +++---
 4 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index bc313a6..5955999 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -43,7 +43,7 @@
 typedef struct _STORVSC_REQUEST_EXTENSION {
 	/* LIST_ENTRY						ListEntry; */
 
-	STORVSC_REQUEST					*Request;
+	struct hv_storvsc_request *Request;
 	struct hv_device *Device;
 
 	/* Synchronize the request/response if needed */
@@ -108,7 +108,7 @@ StorVscOnDeviceRemove(
 static int
 StorVscOnIORequest(
 	struct hv_device *Device,
-	STORVSC_REQUEST	*Request
+	struct hv_storvsc_request *Request
 	);
 
 static int
@@ -272,7 +272,7 @@ StorVscInitialize(
 	DPRINT_ENTER(STORVSC);
 
 	DPRINT_DBG(STORVSC, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

This fixes up all of the sparse warnings about static functions.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c      |    2 +-
 drivers/staging/hv/Channel.c     |   24 ++++++++++++------------
 drivers/staging/hv/ChannelMgmt.c |   14 +++++++-------
 drivers/staging/hv/Connection.c  |   12 ++++++------
 drivers/staging/hv/Hv.c          |   10 +++++-----
 drivers/staging/hv/NetVsc.c      |    6 +++---
 drivers/staging/hv/RingBuffer.c  |   20 ++++++++++----------
 drivers/staging/hv/RndisFilter.c |    4 ++--
 drivers/staging/hv/StorVsc.c     |   14 +++++++-------
 drivers/staging/hv/VersionInfo.h |    6 +++---
 drivers/staging/hv/Vmbus.c       |   16 ++++++++--------
 drivers/staging/hv/blkvsc_drv.c  |    6 +++---
 drivers/staging/hv/netvsc_drv.c  |    4 ++--
 drivers/staging/hv/osd.c         |    4 ++--
 drivers/staging/hv/storvsc_drv.c |    4 ++--
 drivers/staging/hv/vmbus_drv.c   |    4 ++--
 16 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index d2bde5d..526a0ab 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -75,7 +75,7 @@ BlkVscInitialize(
 	return ret;
 }
 
-int
+static int
 BlkVscOnDeviceAdd(
 	struct hv_device *Device,
 	void			*AdditionalInfo
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 68f3442..34c8662 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -153,7 +153,7 @@ Description:
 	Retrieve various channel debug info
 
 --*/
-void
+static void
 VmbusChannelGetDebugInfo(
 	VMBUS_CHANNEL				*Channel,
 	VMBUS_CHANNEL_DEBUG_INFO	*DebugInfo
@@ -197,7 +197,7 @@ Description:
 	Open the specified channel.
 
 --*/
-int
+static int
 VmbusChannelOpen(
 	VMBUS_CHANNEL			*NewChannel,
 	u32					SendRingBufferSize,
@@ -510,7 +510,7 @@ Description:
 	Estabish a GPADL for the specified buffer
 
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

This fixes up all of the sparse warnings about functions not being
properly declared.  Meaning, void functions need to say they are a void
function, otherwise the compiler assumes it is an integer here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Connection.c |    3 +--
 drivers/staging/hv/Hv.c         |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index d017c27..a2888cb 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -45,8 +45,7 @@ Description:
 
 --*/
 static int
-VmbusConnect(
-	)
+VmbusConnect(void)
 {
 	int ret=0;
 	VMBUS_CHANNEL_MSGINFO *msgInfo=NULL;
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index c19c527..ef328d0 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -445,8 +445,7 @@ Description:
 
 --*/
 static HV_STATUS
-HvSignalEvent(
-	)
+HvSignalEvent(void)
 {
 	HV_STATUS status;
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Change the usage of workqueues to be consistant with other parts of
the kernel.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |   14 +++++---
 drivers/staging/hv/Connection.c  |   12 +++++--
 drivers/staging/hv/Vmbus.c       |    4 ++-
 drivers/staging/hv/include/osd.h |   11 ++----
 drivers/staging/hv/osd.c         |   66 ++++++++++++--------------------------
 5 files changed, 45 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index c5efc6e..2c4f4c8 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -149,7 +149,7 @@ static VMBUS_CHANNEL* AllocVmbusChannel(void)
 	}
 
 	/* channel->dataWorkQueue = WorkQueueCreate("data"); */
-	channel->ControlWQ = WorkQueueCreate("control");
+	channel->ControlWQ = create_workqueue("hv_vmbus_ctl");
 	if (!channel->ControlWQ)
 	{
 		TimerClose(channel->PollTimer);
@@ -176,7 +176,7 @@ static inline void ReleaseVmbusChannel(void* Context)
 	DPRINT_ENTER(VMBUS);
 
 	DPRINT_DBG(VMBUS, "releasing channel (%p)", channel);
-	WorkQueueClose(channel->ControlWQ);
+	destroy_workqueue(channel->ControlWQ);
 	DPRINT_DBG(VMBUS, "channel released (%p)", channel);
 
 	kfree(channel);
@@ -199,7 +199,8 @@ static void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
 
 	/* We have to release the channel's workqueue/thread in the vmbus's workqueue/thread context */
 	/* ie we can't destroy ourselves. */
-	WorkQueueQueueWorkItem(gVmbusConnection.WorkQueue, ReleaseVmbusChannel, (void*)Channel);
+	osd_schedule_callback(gVmbusConnection.WorkQueue, ReleaseVmbusChannel,
+			      (void *)Channel);
 }
 
 
@@ -389,7 +390,8 @@ VmbusChannelOnOffer(
 	newChannel->MonitorBit = (u8)offer->MonitorId % 32;
 
 	/* TODO: Make sure the offer comes from our parent partition ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

All WaitEventClose() close did was call kfree(), so get rid of it and
replace it with a call to kfree()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    6 +++---
 drivers/staging/hv/ChannelMgmt.c |    2 +-
 drivers/staging/hv/Connection.c  |    4 ++--
 drivers/staging/hv/NetVsc.c      |    4 ++--
 drivers/staging/hv/RndisFilter.c |    2 +-
 drivers/staging/hv/StorVsc.c     |    4 ++--
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    5 -----
 8 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 34c8662..e633741 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -309,7 +309,7 @@ Cleanup:
 	REMOVE_ENTRY_LIST(&openInfo->MsgListEntry);
 	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
-	WaitEventClose(openInfo->WaitEvent);
+	kfree(openInfo->WaitEvent);
 	kfree(openInfo);
 
 	DPRINT_EXIT(VMBUS);
@@ -596,7 +596,7 @@ Cleanup:
 	REMOVE_ENTRY_LIST(&msgInfo->MsgListEntry);
 	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
-	WaitEventClose(msgInfo->WaitEvent);
+	kfree(msgInfo->WaitEvent);
 	kfree(msgInfo);
 
 	DPRINT_EXIT(VMBUS);
@@ -658,7 +658,7 @@ VmbusChannelTeardownGpadl(
 	REMOVE_ENTRY_LIST(&info->MsgListEntry);
 	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
-	WaitEventClose(info->WaitEvent);
+	kfree(info->WaitEvent);
 	kfree(info);
 
 	DPRINT_EXIT(VMBUS);
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 2c4f4c8..7ef1f2b 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -762,7 +762,7 @@ VmbusChannelRequestOffers(
 Cleanup:
 	if (msgInfo)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

This fixes up all of the sparse warnings where NULL should be used
instead of 0.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index ef328d0..36e0d86 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -231,7 +231,7 @@ HvInit (
 	int ret=0;
     int maxLeaf;
 	HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
-	void* virtAddr=0;
+	void *virtAddr = NULL;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -426,7 +426,7 @@ HvPostMessage(
 	alignedMsg->PayloadSize = payloadSize;
 	memcpy((void*)alignedMsg->Payload, payload, payloadSize);
 
-	status = HvDoHypercall(HvCallPostMessage, alignedMsg, 0) & 0xFFFF;
+	status = HvDoHypercall(HvCallPostMessage, alignedMsg, NULL) & 0xFFFF;
 
 	kfree((void*)addr);
 
@@ -449,7 +449,7 @@ HvSignalEvent(void)
 {
 	HV_STATUS status;
 
-	status = HvDoHypercall(HvCallSignalEvent, gHvContext.SignalEventParam, 0) & 0xFFFF;
+	status = HvDoHypercall(HvCallSignalEvent, gHvContext.SignalEventParam, NULL) & 0xFFFF;
 
 	return status;
 }
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

There were several Bit* functions that did nothing but call the kernel
functions with the parameters reversed.  Remove these and call the
functions directly.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |   14 ++++++++++----
 drivers/staging/hv/Connection.c  |    6 ++++--
 drivers/staging/hv/Vmbus.c       |    2 +-
 drivers/staging/hv/include/osd.h |    6 ------
 drivers/staging/hv/osd.c         |   27 ---------------------------
 5 files changed, 15 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index e633741..4b5e3e4 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -104,12 +104,16 @@ VmbusChannelSetEvent(
 	if (Channel->OfferMsg.MonitorAllocated)
 	{
 		/* Each u32 represents 32 channels */
-		BitSet((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
+		set_bit(Channel->OfferMsg.ChildRelId & 31,
+			(unsigned long *) gVmbusConnection.SendInterruptPage +
+			(Channel->OfferMsg.ChildRelId >> 5) );
 
 		monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
 		monitorPage++; /* Get the child to parent monitor page */
 
-		BitSet((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit);
+		set_bit(Channel->MonitorBit,
+			(unsigned long *) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending);
+
 	}
 	else
 	{
@@ -132,12 +136,14 @@ VmbusChannelClearEvent(
 	if (Channel->OfferMsg.MonitorAllocated)
 	{
 		/* Each u32 represents 32 channels */
-		BitClear((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31);
+		clear_bit(Channel->OfferMsg.ChildRelId & 31,
+			  (unsigned long *) gVmbusConnection.SendInterruptPage + ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c      |    4 +-
 drivers/staging/hv/Connection.c   |    2 +-
 drivers/staging/hv/NetVsc.c       |   34 ++++++++++++-------------------
 drivers/staging/hv/NetVsc.h       |    5 +--
 drivers/staging/hv/RndisFilter.c  |    6 ++--
 drivers/staging/hv/StorVsc.c      |   40 ++++++++++++++----------------------
 drivers/staging/hv/VmbusPrivate.h |    2 +-
 drivers/staging/hv/include/osd.h  |    4 ---
 drivers/staging/hv/osd.c          |   20 ------------------
 drivers/staging/hv/vmbus_drv.c    |    4 +-
 10 files changed, 40 insertions(+), 81 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 4b5e3e4..61fc345 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -540,8 +540,8 @@ VmbusChannelEstablishGpadl(
 
 	DPRINT_ENTER(VMBUS);
 
-	nextGpadlHandle = gVmbusConnection.NextGpadlHandle;
-	InterlockedIncrement((int*)&gVmbusConnection.NextGpadlHandle);
+	nextGpadlHandle = atomic_read(&gVmbusConnection.NextGpadlHandle);
+	atomic_inc(&gVmbusConnection.NextGpadlHandle);
 
 	VmbusChannelCreateGpadlHeader(Kbuffer, Size, &msgInfo, &msgCount);
 	ASSERT(msgInfo != NULL);
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index b7df7e7..d7091ad 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -31,7 +31,7 @@
 
 struct VMBUS_CONNECTION gVmbusConnection = {
 	.ConnectState		= Disconnected,
-	.NextGpadlHandle	= 0xE1E10,
+	.NextGpadlHandle	= ATOMIC_INIT(0xE1E10),
 };
 
 
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index dea5409..8e71ce6 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -122,7 +122,7 @@ static inline struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c          |    6 +++---
 drivers/staging/hv/include/osd.h |    1 -
 drivers/staging/hv/osd.c         |    5 -----
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 36e0d86..334812f 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -21,7 +21,7 @@
  *
  */
 
-
+#include <linux/vmalloc.h>
 #include "include/logging.h"
 #include "VmbusPrivate.h"
 
@@ -330,7 +330,7 @@ Cleanup:
 			WriteMsr(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
 		}
 
-		VirtualFree(virtAddr);
+		vfree(virtAddr);
 	}
 	ret = -1;
 	DPRINT_EXIT(VMBUS);
@@ -370,7 +370,7 @@ HvCleanup (
 		{
 			hypercallMsr.AsUINT64 = 0;
 			WriteMsr(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
-			VirtualFree(gHvContext.HypercallPage);
+			vfree(gHvContext.HypercallPage);
 			gHvContext.HypercallPage = NULL;
 		}
 	}
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index bf010fc..f8b5411 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -110,7 +110,6 @@ static inline void do_cpuid(unsigned int op, unsigned int *eax, unsigned int *eb
 /* Osd routines */
 
 extern void* VirtualAllocExec(unsigned int size);
-extern void VirtualFree(void* VirtAddr);
 
 extern void* PageAlloc(unsigned int count);
 extern void PageFree(void* page, unsigned int count);
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 1d33872..f19b9c9 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -65,11 +65,6 @@ void* VirtualAllocExec(unsigned int size)
 #endif
 }
 
-void VirtualFree(void* VirtAddr)
-{
-	return vfree(VirtAddr);
-}
-
 void* PageAlloc(unsigned int count)
 {
 	void *p;
-- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

Use the one that the kernel provides, it does it correctly.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c          |    8 ++++----
 drivers/staging/hv/include/osd.h |    6 ------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 334812f..4b9b3fb 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -61,7 +61,7 @@ HvQueryHypervisorPresence (
     ecx = 0;
     edx = 0;
     op = HvCpuIdFunctionVersionAndFeatures;
-    do_cpuid(op, &eax, &ebx, &ecx, &edx);
+    cpuid(op, &eax, &ebx, &ecx, &edx);
 
 	return (ecx & HV_PRESENT_BIT);
 }
@@ -99,7 +99,7 @@ HvQueryHypervisorInfo (
     ecx = 0;
     edx = 0;
     op = HvCpuIdFunctionHvVendorAndMaxFunction;
-    do_cpuid(op, &eax, &ebx, &ecx, &edx);
+    cpuid(op, &eax, &ebx, &ecx, &edx);
 
     DPRINT_INFO(VMBUS, "Vendor ID: %c%c%c%c%c%c%c%c%c%c%c%c",
 	   (ebx & 0xFF),
@@ -121,7 +121,7 @@ HvQueryHypervisorInfo (
     ecx = 0;
     edx = 0;
     op = HvCpuIdFunctionHvInterface;
-    do_cpuid(op, &eax, &ebx, &ecx, &edx);
+    cpuid(op, &eax, &ebx, &ecx, &edx);
 
     DPRINT_INFO(VMBUS, "Interface ID: %c%c%c%c",
 	   (eax & 0xFF),
@@ -135,7 +135,7 @@ HvQueryHypervisorInfo (
 	ecx = 0;
 	edx = 0;
 	op = HvCpuIdFunctionMsHvVersion;
-	do_cpuid(op, &eax, &ebx, &ecx, &edx);
+	cpuid(op, &eax, &ebx, &ecx, &edx);
 	DPRINT_INFO(VMBUS, "OS Build:%d-%d.%d-%d-%d.%d",
 	       eax,
 	       ebx >> 16,
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 6eeb87e..0444c18 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -101,12 +101,6 @@ struct osd_timer {
 #endif
 
 
-static inline void do_cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
-{
-	__asm__ __volatile__("cpuid" : "=a" (*eax), "=b" (*ebx), "=c" ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:07 pm

From: Bill Pemberton <wfp5p@virginia.edu>

Remove PageMapVirtualAddress() and PageUnmapVirtualAddress() which
were wrappers around kmap_atomic() and kunmap_atomic()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |   10 ++++++----
 drivers/staging/hv/include/osd.h |    4 ----
 drivers/staging/hv/osd.c         |   11 -----------
 3 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 98d82f9..362efb0 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -22,7 +22,9 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <asm/kmap_types.h>
+
 #include "include/logging.h"
 
 #include "include/NetVscApi.h"
@@ -518,7 +520,7 @@ RndisFilterOnReceive(
 		return -1;
 	}
 
-	rndisHeader = (RNDIS_MESSAGE*)PageMapVirtualAddress(Packet->PageBuffers[0].Pfn);
+	rndisHeader = (RNDIS_MESSAGE *)kmap_atomic(pfn_to_page(Packet->PageBuffers[0].Pfn), KM_IRQ0);
 
 	rndisHeader = (void*)((unsigned long)rndisHeader + Packet->PageBuffers[0].Offset);
 
@@ -528,7 +530,7 @@ RndisFilterOnReceive(
 #if 0
 	if ( Packet->TotalDataBufferLength != rndisHeader->MessageLength )
 	{
-		PageUnmapVirtualAddress((void*)(unsigned long)rndisHeader - Packet->PageBuffers[0].Offset);
+		kunmap_atomic(rndisHeader - Packet->PageBuffers[0].Offset, KM_IRQ0);
 
 		DPRINT_ERR(NETVSC, "invalid rndis message? (expected %u bytes got %u)...dropping this message!",
 			rndisHeader->MessageLength, Packet->TotalDataBufferLength);
@@ -545,7 +547,7 @@ RndisFilterOnReceive(
 
 	memcpy(&rndisMessage, rndisHeader, (rndisHeader->MessageLength > sizeof(RNDIS_MESSAGE))?sizeof(RNDIS_MESSAGE):rndisHeader->MessageLength);
 
-	PageUnmapVirtualAddress((void*)(unsigned long)rndisHeader - ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Use the ones that the kernel provides, they do it correctly.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.h          |    4 ++--
 drivers/staging/hv/include/osd.h |   35 -----------------------------------
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index b5ea3dc..694c96b 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -133,14 +133,14 @@ static inline unsigned long long ReadMsr(int msr)
 {
 	unsigned long long val;
 
-	RDMSR(msr, val);
+	rdmsrl(msr, val);
 
 	return val;
 }
 
 static inline void WriteMsr(int msr, u64 val)
 {
-	WRMSR(msr, val);
+	wrmsrl(msr, val);
 
 	return;
 }
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 0444c18..a3e2e29 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -66,41 +66,6 @@ struct osd_timer {
 };
 
 
-
-#ifdef __x86_64__
-
-#define RDMSR(reg, v) {                                                        \
-    u32 h, l;                                                                 \
-     __asm__ __volatile__("rdmsr"                                                               \
-    : "=a" (l), "=d" (h)                                                       \
-    : "c" (reg));                                                              \
-    v = (((u64)h) << 32) | l;                                                         \
-}
-
-#define WRMSR(reg, v) {                                                        \
-    u32 h, l;                                                               \
-    l = (u32)(((u64)(v)) & 0xFFFFFFFF);                                  \
-    h = (u32)((((u64)(v)) >> 32) & 0xFFFFFFFF);                          \
-     __asm__ __volatile__("wrmsr"                                              \
-    : /* no outputs ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Use the real functions the kernel provides, so that people can see what
is actually going on in the code easier.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    2 +-
 drivers/staging/hv/Connection.c  |    6 +++---
 drivers/staging/hv/Hv.c          |   21 +++++++++++----------
 drivers/staging/hv/NetVsc.c      |    7 ++++---
 drivers/staging/hv/RndisFilter.c |    5 +++--
 drivers/staging/hv/include/osd.h |    8 --------
 drivers/staging/hv/osd.c         |   23 +----------------------
 7 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 61fc345..5b87643 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -416,7 +416,7 @@ VmbusChannelCreateGpadlHeader(
 	ASSERT( (Size & (PAGE_SIZE-1)) == 0);
 
 	pageCount = Size >> PAGE_SHIFT;
-	pfn = GetPhysicalAddress(Kbuffer) >> PAGE_SHIFT;
+	pfn = virt_to_phys(Kbuffer) >> PAGE_SHIFT;
 
 	/* do we need a gpadl body msg */
 	pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(VMBUS_CHANNEL_GPADL_HEADER) - sizeof(GPA_RANGE);
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index d7091ad..960c417 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -110,9 +110,9 @@ VmbusConnect(void)
 
 	msg->Header.MessageType = ChannelMessageInitiateContact;
 	msg->VMBusVersionRequested = VMBUS_REVISION_NUMBER;
-	msg->InterruptPage = GetPhysicalAddress(gVmbusConnection.InterruptPage);
-	msg->MonitorPage1 = GetPhysicalAddress(gVmbusConnection.MonitorPages);
-	msg->MonitorPage2 = GetPhysicalAddress((void *)((unsigned long)gVmbusConnection.MonitorPages + PAGE_SIZE));
+	msg->InterruptPage = virt_to_phys(gVmbusConnection.InterruptPage);
+	msg->MonitorPage1 = virt_to_phys(gVmbusConnection.MonitorPages);
+	msg->MonitorPage2 = virt_to_phys((void *)((unsigned ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Put a "osd_" prefix on the osd.c functions in order for us to play nicer
in the kernel namespace.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |   26 +++++++++++++-------------
 drivers/staging/hv/ChannelMgmt.c |   18 +++++++++---------
 drivers/staging/hv/Connection.c  |   14 +++++++-------
 drivers/staging/hv/Hv.c          |   16 ++++++++--------
 drivers/staging/hv/NetVsc.c      |   24 ++++++++++++------------
 drivers/staging/hv/RndisFilter.c |   10 +++++-----
 drivers/staging/hv/StorVsc.c     |   16 ++++++++--------
 drivers/staging/hv/include/osd.h |   25 +++++++++++--------------
 drivers/staging/hv/osd.c         |   32 +++++++++++---------------------
 9 files changed, 84 insertions(+), 97 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 5b87643..2346b85 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -230,7 +230,7 @@ VmbusChannelOpen(
 	NewChannel->ChannelCallbackContext = Context;
 
 	/* Allocate the ring buffer */
-	out = PageAlloc((SendRingBufferSize + RecvRingBufferSize) >> PAGE_SHIFT);
+	out = osd_PageAlloc((SendRingBufferSize + RecvRingBufferSize) >> PAGE_SHIFT);
 	/* out = kzalloc(sendRingBufferSize + recvRingBufferSize, GFP_KERNEL); */
 	ASSERT(out);
 	ASSERT(((unsigned long)out & (PAGE_SIZE-1)) == 0);
@@ -268,7 +268,7 @@ VmbusChannelOpen(
 	openInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
 	ASSERT(openInfo != NULL);
 
-	openInfo->WaitEvent = WaitEventCreate();
+	openInfo->WaitEvent = osd_WaitEventCreate();
 
 	openMsg = (VMBUS_CHANNEL_OPEN_CHANNEL*)openInfo->Msg;
 	openMsg->Header.MessageType				= ChannelMessageOpenChannel;
@@ -299,7 +299,7 @@ VmbusChannelOpen(
 	}
 
 	/* FIXME: Need to time-out here */
-	WaitEventWait(openInfo->WaitEvent);
+	osd_WaitEventWait(openInfo->WaitEvent);
 
 	if ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Now that we have properly prefixed the osd.c functions, we don't need to
include it in each of the modules.  So only build it into the hv_vmbus
module.

Export the symbols that the other hv_ modules need, so that they can
properly find them.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Makefile |    6 +++---
 drivers/staging/hv/osd.c    |    6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile
index d4142e2..f6ad670 100644
--- a/drivers/staging/hv/Makefile
+++ b/drivers/staging/hv/Makefile
@@ -4,6 +4,6 @@ obj-$(CONFIG_HYPERV_BLOCK)	+= hv_blkvsc.o
 obj-$(CONFIG_HYPERV_NET)	+= hv_netvsc.o
 
 hv_vmbus-objs := vmbus_drv.o osd.o Sources.o
-hv_storvsc-objs := storvsc_drv.o osd.o StorVsc.o
-hv_blkvsc-objs := blkvsc_drv.o osd.o BlkVsc.o
-hv_netvsc-objs := netvsc_drv.o osd.o NetVsc.o RndisFilter.o
+hv_storvsc-objs := storvsc_drv.o StorVsc.o
+hv_blkvsc-objs := blkvsc_drv.o BlkVsc.o
+hv_netvsc-objs := netvsc_drv.o NetVsc.o RndisFilter.o
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index d39e7a0..f257695 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -79,6 +79,7 @@ void *osd_PageAlloc(unsigned int count)
 	/* if (p) memset(p, 0, PAGE_SIZE); */
 	/* return p; */
 }
+EXPORT_SYMBOL_GPL(osd_PageAlloc);
 
 void osd_PageFree(void* page, unsigned int count)
 {
@@ -86,6 +87,7 @@ void osd_PageFree(void* page, unsigned int count)
 	/*struct page* p = virt_to_page(page);
 	__free_page(p);*/
 }
+EXPORT_SYMBOL_GPL(osd_PageFree);
 
 struct osd_waitevent *osd_WaitEventCreate(void)
 {
@@ -99,12 +101,14 @@ struct osd_waitevent *osd_WaitEventCreate(void)
 	init_waitqueue_head(&wait->event);
 	return wait;
 }
+EXPORT_SYMBOL_GPL(osd_WaitEventCreate);
 
 void osd_WaitEventSet(struct osd_waitevent *waitEvent)
 {
 	waitEvent->condition = 1;
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Use a real timer (there's only one in the code), no wrapper is needed,
it just increases the complexity for no reason.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |   17 +++++++--------
 drivers/staging/hv/Channel.h     |    5 +---
 drivers/staging/hv/ChannelMgmt.c |   12 +++-------
 drivers/staging/hv/ChannelMgmt.h |    2 +-
 drivers/staging/hv/include/osd.h |   15 -------------
 drivers/staging/hv/osd.c         |   43 --------------------------------------
 6 files changed, 14 insertions(+), 80 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 2346b85..be9770e 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -696,7 +696,7 @@ VmbusChannelClose(
 
 	/* Stop callback and cancel the timer asap */
 	Channel->OnChannelCallback = NULL;
-	osd_TimerStop(Channel->PollTimer);
+	del_timer(&Channel->poll_timer);
 
 	/* Send a closing message */
 	info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL);
@@ -1154,9 +1154,10 @@ VmbusChannelOnChannelEvent(
 	DumpVmbusChannel(Channel);
 	ASSERT(Channel->OnChannelCallback);
 #ifdef ENABLE_POLLING
-	osd_TimerStop(Channel->PollTimer);
+	del_timer(&Channel->poll_timer);
 	Channel->OnChannelCallback(Channel->ChannelCallbackContext);
-	osd_TimerStart(Channel->PollTimer, 100 /* 100us */);
+	channel->poll_timer.expires(jiffies + usecs_to_jiffies(100);
+	add_timer(&channel->poll_timer);
 #else
 	Channel->OnChannelCallback(Channel->ChannelCallbackContext);
 #endif
@@ -1171,18 +1172,16 @@ Description:
 	Timer event callback
 
 --*/
-static void
-VmbusChannelOnTimer(
-	void		*Context
-	)
+static void VmbusChannelOnTimer(unsigned long data)
 {
-	VMBUS_CHANNEL *channel = (VMBUS_CHANNEL*)Context;
+	VMBUS_CHANNEL *channel = (VMBUS_CHANNEL*)data;
 
 	if (channel->OnChannelCallback)
 	{
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

From: Nicolas Palix <npalix@diku.dk>

typedef SG_BUFFER_LIST is removed and its uses are replaced by the use of
struct scatterlist.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c    |   42 +++++++++++++-------------------------
 drivers/staging/hv/RingBuffer.c |   27 +++++++++++++------------
 drivers/staging/hv/RingBuffer.h |   13 ++++-------
 3 files changed, 34 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index be9770e..2938e58 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -773,7 +773,7 @@ VmbusChannelSendPacket(
 	VMPACKET_DESCRIPTOR desc;
 	u32 packetLen = sizeof(VMPACKET_DESCRIPTOR) + BufferLen;
 	u32 packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
-	SG_BUFFER_LIST bufferList[3];
+	struct scatterlist bufferList[3];
 	u64 alignedData=0;
 
 	DPRINT_ENTER(VMBUS);
@@ -790,14 +790,10 @@ VmbusChannelSendPacket(
 	desc.Length8 = (u16)(packetLenAligned >> 3);
 	desc.TransactionId = RequestId;
 
-	bufferList[0].Data = &desc;
-	bufferList[0].Length = sizeof(VMPACKET_DESCRIPTOR);
-
-	bufferList[1].Data = Buffer;
-	bufferList[1].Length = BufferLen;
-
-	bufferList[2].Data = &alignedData;
-	bufferList[2].Length = packetLenAligned - packetLen;
+	sg_init_table(bufferList,3);
+	sg_set_buf(&bufferList[0], &desc, sizeof(VMPACKET_DESCRIPTOR));
+	sg_set_buf(&bufferList[1], Buffer, BufferLen);
+	sg_set_buf(&bufferList[2], &alignedData, packetLenAligned - packetLen);
 
 	ret = RingBufferWrite(
 		&Channel->Outbound,
@@ -841,7 +837,7 @@ VmbusChannelSendPacketPageBuffer(
 	u32 descSize;
 	u32 packetLen;
 	u32 packetLenAligned;
-	SG_BUFFER_LIST bufferList[3];
+	struct scatterlist bufferList[3];
 	u64 alignedData=0;
 
 	DPRINT_ENTER(VMBUS);
@@ -872,14 +868,10 @@ VmbusChannelSendPacketPageBuffer(
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

hv block driver uses scsi_*() interfaces so it should depend on SCSI.

ERROR: "scsi_normalize_sense" [drivers/staging/hv/hv_blkvsc.ko] undefined!
ERROR: "scsi_print_sense_hdr" [drivers/staging/hv/hv_blkvsc.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index 226ed0a..4a1f4f1 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -15,7 +15,7 @@ config HYPERV_STORAGE
 
 config HYPERV_BLOCK
 	tristate "Microsoft Hyper-V virtual block driver"
-	depends on BLOCK && m
+	depends on BLOCK && SCSI && m
 	default n
 	help
 	  Select this option to enable the Hyper-V virtual block driver.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

They aren't needed as wrappers.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c    |   56 ++++++++++++++++++++-----------------------
 drivers/staging/hv/Hv.h    |   20 ---------------
 drivers/staging/hv/Vmbus.c |    2 +-
 3 files changed, 27 insertions(+), 51 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 9b096a8..77003bb 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -251,19 +251,17 @@ HvInit (
     /* HvQueryHypervisorFeatures(maxLeaf); */
 
 	/* Determine if we are running on xenlinux (ie x2v shim) or native linux */
-	gHvContext.GuestId = ReadMsr(HV_X64_MSR_GUEST_OS_ID);
-
+	rdmsrl(HV_X64_MSR_GUEST_OS_ID, gHvContext.GuestId);
 	if (gHvContext.GuestId == 0)
 	{
 		/* Write our OS info */
-		WriteMsr(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
+		wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
 
 		gHvContext.GuestId = HV_LINUX_GUEST_ID;
 	}
 
 	/* See if the hypercall page is already set */
-	hypercallMsr.AsUINT64 = ReadMsr(HV_X64_MSR_HYPERCALL);
-
+	rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
 	if (gHvContext.GuestId == HV_LINUX_GUEST_ID)
 	{
 		/* Allocate the hypercall page memory */
@@ -279,12 +277,11 @@ HvInit (
 		hypercallMsr.Enable = 1;
 		/* hypercallMsr.GuestPhysicalAddress = virt_to_phys(virtAddr) >> PAGE_SHIFT; */
 		hypercallMsr.GuestPhysicalAddress = vmalloc_to_pfn(virtAddr);
-		WriteMsr(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
+		wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
 
 	/* Confirm that hypercall page did get setup. */
 		hypercallMsr.AsUINT64 = 0;
-		hypercallMsr.AsUINT64 = ReadMsr(HV_X64_MSR_HYPERCALL);
-
+		rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
 		if (!hypercallMsr.Enable)
 		{
 			DPRINT_ERR(VMBUS, "unable to set hypercall page!!");
@@ -328,7 +325,7 @@ Cleanup:
 		if (hypercallMsr.Enable)
 		{
 			hypercallMsr.AsUINT64 = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

From: Jan Beulich <JBeulich@novell.com>

Hyper-V sub-components' options should all depend on the base option.

The default of these sub-component options is also more reasonably set
to that of the base option (since it makes little sense to enable the
base option without the sub-component ones).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Kconfig |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/hv/Kconfig b/drivers/staging/hv/Kconfig
index 4a1f4f1..4044702 100644
--- a/drivers/staging/hv/Kconfig
+++ b/drivers/staging/hv/Kconfig
@@ -6,23 +6,27 @@ config HYPERV
 	  Select this option to run Linux as a Hyper-V client operating
 	  system.
 
+if HYPERV
+
 config HYPERV_STORAGE
 	tristate "Microsoft Hyper-V virtual storage driver"
-	depends on SCSI && m
-	default n
+	depends on SCSI
+	default HYPERV
 	help
 	 Select this option to enable the Hyper-V virtual storage driver.
 
 config HYPERV_BLOCK
 	tristate "Microsoft Hyper-V virtual block driver"
-	depends on BLOCK && SCSI && m
-	default n
+	depends on BLOCK && SCSI
+	default HYPERV
 	help
 	  Select this option to enable the Hyper-V virtual block driver.
 
 config HYPERV_NET
 	tristate "Microsoft Hyper-V virtual network driver"
-	depends on NET && m
-	default n
+	depends on NET
+	default HYPERV
 	help
 	  Select this option to enable the Hyper-V virtual network driver.
+
+endif
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |   26 ++-------
 drivers/staging/hv/Hv.h |  137 +++++++++++++++++++++-------------------------
 2 files changed, 69 insertions(+), 94 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 77003bb..438bc2e 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -224,10 +224,7 @@ Description:
 	before any other routines in here are called
 
 --*/
-static int
-HvInit (
-    void
-    )
+int HvInit (void)
 {
 	int ret=0;
     int maxLeaf;
@@ -346,10 +343,7 @@ Description:
 	Cleanup routine. This routine is called normally during driver unloading or exiting.
 
 --*/
-static void
-HvCleanup (
-    void
-    )
+void HvCleanup (void)
 {
 	HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
 
@@ -388,8 +382,7 @@ Description:
 	involves a hypercall.
 
 --*/
-static HV_STATUS
-HvPostMessage(
+HV_STATUS HvPostMessage(
 	HV_CONNECTION_ID connectionId,
 	HV_MESSAGE_TYPE  messageType,
 	void *            payload,
@@ -442,8 +435,7 @@ Description:
 	involves a hypercall.
 
 --*/
-static HV_STATUS
-HvSignalEvent(void)
+HV_STATUS HvSignalEvent(void)
 {
 	HV_STATUS status;
 
@@ -464,10 +456,7 @@ Description:
 	Otherwise, we create and initialize the message and event pages.
 
 --*/
-static int
-HvSynicInit (
-	u32 irqVector
-	)
+int HvSynicInit (u32 irqVector)
 {
 	u64			version;
 	HV_SYNIC_SIMP	simp;
@@ -607,10 +596,7 @@ Description:
 	Cleanup routine for HvSynicInit().
 
 --*/
-static void
-HvSynicCleanup(
-	void
-	)
+void HvSynicCleanup(void)
 {
     HV_SYNIC_SINT	sharedSint;
 	HV_SYNIC_SIMP	simp;
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index a7e67cd..851e647 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -29,48 +29,41 @@
 
 #include "include/HvTypes.h"
 #include "include/HvStatus.h"
-/* #include "HvVmApi.h" */
-/* #include "HvKeApi.h" ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c |   38 ++++-----
 drivers/staging/hv/Channel.h |  195 +++++++++++++++++-------------------------
 2 files changed, 93 insertions(+), 140 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 2938e58..89ddbf1 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -159,7 +159,7 @@ Description:
 	Retrieve various channel debug info
 
 --*/
-static void
+void
 VmbusChannelGetDebugInfo(
 	VMBUS_CHANNEL				*Channel,
 	VMBUS_CHANNEL_DEBUG_INFO	*DebugInfo
@@ -203,7 +203,7 @@ Description:
 	Open the specified channel.
 
 --*/
-static int
+int
 VmbusChannelOpen(
 	VMBUS_CHANNEL			*NewChannel,
 	u32					SendRingBufferSize,
@@ -516,7 +516,7 @@ Description:
 	Estabish a GPADL for the specified buffer
 
 --*/
-static int
+int
 VmbusChannelEstablishGpadl(
 	VMBUS_CHANNEL	*Channel,
 	void *			Kbuffer,	/* from kmalloc() */
@@ -621,7 +621,7 @@ Description:
 	Teardown the specified GPADL handle
 
 --*/
-static int
+int
 VmbusChannelTeardownGpadl(
 	VMBUS_CHANNEL	*Channel,
 	u32			GpadlHandle
@@ -682,7 +682,7 @@ Description:
 	Close the specified channel
 
 --*/
-static void
+void
 VmbusChannelClose(
 	VMBUS_CHANNEL	*Channel
 	)
@@ -759,7 +759,7 @@ Description:
 	Send the specified buffer on the given channel
 
 --*/
-static int
+int
 VmbusChannelSendPacket(
 	VMBUS_CHANNEL		*Channel,
 	const void *			Buffer,
@@ -821,7 +821,7 @@ Description:
 	Send a range of single-page buffer packets using a GPADL Direct packet type.
 
 --*/
-static int
+int
 VmbusChannelSendPacketPageBuffer(
 	VMBUS_CHANNEL		*Channel,
 	PAGE_BUFFER			PageBuffers[],
@@ -900,7 +900,7 @@ Description:
 	Send a multi-page buffer packet using a GPADL Direct packet type.
 
 --*/
-static int
+int
 VmbusChannelSendPacketMultiPageBuffer(
 	VMBUS_CHANNEL		*Channel,
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/VersionInfo.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/VersionInfo.h b/drivers/staging/hv/VersionInfo.h
index ef590a0..9c3641d 100644
--- a/drivers/staging/hv/VersionInfo.h
+++ b/drivers/staging/hv/VersionInfo.h
@@ -21,9 +21,11 @@
  *
  */
 
+#ifndef __HV_VERSION_INFO
+#define __HV_VERSION_INFO
 
-#pragma once
+static const char VersionDate[] = __DATE__;
+static const char VersionTime[] = __TIME__;
+static const char VersionDesc[] = "Version 2.0";
 
-static const char VersionDate[]=__DATE__;
-static const char VersionTime[]=__TIME__;
-static const char VersionDesc[]= "Version 2.0";
+#endif
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |   19 ++-----
 drivers/staging/hv/ChannelMgmt.h |  112 +++++++++++++++++---------------------
 2 files changed, 54 insertions(+), 77 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 8c83721..79770c8 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -129,7 +129,7 @@ Description:
 	Allocate and initialize a vmbus channel object
 
 --*/
-static VMBUS_CHANNEL* AllocVmbusChannel(void)
+VMBUS_CHANNEL* AllocVmbusChannel(void)
 {
 	VMBUS_CHANNEL* channel;
 
@@ -189,7 +189,7 @@ Description:
 	Release the resources used by the vmbus channel object
 
 --*/
-static void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
+void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
 {
 	del_timer(&Channel->poll_timer);
 
@@ -665,10 +665,7 @@ Description:
 	This is invoked in the vmbus worker thread context.
 
 --*/
-static void
-VmbusOnChannelMessage(
-	void *Context
-	)
+void VmbusOnChannelMessage(void *Context)
 {
 	HV_MESSAGE *msg=(HV_MESSAGE*)Context;
 	VMBUS_CHANNEL_MESSAGE_HEADER* hdr;
@@ -714,10 +711,7 @@ Description:
 	Send a request to get all our pending offers.
 
 --*/
-static int
-VmbusChannelRequestOffers(
-	void
-	)
+int VmbusChannelRequestOffers(void)
 {
 	int ret=0;
 	VMBUS_CHANNEL_MESSAGE_HEADER* msg;
@@ -776,10 +770,7 @@ Description:
 	Release channels that are unattached/unconnected ie (no drivers associated)
 
 --*/
-static void
-VmbusChannelReleaseUnattachedChannels(
-	void
-	)
+void VmbusChannelReleaseUnattachedChannels(void)
 {
 	LIST_ENTRY *entry;
 	VMBUS_CHANNEL *channel;
diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index ea901dc..6a7bc4c 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -34,7 +34,7 @@
 
 
 
-typedef void (*PFN_CHANNEL_CALLBACK)(void * ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelInterface.c |   11 ++---------
 drivers/staging/hv/ChannelInterface.h |   11 ++---------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 2a58015..6a30691 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -162,10 +162,7 @@ IVmbusChannelTeardownGpadl(
 
 }
 
-static void
-GetChannelInterface(
-	VMBUS_CHANNEL_INTERFACE *ChannelInterface
-	)
+void GetChannelInterface(VMBUS_CHANNEL_INTERFACE *ChannelInterface)
 {
 	ChannelInterface->Open						= IVmbusChannelOpen;
 	ChannelInterface->Close						= IVmbusChannelClose;
@@ -180,11 +177,7 @@ GetChannelInterface(
 }
 
 
-static void
-GetChannelInfo(
-	struct hv_device *Device,
-	DEVICE_INFO			*DeviceInfo
-			   )
+void GetChannelInfo(struct hv_device *Device, DEVICE_INFO *DeviceInfo)
 {
 	VMBUS_CHANNEL_DEBUG_INFO debugInfo;
 
diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h
index 3385914..49a7c7d 100644
--- a/drivers/staging/hv/ChannelInterface.h
+++ b/drivers/staging/hv/ChannelInterface.h
@@ -27,15 +27,8 @@
 
 #include "include/VmbusApi.h"
 
-static void
-GetChannelInterface(
-	VMBUS_CHANNEL_INTERFACE *ChannelInterface
-	);
+void GetChannelInterface(VMBUS_CHANNEL_INTERFACE *ChannelInterface);
 
-static void
-GetChannelInfo(
-	struct hv_device *Device,
-	DEVICE_INFO			*DeviceInfo
-	);
+void GetChannelInfo(struct hv_device *Device, DEVICE_INFO *DeviceInfo);
 
 #endif /* _CHANNEL_INTERFACE_H_ */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RingBuffer.c |   51 ++++-------------
 drivers/staging/hv/RingBuffer.h |  119 +++++++++++++++++----------------------
 2 files changed, 62 insertions(+), 108 deletions(-)

diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index 571f9db..0ea6a0f 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -203,8 +203,7 @@ Description:
 	Dump out to console the ring buffer info
 
 --*/
-static void
-DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
+void DumpRingInfo(RING_BUFFER_INFO *RingInfo, char *Prefix)
 {
 	u32 bytesAvailToWrite;
 	u32 bytesAvailToRead;
@@ -249,11 +248,8 @@ Description:
 	Get various debug metrics for the specified ring buffer
 
 --*/
-static void
-RingBufferGetDebugInfo(
-	RING_BUFFER_INFO		*RingInfo,
-	RING_BUFFER_DEBUG_INFO	*DebugInfo
-	)
+void RingBufferGetDebugInfo(RING_BUFFER_INFO *RingInfo,
+			    RING_BUFFER_DEBUG_INFO *DebugInfo)
 {
 	u32 bytesAvailToWrite;
 	u32 bytesAvailToRead;
@@ -281,10 +277,7 @@ Description:
 	Get the interrupt mask for the specified ring buffer
 
 --*/
-static u32
-GetRingBufferInterruptMask(
-	RING_BUFFER_INFO *rbi
-	)
+u32 GetRingBufferInterruptMask(RING_BUFFER_INFO *rbi)
 {
 	return rbi->RingBuffer->InterruptMask;
 }
@@ -298,12 +291,7 @@ Description:
 	Initialize the ring buffer
 
 --*/
-static int
-RingBufferInit(
-	RING_BUFFER_INFO	*RingInfo,
-	void				*Buffer,
-	u32				BufferLen
-	)
+int RingBufferInit(RING_BUFFER_INFO *RingInfo, void *Buffer, u32 BufferLen)
 {
 	ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE);
 
@@ -329,10 +317,7 @@ Description:
 	Cleanup the ring buffer
 
 --*/
-static void
-RingBufferCleanup(
-	RING_BUFFER_INFO* RingInfo
-	)
+void RingBufferCleanup(RING_BUFFER_INFO* RingInfo)
 {
 }
 
@@ -345,12 +330,8 @@ Description:
 	Write to the ring buffer
 
 --*/
-static ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Connection.c   |   27 ++--------
 drivers/staging/hv/Vmbus.c        |   16 ++----
 drivers/staging/hv/VmbusPrivate.h |  103 +++++++++++-------------------------
 3 files changed, 43 insertions(+), 103 deletions(-)

diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 1736434..0370a0b 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -44,8 +44,7 @@ Description:
 	Sends a connect request on the partition service connection
 
 --*/
-static int
-VmbusConnect(void)
+int VmbusConnect(void)
 {
 	int ret=0;
 	VMBUS_CHANNEL_MSGINFO *msgInfo=NULL;
@@ -203,10 +202,7 @@ Description:
 	Sends a disconnect request on the partition service connection
 
 --*/
-static int
-VmbusDisconnect(
-	void
-	)
+int VmbusDisconnect(void)
 {
 	int ret=0;
 	VMBUS_CHANNEL_UNLOAD *msg;
@@ -259,10 +255,7 @@ Description:
 	Get the channel object given its child relative id (ie channel id)
 
 --*/
-static VMBUS_CHANNEL*
-GetChannelFromRelId(
-	u32 relId
-	)
+VMBUS_CHANNEL *GetChannelFromRelId(u32 relId)
 {
 	VMBUS_CHANNEL* channel;
 	VMBUS_CHANNEL* foundChannel=NULL;
@@ -334,10 +327,7 @@ Description:
 	Handler for events
 
 --*/
-static void
-VmbusOnEvents(
-  void
-	)
+void VmbusOnEvents(void)
 {
 	int dword;
 	/* int maxdword = PAGE_SIZE >> 3; // receive size is 1/2 page and divide that by 4 bytes */
@@ -394,11 +384,7 @@ Description:
 	Send a msg on the vmbus's message connection
 
 --*/
-static int
-VmbusPostMessage(
-	void *			buffer,
-	size_t			bufferLen
-	)
+int VmbusPostMessage(void *buffer, size_t bufferLen)
 {
 	int ret=0;
 	HV_CONNECTION_ID connId;
@@ -424,8 +410,7 @@ Description:
 	Send an event notification to the parent
 
 --*/
-static int
-VmbusSetEvent(u32 childRelId)
+int VmbusSetEvent(u32 childRelId)
 {
 	int ret=0;
 
diff --git a/drivers/staging/hv/Vmbus.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's a .c file including other .c files, ick.
Remove that mess now that the header files are unwound.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c          |    1 +
 drivers/staging/hv/ChannelInterface.c |    4 ++++
 drivers/staging/hv/ChannelMgmt.c      |    2 ++
 drivers/staging/hv/Connection.c       |    4 +++-
 drivers/staging/hv/Hv.c               |    3 ++-
 drivers/staging/hv/Makefile           |    4 +++-
 drivers/staging/hv/RingBuffer.c       |    3 ++-
 drivers/staging/hv/Sources.c          |   30 ------------------------------
 8 files changed, 17 insertions(+), 34 deletions(-)
 delete mode 100644 drivers/staging/hv/Sources.c

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 89ddbf1..a8398a2 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -22,6 +22,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include "include/osd.h"
 #include "include/logging.h"
 
diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 6a30691..23a1e17 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -21,6 +21,10 @@
  *
  */
 
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include "include/osd.h"
+
 #include "VmbusPrivate.h"
 
 static int
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 79770c8..4680e14 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -22,6 +22,8 @@
  */
 
 
+#include <linux/kernel.h>
+#include <linux/mm.h>
 #include "include/osd.h"
 #include "include/logging.h"
 
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 0370a0b..01aa669 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -22,8 +22,10 @@
  */
 
 
+#include <linux/kernel.h>
+#include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cleans up coding style issues with NetVsc.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.h |   52 ++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index 770a7b4..ba81452 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -31,60 +31,58 @@
 
 #include "include/NetVscApi.h"
 
-/* #defines */
+/* #define NVSC_MIN_PROTOCOL_VERSION		1 */
+/* #define NVSC_MAX_PROTOCOL_VERSION		1 */
 
-/* #define NVSC_MIN_PROTOCOL_VERSION                       1 */
-/* #define NVSC_MAX_PROTOCOL_VERSION                       1 */
+#define NETVSC_SEND_BUFFER_SIZE			(64*1024)	/* 64K */
+#define NETVSC_SEND_BUFFER_ID			0xface
 
-#define NETVSC_SEND_BUFFER_SIZE				64*1024 /* 64K */
-#define NETVSC_SEND_BUFFER_ID				0xface
 
+#define NETVSC_RECEIVE_BUFFER_SIZE		(1024*1024)	/* 1MB */
 
-#define NETVSC_RECEIVE_BUFFER_SIZE			1024*1024 /* 1MB */
+#define NETVSC_RECEIVE_BUFFER_ID		0xcafe
 
-#define NETVSC_RECEIVE_BUFFER_ID			0xcafe
-
-#define NETVSC_RECEIVE_SG_COUNT				1
+#define NETVSC_RECEIVE_SG_COUNT			1
 
 /* Preallocated receive packets */
 #define NETVSC_RECEIVE_PACKETLIST_COUNT		256
 
 
-/* Data types */
-
-
 /* Per netvsc channel-specific */
 struct NETVSC_DEVICE {
 	struct hv_device *Device;
 
 	atomic_t RefCount;
 	atomic_t NumOutstandingSends;
-	/* List of free preallocated hv_netvsc_packet to represent receive packet */
-	LIST_ENTRY						ReceivePacketList;
+	/*
+	 * List of free preallocated hv_netvsc_packet to represent receive
+	 * packet
+	 */
+	LIST_ENTRY ReceivePacketList;
 	spinlock_t receive_packet_list_lock;
 
 	/* Send buffer allocated by us but manages by NetVSP */
-	void *							SendBuffer;
-	u32							SendBufferSize;
-	u32							SendBufferGpadlHandle;
-	u32							SendSectionSize;
+	void *SendBuffer;
+	u32 SendBufferSize;
+	u32 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This removes the typedefs from Hv.h, it's now clean from a
codingstyle.pl standpoint.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |   12 ++++++------
 drivers/staging/hv/Hv.h |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index c228e60..f706ab8 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -30,11 +30,11 @@
 /* Globals */
 
 /* The one and only */
-HV_CONTEXT gHvContext={
-	.SynICInitialized = false,
-	.HypercallPage = NULL,
-	.SignalEventParam = NULL,
-	.SignalEventBuffer = NULL,
+struct hv_context gHvContext = {
+	.SynICInitialized	= false,
+	.HypercallPage		= NULL,
+	.SignalEventParam	= NULL,
+	.SignalEventBuffer	= NULL,
 };
 
 
@@ -299,7 +299,7 @@ int HvInit (void)
 		    (u64)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT);
 
 	/* Setup the global signal event param for the signal event hypercall */
-	gHvContext.SignalEventBuffer = kmalloc(sizeof(HV_INPUT_SIGNAL_EVENT_BUFFER), GFP_KERNEL);
+	gHvContext.SignalEventBuffer = kmalloc(sizeof(struct hv_input_signal_event_buffer), GFP_KERNEL);
 	if (!gHvContext.SignalEventBuffer)
 	{
 		goto Cleanup;
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 851e647..9262135 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -104,12 +104,12 @@ static const GUID VMBUS_SERVICE_ID = {
 #define MAX_NUM_CPUS	1
 
 
-typedef struct {
+struct hv_input_signal_event_buffer {
 	u64 Align8;
 	HV_INPUT_SIGNAL_EVENT Event;
-} HV_INPUT_SIGNAL_EVENT_BUFFER;
+};
 
-typedef struct {
+struct hv_context {
 	/* XenLinux or native Linux. If XenLinux, the hypercall and synic pages
 	 * has already been initialized */
 	u64 GuestId;
@@ -122,15 +122,15 @@ typedef struct {
 	 * This is used as an input param to HvCallSignalEvent hypercall. The
 	 * input param is immutable in our usage and must be dynamic mem ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Cleans up coding style issues with RndisFilter.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.h |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.h b/drivers/staging/hv/RndisFilter.h
index ebacbe0..6725fe5 100644
--- a/drivers/staging/hv/RndisFilter.h
+++ b/drivers/staging/hv/RndisFilter.h
@@ -32,7 +32,8 @@
 
 #include "include/rndis.h"
 
-#define RNDIS_HEADER_SIZE	(sizeof(RNDIS_MESSAGE) - sizeof(RNDIS_MESSAGE_CONTAINER))
+#define RNDIS_HEADER_SIZE	(sizeof(RNDIS_MESSAGE) - \
+				 sizeof(RNDIS_MESSAGE_CONTAINER))
 
 #define NDIS_PACKET_TYPE_DIRECTED	0x00000001
 #define NDIS_PACKET_TYPE_MULTICAST	0x00000002
@@ -48,14 +49,8 @@
 #define NDIS_PACKET_TYPE_MAC_FRAME	0x00000800
 
 
-
-
 /* Interface */
 
-int
-RndisFilterInit(
-	NETVSC_DRIVER_OBJECT *Driver
-	);
-
+extern int RndisFilterInit(NETVSC_DRIVER_OBJECT *Driver);
 
 #endif /* _RNDISFILTER_H_ */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This removes the typedefs from ChannelMgmt.h, it's now clean from a
codingstyle.pl standpoint.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c          |  121 +++++++++++----------------------
 drivers/staging/hv/Channel.h          |   24 +++---
 drivers/staging/hv/ChannelInterface.c |   22 +++---
 drivers/staging/hv/ChannelMgmt.c      |   48 +++++++-------
 drivers/staging/hv/ChannelMgmt.h      |   43 +++++-------
 drivers/staging/hv/Connection.c       |   14 ++--
 drivers/staging/hv/VmbusPrivate.h     |    2 +-
 7 files changed, 114 insertions(+), 160 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index a8398a2..78850f3 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -29,24 +29,14 @@
 #include "VmbusPrivate.h"
 
 /* Internal routines */
-static int
-VmbusChannelCreateGpadlHeader(
+static int VmbusChannelCreateGpadlHeader(
 	void *					Kbuffer,	/* must be phys and virt contiguous */
 	u32					Size,		/* page-size multiple */
-	VMBUS_CHANNEL_MSGINFO	**msgInfo,
+	struct vmbus_channel_msginfo **msgInfo,
 	u32					*MessageCount
 	);
-
-static void
-DumpVmbusChannel(
-	VMBUS_CHANNEL			*Channel
-	);
-
-
-static void
-VmbusChannelSetEvent(
-	VMBUS_CHANNEL			*Channel
-	);
+static void DumpVmbusChannel(struct vmbus_channel *channel);
+static void VmbusChannelSetEvent(struct vmbus_channel *channel);
 
 
 #if 0
@@ -93,10 +83,7 @@ Description:
 	Trigger an event notification on the specified channel.
 
 --*/
-static void
-VmbusChannelSetEvent(
-	VMBUS_CHANNEL			*Channel
-	)
+static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 {
 	HV_MONITOR_PAGE *monitorPage;
 
@@ -125,10 +112,7 @@ VmbusChannelSetEvent(
 }
 
 #if 0
-static void
-VmbusChannelClearEvent(
-	VMBUS_CHANNEL			*Channel
-	)
+static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 {
 	HV_MONITOR_PAGE *monitorPage;
 
@@ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Lots of coding style cleanups in vstorage.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/vstorage.h |  323 +++++++++++----------------------
 1 files changed, 110 insertions(+), 213 deletions(-)

diff --git a/drivers/staging/hv/include/vstorage.h b/drivers/staging/hv/include/vstorage.h
index 33646e7..dc04185 100644
--- a/drivers/staging/hv/include/vstorage.h
+++ b/drivers/staging/hv/include/vstorage.h
@@ -22,286 +22,183 @@
  */
 
 
-#pragma once
-
-/* #include <vmbuspacketformat.h> */
-/* #include <ntddscsi.h> */
-
-#define C_ASSERT(x)
-
-/*  public interface to the server */
-
-
-
-/*  Storvsp device interface guid */
-
-
-
-
-/*  Protocol versions. */
-
-
 
 /* vstorage.w revision number.  This is used in the case of a version match, */
 /* to alert the user that structure sizes may be mismatched even though the */
 /* protocol versions match. */
 
-
 #define REVISION_STRING(REVISION_) #REVISION_
-#define FILL_VMSTOR_REVISION(RESULT_LVALUE_)                     \
-{                                                                \
-    char *revisionString = REVISION_STRING($Revision: 6 $) + 11; \
-    RESULT_LVALUE_ = 0;                                          \
-    while (*revisionString >= '0' && *revisionString <= '9')     \
-    {                                                            \
-	RESULT_LVALUE_ *= 10;                                    \
-	RESULT_LVALUE_ += *revisionString - '0';                 \
-	revisionString++;                                        \
-    }                                                            \
+#define FILL_VMSTOR_REVISION(RESULT_LVALUE_)				\
+{									\
+	char *revisionString = REVISION_STRING($Revision: 6 $) + 11;	\
+	RESULT_LVALUE_ = 0;						\
+	while (*revisionString >= '0' && *revisionString <= '9') {	\
+		RESULT_LVALUE_ *= 10;					\
+		RESULT_LVALUE_ += *revisionString - ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This moves osd.h out of the include/ subdirectory.

No code changes are made here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c            |    1 +
 drivers/staging/hv/Channel.c           |    2 +-
 drivers/staging/hv/Channel.h           |    1 -
 drivers/staging/hv/ChannelInterface.c  |    3 +--
 drivers/staging/hv/ChannelMgmt.c       |    2 +-
 drivers/staging/hv/ChannelMgmt.h       |    1 -
 drivers/staging/hv/Connection.c        |    1 +
 drivers/staging/hv/Hv.c                |    1 +
 drivers/staging/hv/Hv.h                |    2 --
 drivers/staging/hv/NetVsc.c            |    1 +
 drivers/staging/hv/RingBuffer.c        |    1 +
 drivers/staging/hv/RingBuffer.h        |    2 --
 drivers/staging/hv/RndisFilter.c       |    2 +-
 drivers/staging/hv/RndisFilter.h       |    1 -
 drivers/staging/hv/StorVsc.c           |    2 +-
 drivers/staging/hv/Vmbus.c             |    1 +
 drivers/staging/hv/blkvsc_drv.c        |    1 +
 drivers/staging/hv/include/List.h      |    1 -
 drivers/staging/hv/include/VmbusApi.h  |    1 -
 drivers/staging/hv/include/logging.h   |    1 -
 drivers/staging/hv/netvsc_drv.c        |    1 +
 drivers/staging/hv/osd.c               |    2 +-
 drivers/staging/hv/{include => }/osd.h |    0
 drivers/staging/hv/storvsc_drv.c       |    2 +-
 drivers/staging/hv/vmbus_drv.c         |    2 +-
 25 files changed, 16 insertions(+), 19 deletions(-)
 rename drivers/staging/hv/{include => }/osd.h (100%)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 526a0ab..c2e0367 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -22,6 +22,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include "osd.h"
 #include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 78850f3..5f40161 100644
--- a/drivers/staging/hv/Channel.c
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This fixes up the coding style issues in osd.h, with the exception of
the typedefs, they will be removed later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/osd.h |   36 ++++++++++++++++--------------------
 1 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/hv/osd.h b/drivers/staging/hv/osd.h
index 949c273..1723248 100644
--- a/drivers/staging/hv/osd.h
+++ b/drivers/staging/hv/osd.h
@@ -27,32 +27,28 @@
 
 
 /* Defines */
+#define ALIGN_UP(value, align)	(((value) & (align-1)) ?		\
+				 (((value) + (align-1)) & ~(align-1)) :	\
+				 (value))
+#define ALIGN_DOWN(value, align)	((value) & ~(align-1))
+#define NUM_PAGES_SPANNED(addr, len)	((ALIGN_UP(addr+len, PAGE_SIZE) - \
+					 ALIGN_DOWN(addr, PAGE_SIZE)) >>  \
+					 PAGE_SHIFT)
 
-
-
-#define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
-#define ALIGN_DOWN(value, align)		( (value) & ~(align-1) )
-#define NUM_PAGES_SPANNED(addr, len)	( (ALIGN_UP(addr+len, PAGE_SIZE) - ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
-
-#define LOWORD(dw)		((unsigned short) (dw))
-#define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
+#define LOWORD(dw)	((unsigned short)(dw))
+#define HIWORD(dw)	((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF))
 
 typedef struct _DLIST_ENTRY {
-   struct _DLIST_ENTRY *Flink;
-   struct _DLIST_ENTRY *Blink;
+	struct _DLIST_ENTRY *Flink;
+	struct _DLIST_ENTRY *Blink;
 } DLIST_ENTRY;
 
-
-/* Other types */
-
-/* typedef unsigned char		GUID[16]; */
-
 typedef struct {
-	unsigned char	Data[16];
+	unsigned char Data[16];
 } GUID;
 
 struct osd_waitevent {
-	int	condition;
+	int condition;
 	wait_queue_head_t event;
 };
 
@@ -61,15 +57,15 @@ struct osd_waitevent {
 extern void *osd_VirtualAllocExec(unsigned int size);
 
 extern void *osd_PageAlloc(unsigned int count);
-extern void osd_PageFree(void* page, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

GUID should not be a typedef.  As proof of the problem of typedefs,
look, we are passing 2 of these as a value in functions!  Bah...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c                        |   18 +++--
 drivers/staging/hv/Channel.c                       |    4 +-
 drivers/staging/hv/ChannelInterface.c              |    4 +-
 drivers/staging/hv/ChannelMgmt.c                   |   58 ++++++++++---
 drivers/staging/hv/ChannelMgmt.h                   |    4 +-
 drivers/staging/hv/Hv.h                            |    4 +-
 drivers/staging/hv/NetVsc.c                        |    9 ++-
 drivers/staging/hv/StorVsc.c                       |    9 ++-
 drivers/staging/hv/Vmbus.c                         |   24 +++--
 drivers/staging/hv/VmbusPrivate.h                  |    4 +-
 drivers/staging/hv/blkvsc_drv.c                    |    2 +-
 drivers/staging/hv/include/List.h                  |   13 +--
 drivers/staging/hv/include/NetVscApi.h             |    6 +-
 drivers/staging/hv/include/VmbusApi.h              |   12 ++--
 drivers/staging/hv/include/VmbusChannelInterface.h |    4 +-
 drivers/staging/hv/include/vmbus.h                 |    6 +-
 drivers/staging/hv/netvsc_drv.c                    |    2 +-
 drivers/staging/hv/osd.h                           |   11 +--
 drivers/staging/hv/storvsc_drv.c                   |    2 +-
 drivers/staging/hv/vmbus_drv.c                     |   91 ++++++++++++-------
 20 files changed, 175 insertions(+), 112 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index c2e0367..b2e6651 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -28,8 +28,11 @@
 static const char* gBlkDriverName="blkvsc";
 
 /* {32412632-86cb-44a2-9b5c-50d1417354f5} */
-static const GUID gBlkVscDeviceType={
-	.Data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5}
+static ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

As GUID was a typedef, it hid the fact that we were passing it
a 2 variables in functions.  This fixes this up by passing it
as a pointer, as it should be.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c      |    4 ++--
 drivers/staging/hv/Vmbus.c            |    4 ++--
 drivers/staging/hv/VmbusPrivate.h     |    4 ++--
 drivers/staging/hv/include/VmbusApi.h |    2 +-
 drivers/staging/hv/vmbus_drv.c        |   22 ++++++++++++----------
 5 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index f96cba7..ec078bd 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -284,8 +284,8 @@ VmbusChannelProcessOffer(
 	/* Start the process of binding this offer to the driver */
 	/* We need to set the DeviceObject field before calling VmbusChildDeviceAdd() */
 	newChannel->DeviceObject = VmbusChildDeviceCreate(
-		newChannel->OfferMsg.Offer.InterfaceType,
-		newChannel->OfferMsg.Offer.InterfaceInstance,
+		&newChannel->OfferMsg.Offer.InterfaceType,
+		&newChannel->OfferMsg.Offer.InterfaceInstance,
 		newChannel);
 
 	DPRINT_DBG(VMBUS, "child device object allocated - %p", newChannel->DeviceObject);
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 56e8cbb..58ed469 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -231,8 +231,8 @@ Description:
 
 --*/
 
-struct hv_device *VmbusChildDeviceCreate(struct hv_guid DeviceType,
-					 struct hv_guid DeviceInstance,
+struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
+					 struct hv_guid *DeviceInstance,
 					 void *Context)
 {
 	VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index fed0360..928735e 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Codingstyle fixes for osd.c

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/osd.c |   40 ++++++++++++++++------------------------
 1 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 3b142ce..8fe543b 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -37,18 +37,10 @@
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/time.h>
-
-#include <asm/io.h>
-#include <asm/bitops.h>
-#include <asm/kmap_types.h>
-#include <asm/atomic.h>
-
+#include <linux/io.h>
+#include <linux/bitops.h>
 #include "osd.h"
 
-
-/* Data types */
-
-
 struct osd_callback_struct {
 	struct work_struct work;
 	void (*callback)(void *);
@@ -60,15 +52,18 @@ void *osd_VirtualAllocExec(unsigned int size)
 #ifdef __x86_64__
 	return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL_EXEC);
 #else
-	return __vmalloc(size, GFP_KERNEL, __pgprot(__PAGE_KERNEL & (~_PAGE_NX)));
+	return __vmalloc(size, GFP_KERNEL,
+			 __pgprot(__PAGE_KERNEL & (~_PAGE_NX)));
 #endif
 }
 
 void *osd_PageAlloc(unsigned int count)
 {
 	void *p;
+
 	p = (void *)__get_free_pages(GFP_KERNEL, get_order(count * PAGE_SIZE));
-	if (p) memset(p, 0, count * PAGE_SIZE);
+	if (p)
+		memset(p, 0, count * PAGE_SIZE);
 	return p;
 
 	/* struct page* page = alloc_page(GFP_KERNEL|__GFP_ZERO); */
@@ -81,7 +76,7 @@ void *osd_PageAlloc(unsigned int count)
 }
 EXPORT_SYMBOL_GPL(osd_PageAlloc);
 
-void osd_PageFree(void* page, unsigned int count)
+void osd_PageFree(void *page, unsigned int count)
 {
 	free_pages((unsigned long)page, get_order(count * PAGE_SIZE));
 	/*struct page* p = virt_to_page(page);
@@ -91,11 +86,10 @@ EXPORT_SYMBOL_GPL(osd_PageFree);
 
 struct osd_waitevent *osd_WaitEventCreate(void)
 {
-	struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), GFP_KERNEL);
+	struct osd_waitevent *wait = kmalloc(sizeof(struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It isn't needed at all, was only being used for one typedef,
which is now removed.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.h                 |    1 -
 drivers/staging/hv/include/HvSynicApi.h |    4 ++--
 drivers/staging/hv/include/HvTypes.h    |   31 -------------------------------
 3 files changed, 2 insertions(+), 34 deletions(-)
 delete mode 100644 drivers/staging/hv/include/HvTypes.h

diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 8058a53..f9fcfed 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -25,7 +25,6 @@
 #ifndef __HV_H__
 #define __HV_H__
 
-#include "include/HvTypes.h"
 #include "include/HvStatus.h"
 #include "include/HvHalApi.h"
 #include "include/HvVpApi.h"
diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h
index 17e2187..99eeed4 100644
--- a/drivers/staging/hv/include/HvSynicApi.h
+++ b/drivers/staging/hv/include/HvSynicApi.h
@@ -224,7 +224,7 @@ typedef struct _HV_PORT_INFO
 
 	struct
 	{
-	    HV_GPA MonitorAddress;
+	    u64 MonitorAddress;
 	    u64 RsvdZ;
 	} MonitorPortInfo;
     };
@@ -251,7 +251,7 @@ typedef struct _HV_CONNECTION_INFO
 
 	struct
 	{
-	    HV_GPA MonitorAddress;
+	    u64 MonitorAddress;
 	} MonitorConnectionInfo;
     };
 } HV_CONNECTION_INFO, *PHV_CONNECTION_INFO;
diff --git a/drivers/staging/hv/include/HvTypes.h b/drivers/staging/hv/include/HvTypes.h
deleted file mode 100644
index 5741c35..0000000
--- a/drivers/staging/hv/include/HvTypes.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It isn't needed at all, was only being used for one typedef,
which is now removed.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.h                 |    1 -
 drivers/staging/hv/include/HvHalApi.h   |   32 -------------------------------
 drivers/staging/hv/include/HvSynicApi.h |    4 +-
 3 files changed, 2 insertions(+), 35 deletions(-)
 delete mode 100644 drivers/staging/hv/include/HvHalApi.h

diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index f9fcfed..bd5aced 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -26,7 +26,6 @@
 #define __HV_H__
 
 #include "include/HvStatus.h"
-#include "include/HvHalApi.h"
 #include "include/HvVpApi.h"
 #include "include/HvSynicApi.h"
 #include "include/HvHcApi.h"
diff --git a/drivers/staging/hv/include/HvHalApi.h b/drivers/staging/hv/include/HvHalApi.h
deleted file mode 100644
index cda369e..0000000
--- a/drivers/staging/hv/include/HvHalApi.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#pragma once
-
-
-
-/* Time in the hypervisor is measured in 100 nanosecond units */
-
-typedef u64 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Coding style fixes for include/HvHcApi.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c              |    8 +++---
 drivers/staging/hv/Hv.h              |    4 +-
 drivers/staging/hv/include/HvHcApi.h |   49 +++++++++++++--------------------
 3 files changed, 25 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 31459f7..e48033e 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -306,7 +306,7 @@ int HvInit (void)
 		goto Cleanup;
 	}
 
-	gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((unsigned long)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN));
+	gHvContext.SignalEventParam = (struct hv_input_signal_event *)(ALIGN_UP((unsigned long)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN));
 	gHvContext.SignalEventParam->ConnectionId.Asu32 = 0;
 	gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID;
 	gHvContext.SignalEventParam->FlagNumber = 0;
@@ -393,10 +393,10 @@ HV_STATUS HvPostMessage(
 {
 	struct alignedInput {
 		u64					alignment8;
-		HV_INPUT_POST_MESSAGE	msg;
+		struct hv_input_post_message msg;
 	};
 
-	PHV_INPUT_POST_MESSAGE alignedMsg;
+	struct hv_input_post_message *alignedMsg;
 	HV_STATUS status;
 	unsigned long addr;
 
@@ -412,7 +412,7 @@ HV_STATUS HvPostMessage(
 		return -1;
 	}
 
-	alignedMsg = (PHV_INPUT_POST_MESSAGE)(ALIGN_UP(addr, HV_HYPERCALL_PARAM_ALIGN));
+	alignedMsg = (struct hv_input_post_message *)(ALIGN_UP(addr, HV_HYPERCALL_PARAM_ALIGN));
 
 	alignedMsg->ConnectionId = connectionId;
 	alignedMsg->MessageType = messageType;
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index bd5aced..d8a4fe5 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -102,7 +102,7 @@ static const struct hv_guid VMBUS_SERVICE_ID = {
 
 struct hv_input_signal_event_buffer {
 	u64 Align8;
-	HV_INPUT_SIGNAL_EVENT Event;
+	struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Coding style fixes for include/HvVpApi.h

All of the include/Hv*.h files should be merged eventually...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/HvSynicApi.h |    4 +-
 drivers/staging/hv/include/HvVpApi.h    |   50 +++++++++++++-----------------
 2 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h
index 03b4d29..92944d6 100644
--- a/drivers/staging/hv/include/HvSynicApi.h
+++ b/drivers/staging/hv/include/HvSynicApi.h
@@ -209,14 +209,14 @@ typedef struct _HV_PORT_INFO
 	struct
 	{
 	    HV_SYNIC_SINT_INDEX TargetSint;
-	    HV_VP_INDEX TargetVp;
+	    u32 TargetVp;
 	    u64 RsvdZ;
 	} MessagePortInfo;
 
 	struct
 	{
 	    HV_SYNIC_SINT_INDEX TargetSint;
-	    HV_VP_INDEX TargetVp;
+	    u32 TargetVp;
 	    u16 BaseFlagNumber;
 	    u16 FlagCount;
 	    u32 RsvdZ;
diff --git a/drivers/staging/hv/include/HvVpApi.h b/drivers/staging/hv/include/HvVpApi.h
index ce0784c..33b7475 100644
--- a/drivers/staging/hv/include/HvVpApi.h
+++ b/drivers/staging/hv/include/HvVpApi.h
@@ -20,32 +20,26 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
+#ifndef __HVVPAPI_H
+#define __HVVPAPI_H
 
-
-#pragma once
-
-/* Virtual Processor Indices */
-
-typedef u32 HV_VP_INDEX, *PHV_VP_INDEX;
-
-
-/* The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent */
-/* is set by CPUID(HvCpuIdFunctionVersionAndFeatures). */
-/* ========================================================================== */
-
-
-typedef enum _HV_CPUID_FUNCTION
-{
-    HvCpuIdFunctionVersionAndFeatures           = 0x00000001,
-    HvCpuIdFunctionHvVendorAndMaxFunction       = 0x40000000,
-    HvCpuIdFunctionHvInterface                  = 0x40000001,
-
-
-    /* The remaining functions depend on the value of HvCpuIdFunctionInterface */
-
-    HvCpuIdFunctionMsHvVersion                  = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Coding style fixes for vmbus.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/vmbus.h |   54 ++++++++++++++-----------------------------
 1 files changed, 18 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h
index 44a784c..733edc9 100644
--- a/drivers/staging/hv/vmbus.h
+++ b/drivers/staging/hv/vmbus.h
@@ -29,71 +29,53 @@
 
 #include "include/VmbusApi.h"
 
-
-/* Data types */
-
-
 typedef int (*PFN_DRIVERINITIALIZE)(struct hv_driver *drv);
 typedef int (*PFN_DRIVEREXIT)(struct hv_driver *drv);
 
 struct driver_context {
 	struct hv_guid class_id;
 
-	struct device_driver	driver;
+	struct device_driver driver;
 
-	/* Use these methods instead of the struct device_driver so 2.6 kernel stops complaining */
+	/*
+	 * Use these methods instead of the struct device_driver so 2.6 kernel
+	 * stops complaining
+	 * TODO - fix this!
+	 */
 	int (*probe)(struct device *);
 	int (*remove)(struct device *);
 	void (*shutdown)(struct device *);
 };
 
 struct device_context {
-	struct work_struct              probe_failed_work_item;
+	struct work_struct probe_failed_work_item;
 	struct hv_guid class_id;
 	struct hv_guid device_id;
-	int						probe_error;
-	struct device			device;
+	int probe_error;
+	struct device device;
 	struct hv_device device_obj;
 };
 
-
-
-/* Global */
-
-
-
-/* Inlines */
-
-static inline struct device_context *to_device_context(struct hv_device *device_obj)
+static inline struct device_context *to_device_context(struct hv_device *d)
 {
-	return container_of(device_obj, struct device_context, device_obj);
+	return container_of(d, struct device_context, device_obj);
 }
 
-static inline struct device_context *device_to_device_context(struct device *device)
+static inline struct device_context *device_to_device_context(struct device *d)
 {
-	return container_of(device, struct device_context, device);
+	return ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This moves rndis.h from the include/ subdirectory.  It doesn't
belong there.

No code changes happened here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.h         |    2 +-
 drivers/staging/hv/{include => }/rndis.h |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename drivers/staging/hv/{include => }/rndis.h (100%)

diff --git a/drivers/staging/hv/RndisFilter.h b/drivers/staging/hv/RndisFilter.h
index 8e357c8..dc6af89 100644
--- a/drivers/staging/hv/RndisFilter.h
+++ b/drivers/staging/hv/RndisFilter.h
@@ -29,7 +29,7 @@
 
 #include "NetVsc.h"
 
-#include "include/rndis.h"
+#include "rndis.h"
 
 #define RNDIS_HEADER_SIZE	(sizeof(RNDIS_MESSAGE) - \
 				 sizeof(RNDIS_MESSAGE_CONTAINER))
diff --git a/drivers/staging/hv/include/rndis.h b/drivers/staging/hv/rndis.h
similarity index 100%
rename from drivers/staging/hv/include/rndis.h
rename to drivers/staging/hv/rndis.h
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This moves vmbus.h from the include/ subdirectory.  It doesn't
belong there.

No code changes happened here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c          |    2 +-
 drivers/staging/hv/netvsc_drv.c          |    2 +-
 drivers/staging/hv/storvsc_drv.c         |    2 +-
 drivers/staging/hv/{include => }/vmbus.h |    2 +-
 drivers/staging/hv/vmbus_drv.c           |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
 rename drivers/staging/hv/{include => }/vmbus.h (98%)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index c64ac89..f91fa43 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -35,7 +35,7 @@
 
 #include "osd.h"
 #include "include/logging.h"
-#include "include/vmbus.h"
+#include "vmbus.h"
 
 #include "include/StorVscApi.h"
 
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index e847cb6..9ea61b2 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -38,7 +38,7 @@
 
 #include "osd.h"
 #include "include/logging.h"
-#include "include/vmbus.h"
+#include "vmbus.h"
 
 #include "include/NetVscApi.h"
 
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 4574f2b..a3d591d 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -38,7 +38,7 @@
 
 #include "osd.h"
 #include "include/logging.h"
-#include "include/vmbus.h"
+#include "vmbus.h"
 #include "include/StorVscApi.h"
 
 
diff --git a/drivers/staging/hv/include/vmbus.h b/drivers/staging/hv/vmbus.h
similarity index 98%
rename from drivers/staging/hv/include/vmbus.h
rename to drivers/staging/hv/vmbus.h
index 2ea6ce0..44a784c 100644
--- a/drivers/staging/hv/include/vmbus.h
+++ b/drivers/staging/hv/vmbus.h
@@ -27,7 +27,7 @@
 
 #include <linux/device.h>
 
-#include "VmbusApi.h"
+#include ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

The typedefs for u32 are now removed.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/rndis.h |  275 ++++++++++++++++++++------------------------
 1 files changed, 127 insertions(+), 148 deletions(-)

diff --git a/drivers/staging/hv/rndis.h b/drivers/staging/hv/rndis.h
index 58fd4eb..da2c45d 100644
--- a/drivers/staging/hv/rndis.h
+++ b/drivers/staging/hv/rndis.h
@@ -21,30 +21,9 @@
  *
  */
 
-
 #ifndef _RNDIS_H_
 #define _RNDIS_H_
 
-
-/*  Basic types */
-
-typedef u32                                  RNDIS_REQUEST_ID;
-typedef u32                                  RNDIS_HANDLE;
-typedef u32                                  RNDIS_STATUS;
-typedef u32                                  RNDIS_REQUEST_TYPE;
-typedef u32                                  RNDIS_OID;
-typedef u32                                  RNDIS_CLASS_ID;
-typedef u32                                  RNDIS_MEDIUM;
-typedef u32                                  *PRNDIS_REQUEST_ID;
-typedef u32                                  *PRNDIS_HANDLE;
-typedef u32                                  *PRNDIS_STATUS;
-typedef u32                                  *PRNDIS_REQUEST_TYPE;
-typedef u32                                  *PRNDIS_OID;
-typedef u32                                  *PRNDIS_CLASS_ID;
-typedef u32                                  *PRNDIS_MEDIUM;
-typedef u32                                  RNDIS_AF;
-
-
 /*  Status codes */
 
 
@@ -72,82 +51,82 @@ typedef u32                                  RNDIS_AF;
 #define STATUS_NOT_SUPPORTED                    (0xC00000BBL)
 #endif
 
-#define RNDIS_STATUS_SUCCESS                    ((RNDIS_STATUS)STATUS_SUCCESS)
-#define RNDIS_STATUS_PENDING                    ((RNDIS_STATUS)STATUS_PENDING)
-#define RNDIS_STATUS_NOT_RECOGNIZED             ((RNDIS_STATUS)0x00010001L)
-#define RNDIS_STATUS_NOT_COPIED                 ((RNDIS_STATUS)0x00010002L)
-#define RNDIS_STATUS_NOT_ACCEPTED         ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This removes about half of the typedefs in rndis.h

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |  119 ++++++++++++++++----------------------
 drivers/staging/hv/RndisFilter.h |    4 +-
 drivers/staging/hv/rndis.h       |  120 +++++++++++++++++++-------------------
 3 files changed, 112 insertions(+), 131 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index ef490f5..36c6afd 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -68,13 +68,13 @@ typedef struct _RNDIS_REQUEST {
 
 	/* FIXME: We assumed a fixed size response here. If we do ever need to handle a bigger response, */
 	/* we can either define a max response message or add a response buffer variable above this field */
-	RNDIS_MESSAGE				ResponseMessage;
+	struct rndis_message ResponseMessage;
 
 	/* Simplify allocation by having a netvsc packet inline */
 	struct hv_netvsc_packet	Packet;
 	PAGE_BUFFER					Buffer;
 	/* FIXME: We assumed a fixed size request here. */
-	RNDIS_MESSAGE				RequestMessage;
+	struct rndis_message RequestMessage;
 } RNDIS_REQUEST;
 
 
@@ -82,7 +82,7 @@ typedef struct _RNDIS_FILTER_PACKET {
 	void						*CompletionContext;
 	PFN_ON_SENDRECVCOMPLETION	OnCompletion;
 
-	RNDIS_MESSAGE				Message;
+	struct rndis_message Message;
 } RNDIS_FILTER_PACKET;
 
 
@@ -94,27 +94,17 @@ RndisFilterSendRequest(
 	RNDIS_REQUEST	*Request
 	);
 
-static void
-RndisFilterReceiveResponse(
-	RNDIS_DEVICE	*Device,
-	RNDIS_MESSAGE	*Response
-	);
+static void RndisFilterReceiveResponse(RNDIS_DEVICE *Device,
+				       struct rndis_message *Response);
 
-static void
-RndisFilterReceiveIndicateStatus(
-	RNDIS_DEVICE	*Device,
-	RNDIS_MESSAGE	*Response
-	);
+static void RndisFilterReceiveIndicateStatus(RNDIS_DEVICE *Device,
+					     struct rndis_message *Response);
 
-static ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

This removes the rest of the typedefs in rndis.h

The file is now checkpatch.pl clean.

Note, there are a lot of structures in this file that are not used
anywhere.  I don't know if we want to remove them, but I guess they
don't take up any space so it's a nice documentation trail.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/rndis.h |   90 ++++++++++++++++++++++----------------------
 1 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/hv/rndis.h b/drivers/staging/hv/rndis.h
index 0a44025..7c73277 100644
--- a/drivers/staging/hv/rndis.h
+++ b/drivers/staging/hv/rndis.h
@@ -400,10 +400,10 @@ struct rndis_indicate_status {
 
 /* Diagnostic information passed as the status buffer in */
 /* struct rndis_indicate_status messages signifying error conditions. */
-typedef struct _RNDIS_DIAGNOSTIC_INFO {
+struct rndis_diagnostic_info {
 	u32 DiagStatus;
 	u32 ErrorOffset;
-} RNDIS_DIAGNOSTIC_INFO, *PRNDIS_DIAGNOSTIC_INFO;
+};
 
 /* NdisKeepAlive message */
 struct rndis_keepalive_request {
@@ -465,73 +465,73 @@ struct rndis_config_parameter_info {
 /* that do not implement a call manager. */
 
 /* CoNdisMiniportCreateVc message */
-typedef struct _RCONDIS_MP_CREATE_VC {
+struct rcondis_mp_create_vc {
 	u32 RequestId;
 	u32 NdisVcHandle;
-} RCONDIS_MP_CREATE_VC, *PRCONDIS_MP_CREATE_VC;
+};
 
 /* Response to CoNdisMiniportCreateVc */
-typedef struct _RCONDIS_MP_CREATE_VC_COMPLETE {
+struct rcondis_mp_create_vc_complete {
 	u32 RequestId;
 	u32 DeviceVcHandle;
 	u32 Status;
-} RCONDIS_MP_CREATE_VC_COMPLETE, *PRCONDIS_MP_CREATE_VC_COMPLETE;
+};
 
 /* CoNdisMiniportDeleteVc message */
-typedef struct _RCONDIS_MP_DELETE_VC {
+struct rcondis_mp_delete_vc {
 	u32 RequestId;
 	u32 DeviceVcHandle;
-} RCONDIS_MP_DELETE_VC, *PRCONDIS_MP_DELETE_VC;
+};
 
 /* Response to CoNdisMiniportDeleteVc */
-typedef struct _RCONDIS_MP_DELETE_VC_COMPLETE {
+struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Still some volatile mis-usages left to fix.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c            |   14 ++--
 drivers/staging/hv/ChannelMgmt.c        |    2 +-
 drivers/staging/hv/Connection.c         |    2 +-
 drivers/staging/hv/Hv.c                 |   18 ++--
 drivers/staging/hv/Hv.h                 |    4 +-
 drivers/staging/hv/Vmbus.c              |   16 ++--
 drivers/staging/hv/include/HvHcApi.h    |    6 +-
 drivers/staging/hv/include/HvSynicApi.h |  128 ++++++++++++++-----------------
 8 files changed, 90 insertions(+), 100 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index a200128..f860732 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -42,7 +42,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *channel);
 #if 0
 static void
 DumpMonitorPage(
-	HV_MONITOR_PAGE *MonitorPage
+	struct hv_monitor_page *MonitorPage
 	)
 {
 	int i=0;
@@ -85,7 +85,7 @@ Description:
 --*/
 static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 {
-	HV_MONITOR_PAGE *monitorPage;
+	struct hv_monitor_page *monitorPage;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -96,7 +96,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 			(unsigned long *) gVmbusConnection.SendInterruptPage +
 			(Channel->OfferMsg.ChildRelId >> 5) );
 
-		monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages;
+		monitorPage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages;
 		monitorPage++; /* Get the child to parent monitor page */
 
 		set_bit(Channel->MonitorBit,
@@ -114,7 +114,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 #if 0
 static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 {
-	HV_MONITOR_PAGE *monitorPage;
+	struct hv_monitor_page *monitorPage;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -124,7 +124,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Fix up the typedefs in there as well.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c              |    4 +-
 drivers/staging/hv/include/HvPtApi.h |  107 +++++++++++++++------------------
 2 files changed, 51 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index e48033e..83d0cae 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -230,7 +230,7 @@ int HvInit (void)
 {
 	int ret=0;
     int maxLeaf;
-	HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
+	union hv_x64_msr_hypercall_contents hypercallMsr;
 	void *virtAddr = NULL;
 
 	DPRINT_ENTER(VMBUS);
@@ -347,7 +347,7 @@ Description:
 --*/
 void HvCleanup (void)
 {
-	HV_X64_MSR_HYPERCALL_CONTENTS hypercallMsr;
+	union hv_x64_msr_hypercall_contents hypercallMsr;
 
 	DPRINT_ENTER(VMBUS);
 
diff --git a/drivers/staging/hv/include/HvPtApi.h b/drivers/staging/hv/include/HvPtApi.h
index c32dbf6..f6ddf46 100644
--- a/drivers/staging/hv/include/HvPtApi.h
+++ b/drivers/staging/hv/include/HvPtApi.h
@@ -21,66 +21,57 @@
  *
  */
 
+#ifndef __HVVPTPI_H
+#define __HVVPTPI_H
 
-#pragma once
-
-
-/* Versioning definitions used for guests reporting themselves to the */
-/* hypervisor, and visa versa. */
-/* ================================================================== */
-
-
+/*
+ * Versioning definitions used for guests reporting themselves to the
+ * hypervisor, and visa versa.
+ */
 
 /* Version info reported by guest OS's */
+enum hv_guest_os_vendor {
+	HvGuestOsVendorMicrosoft	= 0x0001
+};
+
+enum hv_guest_os_microsoft_ids {
+	HvGuestOsMicrosoftUndefined	= 0x00,
+	HvGuestOsMicrosoftMSDOS		= 0x01,
+	HvGuestOsMicrosoftWindows3x	= 0x02,
+	HvGuestOsMicrosoftWindows9x	= 0x03,
+	HvGuestOsMicrosoftWindowsNT	= 0x04,
+	HvGuestOsMicrosoftWindowsCE	= 0x05
+};
 
-typedef enum _HV_GUEST_OS_VENDOR
-{
-    HvGuestOsVendorMicrosoft        = 0x0001
-
-} HV_GUEST_OS_VENDOR, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's pretty pointless as no one is using this structure, but even so
the use of volatile is so wrong here it's sad...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/HvSynicApi.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h
index 7e3db63..3e6151d 100644
--- a/drivers/staging/hv/include/HvSynicApi.h
+++ b/drivers/staging/hv/include/HvSynicApi.h
@@ -212,7 +212,7 @@ struct hv_message {
 
 /* Define the synthetic interrupt message page layout. */
 struct hv_message_page {
-	volatile struct hv_message SintMessage[HV_SYNIC_SINT_COUNT];
+	struct hv_message SintMessage[HV_SYNIC_SINT_COUNT];
 };
 
 /* Define the synthetic interrupt controller event flags format. */
@@ -223,7 +223,7 @@ union hv_synic_event_flags {
 
 /* Define the synthetic interrupt flags page layout. */
 struct hv_synic_event_flags_page {
-	volatile union hv_synic_event_flags SintEventFlags[HV_SYNIC_SINT_COUNT];
+	union hv_synic_event_flags SintEventFlags[HV_SYNIC_SINT_COUNT];
 };
 
 /* Define SynIC control register. */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Don't fix the typedef issues, that will come next.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/HvSynicApi.h |  560 +++++++++++-------------------
 1 files changed, 205 insertions(+), 355 deletions(-)

diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h
index 92944d6..4215d99 100644
--- a/drivers/staging/hv/include/HvSynicApi.h
+++ b/drivers/staging/hv/include/HvSynicApi.h
@@ -21,433 +21,285 @@
  *
  */
 
-#pragma once
-
+#ifndef __HVSYNICAPI_H
+#define __HVSYNICAPI_H
 
 /* Define the virtual APIC registers */
-
-#define HV_X64_MSR_EOI                  (0x40000070)
-#define HV_X64_MSR_ICR                  (0x40000071)
-#define HV_X64_MSR_TPR                  (0x40000072)
-#define HV_X64_MSR_APIC_ASSIST_PAGE     (0x40000073)
-
+#define HV_X64_MSR_EOI			(0x40000070)
+#define HV_X64_MSR_ICR			(0x40000071)
+#define HV_X64_MSR_TPR			(0x40000072)
+#define HV_X64_MSR_APIC_ASSIST_PAGE	(0x40000073)
 
 /* Define version of the synthetic interrupt controller. */
-
-
-#define HV_SYNIC_VERSION        (1)
-
-
+#define HV_SYNIC_VERSION		(1)
 
 /* Define synthetic interrupt controller model specific registers. */
-
-
-#define HV_X64_MSR_SCONTROL   (0x40000080)
-#define HV_X64_MSR_SVERSION   (0x40000081)
-#define HV_X64_MSR_SIEFP      (0x40000082)
-#define HV_X64_MSR_SIMP       (0x40000083)
-#define HV_X64_MSR_EOM        (0x40000084)
-#define HV_X64_MSR_SINT0      (0x40000090)
-#define HV_X64_MSR_SINT1      (0x40000091)
-#define HV_X64_MSR_SINT2      (0x40000092)
-#define HV_X64_MSR_SINT3      (0x40000093)
-#define HV_X64_MSR_SINT4      (0x40000094)
-#define HV_X64_MSR_SINT5      (0x40000095)
-#define HV_X64_MSR_SINT6      (0x40000096)
-#define HV_X64_MSR_SINT7      (0x40000097)
-#define HV_X64_MSR_SINT8      (0x40000098)
-#define HV_X64_MSR_SINT9      (0x40000099)
-#define HV_X64_MSR_SINT10     (0x4000009A)
-#define HV_X64_MSR_SINT11     ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Merge the different include/Hv*Api.h files together into
hv_api.h as they really don't justify separate files.

No code was changed here, only moving stuff around.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.h                            |    5 +-
 .../staging/hv/{include/HvSynicApi.h => hv_api.h}  |   94 +++++++++++++++++++-
 drivers/staging/hv/include/HvHcApi.h               |   49 ----------
 drivers/staging/hv/include/HvPtApi.h               |   77 ----------------
 drivers/staging/hv/include/HvVpApi.h               |   45 ---------
 5 files changed, 93 insertions(+), 177 deletions(-)
 rename drivers/staging/hv/{include/HvSynicApi.h => hv_api.h} (78%)
 delete mode 100644 drivers/staging/hv/include/HvHcApi.h
 delete mode 100644 drivers/staging/hv/include/HvPtApi.h
 delete mode 100644 drivers/staging/hv/include/HvVpApi.h

diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 3f205c6..67f47a2 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -26,10 +26,7 @@
 #define __HV_H__
 
 #include "include/HvStatus.h"
-#include "include/HvVpApi.h"
-#include "include/HvSynicApi.h"
-#include "include/HvHcApi.h"
-#include "include/HvPtApi.h"
+#include "hv_api.h"
 
 enum {
 	VMBUS_MESSAGE_CONNECTION_ID	= 1,
diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/hv_api.h
similarity index 78%
rename from drivers/staging/hv/include/HvSynicApi.h
rename to drivers/staging/hv/hv_api.h
index 3e6151d..99129b5 100644
--- a/drivers/staging/hv/include/HvSynicApi.h
+++ b/drivers/staging/hv/hv_api.h
@@ -20,9 +20,27 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
+#ifndef __HV_API_H
+#define __HV_API_H
 
-#ifndef __HVSYNICAPI_H
-#define __HVSYNICAPI_H
+/*
+ * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
+ * is set by CPUID(HvCpuIdFunctionVersionAndFeatures).
+ */
+enum hv_cpuid_function ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Ugh, what a mess, it's all better now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c               |   15 +-
 drivers/staging/hv/Hv.h               |    9 +-
 drivers/staging/hv/include/HvStatus.h | 1024 +++++++++++++--------------------
 3 files changed, 418 insertions(+), 630 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 468401b..3800bf3 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -384,12 +384,9 @@ Description:
 	involves a hypercall.
 
 --*/
-HV_STATUS HvPostMessage(
-	union hv_connection_id connectionId,
-	enum hv_message_type messageType,
-	void *            payload,
-	size_t           payloadSize
-	)
+u16 HvPostMessage(union hv_connection_id connectionId,
+		  enum hv_message_type messageType,
+		  void *payload, size_t payloadSize)
 {
 	struct alignedInput {
 		u64					alignment8;
@@ -397,7 +394,7 @@ HV_STATUS HvPostMessage(
 	};
 
 	struct hv_input_post_message *alignedMsg;
-	HV_STATUS status;
+	u16 status;
 	unsigned long addr;
 
 	if (payloadSize > HV_MESSAGE_PAYLOAD_BYTE_COUNT)
@@ -437,9 +434,9 @@ Description:
 	involves a hypercall.
 
 --*/
-HV_STATUS HvSignalEvent(void)
+u16 HvSignalEvent(void)
 {
-	HV_STATUS status;
+	u16 status;
 
 	status = HvDoHypercall(HvCallSignalEvent, gHvContext.SignalEventParam, NULL) & 0xFFFF;
 
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 67f47a2..4bc2bb0 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -132,12 +132,11 @@ extern int HvInit(void);
 
 extern void HvCleanup(void);
 
-extern HV_STATUS HvPostMessage(union hv_connection_id connectionId,
-			       enum hv_message_type messageType,
-			       void *payload,
-			       size_t payloadSize);
+extern u16 HvPostMessage(union hv_connection_id connectionId,
+			 enum hv_message_type messageType,
+			 void *payload, size_t payloadSize);
 
-extern HV_STATUS ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It doesn't need to be a standalone file anymore.

No code changed, only moving things around.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.h               |    1 -
 drivers/staging/hv/hv_api.h           |  485 +++++++++++++++++++++++++++++++
 drivers/staging/hv/include/HvStatus.h |  510 ---------------------------------
 3 files changed, 485 insertions(+), 511 deletions(-)
 delete mode 100644 drivers/staging/hv/include/HvStatus.h

diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 4bc2bb0..5379e4b 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -25,7 +25,6 @@
 #ifndef __HV_H__
 #define __HV_H__
 
-#include "include/HvStatus.h"
 #include "hv_api.h"
 
 enum {
diff --git a/drivers/staging/hv/hv_api.h b/drivers/staging/hv/hv_api.h
index 99129b5..251e2d1 100644
--- a/drivers/staging/hv/hv_api.h
+++ b/drivers/staging/hv/hv_api.h
@@ -23,6 +23,491 @@
 #ifndef __HV_API_H
 #define __HV_API_H
 
+
+/* Status codes for hypervisor operations. */
+
+/*
+ * HV_STATUS_SUCCESS
+ * The specified hypercall succeeded
+ */
+#define HV_STATUS_SUCCESS				((u16)0x0000)
+
+/*
+ * HV_STATUS_INVALID_HYPERCALL_CODE
+ * The hypervisor does not support the operation because the specified
+ * hypercall code is not supported.
+ */
+#define HV_STATUS_INVALID_HYPERCALL_CODE		((u16)0x0002)
+
+/*
+ * HV_STATUS_INVALID_HYPERCALL_INPUT
+ * The hypervisor does not support the operation because the encoding for the
+ * hypercall input register is not supported.
+ */
+#define HV_STATUS_INVALID_HYPERCALL_INPUT		((u16)0x0003)
+
+/*
+ * HV_STATUS_INVALID_ALIGNMENT
+ * The hypervisor could not perform the operation beacuse a parameter has an
+ * invalid alignment.
+ */
+#define HV_STATUS_INVALID_ALIGNMENT			((u16)0x0004)
+
+/*
+ * HV_STATUS_INVALID_PARAMETER
+ * The hypervisor could not perform the operation beacuse an invalid parameter
+ * was specified.
+ */
+#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

typedefs still need to be fixed up.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/VmbusChannelInterface.h |  134 ++++++++------------
 1 files changed, 52 insertions(+), 82 deletions(-)

diff --git a/drivers/staging/hv/include/VmbusChannelInterface.h b/drivers/staging/hv/include/VmbusChannelInterface.h
index 8ee8a07..953e156 100644
--- a/drivers/staging/hv/include/VmbusChannelInterface.h
+++ b/drivers/staging/hv/include/VmbusChannelInterface.h
@@ -21,101 +21,71 @@
  *
  */
 
+#ifndef __VMBUSCHANNELINTERFACE_H
+#define __VMBUSCHANNELINTERFACE_H
 
-#pragma once
-/* allow nameless unions */
-/* #pragma warning(disable : 4201) */
-
-
-/* A revision number of vmbus that is used for ensuring both ends on a */
-/* partition are using compatible versions. */
-
-#define VMBUS_REVISION_NUMBER       13
-
+/*
+ * A revision number of vmbus that is used for ensuring both ends on a
+ * partition are using compatible versions.
+ */
+#define VMBUS_REVISION_NUMBER		13
 
 /* Make maximum size of pipe payload of 16K */
-
-#define MAX_PIPE_DATA_PAYLOAD		(sizeof(BYTE) * 16384)
-
+#define MAX_PIPE_DATA_PAYLOAD		(sizeof(u8) * 16384)
 
 /* Define PipeMode values. */
-
-#define VMBUS_PIPE_TYPE_BYTE                    0x00000000
-#define VMBUS_PIPE_TYPE_MESSAGE                 0x00000004
-
+#define VMBUS_PIPE_TYPE_BYTE		0x00000000
+#define VMBUS_PIPE_TYPE_MESSAGE		0x00000004
 
 /* The size of the user defined data buffer for non-pipe offers. */
-
-#define MAX_USER_DEFINED_BYTES                  120
-
+#define MAX_USER_DEFINED_BYTES		120
 
 /* The size of the user defined data buffer for pipe offers. */
+#define MAX_PIPE_USER_DEFINED_BYTES	116
 
-#define MAX_PIPE_USER_DEFINED_BYTES             116
-
-
-
-/* At the center of the Channel Management library is */
-/* the Channel Offer. This struct contains the */
-/* fundamental information about an offer. */
-
-#pragma pack(push,1)
-
-typedef ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's all clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/ChannelMessages.h       |    6 +++---
 drivers/staging/hv/include/VmbusChannelInterface.h |    6 ++----
 drivers/staging/hv/include/nvspprotocol.h          |    4 ++--
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/hv/include/ChannelMessages.h b/drivers/staging/hv/include/ChannelMessages.h
index 097e1c1..1e41948 100644
--- a/drivers/staging/hv/include/ChannelMessages.h
+++ b/drivers/staging/hv/include/ChannelMessages.h
@@ -89,7 +89,7 @@ typedef struct _VMBUS_CHANNEL_VERSION_SUPPORTED
 typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL
 {
     VMBUS_CHANNEL_MESSAGE_HEADER Header;
-    VMBUS_CHANNEL_OFFER Offer;
+    struct vmbus_channel_offer Offer;
     u32  ChildRelId;
     u8   MonitorId;
     bool MonitorAllocated;
@@ -131,12 +131,12 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL
 
     /* GPADL for the channel's ring buffer. */
 
-    GPADL_HANDLE    RingBufferGpadlHandle;
+    u32 RingBufferGpadlHandle;
 
 
     /* GPADL for the channel's server context save area. */
 
-    GPADL_HANDLE    ServerContextAreaGpadlHandle;
+    u32 ServerContextAreaGpadlHandle;
 
 
     /*
diff --git a/drivers/staging/hv/include/VmbusChannelInterface.h b/drivers/staging/hv/include/VmbusChannelInterface.h
index 953e156..2674282 100644
--- a/drivers/staging/hv/include/VmbusChannelInterface.h
+++ b/drivers/staging/hv/include/VmbusChannelInterface.h
@@ -47,7 +47,7 @@
  * At the center of the Channel Management library is the Channel Offer. This
  * struct contains the fundamental information about an offer.
  */
-typedef struct {
+struct vmbus_channel_offer {
 	struct hv_guid InterfaceType;
 	struct hv_guid InterfaceInstance;
 	u64 InterruptLatencyIn100nsUnits;
@@ -75,9 +75,7 @@ typedef struct {
 		} Pipe;
 	} u;
 	u32 Padding;
-} __attribute__((packed)) VMBUS_CHANNEL_OFFER, ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

The function pointers still have ugly names, but the structures
are now cleaned up.

Note, a comment was added where the driver structure is pointing
at a problem that needs to be fixed up later in the code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c            |    6 ++--
 drivers/staging/hv/Channel.h            |    8 ++--
 drivers/staging/hv/ChannelInterface.c   |    8 ++--
 drivers/staging/hv/ChannelInterface.h   |    4 +-
 drivers/staging/hv/NetVsc.c             |    2 +-
 drivers/staging/hv/RndisFilter.c        |    2 +-
 drivers/staging/hv/Vmbus.c              |   32 +++++++-----------
 drivers/staging/hv/include/NetVscApi.h  |    2 +-
 drivers/staging/hv/include/StorVscApi.h |    2 +-
 drivers/staging/hv/include/VmbusApi.h   |   55 ++++++++++++++++---------------
 drivers/staging/hv/netvsc_drv.c         |    4 +-
 drivers/staging/hv/vmbus.h              |    2 +-
 drivers/staging/hv/vmbus_drv.c          |   28 ++++++++--------
 13 files changed, 75 insertions(+), 80 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index f860732..5bea2d6 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -791,7 +791,7 @@ Description:
 
 --*/
 int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
-	PAGE_BUFFER			PageBuffers[],
+	struct hv_page_buffer PageBuffers[],
 	u32				PageCount,
 	void *				Buffer,
 	u32				BufferLen,
@@ -814,7 +814,7 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
 	DumpVmbusChannel(Channel);
 
 	/* Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the largest size we support */
-	descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER));
+	descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(struct hv_page_buffer));
 	packetLen = descSize + ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

typedefs still need to be fixed up.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/VmbusApi.h |  284 +++++++++++++++------------------
 1 files changed, 129 insertions(+), 155 deletions(-)

diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h
index d038ad8..8b0b233 100644
--- a/drivers/staging/hv/include/VmbusApi.h
+++ b/drivers/staging/hv/include/VmbusApi.h
@@ -25,37 +25,31 @@
 #ifndef _VMBUS_API_H_
 #define _VMBUS_API_H_
 
-
-
-/* Defines */
-
-
 #define MAX_PAGE_BUFFER_COUNT				16
 #define MAX_MULTIPAGE_BUFFER_COUNT			32 /* 128K */
 
-/* Data types */
-
-
-#pragma pack(push,1)
+#pragma pack(push, 1)
 
 /* Single-page buffer */
 typedef struct _PAGE_BUFFER {
-	u32	Length;
-	u32	Offset;
-	u64	Pfn;
+	u32 Length;
+	u32 Offset;
+	u64 Pfn;
 } PAGE_BUFFER;
 
 /* Multiple-page buffer */
 typedef struct _MULTIPAGE_BUFFER {
 	/* Length and Offset determines the # of pfns in the array */
-	u32	Length;
-	u32	Offset;
-	u64	PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
-}MULTIPAGE_BUFFER;
+	u32 Length;
+	u32 Offset;
+	u64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
+} MULTIPAGE_BUFFER;
 
 /* 0x18 includes the proprietary packet header */
-#define MAX_PAGE_BUFFER_PACKET			(0x18 + (sizeof(PAGE_BUFFER) * MAX_PAGE_BUFFER_COUNT))
-#define MAX_MULTIPAGE_BUFFER_PACKET		(0x18 + sizeof(MULTIPAGE_BUFFER))
+#define MAX_PAGE_BUFFER_PACKET		(0x18 +			\
+					(sizeof(PAGE_BUFFER) * 	\
+					 MAX_PAGE_BUFFER_COUNT))
+#define MAX_MULTIPAGE_BUFFER_PACKET	(0x18 + sizeof(MULTIPAGE_BUFFER))
 
 
 #pragma pack(pop)
@@ -64,193 +58,173 @@ struct hv_driver;
 struct hv_device;
 
 /* All drivers */
-typedef int (*PFN_ON_DEVICEADD)(struct hv_device *Device, void* AdditionalInfo);
+typedef int (*PFN_ON_DEVICEADD)(struct hv_device *Device,
+				void *AdditionalInfo);
 typedef int (*PFN_ON_DEVICEREMOVE)(struct hv_device *Device);
 typedef char** (*PFN_ON_GETDEVICEIDS)(void);
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Everything but the typedefs are taken care of.

Also a number of unused defines were removed.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/ChannelMessages.h |  395 ++++++++++----------------
 1 files changed, 151 insertions(+), 244 deletions(-)

diff --git a/drivers/staging/hv/include/ChannelMessages.h b/drivers/staging/hv/include/ChannelMessages.h
index 1e41948..9774396 100644
--- a/drivers/staging/hv/include/ChannelMessages.h
+++ b/drivers/staging/hv/include/ChannelMessages.h
@@ -21,163 +21,126 @@
  *
  */
 
-
-#pragma once
+#ifndef __CHANNELMESSAGES_H
+#define __CHANNELMESSAGES_H
 
 #include "VmbusPacketFormat.h"
 
-#define C_ASSERT(x)
-typedef u32 NTSTATUS;
-
-#pragma pack(push,1)
-
-
 /* Version 1 messages */
-
-
-typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE
-{
-    ChannelMessageInvalid                   =  0,
-    ChannelMessageOfferChannel              =  1,
-    ChannelMessageRescindChannelOffer       =  2,
-    ChannelMessageRequestOffers             =  3,
-    ChannelMessageAllOffersDelivered        =  4,
-    ChannelMessageOpenChannel               =  5,
-    ChannelMessageOpenChannelResult         =  6,
-    ChannelMessageCloseChannel              =  7,
-    ChannelMessageGpadlHeader               =  8,
-    ChannelMessageGpadlBody                 =  9,
-    ChannelMessageGpadlCreated              = 10,
-    ChannelMessageGpadlTeardown             = 11,
-    ChannelMessageGpadlTorndown             = 12,
-    ChannelMessageRelIdReleased             = 13,
-    ChannelMessageInitiateContact           = 14,
-    ChannelMessageVersionResponse           = 15,
-    ChannelMessageUnload                    = 16,
+typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE {
+	ChannelMessageInvalid			=  0,
+	ChannelMessageOfferChannel		=  1,
+	ChannelMessageRescindChannelOffer	=  2,
+	ChannelMessageRequestOffers		=  3,
+	ChannelMessageAllOffersDelivered	=  4,
+	ChannelMessageOpenChannel		=  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

ChannelMessages.h is now coding style clean.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c                 |   66 +++++------
 drivers/staging/hv/ChannelMgmt.c             |  158 ++++++++-----------------
 drivers/staging/hv/ChannelMgmt.h             |   12 +-
 drivers/staging/hv/Connection.c              |   14 +-
 drivers/staging/hv/include/ChannelMessages.h |  117 +++++++++----------
 5 files changed, 151 insertions(+), 216 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 5bea2d6..cd3b0b0 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -195,7 +195,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel,
 	)
 {
 	int ret=0;
-	VMBUS_CHANNEL_OPEN_CHANNEL* openMsg;
+	struct vmbus_channel_open_channel *openMsg;
 	struct vmbus_channel_msginfo *openInfo;
 	void *in, *out;
 	unsigned long flags;
@@ -245,12 +245,12 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel,
 		SendRingBufferSize);
 
 	/* Create and init the channel open message */
-	openInfo = kmalloc(sizeof(*openInfo) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
+	openInfo = kmalloc(sizeof(*openInfo) + sizeof(struct vmbus_channel_open_channel), GFP_KERNEL);
 	ASSERT(openInfo != NULL);
 
 	openInfo->WaitEvent = osd_WaitEventCreate();
 
-	openMsg = (VMBUS_CHANNEL_OPEN_CHANNEL*)openInfo->Msg;
+	openMsg = (struct vmbus_channel_open_channel *)openInfo->Msg;
 	openMsg->Header.MessageType				= ChannelMessageOpenChannel;
 	openMsg->OpenId							= NewChannel->OfferMsg.ChildRelId; /* FIXME */
     openMsg->ChildRelId						= NewChannel->OfferMsg.ChildRelId;
@@ -271,7 +271,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel,
 
 	DPRINT_DBG(VMBUS, "Sending channel open msg...");
 
-	ret = VmbusPostMessage(openMsg, sizeof(VMBUS_CHANNEL_OPEN_CHANNEL));
+	ret = VmbusPostMessage(openMsg, sizeof(struct vmbus_channel_open_channel));
 	if (ret != 0)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's now clean.

Well, from a coding style guide, not from a logic standpoint, the whole
file needs to be tossed overboard and cheered on as the sharks tear it
to individual bits.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/logging.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/hv/include/logging.h b/drivers/staging/hv/include/logging.h
index 74c18f1..9e55617 100644
--- a/drivers/staging/hv/include/logging.h
+++ b/drivers/staging/hv/include/logging.h
@@ -62,11 +62,11 @@
 extern unsigned int vmbus_loglevel;
 
 #define ASSERT(expr)	\
-        if (!(expr)) {	\
+	if (!(expr)) {	\
 		printk(KERN_CRIT "Assertion failed! %s,%s,%s,line=%d\n", \
 		       #expr, __FILE__, __func__, __LINE__);	\
 		__asm__ __volatile__("int3");	\
-        }
+	}
 
 #define DPRINT(mod, lvl, fmt, args...) do {\
 	if ((mod & (HIWORD(vmbus_loglevel))) &&	\
@@ -89,7 +89,7 @@ extern unsigned int vmbus_loglevel;
 #define DPRINT_WARN(mod, fmt, args...) do {\
 	if ((mod & (HIWORD(vmbus_loglevel))) &&		\
 	    (WARNING_LVL <= LOWORD(vmbus_loglevel)))	\
-	    printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\
+		printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\
 	} while (0)
 
 #define DPRINT_ERR(mod, fmt, args...) do {\
@@ -103,7 +103,7 @@ extern unsigned int vmbus_loglevel;
 #define DPRINT_ENTER(mod) do {\
 	if ((mod & (HIWORD(vmbus_loglevel))) && \
 	    (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel)))	\
-	    printk(KERN_DEBUG "["#mod"]: %s() enter\n", __func__);\
+		printk(KERN_DEBUG "["#mod"]: %s() enter\n", __func__);\
 	} while (0)
 
 #define DPRINT_EXIT(mod) do {\
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Everything but the typedefs.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/NetVscApi.h |   87 +++++++++++++------------------
 1 files changed, 37 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h
index 60e6fbb..4445d69 100644
--- a/drivers/staging/hv/include/NetVscApi.h
+++ b/drivers/staging/hv/include/NetVscApi.h
@@ -29,29 +29,23 @@
 #include "List.h"
 
 /* Defines */
-
-#define NETVSC_DEVICE_RING_BUFFER_SIZE			64*PAGE_SIZE
-
-#define HW_MACADDR_LEN		6
-
+#define NETVSC_DEVICE_RING_BUFFER_SIZE	(64*PAGE_SIZE)
+#define HW_MACADDR_LEN			6
 
 /* Fwd declaration */
-
 struct hv_netvsc_packet;
 
-
-
 /* Data types */
-
-
 typedef int (*PFN_ON_OPEN)(struct hv_device *Device);
 typedef int (*PFN_ON_CLOSE)(struct hv_device *Device);
 
 typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device);
-typedef int (*PFN_ON_SEND)(struct hv_device *dev, struct hv_netvsc_packet *packet);
-typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
+typedef int (*PFN_ON_SEND)(struct hv_device *dev,
+			   struct hv_netvsc_packet *packet);
+typedef void (*PFN_ON_SENDRECVCOMPLETION)(void *Context);
 
-typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev, struct hv_netvsc_packet *packet);
+typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev,
+				   struct hv_netvsc_packet *packet);
 typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);
 
 /* Represent the xfer page packet which contains 1 or more netvsc packet */
@@ -59,12 +53,11 @@ typedef struct _XFERPAGE_PACKET {
 	LIST_ENTRY ListEntry;
 
 	/* # of netvsc packets this xfer packet contains */
-	u32				Count;
+	u32 Count;
 } XFERPAGE_PACKET;
 
-
 /* The number of pages which are enough to cover jumbo frame buffer. */
-#define NETVSC_PACKET_MAXPAGE  4
+#define NETVSC_PACKET_MAXPAGE		4
 
 /*
  * Represent netvsc packet which ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's now all clean from a coding style standpoint.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c            |   12 ++++++------
 drivers/staging/hv/RndisFilter.c       |    9 +++------
 drivers/staging/hv/RndisFilter.h       |    2 +-
 drivers/staging/hv/include/NetVscApi.h |   14 +++++++-------
 drivers/staging/hv/netvsc_drv.c        |   19 ++++++++++---------
 5 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 6d5ee1c..a7363a1 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -231,7 +231,7 @@ NetVscInitialize(
 	struct hv_driver *drv
 	)
 {
-	NETVSC_DRIVER_OBJECT* driver = (NETVSC_DRIVER_OBJECT*)drv;
+	struct netvsc_driver *driver = (struct netvsc_driver *)drv;
 	int ret=0;
 
 	DPRINT_ENTER(NETVSC);
@@ -802,7 +802,7 @@ NetVscOnDeviceAdd(
 	struct hv_netvsc_packet *packet;
 	LIST_ENTRY *entry;
 
-	NETVSC_DRIVER_OBJECT *netDriver = (NETVSC_DRIVER_OBJECT*) Device->Driver;;
+	struct netvsc_driver *netDriver = (struct netvsc_driver *)Device->Driver;
 
 	DPRINT_ENTER(NETVSC);
 
@@ -1119,8 +1119,8 @@ NetVscOnReceive(
 	LIST_ENTRY* entry;
 	unsigned long start;
 	unsigned long end, endVirtual;
-	/* NETVSC_DRIVER_OBJECT *netvscDriver; */
-	XFERPAGE_PACKET *xferpagePacket=NULL;
+	/* struct netvsc_driver *netvscDriver; */
+	struct xferpage_packet *xferpagePacket=NULL;
 	LIST_ENTRY listHead;
 
 	int i=0, j=0;
@@ -1217,7 +1217,7 @@ NetVscOnReceive(
 
 	/* Remove the 1st packet to represent the xfer page packet itself */
 	entry = REMOVE_HEAD_LIST(&listHead);
-	xferpagePacket = CONTAINING_RECORD(entry, XFERPAGE_PACKET, ListEntry);
+	xferpagePacket = CONTAINING_RECORD(entry, struct xferpage_packet, ListEntry);
 	xferpagePacket->Count = count - 1; /* This is how much we can satisfy */
 	ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <= vmxferpagePacket->RangeCount);
 
@@ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It snuck in with the other typedef cleanups, sorry about that.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelInterface.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h
index e24f736..684b4ca 100644
--- a/drivers/staging/hv/ChannelInterface.h
+++ b/drivers/staging/hv/ChannelInterface.h
@@ -29,6 +29,7 @@
 
 void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface);
 
-void GetChannelInfo(struct hv_device *Device, struct hv_device_info *DeviceInfo);
+void GetChannelInfo(struct hv_device *Device,
+		    struct hv_device_info *DeviceInfo);
 
 #endif /* _CHANNEL_INTERFACE_H_ */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

It's all clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c   |    4 +-
 drivers/staging/hv/StorVsc.c  |   68 ++++++++++++++++++++--------------------
 drivers/staging/hv/vstorage.h |   44 +++++++++-----------------
 3 files changed, 52 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index b2e6651..d613e59 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -61,9 +61,9 @@ BlkVscInitialize(
 
 	storDriver->RequestExtSize			= sizeof(STORVSC_REQUEST_EXTENSION);
 	/* Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices) */
-	/* by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + VSTOR_PACKET + u64) */
+	/* by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + struct vstor_packet + u64) */
 	storDriver->MaxOutstandingRequestsPerChannel =
-		((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(VSTOR_PACKET) + sizeof(u64),sizeof(u64)));
+		((storDriver->RingBufferSize - PAGE_SIZE) / ALIGN_UP(MAX_MULTIPAGE_BUFFER_PACKET + sizeof(struct vstor_packet) + sizeof(u64),sizeof(u64)));
 
 	DPRINT_INFO(BLKVSC, "max io outstd %u", storDriver->MaxOutstandingRequestsPerChannel);
 
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index a235613..bcc545f 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -49,7 +49,7 @@ typedef struct _STORVSC_REQUEST_EXTENSION {
 	/* Synchronize the request/response if needed */
 	struct osd_waitevent *WaitEvent;
 
-	VSTOR_PACKET					VStorPacket;
+	struct vstor_packet VStorPacket;
 } STORVSC_REQUEST_EXTENSION;
 
 
@@ -132,14 +132,14 @@ StorVscOnChannelCallback(
 static void
 StorVscOnIOCompletion(
 	struct hv_device *Device,
-	VSTOR_PACKET	*VStorPacket,
+	struct vstor_packet ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Move it out of the include subdir, it doesn't need to
be there.

No code was changed in the move.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c                |    2 +-
 drivers/staging/hv/{include => }/vstorage.h |    0
 2 files changed, 1 insertions(+), 1 deletions(-)
 rename drivers/staging/hv/{include => }/vstorage.h (100%)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 96aab17..a235613 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -29,7 +29,7 @@
 #include "include/logging.h"
 #include "include/StorVscApi.h"
 #include "include/VmbusPacketFormat.h"
-#include "include/vstorage.h"
+#include "vstorage.h"
 
 
 
diff --git a/drivers/staging/hv/include/vstorage.h b/drivers/staging/hv/vstorage.h
similarity index 100%
rename from drivers/staging/hv/include/vstorage.h
rename to drivers/staging/hv/vstorage.h
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

Heh, volatiles, like that was a good idea...  Turns out they were not
even used, wierd stuff.

All clean except for the typedefs.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/VmbusPacketFormat.h |  370 +++++++-----------------
 1 files changed, 109 insertions(+), 261 deletions(-)

diff --git a/drivers/staging/hv/include/VmbusPacketFormat.h b/drivers/staging/hv/include/VmbusPacketFormat.h
index f6600a9..d7f65de 100644
--- a/drivers/staging/hv/include/VmbusPacketFormat.h
+++ b/drivers/staging/hv/include/VmbusPacketFormat.h
@@ -21,300 +21,148 @@
  *
  */
 
+#ifndef _VMBUSPACKETFORMAT_H_
 
-#pragma once
-
-/* #ifndef PAGE_SIZE */
-/* #if defined(_IA64_) */
-/* #error This does not work for IA64 */
-/* #else */
-/* #define PAGE_SIZE 0x1000 */
-/* #endif */
-/* #endif */
-
-/* allow nameless unions */
-/* #pragma warning(disable : 4201) */
-
-typedef struct
-{
-    union
-    {
-	struct
-	{
-	    volatile u32  In;        /* Offset in bytes from the ring base */
-	    volatile u32  Out;       /* Offset in bytes from the ring base */
-	};
-	volatile long long InOut;
-    };
-
-
-    /* If the receiving endpoint sets this to some non-zero value, the sending */
-    /* endpoint should not send any interrupts. */
-
-
-    volatile u32 InterruptMask;
-
-} VMRCB, *PVMRCB;
-
-typedef struct
-{
-    union
-    {
-	struct
-	{
-	    VMRCB Control;
-	};
-
-	u8 Reserved[PAGE_SIZE];
-    };
-
-
-    /* Beginning of the ring data.  Note: It must be guaranteed that */
-    /* this data does not share a page with the control structure. */
-
-    u8 Data[1];
-} VMRING, *PVMRING;
-
-#pragma pack(push, 1)
-
-typedef struct
-{
-    u16 Type;
-    u16 DataOffset8;
-    u16 Length8;
-    u16 Flags;
-    u64 TransactionId;
-} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
+typedef struct {
+	u16 Type;
+	u16 DataOffset8;
+	u16 Length8;
+	u16 Flags;
+	u64 TransactionId;
+} ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

All spiffied up now, shines like a brass button on the bump of a barge's
bilge.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c                   |   28 +++---
 drivers/staging/hv/Channel.h                   |    6 +-
 drivers/staging/hv/NetVsc.c                    |   20 ++--
 drivers/staging/hv/include/ChannelMessages.h   |    2 +-
 drivers/staging/hv/include/VmbusPacketFormat.h |  108 +++++++++++-------------
 drivers/staging/hv/vstorage.h                  |    2 +-
 6 files changed, 79 insertions(+), 87 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index cd3b0b0..8849e23 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -395,13 +395,13 @@ VmbusChannelCreateGpadlHeader(
 	pfn = virt_to_phys(Kbuffer) >> PAGE_SHIFT;
 
 	/* do we need a gpadl body msg */
-	pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(struct vmbus_channel_gpadl_header) - sizeof(GPA_RANGE);
+	pfnSize = MAX_SIZE_CHANNEL_MESSAGE - sizeof(struct vmbus_channel_gpadl_header) - sizeof(struct gpa_range);
 	pfnCount = pfnSize / sizeof(u64);
 
 	if (pageCount > pfnCount) /* we need a gpadl body */
 	{
 		/* fill in the header */
-		msgSize = sizeof(struct vmbus_channel_msginfo) + sizeof(struct vmbus_channel_gpadl_header) + sizeof(GPA_RANGE) + pfnCount*sizeof(u64);
+		msgSize = sizeof(struct vmbus_channel_msginfo) + sizeof(struct vmbus_channel_gpadl_header) + sizeof(struct gpa_range) + pfnCount*sizeof(u64);
 		msgHeader =  kzalloc(msgSize, GFP_KERNEL);
 
 		INITIALIZE_LIST_HEAD(&msgHeader->SubMsgList);
@@ -409,7 +409,7 @@ VmbusChannelCreateGpadlHeader(
 
 		gpaHeader = (struct vmbus_channel_gpadl_header *)msgHeader->Msg;
 		gpaHeader->RangeCount = 1;
-		gpaHeader->RangeBufLen = sizeof(GPA_RANGE) + pageCount*sizeof(u64);
+		gpaHeader->RangeBufLen = sizeof(struct gpa_range) + pageCount*sizeof(u64);
 		gpaHeader->Range[0].ByteOffset = 0;
 		gpaHeader->Range[0].ByteCount ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:08 pm

No typedef changes yet though.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/StorVscApi.h |   85 ++++++++++++-------------------
 1 files changed, 33 insertions(+), 52 deletions(-)

diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h
index 2b3a737..2deefbd 100644
--- a/drivers/staging/hv/include/StorVscApi.h
+++ b/drivers/staging/hv/include/StorVscApi.h
@@ -27,12 +27,9 @@
 
 #include "VmbusApi.h"
 
-
 /* Defines */
-
-
-#define STORVSC_RING_BUFFER_SIZE			10*PAGE_SIZE
-#define BLKVSC_RING_BUFFER_SIZE				20*PAGE_SIZE
+#define STORVSC_RING_BUFFER_SIZE			(10*PAGE_SIZE)
+#define BLKVSC_RING_BUFFER_SIZE				(20*PAGE_SIZE)
 
 #define STORVSC_MAX_IO_REQUESTS				64
 
@@ -42,27 +39,20 @@
  * scsi host adapter essentially has 1 bus with 1 target that contains
  * up to 256 luns.
  */
-
 #define STORVSC_MAX_LUNS_PER_TARGET			64
-#define STORVSC_MAX_TARGETS					1
+#define STORVSC_MAX_TARGETS				1
 #define STORVSC_MAX_CHANNELS				1
 
-
-/* Fwd decl */
-
-/* struct VMBUS_CHANNEL; */
 struct hv_storvsc_request;
 
-
 /* Data types */
-
-typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device, struct hv_storvsc_request *Request);
+typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device,
+				 struct hv_storvsc_request *Request);
 typedef void (*PFN_ON_IO_REQUEST_COMPLTN)(struct hv_storvsc_request *Request);
 
 typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
 typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
 
-
 /* Matches Windows-end */
 typedef enum _STORVSC_REQUEST_TYPE{
 	WRITE_TYPE,
@@ -70,70 +60,61 @@ typedef enum _STORVSC_REQUEST_TYPE{
 	UNKNOWN_TYPE,
 } STORVSC_REQUEST_TYPE;
 
-
 struct hv_storvsc_request {
-	STORVSC_REQUEST_TYPE		Type;
-	u32					Host;
-	u32					Bus;
-	u32					TargetId;
-	u32					LunId;
-	u8 *					Cdb;
-	u32					CdbLen;
-	u32					Status;
-	u32					BytesXfer;
+	STORVSC_REQUEST_TYPE ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's all clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c             |    4 ++--
 drivers/staging/hv/StorVsc.c            |   10 +++++-----
 drivers/staging/hv/blkvsc_drv.c         |   14 +++++++-------
 drivers/staging/hv/include/StorVscApi.h |   14 +++++++-------
 drivers/staging/hv/storvsc_drv.c        |   16 ++++++++--------
 5 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index d613e59..d433d8c 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -48,7 +48,7 @@ BlkVscInitialize(
 	struct hv_driver *Driver
 	)
 {
-	STORVSC_DRIVER_OBJECT* storDriver = (STORVSC_DRIVER_OBJECT*)Driver;
+	struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
 	int ret=0;
 
 	DPRINT_ENTER(BLKVSC);
@@ -86,7 +86,7 @@ BlkVscOnDeviceAdd(
 	)
 {
 	int ret=0;
-	STORVSC_DEVICE_INFO *deviceInfo = (STORVSC_DEVICE_INFO*)AdditionalInfo;
+	struct storvsc_device_info *deviceInfo = (struct storvsc_device_info *)AdditionalInfo;
 
 	DPRINT_ENTER(BLKVSC);
 
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index bcc545f..edb3ab6 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -261,7 +261,7 @@ StorVscInitialize(
 	struct hv_driver *Driver
 	)
 {
-	STORVSC_DRIVER_OBJECT* storDriver = (STORVSC_DRIVER_OBJECT*)Driver;
+	struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
 	int ret=0;
 
 	DPRINT_ENTER(STORVSC);
@@ -319,7 +319,7 @@ StorVscOnDeviceAdd(
 	int ret=0;
 	STORVSC_DEVICE *storDevice;
 	/* struct vmstorage_channel_properties *props; */
-	STORVSC_DEVICE_INFO *deviceInfo = (STORVSC_DEVICE_INFO*)AdditionalInfo;
+	struct storvsc_device_info *deviceInfo = (struct storvsc_device_info *)AdditionalInfo;
 
 	DPRINT_ENTER(STORVSC);
 
@@ -530,7 +530,7 @@ StorVscConnectToVsp(
 	int ret=0;
 	struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.h               |  247 ++++++++++++++++++++++++++-
 drivers/staging/hv/include/nvspprotocol.h |  264 -----------------------------
 2 files changed, 244 insertions(+), 267 deletions(-)
 delete mode 100644 drivers/staging/hv/include/nvspprotocol.h

diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index 59d7754..f816d5c 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -25,12 +25,253 @@
 #define _NETVSC_H_
 
 #include "include/VmbusPacketFormat.h"
-#include "include/nvspprotocol.h"
-
+#include "include/VmbusChannelInterface.h"
 #include "include/List.h"
-
 #include "include/NetVscApi.h"
 
+
+#define NVSP_INVALID_PROTOCOL_VERSION	((u32)0xFFFFFFFF)
+
+#define NVSP_PROTOCOL_VERSION_1		2
+#define NVSP_MIN_PROTOCOL_VERSION	NVSP_PROTOCOL_VERSION_1
+#define NVSP_MAX_PROTOCOL_VERSION	NVSP_PROTOCOL_VERSION_1
+
+enum {
+	NvspMessageTypeNone = 0,
+
+	/* Init Messages */
+	NvspMessageTypeInit			= 1,
+	NvspMessageTypeInitComplete		= 2,
+
+	NvspVersionMessageStart			= 100,
+
+	/* Version 1 Messages */
+	NvspMessage1TypeSendNdisVersion		= NvspVersionMessageStart,
+
+	NvspMessage1TypeSendReceiveBuffer,
+	NvspMessage1TypeSendReceiveBufferComplete,
+	NvspMessage1TypeRevokeReceiveBuffer,
+
+	NvspMessage1TypeSendSendBuffer,
+	NvspMessage1TypeSendSendBufferComplete,
+	NvspMessage1TypeRevokeSendBuffer,
+
+	NvspMessage1TypeSendRNDISPacket,
+	NvspMessage1TypeSendRNDISPacketComplete,
+
+	/*
+	 * This should be set to the number of messages for the version with
+	 * the maximum number of messages.
+	 */
+	NvspNumMessagePerVersion		= 9,
+};
+
+enum {
+	NvspStatusNone = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's only ever used within the ChannelMgmt.h file, so pull it
into there.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h             |  188 ++++++++++++++++++++++-
 drivers/staging/hv/include/ChannelMessages.h |  217 --------------------------
 2 files changed, 187 insertions(+), 218 deletions(-)
 delete mode 100644 drivers/staging/hv/include/ChannelMessages.h

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 18eac31..822d9c0 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -29,9 +29,195 @@
 #include "RingBuffer.h"
 
 #include "include/VmbusChannelInterface.h"
-#include "include/ChannelMessages.h"
+#include "include/VmbusPacketFormat.h"
 
+/* Version 1 messages */
+enum vmbus_channel_message_type {
+	ChannelMessageInvalid			=  0,
+	ChannelMessageOfferChannel		=  1,
+	ChannelMessageRescindChannelOffer	=  2,
+	ChannelMessageRequestOffers		=  3,
+	ChannelMessageAllOffersDelivered	=  4,
+	ChannelMessageOpenChannel		=  5,
+	ChannelMessageOpenChannelResult		=  6,
+	ChannelMessageCloseChannel		=  7,
+	ChannelMessageGpadlHeader		=  8,
+	ChannelMessageGpadlBody			=  9,
+	ChannelMessageGpadlCreated		= 10,
+	ChannelMessageGpadlTeardown		= 11,
+	ChannelMessageGpadlTorndown		= 12,
+	ChannelMessageRelIdReleased		= 13,
+	ChannelMessageInitiateContact		= 14,
+	ChannelMessageVersionResponse		= 15,
+	ChannelMessageUnload			= 16,
+#ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD
+	ChannelMessageViewRangeAdd		= 17,
+	ChannelMessageViewRangeRemove		= 18,
+#endif
+	ChannelMessageCount
+} __attribute__((packed));
 
+struct vmbus_channel_message_header {
+	enum vmbus_channel_message_type MessageType;
+	u32 Padding;
+} __attribute__((packed));
+
+/* Query VMBus Version parameters */
+struct vmbus_channel_query_vmbus_version {
+	struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

No typedef changes yet though.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/include/nvspprotocol.h |  436 +++++++++++++----------------
 1 files changed, 196 insertions(+), 240 deletions(-)

diff --git a/drivers/staging/hv/include/nvspprotocol.h b/drivers/staging/hv/include/nvspprotocol.h
index 5e7e03c..03fbb42 100644
--- a/drivers/staging/hv/include/nvspprotocol.h
+++ b/drivers/staging/hv/include/nvspprotocol.h
@@ -21,286 +21,242 @@
  *
  */
 
-
-#pragma once
-
 #include "VmbusChannelInterface.h"
 
-#define NVSP_INVALID_PROTOCOL_VERSION           ((u32)0xFFFFFFFF)
-
-#define NVSP_PROTOCOL_VERSION_1                 2
-#define NVSP_MIN_PROTOCOL_VERSION               NVSP_PROTOCOL_VERSION_1
-#define NVSP_MAX_PROTOCOL_VERSION               NVSP_PROTOCOL_VERSION_1
-
-typedef enum _NVSP_MESSAGE_TYPE
-{
-    NvspMessageTypeNone = 0,
-
+#define NVSP_INVALID_PROTOCOL_VERSION	((u32)0xFFFFFFFF)
 
-    /* Init Messages */
+#define NVSP_PROTOCOL_VERSION_1		2
+#define NVSP_MIN_PROTOCOL_VERSION	NVSP_PROTOCOL_VERSION_1
+#define NVSP_MAX_PROTOCOL_VERSION	NVSP_PROTOCOL_VERSION_1
 
-    NvspMessageTypeInit                         = 1,
-    NvspMessageTypeInitComplete                 = 2,
+typedef enum _NVSP_MESSAGE_TYPE {
+	NvspMessageTypeNone = 0,
 
-    NvspVersionMessageStart                     = 100,
+	/* Init Messages */
+	NvspMessageTypeInit			= 1,
+	NvspMessageTypeInitComplete		= 2,
 
+	NvspVersionMessageStart			= 100,
 
-    /* Version 1 Messages */
+	/* Version 1 Messages */
+	NvspMessage1TypeSendNdisVersion		= NvspVersionMessageStart,
 
-    NvspMessage1TypeSendNdisVersion             = NvspVersionMessageStart,
+	NvspMessage1TypeSendReceiveBuffer,
+	NvspMessage1TypeSendReceiveBufferComplete,
+	NvspMessage1TypeRevokeReceiveBuffer,
 
-    NvspMessage1TypeSendReceiveBuffer,
-    NvspMessage1TypeSendReceiveBufferComplete,
-    ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h        |    2 +-
 drivers/staging/hv/{include => }/List.h |    0
 drivers/staging/hv/NetVsc.h             |    2 +-
 drivers/staging/hv/VmbusPrivate.h       |    2 +-
 drivers/staging/hv/include/NetVscApi.h  |    2 +-
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename drivers/staging/hv/{include => }/List.h (100%)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 822d9c0..922eac2 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -25,7 +25,7 @@
 #ifndef _CHANNEL_MGMT_H_
 #define _CHANNEL_MGMT_H_
 
-#include "include/List.h"
+#include "List.h"
 #include "RingBuffer.h"
 
 #include "include/VmbusChannelInterface.h"
diff --git a/drivers/staging/hv/include/List.h b/drivers/staging/hv/List.h
similarity index 100%
rename from drivers/staging/hv/include/List.h
rename to drivers/staging/hv/List.h
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index f816d5c..9373440 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -26,7 +26,7 @@
 
 #include "include/VmbusPacketFormat.h"
 #include "include/VmbusChannelInterface.h"
-#include "include/List.h"
+#include "List.h"
 #include "include/NetVscApi.h"
 
 
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index 928735e..ce933d6 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -31,7 +31,7 @@
 #include "ChannelMgmt.h"
 #include "ChannelInterface.h"
 #include "RingBuffer.h"
-#include "include/List.h"
+#include "List.h"
 
 
 /*
diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h
index c53e417..5075494 100644
--- a/drivers/staging/hv/include/NetVscApi.h
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.h                  |    2 +-
 drivers/staging/hv/{include => }/NetVscApi.h |    4 ++--
 drivers/staging/hv/RndisFilter.c             |    2 +-
 drivers/staging/hv/netvsc_drv.c              |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
 rename drivers/staging/hv/{include => }/NetVscApi.h (98%)

diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index 9373440..afa764f 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -27,7 +27,7 @@
 #include "include/VmbusPacketFormat.h"
 #include "include/VmbusChannelInterface.h"
 #include "List.h"
-#include "include/NetVscApi.h"
+#include "NetVscApi.h"
 
 
 #define NVSP_INVALID_PROTOCOL_VERSION	((u32)0xFFFFFFFF)
diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
similarity index 98%
rename from drivers/staging/hv/include/NetVscApi.h
rename to drivers/staging/hv/NetVscApi.h
index 5075494..9166c5c 100644
--- a/drivers/staging/hv/include/NetVscApi.h
+++ b/drivers/staging/hv/NetVscApi.h
@@ -25,8 +25,8 @@
 #ifndef _NETVSC_API_H_
 #define _NETVSC_API_H_
 
-#include "VmbusApi.h"
-#include "../List.h"
+#include "include/VmbusApi.h"
+#include "List.h"
 
 /* Defines */
 #define NETVSC_DEVICE_RING_BUFFER_SIZE	(64*PAGE_SIZE)
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 1c2f157..a509cb3 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -28,7 +28,7 @@
 
 #include "osd.h"
 #include "logging.h"
-#include "include/NetVscApi.h"
+#include "NetVscApi.h"
 #include "RndisFilter.h"
 
 
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index f10a0cf..bec135b 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelInterface.h       |    2 +-
 drivers/staging/hv/NetVscApi.h              |    2 +-
 drivers/staging/hv/StorVscApi.h             |    2 +-
 drivers/staging/hv/{include => }/VmbusApi.h |    0
 drivers/staging/hv/VmbusPrivate.h           |    2 +-
 drivers/staging/hv/vmbus.h                  |    2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename drivers/staging/hv/{include => }/VmbusApi.h (100%)

diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h
index 684b4ca..27b7a25 100644
--- a/drivers/staging/hv/ChannelInterface.h
+++ b/drivers/staging/hv/ChannelInterface.h
@@ -25,7 +25,7 @@
 #ifndef _CHANNEL_INTERFACE_H_
 #define _CHANNEL_INTERFACE_H_
 
-#include "include/VmbusApi.h"
+#include "VmbusApi.h"
 
 void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface);
 
diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
index 9166c5c..c53e417 100644
--- a/drivers/staging/hv/NetVscApi.h
+++ b/drivers/staging/hv/NetVscApi.h
@@ -25,7 +25,7 @@
 #ifndef _NETVSC_API_H_
 #define _NETVSC_API_H_
 
-#include "include/VmbusApi.h"
+#include "VmbusApi.h"
 #include "List.h"
 
 /* Defines */
diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h
index 6771e2b..56193ff 100644
--- a/drivers/staging/hv/StorVscApi.h
+++ b/drivers/staging/hv/StorVscApi.h
@@ -25,7 +25,7 @@
 #ifndef _STORVSC_API_H_
 #define _STORVSC_API_H_
 
-#include "include/VmbusApi.h"
+#include "VmbusApi.h"
 
 /* Defines */
 #define STORVSC_RING_BUFFER_SIZE			(10*PAGE_SIZE)
diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/VmbusApi.h
similarity index 100%
rename from drivers/staging/hv/include/VmbusApi.h
rename to drivers/staging/hv/VmbusApi.h
diff --git ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h                   |    2 +-
 drivers/staging/hv/NetVsc.h                        |    2 +-
 .../hv/{include => }/VmbusChannelInterface.h       |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/staging/hv/{include => }/VmbusChannelInterface.h (100%)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 922eac2..6d327c6 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -28,7 +28,7 @@
 #include "List.h"
 #include "RingBuffer.h"
 
-#include "include/VmbusChannelInterface.h"
+#include "VmbusChannelInterface.h"
 #include "include/VmbusPacketFormat.h"
 
 /* Version 1 messages */
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index afa764f..ce6f1e2 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -25,7 +25,7 @@
 #define _NETVSC_H_
 
 #include "include/VmbusPacketFormat.h"
-#include "include/VmbusChannelInterface.h"
+#include "VmbusChannelInterface.h"
 #include "List.h"
 #include "NetVscApi.h"
 
diff --git a/drivers/staging/hv/include/VmbusChannelInterface.h b/drivers/staging/hv/VmbusChannelInterface.h
similarity index 100%
rename from drivers/staging/hv/include/VmbusChannelInterface.h
rename to drivers/staging/hv/VmbusChannelInterface.h
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.h                   |    3 +--
 drivers/staging/hv/NetVsc.h                        |    2 +-
 drivers/staging/hv/StorVsc.c                       |    2 +-
 .../staging/hv/{include => }/VmbusPacketFormat.h   |    0
 4 files changed, 3 insertions(+), 4 deletions(-)
 rename drivers/staging/hv/{include => }/VmbusPacketFormat.h (100%)

diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 6d327c6..733ef8d 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -27,9 +27,8 @@
 
 #include "List.h"
 #include "RingBuffer.h"
-
 #include "VmbusChannelInterface.h"
-#include "include/VmbusPacketFormat.h"
+#include "VmbusPacketFormat.h"
 
 /* Version 1 messages */
 enum vmbus_channel_message_type {
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index ce6f1e2..73de16e 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -24,7 +24,7 @@
 #ifndef _NETVSC_H_
 #define _NETVSC_H_
 
-#include "include/VmbusPacketFormat.h"
+#include "VmbusPacketFormat.h"
 #include "VmbusChannelInterface.h"
 #include "List.h"
 #include "NetVscApi.h"
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index e78f9ab..75b92a0 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -28,7 +28,7 @@
 #include "osd.h"
 #include "logging.h"
 #include "StorVscApi.h"
-#include "include/VmbusPacketFormat.h"
+#include "VmbusPacketFormat.h"
 #include "vstorage.h"
 
 
diff --git a/drivers/staging/hv/include/VmbusPacketFormat.h b/drivers/staging/hv/VmbusPacketFormat.h
similarity index 100%
rename from drivers/staging/hv/include/VmbusPacketFormat.h
rename to drivers/staging/hv/VmbusPacketFormat.h
-- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c |  106 +++++++++++++++++++++----------------------
 1 files changed, 51 insertions(+), 55 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index d433d8c..2f54a93 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -19,95 +19,91 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
 #include "StorVsc.c"
 
-static const char* gBlkDriverName="blkvsc";
+static const char *gBlkDriverName = "blkvsc";
 
 /* {32412632-86cb-44a2-9b5c-50d1417354f5} */
-static const struct hv_guid gBlkVscDeviceType={
+static const struct hv_guid gBlkVscDeviceType = {
 	.data = {
 		0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
 		0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
 	}
 };
 
-/* Static routines */
-static int
-BlkVscOnDeviceAdd(
-	struct hv_device *Device,
-	void			*AdditionalInfo
-	);
-
-
-int
-BlkVscInitialize(
-	struct hv_driver *Driver
-	)
+static int BlkVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
 {
-	struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
-	int ret=0;
+	struct storvsc_device_info *deviceInfo;
+	int ret = 0;
 
 	DPRINT_ENTER(BLKVSC);
 
-	/* Make sure we are at least 2 pages since 1 page is used for control */
-	ASSERT(storDriver->RingBufferSize >= (PAGE_SIZE << 1));
-
-	Driver->name = gBlkDriverName;
-	memcpy(&Driver->deviceType, &gBlkVscDeviceType, sizeof(struct hv_guid));
-
-	storDriver->RequestExtSize			= sizeof(STORVSC_REQUEST_EXTENSION);
-	/* Divide the ring buffer data size (which is 1 page less than the ring buffer size since that page is reserved for the ring buffer indices) */
-	/* by the max request size (which is VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + struct vstor_packet + u64) */
-	storDriver->MaxOutstandingRequestsPerChannel ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index a940891..6868f2d 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -32,10 +32,10 @@
 
 typedef void (*PFN_CHANNEL_MESSAGE_HANDLER)(struct vmbus_channel_message_header *msg);
 
-typedef struct _VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY {
+struct vmbus_channel_message_table_entry {
 	enum vmbus_channel_message_type	messageType;
 	PFN_CHANNEL_MESSAGE_HANDLER messageHandler;
-} VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY;
+};
 
 /* Internal routines */
 static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr);
@@ -92,7 +92,7 @@ static const struct hv_guid gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPO
 };
 
 /* Channel message dispatch table */
-static VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY gChannelMessageTable[ChannelMessageCount]= {
+static struct vmbus_channel_message_table_entry gChannelMessageTable[ChannelMessageCount]= {
     {ChannelMessageInvalid,					NULL},
     {ChannelMessageOfferChannel,            VmbusChannelOnOffer},
     {ChannelMessageRescindChannelOffer,     VmbusChannelOnOfferRescind},
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |  151 ++++++++++++++++---------------------
 1 files changed, 65 insertions(+), 86 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index a509cb3..682448c 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -33,25 +33,22 @@
 
 
 /* Data types */
-
-
-typedef struct _RNDIS_FILTER_DRIVER_OBJECT {
+struct rndis_filter_driver_object {
 	/* The original driver */
 	struct netvsc_driver InnerDriver;
+};
 
-} RNDIS_FILTER_DRIVER_OBJECT;
-
-typedef enum {
+enum rndis_device_state {
 	RNDIS_DEV_UNINITIALIZED = 0,
 	RNDIS_DEV_INITIALIZING,
 	RNDIS_DEV_INITIALIZED,
 	RNDIS_DEV_DATAINITIALIZED,
-} RNDIS_DEVICE_STATE;
+};
 
-typedef struct _RNDIS_DEVICE {
+struct rndis_device {
 	struct NETVSC_DEVICE			*NetDevice;
 
-	RNDIS_DEVICE_STATE		State;
+	enum rndis_device_state State;
 	u32					LinkStatus;
 	atomic_t NewRequestId;
 
@@ -59,10 +56,10 @@ typedef struct _RNDIS_DEVICE {
 	LIST_ENTRY				RequestList;
 
 	unsigned char					HwMacAddr[HW_MACADDR_LEN];
-} RNDIS_DEVICE;
+};
 
 
-typedef struct _RNDIS_REQUEST {
+struct rndis_request {
 	LIST_ENTRY					ListEntry;
 	struct osd_waitevent *WaitEvent;
 
@@ -75,32 +72,32 @@ typedef struct _RNDIS_REQUEST {
 	struct hv_page_buffer Buffer;
 	/* FIXME: We assumed a fixed size request here. */
 	struct rndis_message RequestMessage;
-} RNDIS_REQUEST;
+};
 
 
-typedef struct _RNDIS_FILTER_PACKET {
+struct rndis_filter_packet {
 	void						*CompletionContext;
 	PFN_ON_SENDRECVCOMPLETION	OnCompletion;
 
 	struct rndis_message Message;
-} RNDIS_FILTER_PACKET;
+};
 
 
 /* Internal routines */
 
 static int
 RndisFilterSendRequest(
-	RNDIS_DEVICE	*Device,
-	RNDIS_REQUEST	*Request
+	struct rndis_device *Device,
+	struct rndis_request *Request
 	);
 
-static void RndisFilterReceiveResponse(RNDIS_DEVICE ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c               |    3 +--
 drivers/staging/hv/ChannelMgmt.c           |    3 +--
 drivers/staging/hv/Connection.c            |    2 +-
 drivers/staging/hv/Hv.c                    |    2 +-
 drivers/staging/hv/NetVsc.c                |    2 +-
 drivers/staging/hv/RingBuffer.c            |    2 +-
 drivers/staging/hv/RndisFilter.c           |    2 +-
 drivers/staging/hv/StorVsc.c               |    2 +-
 drivers/staging/hv/Vmbus.c                 |    2 +-
 drivers/staging/hv/blkvsc_drv.c            |    2 +-
 drivers/staging/hv/{include => }/logging.h |    0
 drivers/staging/hv/netvsc_drv.c            |    2 +-
 drivers/staging/hv/storvsc_drv.c           |    2 +-
 drivers/staging/hv/vmbus_drv.c             |    2 +-
 14 files changed, 13 insertions(+), 15 deletions(-)
 rename drivers/staging/hv/{include => }/logging.h (100%)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 8849e23..d303cbd 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -24,8 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
-#include "include/logging.h"
-
+#include "logging.h"
 #include "VmbusPrivate.h"
 
 /* Internal routines */
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index d526390..a940891 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -25,8 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
-#include "include/logging.h"
-
+#include "logging.h"
 #include "VmbusPrivate.h"
 
 /* Data types */
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index d8ff49d..d4d355e 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -26,7 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c  |    2 +-
 drivers/staging/hv/StorVsc.c |   91 ++++++++++++++++++++---------------------
 2 files changed, 45 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 2f54a93..51aa861 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -82,7 +82,7 @@ int BlkVscInitialize(struct hv_driver *Driver)
 	Driver->name = gBlkDriverName;
 	memcpy(&Driver->deviceType, &gBlkVscDeviceType, sizeof(struct hv_guid));
 
-	storDriver->RequestExtSize = sizeof(STORVSC_REQUEST_EXTENSION);
+	storDriver->RequestExtSize = sizeof(struct storvsc_request_extension);
 
 	/*
 	 * Divide the ring buffer data size (which is 1 page less than the ring
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 75b92a0..ccb6d2a 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -38,9 +38,7 @@
 
 
 /* Data types */
-
-
-typedef struct _STORVSC_REQUEST_EXTENSION {
+struct storvsc_request_extension {
 	/* LIST_ENTRY						ListEntry; */
 
 	struct hv_storvsc_request *Request;
@@ -50,11 +48,11 @@ typedef struct _STORVSC_REQUEST_EXTENSION {
 	struct osd_waitevent *WaitEvent;
 
 	struct vstor_packet VStorPacket;
-} STORVSC_REQUEST_EXTENSION;
+};
 
 
 /* A storvsc device is a device object that contains a vmbus channel */
-typedef struct _STORVSC_DEVICE{
+struct storvsc_device {
 	struct hv_device *Device;
 
 	atomic_t RefCount; /* 0 indicates the device is being destroyed */
@@ -74,11 +72,10 @@ typedef struct _STORVSC_DEVICE{
 	/* HANDLE						OutstandingRequestLock; */
 
 	/* Used for vsc/vsp channel reset process */
-	STORVSC_REQUEST_EXTENSION	InitRequest;
+	struct storvsc_request_extension InitRequest;
+	struct storvsc_request_extension ResetRequest;
 
-	STORVSC_REQUEST_EXTENSION	ResetRequest;
-
-} STORVSC_DEVICE;
+};
 
 
 
@@ -133,14 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's all clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c               |   62 ++++++++--------
 drivers/staging/hv/NetVsc.h               |    6 +-
 drivers/staging/hv/include/nvspprotocol.h |  110 +++++++++++++++--------------
 3 files changed, 90 insertions(+), 88 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 36f98eb..9747ad7 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -236,8 +236,8 @@ NetVscInitialize(
 
 	DPRINT_ENTER(NETVSC);
 
-	DPRINT_DBG(NETVSC, "sizeof(struct hv_netvsc_packet)=%zd, sizeof(NVSP_MESSAGE)=%zd, sizeof(struct vmtransfer_page_packet_header)=%zd",
-		sizeof(struct hv_netvsc_packet), sizeof(NVSP_MESSAGE), sizeof(struct vmtransfer_page_packet_header));
+	DPRINT_DBG(NETVSC, "sizeof(struct hv_netvsc_packet)=%zd, sizeof(struct nvsp_message)=%zd, sizeof(struct vmtransfer_page_packet_header)=%zd",
+		sizeof(struct hv_netvsc_packet), sizeof(struct nvsp_message), sizeof(struct vmtransfer_page_packet_header));
 
 	/* Make sure we are at least 2 pages since 1 page is used for control */
 	ASSERT(driver->RingBufferSize >= (PAGE_SIZE << 1));
@@ -270,7 +270,7 @@ NetVscInitializeReceiveBufferWithNetVsp(
 {
 	int ret=0;
 	struct NETVSC_DEVICE *netDevice;
-	NVSP_MESSAGE *initPacket;
+	struct nvsp_message *initPacket;
 
 	DPRINT_ENTER(NETVSC);
 
@@ -318,7 +318,7 @@ NetVscInitializeReceiveBufferWithNetVsp(
 
 	initPacket = &netDevice->ChannelInitPacket;
 
-	memset(initPacket, 0, sizeof(NVSP_MESSAGE));
+	memset(initPacket, 0, sizeof(struct nvsp_message));
 
     initPacket->Header.MessageType = NvspMessage1TypeSendReceiveBuffer;
     initPacket->Messages.Version1Messages.SendReceiveBuffer.GpadlHandle = netDevice->ReceiveBufferGpadlHandle;
@@ -327,7 +327,7 @@ NetVscInitializeReceiveBufferWithNetVsp(
 	/* Send the gpadl notification request */
 	ret = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c                  |    2 +-
 drivers/staging/hv/{include => }/StorVscApi.h |    2 +-
 drivers/staging/hv/blkvsc_drv.c               |    3 +--
 drivers/staging/hv/storvsc_drv.c              |    2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)
 rename drivers/staging/hv/{include => }/StorVscApi.h (99%)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 82686da..e78f9ab 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -27,7 +27,7 @@
 #include <linux/delay.h>
 #include "osd.h"
 #include "logging.h"
-#include "include/StorVscApi.h"
+#include "StorVscApi.h"
 #include "include/VmbusPacketFormat.h"
 #include "vstorage.h"
 
diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/StorVscApi.h
similarity index 99%
rename from drivers/staging/hv/include/StorVscApi.h
rename to drivers/staging/hv/StorVscApi.h
index 56193ff..6771e2b 100644
--- a/drivers/staging/hv/include/StorVscApi.h
+++ b/drivers/staging/hv/StorVscApi.h
@@ -25,7 +25,7 @@
 #ifndef _STORVSC_API_H_
 #define _STORVSC_API_H_
 
-#include "VmbusApi.h"
+#include "include/VmbusApi.h"
 
 /* Defines */
 #define STORVSC_RING_BUFFER_SIZE			(10*PAGE_SIZE)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index e255755..9e0dbd5 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -36,8 +36,7 @@
 #include "osd.h"
 #include "logging.h"
 #include "vmbus.h"
-
-#include "include/StorVscApi.h"
+#include "StorVscApi.h"
 
 
 /* #defines */
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 2310282..361b903 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -39,7 +39,7 @@
 #include "osd.h"
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelInterface.c |  246 ++++++++++++---------------------
 1 files changed, 90 insertions(+), 156 deletions(-)

diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 3463ea3..26309ab 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -20,199 +20,133 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
 #include "VmbusPrivate.h"
 
-static int
-IVmbusChannelOpen(
-	struct hv_device *Device,
-	u32				SendBufferSize,
-	u32				RecvRingBufferSize,
-	void *				UserData,
-	u32				UserDataLen,
-	VMBUS_CHANNEL_CALLBACK ChannelCallback,
-	void *				Context
-	)
+static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize,
+			     u32 RecvRingBufferSize, void *UserData,
+			     u32 UserDataLen,
+			     VMBUS_CHANNEL_CALLBACK ChannelCallback,
+			     void *Context)
 {
-	return VmbusChannelOpen((struct vmbus_channel *)Device->context,
-								SendBufferSize,
-								RecvRingBufferSize,
-								UserData,
-								UserDataLen,
-								ChannelCallback,
-								Context);
+	return VmbusChannelOpen(device->context, SendBufferSize,
+				RecvRingBufferSize, UserData, UserDataLen,
+				ChannelCallback, Context);
 }
 
-
-static void
-IVmbusChannelClose(
-	struct hv_device *Device
-	)
+static void IVmbusChannelClose(struct hv_device *device)
 {
-	VmbusChannelClose((struct vmbus_channel *)Device->context);
+	VmbusChannelClose(device->context);
 }
 
-
-static int
-IVmbusChannelSendPacket(
-	struct hv_device *Device,
-	const void *			Buffer,
-	u32				BufferLen,
-	u64				RequestId,
-	u32				Type,
-	u32				Flags
-	)
+static int IVmbusChannelSendPacket(struct hv_device *device, const void *Buffer,
+				   u32 BufferLen, u64 RequestId, u32 Type,
+				   u32 Flags)
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Everything is clean except for some very long lines that
need a bit more code rework to resolve.  That will have to be done by
someone that can test the code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Connection.c |  268 +++++++++++++--------------------------
 1 files changed, 90 insertions(+), 178 deletions(-)

diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index d4d355e..e574389 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -20,8 +20,6 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
-
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
@@ -29,27 +27,18 @@
 #include "logging.h"
 #include "VmbusPrivate.h"
 
-/* Globals */
-
 
 struct VMBUS_CONNECTION gVmbusConnection = {
 	.ConnectState		= Disconnected,
 	.NextGpadlHandle	= ATOMIC_INIT(0xE1E10),
 };
 
-
-/*++
-
-Name:
-	VmbusConnect()
-
-Description:
-	Sends a connect request on the partition service connection
-
---*/
+/**
+ * VmbusConnect - Sends a connect request on the partition service connection
+ */
 int VmbusConnect(void)
 {
-	int ret=0;
+	int ret = 0;
 	struct vmbus_channel_msginfo *msgInfo = NULL;
 	struct vmbus_channel_initiate_contact *msg;
 	unsigned long flags;
@@ -63,8 +52,7 @@ int VmbusConnect(void)
 	/* Initialize the vmbus connection */
 	gVmbusConnection.ConnectState = Connecting;
 	gVmbusConnection.WorkQueue = create_workqueue("hv_vmbus_con");
-	if (!gVmbusConnection.WorkQueue)
-	{
+	if (!gVmbusConnection.WorkQueue) {
 		ret = -1;
 		goto Cleanup;
 	}
@@ -80,29 +68,30 @@ int VmbusConnect(void)
 	 * abstraction stuff
 	 */
 	gVmbusConnection.InterruptPage = osd_PageAlloc(1);
-	if (gVmbusConnection.InterruptPage == NULL)
-	{
+	if (gVmbusConnection.InterruptPage == NULL) {
 		ret = -1;
 		goto Cleanup;
 	}
 
 	gVmbusConnection.RecvInterruptPage = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's now much nicer and cleaner.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Vmbus.c |  415 ++++++++++++--------------------------------
 1 files changed, 109 insertions(+), 306 deletions(-)

diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 5c4c96f..0377155 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -20,7 +19,6 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
@@ -28,12 +26,10 @@
 #include "VersionInfo.h"
 #include "VmbusPrivate.h"
 
+static const char *gDriverName = "vmbus";
 
-/* Globals */
-
-static const char* gDriverName="vmbus";
-
-/* Windows vmbus does not defined this.
+/*
+ * Windows vmbus does not defined this.
  * We defined this to be consistent with other devices
  */
 /* {c5295816-f63a-4d5f-8d1a-4daf999ca185} */
@@ -53,106 +49,61 @@ static const struct hv_guid gVmbusDeviceId = {
 };
 
 static struct hv_driver *gDriver; /* vmbus driver object */
-static struct hv_device* gDevice; /* vmbus root device */
-
-
-
-/* Internal routines */
-
+static struct hv_device *gDevice; /* vmbus root device */
 
 static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface);
-
-static void
-VmbusGetChannelInfo(
-	struct hv_device *DeviceObject,
-	struct hv_device_info *DeviceInfo
-	);
-
-static void
-VmbusGetChannelOffers(
-	void
-	);
-
-static int
-VmbusOnDeviceAdd(
-	struct hv_device *Device,
-	void			*AdditionalInfo
-	);
-
-static int
-VmbusOnDeviceRemove(
-	struct hv_device *dev
-	);
-
-static void
-VmbusOnCleanup(
-	struct hv_driver *drv
-	);
-
-static int
-VmbusOnISR(
-	struct hv_driver *drv
-	);
-
-static void
-VmbusOnMsgDPC(
-	struct hv_driver ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Reorder some functions to get rid of all of the forward declarations.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Vmbus.c |  109 ++++++++++++++++++++------------------------
 1 files changed, 49 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 0377155..a4dd06f 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -51,66 +51,6 @@ static const struct hv_guid gVmbusDeviceId = {
 static struct hv_driver *gDriver; /* vmbus driver object */
 static struct hv_device *gDevice; /* vmbus root device */
 
-static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface);
-static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
-				struct hv_device_info *DeviceInfo);
-static void VmbusGetChannelOffers(void);
-static int VmbusOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo);
-static int VmbusOnDeviceRemove(struct hv_device *dev);
-static void VmbusOnCleanup(struct hv_driver *drv);
-static int VmbusOnISR(struct hv_driver *drv);
-static void VmbusOnMsgDPC(struct hv_driver *drv);
-static void VmbusOnEventDPC(struct hv_driver *drv);
-
-/**
- * VmbusInitialize - Main entry point
- */
-int VmbusInitialize(struct hv_driver *drv)
-{
-	struct vmbus_driver *driver = (struct vmbus_driver *)drv;
-	int ret;
-
-	DPRINT_ENTER(VMBUS);
-
-	DPRINT_INFO(VMBUS, "+++++++ Build Date=%s %s +++++++",
-			VersionDate, VersionTime);
-	DPRINT_INFO(VMBUS, "+++++++ Build Description=%s +++++++",
-			VersionDesc);
-	DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
-			VMBUS_REVISION_NUMBER);
-	DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
-			VMBUS_MESSAGE_SINT);
-	DPRINT_DBG(VMBUS, "sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER)=%zd, "
-			"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
-			sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER),
-			sizeof(struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Lots of cleanups.

Note, the use of volatile still needs to be resolved, and
possibly the #ifdef could be done a bit "better".

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Hv.c |  564 ++++++++++++++++++++---------------------------
 1 files changed, 243 insertions(+), 321 deletions(-)

diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index b61b35c..c5b6613 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -20,7 +19,6 @@
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
@@ -28,8 +26,6 @@
 #include "logging.h"
 #include "VmbusPrivate.h"
 
-/* Globals */
-
 /* The one and only */
 struct hv_context gHvContext = {
 	.SynICInitialized	= false,
@@ -38,198 +34,160 @@ struct hv_context gHvContext = {
 	.SignalEventBuffer	= NULL,
 };
 
-
-/*++
-
-Name:
-	HvQueryHypervisorPresence()
-
-Description:
-	Query the cpuid for presense of windows hypervisor
-
---*/
-static int
-HvQueryHypervisorPresence (
-    void
-    )
+/**
+ * HvQueryHypervisorPresence - Query the cpuid for presense of windows hypervisor
+ */
+static int HvQueryHypervisorPresence(void)
 {
-    unsigned int eax;
-    unsigned int ebx;
-    unsigned int ecx;
-    unsigned int edx;
-    unsigned int op;
-
-    eax = 0;
-    ebx = 0;
-    ecx = 0;
-    edx = 0;
-    op = HvCpuIdFunctionVersionAndFeatures;
-    cpuid(op, &eax, &ebx, &ecx, &edx);
-
-	return (ecx & HV_PRESENT_BIT);
-}
-
-
-/*++
+	unsigned int eax;
+	unsigned int ebx;
+	unsigned int ecx;
+	unsigned int edx;
+	unsigned int op;
 
-Name:
-	HvQueryHypervisorInfo()
-
-Description:
-	Get version info of the windows hypervisor
-
---*/
-static int
-HvQueryHypervisorInfo (
-    ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Saves space by getting rid of the forward declarations.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/netvsc_drv.c |  329 +++++++++++++++++++--------------------
 1 files changed, 158 insertions(+), 171 deletions(-)

diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 46056c6..70f66cb 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -39,19 +39,6 @@
 
 MODULE_LICENSE("GPL");
 
-static int netvsc_probe(struct device *device);
-static int netvsc_remove(struct device *device);
-static int netvsc_open(struct net_device *net);
-static void netvsc_xmit_completion(void *context);
-static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net);
-static int netvsc_recv_callback(struct hv_device *device_obj,
-				struct hv_netvsc_packet *Packet);
-static int netvsc_close(struct net_device *net);
-static struct net_device_stats *netvsc_get_stats(struct net_device *net);
-static void netvsc_linkstatus_callback(struct hv_device *device_obj,
-				       unsigned int status);
-
-
 struct net_device_context {
 	/* point back to our device context */
 	struct device_context *device_ctx;
@@ -70,38 +57,6 @@ static int netvsc_ringbuffer_size = NETVSC_DEVICE_RING_BUFFER_SIZE;
 /* The one and only one */
 static struct netvsc_driver_context g_netvsc_drv;
 
-static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
-{
-	struct netvsc_driver *net_drv_obj = &g_netvsc_drv.drv_obj;
-	struct driver_context *drv_ctx = &g_netvsc_drv.drv_ctx;
-	int ret;
-
-	DPRINT_ENTER(NETVSC_DRV);
-
-	vmbus_get_interface(&net_drv_obj->Base.VmbusChannelInterface);
-
-	net_drv_obj->RingBufferSize = netvsc_ringbuffer_size;
-	net_drv_obj->OnReceiveCallback = netvsc_recv_callback;
-	net_drv_obj->OnLinkStatusChanged = netvsc_linkstatus_callback;
-
-	/* Callback to client driver to complete the initialization ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

There are still some horrible long lines in here, which some simple
code reworking will make smaller and easier to understand.

Also note the FIXME in struct netvsc_driver_context...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/netvsc_drv.c |  448 ++++++++++++++++-----------------------
 1 files changed, 186 insertions(+), 262 deletions(-)

diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index bec135b..46056c6 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -17,9 +16,7 @@
  *
  * Authors:
  *   Hank Janssen  <hjanssen@microsoft.com>
- *
  */
-
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/highmem.h>
@@ -35,68 +32,49 @@
 #include <net/route.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
-
 #include "osd.h"
 #include "logging.h"
 #include "vmbus.h"
-
 #include "NetVscApi.h"
 
 MODULE_LICENSE("GPL");
 
-
-/* Static decl */
-
 static int netvsc_probe(struct device *device);
 static int netvsc_remove(struct device *device);
 static int netvsc_open(struct net_device *net);
 static void netvsc_xmit_completion(void *context);
-static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net);
-static int netvsc_recv_callback(struct hv_device *device_obj, struct hv_netvsc_packet *Packet);
+static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net);
+static int netvsc_recv_callback(struct hv_device *device_obj,
+				struct hv_netvsc_packet *Packet);
 static int netvsc_close(struct net_device *net);
 static struct net_device_stats *netvsc_get_stats(struct net_device *net);
-static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status);
-
+static void netvsc_linkstatus_callback(struct hv_device ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

There are still some too-long lines here, hopefully they will get
resolved later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |  614 +++++++++++++++++---------------------
 1 files changed, 267 insertions(+), 347 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 6868f2d..1045ff9 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -18,18 +17,13 @@
  * Authors:
  *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
- *
  */
-
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include "osd.h"
 #include "logging.h"
 #include "VmbusPrivate.h"
 
-/* Data types */
-
 typedef void (*PFN_CHANNEL_MESSAGE_HANDLER)(struct vmbus_channel_message_header *msg);
 
 struct vmbus_channel_message_table_entry {
@@ -37,23 +31,20 @@ struct vmbus_channel_message_table_entry {
 	PFN_CHANNEL_MESSAGE_HANDLER messageHandler;
 };
 
-/* Internal routines */
-static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnGpadlTorndown(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnOffersDelivered(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelOnVersionResponse(struct vmbus_channel_message_header *hdr);
-static void VmbusChannelProcessOffer(void * context);
-static void VmbusChannelProcessRescindOffer(void * context);
+static void VmbusChannelOnOffer(struct vmbus_channel_message_header *);
+static void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

This gets rid of the unneeded typedef and the forward declarations,
saving a bit of code file size.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c |   61 +++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 1045ff9..4a014ea 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -24,24 +24,11 @@
 #include "logging.h"
 #include "VmbusPrivate.h"
 
-typedef void (*PFN_CHANNEL_MESSAGE_HANDLER)(struct vmbus_channel_message_header *msg);
-
 struct vmbus_channel_message_table_entry {
-	enum vmbus_channel_message_type	messageType;
-	PFN_CHANNEL_MESSAGE_HANDLER messageHandler;
+	enum vmbus_channel_message_type messageType;
+	void (*messageHandler)(struct vmbus_channel_message_header *msg);
 };
 
-static void VmbusChannelOnOffer(struct vmbus_channel_message_header *);
-static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *);
-static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *);
-static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *);
-static void VmbusChannelOnGpadlTorndown(struct vmbus_channel_message_header *);
-static void VmbusChannelOnOffersDelivered(struct vmbus_channel_message_header *);
-static void VmbusChannelOnVersionResponse(struct vmbus_channel_message_header *);
-static void VmbusChannelProcessOffer(void *context);
-static void VmbusChannelProcessRescindOffer(void *context);
-
-
 #define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4
 static const struct hv_guid
 		gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED] = {
@@ -82,28 +69,6 @@ static const struct hv_guid
 	},
 };
 
-/* Channel message dispatch table */
-static struct vmbus_channel_message_table_entry
-	gChannelMessageTable[ChannelMessageCount] = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Add List.h and RingBuffer.h removal items.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/TODO |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
index 8284742..113ca3f 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,6 +1,8 @@
 TODO:
 	- fix checkpatch warnings/errors
 	- fix sparse issues
+	- remove List.h usage to use in-kernel list.h instead
+	- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
 	- fix HANDLE usage to be "real" pointers
 	- audit the vmbus to verify it is working properly with the
 	  driver model
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Some one owes me a lot of beer, or a nice bottle of rum for
all of this crud cleanup...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c |  735 ++++++++++++++++++------------------------
 1 files changed, 311 insertions(+), 424 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index ccb6d2a..c06ea8c 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -18,9 +17,7 @@
  * Authors:
  *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
- *
  */
-
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/mm.h>
@@ -32,14 +29,8 @@
 #include "vstorage.h"
 
 
-
-/* #defines */
-
-
-
-/* Data types */
 struct storvsc_request_extension {
-	/* LIST_ENTRY						ListEntry; */
+	/* LIST_ENTRY ListEntry; */
 
 	struct hv_storvsc_request *Request;
 	struct hv_device *Device;
@@ -50,12 +41,12 @@ struct storvsc_request_extension {
 	struct vstor_packet VStorPacket;
 };
 
-
 /* A storvsc device is a device object that contains a vmbus channel */
 struct storvsc_device {
 	struct hv_device *Device;
 
-	atomic_t RefCount; /* 0 indicates the device is being destroyed */
+	/* 0 indicates the device is being destroyed */
+	atomic_t RefCount;
 
 	atomic_t NumOutstandingRequests;
 
@@ -64,24 +55,20 @@ struct storvsc_device {
 	 * controller. In reality, the pathid, targetid is always 0
 	 * and the port is set by us
 	 */
-	unsigned int						PortNumber;
-    unsigned char						PathId;
-    unsigned char						TargetId;
+	unsigned int PortNumber;
+	unsigned char PathId;
+	unsigned char TargetId;
 
-	/* LIST_ENTRY					OutstandingRequestList; */
-	/* HANDLE						OutstandingRequestLock; */
+	/* LIST_ENTRY OutstandingRequestList; ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

This gets rid of all of the forward declarations.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVsc.c |  515 ++++++++++++++++++++----------------------
 1 files changed, 249 insertions(+), 266 deletions(-)

diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index c06ea8c..14015c9 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -79,21 +79,6 @@ static const struct hv_guid gStorVscDeviceType = {
 };
 
 
-static int StorVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo);
-static int StorVscOnDeviceRemove(struct hv_device *Device);
-static int StorVscOnIORequest(struct hv_device *Device,
-			      struct hv_storvsc_request *Request);
-static int StorVscOnHostReset(struct hv_device *Device);
-static void StorVscOnCleanup(struct hv_driver *Device);
-static void StorVscOnChannelCallback(void *Context);
-static void StorVscOnIOCompletion(struct hv_device *Device,
-				  struct vstor_packet *VStorPacket,
-				  struct storvsc_request_extension *RequestExt);
-static void StorVscOnReceive(struct hv_device *Device,
-			     struct vstor_packet *VStorPacket,
-			     struct storvsc_request_extension *RequestExt);
-static int StorVscConnectToVsp(struct hv_device *Device);
-
 static inline struct storvsc_device *AllocStorDevice(struct hv_device *Device)
 {
 	struct storvsc_device *storDevice;
@@ -189,116 +174,6 @@ static inline struct storvsc_device *FinalReleaseStorDevice(
 	return storDevice;
 }
 
-/**
- * StorVscInitialize - Main entry point
- */
-int StorVscInitialize(struct hv_driver *Driver)
-{
-	struct storvsc_driver_object *storDriver;
-
-	DPRINT_ENTER(STORVSC);
-
-	storDriver = (struct storvsc_driver_object *)Driver;
-
-	DPRINT_DBG(STORVSC, "sizeof(STORVSC_REQUEST)=%zd "
-		   "sizeof(struct storvsc_request_extension)=%zd "
-		   "sizeof(struct vstor_packet)=%zd, "
-		   "sizeof(struct vmscsi_request)=%zd",
-		   ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

All device release functions need to do something, if not, it's a bug.
By merely providing an "empty" release function, it gets the kernel to
shut up, but that's not solving the problem at all.  Stick a big fat
WARN_ON(1); in there to get people's attention.


Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/vmbus_drv.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 4462d5b..cc81ffd 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -965,6 +965,11 @@ Desc:	Final callback release of the vmbus root device
 static void vmbus_bus_release(struct device *device)
 {
 	DPRINT_ENTER(VMBUS_DRV);
+	/* FIXME */
+	/* Empty release functions are a bug, or a major sign
+	 * of a problem design, this MUST BE FIXED! */
+	dev_err(device, "%s needs to be fixed!\n", __func__);
+	WARN_ON(1);
 	DPRINT_EXIT(VMBUS_DRV);
 }
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's much better now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |  685 ++++++++++++++++----------------------
 1 files changed, 285 insertions(+), 400 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 682448c..33c205a 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -1,5 +1,4 @@
 /*
- *
  * Copyright (c) 2009, Microsoft Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -18,20 +17,15 @@
  * Authors:
  *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
- *
  */
-
 #include <linux/kernel.h>
 #include <linux/highmem.h>
-#include <asm/kmap_types.h>
-#include <asm/io.h>
-
+#include <linux/io.h>
 #include "osd.h"
 #include "logging.h"
 #include "NetVscApi.h"
 #include "RndisFilter.h"
 
-
 /* Data types */
 struct rndis_filter_driver_object {
 	/* The original driver */
@@ -46,25 +40,27 @@ enum rndis_device_state {
 };
 
 struct rndis_device {
-	struct NETVSC_DEVICE			*NetDevice;
+	struct NETVSC_DEVICE *NetDevice;
 
 	enum rndis_device_state State;
-	u32					LinkStatus;
+	u32 LinkStatus;
 	atomic_t NewRequestId;
 
 	spinlock_t request_lock;
-	LIST_ENTRY				RequestList;
+	LIST_ENTRY RequestList;
 
-	unsigned char					HwMacAddr[HW_MACADDR_LEN];
+	unsigned char HwMacAddr[HW_MACADDR_LEN];
 };
 
-
 struct rndis_request {
-	LIST_ENTRY					ListEntry;
+	LIST_ENTRY ListEntry;
 	struct osd_waitevent *WaitEvent;
 
-	/* FIXME: We assumed a fixed size response here. If we do ever need to handle a bigger response, */
-	/* we can either define a max response message or add a response buffer variable above this field */
+	/*
+	 * FIXME: We assumed a fixed size response here. If we do ever need to
+	 * handle a bigger response, we can either define a max response
+	 * message or add a response buffer ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

function pointer typedefs are allowed in the kernel, but only if they
make sense, which they really do not here, as they are not passed around
with any kind of frequency.  So just spell them all out, it makes the
code smaller and easier to understand overall.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelInterface.c |    2 +-
 drivers/staging/hv/VmbusApi.h         |  140 ++++++++++-----------------------
 2 files changed, 43 insertions(+), 99 deletions(-)

diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 26309ab..019b064 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -28,7 +28,7 @@
 static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize,
 			     u32 RecvRingBufferSize, void *UserData,
 			     u32 UserDataLen,
-			     VMBUS_CHANNEL_CALLBACK ChannelCallback,
+			     void (*ChannelCallback)(void *context),
 			     void *Context)
 {
 	return VmbusChannelOpen(device->context, SendBufferSize,
diff --git a/drivers/staging/hv/VmbusApi.h b/drivers/staging/hv/VmbusApi.h
index 68a6dae..d089bb1 100644
--- a/drivers/staging/hv/VmbusApi.h
+++ b/drivers/staging/hv/VmbusApi.h
@@ -58,72 +58,6 @@ struct hv_multipage_buffer {
 struct hv_driver;
 struct hv_device;
 
-/* All drivers */
-typedef int (*PFN_ON_DEVICEADD)(struct hv_device *Device,
-				void *AdditionalInfo);
-typedef int (*PFN_ON_DEVICEREMOVE)(struct hv_device *Device);
-typedef char** (*PFN_ON_GETDEVICEIDS)(void);
-typedef void (*PFN_ON_CLEANUP)(struct hv_driver *Driver);
-
-/* Vmbus extensions */
-typedef int (*PFN_ON_ISR)(struct hv_driver *drv);
-typedef void (*PFN_ON_DPC)(struct hv_driver *drv);
-typedef void (*PFN_GET_CHANNEL_OFFERS)(void);
-
-typedef struct hv_device * (*PFN_ON_CHILDDEVICE_CREATE)
-				(struct hv_guid *DeviceType,
-				 struct hv_guid *DeviceInstance,
-				 void *Context);
-typedef void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

The Linux kernel doesn't have all caps structures, we don't like to
shout at our programmers, it makes them grumpy.  Instead, we like to
sooth them with small, rounded letters, which puts them in a nice,
compliant mood, and makes them more productive and happier, allowing
them more fufilling lives overall.


Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c      |   56 +++++++++++++++++++-------------------
 drivers/staging/hv/NetVsc.h      |    2 +-
 drivers/staging/hv/RndisFilter.c |   12 ++++----
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 13f36a7..92f9565 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -50,9 +50,9 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device);
 
 static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device);
 
-static int NetVscDestroySendBuffer(struct NETVSC_DEVICE *NetDevice);
+static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice);
 
-static int NetVscDestroyReceiveBuffer(struct NETVSC_DEVICE *NetDevice);
+static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice);
 
 static int NetVscConnectToVsp(struct hv_device *Device);
 
@@ -71,11 +71,11 @@ static void NetVscSendReceiveCompletion(struct hv_device *Device,
 					u64 TransactionId);
 
 
-static struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device)
+static struct netvsc_device *AllocNetDevice(struct hv_device *Device)
 {
-	struct NETVSC_DEVICE *netDevice;
+	struct netvsc_device *netDevice;
 
-	netDevice = kzalloc(sizeof(struct NETVSC_DEVICE), GFP_KERNEL);
+	netDevice = kzalloc(sizeof(struct netvsc_device), GFP_KERNEL);
 	if (!netDevice)
 		return NULL;
 
@@ -88,7 +88,7 @@ static struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device)
 	return netDevice;
 }
 
-static void FreeNetDevice(struct NETVSC_DEVICE ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

function pointer typedefs are allowed in the kernel, but only if they
make sense, which they really do not here, as they are not passed around
with any kind of frequency.  So just spell them all out, it makes the
code smaller and easier to understand overall.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVscApi.h   |   32 ++++++++------------------------
 drivers/staging/hv/RndisFilter.c |    2 +-
 2 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
index c53e417..1cf1287 100644
--- a/drivers/staging/hv/NetVscApi.h
+++ b/drivers/staging/hv/NetVscApi.h
@@ -35,19 +35,6 @@
 /* Fwd declaration */
 struct hv_netvsc_packet;
 
-/* Data types */
-typedef int (*PFN_ON_OPEN)(struct hv_device *Device);
-typedef int (*PFN_ON_CLOSE)(struct hv_device *Device);
-
-typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device);
-typedef int (*PFN_ON_SEND)(struct hv_device *dev,
-			   struct hv_netvsc_packet *packet);
-typedef void (*PFN_ON_SENDRECVCOMPLETION)(void *Context);
-
-typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev,
-				   struct hv_netvsc_packet *packet);
-typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);
-
 /* Represent the xfer page packet which contains 1 or more netvsc packet */
 struct xferpage_packet {
 	LIST_ENTRY ListEntry;
@@ -80,12 +67,12 @@ struct hv_netvsc_packet {
 		struct{
 			u64 ReceiveCompletionTid;
 			void *ReceiveCompletionContext;
-			PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion;
+			void (*OnReceiveCompletion)(void *context);
 		} Recv;
 		struct{
 			u64 SendCompletionTid;
 			void *SendCompletionContext;
-			PFN_ON_SENDRECVCOMPLETION OnSendCompletion;
+			void (*OnSendCompletion)(void *context);
 		} Send;
 	} Completion;
 
@@ -114,17 +101,14 @@ struct netvsc_driver {
 	 * This is set by the caller to allow us to callback when we
 	 * receive a ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Come on people, it doesn't get simpler than this, why
have a typedef for something so tiny...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c     |    4 ++--
 drivers/staging/hv/Channel.h     |    2 +-
 drivers/staging/hv/ChannelMgmt.h |    4 +---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 442e6a3..ed94e36 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -169,7 +169,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
  */
 int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 		     u32 RecvRingBufferSize, void *UserData, u32 UserDataLen,
-		     PFN_CHANNEL_CALLBACK pfnOnChannelCallback, void *Context)
+		     void (*OnChannelCallback)(void *context), void *Context)
 {
 	struct vmbus_channel_open_channel *openMsg;
 	struct vmbus_channel_msginfo *openInfo;
@@ -183,7 +183,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 	ASSERT(!(SendRingBufferSize & (PAGE_SIZE - 1)));
 	ASSERT(!(RecvRingBufferSize & (PAGE_SIZE - 1)));
 
-	NewChannel->OnChannelCallback = pfnOnChannelCallback;
+	NewChannel->OnChannelCallback = OnChannelCallback;
 	NewChannel->ChannelCallbackContext = Context;
 
 	/* Allocate the ring buffer */
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 2fa2825..6b283ed 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -57,7 +57,7 @@ extern int VmbusChannelOpen(struct vmbus_channel *channel,
 			    u32 RecvRingBufferSize,
 			    void *UserData,
 			    u32 UserDataLen,
-			    PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
+			    void(*OnChannelCallback)(void *context),
 			    void *Context);
 
 extern void VmbusChannelClose(struct vmbus_channel *channel);
diff --git a/drivers/staging/hv/ChannelMgmt.h ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

function pointer typedefs are allowed in the kernel, but only if they
make sense, which they really do not here, as they are not passed around
with any kind of frequency.  So just spell them all out, it makes the
code smaller and easier to understand overall.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/StorVscApi.h |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h
index 56193ff..69c1406 100644
--- a/drivers/staging/hv/StorVscApi.h
+++ b/drivers/staging/hv/StorVscApi.h
@@ -45,14 +45,6 @@
 
 struct hv_storvsc_request;
 
-/* Data types */
-typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device,
-				 struct hv_storvsc_request *Request);
-typedef void (*PFN_ON_IO_REQUEST_COMPLTN)(struct hv_storvsc_request *Request);
-
-typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
-typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
-
 /* Matches Windows-end */
 enum storvsc_request_type{
 	WRITE_TYPE,
@@ -76,7 +68,7 @@ struct hv_storvsc_request {
 
 	void *Context;
 
-	PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion;
+	void (*OnIOCompletion)(struct hv_storvsc_request *Request);
 
 	/* This points to the memory after DataBuffer */
 	void *Extension;
@@ -100,11 +92,12 @@ struct storvsc_driver_object {
 	u32 MaxOutstandingRequestsPerChannel;
 
 	/* Set by the caller to allow us to re-enumerate the bus on the host */
-	PFN_ON_HOST_RESCAN OnHostRescan;
+	void (*OnHostRescan)(struct hv_device *Device);
 
 	/* Specific to this driver */
-	PFN_ON_IO_REQUEST OnIORequest;
-	PFN_ON_HOST_RESET OnHostReset;
+	int (*OnIORequest)(struct hv_device *Device,
+			   struct hv_storvsc_request *Request);
+	int (*OnHostReset)(struct hv_device *Device);
 };
 
 struct storvsc_device_info {
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

It's amazing the hoops that people go through to make code work
when they don't opensource the whole thing.  Passing these types
of function pointers around for no good reason is a mess, this needs
to be unwound as everything is now in the open.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/blkvsc_drv.c  |    4 ++--
 drivers/staging/hv/netvsc_drv.c  |    4 ++--
 drivers/staging/hv/storvsc_drv.c |    4 ++--
 drivers/staging/hv/vmbus.h       |    4 ----
 drivers/staging/hv/vmbus_drv.c   |    4 ++--
 5 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 7c383ad..99c4926 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -165,7 +165,7 @@ static struct block_device_operations block_ops = {
 /**
  * blkvsc_drv_init -  BlkVsc driver initialization.
  */
-static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
 {
 	struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
 	struct driver_context *drv_ctx = &g_blkvsc_drv.drv_ctx;
@@ -178,7 +178,7 @@ static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 	storvsc_drv_obj->RingBufferSize = blkvsc_ringbuffer_size;
 
 	/* Callback to client driver to complete the initialization */
-	pfn_drv_init(&storvsc_drv_obj->Base);
+	drv_init(&storvsc_drv_obj->Base);
 
 	drv_ctx->driver.name = storvsc_drv_obj->Base.name;
 	memcpy(&drv_ctx->class_id, &storvsc_drv_obj->Base.deviceType,
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 70f66cb..3192d50 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -559,7 +559,7 @@ static void netvsc_drv_exit(void)
 	return;
 }
 
-static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int netvsc_drv_init(int (*drv_init)(struct hv_driver ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Bill Pemberton <wfp5p@virginia.edu>

The hv driver has it's own linked list routines.  This removes them
from NetVsc and uses the kernels routines instead.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/NetVsc.c    |   77 ++++++++++++++-------------------------
 drivers/staging/hv/NetVsc.h    |    4 +-
 drivers/staging/hv/NetVscApi.h |    4 +-
 3 files changed, 32 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 92f9565..1610b84 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -711,8 +711,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
 	int ret = 0;
 	int i;
 	struct netvsc_device *netDevice;
-	struct hv_netvsc_packet *packet;
-	LIST_ENTRY *entry;
+	struct hv_netvsc_packet *packet, *pos;
 	struct netvsc_driver *netDriver =
 				(struct netvsc_driver *)Device->Driver;
 
@@ -732,7 +731,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
 
 	netDevice->SendBufferSize = NETVSC_SEND_BUFFER_SIZE;
 
-	INITIALIZE_LIST_HEAD(&netDevice->ReceivePacketList);
+	INIT_LIST_HEAD(&netDevice->ReceivePacketList);
 
 	for (i = 0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) {
 		packet = kzalloc(sizeof(struct hv_netvsc_packet) +
@@ -744,9 +743,8 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
 				   NETVSC_RECEIVE_PACKETLIST_COUNT, i);
 			break;
 		}
-
-		INSERT_TAIL_LIST(&netDevice->ReceivePacketList,
-				 &packet->ListEntry);
+		list_add_tail(&packet->ListEntry,
+			      &netDevice->ReceivePacketList);
 	}
 	netDevice->ChannelInitEvent = osd_WaitEventCreate();
 
@@ -790,11 +788,10 @@ Cleanup:
 	if (netDevice) {
 		kfree(netDevice->ChannelInitEvent);
 
-		while (!IsListEmpty(&netDevice->ReceivePacketList)) {
-			entry = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Haiyang Zhang <haiyangz@microsoft.com>

Add Haiyang's email to the TODO file.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/TODO |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
index 113ca3f..fc754ab 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -12,5 +12,5 @@ TODO:
 	- audit the block driver
 	- audit the scsi driver
 
-Please send patches for this code to Greg Kroah-Hartman <gregkh@suse.de>
-and Hank Janssen <hjanssen@microsoft.com>
+Please send patches for this code to Greg Kroah-Hartman <gregkh@suse.de>,
+Hank Janssen <hjanssen@microsoft.com>, and Haiyang Zhang <haiyangz@microsoft.com>.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Bill Pemberton <wfp5p@virginia.edu>

The hv driver has it's own linked list routines.  This removes them
from RndisFilter.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/RndisFilter.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index cfe2f02..26d7997 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -47,13 +47,13 @@ struct rndis_device {
 	atomic_t NewRequestId;
 
 	spinlock_t request_lock;
-	LIST_ENTRY RequestList;
+	struct list_head RequestList;
 
 	unsigned char HwMacAddr[HW_MACADDR_LEN];
 };
 
 struct rndis_request {
-	LIST_ENTRY ListEntry;
+	struct list_head ListEntry;
 	struct osd_waitevent *WaitEvent;
 
 	/*
@@ -110,7 +110,7 @@ static struct rndis_device *GetRndisDevice(void)
 
 	spin_lock_init(&device->request_lock);
 
-	INITIALIZE_LIST_HEAD(&device->RequestList);
+	INIT_LIST_HEAD(&device->RequestList);
 
 	device->State = RNDIS_DEV_UNINITIALIZED;
 
@@ -150,7 +150,7 @@ static struct rndis_request *GetRndisRequest(struct rndis_device *Device,
 
 	/* Add to the request list */
 	spin_lock_irqsave(&Device->request_lock, flags);
-	INSERT_TAIL_LIST(&Device->RequestList, &request->ListEntry);
+	list_add_tail(&request->ListEntry, &Device->RequestList);
 	spin_unlock_irqrestore(&Device->request_lock, flags);
 
 	return request;
@@ -162,7 +162,7 @@ static void PutRndisRequest(struct rndis_device *Device,
 	unsigned long flags;
 
 	spin_lock_irqsave(&Device->request_lock, flags);
-	REMOVE_ENTRY_LIST(&Request->ListEntry);
+	list_del(&Request->ListEntry);
 	spin_unlock_irqrestore(&Device->request_lock, flags);
 
 	kfree(Request->WaitEvent);
@@ -273,8 +273,6 @@ static int RndisFilterSendRequest(struct rndis_device *Device,
 static void ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Bill Pemberton <wfp5p@virginia.edu>

List.h is no longer used and can be removed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/List.h      |  263 ----------------------------------------
 drivers/staging/hv/NetVscApi.h |    1 -
 drivers/staging/hv/TODO        |    1 -
 3 files changed, 0 insertions(+), 265 deletions(-)
 delete mode 100644 drivers/staging/hv/List.h

diff --git a/drivers/staging/hv/List.h b/drivers/staging/hv/List.h
deleted file mode 100644
index 735a938..0000000
--- a/drivers/staging/hv/List.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef _LIST_H_
-#define _LIST_H_
-
-/*
- *
- *  Doubly-linked list manipulation routines.  Implemented as macros
- *  but logically these are procedures.
- *
- */
-
-typedef struct _LIST_ENTRY {
-	struct _LIST_ENTRY *Flink;
-	struct _LIST_ENTRY *Blink;
-} LIST_ENTRY, *PLIST_ENTRY;
-
-/*
- *  void
- *  InitializeListHead(
- *      PLIST_ENTRY ListHead
- *      );
- */
-#define ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Bill Pemberton <wfp5p@virginia.edu>

The hv driver has it's own linked list routines.  This removes them
from more places in hv.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/Channel.c      |   34 +++++++++++++------------
 drivers/staging/hv/ChannelMgmt.c  |   50 +++++++++++++++---------------------
 drivers/staging/hv/ChannelMgmt.h  |    8 +++---
 drivers/staging/hv/Connection.c   |   20 ++++++---------
 drivers/staging/hv/VmbusPrivate.h |    8 +++---
 5 files changed, 55 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index ed94e36..d649ee1 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -247,8 +247,8 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 		memcpy(openMsg->UserData, UserData, UserDataLen);
 
 	spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
-	INSERT_TAIL_LIST(&gVmbusConnection.ChannelMsgList,
-			 &openInfo->MsgListEntry);
+	list_add_tail(&openInfo->MsgListEntry,
+		      &gVmbusConnection.ChannelMsgList);
 	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
 	DPRINT_DBG(VMBUS, "Sending channel open msg...");
@@ -271,7 +271,7 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
 
 Cleanup:
 	spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
-	REMOVE_ENTRY_LIST(&openInfo->MsgListEntry);
+	list_del(&openInfo->MsgListEntry);
 	spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
 
 	kfree(openInfo->WaitEvent);
@@ -362,7 +362,7 @@ static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
 			  sizeof(struct gpa_range) + pfnCount * sizeof(u64);
 		msgHeader =  kzalloc(msgSize, GFP_KERNEL);
 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

Remove a few items that have already been resolved.
There are only a few checkpatch issues, they need to be resolved
by larger code logic changes that are not "simple" changes.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/TODO |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/TODO b/drivers/staging/hv/TODO
index 1e272a7..4d390b2 100644
--- a/drivers/staging/hv/TODO
+++ b/drivers/staging/hv/TODO
@@ -1,8 +1,6 @@
 TODO:
-	- fix checkpatch warnings/errors
-	- fix sparse issues
+	- fix remaining checkpatch warnings and errors
 	- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
-	- fix HANDLE usage to be "real" pointers
 	- audit the vmbus to verify it is working properly with the
 	  driver model
 	- see if the vmbus can be merged with the other virtual busses
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Hank Janssen
Date: Thursday, September 17, 2009 - 1:11 am

Thanks again Greg and to all who have helped make this possible. 

As Greg said, now the real work starts. And I am looking forward to it!

Hank.

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

Limit SMD communication glue to MSM platform. It is closely tied to
MSM architecture.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/smd/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/dream/smd/Kconfig b/drivers/staging/dream/smd/Kconfig
index 3c1db3c..17b8bdc 100644
--- a/drivers/staging/dream/smd/Kconfig
+++ b/drivers/staging/dream/smd/Kconfig
@@ -1,4 +1,5 @@
 config MSM_SMD
+	depends on ARCH_MSM
 	default y
 	bool "MSM Shared Memory Driver (SMD)"
 	help
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Arve Hjønnevåg <arve@android.com>

This adds support for synaptic touchscreen, used in HTC dream
cellphone.

This is original version from Arve, fixed only to compile; I do have
cleaner version, but I broken something inside, and this will preserve
authorship better. I originally tried to push the driver directly to
input/touchscreen, but the driver has some issues with interrupt
handling that are more difficult to fix than I expected at first.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
---
 drivers/staging/dream/synaptics_i2c_rmi.c |  635 +++++++++++++++++++++++++++++
 drivers/staging/dream/synaptics_i2c_rmi.h |   53 +++
 2 files changed, 688 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/dream/synaptics_i2c_rmi.c
 create mode 100644 drivers/staging/dream/synaptics_i2c_rmi.h

diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
new file mode 100644
index 0000000..e916cea
--- /dev/null
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -0,0 +1,635 @@
+/* drivers/input/keyboard/synaptics_i2c_rmi.c
+ *
+ * Copyright (C) 2007 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/hrtimer.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/platform_device.h>
+#include "synaptics_i2c_rmi.h"
+
+#define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
+
+static struct workqueue_struct *synaptics_wq;
+
+struct ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

This is first part of touchscreen cleanups. I did not remove
earlysuspend functionality for now (to help Google merge the changes).

I mainly introduced helpers to reduce code duplication, and split huge
functions into smaller ones.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/synaptics_i2c_rmi.c |  362 ++++++++++++++---------------
 1 files changed, 180 insertions(+), 182 deletions(-)

diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
index e916cea..bfa9ac4 100644
--- a/drivers/staging/dream/synaptics_i2c_rmi.c
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -1,6 +1,8 @@
-/* drivers/input/keyboard/synaptics_i2c_rmi.c
+/*
+ * Support for synaptics touchscreen.
  *
  * Copyright (C) 2007 Google, Inc.
+ * Author: Arve Hjønnevåg <arve@android.com>
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -15,6 +17,9 @@
 
 #include <linux/module.h>
 #include <linux/delay.h>
+#ifdef CONFIG_HAS_EARLYSUSPEND
+#include <linux/earlysuspend.h>
+#endif
 #include <linux/hrtimer.h>
 #include <linux/i2c.h>
 #include <linux/input.h>
@@ -23,18 +28,16 @@
 #include <linux/platform_device.h>
 #include "synaptics_i2c_rmi.h"
 
-#define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
-
 static struct workqueue_struct *synaptics_wq;
 
 struct synaptics_ts_data {
-	uint16_t addr;
+	u16 addr;
 	struct i2c_client *client;
 	struct input_dev *input_dev;
 	int use_irq;
 	struct hrtimer timer;
 	struct work_struct  work;
-	uint16_t max[2];
+	u16 max[2];
 	int snap_state[2][2];
 	int snap_down_on[2];
 	int snap_down_off[2];
@@ -42,13 +45,28 @@ struct synaptics_ts_data {
 	int snap_up_off[2];
 	int snap_down[2];
 	int snap_up[2];
-	uint32_t flags;
+	u32 flags;
 	int (*power)(int on);
 #ifdef CONFIG_HAS_EARLYSUSPEND
 	struct early_suspend ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

This separates coefficient computation into separate function, so that
main probe does not have 1001 variables, and is of a more reasonable
size.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/synaptics_i2c_rmi.c |  244 +++++++++++++++--------------
 1 files changed, 123 insertions(+), 121 deletions(-)

diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
index bfa9ac4..6bc20d9 100644
--- a/drivers/staging/dream/synaptics_i2c_rmi.c
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -247,19 +247,10 @@ static int detect(struct synaptics_ts_data *ts, u32 *panel_version)
 	return 0;
 }
 
-static struct synaptics_i2c_rmi_platform_data fake_pdata;
-
-static int synaptics_ts_probe(
-	struct i2c_client *client, const struct i2c_device_id *id)
+static void compute_areas(struct synaptics_ts_data *ts,
+			  struct synaptics_i2c_rmi_platform_data *pdata,
+			  u16 max_x, u16 max_y)
 {
-	struct synaptics_ts_data *ts;
-	uint8_t buf0[4];
-	uint8_t buf1[8];
-	struct i2c_msg msg[2];
-	int ret = 0;
-	uint16_t max_x, max_y;
-	int fuzz_x, fuzz_y, fuzz_p, fuzz_w;
-	struct synaptics_i2c_rmi_platform_data *pdata;
 	int inactive_area_left;
 	int inactive_area_right;
 	int inactive_area_top;
@@ -272,10 +263,95 @@ static int synaptics_ts_probe(
 	int snap_top_off;
 	int snap_bottom_on;
 	int snap_bottom_off;
-	uint32_t panel_version = 0;
+	int fuzz_x;
+	int fuzz_y;
+	int fuzz_p;
+	int fuzz_w;
+	int swapped = !!(ts->flags & SYNAPTICS_SWAP_XY);
+
+	inactive_area_left = pdata->inactive_left;
+	inactive_area_right = pdata->inactive_right;
+	inactive_area_top = pdata->inactive_top;
+	inactive_area_bottom = pdata->inactive_bottom;
+	snap_left_on = pdata->snap_left_on;
+	snap_left_off = pdata->snap_left_off;
+	snap_right_on = pdata->snap_right_on;
+	snap_right_off = pdata->snap_right_off;
+	snap_top_on = pdata->snap_top_on;
+	snap_top_off = ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

This adds pointer to hardware documentation, and adds code comment
from Arve.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/synaptics_i2c_rmi.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
index 6bc20d9..9190a9d 100644
--- a/drivers/staging/dream/synaptics_i2c_rmi.c
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -13,6 +13,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
+ * http://www.synaptics.com/sites/default/files/511_000099_01F.pdf
  */
 
 #include <linux/module.h>
@@ -87,6 +88,22 @@ static int synaptics_init_panel(struct synaptics_ts_data *ts)
 
 static void decode_report(struct synaptics_ts_data *ts, u8 *buf)
 {
+/*
+ * This sensor sends two 6-byte absolute finger reports, an optional
+ * 2-byte relative report followed by a status byte. This function
+ * reads the two finger reports and transforms the coordinates
+ * according the platform data so they can be aligned with the lcd
+ * behind the touchscreen. Typically we flip the y-axis since the
+ * sensor uses the bottom left corner as the origin, but if the sensor
+ * is mounted upside down the platform data will request that the
+ * x-axis should be flipped instead. The snap to inactive edge border
+ * are used to allow tapping the edges of the screen on the G1. The
+ * active area of the touchscreen is smaller than the lcd. When the
+ * finger gets close the edge of the screen we snap it to the
+ * edge. This allows ui elements at the edge of the screen to be hit,
+ * and it prevents hitting ui elements that are not at the edge of the
+ * screen when the finger is touching the edge.
+ */
 	int pos[2][2];
 	int f, a;
 	int base = 2;
-- ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Jiri Slaby <jirislaby@gmail.com>

In vfe_send_msg_no_payload there is a wrong struct vfe_message allocation.
It allocates only sizeof(pointer to vfe_message) for a whole structure.
Add a dereference to the sizeof to allocate sizeof(vfe_message).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/camera/msm_vfe8x_proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/dream/camera/msm_vfe8x_proc.c b/drivers/staging/dream/camera/msm_vfe8x_proc.c
index bb65013..5436f71 100644
--- a/drivers/staging/dream/camera/msm_vfe8x_proc.c
+++ b/drivers/staging/dream/camera/msm_vfe8x_proc.c
@@ -818,7 +818,7 @@ static void vfe_send_msg_no_payload(enum VFE_MESSAGE_ID id)
 {
 	struct vfe_message *msg;
 
-	msg = kzalloc(sizeof(msg), GFP_ATOMIC);
+	msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
 	if (!msg)
 		return;
 
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

Separate Kconfig/Makefile glue from dream into subdirectory. I plan to
add few more drivers, and changing staging/Makefile each time sounds
like inviting conflicts.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/Kconfig  |    6 ++----
 drivers/staging/Makefile |    3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 34aa21e..aec18bc 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -99,6 +99,8 @@ source "drivers/staging/epl/Kconfig"
 
 source "drivers/staging/android/Kconfig"
 
+source "drivers/staging/dream/Kconfig"
+
 source "drivers/staging/dst/Kconfig"
 
 source "drivers/staging/pohmelfs/Kconfig"
@@ -131,10 +133,6 @@ source "drivers/staging/cpc-usb/Kconfig"
 
 source "drivers/staging/pata_rdc/Kconfig"
 
-source "drivers/staging/dream/smd/Kconfig"
-
-source "drivers/staging/dream/camera/Kconfig"
-
 source "drivers/staging/udlfb/Kconfig"
 
 source "drivers/staging/hv/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index bc84a0e..f4f7666 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_INPUT_MIMIO)	+= mimio/
 obj-$(CONFIG_TRANZPORT)		+= frontier/
 obj-$(CONFIG_EPL)		+= epl/
 obj-$(CONFIG_ANDROID)		+= android/
+obj-$(CONFIG_ANDROID)		+= dream/
 obj-$(CONFIG_DST)		+= dst/
 obj-$(CONFIG_POHMELFS)		+= pohmelfs/
 obj-$(CONFIG_STLC45XX)		+= stlc45xx/
@@ -48,6 +49,4 @@ obj-$(CONFIG_VT6656)		+= vt6656/
 obj-$(CONFIG_USB_CPC)		+= cpc-usb/
 obj-$(CONFIG_RDC_17F3101X)	+= pata_rdc/
 obj-$(CONFIG_FB_UDL)		+= udlfb/
-obj-$(CONFIG_MSM_ADSP)		+= dream/qdsp5/ dream/smd/
-obj-$(CONFIG_MSM_CAMERA)	+= dream/camera/
 obj-$(CONFIG_HYPERV)		+= hv/
-- 
1.6.4.2

_______________________________________________
devel mailing ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Arve Hjønnevåg <arve@android.com>

Support for input devices connected to GPIO pins. This adds support
for HTC Dream's keyboard and its trackball. Generic support already
exists for keyboard on GPIO, but this one is more advanced because it
can detect shadow key presses (and actually works with Dream :-).

(It also contains Kconfig/Makefile changes, including some that were
missing from previous commit. Sorry.)

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/Kconfig       |   12 +
 drivers/staging/dream/Makefile      |    4 +
 drivers/staging/dream/gpio_axis.c   |  180 ++++++++++++++++
 drivers/staging/dream/gpio_event.c  |  224 +++++++++++++++++++
 drivers/staging/dream/gpio_input.c  |  343 +++++++++++++++++++++++++++++
 drivers/staging/dream/gpio_matrix.c |  406 +++++++++++++++++++++++++++++++++++
 drivers/staging/dream/gpio_output.c |   84 +++++++
 7 files changed, 1253 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/dream/Kconfig
 create mode 100644 drivers/staging/dream/Makefile
 create mode 100644 drivers/staging/dream/gpio_axis.c
 create mode 100644 drivers/staging/dream/gpio_event.c
 create mode 100644 drivers/staging/dream/gpio_input.c
 create mode 100644 drivers/staging/dream/gpio_matrix.c
 create mode 100644 drivers/staging/dream/gpio_output.c

diff --git a/drivers/staging/dream/Kconfig b/drivers/staging/dream/Kconfig
new file mode 100644
index 0000000..52bd187
--- /dev/null
+++ b/drivers/staging/dream/Kconfig
@@ -0,0 +1,12 @@
+source "drivers/staging/dream/smd/Kconfig"
+
+source "drivers/staging/dream/camera/Kconfig"
+
+
+config INPUT_GPIO
+	tristate "GPIO driver support"
+	help
+	  Say Y here if you want to support gpio based keys, wheels etc...
+
+
+
diff --git a/drivers/staging/dream/Makefile b/drivers/staging/dream/Makefile
new file mode 100644
index 0000000..2b79151
--- /dev/null
+++ b/drivers/staging/dream/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MSM_ADSP)		+= qdsp5/ ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Pavel Machek <pavel@ucw.cz>

Check that SMBUS APIs are available in touchscreen driver.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dream/synaptics_i2c_rmi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c
index 9190a9d..ae696d3 100644
--- a/drivers/staging/dream/synaptics_i2c_rmi.c
+++ b/drivers/staging/dream/synaptics_i2c_rmi.c
@@ -373,6 +373,12 @@ static int __devinit synaptics_ts_probe(
 		goto err_check_functionality_failed;
 	}
 
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
+		pr_err("synaptics_ts_probe: need I2C_FUNC_SMBUS_WORD_DATA\n");
+		ret = -ENODEV;
+		goto err_check_functionality_failed;
+	}
+
 	ts = kzalloc(sizeof(*ts), GFP_KERNEL);
 	if (ts == NULL) {
 		ret = -ENOMEM;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Julia Lawall <julia@diku.dk>

If spin_lock_irqsave is called twice in a row with the same second
argument, the interrupt state at the point of the second call overwrites
the value saved by the first call.  Indeed, the second call does not need
to save the interrupt state, so it is changed to a simple spin_lock.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression lock1,lock2;
expression flags;
@@

*spin_lock_irqsave(lock1,flags)
... when != flags
*spin_lock_irqsave(lock2,flags)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: David Kiliani <mail@davidkiliani.de>
Cc: Meilhaus Support <support@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/meilhaus/me4600_ai.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/meilhaus/me4600_ai.c b/drivers/staging/meilhaus/me4600_ai.c
index e496d0c..fd9daa9 100644
--- a/drivers/staging/meilhaus/me4600_ai.c
+++ b/drivers/staging/meilhaus/me4600_ai.c
@@ -760,7 +760,7 @@ static int me4600_ai_io_single_read(me_subdevice_t *subdevice,
 	// Mark that StreamConfig is removed.
 	instance->chan_list_len = 0;
 
-	spin_lock_irqsave(instance->ctrl_reg_lock, cpu_flags);
+	spin_lock(instance->ctrl_reg_lock);
 	/// @note Imprtant: Preserve EXT IRQ settings.
 	tmp = inl(instance->ctrl_reg);
 	// Clear FIFOs and dissable interrupts
@@ -824,7 +824,7 @@ static int me4600_ai_io_single_read(me_subdevice_t *subdevice,
 		   instance->ctrl_reg - instance->reg_base,
 		   instance->single_config[channel].ctrl | tmp);
 
-	spin_unlock_irqrestore(instance->ctrl_reg_lock, cpu_flags);
+	spin_unlock(instance->ctrl_reg_lock);
 
 	if (!(instance->single_config[channel].ctrl & ME4600_AI_CTRL_BIT_EX_TRIG)) {	// Software start
 		inl(instance->start_reg);
@@ -877,7 +877,7 @@ static int me4600_ai_io_single_read(me_subdevice_t *subdevice,
 	}
 
 	// Restore ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Felipe Balbi <me@felipebalbi.com>

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/cpc-usb/cpc.h |  519 ++++++++++++++++++++---------------------
 1 files changed, 248 insertions(+), 271 deletions(-)

diff --git a/drivers/staging/cpc-usb/cpc.h b/drivers/staging/cpc-usb/cpc.h
index ed8cb34..b2fda5d 100644
--- a/drivers/staging/cpc-usb/cpc.h
+++ b/drivers/staging/cpc-usb/cpc.h
@@ -10,243 +10,223 @@
 #ifndef CPC_HEADER
 #define CPC_HEADER
 
-// the maximum length of the union members within a CPC_MSG
-// this value can be defined by the customer, but has to be
-// >= 64 bytes
-// however, if not defined before, we set a length of 64 byte
+/*
+ * the maximum length of the union members within a CPC_MSG
+ * this value can be defined by the customer, but has to be
+ * >= 64 bytes
+ * however, if not defined before, we set a length of 64 byte
+ */
 #if !defined(CPC_MSG_LEN) || (CPC_MSG_LEN < 64)
 #undef CPC_MSG_LEN
 #define CPC_MSG_LEN 64
 #endif
 
-// check the operating system used
-#ifdef _WIN32 // running a Windows OS
-
-// define basic types on Windows platforms
-#ifdef _MSC_VER // Visual Studio
-	typedef unsigned __int8 u8;
-	typedef unsigned __int16 u16;
-	typedef unsigned __int32 u32;
-#else // Borland Compiler
-	typedef unsigned char u8;
-	typedef unsigned short u16;
-	typedef unsigned int u32;
-#endif
-	// on Windows OS we use a byte alignment of 1
-	#pragma pack(push, 1)
-
-	// set the calling conventions for the library function calls
-	#define CALL_CONV __stdcall
-#else
-	// Kernel headers already define this types
-	#ifndef __KERNEL__
-		// define basic types
-		typedef unsigned char u8;
-		typedef unsigned short u16;
-		typedef unsigned int u32;
-	#endif
-
-	// Linux does not use this calling convention
-	#define CALL_CONV
-#endif
-
-// Transmission of events from CPC interfaces to PC can be individually
-// controlled per event type. Default state is: don't ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:09 pm

From: Felipe Balbi <me@felipebalbi.com>

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/cpc-usb/cpc_int.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/cpc-usb/cpc_int.h b/drivers/staging/cpc-usb/cpc_int.h
index a0d60c0..38674e9 100644
--- a/drivers/staging/cpc-usb/cpc_int.h
+++ b/drivers/staging/cpc-usb/cpc_int.h
@@ -39,10 +39,10 @@ typedef void (*chan_write_byte_t) (void *chan, unsigned int reg,
 typedef unsigned char (*chan_read_byte_t) (void *chan, unsigned int reg);
 
 typedef struct CPC_CHAN {
-	void __iomem * canBase;	// base address of SJA1000
-	chan_read_byte_t read_byte;	// CAN controller read access routine
-	chan_write_byte_t write_byte;	// CAN controller write access routine
-	CPC_MSG_T *buf;		// buffer for CPC msg
+	void __iomem * canBase;	/* base address of SJA1000 */
+	chan_read_byte_t read_byte;	/* CAN controller read access routine */
+	chan_write_byte_t write_byte;	/* CAN controller write access routine */
+	CPC_MSG_T *buf;		/* buffer for CPC msg */
 	unsigned int iidx;
 	unsigned int oidx;
 	unsigned int WnR;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Felipe Balbi <me@felipebalbi.com>

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/cpc-usb/cpcusb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/cpc-usb/cpcusb.h b/drivers/staging/cpc-usb/cpcusb.h
index e5273dd..6bdf30b 100644
--- a/drivers/staging/cpc-usb/cpcusb.h
+++ b/drivers/staging/cpc-usb/cpcusb.h
@@ -75,7 +75,7 @@ typedef struct CPC_USB {
 #define CPC_DRIVER_VERSION "0.724"
 #define CPC_DRIVER_SERIAL  "not applicable"
 
-#define OBUF_SIZE 255		// 4096
+#define OBUF_SIZE 255		/* 4096 */
 
 /* read timeouts -- RD_NAK_TIMEOUT * RD_EXPIRE = Number of seconds */
 #define RD_NAK_TIMEOUT (10*HZ)	/* Default number of X seconds to wait */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Felipe Balbi <me@felipebalbi.com>

we need to get rid of those driver-specific error codes

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/cpc-usb/TODO |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/cpc-usb/TODO b/drivers/staging/cpc-usb/TODO
index 000e8bb..9b1752f 100644
--- a/drivers/staging/cpc-usb/TODO
+++ b/drivers/staging/cpc-usb/TODO
@@ -5,5 +5,6 @@ kernel:
 	- remove proc code
 	- tie into CAN socket interfaces if possible
 	- figure out sane userspace api
+	- use linux's error codes
 
 Send patches to Greg Kroah-Hartman <greg@kroah.com>
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Shan Wei <shanwei@cn.fujitsu.com>

Compared with other drivers, the "ret" should be nagative and
returned. But in vhci_hdc, it always return 0;

I dont't use the driver, and I'm not familiar with the code.
Hope the patch is helpful.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/usbip/vhci_hcd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index 114db8b..6e91fc2 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -594,7 +594,7 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
 
 		if (type != PIPE_CONTROL || !ctrlreq) {
 			dev_err(dev, "invalid request to devnum 0\n");
-			ret = EINVAL;
+			ret = -EINVAL;
 			goto no_need_xmit;
 		}
 
@@ -653,7 +653,7 @@ no_need_unlink:
 
 	usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status);
 
-	return 0;
+	return ret;
 }
 
 /*
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

This patch was generated by running

	git grep -E -l 'man[ae]g?ment' drivers/staging | xargs -r perl -p -i -e 's/\bman[ae]g?ment\b/management/g'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/et131x/et1310_mac.c   |    2 +-
 drivers/staging/otus/80211core/cagg.c |    6 +++---
 drivers/staging/otus/80211core/cmm.c  |    4 ++--
 drivers/staging/vt6655/80211mgr.c     |    2 +-
 drivers/staging/vt6655/80211mgr.h     |    2 +-
 drivers/staging/vt6655/power.c        |    2 +-
 drivers/staging/vt6655/power.h        |    2 +-
 drivers/staging/vt6655/wmgr.h         |    4 ++--
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index 02ae636..5200dbf 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -137,7 +137,7 @@ void ConfigMACRegs1(struct et131x_adapter *pAdapter)
 	/* Next lets configure the MAC Interface Control register */
 	writel(0, &pMac->if_ctrl.value);
 
-	/* Let's move on to setting up the mii managment configuration */
+	/* Let's move on to setting up the mii management configuration */
 	mii_mgmt_cfg.bits.reset_mii_mgmt = 0;
 	mii_mgmt_cfg.bits.scan_auto_incremt = 0;
 	mii_mgmt_cfg.bits.preamble_suppress = 0;
diff --git a/drivers/staging/otus/80211core/cagg.c b/drivers/staging/otus/80211core/cagg.c
index 4942190..dbd0a5f 100644
--- a/drivers/staging/otus/80211core/cagg.c
+++ b/drivers/staging/otus/80211core/cagg.c
@@ -2845,7 +2845,7 @@ u16_t   zfAggSendAddbaRequest(zdev_t* dev, u16_t *dst, u16_t ac, u16_t up)
 
 
     /*
-     * TBD : Maximum size of managment frame
+     * TBD : Maximum size of management frame
      */
     if ((buf = zfwBufAllocate(dev, 1024)) == NULL)
     {
@@ -3286,7 +3286,7 @@ u16_t   zfAggSendAddbaResponse(zdev_t* dev, struct aggBaFrameParameter *bf)
 
 
     /*
-     * ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Julia Lawall <julia@diku.dk>

Correct priority problem in the use of ! and &.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E; constant C; @@
- !E & C
+ !(E & C)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt3090/sta_ioctl.c |    6 ++----
 drivers/staging/vt6656/iwctl.c     |    3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rt3090/sta_ioctl.c b/drivers/staging/rt3090/sta_ioctl.c
index 93efd7f..b8ab84a 100644
--- a/drivers/staging/rt3090/sta_ioctl.c
+++ b/drivers/staging/rt3090/sta_ioctl.c
@@ -1840,10 +1840,8 @@ int rt_ioctl_siwencode(struct net_device *dev,
             }
         else
 			/* Don't complain if only change the mode */
-		if(!erq->flags & IW_ENCODE_MODE)
-		{
-				return -EINVAL;
-		}
+		if (!(erq->flags & IW_ENCODE_MODE))
+			return -EINVAL;
 	}
 
 done:
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index e4fdb6f..96f2a78 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -1409,8 +1409,7 @@ int iwctl_siwencode(struct net_device *dev,
 		// Do we want to just set the transmit key index ?
 		if ( index < 4 ) {
 		    pDevice->byKeyIndex = index;
-		}
-		else if(!wrq->flags & IW_ENCODE_MODE) {
+		} else if (!(wrq->flags & IW_ENCODE_MODE)) {
 				rc = -EINVAL;
 				return rc;
 	    }
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Stoyan Gaydarov <sgayda2@uiuc.edu>

These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/drivers/amplc_pci230.c      |    2 +-
 drivers/staging/comedi/drivers/cb_das16_cs.c       |    2 +-
 drivers/staging/comedi/drivers/das08_cs.c          |    3 +--
 drivers/staging/comedi/drivers/ni_6527.c           |    2 +-
 drivers/staging/comedi/drivers/ni_65xx.c           |    2 +-
 drivers/staging/comedi/drivers/ni_660x.c           |    2 +-
 drivers/staging/comedi/drivers/ni_670x.c           |    2 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c       |    2 +-
 drivers/staging/comedi/drivers/ni_pcidio.c         |    2 +-
 drivers/staging/comedi/drivers/ni_pcimio.c         |    2 +-
 drivers/staging/comedi/drivers/pcmad.c             |    2 +-
 drivers/staging/comedi/drivers/poc.c               |    2 +-
 drivers/staging/epl/EplDllk.c                      |    2 +-
 drivers/staging/epl/proc_fs.c                      |    4 ++--
 drivers/staging/line6/driver.c                     |    2 +-
 drivers/staging/meilhaus/me0600_device.h           |    2 +-
 drivers/staging/meilhaus/me0900_device.h           |    2 +-
 drivers/staging/meilhaus/me1400_device.h           |    2 +-
 drivers/staging/meilhaus/me1600_device.h           |    2 +-
 drivers/staging/meilhaus/me4600_device.h           |    2 +-
 drivers/staging/meilhaus/me6000_device.h           |    2 +-
 drivers/staging/meilhaus/me8100_device.h           |    2 +-
 drivers/staging/meilhaus/me8200_device.h           |    2 +-
 drivers/staging/meilhaus/metempl_device.h          |    2 +-
 drivers/staging/rtl8187se/r8180_wx.c               |    6 +++---
 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c |    2 +-
 drivers/staging/rtl8192su/r8192U_wx.c              |    4 ++--
 drivers/staging/slicoss/slicoss.c              ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Julia Lawall <julia@diku.dk>

dst_state_alloc returns an ERR_PTR value in an error case instead of NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@

x = dst_state_alloc(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL && ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/dst/export.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/dst/export.c b/drivers/staging/dst/export.c
index 80ae4eb..4fbd848 100644
--- a/drivers/staging/dst/export.c
+++ b/drivers/staging/dst/export.c
@@ -159,7 +159,7 @@ static struct dst_state *dst_accept_client(struct dst_state *st)
 		goto err_out_exit;
 
 	new = dst_state_alloc(st->node);
-	if (!new) {
+	if (IS_ERR(new)) {
 		err = -ENOMEM;
 		goto err_out_release;
 	}
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Mike Galbraith <efault@gmx.de>

The rest of the known universe prefers wlanN for wireless interface names, to
the point that some distro configuration tools, such as opensuse's Yast, don't
even allow the user to enter a name, and simply pre-select "wlan".

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2860/rt_linux.c    |    2 +-
 drivers/staging/rt2860/rt_main_dev.c |    4 ++--
 drivers/staging/rt2860/rt_profile.c  |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
index 80176b2..7e4c2e4 100644
--- a/drivers/staging/rt2860/rt_linux.c
+++ b/drivers/staging/rt2860/rt_linux.c
@@ -776,7 +776,7 @@ VOID RTMPSendWirelessEvent(
 		if (pAddr)
 			pBufPtr += sprintf(pBufPtr, "(RT2860) STA(%02x:%02x:%02x:%02x:%02x:%02x) ", PRINT_MAC(pAddr));
 		else if (BssIdx < MAX_MBSSID_NUM)
-			pBufPtr += sprintf(pBufPtr, "(RT2860) BSS(ra%d) ", BssIdx);
+			pBufPtr += sprintf(pBufPtr, "(RT2860) BSS(wlan%d) ", BssIdx);
 		else
 			pBufPtr += sprintf(pBufPtr, "(RT2860) ");
 
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
index 8fd1aaf..495d5db 100644
--- a/drivers/staging/rt2860/rt_main_dev.c
+++ b/drivers/staging/rt2860/rt_main_dev.c
@@ -710,7 +710,7 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p
 	// find available device name
 	for (i = 0; i < 8; i++)
 	{
-		sprintf(slot_name, "ra%d", i);
+		sprintf(slot_name, "wlan%d", i);
 
 		device = dev_get_by_name(dev_net(dev), slot_name);
 		if (device != NULL)
@@ -727,7 +727,7 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p
 	}
 	else
 	{
-		sprintf(dev->name, "ra%d", i);
+		sprintf(dev->name, "wlan%d", i);
 		Status = NDIS_STATUS_SUCCESS;
 	}
 
diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c
index d92b143..8c581c3 ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Alexander Beregalov <a.beregalov@gmail.com>

As the driver is in mainline now we can remove such dependencies.
WIRELESS_EXT is 22 now.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/rt2860/oid.h         |    7 --
 drivers/staging/rt2860/rt_linux.c    |    4 -
 drivers/staging/rt2860/rt_main_dev.c |    9 ---
 drivers/staging/rt2860/rt_profile.c  |    4 -
 drivers/staging/rt2860/rtmp.h        |    4 -
 drivers/staging/rt2860/sta/assoc.c   |   14 -----
 drivers/staging/rt2860/sta_ioctl.c   |  104 ++++-----------------------------
 7 files changed, 13 insertions(+), 133 deletions(-)

diff --git a/drivers/staging/rt2860/oid.h b/drivers/staging/rt2860/oid.h
index 8519afc..98e21ef 100644
--- a/drivers/staging/rt2860/oid.h
+++ b/drivers/staging/rt2860/oid.h
@@ -626,13 +626,6 @@ typedef struct _NDIS_802_11_CAPABILITY
      NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
 
-#if WIRELESS_EXT <= 11
-#ifndef SIOCDEVPRIVATE
-#define SIOCDEVPRIVATE                              0x8BE0
-#endif
-#define SIOCIWFIRSTPRIV								SIOCDEVPRIVATE
-#endif
-
 #ifdef RT30xx
 #define RT_PRIV_IOCTL_EXT							(SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
 #endif
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
index 7e4c2e4..ebf2d50 100644
--- a/drivers/staging/rt2860/rt_linux.c
+++ b/drivers/staging/rt2860/rt_linux.c
@@ -728,7 +728,6 @@ VOID RTMPSendWirelessEvent(
 	IN	UCHAR			BssIdx,
 	IN	CHAR			Rssi)
 {
-#if WIRELESS_EXT >= 15
 
 	union 	iwreq_data      wrqu;
 	PUCHAR 	pBuf = NULL, pBufPtr = NULL;
@@ -805,9 +804,6 @@ VOID RTMPSendWirelessEvent(
 	}
 	else
 		DBGPRINT(RT_DEBUG_ERROR, ("%s : Can't allocate memory for wireless event.\n", __func__));
-#else
-	DBGPRINT(RT_DEBUG_ERROR, ("%s : The Wireless Extension ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk format warning: use %td for ptrdiff:

drivers/staging/udlfb/udlfb.h:209: warning: format '%d' expects type 'int', but argument 3 has type 'long int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/udlfb/udlfb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h
index 08bd671..40ad85e 100644
--- a/drivers/staging/udlfb/udlfb.h
+++ b/drivers/staging/udlfb/udlfb.h
@@ -205,7 +205,7 @@ static int dlfb_set_video_mode(struct dlfb_data *dev_info, int width, int height
 
 			/* send */
 			ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
-			printk("ret bulk 2: %d %d\n", ret,
+			printk("ret bulk 2: %d %td\n", ret,
 			       bufptr - dev_info->buf);
 
 			/* flush */
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Bill Pemberton <wfp5p@virginia.edu>

The parameter list for qt_open() was from the old non usb-serial
driver.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/serqt_usb2/serqt_usb2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index 0fdf8c6..52af44c 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -874,7 +874,7 @@ static void qt_release(struct usb_serial *serial)
 }
 
 static int qt_open(struct tty_struct *tty,
-	    struct usb_serial_port *port, struct file *filp)
+		   struct usb_serial_port *port)
 {
 	struct usb_serial *serial;
 	struct quatech_port *quatech_port;
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Jaswinder Singh Rajput <jaswinder@kernel.org>

fix the following 'make includecheck' warning:

  drivers/staging/otus/usbdrv.h: linux/usb.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/otus/usbdrv.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/otus/usbdrv.h b/drivers/staging/otus/usbdrv.h
index a11b3b3..7800406 100644
--- a/drivers/staging/otus/usbdrv.h
+++ b/drivers/staging/otus/usbdrv.h
@@ -61,10 +61,6 @@
 #define USB_REG_IN_PIPE                     3
 #define USB_REG_OUT_PIPE                    4
 
-#if (WLAN_HOSTIF == WLAN_USB)
-#include <linux/usb.h>
-#endif
-
 #ifdef ZM_HOSTAPD_SUPPORT
 #include "athr_common.h"
 #endif
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Jim Lieb <lieb@canonical.com>

Fix compile problems with 64bit.  These issues could cause corrupted
address crashes.  In the process, replaced some definitions to use more
portable kernel types.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/IEEE11h.c     |    8 ++++----
 drivers/staging/vt6655/bssdb.c       |    2 +-
 drivers/staging/vt6655/device_main.c |   21 ++++++++++++---------
 drivers/staging/vt6655/dpc.c         |    6 +++---
 drivers/staging/vt6655/hostap.c      |    6 +++---
 drivers/staging/vt6655/tmacro.h      |    4 ----
 drivers/staging/vt6655/wmgr.c        |    6 +++---
 drivers/staging/vt6655/wpa.c         |    4 ++--
 8 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c
index 5f25b8e..b0f4eb5 100644
--- a/drivers/staging/vt6655/IEEE11h.c
+++ b/drivers/staging/vt6655/IEEE11h.c
@@ -120,13 +120,13 @@ typedef struct _WLAN_FRAME_TPCREP {
 /*---------------------  Static Functions  --------------------------*/
 static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq, UINT uLength)
 {
-    UINT    uNumOfEIDs = 0;
+    size_t    uNumOfEIDs = 0;
     BOOL    bResult = TRUE;
 
     if (uLength <= WLAN_A3FR_MAXLEN) {
         MEMvCopy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
     }
-    uNumOfEIDs = ((uLength - OFFSET(WLAN_FRAME_MSRREQ, sMSRReqEIDs))/ (sizeof(WLAN_IE_MEASURE_REQ)));
+    uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ, sMSRReqEIDs))/ (sizeof(WLAN_IE_MEASURE_REQ)));
     pMgmt->pCurrMeasureEIDRep = &(((PWLAN_FRAME_MSRREP) (pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]);
     pMgmt->uLengthOfRepEIDs = 0;
     bResult = CARDbStartMeasure(pMgmt->pAdapter,
@@ -291,7 +291,7 @@ BOOL IEEE11hbMSRRepTx (
 {
     PSMgmtObject            pMgmt = (PSMgmtObject) pMgmtHandle;
     PWLAN_FRAME_MSRREP      pMSRRep = (PWLAN_FRAME_MSRREP) (pMgmt->abyCurrentMSRRep + ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Jim Lieb <lieb@canonical.com>

Fix compile problems with 64bit.  These issues could cause corrupted
address crashes. Cleanup definition use to use more portable kernel
typedefs etc.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/bssdb.c    |    4 ++--
 drivers/staging/vt6656/dpc.c      |    6 +++---
 drivers/staging/vt6656/firmware.c |    2 +-
 drivers/staging/vt6656/hostap.c   |    6 +++---
 drivers/staging/vt6656/main_usb.c |    2 +-
 drivers/staging/vt6656/tmacro.h   |    4 ----
 drivers/staging/vt6656/wmgr.c     |    6 +++---
 drivers/staging/vt6656/wpa.c      |    4 ++--
 8 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index 58348cf..3b8e38d 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -1300,7 +1300,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-             pDevice->skb->mac_header = pDevice->skb->data;
+	     skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
@@ -1340,7 +1340,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming );
              wpahdr->req_ie_len = 0;
              skb_put(pDevice->skb, sizeof(viawget_wpa_header));
              pDevice->skb->dev = pDevice->wpadev;
-                pDevice->skb->mac_header = pDevice->skb->data;
+	     skb_reset_mac_header(pDevice->skb);
              pDevice->skb->pkt_type = PACKET_HOST;
              pDevice->skb->protocol = htons(ETH_P_802_2);
              memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb));
diff --git a/drivers/staging/vt6656/dpc.c ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Jim Lieb <lieb@canonical.com>

These changes in vt6656 match changes in vt6655 to minimize text differences
prior to merging the two trees into a single driver source.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/80211mgr.c |   10 +---------
 drivers/staging/vt6656/baseband.c |    8 ++++----
 drivers/staging/vt6656/hostap.c   |    2 +-
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c
index fda7224..8b1ffe9 100644
--- a/drivers/staging/vt6656/80211mgr.c
+++ b/drivers/staging/vt6656/80211mgr.c
@@ -18,7 +18,7 @@
  *
  * File: 80211mgr.c
  *
- * Purpose: Handles the managment frame parsing functions
+ * Purpose: Handles the 802.11 managment support functions
  *
  * Author: Lyndon Chen
  *
@@ -746,7 +746,6 @@ vMgrDecodeProbeResponse(
     )
 {
     PWLAN_IE    pItem;
-  //  BYTE        byCheckEID = 0;
 
 
     pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
@@ -764,13 +763,6 @@ vMgrDecodeProbeResponse(
                        + WLAN_PROBERESP_OFF_SSID);
 
     while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ) {
-
-	  //20080701-01,<Remark> by Mike Liu
-      //  if (pItem->byElementID < byCheckEID)
-        //    break;
-        //else
-            //byCheckEID = pItem->byElementID;
-
         switch (pItem->byElementID) {
             case WLAN_EID_SSID:
                 if (pFrame->pSSID == NULL)
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index 7b43cea..7057d3e 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -743,7 +743,7 @@ BBuGetFrameTime (
         } else {
             uPreamble = 192;
         }
-        uFrameTime = (cbFrameLength * 80) / uRate;
+        uFrameTime = (cbFrameLength * 80) / uRate;  ...
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/TODO |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/vt6655/TODO

diff --git a/drivers/staging/vt6655/TODO b/drivers/staging/vt6655/TODO
new file mode 100644
index 0000000..ae46c52
--- /dev/null
+++ b/drivers/staging/vt6655/TODO
@@ -0,0 +1,21 @@
+TODO:
+- remove __cplusplus ifdefs
+- prepare for merge with vt6656 driver:
+  - rename DEVICE_PRT() to DBG_PRT()
+  - share 80211*.h includes
+  - move code for channel mapping from card.c to channel.c
+  - split rf.c
+  - remove dead code
+  - abstract VT3253 chipset specific code
+- add common vt665x infrastructure
+- kill ttype.h
+- switch to use LIB80211
+- switch to use MAC80211
+- use kernel coding style
+- checkpatch.pl fixes
+- sparse fixes
+- integrate with drivers/net/wireless
+
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
+Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
+<bzolnier@gmail.com>.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6656/TODO |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/vt6656/TODO

diff --git a/drivers/staging/vt6656/TODO b/drivers/staging/vt6656/TODO
new file mode 100644
index 0000000..fc66919
--- /dev/null
+++ b/drivers/staging/vt6656/TODO
@@ -0,0 +1,20 @@
+TODO:
+- remove __cplusplus ifdefs
+- remove kernel version compatibility wrappers
+- remove support for older wireless extensions
+- prepare for merge with vt6655 driver:
+  - remove PRINT_K() macro
+  - split rf.c
+  - abstract VT3184 chipset specific code
+- add common vt665x infrastructure
+- kill ttype.h
+- switch to use LIB80211
+- switch to use MAC80211
+- use kernel coding style
+- checkpatch.pl fixes
+- sparse fixes
+- integrate with drivers/net/wireless
+
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
+Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
+<bzolnier@gmail.com>.
-- 
1.6.4.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman
Date: Tuesday, September 15, 2009 - 12:10 pm

From: Jim Lieb <lieb@canonical.com>

Clean up unused typedefs and macros to remove Win32'isms and
misc non-linux constructs.  Text edits to referencing
source for less frequently used macros.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/vt6655/bssdb.c       |    2 -
 drivers/staging/vt6655/bssdb.h       |    8 +-
 drivers/staging/vt6655/card.c        |    2 +-
 drivers/staging/vt6655/country.h     |    2 +-
 drivers/staging/vt6655/desc.h        |   86