On Thu, Jun 13, 2002 at 01:19:57AM +0200, Flavien Lebarbe wrote: > Hello, > > > ioctl(LPGETSTATUS) is known to put the status into an int. The usblp > driver has a problem in this area as it does not put it into an int but > into a char. Let's see : > > from drivers/char/lp.c : lp_ioctl : > int status > copy_to_user((int *) arg, &status, sizeof(int)) > > from drivers/usb/printer.c : usblp_ioctl : > unsigned char status; > copy_to_user ((unsigned char *)arg, &status, 1) > > Even though in most cases it can work unnoticed on little-endian > machines ;o), it's broken on non-little-endian machines (I got bitten on > PPC). > > Attached are patches to fix this issue. These are against 2.4.18 and > 2.5.21 (untested), upported from 2.4.12 (with 2.4.18 usb stack) which is > the one I've successfully tested. It works for me on PPC now (I'm > printing on USB Canon printers like the S100 using in-house > hardware...). Feedback is welcome,
The patch against 2.4.18 will not apply to the latest 2.4.19-pre10 kernel. Could you rediff it please? thanks, greg k-h _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
