Changeset 827ec41 in mainline
- Timestamp:
- 2011-12-29T12:50:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ae481e0
- Parents:
- f0b74b2
- Location:
- uspace/drv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/root_hub.c
rf0b74b2 r827ec41 226 226 fibril_mutex_lock(&instance->guard); 227 227 assert(instance->unfinished_interrupt_transfer == NULL); 228 constuint16_t mask = create_interrupt_mask(instance);228 uint16_t mask = create_interrupt_mask(instance); 229 229 if (mask == 0) { 230 230 usb_log_debug("No changes...\n"); … … 257 257 if (instance->unfinished_interrupt_transfer) { 258 258 usb_log_debug("Finalizing interrupt transfer\n"); 259 constuint16_t mask = create_interrupt_mask(instance);259 uint16_t mask = create_interrupt_mask(instance); 260 260 interrupt_request(instance->unfinished_interrupt_transfer, 261 261 mask, instance->interrupt_mask_size); … … 278 278 279 279 /* 7 bytes + 2 port bit fields (port count + global bit) */ 280 constsize_t size = 7 + (instance->interrupt_mask_size * 2);280 size_t size = 7 + (instance->interrupt_mask_size * 2); 281 281 assert(size <= HUB_DESCRIPTOR_MAX_SIZE); 282 282 instance->hub_descriptor_size = size; 283 283 284 constuint32_t hub_desc = instance->registers->rh_desc_a;285 constuint32_t port_desc = instance->registers->rh_desc_b;284 uint32_t hub_desc = instance->registers->rh_desc_a; 285 uint32_t port_desc = instance->registers->rh_desc_b; 286 286 287 287 /* bDescLength */ … … 394 394 395 395 396 constusb_device_request_setup_packet_t *request_packet =396 usb_device_request_setup_packet_t *request_packet = 397 397 (usb_device_request_setup_packet_t*)request->setup_buffer; 398 398 … … 406 406 TRANSFER_END(request, EOVERFLOW); 407 407 } else { 408 constuint32_t data = instance->registers->rh_status &408 uint32_t data = instance->registers->rh_status & 409 409 (RHS_LPS_FLAG | RHS_LPSC_FLAG 410 410 | RHS_OCI_FLAG | RHS_OCIC_FLAG); … … 420 420 TRANSFER_END(request, EOVERFLOW); 421 421 } else { 422 constunsigned port = request_packet->index;422 unsigned port = request_packet->index; 423 423 if (port < 1 || port > instance->port_count) 424 424 TRANSFER_END(request, EINVAL); 425 425 426 constuint32_t data =426 uint32_t data = 427 427 instance->registers->rh_port_status[port - 1]; 428 428 TRANSFER_END_DATA(request, &data, sizeof(data)); … … 434 434 TRANSFER_END(request, EOVERFLOW); 435 435 } else { 436 static constuint16_t data =436 uint16_t data = 437 437 uint16_host2usb(USB_DEVICE_STATUS_SELF_POWERED); 438 438 TRANSFER_END_DATA(request, &data, sizeof(data)); … … 455 455 } else { 456 456 /* Endpoints are OK. (We don't halt) */ 457 static constuint16_t data = 0;457 uint16_t data = 0; 458 458 TRANSFER_END_DATA(request, &data, sizeof(data)); 459 459 } … … 480 480 assert(request); 481 481 482 constusb_device_request_setup_packet_t *setup_request =482 usb_device_request_setup_packet_t *setup_request = 483 483 (usb_device_request_setup_packet_t *) request->setup_buffer; 484 constuint16_t setup_request_value = setup_request->value_high;484 uint16_t setup_request_value = setup_request->value_high; 485 485 switch (setup_request_value) 486 486 { … … 648 648 assert(request); 649 649 650 constusb_device_request_setup_packet_t *setup_request =650 usb_device_request_setup_packet_t *setup_request = 651 651 (usb_device_request_setup_packet_t *) request->setup_buffer; 652 652 switch (setup_request->request_type) … … 654 654 case USB_HUB_REQ_TYPE_SET_PORT_FEATURE: 655 655 usb_log_debug("USB_HUB_REQ_TYPE_SET_PORT_FEATURE\n"); 656 constint ret = set_feature_port(instance,656 int ret = set_feature_port(instance, 657 657 setup_request->value, setup_request->index); 658 658 TRANSFER_END(request, ret); … … 686 686 assert(request); 687 687 688 constusb_device_request_setup_packet_t *setup_request =688 usb_device_request_setup_packet_t *setup_request = 689 689 (usb_device_request_setup_packet_t *) request->setup_buffer; 690 690 … … 693 693 case USB_HUB_REQ_TYPE_CLEAR_PORT_FEATURE: 694 694 usb_log_debug("USB_HUB_REQ_TYPE_CLEAR_PORT_FEATURE\n"); 695 constint ret = clear_feature_port(instance,695 int ret = clear_feature_port(instance, 696 696 setup_request->value, setup_request->index); 697 697 TRANSFER_END(request, ret); … … 753 753 usb_log_debug2("CTRL packet: %s.\n", 754 754 usb_debug_str_buffer((uint8_t *) request->setup_buffer, 8, 8)); 755 constusb_device_request_setup_packet_t *setup_request =755 usb_device_request_setup_packet_t *setup_request = 756 756 (usb_device_request_setup_packet_t *) request->setup_buffer; 757 757 switch (setup_request->request) … … 771 771 if (request->buffer_size == 0) 772 772 TRANSFER_END(request, EOVERFLOW); 773 static constuint8_t config = 1;773 uint8_t config = 1; 774 774 TRANSFER_END_DATA(request, &config, sizeof(config)); 775 775 -
uspace/drv/infrastructure/rootmac/rootmac.c
rf0b74b2 r827ec41 161 161 162 162 static hw_res_ops_t fun_hw_res_ops = { 163 164 &rootmac_enable_interrupt163 .get_resource_list = &rootmac_get_resources, 164 .enable_interrupt = &rootmac_enable_interrupt 165 165 }; 166 166
Note:
See TracChangeset
for help on using the changeset viewer.