Thread (15 messages) flat view 15 messages, 3 authors, 2017-02-08

Re: [PATCH v2 net-next 6/9] sunvnet: straighten up message event handling logic

From: Sowmini Varadhan <hidden>
Date: 2017-02-08 16:00:51
Also in: lkml, sparclinux

On (02/07/17 14:12), Shannon Nelson wrote:
+
+	/* we don't expect any other bits */
+	BUG_ON(port->rx_event & ~(LDC_EVENT_DATA_READY |
+				  LDC_EVENT_RESET |
+				  LDC_EVENT_UP));
+
+	/* RESET takes precedent over any other event */
+	if (port->rx_event & LDC_EVENT_RESET) { 
                  :
 		port->rx_event = 0;
 		return 0;
 	}
+	if (port->rx_event & LDC_EVENT_UP) {
+		vio_link_state_change(vio, LDC_EVENT_UP);
+		port->rx_event = 0;
+		return 0;
+	}
 
 	err = 0;
 	tx_wakeup = 0;
IIRC there were timing-related situations where you can get woken up with
both UP and DATA_READY, and if my reading of your patch is 
correct, we would ignore the DATA_READY, and return, right?

--Sowmini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help