Lines Matching refs:msg
317 u32 msg[17]; in adpt_inquiry() local
329 memset(msg, 0, sizeof(msg)); in adpt_inquiry()
346 msg[0] = reqlen<<16 | SGL_OFFSET_12; in adpt_inquiry()
347 msg[1] = (0xff<<24|HOST_TID<<12|ADAPTER_TID); in adpt_inquiry()
348 msg[2] = 0; in adpt_inquiry()
349 msg[3] = 0; in adpt_inquiry()
351 msg[4] = I2O_CMD_SCSI_EXEC|DPT_ORGANIZATION_ID<<16; in adpt_inquiry()
352 msg[5] = ADAPTER_TID | 1<<16 /* Interpret*/; in adpt_inquiry()
357 msg[6] = scsidir|0x20a00000| 6 /* cmd len*/; in adpt_inquiry()
359 mptr=msg+7; in adpt_inquiry()
389 rcode = adpt_i2o_post_wait(pHba, msg, reqlen<<2, 120); in adpt_inquiry()
685 u32 msg[5]; in adpt_abort() local
698 memset(msg, 0, sizeof(msg)); in adpt_abort()
699 msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_abort()
700 msg[1] = I2O_CMD_SCSI_ABORT<<24|HOST_TID<<12|dptdevice->tid; in adpt_abort()
701 msg[2] = 0; in adpt_abort()
702 msg[3]= 0; in adpt_abort()
703 msg[4] = adpt_cmd_to_context(cmd); in adpt_abort()
706 rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER); in adpt_abort()
729 u32 msg[4]; in adpt_device_reset() local
740 memset(msg, 0, sizeof(msg)); in adpt_device_reset()
741 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_device_reset()
742 msg[1] = (I2O_DEVICE_RESET<<24|HOST_TID<<12|d->tid); in adpt_device_reset()
743 msg[2] = 0; in adpt_device_reset()
744 msg[3] = 0; in adpt_device_reset()
750 rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); in adpt_device_reset()
773 u32 msg[4]; in adpt_bus_reset() local
777 memset(msg, 0, sizeof(msg)); in adpt_bus_reset()
779 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_bus_reset()
780 msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid); in adpt_bus_reset()
781 msg[2] = 0; in adpt_bus_reset()
782 msg[3] = 0; in adpt_bus_reset()
785 rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); in adpt_bus_reset()
1195 static int adpt_i2o_post_wait(adpt_hba* pHba, u32* msg, int len, int timeout) in adpt_i2o_post_wait() argument
1230 msg[2] |= 0x80000000 | ((u32)wait_data->id); in adpt_i2o_post_wait()
1232 if((status = adpt_i2o_post_this(pHba, msg, len)) == 0){ in adpt_i2o_post_wait()
1286 u32 __iomem *msg; in adpt_i2o_post_this() local
1301 msg = pHba->msg_addr_virt + m; in adpt_i2o_post_this()
1302 memcpy_toio(msg, data, len); in adpt_i2o_post_this()
1352 u32 msg[8]; in adpt_i2o_reset_hba() local
1385 msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_reset_hba()
1386 msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; in adpt_i2o_reset_hba()
1387 msg[2]=0; in adpt_i2o_reset_hba()
1388 msg[3]=0; in adpt_i2o_reset_hba()
1389 msg[4]=0; in adpt_i2o_reset_hba()
1390 msg[5]=0; in adpt_i2o_reset_hba()
1391 msg[6]=dma_low(addr); in adpt_i2o_reset_hba()
1392 msg[7]=dma_high(addr); in adpt_i2o_reset_hba()
1394 memcpy_toio(pHba->msg_addr_virt+m, msg, sizeof(msg)); in adpt_i2o_reset_hba()
1707 u32 msg[MAX_MESSAGE_SIZE]; in adpt_i2o_passthru() local
1723 memset(&msg, 0, MAX_MESSAGE_SIZE*4); in adpt_i2o_passthru()
1737 if(copy_from_user(msg, user_msg, size)) { in adpt_i2o_passthru()
1751 sg_offset = (msg[0]>>4)&0xf; in adpt_i2o_passthru()
1752 msg[2] = 0x40000000; // IOCTL context in adpt_i2o_passthru()
1753 msg[3] = adpt_ioctl_to_context(pHba, reply); in adpt_i2o_passthru()
1754 if (msg[3] == (u32)-1) in adpt_i2o_passthru()
1760 struct sg_simple_element *sg = (struct sg_simple_element*) (msg+sg_offset); in adpt_i2o_passthru()
1809 rcode = adpt_i2o_post_wait(pHba, msg, size, FOREVER); in adpt_i2o_passthru()
1831 memset(&msg, 0, MAX_MESSAGE_SIZE*4); in adpt_i2o_passthru()
1844 if (copy_from_user (msg, user_msg, size)) { in adpt_i2o_passthru()
1851 sg = (struct sg_simple_element*)(msg + sg_offset); in adpt_i2o_passthru()
1883 (struct sg_simple_element*) (msg +sg_offset); in adpt_i2o_passthru()
2160 void __iomem *msg; in adpt_isr() local
2169 msg = pHba->msg_addr_virt + old_m; in adpt_isr()
2170 old_context = readl(msg+12); in adpt_isr()
2219 u32 msg[MAX_MESSAGE_SIZE]; in adpt_scsi_to_i2o() local
2231 memset(msg, 0 , sizeof(msg)); in adpt_scsi_to_i2o()
2267 msg[1] = ((0xff<<24)|(HOST_TID<<12)|d->tid); in adpt_scsi_to_i2o()
2268 msg[2] = 0; in adpt_scsi_to_i2o()
2269 msg[3] = adpt_cmd_to_context(cmd); /* Want SCSI control block back */ in adpt_scsi_to_i2o()
2272 msg[4] = I2O_CMD_SCSI_EXEC|(DPT_ORGANIZATION_ID<<16); in adpt_scsi_to_i2o()
2273 msg[5] = d->tid; in adpt_scsi_to_i2o()
2278 msg[6] = scsidir|0x20a00000|cmd->cmd_len; in adpt_scsi_to_i2o()
2280 mptr=msg+7; in adpt_scsi_to_i2o()
2314 reqlen = mptr - msg; in adpt_scsi_to_i2o()
2327 msg[0] = reqlen<<16 | ((reqlen > 12) ? SGL_OFFSET_12 : SGL_OFFSET_0); in adpt_scsi_to_i2o()
2330 rcode = adpt_i2o_post_this(pHba, msg, reqlen<<2); in adpt_scsi_to_i2o()
2781 u32 __iomem *msg; in adpt_send_nop() local
2796 msg = (u32 __iomem *)(pHba->msg_addr_virt + m); in adpt_send_nop()
2797 writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]); in adpt_send_nop()
2798 writel( I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0,&msg[1]); in adpt_send_nop()
2799 writel( 0,&msg[2]); in adpt_send_nop()
2811 u32 __iomem *msg = NULL; in adpt_i2o_init_outbound_q() local
2830 msg=(u32 __iomem *)(pHba->msg_addr_virt+m); in adpt_i2o_init_outbound_q()
2841 writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); in adpt_i2o_init_outbound_q()
2842 writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]); in adpt_i2o_init_outbound_q()
2843 writel(0, &msg[2]); in adpt_i2o_init_outbound_q()
2844 writel(0x0106, &msg[3]); /* Transaction context */ in adpt_i2o_init_outbound_q()
2845 writel(4096, &msg[4]); /* Host page frame size */ in adpt_i2o_init_outbound_q()
2846 writel((REPLY_FRAME_SIZE)<<16|0x80, &msg[5]); /* Outbound msg frame size and Initcode */ in adpt_i2o_init_outbound_q()
2847 writel(0xD0000004, &msg[6]); /* Simple SG LE, EOB */ in adpt_i2o_init_outbound_q()
2848 writel((u32)addr, &msg[7]); in adpt_i2o_init_outbound_q()
2920 u32 __iomem *msg; in adpt_i2o_status_get() local
2952 msg=(u32 __iomem *)(pHba->msg_addr_virt+m); in adpt_i2o_status_get()
2954 writel(NINE_WORD_MSG_SIZE|SGL_OFFSET_0, &msg[0]); in adpt_i2o_status_get()
2955 writel(I2O_CMD_STATUS_GET<<24|HOST_TID<<12|ADAPTER_TID, &msg[1]); in adpt_i2o_status_get()
2956 writel(1, &msg[2]); in adpt_i2o_status_get()
2957 writel(0, &msg[3]); in adpt_i2o_status_get()
2958 writel(0, &msg[4]); in adpt_i2o_status_get()
2959 writel(0, &msg[5]); in adpt_i2o_status_get()
2960 writel( dma_low(pHba->status_block_pa), &msg[6]); in adpt_i2o_status_get()
2961 writel( dma_high(pHba->status_block_pa), &msg[7]); in adpt_i2o_status_get()
2962 writel(sizeof(i2o_status_block), &msg[8]); // 88 bytes in adpt_i2o_status_get()
3042 u32 msg[8]; in adpt_i2o_lct_get() local
3062 msg[0] = EIGHT_WORD_MSG_SIZE|SGL_OFFSET_6; in adpt_i2o_lct_get()
3063 msg[1] = I2O_CMD_LCT_NOTIFY<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_lct_get()
3064 msg[2] = 0; in adpt_i2o_lct_get()
3065 msg[3] = 0; in adpt_i2o_lct_get()
3066 msg[4] = 0xFFFFFFFF; /* All devices */ in adpt_i2o_lct_get()
3067 msg[5] = 0x00000000; /* Report now */ in adpt_i2o_lct_get()
3068 msg[6] = 0xD0000000|pHba->lct_size; in adpt_i2o_lct_get()
3069 msg[7] = (u32)pHba->lct_pa; in adpt_i2o_lct_get()
3071 if ((ret=adpt_i2o_post_wait(pHba, msg, sizeof(msg), 360))) { in adpt_i2o_lct_get()
3284 u32 msg[6]; in adpt_i2o_hrt_get() local
3297 msg[0]= SIX_WORD_MSG_SIZE| SGL_OFFSET_4; in adpt_i2o_hrt_get()
3298 msg[1]= I2O_CMD_HRT_GET<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_hrt_get()
3299 msg[2]= 0; in adpt_i2o_hrt_get()
3300 msg[3]= 0; in adpt_i2o_hrt_get()
3301 msg[4]= (0xD0000000 | size); /* Simple transaction */ in adpt_i2o_hrt_get()
3302 msg[5]= (u32)pHba->hrt_pa; /* Dump it here */ in adpt_i2o_hrt_get()
3304 if ((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg),20))) { in adpt_i2o_hrt_get()
3394 u32 msg[9]; in adpt_i2o_issue_params() local
3398 msg[0] = NINE_WORD_MSG_SIZE | SGL_OFFSET_5; in adpt_i2o_issue_params()
3399 msg[1] = cmd << 24 | HOST_TID << 12 | tid; in adpt_i2o_issue_params()
3400 msg[2] = 0; in adpt_i2o_issue_params()
3401 msg[3] = 0; in adpt_i2o_issue_params()
3402 msg[4] = 0; in adpt_i2o_issue_params()
3403 msg[5] = 0x54000000 | oplen; /* OperationBlock */ in adpt_i2o_issue_params()
3404 msg[6] = (u32)opblk_pa; in adpt_i2o_issue_params()
3405 msg[7] = 0xD0000000 | reslen; /* ResultBlock */ in adpt_i2o_issue_params()
3406 msg[8] = (u32)resblk_pa; in adpt_i2o_issue_params()
3408 if ((wait_status = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 20))) { in adpt_i2o_issue_params()
3429 u32 msg[4]; in adpt_i2o_quiesce_hba() local
3441 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_quiesce_hba()
3442 msg[1] = I2O_CMD_SYS_QUIESCE<<24|HOST_TID<<12|ADAPTER_TID; in adpt_i2o_quiesce_hba()
3443 msg[2] = 0; in adpt_i2o_quiesce_hba()
3444 msg[3] = 0; in adpt_i2o_quiesce_hba()
3446 if((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 240))) { in adpt_i2o_quiesce_hba()
3463 u32 msg[4]; in adpt_i2o_enable_hba() local
3477 msg[0]=FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_enable_hba()
3478 msg[1]=I2O_CMD_SYS_ENABLE<<24|HOST_TID<<12|ADAPTER_TID; in adpt_i2o_enable_hba()
3479 msg[2]= 0; in adpt_i2o_enable_hba()
3480 msg[3]= 0; in adpt_i2o_enable_hba()
3482 if ((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 240))) { in adpt_i2o_enable_hba()
3496 u32 msg[12]; in adpt_i2o_systab_send() local
3499 msg[0] = I2O_MESSAGE_SIZE(12) | SGL_OFFSET_6; in adpt_i2o_systab_send()
3500 msg[1] = I2O_CMD_SYS_TAB_SET<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_systab_send()
3501 msg[2] = 0; in adpt_i2o_systab_send()
3502 msg[3] = 0; in adpt_i2o_systab_send()
3503 msg[4] = (0<<16) | ((pHba->unit+2) << 12); /* Host 0 IOP ID (unit + 2) */ in adpt_i2o_systab_send()
3504 msg[5] = 0; /* Segment 0 */ in adpt_i2o_systab_send()
3511 msg[6] = 0x54000000 | sys_tbl_len; in adpt_i2o_systab_send()
3512 msg[7] = (u32)sys_tbl_pa; in adpt_i2o_systab_send()
3513 msg[8] = 0x54000000 | 0; in adpt_i2o_systab_send()
3514 msg[9] = 0; in adpt_i2o_systab_send()
3515 msg[10] = 0xD4000000 | 0; in adpt_i2o_systab_send()
3516 msg[11] = 0; in adpt_i2o_systab_send()
3518 if ((ret=adpt_i2o_post_wait(pHba, msg, sizeof(msg), 120))) { in adpt_i2o_systab_send()