Re: [PATCH 1/2] usb: typec: Add USB Power Delivery sink port support

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

 



On Fri, 2016-07-15 at 10:25 +0300, Felipe Balbi wrote:
> > +int pd_sink_queue_msg(struct pd_sink_msg *msg)
> > +{
> > +     unsigned long flags;
> > +     struct pd_sink_port *port;
> > +
> > +     if (msg->port < 0 || msg->port >= MAX_NR_SINK_PORTS) {
> > +             pr_err("Invalid port number\n");
> > +             return -EINVAL;
> > +     }
> > +
> > +     port = sink_ports[msg->port];
> > +
> > +     spin_lock_irqsave(&port->rx_lock, flags);
> > +     list_add_tail(&msg->list, &port->rx_list);
> > +     spin_unlock_irqrestore(&port->rx_lock, flags);
> > +
> > +     queue_work(port->rx_wq, &port->rx_work);
> 
> can we really queue several messages at a time? It seems unfeasible to
> me. It's not like we can queue several power request in a role. Why do
> you need this workqueue? Why don't you process message here, in place?

A reset can come at any time.

	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