svn commit: r202509 - stable/8/sys/dev/usb

Andrew Thompson thompsa at FreeBSD.org
Sun Jan 17 18:30:37 UTC 2010


Author: thompsa
Date: Sun Jan 17 18:30:37 2010
New Revision: 202509
URL: http://svn.freebsd.org/changeset/base/202509

Log:
  MFC r201680
  
   scratch_size was incorrectly passed as language ID when retrieving the language
   ID table, this broke string retrieval on some devices.
  
  Submitted by:	Hans Petter Selasky
  Reported by:	Renato Botelho

Modified:
  stable/8/sys/dev/usb/usb_device.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/usb/usb_device.c
==============================================================================
--- stable/8/sys/dev/usb/usb_device.c	Sun Jan 17 18:29:30 2010	(r202508)
+++ stable/8/sys/dev/usb/usb_device.c	Sun Jan 17 18:30:37 2010	(r202509)
@@ -1691,8 +1691,7 @@ usb_alloc_device(device_t parent_dev, st
 	    udev->ddesc.iSerialNumber) {
 		/* read out the language ID string */
 		err = usbd_req_get_string_desc(udev, NULL,
-		    (char *)scratch_ptr, 4, scratch_size,
-		    USB_LANGUAGE_TABLE);
+		    (char *)scratch_ptr, 4, 0, USB_LANGUAGE_TABLE);
 	} else {
 		err = USB_ERR_INVAL;
 	}


More information about the svn-src-stable-8 mailing list