diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-01-22 00:44:31 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-01-22 00:44:31 +0000 |
commit | d7d000c63871de531d26264ef6a7c27ddf4eed16 (patch) | |
tree | a9ab7ad906aba682140f59053c3d1f5389139fed | |
parent | 6fde7fe0e07eb0d91d5955eb9a26999695c0e84d (diff) | |
download | FreeBSD-src-d7d000c63871de531d26264ef6a7c27ddf4eed16.zip FreeBSD-src-d7d000c63871de531d26264ef6a7c27ddf4eed16.tar.gz |
Fixed bug in disconnect handling in uhub.c
-rw-r--r-- | sys/dev/usb/usb_port.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index d7bd4f0..26d9012 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -183,8 +183,8 @@ __CONCAT(dname,_attach)(device_t self) #define USB_ATTACH_SUCCESS_RETURN return 0 #define USB_ATTACH_SETUP \ - usbd_device_set_desc(self, devinfo); \ - sc->sc_dev = self + sc->sc_dev = self; \ + usbd_device_set_desc(self, devinfo) #define USB_GET_SC_OPEN(dname, unit, sc) \ struct __CONCAT(dname,_softc) *sc = \ @@ -196,8 +196,9 @@ __CONCAT(dname,_attach)(device_t self) struct __CONCAT(dname,_softc) *sc = \ devclass_get_softc(__CONCAT(dname,_devclass), unit) -#define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \ - (device_probe_and_attach((bdev)) == 0 ? ((dev)->softc = (bdev)) : 0) +#define USB_DO_ATTACH(dev, bdev, parent, args, print, sub) \ + (device_probe_and_attach((bdev)) == 0 ? \ + ((dev)->softc = device_get_softc(bdev)) : 0) /* conversion from one type of queue to the other */ #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD_UNTIL |