All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin F Krafft <krafft@ailab.ch>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: failing to force-claim USB interface
Date: Mon, 19 Jan 2004 16:46:33 +0100	[thread overview]
Message-ID: <20040119154633.GA3797@piper.madduck.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

I am trying to make use of the usbfs USBDEVFS_DISCONNECT ioctl, and
I am failing. Here is the code:

  struct usb_device *dev;
  [...]
  sprintf(path, "/proc/bus/usb/%s/%s", dev->bus->dirname, dev->filename);
  int fd = open(path);
  struct usbdevfs_ioctl command = { 0, USBDEVFS_DISCONNECT, 0 };
  ioctl (fd, USBDEVFS_IOCTL, &command) < 0

However, the ioctl always fails. I am not sure whether I am using
the right values for the file descriptor passed to ioctl(), or what
the interface number (first parameter of usbdevfs_ioctl) is.

Maybe someone could offer me some advice or tell me to RTFM (but
please specify TM to FR).

Thanks,

-- 
Martin F. Krafft                Artificial Intelligence Laboratory
Ph.D. Student                   Department of Information Technology
Email: krafft@ailab.ch          University of Zurich
Tel: +41.(0)1.63-54323          Andreasstrasse 15, Office 2.20
http://ailab.ch/people/krafft   CH-8050 Zurich, Switzerland
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
 
click the start menu and select 'shut down.'

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2004-01-19 15:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040119164627.GA29146@piper.madduck.net>
2004-01-19 15:46 ` Martin F Krafft [this message]
2004-01-19 17:58   ` [solved] failing to force-claim USB interface martin f krafft
2004-01-19 18:04 David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040119154633.GA3797@piper.madduck.net \
    --to=krafft@ailab.ch \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.