Lines Matching refs:pACB
132 static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB);
428 static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaC_wait_msgint_ready() argument
430 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_wait_msgint_ready()
446 static bool arcmsr_hbaD_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaD_wait_msgint_ready() argument
448 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_wait_msgint_ready()
463 static bool arcmsr_hbaE_wait_msgint_ready(struct AdapterControlBlock *pACB) in arcmsr_hbaE_wait_msgint_ready() argument
467 struct MessageUnit_E __iomem *phbcmu = pACB->pmuE; in arcmsr_hbaE_wait_msgint_ready()
471 if ((read_doorbell ^ pACB->in_doorbell) & ARCMSR_HBEMU_IOP2DRV_MESSAGE_CMD_DONE) { in arcmsr_hbaE_wait_msgint_ready()
473 pACB->in_doorbell = read_doorbell; in arcmsr_hbaE_wait_msgint_ready()
513 static void arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaC_flush_cache() argument
515 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_flush_cache()
520 if (arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_flush_cache()
525 timeout,retry count down = %d \n", pACB->host->host_no, retry_count); in arcmsr_hbaC_flush_cache()
531 static void arcmsr_hbaD_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaD_flush_cache() argument
534 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_flush_cache()
538 if (arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_flush_cache()
544 pACB->host->host_no, retry_count); in arcmsr_hbaD_flush_cache()
548 static void arcmsr_hbaE_flush_cache(struct AdapterControlBlock *pACB) in arcmsr_hbaE_flush_cache() argument
551 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_flush_cache()
554 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_flush_cache()
555 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_flush_cache()
557 if (arcmsr_hbaE_wait_msgint_ready(pACB)) in arcmsr_hbaE_flush_cache()
562 pACB->host->host_no, retry_count); in arcmsr_hbaE_flush_cache()
1242 static uint8_t arcmsr_hbaC_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaC_abort_allcmd() argument
1244 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_abort_allcmd()
1247 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_abort_allcmd()
1250 , pACB->host->host_no); in arcmsr_hbaC_abort_allcmd()
1256 static uint8_t arcmsr_hbaD_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaD_abort_allcmd() argument
1258 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_abort_allcmd()
1261 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_abort_allcmd()
1263 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaD_abort_allcmd()
1269 static uint8_t arcmsr_hbaE_abort_allcmd(struct AdapterControlBlock *pACB) in arcmsr_hbaE_abort_allcmd() argument
1271 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_abort_allcmd()
1274 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_abort_allcmd()
1275 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_abort_allcmd()
1276 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_abort_allcmd()
1278 "command' timeout\n", pACB->host->host_no); in arcmsr_hbaE_abort_allcmd()
1966 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_stop_bgrb() argument
1968 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_stop_bgrb()
1969 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaC_stop_bgrb()
1972 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_stop_bgrb()
1975 , pACB->host->host_no); in arcmsr_hbaC_stop_bgrb()
1980 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_stop_bgrb() argument
1982 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_stop_bgrb()
1984 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaD_stop_bgrb()
1986 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_stop_bgrb()
1988 "timeout\n", pACB->host->host_no); in arcmsr_hbaD_stop_bgrb()
1991 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_stop_bgrb() argument
1993 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_stop_bgrb()
1995 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaE_stop_bgrb()
1997 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_stop_bgrb()
1998 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_stop_bgrb()
1999 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_stop_bgrb()
2001 "timeout\n", pACB->host->host_no); in arcmsr_hbaE_stop_bgrb()
2374 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_doorbell_isr() argument
2377 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_doorbell_isr()
2390 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2392 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2394 arcmsr_hbaC_message_isr(pACB); in arcmsr_hbaC_doorbell_isr()
2401 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_doorbell_isr() argument
2404 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_doorbell_isr()
2410 arcmsr_hbaD_message_isr(pACB); in arcmsr_hbaD_doorbell_isr()
2412 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2414 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2421 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_doorbell_isr() argument
2424 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_doorbell_isr()
2427 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; in arcmsr_hbaE_doorbell_isr()
2431 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2434 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2437 arcmsr_hbaE_message_isr(pACB); in arcmsr_hbaE_doorbell_isr()
2445 pACB->in_doorbell = in_doorbell; in arcmsr_hbaE_doorbell_isr()
2743 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_handle_isr() argument
2746 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_handle_isr()
2759 arcmsr_hbaC_doorbell_isr(pACB); in arcmsr_hbaC_handle_isr()
2762 arcmsr_hbaC_postqueue_isr(pACB); in arcmsr_hbaC_handle_isr()
2769 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_handle_isr() argument
2772 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_handle_isr()
2783 arcmsr_hbaD_postqueue_isr(pACB); in arcmsr_hbaD_handle_isr()
2786 arcmsr_hbaD_doorbell_isr(pACB); in arcmsr_hbaD_handle_isr()
2794 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_handle_isr() argument
2797 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_handle_isr()
2807 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaE_handle_isr()
2811 arcmsr_hbaE_postqueue_isr(pACB); in arcmsr_hbaE_handle_isr()
2819 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaF_handle_isr() argument
2822 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF; in arcmsr_hbaF_handle_isr()
2832 arcmsr_hbaF_postqueue_isr(pACB); in arcmsr_hbaF_handle_isr()
2836 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaF_handle_isr()
3259 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer) in DEF_SCSI_QCMD()
3262 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model; in DEF_SCSI_QCMD()
3263 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version; in DEF_SCSI_QCMD()
3264 uint32_t *acb_device_map = (uint32_t *)pACB->device_map; in DEF_SCSI_QCMD()
3290 pACB->signature = readl(&rwbuffer[0]); in DEF_SCSI_QCMD()
3291 pACB->firm_request_len = readl(&rwbuffer[1]); in DEF_SCSI_QCMD()
3292 pACB->firm_numbers_queue = readl(&rwbuffer[2]); in DEF_SCSI_QCMD()
3293 pACB->firm_sdram_size = readl(&rwbuffer[3]); in DEF_SCSI_QCMD()
3294 pACB->firm_hd_channels = readl(&rwbuffer[4]); in DEF_SCSI_QCMD()
3295 pACB->firm_cfg_version = readl(&rwbuffer[25]); in DEF_SCSI_QCMD()
3297 pACB->host->host_no, in DEF_SCSI_QCMD()
3298 pACB->firm_model, in DEF_SCSI_QCMD()
3299 pACB->firm_version); in DEF_SCSI_QCMD()
3336 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaC_get_config() argument
3339 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_get_config()
3345 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaC_get_config()
3350 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_get_config()
3352 miscellaneous data' timeout \n", pACB->host->host_no); in arcmsr_hbaC_get_config()
3355 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaC_get_config()
3381 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaE_get_config() argument
3383 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_get_config()
3390 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaE_get_config()
3395 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_get_config()
3396 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaE_get_config()
3398 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_get_config()
3400 "miscellaneous data timeout\n", pACB->host->host_no); in arcmsr_hbaE_get_config()
3403 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaE_get_config()
3407 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaF_get_config() argument
3409 struct MessageUnit_F __iomem *reg = pACB->pmuF; in arcmsr_hbaF_get_config()
3416 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaF_get_config()
3420 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaF_get_config()
3421 writel(pACB->out_doorbell, ®->iobound_doorbell); in arcmsr_hbaF_get_config()
3423 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaF_get_config()
3425 pACB->host->host_no); in arcmsr_hbaF_get_config()
3428 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer); in arcmsr_hbaF_get_config()
4233 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_start_bgrb() argument
4235 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_start_bgrb()
4236 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaC_start_bgrb()
4239 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_start_bgrb()
4241 rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaC_start_bgrb()
4246 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_start_bgrb() argument
4248 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_start_bgrb()
4250 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaD_start_bgrb()
4252 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_start_bgrb()
4254 "background rebuild' timeout\n", pACB->host->host_no); in arcmsr_hbaD_start_bgrb()
4258 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_start_bgrb() argument
4260 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_start_bgrb()
4262 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaE_start_bgrb()
4264 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_start_bgrb()
4265 writel(pACB->out_doorbell, &pmu->iobound_doorbell); in arcmsr_hbaE_start_bgrb()
4266 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_start_bgrb()
4268 "background rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaE_start_bgrb()