[BACK]Return to patch-hald_freebsd_probing_probe-usb2-device.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / hal / patches

File: [cvs.NetBSD.org] / pkgsrc / sysutils / hal / patches / patch-hald_freebsd_probing_probe-usb2-device.c (download)

Revision 1.1, Sat Mar 31 16:06:56 2012 UTC (6 years, 11 months ago) by ryoon
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-, HEAD

Bump PKGREVISION

* Fix build on FreeBSD 9.0
** Patches are borrowed from FreeBSD ports
** Split FreeBSD support from DragonFly/FreeBSD support

$NetBSD: patch-hald_freebsd_probing_probe-usb2-device.c,v 1.1 2012/03/31 16:06:56 ryoon Exp $

* From FreeBSD ports repository to fix build on FreeBSD 9.0 RELEASE.

--- hald/freebsd/probing/probe-usb2-device.c.orig	2009-08-24 12:42:29.000000000 +0000
+++ hald/freebsd/probing/probe-usb2-device.c
@@ -147,16 +147,16 @@ main(int argc, char **argv)
 	    speed = 12.0;
 	    bcdspeed = 0x01200;
 	    break;
-	  case LIBUSB20_SPEED_HIGH:
+	  case LIBUSB20_SPEED_VARIABLE:
 	    speed = 480.0;
 	    bcdspeed = 0x48000;
 	    break;
 	  case LIBUSB20_SPEED_SUPER:
-	    speed = 4800.0;
-	    bcdspeed = 0x480000;
+	    speed = 5000.0;
+	    bcdspeed = 0x500000;
 	    break;
 	  default:
-	    ;
+	    break;
 	}
 
       libhal_device_set_property_double(hfp_ctx, hfp_udi, "usb_device.speed",
@@ -169,6 +169,9 @@ main(int argc, char **argv)
           case UD_USB_2_0:
             version = 2.0;
 	    break;
+	  case 0x0250:
+	    version = 2.5;
+	    break;
 	  case UD_USB_3_0:
 	    version = 3.0;
 	    break;
@@ -184,7 +187,7 @@ main(int argc, char **argv)
       libhal_device_set_property_int(hfp_ctx, hfp_udi,
         "usb_device.vendor_id", di.udi_vendorNo, &hfp_error);
       libhal_device_set_property_int(hfp_ctx, hfp_udi,
-        "usb_device.device_revision_bcd", ddesc->bcdUSB, &hfp_error);
+        "usb_device.device_revision_bcd", ddesc->bcdDevice, &hfp_error);
       libhal_device_set_property_string(hfp_ctx, hfp_udi,
         "usb_device.serial", di.udi_serial, &hfp_error);
       libhal_device_set_property_string(hfp_ctx, hfp_udi,