Lines Matching refs:mb
1146 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_set_target_parameters() local
1155 mb[0] = MBC_SET_TARGET_PARAMETERS; in qla1280_set_target_parameters()
1156 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_set_target_parameters()
1157 mb[2] = nv->bus[bus].target[target].parameter.renegotiate_on_error << 8; in qla1280_set_target_parameters()
1158 mb[2] |= nv->bus[bus].target[target].parameter.stop_queue_on_check << 9; in qla1280_set_target_parameters()
1159 mb[2] |= nv->bus[bus].target[target].parameter.auto_request_sense << 10; in qla1280_set_target_parameters()
1160 mb[2] |= nv->bus[bus].target[target].parameter.tag_queuing << 11; in qla1280_set_target_parameters()
1161 mb[2] |= nv->bus[bus].target[target].parameter.enable_sync << 12; in qla1280_set_target_parameters()
1162 mb[2] |= nv->bus[bus].target[target].parameter.enable_wide << 13; in qla1280_set_target_parameters()
1163 mb[2] |= nv->bus[bus].target[target].parameter.parity_checking << 14; in qla1280_set_target_parameters()
1164 mb[2] |= nv->bus[bus].target[target].parameter.disconnect_allowed << 15; in qla1280_set_target_parameters()
1167 mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5; in qla1280_set_target_parameters()
1168 mb[3] = (nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8); in qla1280_set_target_parameters()
1169 mb[6] = (nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8) | in qla1280_set_target_parameters()
1173 mb[3] = (nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8); in qla1280_set_target_parameters()
1175 mb[3] |= nv->bus[bus].target[target].sync_period; in qla1280_set_target_parameters()
1177 status = qla1280_mailbox_command(ha, mr, mb); in qla1280_set_target_parameters()
1181 mb[0] = MBC_SET_DEVICE_QUEUE; in qla1280_set_target_parameters()
1182 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_set_target_parameters()
1183 mb[1] |= lun; in qla1280_set_target_parameters()
1184 mb[2] = nv->bus[bus].max_queue_depth; in qla1280_set_target_parameters()
1185 mb[3] = nv->bus[bus].target[target].execution_throttle; in qla1280_set_target_parameters()
1186 status |= qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_set_target_parameters()
1593 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_chip_diag() local
1673 mb[0] = MBC_MAILBOX_REGISTER_TEST; in qla1280_chip_diag()
1674 mb[1] = 0xAAAA; in qla1280_chip_diag()
1675 mb[2] = 0x5555; in qla1280_chip_diag()
1676 mb[3] = 0xAA55; in qla1280_chip_diag()
1677 mb[4] = 0x55AA; in qla1280_chip_diag()
1678 mb[5] = 0xA5A5; in qla1280_chip_diag()
1679 mb[6] = 0x5A5A; in qla1280_chip_diag()
1680 mb[7] = 0x2525; in qla1280_chip_diag()
1682 status = qla1280_mailbox_command(ha, 0xff, mb); in qla1280_chip_diag()
1686 if (mb[1] != 0xAAAA || mb[2] != 0x5555 || mb[3] != 0xAA55 || in qla1280_chip_diag()
1687 mb[4] != 0x55AA || mb[5] != 0xA5A5 || mb[6] != 0x5A5A || in qla1280_chip_diag()
1688 mb[7] != 0x2525) { in qla1280_chip_diag()
1708 uint16_t mb[MAILBOX_REGISTER_COUNT], i; in qla1280_load_firmware_pio() local
1724 mb[0] = MBC_WRITE_RAM_WORD; in qla1280_load_firmware_pio()
1725 mb[1] = risc_address + i; in qla1280_load_firmware_pio()
1726 mb[2] = __le16_to_cpu(fw_data[i]); in qla1280_load_firmware_pio()
1728 err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb); in qla1280_load_firmware_pio()
1747 uint16_t mb[MAILBOX_REGISTER_COUNT], cnt; in qla1280_load_firmware_dma() local
1788 mb[0] = MBC_LOAD_RAM; in qla1280_load_firmware_dma()
1789 mb[1] = risc_address; in qla1280_load_firmware_dma()
1790 mb[4] = cnt; in qla1280_load_firmware_dma()
1791 mb[3] = ha->request_dma & 0xffff; in qla1280_load_firmware_dma()
1792 mb[2] = (ha->request_dma >> 16) & 0xffff; in qla1280_load_firmware_dma()
1793 mb[7] = pci_dma_hi32(ha->request_dma) & 0xffff; in qla1280_load_firmware_dma()
1794 mb[6] = pci_dma_hi32(ha->request_dma) >> 16; in qla1280_load_firmware_dma()
1796 __func__, mb[0], in qla1280_load_firmware_dma()
1798 mb[6], mb[7], mb[2], mb[3]); in qla1280_load_firmware_dma()
1800 BIT_1 | BIT_0, mb); in qla1280_load_firmware_dma()
1808 mb[0] = MBC_DUMP_RAM; in qla1280_load_firmware_dma()
1809 mb[1] = risc_address; in qla1280_load_firmware_dma()
1810 mb[4] = cnt; in qla1280_load_firmware_dma()
1811 mb[3] = p_tbuf & 0xffff; in qla1280_load_firmware_dma()
1812 mb[2] = (p_tbuf >> 16) & 0xffff; in qla1280_load_firmware_dma()
1813 mb[7] = pci_dma_hi32(p_tbuf) & 0xffff; in qla1280_load_firmware_dma()
1814 mb[6] = pci_dma_hi32(p_tbuf) >> 16; in qla1280_load_firmware_dma()
1817 BIT_1 | BIT_0, mb); in qla1280_load_firmware_dma()
1852 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_start_firmware() local
1859 mb[0] = MBC_VERIFY_CHECKSUM; in qla1280_start_firmware()
1861 mb[1] = ha->fwstart; in qla1280_start_firmware()
1862 err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_start_firmware()
1870 mb[0] = MBC_EXECUTE_FIRMWARE; in qla1280_start_firmware()
1871 mb[1] = ha->fwstart; in qla1280_start_firmware()
1872 err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_start_firmware()
1917 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_init_rings() local
1931 mb[0] = MBC_INIT_REQUEST_QUEUE_A64; in qla1280_init_rings()
1932 mb[1] = REQUEST_ENTRY_CNT; in qla1280_init_rings()
1933 mb[3] = ha->request_dma & 0xffff; in qla1280_init_rings()
1934 mb[2] = (ha->request_dma >> 16) & 0xffff; in qla1280_init_rings()
1935 mb[4] = 0; in qla1280_init_rings()
1936 mb[7] = pci_dma_hi32(ha->request_dma) & 0xffff; in qla1280_init_rings()
1937 mb[6] = pci_dma_hi32(ha->request_dma) >> 16; in qla1280_init_rings()
1940 &mb[0]))) { in qla1280_init_rings()
1945 mb[0] = MBC_INIT_RESPONSE_QUEUE_A64; in qla1280_init_rings()
1946 mb[1] = RESPONSE_ENTRY_CNT; in qla1280_init_rings()
1947 mb[3] = ha->response_dma & 0xffff; in qla1280_init_rings()
1948 mb[2] = (ha->response_dma >> 16) & 0xffff; in qla1280_init_rings()
1949 mb[5] = 0; in qla1280_init_rings()
1950 mb[7] = pci_dma_hi32(ha->response_dma) & 0xffff; in qla1280_init_rings()
1951 mb[6] = pci_dma_hi32(ha->response_dma) >> 16; in qla1280_init_rings()
1954 &mb[0]); in qla1280_init_rings()
2103 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_config_target() local
2108 mb[0] = MBC_SET_TARGET_PARAMETERS; in qla1280_config_target()
2109 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_config_target()
2116 mb[2] = (TP_RENEGOTIATE | TP_AUTO_REQUEST_SENSE | TP_TAGGED_QUEUE in qla1280_config_target()
2120 mb[3] = nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8; in qla1280_config_target()
2122 mb[3] = nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8; in qla1280_config_target()
2123 mb[3] |= nv->bus[bus].target[target].sync_period; in qla1280_config_target()
2124 status = qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_config_target()
2146 mb[0] = MBC_SET_DEVICE_QUEUE; in qla1280_config_target()
2147 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_config_target()
2148 mb[1] |= lun; in qla1280_config_target()
2149 mb[2] = nv->bus[bus].max_queue_depth; in qla1280_config_target()
2150 mb[3] = nv->bus[bus].target[target].execution_throttle; in qla1280_config_target()
2151 status |= qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_config_target()
2161 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_config_bus() local
2170 mb[0] = MBC_SET_INITIATOR_ID; in qla1280_config_bus()
2171 mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 : in qla1280_config_bus()
2173 status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_config_bus()
2195 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_nvram_config() local
2257 mb[0] = MBC_SET_SYSTEM_PARAMETER; in qla1280_nvram_config()
2258 mb[1] = nv->isp_parameter; in qla1280_nvram_config()
2259 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2263 mb[0] = MBC_SET_CLOCK_RATE; in qla1280_nvram_config()
2264 mb[1] = 40; in qla1280_nvram_config()
2265 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2269 mb[0] = MBC_SET_FIRMWARE_FEATURES; in qla1280_nvram_config()
2270 mb[1] = nv->firmware_feature.f.enable_fast_posting; in qla1280_nvram_config()
2271 mb[1] |= nv->firmware_feature.f.report_lvd_bus_transition << 1; in qla1280_nvram_config()
2272 mb[1] |= nv->firmware_feature.f.disable_synchronous_backoff << 5; in qla1280_nvram_config()
2277 mb[1] |= nv->firmware_feature.f.unused_9 << 9; /* XXX */ in qla1280_nvram_config()
2280 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2283 mb[0] = MBC_SET_RETRY_COUNT; in qla1280_nvram_config()
2284 mb[1] = nv->bus[0].retry_count; in qla1280_nvram_config()
2285 mb[2] = nv->bus[0].retry_delay; in qla1280_nvram_config()
2286 mb[6] = nv->bus[1].retry_count; in qla1280_nvram_config()
2287 mb[7] = nv->bus[1].retry_delay; in qla1280_nvram_config()
2289 BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2292 mb[0] = MBC_SET_ASYNC_DATA_SETUP; in qla1280_nvram_config()
2293 mb[1] = nv->bus[0].config_2.async_data_setup_time; in qla1280_nvram_config()
2294 mb[2] = nv->bus[1].config_2.async_data_setup_time; in qla1280_nvram_config()
2295 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2298 mb[0] = MBC_SET_ACTIVE_NEGATION; in qla1280_nvram_config()
2299 mb[1] = 0; in qla1280_nvram_config()
2301 mb[1] |= BIT_5; in qla1280_nvram_config()
2303 mb[1] |= BIT_4; in qla1280_nvram_config()
2304 mb[2] = 0; in qla1280_nvram_config()
2306 mb[2] |= BIT_5; in qla1280_nvram_config()
2308 mb[2] |= BIT_4; in qla1280_nvram_config()
2309 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2311 mb[0] = MBC_SET_DATA_OVERRUN_RECOVERY; in qla1280_nvram_config()
2312 mb[1] = 2; /* Reset SCSI bus and return all outstanding IO */ in qla1280_nvram_config()
2313 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2316 mb[0] = MBC_SET_PCI_CONTROL; in qla1280_nvram_config()
2317 mb[1] = BIT_1; /* Data DMA Channel Burst Enable */ in qla1280_nvram_config()
2318 mb[2] = BIT_1; /* Command DMA Channel Burst Enable */ in qla1280_nvram_config()
2319 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2321 mb[0] = MBC_SET_TAG_AGE_LIMIT; in qla1280_nvram_config()
2322 mb[1] = 8; in qla1280_nvram_config()
2323 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2326 mb[0] = MBC_SET_SELECTION_TIMEOUT; in qla1280_nvram_config()
2327 mb[1] = nv->bus[0].selection_timeout; in qla1280_nvram_config()
2328 mb[2] = nv->bus[1].selection_timeout; in qla1280_nvram_config()
2329 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2459 qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) in qla1280_mailbox_command() argument
2482 iptr = mb; in qla1280_mailbox_command()
2515 mb[0], ha->mailbox_out[0], RD_REG_WORD(®->istatus)); in qla1280_mailbox_command()
2526 optr = mb; in qla1280_mailbox_command()
2536 "0x%x ****\n", mb[0]); in qla1280_mailbox_command()
2588 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_bus_reset() local
2599 mb[0] = MBC_BUS_RESET; in qla1280_bus_reset()
2600 mb[1] = reset_delay; in qla1280_bus_reset()
2601 mb[2] = (uint16_t) bus; in qla1280_bus_reset()
2602 status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_bus_reset()
2648 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_device_reset() local
2653 mb[0] = MBC_ABORT_TARGET; in qla1280_device_reset()
2654 mb[1] = (bus ? (target | BIT_7) : target) << 8; in qla1280_device_reset()
2655 mb[2] = 1; in qla1280_device_reset()
2656 status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_device_reset()
2682 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_abort_command() local
2694 mb[0] = MBC_ABORT_COMMAND; in qla1280_abort_command()
2695 mb[1] = (bus ? target | BIT_7 : target) << 8 | lun; in qla1280_abort_command()
2696 mb[2] = handle >> 16; in qla1280_abort_command()
2697 mb[3] = handle & 0xffff; in qla1280_abort_command()
2698 status = qla1280_mailbox_command(ha, 0x0f, &mb[0]); in qla1280_abort_command()
3963 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_get_target_parameters() local
3971 mb[0] = MBC_GET_TARGET_PARAMETERS; in qla1280_get_target_parameters()
3972 mb[1] = (uint16_t) (bus ? target | BIT_7 : target); in qla1280_get_target_parameters()
3973 mb[1] <<= 8; in qla1280_get_target_parameters()
3975 &mb[0]); in qla1280_get_target_parameters()
3979 if (mb[3] != 0) { in qla1280_get_target_parameters()
3981 (mb[3] & 0xff), (mb[3] >> 8)); in qla1280_get_target_parameters()
3982 if (mb[2] & BIT_13) in qla1280_get_target_parameters()
3984 if ((mb[2] & BIT_5) && ((mb[6] >> 8) & 0xff) >= 2) in qla1280_get_target_parameters()