Re: possible patch for rndis_host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Sonntag, 7. Februar 2010 20:39:05 schrieb Mark Ellis:

> This patch seems to be very effective, but as I mentioned, none of us
> are really device side developers, and John was never completely
> convinced this was correct. Quoting him from a while back....
> 
> "The reason I consider it dirty is that it needs the
> rndis_get_in_endpoint function which is called every time something
> calls rndis_command.
> 
> Ideally that should run once when the driver loads for a given device,
> but i felt like i was being too invasive when I started doing that and
> whimped out.

No problem, we can do that.
 
> The patch exists through careful comparison of the deprecated user
> mode and the current kernel mode implementations of usb-rndis, the
> poking of an INT IN endpoint being the only difference I found."

It would be nice if we knew why it works. If not, we need a comment
to that effect.
 
> So we think we are on the right lines, but perhaps not fixing the
> problem in the correct way. It would be great if someone could take a
> look at this, and either say it's fine for submission, or point us in a
> more appropriate direction.

[..]

> +	char            int_buf[128];

[..]
> +        retval = usb_interrupt_msg(dev->udev,
> +                                   pipe,
> +                                   int_buf,
> +                                   (maxp > 8 ? 8 : maxp),
> +                                   &partial,
> +                                   RNDIS_CONTROL_TIMEOUT_MS);

This means doing DMA on the stack. int_buf needs to be allocated with kmalloc()
preferably during probe().

Can you comment on why this patch is needed? If that is clear, either you can
clear up the issues I mentioned, or I can do so if you prefer.

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux