Lines Matching refs:idev

373 	union __iomem ionic_dev_cmd_regs *regs = ionic->idev.dev_cmd_regs;  in ionic_dev_cmd_clean()
381 struct ionic_dev *idev = &ionic->idev; in ionic_dev_cmd_wait() local
395 opcode = readb(&idev->dev_cmd_regs->cmd.cmd.opcode); in ionic_dev_cmd_wait()
398 done = ionic_dev_cmd_done(idev); in ionic_dev_cmd_wait()
432 err = ionic_dev_cmd_status(&ionic->idev); in ionic_dev_cmd_wait()
441 iowrite32(0, &idev->dev_cmd_regs->done); in ionic_dev_cmd_wait()
442 iowrite32(1, &idev->dev_cmd_regs->doorbell); in ionic_dev_cmd_wait()
472 struct ionic_dev *idev = &ionic->idev; in ionic_identify() local
484 sz = min(sizeof(ident->drv), sizeof(idev->dev_cmd_regs->data)); in ionic_identify()
485 memcpy_toio(&idev->dev_cmd_regs->data, &ident->drv, sz); in ionic_identify()
487 ionic_dev_cmd_identify(idev, IONIC_IDENTITY_VERSION_1); in ionic_identify()
490 sz = min(sizeof(ident->dev), sizeof(idev->dev_cmd_regs->data)); in ionic_identify()
491 memcpy_fromio(&ident->dev, &idev->dev_cmd_regs->data, sz); in ionic_identify()
500 if (isprint(idev->dev_info.fw_version[0]) && in ionic_identify()
501 isascii(idev->dev_info.fw_version[0])) in ionic_identify()
503 (int)(sizeof(idev->dev_info.fw_version) - 1), in ionic_identify()
504 idev->dev_info.fw_version); in ionic_identify()
507 (u8)idev->dev_info.fw_version[0], in ionic_identify()
508 (u8)idev->dev_info.fw_version[1], in ionic_identify()
509 (u8)idev->dev_info.fw_version[2], in ionic_identify()
510 (u8)idev->dev_info.fw_version[3]); in ionic_identify()
527 struct ionic_dev *idev = &ionic->idev; in ionic_init() local
531 ionic_dev_cmd_init(idev); in ionic_init()
540 struct ionic_dev *idev = &ionic->idev; in ionic_reset() local
544 ionic_dev_cmd_reset(idev); in ionic_reset()
554 struct ionic_dev *idev = &ionic->idev; in ionic_port_identify() local
560 ionic_dev_cmd_port_identify(idev); in ionic_port_identify()
563 sz = min(sizeof(ident->port), sizeof(idev->dev_cmd_regs->data)); in ionic_port_identify()
564 memcpy_fromio(&ident->port, &idev->dev_cmd_regs->data, sz); in ionic_port_identify()
575 struct ionic_dev *idev = &ionic->idev; in ionic_port_init() local
579 if (!idev->port_info) { in ionic_port_init()
580 idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE); in ionic_port_init()
581 idev->port_info = dma_alloc_coherent(ionic->dev, in ionic_port_init()
582 idev->port_info_sz, in ionic_port_init()
583 &idev->port_info_pa, in ionic_port_init()
585 if (!idev->port_info) in ionic_port_init()
589 sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data)); in ionic_port_init()
593 memcpy_toio(&idev->dev_cmd_regs->data, &ident->port.config, sz); in ionic_port_init()
594 ionic_dev_cmd_port_init(idev); in ionic_port_init()
597 ionic_dev_cmd_port_state(&ionic->idev, IONIC_PORT_ADMIN_STATE_UP); in ionic_port_init()
603 dma_free_coherent(ionic->dev, idev->port_info_sz, in ionic_port_init()
604 idev->port_info, idev->port_info_pa); in ionic_port_init()
605 idev->port_info = NULL; in ionic_port_init()
606 idev->port_info_pa = 0; in ionic_port_init()
614 struct ionic_dev *idev = &ionic->idev; in ionic_port_reset() local
617 if (!idev->port_info) in ionic_port_reset()
621 ionic_dev_cmd_port_reset(idev); in ionic_port_reset()
625 dma_free_coherent(ionic->dev, idev->port_info_sz, in ionic_port_reset()
626 idev->port_info, idev->port_info_pa); in ionic_port_reset()
628 idev->port_info = NULL; in ionic_port_reset()
629 idev->port_info_pa = 0; in ionic_port_reset()