Haavard Skinnemoen <haavard.skinnemoen@atmel.com> wrote:Actually, I think the real bug happens right here: Writing RNCR to 0 will clear any pending ENDRX interrupt, so if the transfer is completed before this, we won't see any interrupt. These writes are also completely pointless -- RNCR is zeroed automatically after it gets shifted into RCR. TNCR works the same way. The RXBUFF interrupt is only cleared by writing a nonzero RCR or RNCR, so your patch should fix it. But I'm wondering if there may be another race left to fix: If we queue two transfers, and both of them complete before we handle the interrupt, I think we only consider one of them to be complete. If RXBUFF is set, we should complete any "next" transfer we have queued up as well. It could be your patch fixes this last case too -- when this happens, RXBUFF stays set when we return from the interrupt handler, so the interrupt gets retriggered immediately. We could handle this more efficiently, but I think it's handled correctly with your patch applied. I'll see if I can find a way to clean up the somewhat headache-inducing control flow in this driver, but until then, your patch should definitely improve things. As for the overruns, I'm beginning to suspect that the only way to get rid of those and still maintain a reasonable transfer rate is to use bounce buffers in faster RAM (e.g. on-chip SRAM). Haavard --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Adrian Bunk | Re: LSM conversion to static interface |
git: | |
| Gerrit Renker | [PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set... |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Linus Torvalds | Re: [GIT]: Networking |
