Re: [PATCH 03/10] staging: dwc2: move some interrupt enabling around

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

 



Hi Paul,

> > Before, the DISCONNINT interrupt was enabled in
> > dwc2_enable_host_interrupts, but handled in dwc2_handle_common_intr,
> > while the RXFLVL interrupt was enabled in dwc2_enable_commont_interrupts
> > and handled in dwc_handle_hcd_intr.
>
> And, the RXFLVL interrupt is a host+device mode interrupt, so it
> _should_ be enabled in dwc2_enable_common_interrupts. The only
> handler for it is in dwc2_hcd_intr() because there is no device-
> mode driver code yet. Once there is, there will either be two
> handlers, or else a common handler with different code depending
> on the mode.

If RXFLVL is a host+device mode interrupt, doesn't it make sense to
enable it in both enable_host_interrupts and (the future)
enable_device_interrupts instead of in enable_common_interrupts?

In practice, these two are always called (close) together, so it shouldn't
really change any behaviour, but it does make the distinction between
host, device and common mode interrupts more clear (and makes sure that
enable_host_interrupts mirrors disable_host_interrupts)?

This question only occurs for this particular interrupt, since the other
host+device interrupts (SOF, NPTxFEmp) are not enabled right away, but
later when needed.

Gr.

Matthijs
--
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