[rt2x00-users] [RFC 1/6] rt2x00: Introduce 3 queue commands in drivers (start, kick, stop).
Ivo Van Doorn
ivdoorn at gmail.com
Tue Nov 23 09:10:00 UTC 2010
Hi,
>> >> +static void rt2800pci_stop_queue(struct data_queue *queue)
>> >> +{
>> >> + struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
>> >> + u32 reg;
>> >> +
>> >> + switch (queue->qid) {
>> >> + case QID_AC_BE:
>> >> + rt2800_register_read(rt2x00dev, WPDMA_RST_IDX, ®);
>> >> + rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, 1);
>> >> + rt2800_register_write(rt2x00dev, WPDMA_RST_IDX, reg);
>> >
>> > The function is called stop_queue but this will reset the tx queue index
>> > within the device. and thus drop all tx entries still in there. Is that
>> > what stop_queue is expected to do?
>> >
>> > If the tx queue flush before stop_queue fails we would have to clear all
>> > entries that are still in the queue and also reset our own tx queue index?
>> > Otherwise there might be a queue corruption after an ifdown/ifup cycle.
>> >
>> > I guess the same applies to the other pci drivers as well.
>>
>> Well no, the other PCI drivers have a "KICK_TX" register which can be
>> 1 or 0. Which simply means "start transmitting" and "stop transmitting".
>
>> What would be the best way for rt2800pci to stop transmitting then?
>
> I have no idea ;) but as long as we don't DMA skbs to the device it won't
> transmit, so maybe we should just make it a NOP for tx queues?
Sounds good to me. :)
Ivo
More information about the users
mailing list