Lichun Zhu
|
RE: i.mx6 network driver with InterruptLock() ???
|
Lichun Zhu
03/10/2014 9:40 AM
post109302
|
RE: i.mx6 network driver with InterruptLock() ???
I would agree, this is too heavy with InterruptLock, and the lock is too long, with some kernel calls(for example the
log() will have kernel calls) when holding the lock.
-----Original Message-----
From: Michael Tasche [mailto:community-noreply@qnx.com]
Sent: Monday, March 10, 2014 7:24 AM
To: drivers-networking
Subject: i.mx6 network driver with InterruptLock() ???
Hi,
I was looking at the latest changes, to merge any bugfixes to our BSP-Tree.
Can somebody remove this buggy Interrupt spinlocks, please?
Regards
Michwel
//
// all three hardware interrupt sources are handled here // int mx6q_process_interrupt(void *arg, struct nw_work_thread
*wtp) {
mx6q_dev_t *mx6q = arg;
uint32_t *base = mx6q->reg;
uint32_t ievent;
InterruptLock(&mx6q->spinner);
for (;;) {
// read interrupt cause bits
ievent = *(base + MX6Q_IEVENT);
if (mx6q->cfg.verbose > 6) {
log(LOG_ERR, "%s(): ievent 0x%X\n", __FUNCTION__, ievent);
}
if (!ievent) {
break;
}
*(base + MX6Q_IEVENT) = ievent;
if ((ievent & (IEVENT_RFINT | IEVENT_RXB)) != 0) {
mx6q_receive(mx6q, wtp);
}
if ((ievent & IEVENT_TS_AVAIL) != 0) {
mx6q_transmit_complete(mx6q);
}
if ((ievent & IEVENT_TS_TIMER) != 0) {
mx6q->rtc++;
}
}
InterruptUnlock(&mx6q->spinner);
return 1;
}
_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post109296
To cancel your subscription to this discussion, please e-mail drivers-networking-unsubscribe@community.qnx.com
|
|
|