linux/drivers/misc/hpilo.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for the HP iLO management processor.
 *
 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
 *	David Altobelli <[email protected]>
 */
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/file.h>
#include <linux/cdev.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/wait.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include "hpilo.h"

static const struct class ilo_class =;
static unsigned int ilo_major;
static unsigned int max_ccb =;
static char ilo_hwdev[MAX_ILO_DEV];
static const struct pci_device_id ilo_blacklist[] =;

static inline int get_entry_id(int entry)
{}

static inline int get_entry_len(int entry)
{}

static inline int mk_entry(int id, int len)
{}

static inline int desc_mem_sz(int nr_entry)
{}

/*
 * FIFO queues, shared with hardware.
 *
 * If a queue has empty slots, an entry is added to the queue tail,
 * and that entry is marked as occupied.
 * Entries can be dequeued from the head of the list, when the device
 * has marked the entry as consumed.
 *
 * Returns true on successful queue/dequeue, false on failure.
 */
static int fifo_enqueue(struct ilo_hwinfo *hw, char *fifobar, int entry)
{}

static int fifo_dequeue(struct ilo_hwinfo *hw, char *fifobar, int *entry)
{}

static int fifo_check_recv(struct ilo_hwinfo *hw, char *fifobar)
{}

static int ilo_pkt_enqueue(struct ilo_hwinfo *hw, struct ccb *ccb,
			   int dir, int id, int len)
{}

static int ilo_pkt_dequeue(struct ilo_hwinfo *hw, struct ccb *ccb,
			   int dir, int *id, int *len, void **pkt)
{}

static int ilo_pkt_recv(struct ilo_hwinfo *hw, struct ccb *ccb)
{}

static inline void doorbell_set(struct ccb *ccb)
{}

static inline void doorbell_clr(struct ccb *ccb)
{}

static inline int ctrl_set(int l2sz, int idxmask, int desclim)
{}

static void ctrl_setup(struct ccb *ccb, int nr_desc, int l2desc_sz)
{}

static inline int fifo_sz(int nr_entry)
{}

static void fifo_setup(void *base_addr, int nr_entry)
{}

static void ilo_ccb_close(struct pci_dev *pdev, struct ccb_data *data)
{}

static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
{}

static void ilo_ccb_open(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
{}

static int ilo_ccb_verify(struct ilo_hwinfo *hw, struct ccb_data *data)
{}

static inline int is_channel_reset(struct ccb *ccb)
{}

static inline void set_channel_reset(struct ccb *ccb)
{}

static inline int get_device_outbound(struct ilo_hwinfo *hw)
{}

static inline int is_db_reset(int db_out)
{}

static inline void clear_pending_db(struct ilo_hwinfo *hw, int clr)
{}

static inline void clear_device(struct ilo_hwinfo *hw)
{}

static inline void ilo_enable_interrupts(struct ilo_hwinfo *hw)
{}

static inline void ilo_disable_interrupts(struct ilo_hwinfo *hw)
{}

static void ilo_set_reset(struct ilo_hwinfo *hw)
{}

static ssize_t ilo_read(struct file *fp, char __user *buf,
			size_t len, loff_t *off)
{}

static ssize_t ilo_write(struct file *fp, const char __user *buf,
			 size_t len, loff_t *off)
{}

static __poll_t ilo_poll(struct file *fp, poll_table *wait)
{}

static int ilo_close(struct inode *ip, struct file *fp)
{}

static int ilo_open(struct inode *ip, struct file *fp)
{}

static const struct file_operations ilo_fops =;

static irqreturn_t ilo_isr(int irq, void *data)
{}

static void ilo_unmap_device(struct pci_dev *pdev, struct ilo_hwinfo *hw)
{}

static int ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw)
{}

static void ilo_remove(struct pci_dev *pdev)
{}

static int ilo_probe(struct pci_dev *pdev,
			       const struct pci_device_id *ent)
{}

static const struct pci_device_id ilo_devices[] =;
MODULE_DEVICE_TABLE(pci, ilo_devices);

static struct pci_driver ilo_driver =;

static int __init ilo_init(void)
{}

static void __exit ilo_exit(void)
{}

MODULE_VERSION();
MODULE_ALIAS();
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();

module_param(max_ccb, uint, 0444);
MODULE_PARM_DESC();

module_init();
module_exit(ilo_exit);