Page MenuHomeFreeBSD

D46534.diff
No OneTemporary

D46534.diff

diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c
--- a/sys/dev/usb/controller/usb_controller.c
+++ b/sys/dev/usb/controller/usb_controller.c
@@ -653,8 +653,8 @@
bus = ((struct usb_bus_msg *)pm)->bus;
- while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) {
- LIST_REMOVE(pd, pd_next);
+ while ((pd = SLIST_FIRST(&bus->pd_cleanup_list)) != NULL) {
+ SLIST_REMOVE(&bus->pd_cleanup_list, pd, usb_fs_privdata, pd_next);
USB_BUS_UNLOCK(bus);
usb_destroy_dev_sync(pd);
@@ -847,7 +847,7 @@
bus->shutdown_msg[1].bus = bus;
#if USB_HAVE_UGEN
- LIST_INIT(&bus->pd_cleanup_list);
+ SLIST_INIT(&bus->pd_cleanup_list);
bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup;
bus->cleanup_msg[0].bus = bus;
bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup;
diff --git a/sys/dev/usb/usb_bus.h b/sys/dev/usb/usb_bus.h
--- a/sys/dev/usb/usb_bus.h
+++ b/sys/dev/usb/usb_bus.h
@@ -86,7 +86,7 @@
struct usb_bus_msg shutdown_msg[2];
#if USB_HAVE_UGEN
struct usb_bus_msg cleanup_msg[2];
- LIST_HEAD(,usb_fs_privdata) pd_cleanup_list;
+ SLIST_HEAD(,usb_fs_privdata) pd_cleanup_list;
#endif
/*
* This mutex protects the USB hardware:
diff --git a/sys/dev/usb/usb_dev.h b/sys/dev/usb/usb_dev.h
--- a/sys/dev/usb/usb_dev.h
+++ b/sys/dev/usb/usb_dev.h
@@ -96,7 +96,7 @@
int fifo_index;
struct cdev *cdev;
- LIST_ENTRY(usb_fs_privdata) pd_next;
+ SLIST_ENTRY(usb_fs_privdata) pd_next;
};
/*
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h
--- a/sys/dev/usb/usb_device.h
+++ b/sys/dev/usb/usb_device.h
@@ -225,7 +225,7 @@
struct usb_fifo *fifo[USB_FIFO_MAX];
struct usb_symlink *ugen_symlink; /* our generic symlink */
struct usb_fs_privdata *ctrl_dev; /* Control Endpoint 0 device node */
- LIST_HEAD(,usb_fs_privdata) pd_list;
+ SLIST_HEAD(,usb_fs_privdata) pd_list;
char ugen_name[20]; /* name of ugenX.X device */
#endif
usb_ticks_t plugtime; /* copy of "ticks" */
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c
--- a/sys/dev/usb/usb_device.c
+++ b/sys/dev/usb/usb_device.c
@@ -1880,7 +1880,7 @@
snprintf(udev->ugen_name, sizeof(udev->ugen_name),
USB_GENERIC_NAME "%u.%u", device_get_unit(bus->bdev),
device_index);
- LIST_INIT(&udev->pd_list);
+ SLIST_INIT(&udev->pd_list);
/* Create the control endpoint device */
udev->ctrl_dev = usb_make_dev(udev, NULL, 0, 0,
@@ -2190,7 +2190,7 @@
delist_dev(pd->cdev);
USB_BUS_LOCK(bus);
- LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next);
+ SLIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next);
/* get cleanup going */
usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus),
&bus->cleanup_msg[0], &bus->cleanup_msg[1]);
@@ -2207,7 +2207,7 @@
int inmode, outmode, inmask, outmask, mode;
uint8_t ep;
- KASSERT(LIST_FIRST(&udev->pd_list) == NULL, ("stale cdev entries"));
+ KASSERT(SLIST_FIRST(&udev->pd_list) == NULL, ("stale cdev entries"));
DPRINTFN(2, "Creating device nodes\n");
@@ -2254,7 +2254,7 @@
mode, UID_ROOT, GID_OPERATOR, 0600);
if (pd != NULL)
- LIST_INSERT_HEAD(&udev->pd_list, pd, pd_next);
+ SLIST_INSERT_HEAD(&udev->pd_list, pd, pd_next);
}
}
@@ -2265,10 +2265,10 @@
DPRINTFN(2, "Freeing device nodes\n");
- while ((pd = LIST_FIRST(&udev->pd_list)) != NULL) {
+ while ((pd = SLIST_FIRST(&udev->pd_list)) != NULL) {
KASSERT(pd->cdev->si_drv1 == pd, ("privdata corrupt"));
- LIST_REMOVE(pd, pd_next);
+ SLIST_REMOVE(&udev->pd_list, pd, usb_fs_privdata, pd_next);
usb_destroy_dev(pd);
}
@@ -2358,7 +2358,7 @@
mtx_destroy(&udev->device_mtx);
#if USB_HAVE_UGEN
- KASSERT(LIST_FIRST(&udev->pd_list) == NULL, ("leaked cdev entries"));
+ KASSERT(SLIST_FIRST(&udev->pd_list) == NULL, ("leaked cdev entries"));
#endif
/* Uninitialise device */

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 4:06 PM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14538149
Default Alt Text
D46534.diff (3 KB)

Event Timeline