Changeset 3a4c6d9 in mainline for uspace/drv
- Timestamp:
- 2025-11-14T16:58:23Z (8 weeks ago)
- Branches:
- master
- Children:
- 1ec732a, 43ef144, 7101dfb, e998d98
- Parents:
- d101368
- git-author:
- Nataliia Korop <n.corop08@…> (2025-11-14 16:57:02)
- git-committer:
- Jiri Svoboda <jiri@…> (2025-11-14 16:58:23)
- Location:
- uspace/drv/nic
- Files:
-
- 6 edited
-
e1k/e1k.c (modified) (4 diffs)
-
e1k/meson.build (modified) (1 diff)
-
ne2k/ne2k.c (modified) (3 diffs)
-
rtl8139/driver.c (modified) (2 diffs)
-
rtl8169/driver.c (modified) (2 diffs)
-
virtio-net/virtio-net.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
rd101368 r3a4c6d9 175 175 /** Lock for EEPROM access */ 176 176 fibril_mutex_t eeprom_lock; 177 177 178 } e1000_t; 178 179 … … 1192 1193 if (frame != NULL) { 1193 1194 memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size); 1195 1194 1196 nic_received_frame(nic, frame); 1195 1197 } else { … … 2201 2203 goto err_fun_bind; 2202 2204 2203 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 2204 if (rc != EOK) 2205 goto err_add_to_cat; 2206 2205 rc = nic_fun_add_to_cats(fun); 2206 if (rc != EOK) { 2207 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 2208 ddf_fun_unbind(fun); 2209 return rc; 2210 } 2207 2211 return EOK; 2208 2212 2209 err_add_to_cat:2210 ddf_fun_unbind(fun);2211 2213 err_fun_bind: 2212 2214 err_rx_structure: … … 2388 2390 2389 2391 memcpy(e1000->tx_frame_virt[tdt], data, size); 2390 2391 2392 tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]); 2392 2393 tx_descriptor_addr->length = size; -
uspace/drv/nic/e1k/meson.build
rd101368 r3a4c6d9 27 27 # 28 28 29 deps = [ 'nic' ]29 deps = [ 'nic' , 'pcap' ] 30 30 src = files('e1k.c') -
uspace/drv/nic/ne2k/ne2k.c
rd101368 r3a4c6d9 44 44 #include <str_error.h> 45 45 #include <async.h> 46 #include <ddf/log.h> 46 47 #include "dp8390.h" 47 48 … … 450 451 } 451 452 452 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);453 rc = nic_fun_add_to_cats(fun); 453 454 if (rc != EOK) { 455 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 454 456 ddf_fun_unbind(fun); 455 ddf_fun_destroy(fun);456 457 return rc; 457 458 } … … 497 498 nic_driver_implement(&ne2k_driver_ops, &ne2k_dev_ops, &ne2k_nic_iface); 498 499 500 ddf_log_init(NAME); 499 501 return ddf_driver_main(&ne2k_driver); 500 502 } -
uspace/drv/nic/rtl8139/driver.c
rd101368 r3a4c6d9 1313 1313 goto err_fun_create; 1314 1314 } 1315 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 1315 1316 rc = nic_fun_add_to_cats(fun); 1316 1317 if (rc != EOK) { 1317 ddf_msg(LVL_ERROR, "Failed adding function to category"); 1318 goto err_fun_bind; 1318 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 1319 ddf_fun_unbind(fun); 1320 return rc; 1319 1321 } 1320 1322 … … 1324 1326 return EOK; 1325 1327 1326 err_fun_bind:1327 ddf_fun_unbind(fun);1328 // err_fun_bind: 1329 // ddf_fun_unbind(fun); 1328 1330 err_fun_create: 1329 1331 ddf_fun_destroy(fun); -
uspace/drv/nic/rtl8169/driver.c
rd101368 r3a4c6d9 461 461 } 462 462 463 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);463 rc = nic_fun_add_to_cats(fun); 464 464 if (rc != EOK) { 465 ddf_msg(LVL_ERROR, "Failed adding function to category"); 466 goto err_fun_bind; 465 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 466 ddf_fun_unbind(fun); 467 return rc; 467 468 } 468 469 … … 471 472 return EOK; 472 473 473 err_fun_bind:474 ddf_fun_unbind(fun);474 // err_fun_bind: 475 // ddf_fun_unbind(fun); 475 476 err_fun_create: 476 477 ddf_fun_destroy(fun); -
uspace/drv/nic/virtio-net/virtio-net.c
rd101368 r3a4c6d9 428 428 } 429 429 430 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC);430 rc = nic_fun_add_to_cats(fun); 431 431 if (rc != EOK) { 432 ddf_msg(LVL_ERROR, "Failed adding function to category"); 433 goto unbind; 432 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 433 ddf_fun_unbind(fun); 434 return rc; 434 435 } 435 436 … … 439 440 return EOK; 440 441 441 unbind:442 ddf_fun_unbind(fun);442 // unbind: 443 // ddf_fun_unbind(fun); 443 444 destroy: 444 445 ddf_fun_destroy(fun);
Note:
See TracChangeset
for help on using the changeset viewer.
