Changeset d80fa05 in mainline for uspace/lib/virtio/virtio.c
- Timestamp:
- 2019-02-05T20:25:14Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1f173d
- Parents:
- d066259
- git-author:
- Jakub Jermar <jakub@…> (2019-02-05 20:12:07)
- git-committer:
- Jakub Jermar <jakub@…> (2019-02-05 20:25:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/virtio/virtio.c
rd066259 rd80fa05 319 319 uint32_t device_features = pio_read_le32(&cfg->device_feature); 320 320 321 ddf_msg(LVL_NOTE, "offered features %x", device_features); 321 uint32_t reserved_features = VIRTIO_F_VERSION_1; 322 pio_write_le32(&cfg->device_feature_select, VIRTIO_FEATURES_32_63); 323 uint32_t device_reserved_features = pio_read_le32(&cfg->device_feature); 324 325 ddf_msg(LVL_NOTE, "offered features %x, reserved features %x", 326 device_features, device_reserved_features); 322 327 323 328 if (features != (features & device_features)) … … 325 330 features &= device_features; 326 331 332 if (reserved_features != (reserved_features & device_reserved_features)) 333 return ENOTSUP; 334 reserved_features &= device_reserved_features; 335 327 336 /* 4. Write the accepted feature flags */ 328 337 pio_write_le32(&cfg->driver_feature_select, VIRTIO_FEATURES_0_31); 329 338 pio_write_le32(&cfg->driver_feature, features); 330 331 ddf_msg(LVL_NOTE, "accepted features %x", features); 339 pio_write_le32(&cfg->driver_feature_select, VIRTIO_FEATURES_32_63); 340 pio_write_le32(&cfg->driver_feature, reserved_features); 341 342 ddf_msg(LVL_NOTE, "accepted features %x, reserved features %x", 343 features, reserved_features); 332 344 333 345 /* 5. Set FEATURES_OK */
Note:
See TracChangeset
for help on using the changeset viewer.