diff options
author | hselasky <hselasky@FreeBSD.org> | 2013-05-03 11:10:04 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2013-05-03 11:10:04 +0000 |
commit | fad53c9a9b9475ec66f6ccb57acaac47c314a49e (patch) | |
tree | da34869305f7442f6ba4ce940376c157aa9705e3 /sys/dev/usb/usb_request.h | |
parent | bf0ecb667034d07b6288c04623d895a0919377c0 (diff) | |
download | FreeBSD-src-fad53c9a9b9475ec66f6ccb57acaac47c314a49e.zip FreeBSD-src-fad53c9a9b9475ec66f6ccb57acaac47c314a49e.tar.gz |
- Add more defines to limit USB memory usage and number of allocations
in reduced memory systems.
- Split allocation and freeing of the configuration descriptor into a separate
function, so that the configuration descriptor can be made fixed size
to save memory allocations. This applies for both device and host mode.
Diffstat (limited to 'sys/dev/usb/usb_request.h')
-rw-r--r-- | sys/dev/usb/usb_request.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_request.h b/sys/dev/usb/usb_request.h index 5fcedd5..9f0a4e6 100644 --- a/sys/dev/usb/usb_request.h +++ b/sys/dev/usb/usb_request.h @@ -44,7 +44,7 @@ usb_error_t usbd_req_get_config_desc(struct usb_device *udev, struct mtx *mtx, struct usb_config_descriptor *d, uint8_t conf_index); usb_error_t usbd_req_get_config_desc_full(struct usb_device *udev, struct mtx *mtx, struct usb_config_descriptor **ppcd, - struct malloc_type *mtype, uint8_t conf_index); + uint8_t conf_index); usb_error_t usbd_req_get_desc(struct usb_device *udev, struct mtx *mtx, uint16_t *actlen, void *desc, uint16_t min_len, uint16_t max_len, uint16_t id, uint8_t type, @@ -94,4 +94,7 @@ usb_error_t usbd_req_set_port_link_state(struct usb_device *udev, usb_error_t usbd_req_set_lpm_info(struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t besl, uint8_t addr, uint8_t rwe); +void * usbd_alloc_config_desc(struct usb_device *, uint32_t); +void usbd_free_config_desc(struct usb_device *, void *); + #endif /* _USB_REQUEST_H_ */ |