8139too tx_flag query
"mohanlal jangir" <[email protected]> Mon, 22 Dec 2003 16:44:27 +0530
| Newsgroups | gmane.linux.drivers.realtek.devel |
|---|---|
| Message-ID | <[email protected]> |
Location:
File - 8139too.c Function - rtl8139_open
There is a statement
tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000;
The TX_FIFO_THRESH is defined to 256. Later tx_flag is ORed with packet
length (in function rtl8139_start_xmit) and written to TxStatus register. In
Transmission Status Register bit 16-21 represents "Early Tx Threshold".
My question is why TX_FIFO_THRESH is LEFT SHIFTed 11 times. It should be 16
(if we want to move it bits 16-21)?
Realtek specs says
"Early Tx Threshold: Specifies the threshold level in the Tx FIFO to begin
the transmission. When the byte count of the data in the Tx FIFO reaches
this level, (or the FIFO contains at least one complete packet) the
RTL8139D(L) will transmit this packet.
000000 = 8 bytes
These fields count from 000001 to 111111 in unit of 32 bytes."
000000 means 8 bytes. What is exact relation? i.e. 000010 means how much? If
I have a 64 byte length packet and I want device to transmit immediately,
what should I write to bits 16-21? Does writing to this register start
transmission on wire?
Regards
Mohanlal