/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
*/
#include "cpqary3.h"
/*
* Function : cpqary3_hw_isr
* Description : This routine determines if this instance of the
* HBA interrupted and if positive triggers a software
* interrupt.
* For SAS controllers which operate in performant mode
* we clear the interrupt.
* For CISS controllers which operate in simple mode
* we get the tag value.
* Called By : kernel
* Parameters : per-controller
* Calls : cpqary3_check_ctlr_intr()
* Return Values: DDI_INTR_CLAIMED/UNCLAIMED
* [We either CLAIM the interrupt or Discard it]
*/
{
"Locked !!! Lockup Code: 0x%x",
"the system");
}
}
return (DDI_INTR_CLAIMED);
}
return (DDI_INTR_UNCLAIMED);
}
/* PERF */
/*
* We decided that we will have only one retrieve function for
* both simple and performant mode. To achieve this we have to mimic
* what controller does for performant mode in simple mode.
* For simple mode we are making replq_simple_ptr and
* replq_headptr of performant
* mode point to the same location in the reply queue.
* For the performant mode, we clear the interrupt
*/
replyq_ptr->replyq_simple_ptr[0] |=
replyq_ptr->simple_index = 0;
/* Toggle at wraparound */
(replyq_ptr->simple_cyclic_indicator == 0) ?
1 : 0;
/* LINTED: alignment */
} else {
}
}
} else {
if (doorbell_status & 0x1) {
}
}
/* PERF */
/*
* If s/w interrupt handler is already running, do not trigger another
* since packets have already been transferred to Retrieved Q.
* Else, Set swintr_flag to state to the s/w interrupt handler
* that it has a job to do.
* trigger the s/w interrupt handler
* Claim the interrupt
*/
} else {
}
if (CPQARY3_TRUE == need_swintr)
return (DDI_INTR_CLAIMED);
}
/*
* Function : cpqary3_sw_isr
* Description : This routine determines if this instance of the
* software interrupt handler was triggered by its
* respective h/w interrupt handler and if affermative
* processes the completed commands.
* Called By : kernel (Triggered by : cpqary3_hw_isr)
* Parameters : per-controller
* Calls : cpqary3_retrieve()
* Return Values: DDI_INTR_CLAIMED/UNCLAIMED
* [We either CLAIM the interrupr or DON'T]
*/
{
if (!cpqary3p) {
"Routine invoked with NULL pointer argument \n");
}
/*
* Ensure that our hardware routine actually triggered this routine.
* If it was not the case, do NOT CLAIM the interrupt
*/
return (DDI_INTR_UNCLAIMED);
}
/* PERF */
(void) cpqary3_retrieve(cpqary3p);
/* PERF */
return (DDI_INTR_CLAIMED);
}