Staging: hv: make the Hyper-V virtual storage driver build
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Jul 2009 17:18:50 +0000 (10:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:44 +0000 (12:01 -0700)
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
drivers/staging/hv/storvsc_drv.c

index 8a1d776675420325ae2e222f25dae0a6e9206138..c8279b7b4f2587e532c720b8aa0bb5918e6a7cfc 100644 (file)
  *
  */
 
+#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"
 
 
 //
index d5a337bb99a53ef15fc0ed1f12b13cda97b46ac9..0a1c14451b0ac7c8dd9201173cc2f22fc2ef0511 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#define KERNEL_2_6_27
 
 #include <linux/init.h>
 #include <linux/module.h>
 #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 +1251,7 @@ static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[], un
        // 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);