Hi Larry,

On Wed, Apr 1, 2009 at 8:59 PM, Larry Finger <[email protected]>wrote:

> The driver kaweth yields a -EBUSY error when starting, and a -ETIME
> error when shutting down. These errors are avoided, and the RX status
> is further checked for other potential errors.
>
> Signed-off-by: Larry Finger <[email protected]>
> ---
>
> DaveM,
>
> This is 2.6.31 material as the imain change is to eliminate two trivial
> log messages.
>
> Larry
> ---
>
> Index: wireless-testing/drivers/net/usb/kaweth.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/usb/kaweth.c
> +++ wireless-testing/drivers/net/usb/kaweth.c
> @@ -31,7 +31,6 @@
>  ****************************************************************/
>
>  /* TODO:
> - * Fix in_interrupt() problem
>  * Develop test procedures for USB net interfaces


Is it possible to test these driver without the actual hardware (simulation
through some kernel options, etc)  ?
Will you be interested to provide your to-be-developed-test-procedures to
LTP (http://ltp.sourceforge.net/) ?


>  * Run test procedures


You can also have a look at the small set of device-drivers tests we have in
LTP here:

http://ltp.cvs.sf.net/viewvc/ltp/ltp/testcases/kernel/device-drivers/

Regards--
Subrata


>
>  * Fix bugs from previous two steps
> @@ -606,14 +605,30 @@ static void kaweth_usb_receive(struct ur
>
>        struct sk_buff *skb;
>
> -       if(unlikely(status == -ECONNRESET || status == -ESHUTDOWN))
> -       /* we are killed - set a flag and wake the disconnect handler */
> -       {
> +       if (unlikely(status == -EPIPE)) {
> +               kaweth->stats.rx_errors++;
>                kaweth->end = 1;
>                wake_up(&kaweth->term_wait);
> +               dbg("Status was -EPIPE.");
>                return;
>        }
> -
> +       if (unlikely(status == -ECONNRESET || status == -ESHUTDOWN)) {
> +               /* we are killed - set a flag and wake the disconnect
> handler */
> +               kaweth->end = 1;
> +               wake_up(&kaweth->term_wait);
> +               dbg("Status was -ECONNRESET or -ESHUTDOWN.");
> +               return;
> +       }
> +       if (unlikely(status == -EPROTO || status == -ETIME ||
> +                    status == -EILSEQ)) {
> +               kaweth->stats.rx_errors++;
> +               dbg("Status was -EPROTO, -ETIME, or -EILSEQ.");
> +               return;
> +       }
> +       if (unlikely(status == -EOVERFLOW)) {
> +               kaweth->stats.rx_errors++;
> +               dbg("Status was -EOVERFLOW.");
> +       }
>        spin_lock(&kaweth->device_lock);
>        if (IS_BLOCKED(kaweth->status)) {
>                spin_unlock(&kaweth->device_lock);
> @@ -883,13 +898,16 @@ static void kaweth_set_rx_mode(struct ne
>  ****************************************************************/
>  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
>  {
> +       int result;
>        __u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
> +
>        kaweth->packet_filter_bitmap = 0;
>        if (packet_filter_bitmap == 0)
>                return;
>
> -       {
> -       int result;
> +       if (in_interrupt())
> +               return;
> +
>        result = kaweth_control(kaweth,
>                                usb_sndctrlpipe(kaweth->dev, 0),
>                                KAWETH_COMMAND_SET_PACKET_FILTER,
> @@ -906,7 +924,6 @@ static void kaweth_async_set_rx_mode(str
>        else {
>                dbg("Set Rx mode to %d", packet_filter_bitmap);
>        }
> -       }
>  }
>
>  /****************************************************************
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
Regards & Thanks--
Subrata
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to