Lines Matching refs:rv
524 int rv = 0; in mtip_device_reset() local
530 rv = -EFAULT; in mtip_device_reset()
539 return rv; in mtip_device_reset()
608 int group, tag, bit, reissue, rv; in mtip_handle_tfe() local
680 rv = mtip_read_log_page(dd->port, ATA_LOG_SATA_NCQ, in mtip_handle_tfe()
683 if (rv) { in mtip_handle_tfe()
880 int rv = IRQ_NONE; in mtip_handle_irq() local
886 rv = IRQ_HANDLED; in mtip_handle_irq()
941 return rv; in mtip_handle_irq()
954 return rv; in mtip_handle_irq()
1104 int rv = 0; in mtip_exec_internal_command() local
1180 if ((rv = wait_for_completion_interruptible_timeout( in mtip_exec_internal_command()
1184 if (rv == -ERESTARTSYS) { /* interrupted */ in mtip_exec_internal_command()
1189 rv = -EINTR; in mtip_exec_internal_command()
1191 } else if (rv == 0) /* timeout */ in mtip_exec_internal_command()
1198 fis->command, rv, timeout); in mtip_exec_internal_command()
1206 rv = -ENXIO; in mtip_exec_internal_command()
1210 rv = -EAGAIN; in mtip_exec_internal_command()
1222 rv = -ENXIO; in mtip_exec_internal_command()
1228 rv = -ENXIO; in mtip_exec_internal_command()
1240 rv = -EIO; in mtip_exec_internal_command()
1255 rv = -ENXIO; in mtip_exec_internal_command()
1258 rv = -EAGAIN; in mtip_exec_internal_command()
1265 if (rv >= 0 && mtip_pause_ncq(port, fis)) { in mtip_exec_internal_command()
1267 return rv; in mtip_exec_internal_command()
1271 return rv; in mtip_exec_internal_command()
1346 int rv = 0; in mtip_get_identify() local
1374 rv = -1; in mtip_get_identify()
1417 rv = -EFAULT; in mtip_get_identify()
1423 return rv; in mtip_get_identify()
1437 int rv; in mtip_standby_immediate() local
1451 rv = mtip_exec_internal_command(port, in mtip_standby_immediate()
1461 if (rv) in mtip_standby_immediate()
1465 return rv; in mtip_standby_immediate()
1556 int rv, i; in mtip_get_smart_attr() local
1576 rv = mtip_get_smart_data(port, port->smart_buf, port->smart_buf_dma); in mtip_get_smart_attr()
1577 if (rv) { in mtip_get_smart_attr()
1579 return rv; in mtip_get_smart_attr()
1592 rv = -EINVAL; in mtip_get_smart_attr()
1595 return rv; in mtip_get_smart_attr()
1613 int i, rv = 0; in mtip_send_trim() local
1668 rv = -EIO; in mtip_send_trim()
1671 return rv; in mtip_send_trim()
1870 int rv = 0, xfer_sz = command[3]; in exec_drive_command() local
1929 rv = -EFAULT; in exec_drive_command()
1950 rv = -EFAULT; in exec_drive_command()
1958 return rv; in exec_drive_command()
1976 unsigned int rv = 0; in implicit_sector() local
1988 rv = 1; in implicit_sector()
1992 rv = 1; in implicit_sector()
1997 rv = 1; in implicit_sector()
2002 rv = 1; in implicit_sector()
2005 return rv; in implicit_sector()
2562 int rv = 0; in mtip_hw_read_device_status() local
2579 rv = -EFAULT; in mtip_hw_read_device_status()
2582 return rv ? rv : *offset; in mtip_hw_read_device_status()
2592 int n, rv = 0; in mtip_hw_read_registers() local
2646 rv = -EFAULT; in mtip_hw_read_registers()
2649 return rv ? rv : *offset; in mtip_hw_read_registers()
2658 int rv = 0; in mtip_hw_read_flags() local
2678 rv = -EFAULT; in mtip_hw_read_flags()
2681 return rv ? rv : *offset; in mtip_hw_read_flags()
3129 int rv; in mtip_hw_get_identify() local
3142 rv = mtip_read_log_page(dd->port, ATA_LOG_SATA_NCQ, in mtip_hw_get_identify()
3145 if (rv) { in mtip_hw_get_identify()
3178 return rv; in mtip_hw_get_identify()
3192 int rv; in mtip_hw_init() local
3200 rv = -EIO; in mtip_hw_init()
3236 rv = mtip_dma_alloc(dd); in mtip_hw_init()
3237 if (rv < 0) in mtip_hw_init()
3261 rv = -ENODEV; in mtip_hw_init()
3269 rv = -EFAULT; in mtip_hw_init()
3278 rv = -EIO; in mtip_hw_init()
3291 rv = devm_request_irq(&dd->pdev->dev, in mtip_hw_init()
3298 if (rv) { in mtip_hw_init()
3312 rv = -EFAULT; in mtip_hw_init()
3316 return rv; in mtip_hw_init()
3335 return rv; in mtip_hw_init()
3340 int rv = 0; in mtip_standby_drive() local
3351 rv = mtip_standby_immediate(dd->port); in mtip_standby_drive()
3352 if (rv) in mtip_standby_drive()
3356 return rv; in mtip_standby_drive()
3917 int rv = 0, wait_for_rebuild = 0; in mtip_block_initialize() local
3926 rv = -EINVAL; in mtip_block_initialize()
3934 rv = -EINVAL; in mtip_block_initialize()
3944 rv = ida_get_new(&rssd_index_ida, &index); in mtip_block_initialize()
3946 } while (rv == -EAGAIN); in mtip_block_initialize()
3948 if (rv) in mtip_block_initialize()
3951 rv = rssd_disk_name_format("rssd", in mtip_block_initialize()
3955 if (rv) in mtip_block_initialize()
3978 rv = blk_mq_alloc_tag_set(&dd->tags); in mtip_block_initialize()
3979 if (rv) { in mtip_block_initialize()
3990 rv = -ENOMEM; in mtip_block_initialize()
4003 rv = -EINVAL; in mtip_block_initialize()
4037 rv = -EIO; in mtip_block_initialize()
4058 return rv; /* service thread created for handling rebuild */ in mtip_block_initialize()
4069 rv = -EFAULT; in mtip_block_initialize()
4074 rv = wait_for_rebuild; in mtip_block_initialize()
4076 return rv; in mtip_block_initialize()
4104 return rv; in mtip_block_initialize()
4368 int rv = 0; in mtip_pci_probe() local
4399 rv = pcim_enable_device(pdev); in mtip_pci_probe()
4400 if (rv < 0) { in mtip_pci_probe()
4406 rv = pcim_iomap_regions(pdev, 1 << MTIP_ABAR, MTIP_DRV_NAME); in mtip_pci_probe()
4407 if (rv < 0) { in mtip_pci_probe()
4413 rv = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); in mtip_pci_probe()
4415 if (rv) { in mtip_pci_probe()
4416 rv = pci_set_consistent_dma_mask(pdev, in mtip_pci_probe()
4418 if (rv) { in mtip_pci_probe()
4441 rv = -ENOMEM; in mtip_pci_probe()
4500 rv = pci_enable_msi(pdev); in mtip_pci_probe()
4501 if (rv) { in mtip_pci_probe()
4510 rv = mtip_block_initialize(dd); in mtip_pci_probe()
4511 if (rv < 0) { in mtip_pci_probe()
4522 if (rv != MTIP_FTL_REBUILD_MAGIC) in mtip_pci_probe()
4525 rv = 0; /* device in rebuild state, return 0 from probe */ in mtip_pci_probe()
4551 return rv; in mtip_pci_probe()
4553 return rv; in mtip_pci_probe()
4628 int rv = 0; in mtip_pci_suspend() local
4640 rv = mtip_block_suspend(dd); in mtip_pci_suspend()
4641 if (rv < 0) { in mtip_pci_suspend()
4644 return rv; in mtip_pci_suspend()
4657 return rv; in mtip_pci_suspend()
4669 int rv = 0; in mtip_pci_resume() local
4686 rv = pcim_enable_device(pdev); in mtip_pci_resume()
4687 if (rv < 0) { in mtip_pci_resume()
4698 rv = mtip_block_resume(dd); in mtip_pci_resume()
4699 if (rv < 0) in mtip_pci_resume()
4705 return rv; in mtip_pci_resume()