1010#define CISP_OPCODE_GET (x ) (((u64)(x)) >> CISP_OPCODE_SHIFT)
1111
1212#define CISP_TIMEOUT msecs_to_jiffies(3000)
13- #define CISP_SEND_IN (x , a ) (cisp_send((x), &(a), sizeof(a), 0))
14- #define CISP_SEND_INOUT (x , a ) (cisp_send((x), &(a), sizeof(a), sizeof(a)))
13+ #define CISP_SEND_IN (x , a ) (cisp_send((x), &(a), sizeof(a), 0, CISP_TIMEOUT ))
14+ #define CISP_SEND_INOUT (x , a ) (cisp_send((x), &(a), sizeof(a), sizeof(a), CISP_TIMEOUT ))
1515#define CISP_SEND_OUT (x , a ) (cisp_send_read((x), (a), sizeof(*a), sizeof(*a)))
16+ #define CISP_POST_IN (x , a ) (cisp_send((x), &(a), sizeof(a), 0, 0))
1617
17- static int cisp_send (struct apple_isp * isp , void * args , u32 insize , u32 outsize )
18+ static int cisp_send (struct apple_isp * isp , void * args , u32 insize , u32 outsize , int timeout )
1819{
1920 struct isp_channel * chan = isp -> chan_io ;
2021 struct isp_message * req = & chan -> req ;
@@ -25,7 +26,7 @@ static int cisp_send(struct apple_isp *isp, void *args, u32 insize, u32 outsize)
2526 req -> arg2 = outsize ;
2627
2728 memcpy (isp -> cmd_virt , args , insize );
28- err = ipc_chan_send (isp , chan , CISP_TIMEOUT );
29+ err = ipc_chan_send (isp , chan , timeout );
2930 if (err ) {
3031 u64 opcode ;
3132 memcpy (& opcode , args , sizeof (opcode ));
@@ -42,7 +43,7 @@ static int cisp_send_read(struct apple_isp *isp, void *args, u32 insize,
4243 u32 outsize )
4344{
4445 /* TODO do I need to lock the iova space? */
45- int err = cisp_send (isp , args , insize , outsize );
46+ int err = cisp_send (isp , args , insize , outsize , CISP_TIMEOUT );
4647 if (err )
4748 return err ;
4849
0 commit comments