Lines Matching refs:param

177 static int qlogicpti_mbox_command(struct qlogicpti *qpti, u_short param[], int force)  in qlogicpti_mbox_command()  argument
182 if (mbox_param[param[0]] == 0) in qlogicpti_mbox_command()
201 switch (mbox_param[param[0]] >> 4) { in qlogicpti_mbox_command()
202 case 6: sbus_writew(param[5], qpti->qregs + MBOX5); in qlogicpti_mbox_command()
204 case 5: sbus_writew(param[4], qpti->qregs + MBOX4); in qlogicpti_mbox_command()
206 case 4: sbus_writew(param[3], qpti->qregs + MBOX3); in qlogicpti_mbox_command()
208 case 3: sbus_writew(param[2], qpti->qregs + MBOX2); in qlogicpti_mbox_command()
210 case 2: sbus_writew(param[1], qpti->qregs + MBOX1); in qlogicpti_mbox_command()
212 case 1: sbus_writew(param[0], qpti->qregs + MBOX0); in qlogicpti_mbox_command()
235 qpti->qpti_id, param[0]); in qlogicpti_mbox_command()
249 qpti->qpti_id, param[0]); in qlogicpti_mbox_command()
257 qpti->qpti_id, param[0]); in qlogicpti_mbox_command()
260 switch (mbox_param[param[0]] & 0xf) { in qlogicpti_mbox_command()
261 case 6: param[5] = sbus_readw(qpti->qregs + MBOX5); in qlogicpti_mbox_command()
263 case 5: param[4] = sbus_readw(qpti->qregs + MBOX4); in qlogicpti_mbox_command()
265 case 4: param[3] = sbus_readw(qpti->qregs + MBOX3); in qlogicpti_mbox_command()
267 case 3: param[2] = sbus_readw(qpti->qregs + MBOX2); in qlogicpti_mbox_command()
269 case 2: param[1] = sbus_readw(qpti->qregs + MBOX1); in qlogicpti_mbox_command()
271 case 1: param[0] = sbus_readw(qpti->qregs + MBOX0); in qlogicpti_mbox_command()
329 u_short param[6]; in qlogicpti_reset_hardware() local
380 param[0] = MBOX_EXEC_FIRMWARE; in qlogicpti_reset_hardware()
381 param[1] = risc_code_addr; in qlogicpti_reset_hardware()
382 if (qlogicpti_mbox_command(qpti, param, 1)) { in qlogicpti_reset_hardware()
390 param[0] = MBOX_SET_INIT_SCSI_ID; in qlogicpti_reset_hardware()
391 param[1] = qpti->host_param.initiator_scsi_id; in qlogicpti_reset_hardware()
392 if (qlogicpti_mbox_command(qpti, param, 1) || in qlogicpti_reset_hardware()
393 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_reset_hardware()
403 param[0] = MBOX_INIT_RES_QUEUE; in qlogicpti_reset_hardware()
404 param[1] = RES_QUEUE_LEN + 1; in qlogicpti_reset_hardware()
405 param[2] = (u_short) (qpti->res_dvma >> 16); in qlogicpti_reset_hardware()
406 param[3] = (u_short) (qpti->res_dvma & 0xffff); in qlogicpti_reset_hardware()
407 param[4] = param[5] = 0; in qlogicpti_reset_hardware()
408 if (qlogicpti_mbox_command(qpti, param, 1)) { in qlogicpti_reset_hardware()
415 param[0] = MBOX_INIT_REQ_QUEUE; in qlogicpti_reset_hardware()
416 param[1] = QLOGICPTI_REQ_QUEUE_LEN + 1; in qlogicpti_reset_hardware()
417 param[2] = (u_short) (qpti->req_dvma >> 16); in qlogicpti_reset_hardware()
418 param[3] = (u_short) (qpti->req_dvma & 0xffff); in qlogicpti_reset_hardware()
419 param[4] = param[5] = 0; in qlogicpti_reset_hardware()
420 if (qlogicpti_mbox_command(qpti, param, 1)) { in qlogicpti_reset_hardware()
427 param[0] = MBOX_SET_RETRY_COUNT; in qlogicpti_reset_hardware()
428 param[1] = qpti->host_param.retry_count; in qlogicpti_reset_hardware()
429 param[2] = qpti->host_param.retry_delay; in qlogicpti_reset_hardware()
430 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
432 param[0] = MBOX_SET_TAG_AGE_LIMIT; in qlogicpti_reset_hardware()
433 param[1] = qpti->host_param.tag_aging; in qlogicpti_reset_hardware()
434 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
437 param[0] = MBOX_GET_DEV_QUEUE_PARAMS; in qlogicpti_reset_hardware()
438 param[1] = (i << 8); in qlogicpti_reset_hardware()
439 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
442 param[0] = MBOX_GET_FIRMWARE_STATUS; in qlogicpti_reset_hardware()
443 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
445 param[0] = MBOX_SET_SELECT_TIMEOUT; in qlogicpti_reset_hardware()
446 param[1] = qpti->host_param.selection_timeout; in qlogicpti_reset_hardware()
447 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
450 param[0] = MBOX_SET_TARGET_PARAMS; in qlogicpti_reset_hardware()
451 param[1] = (i << 8); in qlogicpti_reset_hardware()
452 param[2] = (qpti->dev_param[i].device_flags << 8); in qlogicpti_reset_hardware()
456 param[2] |= 0xc0; in qlogicpti_reset_hardware()
457 param[3] = 0; /* no offset, we do not have sync mode yet */ in qlogicpti_reset_hardware()
458 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
464 param[0] = MBOX_BUS_RESET; in qlogicpti_reset_hardware()
465 param[1] = qpti->host_param.bus_reset_delay; in qlogicpti_reset_hardware()
466 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_reset_hardware()
482 unsigned short param[6]; in qlogicpti_load_firmware() local
559 param[0] = MBOX_STOP_FIRMWARE; in qlogicpti_load_firmware()
560 param[1] = param[2] = param[3] = param[4] = param[5] = 0; in qlogicpti_load_firmware()
561 if (qlogicpti_mbox_command(qpti, param, 1)) { in qlogicpti_load_firmware()
570 param[0] = MBOX_WRITE_RAM_WORD; in qlogicpti_load_firmware()
571 param[1] = risc_code_addr + i; in qlogicpti_load_firmware()
572 param[2] = __le16_to_cpu(fw_data[i]); in qlogicpti_load_firmware()
573 if (qlogicpti_mbox_command(qpti, param, 1) || in qlogicpti_load_firmware()
574 param[0] != MBOX_COMMAND_COMPLETE) { in qlogicpti_load_firmware()
591 param[0] = MBOX_VERIFY_CHECKSUM; in qlogicpti_load_firmware()
592 param[1] = risc_code_addr; in qlogicpti_load_firmware()
593 if (qlogicpti_mbox_command(qpti, param, 1) || in qlogicpti_load_firmware()
594 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_load_firmware()
602 param[0] = MBOX_EXEC_FIRMWARE; in qlogicpti_load_firmware()
603 param[1] = risc_code_addr; in qlogicpti_load_firmware()
604 qlogicpti_mbox_command(qpti, param, 1); in qlogicpti_load_firmware()
606 param[0] = MBOX_ABOUT_FIRMWARE; in qlogicpti_load_firmware()
607 if (qlogicpti_mbox_command(qpti, param, 1) || in qlogicpti_load_firmware()
608 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_load_firmware()
616 qpti->fware_majrev = param[1]; in qlogicpti_load_firmware()
617 qpti->fware_minrev = param[2]; in qlogicpti_load_firmware()
618 qpti->fware_micrev = param[3]; in qlogicpti_load_firmware()
621 param[0] = MBOX_SET_CLOCK_RATE; in qlogicpti_load_firmware()
622 param[1] = qpti->clock; in qlogicpti_load_firmware()
623 if (qlogicpti_mbox_command(qpti, param, 1) || in qlogicpti_load_firmware()
624 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_load_firmware()
633 param[0] = MBOX_WRITE_RAM_WORD; in qlogicpti_load_firmware()
634 param[1] = 0xff80; in qlogicpti_load_firmware()
635 param[2] = (unsigned short) qpti->scsi_id; in qlogicpti_load_firmware()
636 qlogicpti_mbox_command(qpti, param, 1); in qlogicpti_load_firmware()
638 param[0] = MBOX_WRITE_RAM_WORD; in qlogicpti_load_firmware()
639 param[1] = 0xff00; in qlogicpti_load_firmware()
640 param[2] = (unsigned short) 3; in qlogicpti_load_firmware()
641 qlogicpti_mbox_command(qpti, param, 1); in qlogicpti_load_firmware()
982 u_short param[6]; in qlogicpti_slave_configure() local
996 param[0] = MBOX_SET_TARGET_PARAMS; in qlogicpti_slave_configure()
997 param[1] = (tgt << 8); in qlogicpti_slave_configure()
998 param[2] = (qpti->dev_param[tgt].device_flags << 8); in qlogicpti_slave_configure()
1000 param[3] = (qpti->dev_param[tgt].synchronous_offset << 8) | in qlogicpti_slave_configure()
1003 param[3] = 0; in qlogicpti_slave_configure()
1005 qlogicpti_mbox_command(qpti, param, 0); in qlogicpti_slave_configure()
1228 u_short param[6]; in qlogicpti_abort() local
1248 param[0] = MBOX_ABORT; in qlogicpti_abort()
1249 param[1] = (((u_short) Cmnd->device->id) << 8) | Cmnd->device->lun; in qlogicpti_abort()
1250 param[2] = cmd_cookie >> 16; in qlogicpti_abort()
1251 param[3] = cmd_cookie & 0xffff; in qlogicpti_abort()
1252 if (qlogicpti_mbox_command(qpti, param, 0) || in qlogicpti_abort()
1253 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_abort()
1255 qpti->qpti_id, param[0]); in qlogicpti_abort()
1266 u_short param[6]; in qlogicpti_reset() local
1276 param[0] = MBOX_BUS_RESET; in qlogicpti_reset()
1277 param[1] = qpti->host_param.bus_reset_delay; in qlogicpti_reset()
1278 if (qlogicpti_mbox_command(qpti, param, 0) || in qlogicpti_reset()
1279 (param[0] != MBOX_COMMAND_COMPLETE)) { in qlogicpti_reset()
1281 qpti->qpti_id, param[0]); in qlogicpti_reset()