Changeset 6843a9c in mainline for uspace/srv/bd/gxe_bd/gxe_bd.c
- Timestamp:
- 2012-06-29T13:02:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 722912e
- Parents:
- ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/gxe_bd/gxe_bd.c
rba72f2b r6843a9c 122 122 static int gxe_bd_init(void) 123 123 { 124 async_set_client_connection(gxe_bd_connection); 125 int rc = loc_server_register(NAME); 126 if (rc != EOK) { 127 printf("%s: Unable to register driver.\n", NAME); 128 return rc; 129 } 130 124 131 void *vaddr; 125 int rc, i;126 char name[16];127 128 rc = loc_server_register(NAME, gxe_bd_connection);129 if (rc < 0) {130 printf(NAME ": Unable to register driver.\n");131 return rc;132 }133 134 132 rc = pio_enable((void *) dev_physical, sizeof(gxe_bd_t), &vaddr); 135 133 if (rc != EOK) { 136 printf( NAME ": Could not initialize device I/O space.\n");134 printf("%s: Could not initialize device I/O space.\n", NAME); 137 135 return rc; 138 136 } 139 137 140 138 dev = vaddr; 141 142 for (i = 0; i < MAX_DISKS; i++) { 143 snprintf(name, 16, "%s/disk%d", NAMESPACE, i); 139 140 for (unsigned int i = 0; i < MAX_DISKS; i++) { 141 char name[16]; 142 143 snprintf(name, 16, "%s/disk%u", NAMESPACE, i); 144 144 rc = loc_service_register(name, &service_id[i]); 145 145 if (rc != EOK) { 146 printf(NAME ": Unable to register device %s.\n", name); 146 printf("%s: Unable to register device %s.\n", NAME, 147 name); 147 148 return rc; 148 149 } 150 149 151 fibril_mutex_initialize(&dev_lock[i]); 150 152 } 151 153 152 154 return EOK; 153 155 } … … 193 195 } 194 196 195 fs_va = as_get_mappable_page(comm_size);196 if (fs_va == NULL) {197 (void) async_share_out_finalize(callid, &fs_va); 198 if (fs_va == AS_MAP_FAILED) { 197 199 async_answer_0(callid, EHANGUP); 198 200 return; 199 201 } 200 201 (void) async_share_out_finalize(callid, fs_va);202 202 203 203 while (true) {
Note:
See TracChangeset
for help on using the changeset viewer.