Re: [2.4 patch] Port of adutux driver from 2.6 kernel to 2.4.

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
On Tue, Oct 16, 2007 at 04:48:54PM +0300, Vitaliy Ivanov wrote:
> Pete,
> 
> On Mon, 2007-10-15 at 20:30, Pete Zaitcev wrote:
> 
> > > +	in_end_size = le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize);
> > > +	out_end_size = le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize);
> > 
> > Did you verify if this works? We use pre-swapped descriptors in 2.4.
> > I suspect you allocate 256 times more memory than necessary.
> 
> Just checked. Seems to be OK. At least printk shows shows it.

That's probably because you tested this on a little-endian machine :)

Pete is right, this code is incorrect for 2.4, drop the le16_to_cpu
function, the wMaxPacketSize variable is in native-endian form in 2.4
and early 2.6 versions.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.