From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: [patch 11/54] Staging: hv: make the Hyper-V virtual storage driver build Date: Fri, 17 Jul 2009 11:09:01 -0700 Message-ID: <20090717180917.609085770@mini.kroah.org> References: <20090717180850.873962925@mini.kroah.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline; filename=staging-hv-make-the-hyper-v-virtual-storage-driver-build.patch In-Reply-To: <20090720160025.GA20249@kroah.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, virtualization@lists.osdl.org Cc: Sam Ramji , Haiyang Zhang , Hank Janssen , shemminger@linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org From: Greg Kroah-Hartman 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 Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/StorVsc.c | 9 +++++---- drivers/staging/hv/storvsc_drv.c | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) --- 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" // --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -21,6 +21,7 @@ * */ +#define KERNEL_2_6_27 #include #include @@ -40,10 +41,10 @@ #include #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 * #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 +1251,7 @@ static int storvsc_report_luns(struct sc // cmd length *(unsigned int*)&cmd[6] = cpu_to_be32(report_len); - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, (unsigned char*)report_luns, report_len, &sshdr, 30*HZ, 3); + result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, (unsigned char*)report_luns, report_len, &sshdr, 30*HZ, 3, NULL); if (result != 0) { kfree(report_luns);