Re: [PATCH net] net: cdc_ncm: workaround for missing CDC Union

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

 



On Monday 21 January 2013 15:47:13 Bjørn Mork wrote:
> But I wonder if this isn't really a generic problem in usbnet.  The
> FLAG_MULTI_PACKET test here seems completely bogus:
> 
>         if (length % dev->maxpacket == 0) {
>                 if (!(info->flags & FLAG_SEND_ZLP)) {
>                         if (!(info->flags & FLAG_MULTI_PACKET)) {
>                                 urb->transfer_buffer_length++;
>                                 if (skb_tailroom(skb)) {
>                                         skb->data[skb->len] = 0;
>                                         __skb_put(skb, 1);
>                                 }
>                         }
>                 } else
>                         urb->transfer_flags |= URB_ZERO_PACKET;
>         }
> 
> Either the FLAG_MULTI_PACKET minidriver will have already padded the
> buffer so that we do not hit (length % dev->maxpacket == 0), or we
> should choose one of the alternatives: ZLP or padding.

But we cannot simply call __skb_put for a complicated data frame.
Besides you may want the current behavior.

	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