usb_generic.c (af3b2549) | usb_generic.c (84e3f97e) |
---|---|
1/* $FreeBSD$ */ 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 --- 1835 unchanged lines hidden (view full) --- 1844 nlevel++; 1845 next = next->parent_hub; 1846 } 1847 1848 /* check if too many levels */ 1849 if (nlevel > USB_DEVICE_PORT_PATH_MAX) 1850 goto error; 1851 | 1/* $FreeBSD$ */ 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 --- 1835 unchanged lines hidden (view full) --- 1844 nlevel++; 1845 next = next->parent_hub; 1846 } 1847 1848 /* check if too many levels */ 1849 if (nlevel > USB_DEVICE_PORT_PATH_MAX) 1850 goto error; 1851 |
1852 /* store total level of ports */ 1853 dpp->udp_port_level = nlevel; 1854 |
|
1852 /* store port index array */ 1853 next = udev; 1854 while (next->parent_hub != NULL) { | 1855 /* store port index array */ 1856 next = udev; 1857 while (next->parent_hub != NULL) { |
1855 nlevel--; 1856 1857 dpp->udp_port_no[nlevel] = next->port_no; 1858 dpp->udp_port_level = nlevel; 1859 | 1858 dpp->udp_port_no[--nlevel] = next->port_no; |
1860 next = next->parent_hub; 1861 } 1862 return (0); /* success */ 1863 1864error: 1865 return (EINVAL); /* failure */ 1866} 1867 --- 469 unchanged lines hidden --- | 1859 next = next->parent_hub; 1860 } 1861 return (0); /* success */ 1862 1863error: 1864 return (EINVAL); /* failure */ 1865} 1866 --- 469 unchanged lines hidden --- |