bool transaction_running;
        struct fw_transaction transaction;
        unsigned int transaction_bytes;
+       bool error;
        struct fw_device *fw_dev;
 };
 
 {
        struct fw_scs1x *scs = callback_data;
 
-       if (rcode != RCODE_GENERATION)
-               scs->transaction_bytes = 0;
+       if (!rcode_is_permanent_error(rcode)) {
+               /* Don't retry for this data. */
+               if (rcode == RCODE_COMPLETE)
+                       scs->transaction_bytes = 0;
+       } else {
+               scs->error = true;
+       }
 
        scs->transaction_running = false;
        schedule_work(&scs->work);
                return;
 
        stream = ACCESS_ONCE(scs->output);
-       if (!stream) {
+       if (!stream || scs->error) {
                scs->output_idle = true;
                wake_up(&scs->idle_wait);
                return;
                scs->output_escaped = false;
                scs->output_idle = false;
                scs->transaction_bytes = 0;
+               scs->error = false;
 
                ACCESS_ONCE(scs->output) = stream;
                schedule_work(&scs->work);