RE: [RFC/PATCH] usb: dwc3: gadget: implement streams support

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

 



> From: Felipe Balbi [mailto:balbi@xxxxxx]
> Sent: Thursday, September 29, 2011 11:35 AM
> 
> On Thu, Sep 29, 2011 at 11:15:37AM -0700, Paul Zimmerman wrote:
> >
> > This looks correct to me.
> >
> > Reviewed-by: Paul Zimmerman <paulz@xxxxxxxxxxxx>
> 
> thanks, I have added your Reviewed-by to the patch ;-)

Hi Felipe,

Kind of off-topic for this particular patch, but for example:

+	if (usb_endpoint_xfer_bulk(desc) && dep->endpoint.max_streams) {
+		params.param1.depcfg.stream_capable = true;
+		params.param1.depcfg.stream_event_enable = true;
+		dep->stream_capable = true;
+	}

You are using bitfields here to fill in structures that get sent to the
the hardware. This will not work as-is for big-endian systems, unless
the hardware has built-in support for swizzling the bytes into the
correct order.

As I understand it, using bitfields to access hardware is frowned upon
in the Linux kernel, instead you should use shift-and-mask. Do you plan
to fix this?

Thanks,
Paul

��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux