qpti 140 drivers/scsi/qlogicpti.c static inline void qlogicpti_enable_irqs(struct qlogicpti *qpti) qpti 143 drivers/scsi/qlogicpti.c qpti->qregs + SBUS_CTRL); qpti 146 drivers/scsi/qlogicpti.c static inline void qlogicpti_disable_irqs(struct qlogicpti *qpti) qpti 148 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_CTRL); qpti 151 drivers/scsi/qlogicpti.c static inline void set_sbus_cfg1(struct qlogicpti *qpti) qpti 154 drivers/scsi/qlogicpti.c u8 bursts = qpti->bursts; qpti 174 drivers/scsi/qlogicpti.c sbus_writew(val, qpti->qregs + SBUS_CFG1); qpti 177 drivers/scsi/qlogicpti.c static int qlogicpti_mbox_command(struct qlogicpti *qpti, u_short param[], int force) qpti 186 drivers/scsi/qlogicpti.c tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); qpti 188 drivers/scsi/qlogicpti.c sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); qpti 192 drivers/scsi/qlogicpti.c while (--loop_count && (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_HIRQ)) { qpti 198 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 202 drivers/scsi/qlogicpti.c case 6: sbus_writew(param[5], qpti->qregs + MBOX5); qpti 204 drivers/scsi/qlogicpti.c case 5: sbus_writew(param[4], qpti->qregs + MBOX4); qpti 206 drivers/scsi/qlogicpti.c case 4: sbus_writew(param[3], qpti->qregs + MBOX3); qpti 208 drivers/scsi/qlogicpti.c case 3: sbus_writew(param[2], qpti->qregs + MBOX2); qpti 210 drivers/scsi/qlogicpti.c case 2: sbus_writew(param[1], qpti->qregs + MBOX1); qpti 212 drivers/scsi/qlogicpti.c case 1: sbus_writew(param[0], qpti->qregs + MBOX0); qpti 216 drivers/scsi/qlogicpti.c tmp = sbus_readw(qpti->qregs + HCCTRL); qpti 218 drivers/scsi/qlogicpti.c sbus_writew(tmp, qpti->qregs + HCCTRL); qpti 221 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); qpti 224 drivers/scsi/qlogicpti.c tmp = sbus_readw(qpti->qregs + HCCTRL); qpti 226 drivers/scsi/qlogicpti.c sbus_writew(tmp, qpti->qregs + HCCTRL); qpti 231 drivers/scsi/qlogicpti.c (sbus_readw(qpti->qregs + HCCTRL) & HCCTRL_CRIRQ)) qpti 235 drivers/scsi/qlogicpti.c qpti->qpti_id, param[0]); qpti 240 drivers/scsi/qlogicpti.c !(sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK)) { qpti 244 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + MBOX0) & 0x4000) qpti 249 drivers/scsi/qlogicpti.c qpti->qpti_id, param[0]); qpti 253 drivers/scsi/qlogicpti.c while (--loop_count && (sbus_readw(qpti->qregs + MBOX0) == 0x04)) qpti 257 drivers/scsi/qlogicpti.c qpti->qpti_id, param[0]); qpti 261 drivers/scsi/qlogicpti.c case 6: param[5] = sbus_readw(qpti->qregs + MBOX5); qpti 263 drivers/scsi/qlogicpti.c case 5: param[4] = sbus_readw(qpti->qregs + MBOX4); qpti 265 drivers/scsi/qlogicpti.c case 4: param[3] = sbus_readw(qpti->qregs + MBOX3); qpti 267 drivers/scsi/qlogicpti.c case 3: param[2] = sbus_readw(qpti->qregs + MBOX2); qpti 269 drivers/scsi/qlogicpti.c case 2: param[1] = sbus_readw(qpti->qregs + MBOX1); qpti 271 drivers/scsi/qlogicpti.c case 1: param[0] = sbus_readw(qpti->qregs + MBOX0); qpti 275 drivers/scsi/qlogicpti.c tmp = sbus_readw(qpti->qregs + HCCTRL); qpti 277 drivers/scsi/qlogicpti.c sbus_writew(tmp, qpti->qregs + HCCTRL); qpti 280 drivers/scsi/qlogicpti.c tmp = sbus_readw(qpti->qregs + SBUS_SEMAPHORE); qpti 282 drivers/scsi/qlogicpti.c sbus_writew(tmp, qpti->qregs + SBUS_SEMAPHORE); qpti 288 drivers/scsi/qlogicpti.c static inline void qlogicpti_set_hostdev_defaults(struct qlogicpti *qpti) qpti 292 drivers/scsi/qlogicpti.c qpti->host_param.initiator_scsi_id = qpti->scsi_id; qpti 293 drivers/scsi/qlogicpti.c qpti->host_param.bus_reset_delay = 3; qpti 294 drivers/scsi/qlogicpti.c qpti->host_param.retry_count = 0; qpti 295 drivers/scsi/qlogicpti.c qpti->host_param.retry_delay = 5; qpti 296 drivers/scsi/qlogicpti.c qpti->host_param.async_data_setup_time = 3; qpti 297 drivers/scsi/qlogicpti.c qpti->host_param.req_ack_active_negation = 1; qpti 298 drivers/scsi/qlogicpti.c qpti->host_param.data_line_active_negation = 1; qpti 299 drivers/scsi/qlogicpti.c qpti->host_param.data_dma_burst_enable = 1; qpti 300 drivers/scsi/qlogicpti.c qpti->host_param.command_dma_burst_enable = 1; qpti 301 drivers/scsi/qlogicpti.c qpti->host_param.tag_aging = 8; qpti 302 drivers/scsi/qlogicpti.c qpti->host_param.selection_timeout = 250; qpti 303 drivers/scsi/qlogicpti.c qpti->host_param.max_queue_depth = 256; qpti 313 drivers/scsi/qlogicpti.c qpti->dev_param[i].device_flags = 0xcd; qpti 314 drivers/scsi/qlogicpti.c qpti->dev_param[i].execution_throttle = 16; qpti 315 drivers/scsi/qlogicpti.c if (qpti->ultra) { qpti 316 drivers/scsi/qlogicpti.c qpti->dev_param[i].synchronous_period = 12; qpti 317 drivers/scsi/qlogicpti.c qpti->dev_param[i].synchronous_offset = 8; qpti 319 drivers/scsi/qlogicpti.c qpti->dev_param[i].synchronous_period = 25; qpti 320 drivers/scsi/qlogicpti.c qpti->dev_param[i].synchronous_offset = 12; qpti 322 drivers/scsi/qlogicpti.c qpti->dev_param[i].device_enable = 1; qpti 328 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qpti 338 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); qpti 341 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + CPU_PCTRL) & CPU_PCTRL_BSY) { qpti 342 drivers/scsi/qlogicpti.c sbus_writew(CPU_ORIDE_RMOD, qpti->qregs + CPU_ORIDE); qpti 343 drivers/scsi/qlogicpti.c sbus_writew(CPU_CMD_BRESET, qpti->qregs + CPU_CMD); qpti 347 drivers/scsi/qlogicpti.c sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); qpti 348 drivers/scsi/qlogicpti.c sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); qpti 349 drivers/scsi/qlogicpti.c sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); qpti 352 drivers/scsi/qlogicpti.c while (--loop_count && ((sbus_readw(qpti->qregs + MBOX0) & 0xff) == 0x04)) qpti 356 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 358 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); qpti 359 drivers/scsi/qlogicpti.c set_sbus_cfg1(qpti); qpti 360 drivers/scsi/qlogicpti.c qlogicpti_enable_irqs(qpti); qpti 362 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { qpti 363 drivers/scsi/qlogicpti.c qpti->ultra = 1; qpti 365 drivers/scsi/qlogicpti.c qpti->qregs + RISC_MTREG); qpti 367 drivers/scsi/qlogicpti.c qpti->ultra = 0; qpti 369 drivers/scsi/qlogicpti.c qpti->qregs + RISC_MTREG); qpti 374 drivers/scsi/qlogicpti.c qlogicpti_set_hostdev_defaults(qpti); qpti 377 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); qpti 382 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1)) { qpti 384 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 391 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.initiator_scsi_id; qpti 392 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1) || qpti 395 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 401 drivers/scsi/qlogicpti.c qpti->req_in_ptr = qpti->res_out_ptr = 0; qpti 405 drivers/scsi/qlogicpti.c param[2] = (u_short) (qpti->res_dvma >> 16); qpti 406 drivers/scsi/qlogicpti.c param[3] = (u_short) (qpti->res_dvma & 0xffff); qpti 408 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1)) { qpti 410 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 417 drivers/scsi/qlogicpti.c param[2] = (u_short) (qpti->req_dvma >> 16); qpti 418 drivers/scsi/qlogicpti.c param[3] = (u_short) (qpti->req_dvma & 0xffff); qpti 420 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1)) { qpti 422 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 428 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.retry_count; qpti 429 drivers/scsi/qlogicpti.c param[2] = qpti->host_param.retry_delay; qpti 430 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 433 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.tag_aging; qpti 434 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 439 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 443 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 446 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.selection_timeout; qpti 447 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 452 drivers/scsi/qlogicpti.c param[2] = (qpti->dev_param[i].device_flags << 8); qpti 458 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 465 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.bus_reset_delay; qpti 466 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 467 drivers/scsi/qlogicpti.c qpti->send_marker = 1; qpti 475 drivers/scsi/qlogicpti.c static int qlogicpti_load_firmware(struct qlogicpti *qpti) qpti 480 drivers/scsi/qlogicpti.c struct Scsi_Host *host = qpti->qhost; qpti 488 drivers/scsi/qlogicpti.c err = request_firmware(&fw, fwname, &qpti->op->dev); qpti 513 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 517 drivers/scsi/qlogicpti.c sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL); qpti 518 drivers/scsi/qlogicpti.c sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL); qpti 519 drivers/scsi/qlogicpti.c sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL); qpti 521 drivers/scsi/qlogicpti.c while (--timeout && (sbus_readw(qpti->qregs + SBUS_CTRL) & SBUS_CTRL_RESET)) qpti 524 drivers/scsi/qlogicpti.c printk(KERN_EMERG "qlogicpti%d: Cannot reset the ISP.", qpti->qpti_id); qpti 529 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); qpti 532 drivers/scsi/qlogicpti.c sbus_writew((SBUS_CTRL_GENAB | SBUS_CTRL_ERIRQ), qpti->qregs + SBUS_CTRL); qpti 533 drivers/scsi/qlogicpti.c set_sbus_cfg1(qpti); qpti 534 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); qpti 536 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + RISC_PSR) & RISC_PSR_ULTRA) { qpti 537 drivers/scsi/qlogicpti.c qpti->ultra = 1; qpti 539 drivers/scsi/qlogicpti.c qpti->qregs + RISC_MTREG); qpti 541 drivers/scsi/qlogicpti.c qpti->ultra = 0; qpti 543 drivers/scsi/qlogicpti.c qpti->qregs + RISC_MTREG); qpti 546 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); qpti 549 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_PAUSE, qpti->qregs + HCCTRL); qpti 550 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + CPU_PDIFF) & CPU_PDIFF_MODE) qpti 551 drivers/scsi/qlogicpti.c qpti->differential = 1; qpti 553 drivers/scsi/qlogicpti.c qpti->differential = 0; qpti 554 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); qpti 561 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1)) { qpti 563 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 573 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1) || qpti 576 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 583 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_RESET, qpti->qregs + HCCTRL); qpti 586 drivers/scsi/qlogicpti.c qlogicpti_enable_irqs(qpti); qpti 587 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); qpti 588 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_REL, qpti->qregs + HCCTRL); qpti 593 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1) || qpti 596 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 604 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 1); qpti 607 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1) || qpti 610 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 616 drivers/scsi/qlogicpti.c qpti->fware_majrev = param[1]; qpti 617 drivers/scsi/qlogicpti.c qpti->fware_minrev = param[2]; qpti 618 drivers/scsi/qlogicpti.c qpti->fware_micrev = param[3]; qpti 622 drivers/scsi/qlogicpti.c param[1] = qpti->clock; qpti 623 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 1) || qpti 626 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 631 drivers/scsi/qlogicpti.c if (qpti->is_pti != 0) { qpti 635 drivers/scsi/qlogicpti.c param[2] = (unsigned short) qpti->scsi_id; qpti 636 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 1); qpti 641 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 1); qpti 651 drivers/scsi/qlogicpti.c static int qlogicpti_verify_tmon(struct qlogicpti *qpti) qpti 653 drivers/scsi/qlogicpti.c int curstat = sbus_readb(qpti->sreg); qpti 656 drivers/scsi/qlogicpti.c if (!(curstat & SREG_FUSE) && (qpti->swsreg & SREG_FUSE)) qpti 657 drivers/scsi/qlogicpti.c printk("qlogicpti%d: Fuse returned to normal state.\n", qpti->qpti_id); qpti 658 drivers/scsi/qlogicpti.c if (!(curstat & SREG_TPOWER) && (qpti->swsreg & SREG_TPOWER)) qpti 659 drivers/scsi/qlogicpti.c printk("qlogicpti%d: termpwr back to normal state.\n", qpti->qpti_id); qpti 660 drivers/scsi/qlogicpti.c if (curstat != qpti->swsreg) { qpti 664 drivers/scsi/qlogicpti.c printk("qlogicpti%d: Fuse is open!\n", qpti->qpti_id); qpti 668 drivers/scsi/qlogicpti.c printk("qlogicpti%d: termpwr failure\n", qpti->qpti_id); qpti 670 drivers/scsi/qlogicpti.c if (qpti->differential && qpti 674 drivers/scsi/qlogicpti.c "differential bus! Please fix!\n", qpti->qpti_id); qpti 676 drivers/scsi/qlogicpti.c qpti->swsreg = curstat; qpti 684 drivers/scsi/qlogicpti.c static void qpti_chain_add(struct qlogicpti *qpti) qpti 692 drivers/scsi/qlogicpti.c qlink->next = qpti; qpti 694 drivers/scsi/qlogicpti.c qptichain = qpti; qpti 696 drivers/scsi/qlogicpti.c qpti->next = NULL; qpti 700 drivers/scsi/qlogicpti.c static void qpti_chain_del(struct qlogicpti *qpti) qpti 703 drivers/scsi/qlogicpti.c if (qptichain == qpti) { qpti 704 drivers/scsi/qlogicpti.c qptichain = qpti->next; qpti 707 drivers/scsi/qlogicpti.c while(qlink->next != qpti) qpti 709 drivers/scsi/qlogicpti.c qlink->next = qpti->next; qpti 711 drivers/scsi/qlogicpti.c qpti->next = NULL; qpti 715 drivers/scsi/qlogicpti.c static int qpti_map_regs(struct qlogicpti *qpti) qpti 717 drivers/scsi/qlogicpti.c struct platform_device *op = qpti->op; qpti 719 drivers/scsi/qlogicpti.c qpti->qregs = of_ioremap(&op->resource[0], 0, qpti 722 drivers/scsi/qlogicpti.c if (!qpti->qregs) { qpti 726 drivers/scsi/qlogicpti.c if (qpti->is_pti) { qpti 727 drivers/scsi/qlogicpti.c qpti->sreg = of_ioremap(&op->resource[0], (16 * 4096), qpti 730 drivers/scsi/qlogicpti.c if (!qpti->sreg) { qpti 738 drivers/scsi/qlogicpti.c static int qpti_register_irq(struct qlogicpti *qpti) qpti 740 drivers/scsi/qlogicpti.c struct platform_device *op = qpti->op; qpti 742 drivers/scsi/qlogicpti.c qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; qpti 750 drivers/scsi/qlogicpti.c if (request_irq(qpti->irq, qpti_intr, qpti 751 drivers/scsi/qlogicpti.c IRQF_SHARED, "QlogicPTI", qpti)) qpti 754 drivers/scsi/qlogicpti.c printk("qlogicpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); qpti 759 drivers/scsi/qlogicpti.c printk("qlogicpti%d: Cannot acquire irq line\n", qpti->qpti_id); qpti 763 drivers/scsi/qlogicpti.c static void qpti_get_scsi_id(struct qlogicpti *qpti) qpti 765 drivers/scsi/qlogicpti.c struct platform_device *op = qpti->op; qpti 770 drivers/scsi/qlogicpti.c qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); qpti 771 drivers/scsi/qlogicpti.c if (qpti->scsi_id == -1) qpti 772 drivers/scsi/qlogicpti.c qpti->scsi_id = of_getintprop_default(dp, "scsi-initiator-id", qpti 774 drivers/scsi/qlogicpti.c if (qpti->scsi_id == -1) qpti 775 drivers/scsi/qlogicpti.c qpti->scsi_id = qpti 778 drivers/scsi/qlogicpti.c qpti->qhost->this_id = qpti->scsi_id; qpti 779 drivers/scsi/qlogicpti.c qpti->qhost->max_sectors = 64; qpti 781 drivers/scsi/qlogicpti.c printk("SCSI ID %d ", qpti->scsi_id); qpti 784 drivers/scsi/qlogicpti.c static void qpti_get_bursts(struct qlogicpti *qpti) qpti 786 drivers/scsi/qlogicpti.c struct platform_device *op = qpti->op; qpti 798 drivers/scsi/qlogicpti.c qpti->bursts = bursts; qpti 801 drivers/scsi/qlogicpti.c static void qpti_get_clock(struct qlogicpti *qpti) qpti 808 drivers/scsi/qlogicpti.c cfreq = prom_getintdefault(qpti->prom_node,"clock-frequency",40000000); qpti 809 drivers/scsi/qlogicpti.c qpti->clock = (cfreq + 500000)/1000000; qpti 810 drivers/scsi/qlogicpti.c if (qpti->clock == 0) /* bullshit */ qpti 811 drivers/scsi/qlogicpti.c qpti->clock = 40; qpti 817 drivers/scsi/qlogicpti.c static int qpti_map_queues(struct qlogicpti *qpti) qpti 819 drivers/scsi/qlogicpti.c struct platform_device *op = qpti->op; qpti 822 drivers/scsi/qlogicpti.c qpti->res_cpu = dma_alloc_coherent(&op->dev, qpti 824 drivers/scsi/qlogicpti.c &qpti->res_dvma, GFP_ATOMIC); qpti 825 drivers/scsi/qlogicpti.c if (qpti->res_cpu == NULL || qpti 826 drivers/scsi/qlogicpti.c qpti->res_dvma == 0) { qpti 831 drivers/scsi/qlogicpti.c qpti->req_cpu = dma_alloc_coherent(&op->dev, qpti 833 drivers/scsi/qlogicpti.c &qpti->req_dvma, GFP_ATOMIC); qpti 834 drivers/scsi/qlogicpti.c if (qpti->req_cpu == NULL || qpti 835 drivers/scsi/qlogicpti.c qpti->req_dvma == 0) { qpti 837 drivers/scsi/qlogicpti.c qpti->res_cpu, qpti->res_dvma); qpti 841 drivers/scsi/qlogicpti.c memset(qpti->res_cpu, 0, QSIZE(RES_QUEUE_LEN)); qpti 842 drivers/scsi/qlogicpti.c memset(qpti->req_cpu, 0, QSIZE(QLOGICPTI_REQ_QUEUE_LEN)); qpti 849 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qpti 852 drivers/scsi/qlogicpti.c qpti->qhost->irq, qpti->qregs); qpti 869 drivers/scsi/qlogicpti.c struct qlogicpti *qpti) qpti 879 drivers/scsi/qlogicpti.c if (qpti->cmd_count[Cmnd->device->id] == 0) qpti 880 drivers/scsi/qlogicpti.c qpti->tag_ages[Cmnd->device->id] = jiffies; qpti 881 drivers/scsi/qlogicpti.c if (time_after(jiffies, qpti->tag_ages[Cmnd->device->id] + (5*HZ))) { qpti 883 drivers/scsi/qlogicpti.c qpti->tag_ages[Cmnd->device->id] = jiffies; qpti 899 drivers/scsi/qlogicpti.c struct qlogicpti *qpti, u_int in_ptr, u_int out_ptr) qpti 909 drivers/scsi/qlogicpti.c sg_count = dma_map_sg(&qpti->op->dev, sg, qpti 930 drivers/scsi/qlogicpti.c cont = (struct Continuation_Entry *) &qpti->req_cpu[in_ptr]; qpti 959 drivers/scsi/qlogicpti.c qpti->cmd_slots[in_ptr] = Cmnd; qpti 961 drivers/scsi/qlogicpti.c qpti->cmd_count[Cmnd->device->id]++; qpti 962 drivers/scsi/qlogicpti.c sbus_writew(in_ptr, qpti->qregs + MBOX4); qpti 963 drivers/scsi/qlogicpti.c qpti->req_in_ptr = in_ptr; qpti 979 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = shost_priv(sdev->host); qpti 986 drivers/scsi/qlogicpti.c qpti->dev_param[tgt].device_flags |= 0x10; qpti 988 drivers/scsi/qlogicpti.c qpti->dev_param[tgt].synchronous_offset = 0; qpti 989 drivers/scsi/qlogicpti.c qpti->dev_param[tgt].synchronous_period = 0; qpti 993 drivers/scsi/qlogicpti.c qpti->dev_param[tgt].device_flags |= 0x20; qpti 997 drivers/scsi/qlogicpti.c param[2] = (qpti->dev_param[tgt].device_flags << 8); qpti 998 drivers/scsi/qlogicpti.c if (qpti->dev_param[tgt].device_flags & 0x10) { qpti 999 drivers/scsi/qlogicpti.c param[3] = (qpti->dev_param[tgt].synchronous_offset << 8) | qpti 1000 drivers/scsi/qlogicpti.c qpti->dev_param[tgt].synchronous_period; qpti 1004 drivers/scsi/qlogicpti.c qlogicpti_mbox_command(qpti, param, 0); qpti 1019 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qpti 1026 drivers/scsi/qlogicpti.c in_ptr = qpti->req_in_ptr; qpti 1027 drivers/scsi/qlogicpti.c cmd = (struct Command_Entry *) &qpti->req_cpu[in_ptr]; qpti 1028 drivers/scsi/qlogicpti.c out_ptr = sbus_readw(qpti->qregs + MBOX4); qpti 1033 drivers/scsi/qlogicpti.c if (qpti->send_marker) { qpti 1035 drivers/scsi/qlogicpti.c qpti->send_marker = 0; qpti 1037 drivers/scsi/qlogicpti.c sbus_writew(in_ptr, qpti->qregs + MBOX4); qpti 1038 drivers/scsi/qlogicpti.c qpti->req_in_ptr = in_ptr; qpti 1041 drivers/scsi/qlogicpti.c cmd = (struct Command_Entry *) &qpti->req_cpu[in_ptr]; qpti 1044 drivers/scsi/qlogicpti.c cmd_frob(cmd, Cmnd, qpti); qpti 1045 drivers/scsi/qlogicpti.c if ((in_ptr = load_cmd(Cmnd, cmd, qpti, in_ptr, out_ptr)) == -1) qpti 1054 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 1131 drivers/scsi/qlogicpti.c static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti) qpti 1137 drivers/scsi/qlogicpti.c if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT)) qpti 1140 drivers/scsi/qlogicpti.c in_ptr = sbus_readw(qpti->qregs + MBOX5); qpti 1141 drivers/scsi/qlogicpti.c sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL); qpti 1142 drivers/scsi/qlogicpti.c if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK) { qpti 1143 drivers/scsi/qlogicpti.c switch (sbus_readw(qpti->qregs + MBOX0)) { qpti 1146 drivers/scsi/qlogicpti.c qpti->send_marker = 1; qpti 1154 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE); qpti 1158 drivers/scsi/qlogicpti.c out_ptr = qpti->res_out_ptr; qpti 1162 drivers/scsi/qlogicpti.c sts = (struct Status_Entry *) &qpti->res_cpu[out_ptr]; qpti 1170 drivers/scsi/qlogicpti.c Cmnd = qpti->cmd_slots[cmd_slot]; qpti 1171 drivers/scsi/qlogicpti.c qpti->cmd_slots[cmd_slot] = NULL; qpti 1176 drivers/scsi/qlogicpti.c qpti->send_marker = 1; qpti 1184 drivers/scsi/qlogicpti.c qlogicpti_return_status(sts, qpti->qpti_id); qpti 1189 drivers/scsi/qlogicpti.c dma_unmap_sg(&qpti->op->dev, qpti 1193 drivers/scsi/qlogicpti.c qpti->cmd_count[Cmnd->device->id]--; qpti 1194 drivers/scsi/qlogicpti.c sbus_writew(out_ptr, qpti->qregs + MBOX5); qpti 1198 drivers/scsi/qlogicpti.c qpti->res_out_ptr = out_ptr; qpti 1205 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = dev_id; qpti 1209 drivers/scsi/qlogicpti.c spin_lock_irqsave(qpti->qhost->host_lock, flags); qpti 1210 drivers/scsi/qlogicpti.c dq = qlogicpti_intr_handler(qpti); qpti 1221 drivers/scsi/qlogicpti.c spin_unlock_irqrestore(qpti->qhost->host_lock, flags); qpti 1230 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qpti 1236 drivers/scsi/qlogicpti.c qpti->qpti_id, (int)Cmnd->device->id, (int)Cmnd->device->lun); qpti 1238 drivers/scsi/qlogicpti.c qlogicpti_disable_irqs(qpti); qpti 1244 drivers/scsi/qlogicpti.c if (qpti->cmd_slots[i] == Cmnd) qpti 1252 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 0) || qpti 1255 drivers/scsi/qlogicpti.c qpti->qpti_id, param[0]); qpti 1259 drivers/scsi/qlogicpti.c qlogicpti_enable_irqs(qpti); qpti 1268 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; qpti 1272 drivers/scsi/qlogicpti.c qpti->qpti_id); qpti 1274 drivers/scsi/qlogicpti.c qlogicpti_disable_irqs(qpti); qpti 1277 drivers/scsi/qlogicpti.c param[1] = qpti->host_param.bus_reset_delay; qpti 1278 drivers/scsi/qlogicpti.c if (qlogicpti_mbox_command(qpti, param, 0) || qpti 1281 drivers/scsi/qlogicpti.c qpti->qpti_id, param[0]); qpti 1285 drivers/scsi/qlogicpti.c qlogicpti_enable_irqs(qpti); qpti 1308 drivers/scsi/qlogicpti.c struct qlogicpti *qpti; qpti 1322 drivers/scsi/qlogicpti.c qpti = shost_priv(host); qpti 1325 drivers/scsi/qlogicpti.c qpti->qhost = host; qpti 1326 drivers/scsi/qlogicpti.c qpti->op = op; qpti 1327 drivers/scsi/qlogicpti.c qpti->qpti_id = nqptis; qpti 1328 drivers/scsi/qlogicpti.c qpti->is_pti = !of_node_name_eq(op->dev.of_node, "QLGC,isp"); qpti 1330 drivers/scsi/qlogicpti.c if (qpti_map_regs(qpti) < 0) qpti 1333 drivers/scsi/qlogicpti.c if (qpti_register_irq(qpti) < 0) qpti 1336 drivers/scsi/qlogicpti.c qpti_get_scsi_id(qpti); qpti 1337 drivers/scsi/qlogicpti.c qpti_get_bursts(qpti); qpti 1338 drivers/scsi/qlogicpti.c qpti_get_clock(qpti); qpti 1341 drivers/scsi/qlogicpti.c memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots)); qpti 1343 drivers/scsi/qlogicpti.c if (qpti_map_queues(qpti) < 0) qpti 1347 drivers/scsi/qlogicpti.c if (qlogicpti_load_firmware(qpti)) qpti 1349 drivers/scsi/qlogicpti.c if (qpti->is_pti) { qpti 1351 drivers/scsi/qlogicpti.c if (qlogicpti_verify_tmon(qpti)) qpti 1359 drivers/scsi/qlogicpti.c printk("(Firmware v%d.%d.%d)", qpti->fware_majrev, qpti 1360 drivers/scsi/qlogicpti.c qpti->fware_minrev, qpti->fware_micrev); qpti 1366 drivers/scsi/qlogicpti.c qpti->differential = 1; qpti 1369 drivers/scsi/qlogicpti.c qpti->qpti_id, qpti 1370 drivers/scsi/qlogicpti.c (qpti->ultra ? "Ultra" : "Fast"), qpti 1371 drivers/scsi/qlogicpti.c (qpti->differential ? "differential" : "single ended")); qpti 1374 drivers/scsi/qlogicpti.c printk("qlogicpti%d: Failed scsi_add_host\n", qpti->qpti_id); qpti 1378 drivers/scsi/qlogicpti.c dev_set_drvdata(&op->dev, qpti); qpti 1380 drivers/scsi/qlogicpti.c qpti_chain_add(qpti); qpti 1391 drivers/scsi/qlogicpti.c qpti->res_cpu, qpti->res_dvma); qpti 1394 drivers/scsi/qlogicpti.c qpti->req_cpu, qpti->req_dvma); qpti 1398 drivers/scsi/qlogicpti.c free_irq(qpti->irq, qpti); qpti 1401 drivers/scsi/qlogicpti.c of_iounmap(&op->resource[0], qpti->qregs, qpti 1403 drivers/scsi/qlogicpti.c if (qpti->is_pti) qpti 1404 drivers/scsi/qlogicpti.c of_iounmap(&op->resource[0], qpti->sreg, qpti 1415 drivers/scsi/qlogicpti.c struct qlogicpti *qpti = dev_get_drvdata(&op->dev); qpti 1417 drivers/scsi/qlogicpti.c qpti_chain_del(qpti); qpti 1419 drivers/scsi/qlogicpti.c scsi_remove_host(qpti->qhost); qpti 1422 drivers/scsi/qlogicpti.c sbus_writew(0, qpti->qregs + SBUS_CTRL); qpti 1425 drivers/scsi/qlogicpti.c free_irq(qpti->irq, qpti); qpti 1430 drivers/scsi/qlogicpti.c qpti->res_cpu, qpti->res_dvma); qpti 1433 drivers/scsi/qlogicpti.c qpti->req_cpu, qpti->req_dvma); qpti 1436 drivers/scsi/qlogicpti.c of_iounmap(&op->resource[0], qpti->qregs, qpti 1438 drivers/scsi/qlogicpti.c if (qpti->is_pti) qpti 1439 drivers/scsi/qlogicpti.c of_iounmap(&op->resource[0], qpti->sreg, sizeof(unsigned char)); qpti 1441 drivers/scsi/qlogicpti.c scsi_host_put(qpti->qhost);