}
/* Consult hardware, move any newly completed transactions to completed list */
-struct gsi_trans *gsi_channel_update(struct gsi_channel *channel)
+void gsi_channel_update(struct gsi_channel *channel)
{
u32 evt_ring_id = channel->evt_ring_id;
struct gsi *gsi = channel->gsi;
offset = GSI_EV_CH_E_CNTXT_4_OFFSET(evt_ring_id);
index = gsi_ring_index(ring, ioread32(gsi->virt + offset));
if (index == ring->index % ring->count)
- return NULL;
+ return;
/* Get the transaction for the latest completed event. */
trans = gsi_event_trans(gsi, gsi_ring_virt(ring, index - 1));
if (!trans)
- return NULL;
+ return;
/* For RX channels, update each completed transaction with the number
* of bytes that were actually received. For TX channels, report
* up the network stack.
*/
gsi_evt_ring_update(gsi, evt_ring_id, index);
-
- return gsi_channel_trans_complete(channel);
}
/**
void gsi_channel_doorbell(struct gsi_channel *channel);
/* gsi_channel_update() - Update knowledge of channel hardware state
- * @channel: Channel whose doorbell should be rung
+ * @channel: Channel to be updated
*
* Consult hardware, move any newly completed transactions to a
- * channel's completed list
+ * channel's completed list.
*/
-struct gsi_trans *gsi_channel_update(struct gsi_channel *channel);
+void gsi_channel_update(struct gsi_channel *channel);
/**
* gsi_ring_virt() - Return virtual address for a ring entry
struct gsi_trans_info *trans_info = &channel->trans_info;
u16 trans_id = trans_info->completed_id;
- if (trans_id == trans_info->pending_id)
- return gsi_channel_update(channel);
+ if (trans_id == trans_info->pending_id) {
+ gsi_channel_update(channel);
+ if (trans_id == trans_info->pending_id)
+ return NULL;
+ }
return &trans_info->trans[trans_id %= channel->tre_count];
}