svn commit: r252645 - in projects/hyperv/sys/contrib/dev/hyperv: stordisengage storvsc vmbus

Peter Grehan grehan at FreeBSD.org
Wed Jul 3 23:19:58 UTC 2013


Author: grehan
Date: Wed Jul  3 23:19:57 2013
New Revision: 252645
URL: http://svnweb.freebsd.org/changeset/base/252645

Log:
  Import driver source from hyperv-20130627 vendor branch.

Added:
  projects/hyperv/sys/contrib/dev/hyperv/stordisengage/
     - copied from r252584, vendor/hyperv/dist/sys/dev/hyperv/stordisengage/
Modified:
  projects/hyperv/sys/contrib/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
  projects/hyperv/sys/contrib/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
Directory Properties:
  projects/hyperv/sys/contrib/dev/hyperv/   (props changed)

Modified: projects/hyperv/sys/contrib/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
==============================================================================
--- projects/hyperv/sys/contrib/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c	Wed Jul  3 23:16:33 2013	(r252644)
+++ projects/hyperv/sys/contrib/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c	Wed Jul  3 23:19:57 2013	(r252645)
@@ -194,7 +194,7 @@ static device_method_t storvsc_methods[]
 	DEVMETHOD(device_attach,	storvsc_attach),
 	DEVMETHOD(device_detach,	storvsc_detach),
 	DEVMETHOD(device_shutdown,      bus_generic_shutdown),
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t storvsc_driver = {
@@ -203,10 +203,9 @@ static driver_t storvsc_driver = {
 
 static devclass_t storvsc_devclass;
 DRIVER_MODULE(storvsc, vmbus, storvsc_driver, storvsc_devclass, 0, 0);
-MODULE_VERSION(storvsc,1);
+MODULE_VERSION(storvsc, 1);
 MODULE_DEPEND(storvsc, vmbus, 1, 1, 1);
 
-extern int ata_disk_enable;
 
 /**
  * The host is capable of sending messages to us that are 
@@ -759,15 +758,24 @@ scan_for_luns(struct storvsc_softc *sc)
 static int
 storvsc_probe(device_t dev)
 {
+	int ata_disk_enable = 0;
 	int ret	= ENXIO;
 
 	switch (storvsc_get_storage_type(dev)) {
 	case DRIVER_BLKVSC:
-		if (ata_disk_enable == 0) {
-			ret = 0; 
-		}
+		if(bootverbose)
+			device_printf(dev, "DRIVER_BLKVSC-Emulated ATA/IDE probe\n");
+		if (!getenv_int("hw.ata.disk_enable", &ata_disk_enable)) {
+			if(bootverbose)
+				device_printf(dev,
+					"Enlightened ATA/IDE detected\n");
+			ret = 0;
+		} else if(bootverbose)
+			device_printf(dev, "Emulated ATA/IDE set (hw.ata.disk_enable set)\n");
 		break;
 	case DRIVER_STORVSC:
+		if(bootverbose)
+			device_printf(dev, "Enlightened SCSI device detected\n");
 		ret = 0;
 		break;
 	default:

Modified: projects/hyperv/sys/contrib/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
==============================================================================
--- projects/hyperv/sys/contrib/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c	Wed Jul  3 23:16:33 2013	(r252644)
+++ projects/hyperv/sys/contrib/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c	Wed Jul  3 23:19:57 2013	(r252645)
@@ -354,7 +354,7 @@ vmbus_bus_init(void)
 
 	if (ret) {
 		if(bootverbose)
-		printf("Error VMBUS: Hypervisor Initialization Failed!\n");
+			printf("Error VMBUS: Hypervisor Initialization Failed!\n");
 		return (ret);
 	}
 


More information about the svn-src-projects mailing list