Lines Matching refs:pdev
85 dev_err(&wd->pdev->dev, "command register is not ready: 0x%02x\n", in wd719x_wait_ready()
105 dev_err(&wd->pdev->dev, "direct command timed out\n"); in wd719x_wait_done()
110 dev_err(&wd->pdev->dev, "direct command failed, status 0x%02x, SUE 0x%02x\n", in wd719x_wait_done()
161 dev_warn(&wd->pdev->dev, "RISC sleep command failed\n"); in wd719x_destroy()
167 pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb, in wd719x_destroy()
170 pci_free_consistent(wd->pdev, sizeof(struct wd719x_scb), scb, in wd719x_destroy()
173 pci_free_consistent(wd->pdev, wd->fw_size, wd->fw_virt, wd->fw_phys); in wd719x_destroy()
175 pci_free_consistent(wd->pdev, WD719X_HASH_TABLE_SIZE, wd->hash_virt, in wd719x_destroy()
178 pci_free_consistent(wd->pdev, sizeof(struct wd719x_host_param), in wd719x_destroy()
181 free_irq(wd->pdev->irq, wd); in wd719x_destroy()
192 dma_unmap_single(&wd->pdev->dev, cmd->SCp.dma_handle, in wd719x_finish_cmd()
219 scb = pci_alloc_consistent(wd->pdev, sizeof(struct wd719x_scb), in wd719x_queuecommand()
223 dev_err(&wd->pdev->dev, "unable to allocate SCB\n"); in wd719x_queuecommand()
245 cmd->SCp.dma_handle = dma_map_single(&wd->pdev->dev, cmd->sense_buffer, in wd719x_queuecommand()
313 ret = request_firmware(&fw_wcs, fwname_wcs, &wd->pdev->dev); in wd719x_chip_init()
315 dev_err(&wd->pdev->dev, "Unable to load firmware %s: %d\n", in wd719x_chip_init()
320 ret = request_firmware(&fw_risc, fwname_risc, &wd->pdev->dev); in wd719x_chip_init()
322 dev_err(&wd->pdev->dev, "Unable to load firmware %s: %d\n", in wd719x_chip_init()
330 wd->fw_virt = pci_alloc_consistent(wd->pdev, wd->fw_size, in wd719x_chip_init()
380 dev_warn(&wd->pdev->dev, "RISC bootstrap failed: DMA aborted\n"); in wd719x_chip_init()
387 dev_warn(&wd->pdev->dev, "RISC bootstrap failed: DMA timeout\n"); in wd719x_chip_init()
411 dev_warn(&wd->pdev->dev, "Unable to initialize RISC\n"); in wd719x_chip_init()
420 dev_warn(&wd->pdev->dev, "Unable to read firmware version\n"); in wd719x_chip_init()
423 dev_info(&wd->pdev->dev, "RISC initialized with firmware version %.2x.%.2x\n", in wd719x_chip_init()
431 dev_warn(&wd->pdev->dev, "SCSI bus reset failed\n"); in wd719x_chip_init()
440 dev_warn(&wd->pdev->dev, "Failed to set HOST PARAMETERS\n"); in wd719x_chip_init()
449 dev_warn(&wd->pdev->dev, "SCAM initialization failed\n"); in wd719x_chip_init()
470 dev_info(&wd->pdev->dev, "abort command, tag: %x\n", cmd->tag); in wd719x_abort()
490 dev_info(&wd->pdev->dev, "%s reset requested\n", in wd719x_reset()
520 dev_info(&wd->pdev->dev, "host reset requested\n"); in wd719x_host_reset()
567 dev_err(&wd->pdev->dev, "command rejected\n"); in wd719x_interrupt_SCB()
571 dev_err(&wd->pdev->dev, "SCB queue is full\n"); in wd719x_interrupt_SCB()
575 dev_dbg(&wd->pdev->dev, "SCB terminated by direct command\n"); in wd719x_interrupt_SCB()
581 dev_err(&wd->pdev->dev, "DMA abort\n"); in wd719x_interrupt_SCB()
586 dev_err(&wd->pdev->dev, "DMA parity error\n"); in wd719x_interrupt_SCB()
590 dev_dbg(&wd->pdev->dev, "selection timeout\n"); in wd719x_interrupt_SCB()
593 dev_dbg(&wd->pdev->dev, "bus reset occurred\n"); in wd719x_interrupt_SCB()
597 dev_dbg(&wd->pdev->dev, "SCSI bus error\n"); in wd719x_interrupt_SCB()
601 dev_err(&wd->pdev->dev, "wrong data transfer direction\n"); in wd719x_interrupt_SCB()
605 dev_err(&wd->pdev->dev, "invalid SCSI phase\n"); in wd719x_interrupt_SCB()
609 dev_err(&wd->pdev->dev, "record too long\n"); in wd719x_interrupt_SCB()
613 dev_err(&wd->pdev->dev, "unexpected bus free\n"); in wd719x_interrupt_SCB()
617 dev_dbg(&wd->pdev->dev, "auto request sense\n"); in wd719x_interrupt_SCB()
624 dev_err(&wd->pdev->dev, "target id %d ignored command\n", in wd719x_interrupt_SCB()
629 dev_err(&wd->pdev->dev, "reversed tags\n"); in wd719x_interrupt_SCB()
633 dev_err(&wd->pdev->dev, "tag type not supported by target\n"); in wd719x_interrupt_SCB()
637 dev_err(&wd->pdev->dev, "no SCAM soft ID available\n"); in wd719x_interrupt_SCB()
641 dev_warn(&wd->pdev->dev, "unknown SUE error code: 0x%x\n", in wd719x_interrupt_SCB()
669 dev_err(&wd->pdev->dev, "linked command completed with no status\n"); in wd719x_interrupt()
672 dev_err(&wd->pdev->dev, "unsolicited interrupt\n"); in wd719x_interrupt()
687 dev_err(&wd->pdev->dev, "card returned invalid SCB pointer\n"); in wd719x_interrupt()
689 dev_warn(&wd->pdev->dev, "direct command 0x%x completed\n", in wd719x_interrupt()
693 dev_err(&wd->pdev->dev, "card indicates PIO data ready but we never use PIO\n"); in wd719x_interrupt()
697 dev_err(&wd->pdev->dev, "unknown interrupt reason: %d\n", in wd719x_interrupt()
761 dev_warn(&wd->pdev->dev, "EEPROM signature is invalid (0x%02x 0x%02x), using default values\n", in wd719x_read_eeprom()
798 dev_warn(&wd->pdev->dev, "unknown card type 0x%x\n", card); in wd719x_detect_type()
812 sh->base = pci_resource_start(wd->pdev, 0); in wd719x_board_found()
817 sh->irq = wd->pdev->irq; in wd719x_board_found()
821 wd->params = pci_alloc_consistent(wd->pdev, in wd719x_board_found()
825 dev_warn(&wd->pdev->dev, "unable to allocate parameter buffer\n"); in wd719x_board_found()
830 wd->hash_virt = pci_alloc_consistent(wd->pdev, WD719X_HASH_TABLE_SIZE, in wd719x_board_found()
833 dev_warn(&wd->pdev->dev, "unable to allocate hash buffer\n"); in wd719x_board_found()
838 ret = request_irq(wd->pdev->irq, wd719x_interrupt, IRQF_SHARED, in wd719x_board_found()
841 dev_warn(&wd->pdev->dev, "unable to assign IRQ %d\n", in wd719x_board_found()
842 wd->pdev->irq); in wd719x_board_found()
855 dev_info(&wd->pdev->dev, "%s at I/O 0x%lx, IRQ %u, SCSI ID %d\n", in wd719x_board_found()
861 free_irq(wd->pdev->irq, wd); in wd719x_board_found()
863 pci_free_consistent(wd->pdev, WD719X_HASH_TABLE_SIZE, wd->hash_virt, in wd719x_board_found()
866 pci_free_consistent(wd->pdev, sizeof(struct wd719x_host_param), in wd719x_board_found()
888 static int wd719x_pci_probe(struct pci_dev *pdev, const struct pci_device_id *d) in wd719x_pci_probe() argument
894 err = pci_enable_device(pdev); in wd719x_pci_probe()
898 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { in wd719x_pci_probe()
899 dev_warn(&pdev->dev, "Unable to set 32-bit DMA mask\n"); in wd719x_pci_probe()
903 err = pci_request_regions(pdev, "wd719x"); in wd719x_pci_probe()
906 pci_set_master(pdev); in wd719x_pci_probe()
909 if (pci_resource_len(pdev, 0) == 0) in wd719x_pci_probe()
918 wd->base = pci_iomap(pdev, 0, 0); in wd719x_pci_probe()
921 wd->pdev = pdev; in wd719x_pci_probe()
927 err = scsi_add_host(sh, &wd->pdev->dev); in wd719x_pci_probe()
933 pci_set_drvdata(pdev, sh); in wd719x_pci_probe()
939 pci_iounmap(pdev, wd->base); in wd719x_pci_probe()
943 pci_release_regions(pdev); in wd719x_pci_probe()
945 pci_disable_device(pdev); in wd719x_pci_probe()
951 static void wd719x_pci_remove(struct pci_dev *pdev) in wd719x_pci_remove() argument
953 struct Scsi_Host *sh = pci_get_drvdata(pdev); in wd719x_pci_remove()
958 pci_iounmap(pdev, wd->base); in wd719x_pci_remove()
959 pci_release_regions(pdev); in wd719x_pci_remove()
960 pci_disable_device(pdev); in wd719x_pci_remove()