[Midnightbsd-cvs] mports [17547] trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c: add scsi driver

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 27 09:44:14 EDT 2014


Revision: 17547
          http://svnweb.midnightbsd.org/mports/?rev=17547
Author:   laffer1
Date:     2014-09-27 09:44:13 -0400 (Sat, 27 Sep 2014)
Log Message:
-----------
add scsi driver

Added Paths:
-----------
    trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c

Added: trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c
===================================================================
--- trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c	                        (rev 0)
+++ trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c	2014-09-27 13:44:13 UTC (rev 17547)
@@ -0,0 +1,28 @@
+--- ./hald/freebsd/hf-scsi.c.orig	2009-08-24 14:42:29.000000000 +0200
++++ ./hald/freebsd/hf-scsi.c	2013-10-23 13:11:08.979758920 +0200
+@@ -223,7 +223,7 @@
+ 	      hal_device_copy_property(parent, "scsi.lun", device, "storage.lun");
+ 	      /* do not stop here, in case it's an umass device */
+ 	    }
+-	  else if (! strcmp(bus, "usb"))
++	  else if (hal_device_has_property(parent, "scsi_host.freebsd.driver") && ! strcmp(hal_device_property_get_string(parent, "scsi_host.freebsd.driver"), "umass"))
+ 	    {
+ 	      hal_device_property_set_string(device, "storage.bus", "usb");
+ 	      hal_device_property_set_string(device, "storage.originating_device", hal_device_get_udi(parent));
+@@ -508,6 +508,16 @@
+ 	      if (! parent || ! hal_device_property_get_bool(parent, "info.ignore"))
+ 		{
+ 		  device = hf_scsi_bus_device_new(parent, match);
++		  /*
++		   * Due to synchronization problems, the SCSI bus could be
++		   * created before the USB interface. Mark it as a USB mass
++		   * storage device to ensure it is detected as such.
++		   */
++		  if (! strcmp(match->dev_name, "umass-sim"))
++		    {
++		      hal_device_property_set_string(device, "scsi_host.freebsd.driver", "umass");
++		      hal_device_property_set_int(device, "scsi_host.freebsd.unit", match->unit_number);
++		    }
+ 		  hf_device_preprobe_and_add(device);
+ 		}
+ 	    }


Property changes on: trunk/sysutils/hal/files/patch-hald_freebsd_hf-scsi.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list