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 ac8b0966d9cb53b8afc2aaec1a1b5cd4863f32f0)
@@ -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);
 
Index: uspace/lib/c/include/device/hw_res.h
===================================================================
--- uspace/lib/c/include/device/hw_res.h	(revision 03c971f2e2115454ea0fbcaca3ac08bd88ac0a3c)
+++ uspace/lib/c/include/device/hw_res.h	(revision ac8b0966d9cb53b8afc2aaec1a1b5cd4863f32f0)
@@ -116,5 +116,5 @@
 
 extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t,
-    uint16_t, uint8_t);
+    uint32_t, uint8_t);
 extern int hw_res_dma_channel_remain(async_sess_t *, unsigned);
 
