usb_device.c (246759) | usb_device.c (248246) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_device.c 246759 2013-02-13 12:35:17Z hselasky $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_device.c 248246 2013-03-13 15:38:01Z hselasky $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 1683 unchanged lines hidden (view full) --- 1693 } 1694 } 1695 usb_set_device_state(udev, USB_STATE_ADDRESSED); 1696 1697 /* setup the device descriptor and the initial "wMaxPacketSize" */ 1698 err = usbd_setup_device_desc(udev, NULL); 1699 1700 if (err != 0) { | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 1683 unchanged lines hidden (view full) --- 1693 } 1694 } 1695 usb_set_device_state(udev, USB_STATE_ADDRESSED); 1696 1697 /* setup the device descriptor and the initial "wMaxPacketSize" */ 1698 err = usbd_setup_device_desc(udev, NULL); 1699 1700 if (err != 0) { |
1701 /* XXX try to re-enumerate the device */ | 1701 /* try to enumerate two more times */ |
1702 err = usbd_req_re_enumerate(udev, NULL); | 1702 err = usbd_req_re_enumerate(udev, NULL); |
1703 if (err) 1704 goto done; | 1703 if (err != 0) { 1704 err = usbd_req_re_enumerate(udev, NULL); 1705 if (err != 0) { 1706 goto done; 1707 } 1708 } |
1705 } 1706 1707 /* 1708 * Setup temporary USB attach args so that we can figure out some 1709 * basic quirks for this device. 1710 */ 1711 usb_init_attach_arg(udev, &uaa); 1712 --- 1095 unchanged lines hidden --- | 1709 } 1710 1711 /* 1712 * Setup temporary USB attach args so that we can figure out some 1713 * basic quirks for this device. 1714 */ 1715 usb_init_attach_arg(udev, &uaa); 1716 --- 1095 unchanged lines hidden --- |