diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /sound/firewire/lib.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'sound/firewire/lib.c')
-rw-r--r-- | sound/firewire/lib.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sound/firewire/lib.c b/sound/firewire/lib.c index 7409edb..14eb414 100644 --- a/sound/firewire/lib.c +++ b/sound/firewire/lib.c @@ -11,7 +11,7 @@ #include <linux/module.h> #include "lib.h" -#define ERROR_RETRY_DELAY_MS 20 +#define ERROR_RETRY_DELAY_MS 5 /** * snd_fw_transaction - send a request and wait for its completion @@ -20,9 +20,6 @@ * @offset: the address in the target's address space * @buffer: input/output data * @length: length of @buffer - * @flags: use %FW_FIXED_GENERATION and add the generation value to attempt the - * request only in that generation; use %FW_QUIET to suppress error - * messages * * Submits an asynchronous request to the target device, and waits for the * response. The node ID and the current generation are derived from @unit. @@ -30,18 +27,14 @@ * Returns zero on success, or a negative error code. */ int snd_fw_transaction(struct fw_unit *unit, int tcode, - u64 offset, void *buffer, size_t length, - unsigned int flags) + u64 offset, void *buffer, size_t length) { struct fw_device *device = fw_parent_device(unit); int generation, rcode, tries = 0; - generation = flags & FW_GENERATION_MASK; for (;;) { - if (!(flags & FW_FIXED_GENERATION)) { - generation = device->generation; - smp_rmb(); /* node_id vs. generation */ - } + generation = device->generation; + smp_rmb(); /* node_id vs. generation */ rcode = fw_run_transaction(device->card, tcode, device->node_id, generation, device->max_speed, offset, @@ -50,14 +43,9 @@ int snd_fw_transaction(struct fw_unit *unit, int tcode, if (rcode == RCODE_COMPLETE) return 0; - if (rcode == RCODE_GENERATION && (flags & FW_FIXED_GENERATION)) - return -EAGAIN; - if (rcode_is_permanent_error(rcode) || ++tries >= 3) { - if (!(flags & FW_QUIET)) - dev_err(&unit->device, - "transaction failed: %s\n", - fw_rcode_string(rcode)); + dev_err(&unit->device, "transaction failed: %s\n", + fw_rcode_string(rcode)); return -EIO; } |