Lines Matching refs:mb
1115 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_set_target_parameters() local
1124 mb[0] = MBC_SET_TARGET_PARAMETERS; in qla1280_set_target_parameters()
1125 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_set_target_parameters()
1126 mb[2] = nv->bus[bus].target[target].parameter.renegotiate_on_error << 8; in qla1280_set_target_parameters()
1127 mb[2] |= nv->bus[bus].target[target].parameter.stop_queue_on_check << 9; in qla1280_set_target_parameters()
1128 mb[2] |= nv->bus[bus].target[target].parameter.auto_request_sense << 10; in qla1280_set_target_parameters()
1129 mb[2] |= nv->bus[bus].target[target].parameter.tag_queuing << 11; in qla1280_set_target_parameters()
1130 mb[2] |= nv->bus[bus].target[target].parameter.enable_sync << 12; in qla1280_set_target_parameters()
1131 mb[2] |= nv->bus[bus].target[target].parameter.enable_wide << 13; in qla1280_set_target_parameters()
1132 mb[2] |= nv->bus[bus].target[target].parameter.parity_checking << 14; in qla1280_set_target_parameters()
1133 mb[2] |= nv->bus[bus].target[target].parameter.disconnect_allowed << 15; in qla1280_set_target_parameters()
1136 mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5; in qla1280_set_target_parameters()
1137 mb[3] = (nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8); in qla1280_set_target_parameters()
1138 mb[6] = (nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8) | in qla1280_set_target_parameters()
1142 mb[3] = (nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8); in qla1280_set_target_parameters()
1144 mb[3] |= nv->bus[bus].target[target].sync_period; in qla1280_set_target_parameters()
1146 status = qla1280_mailbox_command(ha, mr, mb); in qla1280_set_target_parameters()
1150 mb[0] = MBC_SET_DEVICE_QUEUE; in qla1280_set_target_parameters()
1151 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_set_target_parameters()
1152 mb[1] |= lun; in qla1280_set_target_parameters()
1153 mb[2] = nv->bus[bus].max_queue_depth; in qla1280_set_target_parameters()
1154 mb[3] = nv->bus[bus].target[target].execution_throttle; in qla1280_set_target_parameters()
1155 status |= qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_set_target_parameters()
1552 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_chip_diag() local
1632 mb[0] = MBC_MAILBOX_REGISTER_TEST; in qla1280_chip_diag()
1633 mb[1] = 0xAAAA; in qla1280_chip_diag()
1634 mb[2] = 0x5555; in qla1280_chip_diag()
1635 mb[3] = 0xAA55; in qla1280_chip_diag()
1636 mb[4] = 0x55AA; in qla1280_chip_diag()
1637 mb[5] = 0xA5A5; in qla1280_chip_diag()
1638 mb[6] = 0x5A5A; in qla1280_chip_diag()
1639 mb[7] = 0x2525; in qla1280_chip_diag()
1641 status = qla1280_mailbox_command(ha, 0xff, mb); in qla1280_chip_diag()
1645 if (mb[1] != 0xAAAA || mb[2] != 0x5555 || mb[3] != 0xAA55 || in qla1280_chip_diag()
1646 mb[4] != 0x55AA || mb[5] != 0xA5A5 || mb[6] != 0x5A5A || in qla1280_chip_diag()
1647 mb[7] != 0x2525) { in qla1280_chip_diag()
1667 uint16_t mb[MAILBOX_REGISTER_COUNT], i; in qla1280_load_firmware_pio() local
1683 mb[0] = MBC_WRITE_RAM_WORD; in qla1280_load_firmware_pio()
1684 mb[1] = risc_address + i; in qla1280_load_firmware_pio()
1685 mb[2] = __le16_to_cpu(fw_data[i]); in qla1280_load_firmware_pio()
1687 err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb); in qla1280_load_firmware_pio()
1716 uint16_t mb[MAILBOX_REGISTER_COUNT], cnt; in qla1280_load_firmware_dma() local
1757 mb[0] = LOAD_CMD; in qla1280_load_firmware_dma()
1758 mb[1] = risc_address; in qla1280_load_firmware_dma()
1759 mb[4] = cnt; in qla1280_load_firmware_dma()
1760 mb[3] = ha->request_dma & 0xffff; in qla1280_load_firmware_dma()
1761 mb[2] = (ha->request_dma >> 16) & 0xffff; in qla1280_load_firmware_dma()
1762 mb[7] = upper_32_bits(ha->request_dma) & 0xffff; in qla1280_load_firmware_dma()
1763 mb[6] = upper_32_bits(ha->request_dma) >> 16; in qla1280_load_firmware_dma()
1765 __func__, mb[0], in qla1280_load_firmware_dma()
1767 mb[6], mb[7], mb[2], mb[3]); in qla1280_load_firmware_dma()
1768 err = qla1280_mailbox_command(ha, CMD_ARGS, mb); in qla1280_load_firmware_dma()
1776 mb[0] = DUMP_CMD; in qla1280_load_firmware_dma()
1777 mb[1] = risc_address; in qla1280_load_firmware_dma()
1778 mb[4] = cnt; in qla1280_load_firmware_dma()
1779 mb[3] = p_tbuf & 0xffff; in qla1280_load_firmware_dma()
1780 mb[2] = (p_tbuf >> 16) & 0xffff; in qla1280_load_firmware_dma()
1781 mb[7] = upper_32_bits(p_tbuf) & 0xffff; in qla1280_load_firmware_dma()
1782 mb[6] = upper_32_bits(p_tbuf) >> 16; in qla1280_load_firmware_dma()
1784 err = qla1280_mailbox_command(ha, CMD_ARGS, mb); in qla1280_load_firmware_dma()
1819 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_start_firmware() local
1826 mb[0] = MBC_VERIFY_CHECKSUM; in qla1280_start_firmware()
1828 mb[1] = ha->fwstart; in qla1280_start_firmware()
1829 err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_start_firmware()
1837 mb[0] = MBC_EXECUTE_FIRMWARE; in qla1280_start_firmware()
1838 mb[1] = ha->fwstart; in qla1280_start_firmware()
1839 err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_start_firmware()
1884 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_init_rings() local
1898 mb[0] = MBC_INIT_REQUEST_QUEUE_A64; in qla1280_init_rings()
1899 mb[1] = REQUEST_ENTRY_CNT; in qla1280_init_rings()
1900 mb[3] = ha->request_dma & 0xffff; in qla1280_init_rings()
1901 mb[2] = (ha->request_dma >> 16) & 0xffff; in qla1280_init_rings()
1902 mb[4] = 0; in qla1280_init_rings()
1903 mb[7] = upper_32_bits(ha->request_dma) & 0xffff; in qla1280_init_rings()
1904 mb[6] = upper_32_bits(ha->request_dma) >> 16; in qla1280_init_rings()
1907 &mb[0]))) { in qla1280_init_rings()
1912 mb[0] = MBC_INIT_RESPONSE_QUEUE_A64; in qla1280_init_rings()
1913 mb[1] = RESPONSE_ENTRY_CNT; in qla1280_init_rings()
1914 mb[3] = ha->response_dma & 0xffff; in qla1280_init_rings()
1915 mb[2] = (ha->response_dma >> 16) & 0xffff; in qla1280_init_rings()
1916 mb[5] = 0; in qla1280_init_rings()
1917 mb[7] = upper_32_bits(ha->response_dma) & 0xffff; in qla1280_init_rings()
1918 mb[6] = upper_32_bits(ha->response_dma) >> 16; in qla1280_init_rings()
1921 &mb[0]); in qla1280_init_rings()
2070 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_config_target() local
2075 mb[0] = MBC_SET_TARGET_PARAMETERS; in qla1280_config_target()
2076 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_config_target()
2083 mb[2] = (TP_RENEGOTIATE | TP_AUTO_REQUEST_SENSE | TP_TAGGED_QUEUE in qla1280_config_target()
2087 mb[3] = nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8; in qla1280_config_target()
2089 mb[3] = nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8; in qla1280_config_target()
2090 mb[3] |= nv->bus[bus].target[target].sync_period; in qla1280_config_target()
2091 status = qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_config_target()
2113 mb[0] = MBC_SET_DEVICE_QUEUE; in qla1280_config_target()
2114 mb[1] = (uint16_t)((bus ? target | BIT_7 : target) << 8); in qla1280_config_target()
2115 mb[1] |= lun; in qla1280_config_target()
2116 mb[2] = nv->bus[bus].max_queue_depth; in qla1280_config_target()
2117 mb[3] = nv->bus[bus].target[target].execution_throttle; in qla1280_config_target()
2118 status |= qla1280_mailbox_command(ha, 0x0f, mb); in qla1280_config_target()
2128 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_config_bus() local
2137 mb[0] = MBC_SET_INITIATOR_ID; in qla1280_config_bus()
2138 mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 : in qla1280_config_bus()
2140 status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_config_bus()
2162 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_nvram_config() local
2223 mb[0] = MBC_SET_SYSTEM_PARAMETER; in qla1280_nvram_config()
2224 mb[1] = nv->isp_parameter; in qla1280_nvram_config()
2225 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2229 mb[0] = MBC_SET_CLOCK_RATE; in qla1280_nvram_config()
2230 mb[1] = 40; in qla1280_nvram_config()
2231 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2235 mb[0] = MBC_SET_FIRMWARE_FEATURES; in qla1280_nvram_config()
2236 mb[1] = nv->firmware_feature.f.enable_fast_posting; in qla1280_nvram_config()
2237 mb[1] |= nv->firmware_feature.f.report_lvd_bus_transition << 1; in qla1280_nvram_config()
2238 mb[1] |= nv->firmware_feature.f.disable_synchronous_backoff << 5; in qla1280_nvram_config()
2239 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2242 mb[0] = MBC_SET_RETRY_COUNT; in qla1280_nvram_config()
2243 mb[1] = nv->bus[0].retry_count; in qla1280_nvram_config()
2244 mb[2] = nv->bus[0].retry_delay; in qla1280_nvram_config()
2245 mb[6] = nv->bus[1].retry_count; in qla1280_nvram_config()
2246 mb[7] = nv->bus[1].retry_delay; in qla1280_nvram_config()
2248 BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2251 mb[0] = MBC_SET_ASYNC_DATA_SETUP; in qla1280_nvram_config()
2252 mb[1] = nv->bus[0].config_2.async_data_setup_time; in qla1280_nvram_config()
2253 mb[2] = nv->bus[1].config_2.async_data_setup_time; in qla1280_nvram_config()
2254 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_nvram_config()
2257 mb[0] = MBC_SET_ACTIVE_NEGATION; in qla1280_nvram_config()
2258 mb[1] = 0; in qla1280_nvram_config()
2260 mb[1] |= BIT_5; in qla1280_nvram_config()
2262 mb[1] |= BIT_4; in qla1280_nvram_config()
2263 mb[2] = 0; in qla1280_nvram_config()
2265 mb[2] |= BIT_5; in qla1280_nvram_config()
2267 mb[2] |= BIT_4; in qla1280_nvram_config()
2268 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2270 mb[0] = MBC_SET_DATA_OVERRUN_RECOVERY; in qla1280_nvram_config()
2271 mb[1] = 2; /* Reset SCSI bus and return all outstanding IO */ in qla1280_nvram_config()
2272 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2275 mb[0] = MBC_SET_PCI_CONTROL; in qla1280_nvram_config()
2276 mb[1] = BIT_1; /* Data DMA Channel Burst Enable */ in qla1280_nvram_config()
2277 mb[2] = BIT_1; /* Command DMA Channel Burst Enable */ in qla1280_nvram_config()
2278 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2280 mb[0] = MBC_SET_TAG_AGE_LIMIT; in qla1280_nvram_config()
2281 mb[1] = 8; in qla1280_nvram_config()
2282 status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2285 mb[0] = MBC_SET_SELECTION_TIMEOUT; in qla1280_nvram_config()
2286 mb[1] = nv->bus[0].selection_timeout; in qla1280_nvram_config()
2287 mb[2] = nv->bus[1].selection_timeout; in qla1280_nvram_config()
2288 status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, mb); in qla1280_nvram_config()
2418 qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) in qla1280_mailbox_command() argument
2440 iptr = mb; in qla1280_mailbox_command()
2473 mb[0], ha->mailbox_out[0], RD_REG_WORD(®->istatus)); in qla1280_mailbox_command()
2484 optr = mb; in qla1280_mailbox_command()
2494 "0x%x ****\n", mb[0]); in qla1280_mailbox_command()
2546 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_bus_reset() local
2557 mb[0] = MBC_BUS_RESET; in qla1280_bus_reset()
2558 mb[1] = reset_delay; in qla1280_bus_reset()
2559 mb[2] = (uint16_t) bus; in qla1280_bus_reset()
2560 status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_bus_reset()
2606 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_device_reset() local
2611 mb[0] = MBC_ABORT_TARGET; in qla1280_device_reset()
2612 mb[1] = (bus ? (target | BIT_7) : target) << 8; in qla1280_device_reset()
2613 mb[2] = 1; in qla1280_device_reset()
2614 status = qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); in qla1280_device_reset()
2640 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_abort_command() local
2652 mb[0] = MBC_ABORT_COMMAND; in qla1280_abort_command()
2653 mb[1] = (bus ? target | BIT_7 : target) << 8 | lun; in qla1280_abort_command()
2654 mb[2] = handle >> 16; in qla1280_abort_command()
2655 mb[3] = handle & 0xffff; in qla1280_abort_command()
2656 status = qla1280_mailbox_command(ha, 0x0f, &mb[0]); in qla1280_abort_command()
3889 uint16_t mb[MAILBOX_REGISTER_COUNT]; in qla1280_get_target_parameters() local
3897 mb[0] = MBC_GET_TARGET_PARAMETERS; in qla1280_get_target_parameters()
3898 mb[1] = (uint16_t) (bus ? target | BIT_7 : target); in qla1280_get_target_parameters()
3899 mb[1] <<= 8; in qla1280_get_target_parameters()
3901 &mb[0]); in qla1280_get_target_parameters()
3905 if (mb[3] != 0) { in qla1280_get_target_parameters()
3907 (mb[3] & 0xff), (mb[3] >> 8)); in qla1280_get_target_parameters()
3908 if (mb[2] & BIT_13) in qla1280_get_target_parameters()
3910 if ((mb[2] & BIT_5) && ((mb[6] >> 8) & 0xff) >= 2) in qla1280_get_target_parameters()