/* * This file is part of the Chelsio FCoE driver for Linux. * * Copyright (c) 2008-2012 Chelsio Communications, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <linux/kernel.h> #include <linux/pci.h> #include <linux/interrupt.h> #include <linux/cpumask.h> #include <linux/string.h> #include "csio_init.h" #include "csio_hw.h" static irqreturn_t csio_nondata_isr(int irq, void *dev_id) { … } /* * csio_fwevt_handler - Common FW event handler routine. * @hw: HW module. * * This is the ISR for FW events. It is shared b/w MSIX * and INTx handlers. */ static void csio_fwevt_handler(struct csio_hw *hw) { … } /* csio_fwevt_handler */ /* * csio_fwevt_isr() - FW events MSIX ISR * @irq: * @dev_id: * * Process WRs on the FW event queue. * */ static irqreturn_t csio_fwevt_isr(int irq, void *dev_id) { … } /* * csio_fwevt_isr() - INTx wrapper for handling FW events. * @irq: * @dev_id: */ void csio_fwevt_intx_handler(struct csio_hw *hw, void *wr, uint32_t len, struct csio_fl_dma_buf *flb, void *priv) { … } /* csio_fwevt_intx_handler */ /* * csio_process_scsi_cmpl - Process a SCSI WR completion. * @hw: HW module. * @wr: The completed WR from the ingress queue. * @len: Length of the WR. * @flb: Freelist buffer array. * */ static void csio_process_scsi_cmpl(struct csio_hw *hw, void *wr, uint32_t len, struct csio_fl_dma_buf *flb, void *cbfn_q) { … } /* * csio_scsi_isr_handler() - Common SCSI ISR handler. * @iq: Ingress queue pointer. * * Processes SCSI completions on the SCSI IQ indicated by scm->iq_idx * by calling csio_wr_process_iq_idx. If there are completions on the * isr_cbfn_q, yank them out into a local queue and call their io_cbfns. * Once done, add these completions onto the freelist. * This routine is shared b/w MSIX and INTx. */ static inline irqreturn_t csio_scsi_isr_handler(struct csio_q *iq) { … } /* * csio_scsi_isr() - SCSI MSIX handler * @irq: * @dev_id: * * This is the top level SCSI MSIX handler. Calls csio_scsi_isr_handler() * for handling SCSI completions. */ static irqreturn_t csio_scsi_isr(int irq, void *dev_id) { … } /* * csio_scsi_intx_handler() - SCSI INTx handler * @irq: * @dev_id: * * This is the top level SCSI INTx handler. Calls csio_scsi_isr_handler() * for handling SCSI completions. */ void csio_scsi_intx_handler(struct csio_hw *hw, void *wr, uint32_t len, struct csio_fl_dma_buf *flb, void *priv) { … } /* csio_scsi_intx_handler */ /* * csio_fcoe_isr() - INTx/MSI interrupt service routine for FCoE. * @irq: * @dev_id: * * */ static irqreturn_t csio_fcoe_isr(int irq, void *dev_id) { … } static void csio_add_msix_desc(struct csio_hw *hw) { … } int csio_request_irqs(struct csio_hw *hw) { … } /* Reduce per-port max possible CPUs */ static void csio_reduce_sqsets(struct csio_hw *hw, int cnt) { … } static void csio_calc_sets(struct irq_affinity *affd, unsigned int nvecs) { … } static int csio_enable_msix(struct csio_hw *hw) { … } void csio_intr_enable(struct csio_hw *hw) { … } void csio_intr_disable(struct csio_hw *hw, bool free) { … }