diff options
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r-- | drivers/firewire/ohci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index cfe5afe359c6..3ae84e2c5192 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -125,6 +125,7 @@ struct context { | |||
125 | struct fw_ohci *ohci; | 125 | struct fw_ohci *ohci; |
126 | u32 regs; | 126 | u32 regs; |
127 | int total_allocation; | 127 | int total_allocation; |
128 | bool running; | ||
128 | bool flushing; | 129 | bool flushing; |
129 | 130 | ||
130 | /* | 131 | /* |
@@ -1174,6 +1175,7 @@ static void context_run(struct context *ctx, u32 extra) | |||
1174 | le32_to_cpu(ctx->last->branch_address)); | 1175 | le32_to_cpu(ctx->last->branch_address)); |
1175 | reg_write(ohci, CONTROL_CLEAR(ctx->regs), ~0); | 1176 | reg_write(ohci, CONTROL_CLEAR(ctx->regs), ~0); |
1176 | reg_write(ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN | extra); | 1177 | reg_write(ohci, CONTROL_SET(ctx->regs), CONTEXT_RUN | extra); |
1178 | ctx->running = true; | ||
1177 | flush_writes(ohci); | 1179 | flush_writes(ohci); |
1178 | } | 1180 | } |
1179 | 1181 | ||
@@ -1202,6 +1204,7 @@ static void context_stop(struct context *ctx) | |||
1202 | 1204 | ||
1203 | ctx->active = false; | 1205 | ctx->active = false; |
1204 | reg_write(ctx->ohci, CONTROL_CLEAR(ctx->regs), CONTEXT_RUN); | 1206 | reg_write(ctx->ohci, CONTROL_CLEAR(ctx->regs), CONTEXT_RUN); |
1207 | ctx->running = false; | ||
1205 | flush_writes(ctx->ohci); | 1208 | flush_writes(ctx->ohci); |
1206 | 1209 | ||
1207 | for (i = 0; i < 10; i++) { | 1210 | for (i = 0; i < 10; i++) { |
@@ -1232,7 +1235,6 @@ static int at_context_queue_packet(struct context *ctx, | |||
1232 | struct descriptor *d, *last; | 1235 | struct descriptor *d, *last; |
1233 | __le32 *header; | 1236 | __le32 *header; |
1234 | int z, tcode; | 1237 | int z, tcode; |
1235 | u32 reg; | ||
1236 | 1238 | ||
1237 | d = context_get_descriptors(ctx, 4, &d_bus); | 1239 | d = context_get_descriptors(ctx, 4, &d_bus); |
1238 | if (d == NULL) { | 1240 | if (d == NULL) { |
@@ -1351,9 +1353,7 @@ static int at_context_queue_packet(struct context *ctx, | |||
1351 | 1353 | ||
1352 | context_append(ctx, d, z, 4 - z); | 1354 | context_append(ctx, d, z, 4 - z); |
1353 | 1355 | ||
1354 | /* If the context isn't already running, start it up. */ | 1356 | if (!ctx->running) |
1355 | reg = reg_read(ctx->ohci, CONTROL_SET(ctx->regs)); | ||
1356 | if ((reg & CONTEXT_RUN) == 0) | ||
1357 | context_run(ctx, 0); | 1357 | context_run(ctx, 0); |
1358 | 1358 | ||
1359 | return 0; | 1359 | return 0; |