linux/drivers/firewire/nosy.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * nosy - Snoop mode driver for TI PCILynx 1394 controllers
 * Copyright (C) 2002-2007 Kristian Høgsberg
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/poll.h>
#include <linux/sched.h> /* required for linux/wait.h */
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/time64.h>
#include <linux/timex.h>
#include <linux/uaccess.h>
#include <linux/wait.h>
#include <linux/dma-mapping.h>
#include <linux/atomic.h>
#include <asm/byteorder.h>

#include "nosy.h"
#include "nosy-user.h"

#define TCODE_PHY_PACKET
#define PCI_DEVICE_ID_TI_PCILYNX

static char driver_name[] =;

/* this is the physical layout of a PCL, its size is 128 bytes */
struct pcl {};

struct packet {};

struct packet_buffer {};

struct pcilynx {};

static inline struct pcilynx *
lynx_get(struct pcilynx *lynx)
{}

static void
lynx_release(struct kref *kref)
{}

static inline void
lynx_put(struct pcilynx *lynx)
{}

struct client {};

static DEFINE_MUTEX(card_mutex);
static LIST_HEAD(card_list);

static int
packet_buffer_init(struct packet_buffer *buffer, size_t capacity)
{}

static void
packet_buffer_destroy(struct packet_buffer *buffer)
{}

static int
packet_buffer_get(struct client *client, char __user *data, size_t user_length)
{}

static void
packet_buffer_put(struct packet_buffer *buffer, void *data, size_t length)
{}

static inline void
reg_write(struct pcilynx *lynx, int offset, u32 data)
{}

static inline u32
reg_read(struct pcilynx *lynx, int offset)
{}

static inline void
reg_set_bits(struct pcilynx *lynx, int offset, u32 mask)
{}

/*
 * Maybe the pcl programs could be set up to just append data instead
 * of using a whole packet.
 */
static inline void
run_pcl(struct pcilynx *lynx, dma_addr_t pcl_bus,
			   int dmachan)
{}

static int
set_phy_reg(struct pcilynx *lynx, int addr, int val)
{}

static int
nosy_open(struct inode *inode, struct file *file)
{}

static int
nosy_release(struct inode *inode, struct file *file)
{}

static __poll_t
nosy_poll(struct file *file, poll_table *pt)
{}

static ssize_t
nosy_read(struct file *file, char __user *buffer, size_t count, loff_t *offset)
{}

static long
nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{}

static const struct file_operations nosy_ops =;

#define PHY_PACKET_SIZE

static void
packet_irq_handler(struct pcilynx *lynx)
{}

static void
bus_reset_irq_handler(struct pcilynx *lynx)
{}

static irqreturn_t
irq_handler(int irq, void *device)
{}

static void
remove_card(struct pci_dev *dev)
{}

#define RCV_BUFFER_SIZE

static int
add_card(struct pci_dev *dev, const struct pci_device_id *unused)
{}

static struct pci_device_id pci_table[] =;

MODULE_DEVICE_TABLE(pci, pci_table);

static struct pci_driver lynx_pci_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();