Changeset e86b8f0 in mainline for uspace/drv/nic/e1k/e1k.c
- Timestamp:
- 2012-01-21T12:50:28Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77a69ea, 86c71de
- Parents:
- 3fe58d3c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
r3fe58d3c re86b8f0 2097 2097 int e1000_dev_add(ddf_dev_t *dev) 2098 2098 { 2099 ddf_fun_t *fun; 2099 2100 assert(dev); 2100 2101 … … 2127 2128 e1000_initialize_vlan(e1000); 2128 2129 2129 rc = nic_register_as_ddf_fun(nic, &e1000_dev_ops);2130 if ( rc != EOK)2130 fun = ddf_fun_create(nic_get_ddf_dev(nic), fun_exposed, "port0"); 2131 if (fun == NULL) 2131 2132 goto err_tx_structure; 2133 nic_set_ddf_fun(nic, fun); 2134 fun->ops = &e1000_dev_ops; 2135 fun->driver_data = nic; 2132 2136 2133 2137 rc = e1000_register_int_handler(nic); 2134 2138 if (rc != EOK) 2135 goto err_ tx_structure;2139 goto err_fun_create; 2136 2140 2137 2141 rc = nic_connect_to_services(nic); … … 2156 2160 goto err_rx_structure; 2157 2161 2162 rc = ddf_fun_bind(fun); 2163 if (rc != EOK) 2164 goto err_fun_bind; 2165 2166 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 2167 if (rc != EOK) 2168 goto err_add_to_cat; 2169 2158 2170 return EOK; 2159 2171 2172 err_add_to_cat: 2173 ddf_fun_unbind(fun); 2174 err_fun_bind: 2160 2175 err_rx_structure: 2161 2176 e1000_uninitialize_rx_structure(nic); 2162 2177 err_irq: 2163 2178 unregister_interrupt_handler(dev, DRIVER_DATA_DEV(dev)->irq); 2179 err_fun_create: 2180 ddf_fun_destroy(fun); 2181 nic_set_ddf_fun(nic, NULL); 2164 2182 err_tx_structure: 2165 2183 e1000_uninitialize_tx_structure(e1000);
Note:
See TracChangeset
for help on using the changeset viewer.