diff options
Diffstat (limited to 'drivers/firewire/sbp2.c')
-rw-r--r-- | drivers/firewire/sbp2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index e5df822a8130..50f0176de615 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
@@ -354,8 +354,7 @@ static const struct { | |||
354 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { | 354 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { |
355 | .firmware_revision = 0x002800, | 355 | .firmware_revision = 0x002800, |
356 | .model = 0x000000, | 356 | .model = 0x000000, |
357 | .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY | | 357 | .workarounds = SBP2_WORKAROUND_POWER_CONDITION, |
358 | SBP2_WORKAROUND_POWER_CONDITION, | ||
359 | }, | 358 | }, |
360 | /* Initio bridges, actually only needed for some older ones */ { | 359 | /* Initio bridges, actually only needed for some older ones */ { |
361 | .firmware_revision = 0x000200, | 360 | .firmware_revision = 0x000200, |
@@ -425,19 +424,20 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, | |||
425 | struct sbp2_logical_unit *lu = callback_data; | 424 | struct sbp2_logical_unit *lu = callback_data; |
426 | struct sbp2_orb *orb; | 425 | struct sbp2_orb *orb; |
427 | struct sbp2_status status; | 426 | struct sbp2_status status; |
428 | size_t header_size; | ||
429 | unsigned long flags; | 427 | unsigned long flags; |
430 | 428 | ||
431 | if (tcode != TCODE_WRITE_BLOCK_REQUEST || | 429 | if (tcode != TCODE_WRITE_BLOCK_REQUEST || |
432 | length == 0 || length > sizeof(status)) { | 430 | length < 8 || length > sizeof(status)) { |
433 | fw_send_response(card, request, RCODE_TYPE_ERROR); | 431 | fw_send_response(card, request, RCODE_TYPE_ERROR); |
434 | return; | 432 | return; |
435 | } | 433 | } |
436 | 434 | ||
437 | header_size = min(length, 2 * sizeof(u32)); | 435 | status.status = be32_to_cpup(payload); |
438 | fw_memcpy_from_be32(&status, payload, header_size); | 436 | status.orb_low = be32_to_cpup(payload + 4); |
439 | if (length > header_size) | 437 | memset(status.data, 0, sizeof(status.data)); |
440 | memcpy(status.data, payload + 8, length - header_size); | 438 | if (length > 8) |
439 | memcpy(status.data, payload + 8, length - 8); | ||
440 | |||
441 | if (STATUS_GET_SOURCE(status) == 2 || STATUS_GET_SOURCE(status) == 3) { | 441 | if (STATUS_GET_SOURCE(status) == 2 || STATUS_GET_SOURCE(status) == 3) { |
442 | fw_notify("non-orb related status write, not handled\n"); | 442 | fw_notify("non-orb related status write, not handled\n"); |
443 | fw_send_response(card, request, RCODE_COMPLETE); | 443 | fw_send_response(card, request, RCODE_COMPLETE); |