19 #include <linux/types.h>
45 #define DEFAULTTIMEOUT 10000
46 #define DEFAULTNUMBUFS 2
85 static int delete_strm(
struct strm_object *stream_obj);
93 u8 **ap_buffer,
u32 num_bufs,
118 if (ap_buffer[i] ==
NULL) {
162 status = delete_strm(stream_obj);
170 dev_dbg(
bridge,
"%s: stream_obj: %p, status 0x%x\n", __func__,
189 if (strm_mgr_obj ==
NULL)
204 *strm_man = strm_mgr_obj;
258 u32 stream_info_size)
268 if (stream_info_size <
sizeof(
struct stream_info)) {
301 if (chnl_info_obj.
cio_cs > 0)
303 else if (chnl_info_obj.
cio_reqs > 0)
304 stream_info->
user_strm->ss_stream_state =
334 dev_dbg(
bridge,
"%s: stream_obj: %p flush_data: 0x%x status: 0x%x\n",
335 __func__, stream_obj, flush_data, status);
345 u32 ul_buf_size,
u32 dw_arg)
349 void *tmp_buf =
NULL;
366 (stream_obj->
chnl_obj, pbuf, ul_bytes, ul_buf_size,
367 (
u32) tmp_buf, dw_arg);
373 dev_dbg(
bridge,
"%s: stream_obj: %p pbuf: %p ul_bytes: 0x%x dw_arg:"
374 " 0x%x status: 0x%x\n", __func__, stream_obj, pbuf,
375 ul_bytes, dw_arg, status);
413 if (strm_obj ==
NULL) {
484 chnl_mode, ul_chnl_id,
491 if (status != -
ENOMEM && status !=
506 &stream_res, pr_ctxt);
508 delete_strm(strm_obj);
512 (
void)delete_strm(strm_obj);
515 dev_dbg(
bridge,
"%s: hnode: %p dir: 0x%x index: 0x%x pattr: %p "
516 "strmres: %p status: 0x%x\n", __func__,
517 hnode, dir, index, pattr, strmres, status);
532 void *tmp_buf =
NULL;
549 *pdw_arg = chnl_ioc_obj.
arg;
574 if (tmp_buf !=
NULL) {
584 chnl_ioc_obj.
buf = tmp_buf;
586 *buf_ptr = chnl_ioc_obj.
buf;
590 "pdw_arg: %p status 0x%x\n", __func__, stream_obj,
591 buf_ptr, nbytes, pdw_arg, status);
647 for (i = 0; i < strms; i++) {
657 for (i = 0; i < strms; i++) {
664 if (chnl_info_obj.
cio_cs > 0)
669 if (!status && utimeout > 0 && *pmask == 0) {
674 if (sync_events ==
NULL) {
677 for (i = 0; i < strms; i++) {
681 (strm_tab[i]->chnl_obj, &chnl_info_obj);
713 static int delete_strm(
struct strm_object *stream_obj)