Changeset 1d4148e in mainline


Ignore:
Timestamp:
2017-08-20T17:09:49Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d271f78
Parents:
9304b66
Message:

Added a trb own flag to the command structure to avoid tries to deallocate parts of the command ring.

Location:
uspace/drv/bus/usb/xhci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/commands.c

    r9304b66 r1d4148e  
    108108         */
    109109        cmd->has_owner = true;
     110        cmd->owns_trb = false;
    110111
    111112        return cmd;
     
    118119        if (cmd->ictx)
    119120                free32(cmd->ictx);
    120         if (cmd->trb)
     121        if (cmd->owns_trb && cmd->trb)
    121122                free32(cmd->trb);
    122123
     
    550551                command->trb = malloc32(sizeof(xhci_trb_t));
    551552                xhci_trb_copy(command->trb, command_trb);
     553                command->owns_trb = true;
    552554        }
    553555
  • uspace/drv/bus/usb/xhci/commands.h

    r9304b66 r1d4148e  
    5454        bool completed;
    5555        bool has_owner;
     56        bool owns_trb;
    5657} xhci_cmd_t;
    5758
Note: See TracChangeset for help on using the changeset viewer.