diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 4c0f514de81b..23db020f57b9 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.15 1999/08/02 19:50:30 augustss Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.16 1999/08/07 23:14:17 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -182,6 +182,36 @@ usbd_get_port_status(dev, port, ps) return (usbd_do_request(dev, &req, ps)); } +usbd_status +usbd_clear_hub_feature(dev, sel) + usbd_device_handle dev; + int sel; +{ + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_CLASS_DEVICE; + req.bRequest = UR_CLEAR_FEATURE; + USETW(req.wValue, sel); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + return (usbd_do_request(dev, &req, 0)); +} + +usbd_status +usbd_set_hub_feature(dev, sel) + usbd_device_handle dev; + int sel; +{ + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_CLASS_DEVICE; + req.bRequest = UR_SET_FEATURE; + USETW(req.wValue, sel); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + return (usbd_do_request(dev, &req, 0)); +} + usbd_status usbd_clear_port_feature(dev, port, sel) usbd_device_handle dev; diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h index d0c66226aed3..6d5888c55a07 100644 --- a/sys/dev/usb/usbdi_util.h +++ b/sys/dev/usb/usbdi_util.h @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.h,v 1.13 1999/06/30 06:44:23 augustss Exp $ */ +/* $NetBSD: usbdi_util.h,v 1.14 1999/08/07 23:14:17 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -48,6 +48,8 @@ usbd_status usbd_get_device_desc __P((usbd_device_handle dev, usbd_status usbd_set_address __P((usbd_device_handle dev, int addr)); usbd_status usbd_get_port_status __P((usbd_device_handle, int, usb_port_status_t *)); +usbd_status usbd_set_hub_feature __P((usbd_device_handle dev, int)); +usbd_status usbd_clear_hub_feature __P((usbd_device_handle, int)); usbd_status usbd_set_port_feature __P((usbd_device_handle dev, int, int)); usbd_status usbd_clear_port_feature __P((usbd_device_handle, int, int)); usbd_status usbd_get_device_status __P((usbd_device_handle,usb_status_t*));