rt2x00: Re-order tx descriptor writing code in drivers.
Where possible, write the tx descriptor words from start to end, to follow a logical ordering of words. Where this is not possible (in rt2400pci, rt2500pci and rt61pci) add a comment as to why word 0 needs to be written last. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
6b97cb04f2
commit
e01f1ec35f
@@ -1039,6 +1039,11 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_HIGH_BUSY, 1);
|
||||
rt2x00_desc_write(txd, 4, word);
|
||||
|
||||
/*
|
||||
* Writing TXD word 0 must the last to prevent a race condition with
|
||||
* the device, whereby the device may take hold of the TXD before we
|
||||
* finished updating it.
|
||||
*/
|
||||
rt2x00_desc_read(txd, 0, &word);
|
||||
rt2x00_set_field32(&word, TXD_W0_OWNER_NIC, 1);
|
||||
rt2x00_set_field32(&word, TXD_W0_VALID, 1);
|
||||
|
Reference in New Issue
Block a user