aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/Channel.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-11Staging: hv: rename Channel.c and .h to channel.c and .hGreg Kroah-Hartman1-1094/+0
Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: hv: Channel.c: fix up compiler warningGreg Kroah-Hartman1-1/+1
In the series of ASSERT removals, somehow we ended up with a compiler warning in Channel.c. This patch fixes that up. Cc: 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>
2010-05-11staging: hv: check return value of RingBufferInit()Bill Pemberton1-2/+11
RingBufferInit() would always return sucess and instead relied on an ASSERT() to test for an error condition. Remove the ASSERT() and return -EINVAL instead. The return value of RingBufferInit() was also never checked, so check it. 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>
2010-05-11staging: hv: remove ASSERT()s in Channel.cBill Pemberton1-9/+9
These ASSERT()s serve no purpose other than for debugging. 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>
2010-05-11Staging: hv: return -EINVAL instead of calling ASSERT()Bill Pemberton1-3/+4
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>
2010-05-11Staging: hv: remove ASSERT() in Channel.cBill Pemberton1-1/+5
VmbusChannelOpen() will now return -EINVAL if UserDataLen is too big. Previously this was handled by an assert. 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>
2010-05-11Staging: hv: test return value of VmbusChannelEstablishGpadl()Bill Pemberton1-3/+8
The return value of VmbusChannelEstablishGpadl() was not examined in Channel.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>
2010-05-11Staging: hv: remove ASSERT() in Channel.cBill Pemberton1-1/+3
return an error instead of calling ASSERT() if VmbusPostMessage() fails. 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>
2010-05-11Staging: hv: remove ASSERT() in Channel.cBill Pemberton1-1/+9
check memory allocation in VmbusChannelCreateGpadlHeader() and return -ENOMEM if it fails 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>
2010-05-11Staging: hv: remove ASSERT()s in Channel.cBill Pemberton1-9/+36
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>
2010-05-11Staging: hv: check return value of osd_PageAlloc()Bill Pemberton1-1/+3
The return value of osd_PageAlloc() was checked using an ASSERT(). Change that to more useful behaviour. 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>
2010-05-11Staging: hv: Added new hv_utils driver with shutdown as first functionalityHank Janssen1-5/+29
Addition of new driver for Hyper-V called hv_utils. This driver is intended to support things like KVP, Timesync, Heartbeat etc. This first release has support for Gracefull shutdown. e.g. Select shutdown from the Hyper-V main admin screen and the Linux VM will do a gracefull shutdown. 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>
2010-05-11staging: hv: Corrected all header comment formats kernel-doc formatHank Janssen1-22/+27
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>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
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>
2010-03-03Staging: hv: fix brace coding style issue in Channel.cChris Nicholson1-2/+1
This is a patch to the Channel.c file that fixes up a brace warning found by checkpatch.pl Signed-off-by: Chris Nicholson <chris.nicholson@cnick.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30Staging: hv: Fix vmbus event handler bugHaiyang Zhang1-12/+4
The flag ENABLE_POLLING is always enabled in original Makefile, but accidently removed during porting to mainline kernel. The patch fixes this bug which can cause stalled network communication. Credit needs to go to Eric Sesterhenn <eric.sesterhenn@lsexperts.de> For pointing out a typo in the original code as well. 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>
2009-09-15Staging: hv: remove more usages of internal list routinesBill Pemberton1-16/+18
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>
2009-09-15Staging: hv: remove PFN_CHANNEL_CALLBACKGreg Kroah-Hartman1-2/+2
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>
2009-09-15Staging: hv: coding style cleanup for Channel.cGreg Kroah-Hartman1-479/+345
All clean now. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: move logging.hGreg Kroah-Hartman1-2/+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>
2009-09-15Staging: hv: remove typedefs from VmbusPacketFormat.hGreg Kroah-Hartman1-14/+14
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>
2009-09-15Staging: hv: typedef removal for ChannelMessages.hGreg Kroah-Hartman1-35/+31
ChannelMessages.h is now coding style clean. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: typedef removal for VmbusApi.hGreg Kroah-Hartman1-3/+3
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>
2009-09-15Staging: hv: typdef fixes for HvSynicApi.hGreg Kroah-Hartman1-7/+7
Still some volatile mis-usages left to fix. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: osd.h: remove GUID typedefGreg Kroah-Hartman1-2/+2
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>
2009-09-15Staging: hv: move osd.hGreg Kroah-Hartman1-1/+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>
2009-09-15Staging: hv: clean up typedefs in ChannelMgmt.hGreg Kroah-Hartman1-81/+40
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>
2009-09-15Staging: hv: remove Sources.cGreg Kroah-Hartman1-0/+1
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>
2009-09-15Staging: hv: cleanup coding style issues in Channel.hGreg Kroah-Hartman1-22/+16
Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: Replace typedef SG_BUFFER_LIST by struct scatterlistNicolas Palix1-27/+15
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>
2009-09-15Staging: hv: remove timer wrapper functionsGreg Kroah-Hartman1-9/+8
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>
2009-09-15Staging: hv: osd: add osd_ prefix to global functionsGreg Kroah-Hartman1-13/+13
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>
2009-09-15Staging: hv: osd: remove physical address wrapper functionsGreg Kroah-Hartman1-1/+1
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>
2009-09-15Staging: hv: remove wrapper functions for atomic operationsBill Pemberton1-2/+2
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: remove wrapper functions for bit operationsBill Pemberton1-4/+10
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>
2009-09-15Staging: hv: remove WaitEventClose()Bill Pemberton1-3/+3
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>
2009-09-15Staging: hv: fix sparse static warningsGreg Kroah-Hartman1-12/+12
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>
2009-09-15Staging: hv: properly fix the printk() warningsGreg Kroah-Hartman1-2/+2
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>
2009-09-15Staging: hv: remove more printk() warningsGreg Kroah-Hartman1-2/+2
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>
2009-09-15Staging: hv: remove VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER typedefBill Pemberton1-2/+2
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: remove VMBUS_CHANNEL_PACKET_PAGE_BUFFER typedefBill Pemberton1-2/+2
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: Remove C99 commentsBill Pemberton1-73/+76
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>
2009-09-15Staging: hv: Use %ld instead of %d for a long intsBill Pemberton1-2/+2
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: hv: make gVmbusConnection.ChannelLock a real spinlockGreg Kroah-Hartman1-2/+3
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>
2009-09-15Staging: hv: make gVmbusConnection.ChannelMsgLock a real spinlockGreg Kroah-Hartman1-12/+15
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>
2009-09-15Staging: hv: make Channel->InboundLock a real spinlockGreg Kroah-Hartman1-8/+10
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>
2009-09-15Staging: hv: osd: remove MemFree wrapperGreg Kroah-Hartman1-4/+4
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>
2009-09-15Staging: hv: osd: remove MemAllocZeroed wrapperGreg Kroah-Hartman1-4/+4
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>
2009-09-15Staging: hv: osd: remove MemAlloc wrapperGreg Kroah-Hartman1-6/+3
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>
2009-09-15Staging: hv: remove ULONG_PTR typedefGreg Kroah-Hartman1-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>