firewire: don't respond to broadcast write requests

Contrary to a comment in the source, request->ack of a broadcast write
request can be ACK_PENDING. Hence the existing check is insufficient.

Debug dmesg before:
AR spd 0 tl 00, ffc0 -> ffff, ack_pending , QW req, fffff0000234 = ffffffff
AT spd 0 tl 00, ffff -> ffc0, ack_complete, W resp
And the requesting node (linux1394) reports an unsolicited response.

Debug dmesg after:
AR spd 0 tl 00, ffc0 -> ffff, ack_pending , QW req, fffff0000234 = ffffffff

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+6 -6
+6 -6
drivers/firewire/fw-transaction.c
··· 55 55 #define HEADER_GET_DATA_LENGTH(q) (((q) >> 16) & 0xffff) 56 56 #define HEADER_GET_EXTENDED_TCODE(q) (((q) >> 0) & 0xffff) 57 57 58 + #define HEADER_DESTINATION_IS_BROADCAST(q) \ 59 + (((q) & HEADER_DESTINATION(0x3f)) == HEADER_DESTINATION(0x3f)) 60 + 58 61 #define PHY_CONFIG_GAP_COUNT(gap_count) (((gap_count) << 16) | (1 << 22)) 59 62 #define PHY_CONFIG_ROOT_ID(node_id) ((((node_id) & 0x3f) << 24) | (1 << 23)) 60 63 #define PHY_IDENTIFIER(id) ((id) << 30) ··· 627 624 void 628 625 fw_send_response(struct fw_card *card, struct fw_request *request, int rcode) 629 626 { 630 - /* 631 - * Broadcast packets are reported as ACK_COMPLETE, so this 632 - * check is sufficient to ensure we don't send response to 633 - * broadcast packets or posted writes. 634 - */ 635 - if (request->ack != ACK_PENDING) { 627 + /* unified transaction or broadcast transaction: don't respond */ 628 + if (request->ack != ACK_PENDING || 629 + HEADER_DESTINATION_IS_BROADCAST(request->request_header[0])) { 636 630 kfree(request); 637 631 return; 638 632 }