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()
2163 void __iomem *msg; in adpt_isr() local
2172 msg = pHba->msg_addr_virt + old_m; in adpt_isr()
2173 old_context = readl(msg+12); in adpt_isr()
2222 u32 msg[MAX_MESSAGE_SIZE]; in adpt_scsi_to_i2o() local
2234 memset(msg, 0 , sizeof(msg)); in adpt_scsi_to_i2o()
2270 msg[1] = ((0xff<<24)|(HOST_TID<<12)|d->tid); in adpt_scsi_to_i2o()
2271 msg[2] = 0; in adpt_scsi_to_i2o()
2272 msg[3] = adpt_cmd_to_context(cmd); /* Want SCSI control block back */ in adpt_scsi_to_i2o()
2275 msg[4] = I2O_CMD_SCSI_EXEC|(DPT_ORGANIZATION_ID<<16); in adpt_scsi_to_i2o()
2276 msg[5] = d->tid; in adpt_scsi_to_i2o()
2281 msg[6] = scsidir|0x20a00000|cmd->cmd_len; in adpt_scsi_to_i2o()
2283 mptr=msg+7; in adpt_scsi_to_i2o()
2317 reqlen = mptr - msg; in adpt_scsi_to_i2o()
2330 msg[0] = reqlen<<16 | ((reqlen > 12) ? SGL_OFFSET_12 : SGL_OFFSET_0); in adpt_scsi_to_i2o()
2333 rcode = adpt_i2o_post_this(pHba, msg, reqlen<<2); in adpt_scsi_to_i2o()
2784 u32 __iomem *msg; in adpt_send_nop() local
2799 msg = (u32 __iomem *)(pHba->msg_addr_virt + m); in adpt_send_nop()
2800 writel( THREE_WORD_MSG_SIZE | SGL_OFFSET_0,&msg[0]); in adpt_send_nop()
2801 writel( I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | 0,&msg[1]); in adpt_send_nop()
2802 writel( 0,&msg[2]); in adpt_send_nop()
2814 u32 __iomem *msg = NULL; in adpt_i2o_init_outbound_q() local
2833 msg=(u32 __iomem *)(pHba->msg_addr_virt+m); in adpt_i2o_init_outbound_q()
2844 writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); in adpt_i2o_init_outbound_q()
2845 writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]); in adpt_i2o_init_outbound_q()
2846 writel(0, &msg[2]); in adpt_i2o_init_outbound_q()
2847 writel(0x0106, &msg[3]); /* Transaction context */ in adpt_i2o_init_outbound_q()
2848 writel(4096, &msg[4]); /* Host page frame size */ in adpt_i2o_init_outbound_q()
2849 writel((REPLY_FRAME_SIZE)<<16|0x80, &msg[5]); /* Outbound msg frame size and Initcode */ in adpt_i2o_init_outbound_q()
2850 writel(0xD0000004, &msg[6]); /* Simple SG LE, EOB */ in adpt_i2o_init_outbound_q()
2851 writel((u32)addr, &msg[7]); in adpt_i2o_init_outbound_q()
2923 u32 __iomem *msg; in adpt_i2o_status_get() local
2955 msg=(u32 __iomem *)(pHba->msg_addr_virt+m); in adpt_i2o_status_get()
2957 writel(NINE_WORD_MSG_SIZE|SGL_OFFSET_0, &msg[0]); in adpt_i2o_status_get()
2958 writel(I2O_CMD_STATUS_GET<<24|HOST_TID<<12|ADAPTER_TID, &msg[1]); in adpt_i2o_status_get()
2959 writel(1, &msg[2]); in adpt_i2o_status_get()
2960 writel(0, &msg[3]); in adpt_i2o_status_get()
2961 writel(0, &msg[4]); in adpt_i2o_status_get()
2962 writel(0, &msg[5]); in adpt_i2o_status_get()
2963 writel( dma_low(pHba->status_block_pa), &msg[6]); in adpt_i2o_status_get()
2964 writel( dma_high(pHba->status_block_pa), &msg[7]); in adpt_i2o_status_get()
2965 writel(sizeof(i2o_status_block), &msg[8]); // 88 bytes in adpt_i2o_status_get()
3045 u32 msg[8]; in adpt_i2o_lct_get() local
3065 msg[0] = EIGHT_WORD_MSG_SIZE|SGL_OFFSET_6; in adpt_i2o_lct_get()
3066 msg[1] = I2O_CMD_LCT_NOTIFY<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_lct_get()
3067 msg[2] = 0; in adpt_i2o_lct_get()
3068 msg[3] = 0; in adpt_i2o_lct_get()
3069 msg[4] = 0xFFFFFFFF; /* All devices */ in adpt_i2o_lct_get()
3070 msg[5] = 0x00000000; /* Report now */ in adpt_i2o_lct_get()
3071 msg[6] = 0xD0000000|pHba->lct_size; in adpt_i2o_lct_get()
3072 msg[7] = (u32)pHba->lct_pa; in adpt_i2o_lct_get()
3074 if ((ret=adpt_i2o_post_wait(pHba, msg, sizeof(msg), 360))) { in adpt_i2o_lct_get()
3287 u32 msg[6]; in adpt_i2o_hrt_get() local
3300 msg[0]= SIX_WORD_MSG_SIZE| SGL_OFFSET_4; in adpt_i2o_hrt_get()
3301 msg[1]= I2O_CMD_HRT_GET<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_hrt_get()
3302 msg[2]= 0; in adpt_i2o_hrt_get()
3303 msg[3]= 0; in adpt_i2o_hrt_get()
3304 msg[4]= (0xD0000000 | size); /* Simple transaction */ in adpt_i2o_hrt_get()
3305 msg[5]= (u32)pHba->hrt_pa; /* Dump it here */ in adpt_i2o_hrt_get()
3307 if ((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg),20))) { in adpt_i2o_hrt_get()
3397 u32 msg[9]; in adpt_i2o_issue_params() local
3401 msg[0] = NINE_WORD_MSG_SIZE | SGL_OFFSET_5; in adpt_i2o_issue_params()
3402 msg[1] = cmd << 24 | HOST_TID << 12 | tid; in adpt_i2o_issue_params()
3403 msg[2] = 0; in adpt_i2o_issue_params()
3404 msg[3] = 0; in adpt_i2o_issue_params()
3405 msg[4] = 0; in adpt_i2o_issue_params()
3406 msg[5] = 0x54000000 | oplen; /* OperationBlock */ in adpt_i2o_issue_params()
3407 msg[6] = (u32)opblk_pa; in adpt_i2o_issue_params()
3408 msg[7] = 0xD0000000 | reslen; /* ResultBlock */ in adpt_i2o_issue_params()
3409 msg[8] = (u32)resblk_pa; in adpt_i2o_issue_params()
3411 if ((wait_status = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 20))) { in adpt_i2o_issue_params()
3432 u32 msg[4]; in adpt_i2o_quiesce_hba() local
3444 msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_quiesce_hba()
3445 msg[1] = I2O_CMD_SYS_QUIESCE<<24|HOST_TID<<12|ADAPTER_TID; in adpt_i2o_quiesce_hba()
3446 msg[2] = 0; in adpt_i2o_quiesce_hba()
3447 msg[3] = 0; in adpt_i2o_quiesce_hba()
3449 if((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 240))) { in adpt_i2o_quiesce_hba()
3466 u32 msg[4]; in adpt_i2o_enable_hba() local
3480 msg[0]=FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; in adpt_i2o_enable_hba()
3481 msg[1]=I2O_CMD_SYS_ENABLE<<24|HOST_TID<<12|ADAPTER_TID; in adpt_i2o_enable_hba()
3482 msg[2]= 0; in adpt_i2o_enable_hba()
3483 msg[3]= 0; in adpt_i2o_enable_hba()
3485 if ((ret = adpt_i2o_post_wait(pHba, msg, sizeof(msg), 240))) { in adpt_i2o_enable_hba()
3499 u32 msg[12]; in adpt_i2o_systab_send() local
3502 msg[0] = I2O_MESSAGE_SIZE(12) | SGL_OFFSET_6; in adpt_i2o_systab_send()
3503 msg[1] = I2O_CMD_SYS_TAB_SET<<24 | HOST_TID<<12 | ADAPTER_TID; in adpt_i2o_systab_send()
3504 msg[2] = 0; in adpt_i2o_systab_send()
3505 msg[3] = 0; in adpt_i2o_systab_send()
3506 msg[4] = (0<<16) | ((pHba->unit+2) << 12); /* Host 0 IOP ID (unit + 2) */ in adpt_i2o_systab_send()
3507 msg[5] = 0; /* Segment 0 */ in adpt_i2o_systab_send()
3514 msg[6] = 0x54000000 | sys_tbl_len; in adpt_i2o_systab_send()
3515 msg[7] = (u32)sys_tbl_pa; in adpt_i2o_systab_send()
3516 msg[8] = 0x54000000 | 0; in adpt_i2o_systab_send()
3517 msg[9] = 0; in adpt_i2o_systab_send()
3518 msg[10] = 0xD4000000 | 0; in adpt_i2o_systab_send()
3519 msg[11] = 0; in adpt_i2o_systab_send()
3521 if ((ret=adpt_i2o_post_wait(pHba, msg, sizeof(msg), 120))) { in adpt_i2o_systab_send()