Lines Matching full:disk

14 static int nvme_disk_status(struct disk_info *disk)  in nvme_disk_status()  argument
19 static int nvme_disk_read(struct disk_info *disk, in nvme_disk_read() argument
24 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_read()
37 nvme_lock(disk->dev); in nvme_disk_read()
58 LOG_WRN("Reading at sector %u (count %d) on disk %s failed", in nvme_disk_read()
64 nvme_unlock(disk->dev); in nvme_disk_read()
68 static int nvme_disk_write(struct disk_info *disk, in nvme_disk_write() argument
73 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_write()
86 nvme_lock(disk->dev); in nvme_disk_write()
107 LOG_WRN("Writing at sector %u (count %d) on disk %s failed", in nvme_disk_write()
113 nvme_unlock(disk->dev); in nvme_disk_write()
137 LOG_ERR("Flushing disk %s failed", ns->name); in nvme_disk_flush()
145 static int nvme_disk_ioctl(struct disk_info *disk, uint8_t cmd, void *buff) in nvme_disk_ioctl() argument
147 struct nvme_namespace *ns = CONTAINER_OF(disk->name, in nvme_disk_ioctl()
151 nvme_lock(disk->dev); in nvme_disk_ioctl()
192 nvme_unlock(disk->dev); in nvme_disk_ioctl()
196 static int nvme_disk_init(struct disk_info *disk) in nvme_disk_init() argument
198 return nvme_disk_ioctl(disk, DISK_IOCTL_CTRL_INIT, NULL); in nvme_disk_init()
210 struct disk_info *disk) in nvme_namespace_disk_setup() argument
212 disk->name = ns->name; in nvme_namespace_disk_setup()
213 disk->ops = &nvme_disk_ops; in nvme_namespace_disk_setup()
214 disk->dev = ns->ctrlr->dev; in nvme_namespace_disk_setup()
216 return disk_access_register(disk); in nvme_namespace_disk_setup()