Hi,
I've been trying to send an ioctl signal to the USB Alcatel Speedtouch ADSL
Modem Driver. I can't work out which device file it uses or what it's
major/minor numbers are. I did wonder if it used the files in
/proc/bus/usb/001 (two files 001 and 002) but they don't seem to trigger the
ioctl handler I'm interested in.
I've looked at the Programming Guide for Linux USB Device Drivers and the
Linux Kernel Module Programming Guide. One implies I need a device file to
write the ioctl to but I'm not sure which one it is. The other mentions
ioctl under Framework Data Structures but gives no further information on
it. Which file does it get assigned to and does it use major/minor numbers
or something different (something dynamic?).
I've copied the code from the driver that registers the device and the ioctl
subroutine at the end of this mail. It registers the driver by calling
"usb_register(&udsl_usb_driver);". I'm after to trigger the UDSL_IOCTL_START
and UDSL_IOCTL_STOP commands.
Any help would be very much appreciated as I can't figure this out...
Thanks,
RP
(Please cc: me in any replies)
static struct usb_driver udsl_usb_driver =
{
name: udsl_driver_name,
probe: udsl_usb_probe,
disconnect: udsl_usb_disconnect,
ioctl: udsl_usb_ioctl,
id_table: udsl_usb_ids,
};
static int udsl_usb_ioctl (struct usb_device *dev, unsigned int code, void
*user_data) {
struct udsl_instance_data *instance;
int i;
for (i=0; i < MAX_UDSL; i++)
if (minor_data[i] && (minor_data[i]->usb_dev == dev))
break;
if (i==MAX_UDSL) return -EINVAL;
instance = minor_data[i];
switch(code) {
case UDSL_IOCTL_START:
return udsl_usb_data_init (instance);
break;
case UDSL_IOCTL_STOP:
return udsl_usb_data_exit (instance);
break;
default:
break;
}
return -EINVAL;
}
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users