Changeset c4fb5ecd in mainline for uspace/drv/uhci_hcd
- Timestamp:
- 2011-06-18T19:18:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 497b6f31
- Parents:
- 84eb7432
- Location:
- uspace/drv/uhci_hcd
- Files:
-
- 4 edited
-
batch.c (modified) (9 diffs)
-
hw_struct/transfer_descriptor.c (modified) (1 diff)
-
iface.c (modified) (3 diffs)
-
transfer_list.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci_hcd/batch.c
r84eb7432 rc4fb5ecd 147 147 + sizeof(qh_t); 148 148 void *data_buffer = setup + setup_size; 149 usb_target_t target =150 { .address = ep->address, .endpoint = ep->endpoint };151 149 usb_transfer_batch_init(instance, ep, buffer, data_buffer, buffer_size, 152 150 setup, setup_size, func_in, func_out, arg, fun, … … 154 152 155 153 memcpy(instance->setup_buffer, setup_buffer, setup_size); 156 usb_log_debug("Batch(%p) %d:%d memory structures ready.\n", 157 instance, target.address, target.endpoint); 154 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT 155 " memory structures ready.\n", instance, 156 USB_TRANSFER_BATCH_ARGS(*instance)); 158 157 return instance; 159 158 } … … 205 204 return true; 206 205 } 206 207 #define LOG_BATCH_INITIALIZED(batch, name) \ 208 usb_log_debug2("Batch %p %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \ 209 (batch), (name), USB_TRANSFER_BATCH_ARGS(*(batch))) 210 207 211 /*----------------------------------------------------------------------------*/ 208 212 /** Prepares control write transfer. … … 219 223 batch_control(instance, USB_PID_OUT, USB_PID_IN); 220 224 instance->next_step = usb_transfer_batch_call_out_and_dispose; 221 usb_log_debug("Batch(%p) CONTROL WRITE initialized.\n", instance);225 LOG_BATCH_INITIALIZED(instance, "control write"); 222 226 } 223 227 /*----------------------------------------------------------------------------*/ … … 233 237 batch_control(instance, USB_PID_IN, USB_PID_OUT); 234 238 instance->next_step = usb_transfer_batch_call_in_and_dispose; 235 usb_log_debug("Batch(%p) CONTROL READ initialized.\n", instance);239 LOG_BATCH_INITIALIZED(instance, "control read"); 236 240 } 237 241 /*----------------------------------------------------------------------------*/ … … 247 251 batch_data(instance, USB_PID_IN); 248 252 instance->next_step = usb_transfer_batch_call_in_and_dispose; 249 usb_log_debug("Batch(%p) INTERRUPT IN initialized.\n", instance);253 LOG_BATCH_INITIALIZED(instance, "interrupt in"); 250 254 } 251 255 /*----------------------------------------------------------------------------*/ … … 263 267 batch_data(instance, USB_PID_OUT); 264 268 instance->next_step = usb_transfer_batch_call_out_and_dispose; 265 usb_log_debug("Batch(%p) INTERRUPT OUT initialized.\n", instance);269 LOG_BATCH_INITIALIZED(instance, "interrupt out"); 266 270 } 267 271 /*----------------------------------------------------------------------------*/ … … 277 281 batch_data(instance, USB_PID_IN); 278 282 instance->next_step = usb_transfer_batch_call_in_and_dispose; 279 usb_log_debug("Batch(%p) BULK IN initialized.\n", instance);283 LOG_BATCH_INITIALIZED(instance, "bulk in"); 280 284 } 281 285 /*----------------------------------------------------------------------------*/ … … 293 297 batch_data(instance, USB_PID_OUT); 294 298 instance->next_step = usb_transfer_batch_call_out_and_dispose; 295 usb_log_debug("Batch(%p) BULK OUT initialized.\n", instance);299 LOG_BATCH_INITIALIZED(instance, "bulk out"); 296 300 } 297 301 /*----------------------------------------------------------------------------*/ -
uspace/drv/uhci_hcd/hw_struct/transfer_descriptor.c
r84eb7432 rc4fb5ecd 103 103 td_print_status(instance); 104 104 if (pid == USB_PID_SETUP) { 105 usb_log_debug ("SETUP BUFFER: %s\n",105 usb_log_debug2("SETUP BUFFER: %s\n", 106 106 usb_debug_str_buffer(buffer, 8, 8)); 107 107 } -
uspace/drv/uhci_hcd/iface.c
r84eb7432 rc4fb5ecd 64 64 } 65 65 66 usb_log_debug ("%s %d:%d %zu(%zu).\n",66 usb_log_debug2("%s %d:%d %zu(%zu).\n", 67 67 name, target.address, target.endpoint, size, ep->max_packet_size); 68 68 … … 172 172 speed = ep_speed; 173 173 } 174 usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",174 usb_log_debug("Register endpoint %d:%d %s-%s %s %zuB %ums.\n", 175 175 address, endpoint, usb_str_transfer_type(transfer_type), 176 usb_str_speed(speed), direction, size, max_packet_size, interval); 176 usb_str_direction(direction), usb_str_speed(speed), 177 max_packet_size, interval); 177 178 178 179 return usb_endpoint_manager_add_ep(&hc->ep_manager, address, endpoint, … … 187 188 hc_t *hc = fun_to_hc(fun); 188 189 assert(hc); 189 usb_log_debug("Unregister endpoint %d:%d % d.\n",190 address, endpoint, direction);190 usb_log_debug("Unregister endpoint %d:%d %s.\n", 191 address, endpoint, usb_str_direction(direction)); 191 192 return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address, 192 193 endpoint, direction); -
uspace/drv/uhci_hcd/transfer_list.c
r84eb7432 rc4fb5ecd 141 141 list_append(&batch->link, &instance->batch_list); 142 142 143 usb_transfer_batch_t *first = list_get_instance( 144 instance->batch_list.next, usb_transfer_batch_t, link); 145 usb_log_debug("Batch(%p) added to queue %s, first is %p.\n", 146 batch, instance->name, first); 143 usb_log_debug("Batch %p " USB_TRANSFER_BATCH_FMT " scheduled in queue %s.\n", 144 batch, USB_TRANSFER_BATCH_ARGS(*batch), instance->name); 147 145 fibril_mutex_unlock(&instance->guard); 148 146 } … … 234 232 /* Remove from the batch list */ 235 233 list_remove(&batch->link); 236 usb_log_debug("Batch(%p) removed (%s) from %s, next: %x.\n", 237 batch, qpos, instance->name, batch_qh(batch)->next); 234 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " removed (%s) " 235 "from %s, next: %x.\n", 236 batch, USB_TRANSFER_BATCH_ARGS(*batch), 237 qpos, instance->name, batch_qh(batch)->next); 238 238 } 239 239 /**
Note:
See TracChangeset
for help on using the changeset viewer.
