1. 11 12月, 2009 1 次提交
    • A
      usbdevfs: move compat_ioctl handling to devio.c · 637e8a60
      Arnd Bergmann 提交于
      Half the compat_ioctl handling is in devio.c, the other
      half is in fs/compat_ioctl.c. This moves everything into
      one place for consistency.
      
      As a positive side-effect, push down the BKL into the
      ioctl methods.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Alon Bar-Lev <alon.barlev@gmail.com>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: linux-usb@vger.kernel.org
      637e8a60
  2. 23 9月, 2009 2 次提交
    • A
      USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag · 01c6460f
      Alan Stern 提交于
      This patch (as1283) adds a new flag, USBDEVFS_URB_BULK_CONTINUATION,
      to usbfs.  It is intended for userspace libraries such as libusb and
      openusb.  When they have to break up a single usbfs bulk transfer into
      multiple URBs, they will set the flag on all but the first URB of the
      series.
      
      If an error other than an unlink occurs, the kernel will automatically
      cancel all the following URBs for the same endpoint and refuse to
      accept new submissions, until an URB is encountered that is not marked
      as a BULK_CONTINUATION.  Such an URB would indicate the start of a new
      transfer or the presence of an older library, so the kernel returns to
      normal operation.
      
      This enables libraries to delimit bulk transfers correctly, even in
      the presence of early termination as indicated by short packets.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      
      01c6460f
    • A
      USB: add API for userspace drivers to "claim" ports · 7cbe5dca
      Alan Stern 提交于
      This patch (as1258) implements a feature that users have been asking
      for: It gives programs the ability to "claim" a port on a hub, via a
      new usbfs ioctl.  A device plugged into a "claimed" port will not be
      touched by the kernel beyond the immediate necessities of
      initialization and enumeration.
      
      In particular, when a device is plugged into a "claimed" port, the
      kernel will not select and install a configuration.  And when a config
      is installed by usbfs or sysfs, the kernel will not probe any drivers
      for any of the interfaces.  (However the kernel will fetch various
      string descriptors during enumeration.  One could argue that this
      isn't really necessary, but the strings are exported in sysfs.)
      
      The patch does not guarantee exclusive access to these devices; it is
      still possible for more than one program to open the device file
      concurrently.  Programs are responsible for coordinating access among
      themselves.
      
      A demonstration program showing how to use the new interface can be 
      found in an attachment to
      
      	http://marc.info/?l=linux-usb&m=124345857431452&w=2
      
      The patch also makes a small simplification to the hub driver,
      replacing a bunch of more-or-less useless variants of "out of memory"
      with a single message.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7cbe5dca
  3. 22 7月, 2008 1 次提交
  4. 25 4月, 2008 1 次提交
    • A
      USB: usbfs: export the URB_NO_INTERRUPT flag to userspace · 14722ef4
      Alan Stern 提交于
      This patch (as1079) cleans up the way URB_* flags are exported in
      usbfs.
      
      	The URB_NO_INTERRUPT flag is now exported (this is the
      	only behavioral change).
      
      	USBDEVFS_URB_* macros are added for URB_NO_FSBR,
      	URB_ZERO_PACKET, and URB_NO_INTERRUPT, making explicit the
      	fact that the kernel accepts them.
      
      	The flag matching takes into account that the URB_* values
      	may change as the kernel evolves, whereas the USBDEVFS_URB_*
      	values must remain fixed since they are a user API.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      14722ef4
  5. 02 2月, 2008 1 次提交
  6. 29 11月, 2007 1 次提交
  7. 17 2月, 2007 1 次提交
  8. 24 9月, 2006 1 次提交
  9. 25 4月, 2006 1 次提交
  10. 29 10月, 2005 1 次提交
    • P
      [PATCH] usb: Patch for USBDEVFS_IOCTL from 32-bit programs · c36fc889
      Pete Zaitcev 提交于
      Dell supplied me with the following test:
      
      #include<stdio.h>
      #include<errno.h>
      #include<sys/ioctl.h>
      #include<fcntl.h>
      #include<linux/usbdevice_fs.h>
      
      main(int argc,char*argv[])
      {
         struct usbdevfs_hub_portinfo hubPortInfo = {0};
         struct usbdevfs_ioctl command = {0};
         command.ifno = 0;
         command.ioctl_code = USBDEVFS_HUB_PORTINFO;
         command.data = (void*)&hubPortInfo;
         int fd, ret;
         if(argc != 2) {
           fprintf(stderr,"Usage: %s /proc/bus/usb/<BusNo>/<HubID>\n",argv[0]);
           fprintf(stderr,"Example: %s /proc/bus/usb/001/001\n",argv[0]);
           exit(1);
         }
         errno = 0;
         fd = open(argv[1],O_RDWR);
         if(fd < 0) {
           perror("open failed:");
           exit(errno);
         }
         errno = 0;
         ret = ioctl(fd,USBDEVFS_IOCTL,&command);
         printf("IOCTL return status:%d\n",ret);
         if(ret<0) {
           perror("IOCTL failed:");
           close(fd);
           exit(3);
         } else {
             printf("IOCTL passed:Num of ports %d\n",hubPortInfo.nports);
             close(fd);
             exit(0);
         }
         return 0;
      }
      
      I have verified that it breaks if built in 32 bit mode on x86_64 and that
      the patch below fixes it.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c36fc889
  11. 13 9月, 2005 1 次提交
  12. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4