@@ -101,11 +101,10 @@ static void adb_iop_listen(struct iop_msg *msg)
101101
102102 req = current_req ;
103103
104- /* Handle a timeout. Timeout packets seem to occur even after */
105- /* we've gotten a valid reply to a TALK, so I'm assuming that */
106- /* a "timeout" is actually more like an "end-of-data" signal. */
107- /* We need to send back a timeout packet to the IOP to shut */
108- /* it up, plus complete the current request, if any. */
104+ /* Handle a timeout. Timeout packets seem to occur even after
105+ * we've gotten a valid reply to a TALK, presumably because of
106+ * autopolling.
107+ */
109108
110109 if (amsg -> flags & ADB_IOP_TIMEOUT ) {
111110 msg -> reply [0 ] = ADB_IOP_TIMEOUT | ADB_IOP_AUTOPOLL ;
@@ -115,9 +114,6 @@ static void adb_iop_listen(struct iop_msg *msg)
115114 adb_iop_end_req (req , idle );
116115 }
117116 } else {
118- /* TODO: is it possible for more than one chunk of data */
119- /* to arrive before the timeout? If so we need to */
120- /* use reply_ptr here like the other drivers do. */
121117 if ((adb_iop_state == awaiting_reply ) &&
122118 (amsg -> flags & ADB_IOP_EXPLICIT )) {
123119 req -> reply_len = amsg -> count + 1 ;
@@ -152,23 +148,24 @@ static void adb_iop_start(void)
152148
153149 local_irq_save (flags );
154150
155- /* The IOP takes MacII-style packets, so */
156- /* strip the initial ADB_PACKET byte. */
157-
151+ /* The IOP takes MacII-style packets, so strip the initial
152+ * ADB_PACKET byte.
153+ */
158154 amsg .flags = ADB_IOP_EXPLICIT ;
159155 amsg .count = req -> nbytes - 2 ;
160156
161- /* amsg.data immediately follows amsg.cmd, effectively making */
162- /* amsg.cmd a pointer to the beginning of a full ADB packet. */
157+ /* amsg.data immediately follows amsg.cmd, effectively making
158+ * &amsg.cmd a pointer to the beginning of a full ADB packet.
159+ */
163160 memcpy (& amsg .cmd , req -> data + 1 , req -> nbytes - 1 );
164161
165162 req -> sent = 1 ;
166163 adb_iop_state = sending ;
167164 local_irq_restore (flags );
168165
169- /* Now send it. The IOP manager will call adb_iop_complete */
170- / * when the packet has been sent. */
171-
166+ /* Now send it. The IOP manager will call adb_iop_complete
167+ * when the message has been sent.
168+ */
172169 iop_send_message (ADB_IOP , ADB_CHAN , req , sizeof (amsg ), (__u8 * )& amsg ,
173170 adb_iop_complete );
174171}
0 commit comments