Lines Matching refs:pACB
132 static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB);
419 static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaC_wait_msgint_ready() argument
421 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_wait_msgint_ready()
437 static bool arcmsr_hbaD_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaD_wait_msgint_ready() argument
439 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_wait_msgint_ready()
454 static bool arcmsr_hbaE_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaE_wait_msgint_ready() argument
458 struct MessageUnit_E __iomem *phbcmu = pACB->pmuE; in arcmsr_hbaE_wait_msgint_ready()
462 if ((read_doorbell ^ pACB->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) { in arcmsr_hbaE_wait_msgint_ready()
464 pACB->in_doorbell = read_doorbell; in arcmsr_hbaE_wait_msgint_ready()
504 static void arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaC_flush_cache() argument
506 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_flush_cache()
511 if (arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_flush_cache()
516 timeout,retry count down = %d \n", pACB->host->host_no, retry_count); in arcmsr_hbaC_flush_cache()
522 static void arcmsr_hbaD_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaD_flush_cache() argument
525 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_flush_cache()
529 if (arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_flush_cache()
535 pACB->host->host_no, retry_count); in arcmsr_hbaD_flush_cache()
539 static void arcmsr_hbaE_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaE_flush_cache() argument
542 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_flush_cache()
545 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_flush_cache()
546 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_flush_cache()
548 if (arcmsr_hbaE_wait_msgint_ready(pACB)) in arcmsr_hbaE_flush_cache()
553 pACB->host->host_no, retry_count); in arcmsr_hbaE_flush_cache()
1177 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaC_abort_allcmd() argument
1179 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_abort_allcmd()
1182 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_abort_allcmd()
1185 , pACB->host->host_no); in arcmsr_hbaC_abort_allcmd()
1191 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaD_abort_allcmd() argument
1193 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_abort_allcmd()
1196 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_abort_allcmd()
1198 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaD_abort_allcmd()
1204 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaE_abort_allcmd() argument
1206 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_abort_allcmd()
1209 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_abort_allcmd()
1210 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_abort_allcmd()
1211 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_abort_allcmd()
1213 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaE_abort_allcmd()
1886 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_stop_bgrb() argument
1888 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_stop_bgrb()
1889 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaC_stop_bgrb()
1892 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_stop_bgrb()
1895 , pACB->host->host_no); in arcmsr_hbaC_stop_bgrb()
1900 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_stop_bgrb() argument
1902 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_stop_bgrb()
1904 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaD_stop_bgrb()
1906 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_stop_bgrb()
1908 "timeout\n", pACB->host->host_no); in arcmsr_hbaD_stop_bgrb()
1911 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_stop_bgrb() argument
1913 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_stop_bgrb()
1915 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaE_stop_bgrb()
1917 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_stop_bgrb()
1918 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_stop_bgrb()
1919 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_stop_bgrb()
1921 "timeout\n", pACB->host->host_no); in arcmsr_hbaE_stop_bgrb()
2291 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_doorbell_isr() argument
2294 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_doorbell_isr()
2307 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2309 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2311 arcmsr_hbaC_message_isr(pACB); in arcmsr_hbaC_doorbell_isr()
2318 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_doorbell_isr() argument
2321 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_doorbell_isr()
2327 arcmsr_hbaD_message_isr(pACB); in arcmsr_hbaD_doorbell_isr()
2329 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2331 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2338 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_doorbell_isr() argument
2341 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_doorbell_isr()
2344 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; in arcmsr_hbaE_doorbell_isr()
2348 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2351 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2354 arcmsr_hbaE_message_isr(pACB); in arcmsr_hbaE_doorbell_isr()
2362 pACB->in_doorbell = in_doorbell; in arcmsr_hbaE_doorbell_isr()
2632 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_handle_isr() argument
2635 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_handle_isr()
2648 arcmsr_hbaC_doorbell_isr(pACB); in arcmsr_hbaC_handle_isr()
2651 arcmsr_hbaC_postqueue_isr(pACB); in arcmsr_hbaC_handle_isr()
2658 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_handle_isr() argument
2661 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_handle_isr()
2672 arcmsr_hbaD_postqueue_isr(pACB); in arcmsr_hbaD_handle_isr()
2675 arcmsr_hbaD_doorbell_isr(pACB); in arcmsr_hbaD_handle_isr()
2683 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_handle_isr() argument
2686 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_handle_isr()
2696 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaE_handle_isr()
2700 arcmsr_hbaE_postqueue_isr(pACB); in arcmsr_hbaE_handle_isr()
3123 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer) in DEF_SCSI_QCMD()
3126 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model; in DEF_SCSI_QCMD()
3127 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version; in DEF_SCSI_QCMD()
3128 uint32_t *acb_device_map = (uint32_t *)pACB->device_map; in DEF_SCSI_QCMD()
3154 pACB->signature = readl(&rwbuffer[0]); in DEF_SCSI_QCMD()
3155 pACB->firm_request_len = readl(&rwbuffer[1]); in DEF_SCSI_QCMD()
3156 pACB->firm_numbers_queue = readl(&rwbuffer[2]); in DEF_SCSI_QCMD()
3157 pACB->firm_sdram_size = readl(&rwbuffer[3]); in DEF_SCSI_QCMD()
3158 pACB->firm_hd_channels = readl(&rwbuffer[4]); in DEF_SCSI_QCMD()
3159 pACB->firm_cfg_version = readl(&rwbuffer[25]); in DEF_SCSI_QCMD()
3161 pACB->host->host_no, in DEF_SCSI_QCMD()
3162 pACB->firm_model, in DEF_SCSI_QCMD()
3163 pACB->firm_version); in DEF_SCSI_QCMD()
3200 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaC_get_config() argument
3203 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_get_config()
3209 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaC_get_config()
3214 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_get_config()
3216 miscellaneous data' timeout \n", pACB->host->host_no); in arcmsr_hbaC_get_config()
3219 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaC_get_config()
3245 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaE_get_config() argument
3247 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_get_config()
3254 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaE_get_config()
3259 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_get_config()
3260 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_get_config()
3262 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_get_config()
3264 "miscellaneous data timeout\n", pACB->host->host_no); in arcmsr_hbaE_get_config()
3267 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaE_get_config()
4045 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_start_bgrb() argument
4047 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_start_bgrb()
4048 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaC_start_bgrb()
4051 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_start_bgrb()
4053 rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaC_start_bgrb()
4058 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_start_bgrb() argument
4060 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_start_bgrb()
4062 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaD_start_bgrb()
4064 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_start_bgrb()
4066 "background rebuild' timeout\n", pACB->host->host_no); in arcmsr_hbaD_start_bgrb()
4070 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_start_bgrb() argument
4072 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_start_bgrb()
4074 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaE_start_bgrb()
4076 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_start_bgrb()
4077 writel(pACB->out_doorbell, &pmu->iobound_doorbell); in arcmsr_hbaE_start_bgrb()
4078 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_start_bgrb()
4080 "background rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaE_start_bgrb()