// SPDX-License-Identifier: GPL-2.0-or-later /* * Adaptec AAC series RAID controller driver * (c) Copyright 2001 Red Hat Inc. * * based on the old aacraid driver that is.. * Adaptec aacraid device driver for Linux. * * Copyright (c) 2000-2010 Adaptec, Inc. * 2010-2015 PMC-Sierra, Inc. ([email protected]) * 2016-2017 Microsemi Corp. ([email protected]) * * Module Name: * sa.c * * Abstract: Drawbridge specific support functions */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/types.h> #include <linux/pci.h> #include <linux/spinlock.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/completion.h> #include <linux/time.h> #include <linux/interrupt.h> #include <scsi/scsi_host.h> #include "aacraid.h" static irqreturn_t aac_sa_intr(int irq, void *dev_id) { … } /** * aac_sa_disable_interrupt - disable interrupt * @dev: Which adapter to enable. */ static void aac_sa_disable_interrupt (struct aac_dev *dev) { … } /** * aac_sa_enable_interrupt - enable interrupt * @dev: Which adapter to enable. */ static void aac_sa_enable_interrupt (struct aac_dev *dev) { … } /** * aac_sa_notify_adapter - handle adapter notification * @dev: Adapter that notification is for * @event: Event to notidy * * Notify the adapter of an event */ static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event) { … } /** * sa_sync_cmd - send a command and wait * @dev: Adapter * @command: Command to execute * @p1: first parameter * @p2: second parameter * @p3: third parameter * @p4: forth parameter * @p5: fifth parameter * @p6: sixth parameter * @ret: adapter status * @r1: first return value * @r2: second return value * @r3: third return value * @r4: forth return value * * This routine will send a synchronous command to the adapter and wait * for its completion. */ static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *ret, u32 *r1, u32 *r2, u32 *r3, u32 *r4) { … } /** * aac_sa_interrupt_adapter - interrupt an adapter * @dev: Which adapter to enable. * * Breakpoint an adapter. */ static void aac_sa_interrupt_adapter (struct aac_dev *dev) { … } /** * aac_sa_start_adapter - activate adapter * @dev: Adapter * * Start up processing on an ARM based AAC adapter */ static void aac_sa_start_adapter(struct aac_dev *dev) { … } static int aac_sa_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) { … } /** * aac_sa_check_health * @dev: device to check if healthy * * Will attempt to determine if the specified adapter is alive and * capable of handling requests, returning 0 if alive. */ static int aac_sa_check_health(struct aac_dev *dev) { … } /** * aac_sa_ioremap * @dev: device to ioremap * @size: mapping resize request * */ static int aac_sa_ioremap(struct aac_dev * dev, u32 size) { … } /** * aac_sa_init - initialize an ARM based AAC card * @dev: device to configure * * Allocate and set up resources for the ARM based AAC variants. The * device_interface in the commregion will be allocated and linked * to the comm region. */ int aac_sa_init(struct aac_dev *dev) { … }