summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/netvsc_drv.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: hv: Enable sending GARP packet after live migrationHaiyang Zhang2011-02-031-0/+1
| | | | | | | | | | | | | | The hv_netvsc gets RNDIS_STATUS_MEDIA_CONNECT event after the VM is live migrated. Adding call to netif_notify_peers() for this event to send GARP (Gratuitous ARP) to notify network peers. Otherwise, the VM's network connection may stop after a live migration. This patch should also be applied to stable kernel 2.6.32 and later. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: hv: Removed unneeded call to netif_stop_queue() in hv_netvscHank Janssen2011-01-201-1/+0Star
| | | | | | | | | | | | | | | | | | | Removed the call to netif_stop_queue() in netvsc_probe() as the queue is not initialized at that point and further call to it after queue initialization is really not necessary. This change was prompted after an upstream change went into 2.6.37 (netif_tx_stop_queue) that now checks if netif_stop_queue is called before register with netdev is done. This will eliminate the warning message to the log when hv_netvsc driver starts up. Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: hv: Convert camel cased struct fields in netvsc_api.h to lower casesHaiyang Zhang2010-12-131-37/+37
| | | | | | Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: hv: Convert camel cased functions in rndis_filter.c to lower casesHaiyang Zhang2010-12-131-2/+2
| | | | | | Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: hv: Convert camel cased functions in netvsc.c to lower casesHaiyang Zhang2010-12-131-1/+1
| | | | | | Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: hv: add explanation of no-op set_multicast_listBrandon Philips2010-11-161-0/+3
| | | | | | | | | | I was going to remove netvsc_set_multicast_list() so I think it is worth adding a comment since it isn't immediately clear why you would want this. Signed-off-by: Brandon Philips <brandon@ifup.org> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge 'staging-next' to Linus's treeGreg Kroah-Hartman2010-10-281-3/+1Star
|\ | | | | | | | | | | | | | | This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: remove struct vmbus_channel_interfaceGreg Kroah-Hartman2010-10-211-2/+0Star
| | | | | | | | | | | | | | | | | | | | Now that no one uses this structure, remove it, and channel_interface.c (which is now empty) and the function, vmbus_get_interface() which is not needed anymore either. Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: hv: Doubled ringbuffer size for Hyper-v network driverHank Janssen2010-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | Double the default network ringsize buffer for Hyper-V network driver. In very heavily loaded systems the there is a chance you run out of ringbuffer space and error out. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging: hv: Fix missing functions for net_device_opsHaiyang Zhang2010-09-041-0/+3
|/ | | | | | | | | | | | | | | | | | | Fix missing functions for net_device_ops. It's a bug when porting the drivers from 2.6.27 to 2.6.32. In 2.6.27, the default functions for Ethernet, like eth_change_mtu(), were assigned by ether_setup(). But in 2.6.32, these function pointers moved to net_device_ops structure and no longer be assigned in ether_setup(). So we need to set these functions in our driver code. It will ensure the MTU won't be set beyond 1500. Otherwise, this can cause an error on the server side, because the HyperV linux driver doesn't support jumbo frame yet. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: remove DPRINT_EXIT macroGreg Kroah-Hartman2010-07-231-27/+2Star
| | | | | | | | | No need for it, use the built-in kernel function tracing instead if you really need something like this. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: remove DPRINT_ENTER macroGreg Kroah-Hartman2010-07-231-22/+0Star
| | | | | | | | | We have ftrace to look at function traces if its really needed. Don't roll custom macros for this. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge staging-next tree into Linus's latest versionGreg Kroah-Hartman2010-05-211-124/+119Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/staging/arlan/arlan-main.c drivers/staging/comedi/drivers/cb_das16_cs.c drivers/staging/cx25821/cx25821-alsa.c drivers/staging/dt3155/dt3155_drv.c drivers/staging/hv/hv.c drivers/staging/netwave/netwave_cs.c drivers/staging/wavelan/wavelan.c drivers/staging/wavelan/wavelan_cs.c drivers/staging/wlags49_h2/wl_cs.c This required a bit of hand merging due to the conflicts that happened in the later .34-rc releases, as well as some staging driver changing coming in through other trees (v4l and pcmcia). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: auto-load MSFT PV NIC driverK. Y. Srinivasan2010-05-141-0/+26
| | | | | | | | | | | | | | Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: rename VersionInfo.h to version_info.hGreg Kroah-Hartman2010-05-111-1/+1
| | | | | | | | | | | | | | | | The great renaming of the hv code is now complete. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: rename NetVscApi.h to netvsc_api.hGreg Kroah-Hartman2010-05-111-1/+1
| | | | | | | | | | | | Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: add basic ethtool supportStephen Hemminger2010-05-111-0/+16
| | | | | | | | | | | | | | | | | | Ethtool allows querying device information and controlling parameters. For now just add ability to turn on/off scatter/gather. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: add transmit flow controlStephen Hemminger2010-05-111-45/+27Star
| | | | | | | | | | | | | | | | | | Keep track of the number of pages sent over transmit and stop before going over. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: transmit scatter gather supportStephen Hemminger2010-05-111-31/+22Star
| | | | | | | | | | | | | | | | | | | | | | | | The transmit management of pages was confusing for handling fragmented SKB's. (But since NETIF_F_SG was never set, the code was never hit). The parameter AdditionalRequestPageBufferCount is always one, (and leads to ugly code), so just inline and add comments. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: ring parameterStephen Hemminger2010-05-111-3/+6
| | | | | | | | | | | | | | | | | | The ring size parameter should be number of pages (not bytes). Add module parameter information as well. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: cleanup network driverStephen Hemminger2010-05-111-5/+2Star
| | | | | | | | | | | | | | | | | | | | | | Minor stuff: * Add module description * Remove variable set but never used. * Move variable inside conditional Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: handle skb allocation failureStephen Hemminger2010-05-111-20/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some fixes to receive handling: * Dieing with assertion failure when running out of memory is not ok * Use newer alloc function to get aligned skb * Dropped statistic is supposed to be incremented only by driver it was responsible for the drop. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: hv: use network device statsStephen Hemminger2010-05-111-22/+9Star
| | | | | | | | | | | | | | | | | | | | The network device structure has space already reserved for statistics. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: hv: Corrected all header comment formats kernel-doc formatHank Janssen2010-05-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Removed kerneldoc /** from functions that should not have them. Added proper kerneldoc headers to functions that should have them. This includes fixes as pointed out by Randy Dunlap and Joe Perches. Cc: Joe Perches <joe@perches.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> 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>
* | Staging: hv: name network device ethX rather than sethXStephen Hemminger2010-04-301-2/+1Star
|/ | | | | | | | | | | | | | This patch makes the HyperV network device use the same naming scheme as other virtual drivers (Xen, KVM). In an ideal world, userspace tools would not care what the name is, but some users and applications do care. Vyatta CLI is one of the tools that does depend on what the name is. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* Staging: hv: Rename struct device_context and re-arrange the fields insideHaiyang Zhang2010-03-041-5/+5
| | | | | | | | | | | | | Rename struct device_context and re-arrange the fields inside. Rename struct device_context to struct vm_device, and move struct device field to the end according to Document/driver-model standard. 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>
* Staging: hv: Add proper versioning to HV driversHank Janssen2010-03-041-2/+3
| | | | | | | | | | | | Provide proper versioning information for all HV drivers. With removal of build time/date/and Minor number as requested by Greg KH Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Haiyang Zhang <haiyang@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: remove unneeded OnClose callbackGreg Kroah-Hartman2010-03-041-6/+1Star
| | | | | | | | | | This callback only calls one function, so just call the function instead, no need for indirection at all. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com>. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: remove unneeded OnOpen callbackGreg Kroah-Hartman2010-03-041-6/+1Star
| | | | | | | | | | This callback only calls one function, so just call the function instead, no need for indirection at all. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com>. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: Fix some missing author namesHaiyang Zhang2009-12-011-0/+1
| | | | | | | | | | Fix some missing author names. They were accidentally removed by someone within Microsoft before the files were sent for inclusion in the kernel. 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>
* Staging: hv: remove function pointer typedefs from vmbus.hGreg Kroah-Hartman2009-09-151-2/+2
| | | | | | | | | | | 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>
* Staging: hv: reorganize netvsc_drv.cGreg Kroah-Hartman2009-09-151-171/+158Star
| | | | | | | Saves space by getting rid of the forward declarations. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: coding style cleanups for netvsc_drv.cGreg Kroah-Hartman2009-09-151-262/+186Star
| | | | | | | | | | | 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>
* Staging: hv: move NetVscApi.hGreg Kroah-Hartman2009-09-151-1/+1
| | | | | | | | | 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>
* Staging: hv: move logging.hGreg Kroah-Hartman2009-09-151-1/+1
| | | | | | | | | 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>
* Staging: hv: fix up typedefs in NetVscApi.hGreg Kroah-Hartman2009-09-151-9/+10
| | | | | | | 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>
* Staging: hv: typedef removal for VmbusApi.hGreg Kroah-Hartman2009-09-151-2/+2
| | | | | | | | | | | 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>
* Staging: hv: move vmbus.hGreg Kroah-Hartman2009-09-151-1/+1
| | | | | | | | | | | 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>
* Staging: hv: osd.h: remove GUID typedefGreg Kroah-Hartman2009-09-151-1/+1
| | | | | | | | 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>
* Staging: hv: move osd.hGreg Kroah-Hartman2009-09-151-0/+1
| | | | | | | | | 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>
* Staging: hv: fix sparse static warningsGreg Kroah-Hartman2009-09-151-2/+2
| | | | | | | | 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>
* Staging: hv: Remove typedef NETVSC_PACKET and PNETVSC_PACKETNicolas Palix2009-09-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Staging: hv: check return value of driver_for_each_device()Bill Pemberton2009-09-151-2/+9
| | | | | | | | | | | 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>
* Staging: hv: Transform PDEVICE_OBJECT and DEVICE_OBJECT typedefs into their ↵Nicolas Palix2009-09-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | corresponding structs 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>
* Staging: hv: check return value of device_register()Bill Pemberton2009-09-151-1/+1
| | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: Remove C99 commentsBill Pemberton2009-09-151-50/+50
| | | | | | | | Remove C99 // comments with traditional /* */ comments Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: Remove compatibility ifdefryMoritz Muehlenhoff2009-09-151-27/+0Star
| | | | | | | Signed-off-by: Moritz Muehlenhoff <jmm@debian.org> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: hv: remove UNUSED_VAR usageGreg Kroah-Hartman2009-09-151-1/+1
| | | | | | | | 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>
* Staging: hv: remove ULONG_PTR typedefGreg Kroah-Hartman2009-09-151-2/+2
| | | | | | | | | 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>