Changes in / [b93d637:c979591b] in mainline


Ignore:
Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/devices.c

    rb93d637 rc979591b  
    9090usb_transaction_outcome_t virtdev_send_to_all(transaction_t *transaction)
    9191{
     92        /* For easier debugging. */
     93        switch (transaction->type) {
     94                case USBVIRT_TRANSACTION_SETUP:
     95                case USBVIRT_TRANSACTION_OUT:
     96                        transaction->actual_len = transaction->len;
     97                        break;
     98                case USBVIRT_TRANSACTION_IN:
     99                        transaction->actual_len = 0;
     100                        break;
     101                default:
     102                        assert(false && "unreachable branch in switch()");
     103        }
     104        usb_transaction_outcome_t outcome = USB_OUTCOME_BABBLE;
     105
    92106        link_t *pos;
    93107        list_foreach(pos, &devices) {
     
    140154                        transaction->actual_len = IPC_GET_ARG1(answer_data);
    141155                        rc = (int)answer_rc;
     156                }
     157
     158                /*
     159                 * If at least one device was able to accept this
     160                 * transaction and process it, we can announce success.
     161                 */
     162                if (rc == EOK) {
     163                        outcome = USB_OUTCOME_OK;
    142164                }
    143165        }
     
    178200                }
    179201                dprintf(4, "transaction on hub processed...");
     202                outcome = USB_OUTCOME_OK;
    180203        }
    181204       
     
    184207         * real-life image.
    185208         */
    186         return USB_OUTCOME_OK;
     209        return outcome;
    187210}
    188211
  • uspace/lib/drv/generic/remote_usbhc.c

    rb93d637 rc979591b  
    243243
    244244        // FIXME - answer according to outcome
    245         ipc_answer_0(trans->caller, EOK);
     245        ipc_answer_0(trans->caller, outcome);
    246246
    247247        free(trans);
     
    254254
    255255        // FIXME - answer according to outcome
    256         ipc_answer_1(trans->caller, EOK, (sysarg_t)trans);
     256        ipc_answer_1(trans->caller, outcome, (sysarg_t)trans);
    257257
    258258        trans->size = actual_size;
Note: See TracChangeset for help on using the changeset viewer.