summaryrefslogtreecommitdiffstats
path: root/src/fw.h
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2010-09-05 01:32:16 +0200
committerGravatar Stefan Richter 2010-09-07 11:48:18 +0200
commit7416da61128cfc880ba2c4cf38cb4e2e22904e74 (patch)
tree98206c3225944ca5439b7ae4e42955ffea71d88d /src/fw.h
parentImplement raw1394_(start_)phy_packet_write() on firewire-core (diff)
Be more careful when copying response payloads on firewire-core
When faced with bogus config ROM read responses from an audio device that did not support block requests as advertized, libffado's csr1212 code was able to recover when running on top of raw1394 but corrupted its config ROM cache when running on top of firewire-core. http://subversion.ffado.org/ticket/299 While the actual cause was a combination of firmware bug of the device and flaw in csr1212.c of libffado, the much less graceful behavior when running on firewire-core was obviously due to libraw1394's firewire-core backend. Hence, - do not write into the client's buffer if rcode != RCODE_COMPLETE, - do not copy more data than the actual response contained. The latter safeguard is not overly effective though. The libraw1394 API has no means to inform a client about the error case that a responder node sent less bytes than were requested. (The case that the responder sent more bytes than requested is covered up by the kernel already.) Should we synthesize an I/O failure? Does not sound ideal either. However, such a size mismatch should never happen; the important part of this change is the RCODE_COMPLETE check. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to '')
-rw-r--r--src/fw.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/fw.h b/src/fw.h
index bc374d5..b17d857 100644
--- a/src/fw.h
+++ b/src/fw.h
@@ -69,7 +69,6 @@ struct device {
struct request_closure {
void *data;
- size_t length;
unsigned long tag;
};