Re: [PATCH 3/4] USB: UHCI: Add support for big endian descriptors

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

 



On 05/09/2011 05:29 PM, Alan Stern wrote:
> On Mon, 9 May 2011, Jan Andersson wrote:
> 
>>> Why did all this stuff get moved up in the header file?
>>>
>>
>> I moved struct uhci_hcd up as the cpu_to_hc32() and hc32_to_cpu()
>> functions depend on it, particularly via uhci_big_endian_desc(uhci) that
>> expands to ((uhci)->big_endian_desc). enum uhci_rh_state is used in
>> struct uhci_hcd so I moved that part too. cpu_to_hc32() and
>> hc32_to_cpu() are used in several of the defines that were previously
>> located before struct uhci_hcd ..
> 
> Things appearing in a #define don't have to come before the #define 
> itself.  Things appearing in an inline function _do_ have to come 
> before the function -- but as far as I can see there are only two 
> inlines here: qh_element() and td_status().  Both of those should be 
> rewritten anyway; I've been meaning to do it for some time.
> 
> You can build your patch on top of the one below, and they can all be 
> submitted together.  Then things won't need to be moved around so much.
> 
> Alan Stern
> 
> 
> -------------------------------------------------------------------------
> 
> This patch (as1462) updates the special accessor functions defined in
> uhci-hcd.h.  Rather than using a full compiler barrier, all we really
> need is the ACCESS_ONCE() mechanism, because the idea is to prevent
> the compiler from caching a value that can change at any time.
> 
> Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 

Thank you, this makes things much better. I will post a V2 after I have
run some more tests.

Best regards,
  Jan
--
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