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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Nov 2009 16:25:34 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Ondrej Zary <linux@...nbow-software.org>, linux-usb@...r.kernel.org
Cc:	daniel.ritz@....ch, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NEXIO (or iNexio) support for usbtouchscreen

Am Montag, 16. November 2009 15:14:59 schrieb Ondrej Zary:

Hi,

firstly can you please send patches with -up? It makes them more readable.
> ---

> @@ -92,7 +95,7 @@
>  	dma_addr_t data_dma;
>  	unsigned char *buffer;
>  	int buf_len;
> -	struct urb *irq;
> +	struct urb *irq, *ack;

Where is this urb handled in case of disconnection?

> +#ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
> +	/* ignore the comm interface */
> +	{USB_DEVICE_AND_INTERFACE_INFO(0x10f0, 0x2002, 0x02, 0x02, 0x00),
> +		.driver_info = DEVTYPE_IGNORE},
> +	{USB_DEVICE_AND_INTERFACE_INFO(0x1870, 0x0001, 0x02, 0x02, 0x00),
> +		.driver_info = DEVTYPE_IGNORE},
> +	/* normal device IDs */
> +	{USB_DEVICE(0x10f0, 0x2002), .driver_info = DEVTYPE_NEXIO},
> +	{USB_DEVICE(0x1870, 0x0001), .driver_info = DEVTYPE_NEXIO},

Why not go for the interfaces you want?

> +static unsigned char nexio_ack[2] = { 0xaa, 0x02 };
> +
> +static int nexio_init(struct usbtouch_usb *usbtouch)
> +{
> +	struct usb_device *dev = usbtouch->udev;
> +	int ret = -ENOMEM;
> +	int actual_len;
> +	unsigned char *buf;
> +	unsigned char init[4] = { 0x82, 0x04, 0x0a, 0x0f };
> +	char *firmware_ver;
> +
> +	buf = kmalloc(NEXIO_BUFSIZE, GFP_KERNEL);
> +	if (!buf)
> +		goto err_nobuf;
> +	/* two reads */
> +	ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, NEXIO_INPUT_EP), buf,
> +			   NEXIO_BUFSIZE, &actual_len, NEXIO_TIMEOUT);
> +	if (ret < 0)
> +		goto err_out;
> +	ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, NEXIO_INPUT_EP), buf,
> +			   NEXIO_BUFSIZE, &actual_len, NEXIO_TIMEOUT);
> +	if (ret < 0)
> +		goto err_out;
> +	/* send init command */
> +	ret = usb_bulk_msg(dev, usb_sndbulkpipe(dev, NEXIO_OUTPUT_EP), init,
> +			   sizeof(init), &actual_len, NEXIO_TIMEOUT);

DMA on the kernel stack

	Regards
		Oliver


--
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