mbcp 127 drivers/staging/qlge/qlge_mpi.c static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 134 drivers/staging/qlge/qlge_mpi.c for (i = 0; i < mbcp->out_count; i++) { mbcp 137 drivers/staging/qlge/qlge_mpi.c &mbcp->mbox_out[i]); mbcp 167 drivers/staging/qlge/qlge_mpi.c static int ql_exec_mb_cmd(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 185 drivers/staging/qlge/qlge_mpi.c for (i = 0; i < mbcp->in_count; i++) { mbcp 187 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[i]); mbcp 210 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &qdev->idc_mbc; mbcp 216 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 4; mbcp 217 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 239 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &qdev->idc_mbc; mbcp 240 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 4; mbcp 241 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 255 drivers/staging/qlge/qlge_mpi.c static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 258 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 2; mbcp 260 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 267 drivers/staging/qlge/qlge_mpi.c qdev->link_status = mbcp->mbox_out[1]; mbcp 302 drivers/staging/qlge/qlge_mpi.c static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 306 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 3; mbcp 308 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 315 drivers/staging/qlge/qlge_mpi.c static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 319 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 5; mbcp 321 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 330 drivers/staging/qlge/qlge_mpi.c static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 334 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 336 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 345 drivers/staging/qlge/qlge_mpi.c static int ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 349 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 6; mbcp 351 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 357 drivers/staging/qlge/qlge_mpi.c for (i = 0; i < mbcp->out_count; i++) mbcp 359 drivers/staging/qlge/qlge_mpi.c i, mbcp->mbox_out[i]); mbcp 366 drivers/staging/qlge/qlge_mpi.c static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 370 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 2; mbcp 372 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 377 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_out[1]); mbcp 378 drivers/staging/qlge/qlge_mpi.c qdev->fw_rev_id = mbcp->mbox_out[1]; mbcp 392 drivers/staging/qlge/qlge_mpi.c static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 395 drivers/staging/qlge/qlge_mpi.c int orig_count = mbcp->out_count; mbcp 398 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 399 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 407 drivers/staging/qlge/qlge_mpi.c switch (mbcp->mbox_out[0]) { mbcp 426 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = orig_count; mbcp 427 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 450 drivers/staging/qlge/qlge_mpi.c ql_link_up(qdev, mbcp); mbcp 454 drivers/staging/qlge/qlge_mpi.c ql_link_down(qdev, mbcp); mbcp 461 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_in[0] == MB_CMD_EX_FW) { mbcp 462 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = orig_count; mbcp 463 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 464 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_out[0] = MB_CMD_STS_GOOD; mbcp 467 drivers/staging/qlge/qlge_mpi.c ql_init_fw_done(qdev, mbcp); mbcp 471 drivers/staging/qlge/qlge_mpi.c ql_sfp_in(qdev, mbcp); mbcp 475 drivers/staging/qlge/qlge_mpi.c ql_sfp_out(qdev, mbcp); mbcp 485 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_in[0] == MB_CMD_EX_FW) { mbcp 486 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = orig_count; mbcp 487 drivers/staging/qlge/qlge_mpi.c status = ql_get_mb_sts(qdev, mbcp); mbcp 488 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_out[0] = MB_CMD_STS_ERR; mbcp 504 drivers/staging/qlge/qlge_mpi.c ql_aen_lost(qdev, mbcp); mbcp 512 drivers/staging/qlge/qlge_mpi.c "Unsupported AE %.08x.\n", mbcp->mbox_out[0]); mbcp 523 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = orig_count; mbcp 532 drivers/staging/qlge/qlge_mpi.c static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp 543 drivers/staging/qlge/qlge_mpi.c status = ql_exec_mb_cmd(qdev, mbcp); mbcp 551 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_in[0] == MB_CMD_MAKE_SYS_ERR) mbcp 571 drivers/staging/qlge/qlge_mpi.c status = ql_mpi_handler(qdev, mbcp); mbcp 579 drivers/staging/qlge/qlge_mpi.c if (((mbcp->mbox_out[0] & 0x0000f000) == mbcp 581 drivers/staging/qlge/qlge_mpi.c ((mbcp->mbox_out[0] & 0x0000f000) == mbcp 598 drivers/staging/qlge/qlge_mpi.c if (((mbcp->mbox_out[0] & 0x0000f000) != mbcp 600 drivers/staging/qlge/qlge_mpi.c ((mbcp->mbox_out[0] & 0x0000f000) != mbcp 618 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 621 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 623 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 624 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 3; mbcp 626 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_ABOUT_FW; mbcp 628 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 632 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 639 drivers/staging/qlge/qlge_mpi.c qdev->fw_rev_id = mbcp->mbox_out[1]; mbcp 650 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 653 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 655 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 656 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 2; mbcp 658 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_GET_FW_STATE; mbcp 660 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 664 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 674 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[1] & 1) { mbcp 689 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 692 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 694 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 5; mbcp 695 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 697 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_IDC_ACK; mbcp 698 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = qdev->idc_mbc.mbox_out[1]; mbcp 699 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[2] = qdev->idc_mbc.mbox_out[2]; mbcp 700 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[3] = qdev->idc_mbc.mbox_out[3]; mbcp 701 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[4] = qdev->idc_mbc.mbox_out[4]; mbcp 703 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 707 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 721 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 724 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 726 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 3; mbcp 727 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 729 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_SET_PORT_CFG; mbcp 730 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = qdev->link_config; mbcp 731 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[2] = qdev->max_frame_size; mbcp 734 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 738 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == MB_CMD_STS_INTRMDT) { mbcp 741 drivers/staging/qlge/qlge_mpi.c } else if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 754 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 756 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 758 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 9; mbcp 759 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 761 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_DUMP_RISC_RAM; mbcp 762 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = LSW(addr); mbcp 763 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[2] = MSW(req_dma); mbcp 764 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[3] = LSW(req_dma); mbcp 765 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[4] = MSW(size); mbcp 766 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[5] = LSW(size); mbcp 767 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[6] = MSW(MSD(req_dma)); mbcp 768 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[7] = LSW(MSD(req_dma)); mbcp 769 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[8] = MSW(addr); mbcp 772 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 776 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 812 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 815 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 817 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 818 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 3; mbcp 820 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_GET_PORT_CFG; mbcp 822 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 826 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 833 drivers/staging/qlge/qlge_mpi.c qdev->link_config = mbcp->mbox_out[1]; mbcp 834 drivers/staging/qlge/qlge_mpi.c qdev->max_frame_size = mbcp->mbox_out[2]; mbcp 842 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 845 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 847 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 2; mbcp 848 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 850 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_SET_WOL_MODE; mbcp 851 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = wol; mbcp 854 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 858 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 868 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 872 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 874 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 8; mbcp 875 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 877 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_SET_WOL_MAGIC; mbcp 879 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = (u32)addr[0]; mbcp 880 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[2] = (u32)addr[1]; mbcp 881 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[3] = (u32)addr[2]; mbcp 882 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[4] = (u32)addr[3]; mbcp 883 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[5] = (u32)addr[4]; mbcp 884 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[6] = (u32)addr[5]; mbcp 885 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[7] = 0; mbcp 887 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = 0; mbcp 888 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[2] = 1; mbcp 889 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[3] = 1; mbcp 890 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[4] = 1; mbcp 891 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[5] = 1; mbcp 892 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[6] = 1; mbcp 893 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[7] = 0; mbcp 896 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 900 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 918 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &qdev->idc_mbc; mbcp 934 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == AEN_IDC_EXT) { mbcp 937 drivers/staging/qlge/qlge_mpi.c wait_time += (mbcp->mbox_out[1] >> 8) & 0x0000000f; mbcp 938 drivers/staging/qlge/qlge_mpi.c } else if (mbcp->mbox_out[0] == AEN_IDC_CMPLT) { mbcp 945 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_out[0]); mbcp 957 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 960 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 962 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 2; mbcp 963 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 965 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_SET_LED_CFG; mbcp 966 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = led_config; mbcp 969 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 973 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 985 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 988 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 990 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 991 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 2; mbcp 993 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_GET_LED_CFG; mbcp 995 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 999 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { mbcp 1004 drivers/staging/qlge/qlge_mpi.c qdev->led_config = mbcp->mbox_out[1]; mbcp 1012 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 1015 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 1017 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 1018 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 2; mbcp 1020 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_SET_MGMNT_TFK_CTL; mbcp 1021 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[1] = control; mbcp 1023 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 1027 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == MB_CMD_STS_GOOD) mbcp 1030 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) { mbcp 1034 drivers/staging/qlge/qlge_mpi.c } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) { mbcp 1049 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 1052 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 1055 drivers/staging/qlge/qlge_mpi.c mbcp->in_count = 1; mbcp 1056 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 1058 drivers/staging/qlge/qlge_mpi.c mbcp->mbox_in[0] = MB_CMD_GET_MGMNT_TFK_CTL; mbcp 1060 drivers/staging/qlge/qlge_mpi.c status = ql_mailbox_command(qdev, mbcp); mbcp 1064 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == MB_CMD_STS_GOOD) { mbcp 1065 drivers/staging/qlge/qlge_mpi.c *control = mbcp->mbox_in[1]; mbcp 1069 drivers/staging/qlge/qlge_mpi.c if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) { mbcp 1073 drivers/staging/qlge/qlge_mpi.c } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) { mbcp 1164 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &qdev->idc_mbc; mbcp 1168 drivers/staging/qlge/qlge_mpi.c aen = mbcp->mbox_out[1] >> 16; mbcp 1169 drivers/staging/qlge/qlge_mpi.c timeout = (mbcp->mbox_out[1] >> 8) & 0xf; mbcp 1239 drivers/staging/qlge/qlge_mpi.c struct mbox_params *mbcp = &mbc; mbcp 1247 drivers/staging/qlge/qlge_mpi.c memset(mbcp, 0, sizeof(struct mbox_params)); mbcp 1248 drivers/staging/qlge/qlge_mpi.c mbcp->out_count = 1; mbcp 1252 drivers/staging/qlge/qlge_mpi.c err = ql_mpi_handler(qdev, mbcp);