Scubapro G2: add missed command packet logging

I did the packet logging for the received data side, but forgot to do
the same thing on the command transfer side, which makes the debug logs
a bit less useful.

Of course, it turns out that a bug in subsurface means that the logging
never gets enabled anyway even when you ask for it, so right now this
particular misfeature didn't matter.  I'm hoping Tomaz/Dirk can fix the
UI widget problem.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2017-06-15 07:01:51 +09:00
parent bae506397e
commit 323a606688

View File

@ -105,6 +105,8 @@ scubapro_g2_transfer(scubapro_g2_device_t *g2, const unsigned char command[], un
return DC_STATUS_INVALIDARGS;
}
HEXDUMP (g2->base.context, DC_LOGLEVEL_DEBUG, "cmd", command, csize);
buf[0] = csize;
memcpy(buf+1, command, csize);
status = dc_usbhid_write(g2->usbhid, buf, csize+1, &transferred);