Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/nvme/nvme_da.c
Show First 20 Lines • Show All 892 Lines • ▼ Show 20 Lines | ndaregister(struct cam_periph *periph, void *arg) | ||||
cam_iosched_set_sort_queue(softc->cam_iosched, 0); | cam_iosched_set_sort_queue(softc->cam_iosched, 0); | ||||
softc->disk = disk = disk_alloc(); | softc->disk = disk = disk_alloc(); | ||||
disk->d_rotation_rate = DISK_RR_NON_ROTATING; | disk->d_rotation_rate = DISK_RR_NON_ROTATING; | ||||
disk->d_open = ndaopen; | disk->d_open = ndaopen; | ||||
disk->d_close = ndaclose; | disk->d_close = ndaclose; | ||||
disk->d_strategy = ndastrategy; | disk->d_strategy = ndastrategy; | ||||
disk->d_ioctl = ndaioctl; | disk->d_ioctl = ndaioctl; | ||||
disk->d_getattr = ndagetattr; | disk->d_getattr = ndagetattr; | ||||
if (cam_sim_pollable(periph->sim)) | |||||
imp: All nvme sims support polling... | |||||
disk->d_dump = ndadump; | disk->d_dump = ndadump; | ||||
disk->d_gone = ndadiskgonecb; | disk->d_gone = ndadiskgonecb; | ||||
disk->d_name = "nda"; | disk->d_name = "nda"; | ||||
disk->d_drv1 = periph; | disk->d_drv1 = periph; | ||||
disk->d_unit = periph->unit_number; | disk->d_unit = periph->unit_number; | ||||
maxio = cpi.maxio; /* Honor max I/O size of SIM */ | maxio = cpi.maxio; /* Honor max I/O size of SIM */ | ||||
if (maxio == 0) | if (maxio == 0) | ||||
maxio = DFLTPHYS; /* traditional default */ | maxio = DFLTPHYS; /* traditional default */ | ||||
else if (maxio > maxphys) | else if (maxio > maxphys) | ||||
▲ Show 20 Lines • Show All 453 Lines • Show Last 20 Lines |
All nvme sims support polling...