Changeset cfb79747 in mainline for uspace/lib/c/generic/device/nic.c


Ignore:
Timestamp:
2012-02-14T22:06:15Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a31aad1
Parents:
199112e4 (diff), e10d41a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/nic.c

    r199112e4 rcfb79747  
    7373}
    7474
    75 /** Connect the driver to the NET and NIL services
    76  *
    77  * @param[in] dev_sess
    78  * @param[in] nil_service Service identifier for the NIL service
     75/** Create callback connection from NIC service
     76 *
     77 * @param[in] dev_sess
    7978 * @param[in] device_id
    8079 *
     
    8281 *
    8382 */
    84 int nic_connect_to_nil(async_sess_t *dev_sess, services_t nil_service,
    85     nic_device_id_t device_id)
    86 {
    87         async_exch_t *exch = async_exchange_begin(dev_sess);
    88         int rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    89             NIC_CONNECT_TO_NIL, nil_service, device_id);
    90         async_exchange_end(exch);
    91        
    92         return rc;
     83int nic_callback_create(async_sess_t *dev_sess, async_client_conn_t cfun,
     84    void *carg)
     85{
     86        ipc_call_t answer;
     87        int rc;
     88        sysarg_t retval;
     89       
     90        async_exch_t *exch = async_exchange_begin(dev_sess);
     91        aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     92            NIC_CALLBACK_CREATE, &answer);
     93       
     94        rc = async_connect_to_me(exch, 0, 0, 0, cfun, carg);
     95        if (rc != EOK) {
     96                async_wait_for(req, NULL);
     97                return rc;
     98        }
     99        async_exchange_end(exch);
     100       
     101        async_wait_for(req, &retval);
     102        return (int) retval;
    93103}
    94104
     
    335345 * it can never force the NIC to advertise unsupported modes.
    336346 *
    337  * The allowed modes are defined in "net/eth_phys.h" in the C library.
     347 * The allowed modes are defined in "nic/eth_phys.h" in the C library.
    338348 *
    339349 * @param[in] dev_sess
     
    372382/** Probe current state of auto-negotiation.
    373383 *
    374  * Modes are defined in the "net/eth_phys.h" in the C library.
     384 * Modes are defined in the "nic/eth_phys.h" in the C library.
    375385 *
    376386 * @param[in]  dev_sess
Note: See TracChangeset for help on using the changeset viewer.