Changeset 426d31a in mainline


Ignore:
Timestamp:
2011-05-07T11:14:30Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
192ba25
Parents:
abfd36b
Message:

corrected change disabling

Location:
uspace/drv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/root_hub.c

    rabfd36b r426d31a  
    275275void rh_interrupt(rh_t *instance) {
    276276        if (!instance->unfinished_interrupt_transfer) {
    277 
    278277                return;
    279278        }
  • uspace/drv/usbhub/ports.c

    rabfd36b r426d31a  
    5353        size_t port;
    5454        usb_speed_t speed;
     55};
     56
     57/**
     58 * count of port status changes that are not explicitly handled by
     59 * any function here and must be cleared by hand
     60 */
     61static const unsigned int non_handled_changes_count = 2;
     62
     63/**
     64 * port status changes that are not explicitly handled by
     65 * any function here and must be cleared by hand
     66 */
     67static const int non_handled_changes[] =  {
     68        USB_HUB_FEATURE_C_PORT_ENABLE,
     69        USB_HUB_FEATURE_C_PORT_SUSPEND
    5570};
    5671
     
    131146            &status, USB_HUB_FEATURE_C_PORT_CONNECTION,false);
    132147        usb_port_status_set_bit(
    133             &status, USB_HUB_FEATURE_PORT_RESET,false);
    134         usb_port_status_set_bit(
    135148            &status, USB_HUB_FEATURE_C_PORT_RESET,false);
    136149        usb_port_status_set_bit(
    137150            &status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT,false);
    138         /// \TODO what about port power change?
    139         unsigned int bit_idx;
    140         for(bit_idx = 16;bit_idx<32;++bit_idx){
     151       
     152        //clearing not yet handled changes     
     153        unsigned int feature_idx;
     154        for(feature_idx = 0;feature_idx<non_handled_changes_count;
     155            ++feature_idx){
     156                unsigned int bit_idx = non_handled_changes[feature_idx];
    141157                if(status & (1<<bit_idx)){
    142158                        usb_log_info(
     
    157173                }
    158174        }
    159         if (status >> 16) {
    160                 usb_log_info("there was a mistake on port %d "
    161                     "(not cleared status change): %X\n",
    162                         port, status);
    163         }
    164175}
    165176
Note: See TracChangeset for help on using the changeset viewer.