#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/dmaengine.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/workqueue.h>
#include <linux/prefetch.h>
#include <linux/sizes.h>
#include "dma.h"
#include "registers.h"
#include "hw.h"
#include "../dmaengine.h"
static int completion_timeout = …;
module_param(completion_timeout, int, 0644);
MODULE_PARM_DESC(…) …;
static int idle_timeout = …;
module_param(idle_timeout, int, 0644);
MODULE_PARM_DESC(…) …;
#define IDLE_TIMEOUT …
#define COMPLETION_TIMEOUT …
static char *chanerr_str[] = …;
static void ioat_eh(struct ioatdma_chan *ioat_chan);
static void ioat_print_chanerrs(struct ioatdma_chan *ioat_chan, u32 chanerr)
{ … }
irqreturn_t ioat_dma_do_interrupt(int irq, void *data)
{ … }
irqreturn_t ioat_dma_do_interrupt_msix(int irq, void *data)
{ … }
void ioat_stop(struct ioatdma_chan *ioat_chan)
{ … }
static void __ioat_issue_pending(struct ioatdma_chan *ioat_chan)
{ … }
void ioat_issue_pending(struct dma_chan *c)
{ … }
static void ioat_update_pending(struct ioatdma_chan *ioat_chan)
{ … }
static void __ioat_start_null_desc(struct ioatdma_chan *ioat_chan)
{ … }
void ioat_start_null_desc(struct ioatdma_chan *ioat_chan)
{ … }
static void __ioat_restart_chan(struct ioatdma_chan *ioat_chan)
{ … }
static int ioat_quiesce(struct ioatdma_chan *ioat_chan, unsigned long tmo)
{ … }
static int ioat_reset_sync(struct ioatdma_chan *ioat_chan, unsigned long tmo)
{ … }
static dma_cookie_t ioat_tx_submit_unlock(struct dma_async_tx_descriptor *tx)
__releases(&ioat_chan->prep_lock)
{ … }
static struct ioat_ring_ent *
ioat_alloc_ring_ent(struct dma_chan *chan, int idx, gfp_t flags)
{ … }
void ioat_free_ring_ent(struct ioat_ring_ent *desc, struct dma_chan *chan)
{ … }
struct ioat_ring_ent **
ioat_alloc_ring(struct dma_chan *c, int order, gfp_t flags)
{ … }
int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs)
__acquires(&ioat_chan->prep_lock)
{ … }
static bool desc_has_ext(struct ioat_ring_ent *desc)
{ … }
static void
ioat_free_sed(struct ioatdma_device *ioat_dma, struct ioat_sed_ent *sed)
{ … }
static u64 ioat_get_current_completion(struct ioatdma_chan *ioat_chan)
{ … }
static bool ioat_cleanup_preamble(struct ioatdma_chan *ioat_chan,
u64 *phys_complete)
{ … }
static void
desc_get_errstat(struct ioatdma_chan *ioat_chan, struct ioat_ring_ent *desc)
{ … }
static void __ioat_cleanup(struct ioatdma_chan *ioat_chan, dma_addr_t phys_complete)
{ … }
static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
{ … }
void ioat_cleanup_event(struct tasklet_struct *t)
{ … }
static void ioat_restart_channel(struct ioatdma_chan *ioat_chan)
{ … }
static void ioat_abort_descs(struct ioatdma_chan *ioat_chan)
{ … }
static void ioat_eh(struct ioatdma_chan *ioat_chan)
{ … }
static void check_active(struct ioatdma_chan *ioat_chan)
{ … }
static void ioat_reboot_chan(struct ioatdma_chan *ioat_chan)
{ … }
void ioat_timer_event(struct timer_list *t)
{ … }
enum dma_status
ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie,
struct dma_tx_state *txstate)
{ … }
int ioat_reset_hw(struct ioatdma_chan *ioat_chan)
{ … }