Changeset ebc9c2c in mainline for uspace/drv/block/ahci/ahci.c
- Timestamp:
- 2014-07-18T09:05:46Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 350274a
- Parents:
- e5424e9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ahci/ahci.c
re5424e9 rebc9c2c 38 38 #include <device/hw_res_parsed.h> 39 39 #include <pci_dev_iface.h> 40 #include <sysinfo.h> 41 #include <ipc/irc.h> 42 #include <ns.h> 40 #include <irc.h> 43 41 #include <ahci_iface.h> 44 42 #include "ahci.h" … … 129 127 130 128 static void ahci_get_model_name(uint16_t *, char *); 131 static int ahci_enable_interrupt(int);132 129 133 130 static fibril_mutex_t sata_devices_count_lock; … … 1195 1192 } 1196 1193 1197 rc = ahci_enable_interrupt(hw_res_parsed.irqs.irqs[0]);1194 rc = irc_enable_interrupt(hw_res_parsed.irqs.irqs[0]); 1198 1195 if (rc != EOK) { 1199 1196 ddf_msg(LVL_ERROR, "Failed enable interupt."); … … 1315 1312 } 1316 1313 1317 /** Enable interrupt using SERVICE_IRC.1318 *1319 * @param irq Requested irq number.1320 *1321 * @return EOK if succeed, error code otherwise.1322 *1323 */1324 static int ahci_enable_interrupt(int irq)1325 {1326 async_sess_t *irc_sess = NULL;1327 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_IRC, 0, 0);1328 if (!irc_sess)1329 return EINTR;1330 1331 async_exch_t *exch = async_exchange_begin(irc_sess);1332 const int rc = async_req_1_0(exch, IRC_ENABLE_INTERRUPT, irq);1333 async_exchange_end(exch);1334 1335 async_hangup(irc_sess);1336 return rc;1337 }1338 1339 1314 /*----------------------------------------------------------------------------*/ 1340 1315 /*-- AHCI Main routine -------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.