On Fri, Sep 24, 2004 at 02:27:27AM +0000, [EMAIL PROTECTED] wrote:
> Hello,
> 
>    Currently, the pl2303 driver doesn't support the TIOCINQ (or FIONREAD, same
> thing) ioctl.  Following is a patch to resolve that problem.  Issuing an IOCTL
> to the driver with one of the 2 proper requests will now place the number of
> bytes waiting to be read into the ioctl argument and return 0 on success.  The
> patch is against the 2.6.8.1 kernel.  Most of the other usb to serial
> converters could probably use the same piece of code as most of their ioctl
> handlers aren't handling TIOCINQ, but I don't have the hardware to test it so I
> didn't patch it.
> 
> -Lee
> 
> ps - this is my first official patch, so if I screwed it up let me know and I'll
> fix it :]

You need to add a "Signed-off-by:" line as the file
Documentation/SubmittingPatches details.

> --- drivers/usb/serial/pl2303.c.orig    2004-09-25 08:17:52.502859976 +0000
> +++ drivers/usb/serial/pl2303.c 2004-09-25 08:44:36.588001968 +0000

This needs to be able to be applied with "patch -p1", and it can't.
Please see the aformentioned file, and the file from Andrew Morton about
how to create the "perfect patch"
        http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt

(hint, you also need a better subject line in your message).

> @@ -12,6 +12,8 @@
>   *     (at your option) any later version.
>   *
>   * See Documentation/usb/usb-serial.txt for more information on using this
> driver

Your email client linewrapped the patch, making it impossible to apply.

> + * 2004_Sep_20 Lee Smith
> + *      added support for the TIOCINQ ioctl

Adding stuff at the top of the file is not needed, now that we have
BitKeeper to show our changelogs.  There's a reason it's been 2 years
since the last entry in this file, and it isn't because the file hasn't
changed since then :)

> @@ -638,7 +640,10 @@
>                 case TIOCMIWAIT:
>                         dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
>                         return wait_modem_info(port, arg);
> -
> +               case TIOCINQ:
> +                       return copy_to_user((void __user *) arg, \
> +                                       &port->tty->read_cnt, sizeof(int));
> +                       break;

Your email client stripped the tabs out of the patch, again, making it
impossible to apply.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to