Index: uspace/lib/c/generic/device/hw_res.c
===================================================================
--- uspace/lib/c/generic/device/hw_res.c	(revision 03c971f2e2115454ea0fbcaca3ac08bd88ac0a3c)
+++ uspace/lib/c/generic/device/hw_res.c	(revision e5bc9120ed82e9b8b88a9c71d1de105d75a6ff1e)
@@ -102,12 +102,12 @@
  */
 int hw_res_dma_channel_setup(async_sess_t *sess,
-    unsigned channel, uint32_t pa, uint16_t size, uint8_t mode)
+    unsigned channel, uint32_t pa, uint32_t size, uint8_t mode)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
 	if (exch == NULL)
 		return ENOMEM;
-	const uint32_t packed = size | (mode << 16);
+	const uint32_t packed = (channel & 0xffff) | (mode << 16);
 	const int ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
-	    HW_RES_DMA_CHANNEL_SETUP, channel, pa, packed);
+	    HW_RES_DMA_CHANNEL_SETUP, packed, pa, size);
 	async_exchange_end(exch);
 
