Lines Matching full:transmit
89 static inline u16 next_desc(port_t *port, u16 desc, int transmit) in next_desc() argument
91 return (desc + 1) % (transmit ? port_to_card(port)->tx_ring_buffers in next_desc()
95 static inline u16 desc_abs_number(port_t *port, u16 desc, int transmit) in desc_abs_number() argument
100 desc %= (transmit ? tx_buffs : rx_buffs); // called with "X + 1" etc. in desc_abs_number()
102 transmit * rx_buffs + desc; in desc_abs_number()
105 static inline u16 desc_offset(port_t *port, u16 desc, int transmit) in desc_offset() argument
108 return desc_abs_number(port, desc, transmit) * sizeof(pkt_desc); in desc_offset()
112 int transmit) in desc_address() argument
116 + desc_offset(port, desc, transmit)); in desc_address()
119 + desc_offset(port, desc, transmit)); in desc_address()
123 static inline u32 buffer_offset(port_t *port, u16 desc, int transmit) in buffer_offset() argument
126 desc_abs_number(port, desc, transmit) * (u32)HDLC_MAX_MRU; in buffer_offset()
149 int transmit, i; in sca_init_port() local
159 for (transmit = 0; transmit < 2; transmit++) { in sca_init_port()
160 u16 dmac = transmit ? get_dmac_tx(port) : get_dmac_rx(port); in sca_init_port()
161 u16 buffs = transmit ? card->tx_ring_buffers in sca_init_port()
165 pkt_desc __iomem *desc = desc_address(port, i, transmit); in sca_init_port()
166 u16 chain_off = desc_offset(port, i + 1, transmit); in sca_init_port()
167 u32 buff_off = buffer_offset(port, i, transmit); in sca_init_port()
176 sca_out(0, transmit ? DSR_TX(phy_node(port)) : in sca_init_port()
179 sca_out(DCR_ABORT, transmit ? DCR_TX(phy_node(port)) : in sca_init_port()
184 sca_outw(desc_offset(port, 0, transmit), dmac + CDAL, card); in sca_init_port()
185 if (!transmit) in sca_init_port()
186 sca_outw(desc_offset(port, buffs - 1, transmit), in sca_init_port()
189 sca_outw(desc_offset(port, 0, transmit), dmac + EDAL, in sca_init_port()
193 sca_out(DCR_CLEAR_EOF, transmit ? DCR_TX(phy_node(port)) : in sca_init_port()
196 if (!transmit) { /* Receive */ in sca_init_port()
205 } else { /* Transmit */ in sca_init_port()
335 /* Transmit DMA interrupt service */