74 #define D_SUBMODULE tx
93 int usb_pipe, sent_size, do_autopm;
96 d_fnstart(4, dev,
"(i2400mu %p)\n", i2400mu);
99 usb_autopm_get_interface(i2400mu->
usb_iface) : 0;
101 dev_err(dev,
"TX: can't get autopm: %d\n", result);
108 tx_msg, tx_msg_size, &sent_size, 200);
109 usb_mark_last_busy(i2400mu->
usb_dev);
112 if (sent_size != tx_msg_size) {
113 dev_err(dev,
"TX: short write (%d B vs %zu "
114 "expected)\n", sent_size, tx_msg_size);
131 dev_err(dev,
"BM-CMD: too many stalls in "
132 "URB; resetting device\n");
150 dev_err(dev,
"TX: maximum errors in URB "
151 "exceeded; resetting device\n");
154 dev_err(dev,
"TX: cannot send URB; retrying. "
155 "tx_msg @%zu %zu B [%d sent]: %d\n",
156 (
void *) tx_msg - i2400m->
tx_buf,
157 tx_msg_size, sent_size, result);
162 usb_autopm_put_interface(i2400mu->
usb_iface);
163 d_fnend(4, dev,
"(i2400mu %p) = result\n", i2400mu);
178 int i2400mu_txd(
void *_i2400mu)
187 d_fnstart(4, dev,
"(i2400mu %p)\n", i2400mu);
192 spin_unlock_irqrestore(&i2400m->
tx_lock, flags);
195 d_printf(2, dev,
"TX: waiting for messages\n");
205 d_printf(2, dev,
"TX: submitting %zu bytes\n", tx_msg_size);
206 d_dump(5, dev, tx_msg, tx_msg_size);
208 i2400mu_tx(i2400mu, tx_msg, tx_msg_size);
214 spin_unlock_irqrestore(&i2400m->
tx_lock, flags);
216 d_fnend(4, dev,
"(i2400mu %p)\n", i2400mu);
231 struct i2400mu *i2400mu =
container_of(i2400m,
struct i2400mu, i2400m);
234 d_fnstart(3, dev,
"(i2400m %p) = void\n", i2400m);
236 d_fnend(3, dev,
"(i2400m %p) = void\n", i2400m);
243 struct i2400m *i2400m = &i2400mu->
i2400m;
248 kthread =
kthread_run(i2400mu_txd, i2400mu,
"%s-tx",
251 if (IS_ERR(kthread)) {
252 result = PTR_ERR(kthread);
253 dev_err(dev,
"TX: cannot start thread: %d\n", result);
261 struct i2400m *i2400m = &i2400mu->
i2400m;
262 struct device *dev = i2400m_dev(i2400m);
268 spin_unlock_irqrestore(&i2400m->
tx_lock, flags);
272 d_printf(1, dev,
"TX: kthread had already exited\n");