Changeset 984a9ba in mainline for uspace/lib/drv/generic/remote_pci.c
- Timestamp:
- 2018-07-05T09:34:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_pci.c
r76f566d r984a9ba 124 124 } 125 125 126 static void remote_config_space_read_8(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);127 static void remote_config_space_read_16(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);128 static void remote_config_space_read_32(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);129 130 static void remote_config_space_write_8(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);131 static void remote_config_space_write_16(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);132 static void remote_config_space_write_32(ddf_fun_t *, void *, cap_call_handle_t,ipc_call_t *);126 static void remote_config_space_read_8(ddf_fun_t *, void *, ipc_call_t *); 127 static void remote_config_space_read_16(ddf_fun_t *, void *, ipc_call_t *); 128 static void remote_config_space_read_32(ddf_fun_t *, void *, ipc_call_t *); 129 130 static void remote_config_space_write_8(ddf_fun_t *, void *, ipc_call_t *); 131 static void remote_config_space_write_16(ddf_fun_t *, void *, ipc_call_t *); 132 static void remote_config_space_write_32(ddf_fun_t *, void *, ipc_call_t *); 133 133 134 134 /** Remote USB interface operations. */ … … 150 150 }; 151 151 152 void remote_config_space_read_8(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)152 void remote_config_space_read_8(ddf_fun_t *fun, void *iface, ipc_call_t *call) 153 153 { 154 154 assert(iface); 155 155 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 156 156 if (pci_iface->config_space_read_8 == NULL) { 157 async_answer_0(c handle, ENOTSUP);157 async_answer_0(call, ENOTSUP); 158 158 return; 159 159 } … … 162 162 errno_t ret = pci_iface->config_space_read_8(fun, address, &value); 163 163 if (ret != EOK) { 164 async_answer_0(c handle, ret);165 } else { 166 async_answer_1(c handle, EOK, value);167 } 168 } 169 170 void remote_config_space_read_16(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)164 async_answer_0(call, ret); 165 } else { 166 async_answer_1(call, EOK, value); 167 } 168 } 169 170 void remote_config_space_read_16(ddf_fun_t *fun, void *iface, ipc_call_t *call) 171 171 { 172 172 assert(iface); 173 173 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 174 174 if (pci_iface->config_space_read_16 == NULL) { 175 async_answer_0(c handle, ENOTSUP);175 async_answer_0(call, ENOTSUP); 176 176 return; 177 177 } … … 180 180 errno_t ret = pci_iface->config_space_read_16(fun, address, &value); 181 181 if (ret != EOK) { 182 async_answer_0(c handle, ret);183 } else { 184 async_answer_1(c handle, EOK, value);185 } 186 } 187 void remote_config_space_read_32(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)182 async_answer_0(call, ret); 183 } else { 184 async_answer_1(call, EOK, value); 185 } 186 } 187 void remote_config_space_read_32(ddf_fun_t *fun, void *iface, ipc_call_t *call) 188 188 { 189 189 assert(iface); 190 190 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 191 191 if (pci_iface->config_space_read_32 == NULL) { 192 async_answer_0(c handle, ENOTSUP);192 async_answer_0(call, ENOTSUP); 193 193 return; 194 194 } … … 197 197 errno_t ret = pci_iface->config_space_read_32(fun, address, &value); 198 198 if (ret != EOK) { 199 async_answer_0(c handle, ret);200 } else { 201 async_answer_1(c handle, EOK, value);202 } 203 } 204 205 void remote_config_space_write_8(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)199 async_answer_0(call, ret); 200 } else { 201 async_answer_1(call, EOK, value); 202 } 203 } 204 205 void remote_config_space_write_8(ddf_fun_t *fun, void *iface, ipc_call_t *call) 206 206 { 207 207 assert(iface); 208 208 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 209 209 if (pci_iface->config_space_write_8 == NULL) { 210 async_answer_0(c handle, ENOTSUP);210 async_answer_0(call, ENOTSUP); 211 211 return; 212 212 } … … 215 215 errno_t ret = pci_iface->config_space_write_8(fun, address, value); 216 216 if (ret != EOK) { 217 async_answer_0(c handle, ret);218 } else { 219 async_answer_0(c handle, EOK);220 } 221 } 222 223 void remote_config_space_write_16(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)217 async_answer_0(call, ret); 218 } else { 219 async_answer_0(call, EOK); 220 } 221 } 222 223 void remote_config_space_write_16(ddf_fun_t *fun, void *iface, ipc_call_t *call) 224 224 { 225 225 assert(iface); 226 226 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 227 227 if (pci_iface->config_space_write_16 == NULL) { 228 async_answer_0(c handle, ENOTSUP);228 async_answer_0(call, ENOTSUP); 229 229 return; 230 230 } … … 233 233 errno_t ret = pci_iface->config_space_write_16(fun, address, value); 234 234 if (ret != EOK) { 235 async_answer_0(c handle, ret);236 } else { 237 async_answer_0(c handle, EOK);238 } 239 } 240 241 void remote_config_space_write_32(ddf_fun_t *fun, void *iface, cap_call_handle_t chandle,ipc_call_t *call)235 async_answer_0(call, ret); 236 } else { 237 async_answer_0(call, EOK); 238 } 239 } 240 241 void remote_config_space_write_32(ddf_fun_t *fun, void *iface, ipc_call_t *call) 242 242 { 243 243 assert(iface); 244 244 pci_dev_iface_t *pci_iface = (pci_dev_iface_t *)iface; 245 245 if (pci_iface->config_space_write_32 == NULL) { 246 async_answer_0(c handle, ENOTSUP);246 async_answer_0(call, ENOTSUP); 247 247 return; 248 248 } … … 251 251 errno_t ret = pci_iface->config_space_write_32(fun, address, value); 252 252 if (ret != EOK) { 253 async_answer_0(chandle, ret); 254 } else { 255 async_answer_0(chandle, EOK); 256 } 257 } 258 253 async_answer_0(call, ret); 254 } else { 255 async_answer_0(call, EOK); 256 } 257 } 259 258 260 259 /** 261 260 * @} 262 261 */ 263
Note:
See TracChangeset
for help on using the changeset viewer.