Subject: I need help or suggestions for replacing linux usb functions
To: None <>
From: =?ISO-8859-1?Q?C=E9sar_Catri=E1n?= C. <>
List: current-users
Date: 09/05/2004 15:44:43
Dear list.

It is available at pkgsrc a project located in net/speedtouch. It is basica=
lly the driver for a usb modem, speedtouch. This GPL code uses the ugen(4) =
device for its communication with the modem.=20

There are some missing functions for the BSD driver, so the modem can not w=
ork properly if unplugged and plugged again. I would like to know if there =
is someone with experience in NetBSD's usb stack who can help giving some r=
eplacement or some advice for the nonexisting code in the BSD side of the d=
river, below.


C=E9sar Catri=E1n C.

* Function     : pusb_claim_interface
* Return value : ioctl returned value
* Description  : Claims an interface for use
int pusb_claim_interface(pusb_device_t dev, int interface)
	return(ioctl(dev->fd, USBDEVFS_CLAIMINTERFACE,&interface));

* Function     : pusb_release_interface
* Return value : ioctl returned value
* Description  : Release the usb interface
int pusb_release_interface(pusb_device_t dev, int interface)

int pusb_ioctl (pusb_device_t dev,int interface,int code,void *data)
	struct usbdevfs_ioctl ctrl;

	ctrl.ifno =3D interface;
	ctrl.ioctl_code =3D code; =3D data;