lkml.org 
[lkml]   [2004]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb-devel] Re: USB hangs
On Mon, 12 Jan 2004, Oliver Neukum wrote:

> diff -Nru a/drivers/usb/usb.c b/drivers/usb/usb.c
> --- a/drivers/usb/usb.c Mon Jan 12 00:27:37 2004
> +++ b/drivers/usb/usb.c Mon Jan 12 00:27:37 2004
> @@ -1198,7 +1198,7 @@
> int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
> __u16 value, __u16 index, void *data, __u16 size, int timeout)
> {
> - struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
> + struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
> int ret;
>
> if (!dr)
> @@ -1958,7 +1958,7 @@
> if (result < 0)
> return result;
>
> - buffer = kmalloc(sizeof(status), GFP_KERNEL);
> + buffer = kmalloc(sizeof(status), GFP_NOIO);
> if (!buffer) {
> err("unable to allocate memory for configuration descriptors");
> return -ENOMEM;

Note that these changes have essentially already been incorporated into
2.6, so only 2.4 needs updating.

Alan Stern


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.048 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site