Commit 430a8e9a authored by Haiyang Zhang's avatar Haiyang Zhang Committed by Greg Kroah-Hartman

staging: hv: Remove camel cases of vmbus packet buffer structures

Remove camel cases of vmbus packet buffer structures
 Remove camel cases of:
 struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER
 struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 369ae8be
...@@ -81,7 +81,7 @@ int BlkVscInitialize(struct hv_driver *Driver) ...@@ -81,7 +81,7 @@ int BlkVscInitialize(struct hv_driver *Driver)
* Divide the ring buffer data size (which is 1 page less than the ring * 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) * buffer size since that page is reserved for the ring buffer indices)
* by the max request size (which is * by the max request size (which is
* VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + struct vstor_packet + u64) * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
*/ */
storDriver->MaxOutstandingRequestsPerChannel = storDriver->MaxOutstandingRequestsPerChannel =
((storDriver->RingBufferSize - PAGE_SIZE) / ((storDriver->RingBufferSize - PAGE_SIZE) /
......
...@@ -765,7 +765,7 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel, ...@@ -765,7 +765,7 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
{ {
int ret; int ret;
int i; int i;
struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER desc; struct vmbus_channel_packet_page_buffer desc;
u32 descSize; u32 descSize;
u32 packetLen; u32 packetLen;
u32 packetLenAligned; u32 packetLenAligned;
...@@ -778,10 +778,10 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel, ...@@ -778,10 +778,10 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
DumpVmbusChannel(Channel); DumpVmbusChannel(Channel);
/* /*
* Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the * Adjust the size down since vmbus_channel_packet_page_buffer is the
* largest size we support * largest size we support
*/ */
descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - descSize = sizeof(struct vmbus_channel_packet_page_buffer) -
((MAX_PAGE_BUFFER_COUNT - PageCount) * ((MAX_PAGE_BUFFER_COUNT - PageCount) *
sizeof(struct hv_page_buffer)); sizeof(struct hv_page_buffer));
packetLen = descSize + BufferLen; packetLen = descSize + BufferLen;
...@@ -790,17 +790,17 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel, ...@@ -790,17 +790,17 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */ /* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
/* Setup the descriptor */ /* Setup the descriptor */
desc.Type = VmbusPacketTypeDataUsingGpaDirect; desc.type = VmbusPacketTypeDataUsingGpaDirect;
desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.DataOffset8 = descSize >> 3; /* in 8-bytes grandularity */ desc.dataoffset8 = descSize >> 3; /* in 8-bytes grandularity */
desc.Length8 = (u16)(packetLenAligned >> 3); desc.length8 = (u16)(packetLenAligned >> 3);
desc.TransactionId = RequestId; desc.transactionid = RequestId;
desc.RangeCount = PageCount; desc.rangecount = PageCount;
for (i = 0; i < PageCount; i++) { for (i = 0; i < PageCount; i++) {
desc.Range[i].Length = PageBuffers[i].Length; desc.range[i].Length = PageBuffers[i].Length;
desc.Range[i].Offset = PageBuffers[i].Offset; desc.range[i].Offset = PageBuffers[i].Offset;
desc.Range[i].Pfn = PageBuffers[i].Pfn; desc.range[i].Pfn = PageBuffers[i].Pfn;
} }
sg_init_table(bufferList, 3); sg_init_table(bufferList, 3);
...@@ -826,7 +826,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel, ...@@ -826,7 +826,7 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
void *Buffer, u32 BufferLen, u64 RequestId) void *Buffer, u32 BufferLen, u64 RequestId)
{ {
int ret; int ret;
struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER desc; struct vmbus_channel_packet_multipage_buffer desc;
u32 descSize; u32 descSize;
u32 packetLen; u32 packetLen;
u32 packetLenAligned; u32 packetLenAligned;
...@@ -844,10 +844,10 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel, ...@@ -844,10 +844,10 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
return -EINVAL; return -EINVAL;
/* /*
* Adjust the size down since VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER is * Adjust the size down since vmbus_channel_packet_multipage_buffer is
* the largest size we support * the largest size we support
*/ */
descSize = sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER) - descSize = sizeof(struct vmbus_channel_packet_multipage_buffer) -
((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount) * ((MAX_MULTIPAGE_BUFFER_COUNT - PfnCount) *
sizeof(u64)); sizeof(u64));
packetLen = descSize + BufferLen; packetLen = descSize + BufferLen;
...@@ -856,17 +856,17 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel, ...@@ -856,17 +856,17 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
/* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */ /* ASSERT((packetLenAligned - packetLen) < sizeof(u64)); */
/* Setup the descriptor */ /* Setup the descriptor */
desc.Type = VmbusPacketTypeDataUsingGpaDirect; desc.type = VmbusPacketTypeDataUsingGpaDirect;
desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED; desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.DataOffset8 = descSize >> 3; /* in 8-bytes grandularity */ desc.dataoffset8 = descSize >> 3; /* in 8-bytes grandularity */
desc.Length8 = (u16)(packetLenAligned >> 3); desc.length8 = (u16)(packetLenAligned >> 3);
desc.TransactionId = RequestId; desc.transactionid = RequestId;
desc.RangeCount = 1; desc.rangecount = 1;
desc.Range.Length = MultiPageBuffer->Length; desc.range.Length = MultiPageBuffer->Length;
desc.Range.Offset = MultiPageBuffer->Offset; desc.range.Offset = MultiPageBuffer->Offset;
memcpy(desc.Range.PfnArray, MultiPageBuffer->PfnArray, memcpy(desc.range.PfnArray, MultiPageBuffer->PfnArray,
PfnCount * sizeof(u64)); PfnCount * sizeof(u64));
sg_init_table(bufferList, 3); sg_init_table(bufferList, 3);
......
...@@ -28,27 +28,27 @@ ...@@ -28,27 +28,27 @@
#include "channel_mgmt.h" #include "channel_mgmt.h"
/* The format must be the same as struct vmdata_gpa_direct */ /* The format must be the same as struct vmdata_gpa_direct */
struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER { struct vmbus_channel_packet_page_buffer {
u16 Type; u16 type;
u16 DataOffset8; u16 dataoffset8;
u16 Length8; u16 length8;
u16 Flags; u16 flags;
u64 TransactionId; u64 transactionid;
u32 Reserved; u32 reserved;
u32 RangeCount; u32 rangecount;
struct hv_page_buffer Range[MAX_PAGE_BUFFER_COUNT]; struct hv_page_buffer range[MAX_PAGE_BUFFER_COUNT];
} __attribute__((packed)); } __attribute__((packed));
/* The format must be the same as struct vmdata_gpa_direct */ /* The format must be the same as struct vmdata_gpa_direct */
struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { struct vmbus_channel_packet_multipage_buffer {
u16 Type; u16 type;
u16 DataOffset8; u16 dataoffset8;
u16 Length8; u16 length8;
u16 Flags; u16 flags;
u64 TransactionId; u64 transactionid;
u32 Reserved; u32 reserved;
u32 RangeCount; /* Always 1 in this case */ u32 rangecount; /* Always 1 in this case */
struct hv_multipage_buffer Range; struct hv_multipage_buffer range;
} __attribute__((packed)); } __attribute__((packed));
......
...@@ -799,7 +799,7 @@ int StorVscInitialize(struct hv_driver *Driver) ...@@ -799,7 +799,7 @@ int StorVscInitialize(struct hv_driver *Driver)
* Divide the ring buffer data size (which is 1 page less * Divide the ring buffer data size (which is 1 page less
* than the ring buffer size since that page is reserved for * than the ring buffer size since that page is reserved for
* the ring buffer indices) by the max request size (which is * the ring buffer indices) by the max request size (which is
* VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER + struct vstor_packet + u64) * vmbus_channel_packet_multipage_buffer + struct vstor_packet + u64)
*/ */
storDriver->MaxOutstandingRequestsPerChannel = storDriver->MaxOutstandingRequestsPerChannel =
((storDriver->RingBufferSize - PAGE_SIZE) / ((storDriver->RingBufferSize - PAGE_SIZE) /
......
...@@ -255,10 +255,10 @@ int VmbusInitialize(struct hv_driver *drv) ...@@ -255,10 +255,10 @@ int VmbusInitialize(struct hv_driver *drv)
VMBUS_REVISION_NUMBER); VMBUS_REVISION_NUMBER);
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++", DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
VMBUS_MESSAGE_SINT); VMBUS_MESSAGE_SINT);
DPRINT_DBG(VMBUS, "sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER)=%zd, " DPRINT_DBG(VMBUS, "sizeof(vmbus_channel_packet_page_buffer)=%zd, "
"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd", "sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER), sizeof(struct vmbus_channel_packet_page_buffer),
sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)); sizeof(struct vmbus_channel_packet_multipage_buffer));
drv->name = gDriverName; drv->name = gDriverName;
memcpy(&drv->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid)); memcpy(&drv->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment