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, &reg->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, &reg->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()
1970 static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_stop_bgrb() argument
1972 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_stop_bgrb()
1973 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaC_stop_bgrb()
1976 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_stop_bgrb()
1979 , pACB->host->host_no); in arcmsr_hbaC_stop_bgrb()
1984 static void arcmsr_hbaD_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_stop_bgrb() argument
1986 struct MessageUnit_D *reg = pACB->pmuD; in arcmsr_hbaD_stop_bgrb()
1988 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaD_stop_bgrb()
1990 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) in arcmsr_hbaD_stop_bgrb()
1992 "timeout\n", pACB->host->host_no); in arcmsr_hbaD_stop_bgrb()
1995 static void arcmsr_hbaE_stop_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_stop_bgrb() argument
1997 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_stop_bgrb()
1999 pACB->acb_flags &= ~ACB_F_MSG_START_BGRB; in arcmsr_hbaE_stop_bgrb()
2001 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_stop_bgrb()
2002 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_stop_bgrb()
2003 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_stop_bgrb()
2005 "timeout\n", pACB->host->host_no); in arcmsr_hbaE_stop_bgrb()
2378 static void arcmsr_hbaC_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_doorbell_isr() argument
2381 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_doorbell_isr()
2394 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2396 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaC_doorbell_isr()
2398 arcmsr_hbaC_message_isr(pACB); in arcmsr_hbaC_doorbell_isr()
2405 static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_doorbell_isr() argument
2408 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_doorbell_isr()
2414 arcmsr_hbaD_message_isr(pACB); in arcmsr_hbaD_doorbell_isr()
2416 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2418 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaD_doorbell_isr()
2425 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_doorbell_isr() argument
2428 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_doorbell_isr()
2430 if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) { in arcmsr_hbaE_doorbell_isr()
2438 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; in arcmsr_hbaE_doorbell_isr()
2442 arcmsr_iop2drv_data_wrote_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2445 arcmsr_iop2drv_data_read_handle(pACB); in arcmsr_hbaE_doorbell_isr()
2448 arcmsr_hbaE_message_isr(pACB); in arcmsr_hbaE_doorbell_isr()
2456 pACB->in_doorbell = in_doorbell; in arcmsr_hbaE_doorbell_isr()
2754 static int arcmsr_hbaC_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaC_handle_isr() argument
2757 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_handle_isr()
2770 arcmsr_hbaC_doorbell_isr(pACB); in arcmsr_hbaC_handle_isr()
2773 arcmsr_hbaC_postqueue_isr(pACB); in arcmsr_hbaC_handle_isr()
2780 static irqreturn_t arcmsr_hbaD_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaD_handle_isr() argument
2783 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_handle_isr()
2794 arcmsr_hbaD_postqueue_isr(pACB); in arcmsr_hbaD_handle_isr()
2797 arcmsr_hbaD_doorbell_isr(pACB); in arcmsr_hbaD_handle_isr()
2805 static irqreturn_t arcmsr_hbaE_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaE_handle_isr() argument
2808 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_handle_isr()
2818 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaE_handle_isr()
2822 arcmsr_hbaE_postqueue_isr(pACB); in arcmsr_hbaE_handle_isr()
2830 static irqreturn_t arcmsr_hbaF_handle_isr(struct AdapterControlBlock *pACB) in arcmsr_hbaF_handle_isr() argument
2833 struct MessageUnit_F __iomem *phbcmu = pACB->pmuF; in arcmsr_hbaF_handle_isr()
2843 arcmsr_hbaF_postqueue_isr(pACB); in arcmsr_hbaF_handle_isr()
2847 arcmsr_hbaE_doorbell_isr(pACB); in arcmsr_hbaF_handle_isr()
3270 static void arcmsr_get_adapter_config(struct AdapterControlBlock *pACB, uint32_t *rwbuffer) in DEF_SCSI_QCMD()
3273 uint32_t *acb_firm_model = (uint32_t *)pACB->firm_model; in DEF_SCSI_QCMD()
3274 uint32_t *acb_firm_version = (uint32_t *)pACB->firm_version; in DEF_SCSI_QCMD()
3275 uint32_t *acb_device_map = (uint32_t *)pACB->device_map; in DEF_SCSI_QCMD()
3301 pACB->signature = readl(&rwbuffer[0]); in DEF_SCSI_QCMD()
3302 pACB->firm_request_len = readl(&rwbuffer[1]); in DEF_SCSI_QCMD()
3303 pACB->firm_numbers_queue = readl(&rwbuffer[2]); in DEF_SCSI_QCMD()
3304 pACB->firm_sdram_size = readl(&rwbuffer[3]); in DEF_SCSI_QCMD()
3305 pACB->firm_hd_channels = readl(&rwbuffer[4]); in DEF_SCSI_QCMD()
3306 pACB->firm_cfg_version = readl(&rwbuffer[25]); in DEF_SCSI_QCMD()
3308 pACB->host->host_no, in DEF_SCSI_QCMD()
3309 pACB->firm_model, in DEF_SCSI_QCMD()
3310 pACB->firm_version); in DEF_SCSI_QCMD()
3347 static bool arcmsr_hbaC_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaC_get_config() argument
3350 struct MessageUnit_C __iomem *reg = pACB->pmuC; in arcmsr_hbaC_get_config()
3356 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaC_get_config()
3361 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_get_config()
3363 miscellaneous data' timeout \n", pACB->host->host_no); in arcmsr_hbaC_get_config()
3366 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaC_get_config()
3392 static bool arcmsr_hbaE_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaE_get_config() argument
3394 struct MessageUnit_E __iomem *reg = pACB->pmuE; in arcmsr_hbaE_get_config()
3401 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaE_get_config()
3406 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_get_config()
3407 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaE_get_config()
3409 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_get_config()
3411 "miscellaneous data timeout\n", pACB->host->host_no); in arcmsr_hbaE_get_config()
3414 arcmsr_get_adapter_config(pACB, reg->msgcode_rwbuffer); in arcmsr_hbaE_get_config()
3418 static bool arcmsr_hbaF_get_config(struct AdapterControlBlock *pACB) in arcmsr_hbaF_get_config() argument
3420 struct MessageUnit_F __iomem *reg = pACB->pmuF; in arcmsr_hbaF_get_config()
3427 arcmsr_wait_firmware_ready(pACB); in arcmsr_hbaF_get_config()
3431 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaF_get_config()
3432 writel(pACB->out_doorbell, &reg->iobound_doorbell); in arcmsr_hbaF_get_config()
3434 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaF_get_config()
3436 pACB->host->host_no); in arcmsr_hbaF_get_config()
3439 arcmsr_get_adapter_config(pACB, pACB->msgcode_rwbuffer); in arcmsr_hbaF_get_config()
4244 static void arcmsr_hbaC_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaC_start_bgrb() argument
4246 struct MessageUnit_C __iomem *phbcmu = pACB->pmuC; in arcmsr_hbaC_start_bgrb()
4247 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaC_start_bgrb()
4250 if (!arcmsr_hbaC_wait_msgint_ready(pACB)) { in arcmsr_hbaC_start_bgrb()
4252 rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaC_start_bgrb()
4257 static void arcmsr_hbaD_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaD_start_bgrb() argument
4259 struct MessageUnit_D *pmu = pACB->pmuD; in arcmsr_hbaD_start_bgrb()
4261 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaD_start_bgrb()
4263 if (!arcmsr_hbaD_wait_msgint_ready(pACB)) { in arcmsr_hbaD_start_bgrb()
4265 "background rebuild' timeout\n", pACB->host->host_no); in arcmsr_hbaD_start_bgrb()
4269 static void arcmsr_hbaE_start_bgrb(struct AdapterControlBlock *pACB) in arcmsr_hbaE_start_bgrb() argument
4271 struct MessageUnit_E __iomem *pmu = pACB->pmuE; in arcmsr_hbaE_start_bgrb()
4273 pACB->acb_flags |= ACB_F_MSG_START_BGRB; in arcmsr_hbaE_start_bgrb()
4275 pACB->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; in arcmsr_hbaE_start_bgrb()
4276 writel(pACB->out_doorbell, &pmu->iobound_doorbell); in arcmsr_hbaE_start_bgrb()
4277 if (!arcmsr_hbaE_wait_msgint_ready(pACB)) { in arcmsr_hbaE_start_bgrb()
4279 "background rebuild' timeout \n", pACB->host->host_no); in arcmsr_hbaE_start_bgrb()