<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/core/devio.c, branch v2.6.17</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[PATCH] USB: fix check_ctrlrecip to allow control transfers in state ADDRESS</title>
<updated>2006-03-20T22:50:02+00:00</updated>
<author>
<name>Horst Schirmeier</name>
<email>horst@schirmeier.com</email>
</author>
<published>2006-03-11T08:16:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=24f8b116c45e46779dec553f934c3d74f79c06fb'/>
<id>24f8b116c45e46779dec553f934c3d74f79c06fb</id>
<content type='text'>
check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie.  state ADDRESS).  This for example
makes it impossible to read the device descriptors without configuring the
device, although most standard device requests are allowed in this state by
the spec.  This patch allows control transfers for the ADDRESS state, too.

Signed-off-by: Horst Schirmeier &lt;horst@schirmeier.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie.  state ADDRESS).  This for example
makes it impossible to read the device descriptors without configuring the
device, although most standard device requests are allowed in this state by
the spec.  This patch allows control transfers for the ADDRESS state, too.

Signed-off-by: Horst Schirmeier &lt;horst@schirmeier.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: optimise devio.c usbdev_read fix</title>
<updated>2006-03-20T22:49:52+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-01-19T07:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9fcd5c322ca2ee636e06e0c099cf8f1a692f832e'/>
<id>9fcd5c322ca2ee636e06e0c099cf8f1a692f832e</id>
<content type='text'>
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:141: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:142: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:143: error: invalid type argument of `-&gt;'

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:141: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:142: error: invalid type argument of `-&gt;'
drivers/usb/core/devio.c:143: error: invalid type argument of `-&gt;'

Cc: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: optimise devio.c::usbdev_read</title>
<updated>2006-03-20T22:49:52+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2006-01-06T20:24:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8781ba0aa9d9dd2870b75dba8d9a47e0f5a3f96a'/>
<id>8781ba0aa9d9dd2870b75dba8d9a47e0f5a3f96a</id>
<content type='text'>
this is a small optimisation. It is ridiculous to do a kmalloc for
18 bytes. This puts it onto the stack.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.name&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is a small optimisation. It is ridiculous to do a kmalloc for
18 bytes. This puts it onto the stack.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.name&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: Remove USB private semaphore</title>
<updated>2006-01-04T21:48:34+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2005-11-17T22:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ad3d6ccf5eee285e233dbaf186369b8d477a666'/>
<id>9ad3d6ccf5eee285e233dbaf186369b8d477a666</id>
<content type='text'>
This patch (as605) removes the private udev-&gt;serialize semaphore,
relying instead on the locking provided by the embedded struct device's
semaphore.  The changes are confined to the core, except that the
usb_trylock_device routine now uses the return convention of
down_trylock rather than down_read_trylock (they return opposite values
for no good reason).

A couple of other associated changes are included as well:

	Now that we aren't concerned about HCDs that avoid using the
	hcd glue layer, usb_disconnect no longer needs to acquire the
	usb_bus_lock -- that can be done by usb_remove_hcd where it
	belongs.

	Devices aren't locked over the same scope of code in
	usb_new_device and hub_port_connect_change as they used to be.
	This shouldn't cause any trouble.

Along with the preceding driver core patch, this needs a lot of testing.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as605) removes the private udev-&gt;serialize semaphore,
relying instead on the locking provided by the embedded struct device's
semaphore.  The changes are confined to the core, except that the
usb_trylock_device routine now uses the return convention of
down_trylock rather than down_read_trylock (they return opposite values
for no good reason).

A couple of other associated changes are included as well:

	Now that we aren't concerned about HCDs that avoid using the
	hcd glue layer, usb_disconnect no longer needs to acquire the
	usb_bus_lock -- that can be done by usb_remove_hcd where it
	belongs.

	Devices aren't locked over the same scope of code in
	usb_new_device and hub_port_connect_change as they used to be.
	This shouldn't cause any trouble.

Along with the preceding driver core patch, this needs a lot of testing.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: remove .owner field from struct usb_driver</title>
<updated>2006-01-04T21:48:34+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-11-21T22:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=75318d2d7cab77b14c5d3dbd5e69f2680a769e16'/>
<id>75318d2d7cab77b14c5d3dbd5e69f2680a769e16</id>
<content type='text'>
It is no longer needed, so let's remove it, saving a bit of memory.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is no longer needed, so let's remove it, saving a bit of memory.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] usb devio warning fix</title>
<updated>2005-11-17T19:29:54+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2005-11-17T17:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=058120d70ebb430e27ad55871429028361c5baed'/>
<id>058120d70ebb430e27ad55871429028361c5baed</id>
<content type='text'>
drivers/usb/core/devio.c: In function `proc_ioctl_compat':
drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast

Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/usb/core/devio.c: In function `proc_ioctl_compat':
drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast

Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: usbdevfs_ioctl 32bit fix</title>
<updated>2005-11-17T19:29:53+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2005-11-17T17:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=777da5905e82695d1dd73eee6cfe50bd486d8fe9'/>
<id>777da5905e82695d1dd73eee6cfe50bd486d8fe9</id>
<content type='text'>
drivers/usb/core/devio.c: In function `proc_ioctl_compat':
drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast

NFI if this is correct...

Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/usb/core/devio.c: In function `proc_ioctl_compat':
drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast

NFI if this is correct...

Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] usbcore: Use kzalloc instead of kmalloc/memset</title>
<updated>2005-10-28T23:47:51+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2005-10-24T19:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a1ef3b5a765a6f20e7b8caf295aad3276243966'/>
<id>0a1ef3b5a765a6f20e7b8caf295aad3276243966</id>
<content type='text'>
This patch (as590) fixes up all the remaining places where usbcore can
use kzalloc rather than kmalloc/memset.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as590) fixes up all the remaining places where usbcore can
use kzalloc rather than kmalloc/memset.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] usb: Patch for USBDEVFS_IOCTL from 32-bit programs</title>
<updated>2005-10-28T23:47:46+00:00</updated>
<author>
<name>Pete Zaitcev</name>
<email>zaitcev@redhat.com</email>
</author>
<published>2005-10-18T01:15:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c36fc889b5a4fd66cfd9ba80d9e038745d349567'/>
<id>c36fc889b5a4fd66cfd9ba80d9e038745d349567</id>
<content type='text'>
Dell supplied me with the following test:

#include&lt;stdio.h&gt;
#include&lt;errno.h&gt;
#include&lt;sys/ioctl.h&gt;
#include&lt;fcntl.h&gt;
#include&lt;linux/usbdevice_fs.h&gt;

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*)&amp;hubPortInfo;
   int fd, ret;
   if(argc != 2) {
     fprintf(stderr,"Usage: %s /proc/bus/usb/&lt;BusNo&gt;/&lt;HubID&gt;\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 &lt; 0) {
     perror("open failed:");
     exit(errno);
   }
   errno = 0;
   ret = ioctl(fd,USBDEVFS_IOCTL,&amp;command);
   printf("IOCTL return status:%d\n",ret);
   if(ret&lt;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: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dell supplied me with the following test:

#include&lt;stdio.h&gt;
#include&lt;errno.h&gt;
#include&lt;sys/ioctl.h&gt;
#include&lt;fcntl.h&gt;
#include&lt;linux/usbdevice_fs.h&gt;

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*)&amp;hubPortInfo;
   int fd, ret;
   if(argc != 2) {
     fprintf(stderr,"Usage: %s /proc/bus/usb/&lt;BusNo&gt;/&lt;HubID&gt;\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 &lt; 0) {
     perror("open failed:");
     exit(errno);
   }
   errno = 0;
   ret = ioctl(fd,USBDEVFS_IOCTL,&amp;command);
   printf("IOCTL return status:%d\n",ret);
   if(ret&lt;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: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] USB: convert usbfs/devio.c to use usb notifiers</title>
<updated>2005-10-28T23:47:46+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a7b986b3e107727dd1c1af0ead0b5e52d7726db3'/>
<id>a7b986b3e107727dd1c1af0ead0b5e52d7726db3</id>
<content type='text'>
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
