struct descriptor *d,
struct descriptor *last);
struct context {
- struct fw_ohci *ohci;
+ struct fw_ohci *ohci;
u32 regs;
-
+
struct descriptor *buffer;
dma_addr_t buffer_bus;
size_t buffer_size;
descriptor_callback_t callback;
- struct tasklet_struct tasklet;
+ struct tasklet_struct tasklet;
};
-
-
struct at_context {
struct fw_ohci *ohci;
return 0;
}
-
+
static void context_tasklet(unsigned long data)
{
struct context *ctx = (struct context *) data;
spin_unlock_irqrestore(&ohci->lock, flags);
return retval;
}
-
+
static int handle_ir_bufferfill_packet(struct context *context,
struct descriptor *d,
struct descriptor *last)
{
struct iso_context *ctx =
container_of(context, struct iso_context, context);
-
+
if (last->transfer_status == 0)
/* This descriptor isn't done yet, stop iteration. */
return 0;
list = ohci->it_context_list;
callback = handle_it_packet;
} else {
- mask = &ohci->ir_context_mask;
- list = ohci->ir_context_list;
+ mask = &ohci->ir_context_mask;
+ list = ohci->ir_context_list;
if (header_size > 0)
callback = handle_ir_dualbuffer_packet;
else
if (index < 0)
return ERR_PTR(-EBUSY);
- if (type == FW_ISO_CONTEXT_TRANSMIT)
- regs = OHCI1394_IsoXmitContextBase(index);
- else
- regs = OHCI1394_IsoRcvContextBase(index);
-
+ if (type == FW_ISO_CONTEXT_TRANSMIT)
+ regs = OHCI1394_IsoXmitContextBase(index);
+ else
+ regs = OHCI1394_IsoRcvContextBase(index);
+
ctx = &list[index];
memset(ctx, 0, sizeof *ctx);
ctx->header_length = 0;
static int ohci_start_iso(struct fw_iso_context *base, s32 cycle)
{
- struct iso_context *ctx = container_of(base, struct iso_context, base);
+ struct iso_context *ctx = container_of(base, struct iso_context, base);
struct fw_ohci *ohci = ctx->context.ohci;
u32 cycle_match = 0, mode;
int index;
static int ohci_stop_iso(struct fw_iso_context *base)
{
struct fw_ohci *ohci = fw_ohci(base->card);
- struct iso_context *ctx = container_of(base, struct iso_context, base);
+ struct iso_context *ctx = container_of(base, struct iso_context, base);
int index;
if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) {
static void ohci_free_iso_context(struct fw_iso_context *base)
{
struct fw_ohci *ohci = fw_ohci(base->card);
- struct iso_context *ctx = container_of(base, struct iso_context, base);
+ struct iso_context *ctx = container_of(base, struct iso_context, base);
unsigned long flags;
int index;
struct fw_iso_buffer *buffer,
unsigned long payload)
{
- struct iso_context *ctx = container_of(base, struct iso_context, base);
+ struct iso_context *ctx = container_of(base, struct iso_context, base);
struct descriptor *d, *last, *pd;
struct fw_iso_packet *p;
__le32 *header;
return 0;
}
-
+
static int
setup_wait_descriptor(struct context *ctx)
{
dma_addr_t d_bus, page_bus;
u32 z, header_z, length, rest;
int page, offset;
-
+
/* FIXME: Cycle lost behavior should be configurable: lose
* packet, retransmit or terminate.. */
db->first_req_count = cpu_to_le16(p->header_length);
db->first_res_count = db->first_req_count;
db->first_buffer = cpu_to_le32(d_bus + sizeof *db);
-
+
if (offset + rest < PAGE_SIZE)
length = rest;
else
dma_addr_t d_bus, page_bus;
u32 length, rest;
int page, offset;
-
+
page = payload >> PAGE_SHIFT;
offset = payload & ~PAGE_MASK;
rest = packet->payload_length;
d->control = cpu_to_le16(descriptor_input_more |
descriptor_status |
descriptor_branch_always);
-
+
if (offset + rest < PAGE_SIZE)
length = rest;
else