lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 31 Aug 2010 23:06:24 +0100
From:	Simon Arlott <simon@...e.lp0.eu>
To:	Greg KH <greg@...ah.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cxacru: Use a bulk URB to access the command endpoint

Please drop this patch, I'll make a version that detects which type of
endpoint it is and uses an interrupt or bulk URB as appropriate. Some
devices which may/may not be compatible appear to have interrupt
command endpoints as referenced in the original comment.

On 30/08/10 22:50, Simon Arlott wrote:
> The command endpoint is a bulk endpoint, but interrupt transfers
> are used to access it when checking status, load firmware or alter
> the configuration.
> 
> This causes an error if CONFIG_USB_DEBUG is enabled after commit
> f661c6f8c67bd55e93348f160d590ff9edf08904, which checks for this
> mismatch.
> 
> Signed-off-by: Simon Arlott <simon@...e.lp0.eu>
> ---
>  drivers/usb/atm/cxacru.c |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
> index 593fc5e..3b45f57 100644
> --- a/drivers/usb/atm/cxacru.c
> +++ b/drivers/usb/atm/cxacru.c
> @@ -49,7 +49,7 @@
>  
>  static const char cxacru_driver_name[] = "cxacru";
>  
> -#define CXACRU_EP_CMD		0x01	/* Bulk/interrupt in/out */
> +#define CXACRU_EP_CMD		0x01	/* Bulk in/out */
>  #define CXACRU_EP_DATA		0x02	/* Bulk in/out */
>  
>  #define CMD_PACKET_SIZE		64	/* Should be maxpacket(ep)? */
> @@ -1171,15 +1171,15 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
>  		goto fail;
>  	}
>  
> -	usb_fill_int_urb(instance->rcv_urb,
> -			usb_dev, usb_rcvintpipe(usb_dev, CXACRU_EP_CMD),
> +	usb_fill_bulk_urb(instance->rcv_urb,
> +			usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_CMD),
>  			instance->rcv_buf, PAGE_SIZE,
> -			cxacru_blocking_completion, &instance->rcv_done, 1);
> +			cxacru_blocking_completion, &instance->rcv_done);
>  
> -	usb_fill_int_urb(instance->snd_urb,
> -			usb_dev, usb_sndintpipe(usb_dev, CXACRU_EP_CMD),
> +	usb_fill_bulk_urb(instance->snd_urb,
> +			usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD),
>  			instance->snd_buf, PAGE_SIZE,
> -			cxacru_blocking_completion, &instance->snd_done, 4);
> +			cxacru_blocking_completion, &instance->snd_done);
>  
>  	mutex_init(&instance->cm_serialize);
>  


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ