trying out the new usb stuff ...
Hans Petter Selasky
hselasky at c2i.net
Thu Aug 21 18:07:09 UTC 2008
On Thursday 21 August 2008, Chuck Robey wrote:
> I'm not sure how to change my config to try out the new usb2 code. I saw
> where you mentioned the new config lines, but I'm not sure what to do with
> the devices I have in my kernel now (I don't use the modules for usb). I
> mean, things like usb, ohci, ehci, etc., do you keep them in or change them
> (and what's the complete list of required changes, not only the additions?)
Hi Chuck,
1. Remove all the USB modules from the kernel config.
2. Add this to your /boot/loader.conf after installing the patches and
building a new kernel.
usb2_core_load=YES
usb2_controller_load=YES
usb2_input_load=YES
> Lastly, are there any changes contemplated in the usb hid code? I'm not
> sure if it's my own ineptness, or bugs in the usbhid code, but there are
> parts of that libhibhid code that I've never been able to get to work (I
> needed to write my own), so I'm really interested if the usbhid stuff is
> going to change or not.
Yes, there are some new IOCTLs which might solve some of your problems.
/* Generic HID device */
#define USB_GET_REPORT_DESC _IOR ('U', 21, struct usb2_gen_descriptor)
#define USB_SET_IMMED _IOW ('U', 22, int)
#define USB_GET_REPORT _IOWR('U', 23, struct usb2_gen_descriptor)
#define USB_SET_REPORT _IOW ('U', 24, struct usb2_gen_descriptor)
#define USB_GET_REPORT_ID _IOR ('U', 25, int)
struct usb2_gen_descriptor {
void *ugd_data;
uint16_t ugd_lang_id;
uint16_t ugd_maxlen;
uint16_t ugd_actlen;
uint16_t ugd_offset;
uint8_t ugd_config_index;
uint8_t ugd_string_index;
uint8_t ugd_iface_index;
uint8_t ugd_altif_index;
uint8_t ugd_endpt_index;
uint8_t ugd_report_type;
uint8_t reserved[8];
};
For UHID you only need to initialise ugd_data, ugd_maxlen and
ugd_report_type .
--HPS
More information about the freebsd-usb
mailing list