summaryrefslogtreecommitdiff
path: root/net/rds/rds_single_path.h
blob: e1241af7c1add4ce6a75c087a3f03baa839dcab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef _RDS_RDS_SINGLE_H
#define _RDS_RDS_SINGLE_H

#define	c_xmit_rm		c_path[0].cp_xmit_rm
#define	c_xmit_sg		c_path[0].cp_xmit_sg
#define	c_xmit_hdr_off		c_path[0].cp_xmit_hdr_off
#define	c_xmit_data_off		c_path[0].cp_xmit_data_off
#define	c_xmit_atomic_sent	c_path[0].cp_xmit_atomic_sent
#define	c_xmit_rdma_sent	c_path[0].cp_xmit_rdma_sent
#define	c_xmit_data_sent	c_path[0].cp_xmit_data_sent
#define	c_lock			c_path[0].cp_lock
#define c_next_tx_seq		c_path[0].cp_next_tx_seq
#define c_send_queue		c_path[0].cp_send_queue
#define c_retrans		c_path[0].cp_retrans
#define c_next_rx_seq		c_path[0].cp_next_rx_seq
#define c_transport_data	c_path[0].cp_transport_data
#define c_state			c_path[0].cp_state
#define c_send_gen		c_path[0].cp_send_gen
#define c_flags			c_path[0].cp_flags
#define c_reconnect_jiffies	c_path[0].cp_reconnect_jiffies
#define c_send_w		c_path[0].cp_send_w
#define c_recv_w		c_path[0].cp_recv_w
#define c_conn_w		c_path[0].cp_conn_w
#define c_down_w		c_path[0].cp_down_w
#define c_cm_lock		c_path[0].cp_cm_lock
#define c_waitq			c_path[0].cp_waitq
#define c_unacked_packets	c_path[0].cp_unacked_packets
#define c_unacked_bytes		c_path[0].cp_unacked_bytes

#endif /* _RDS_RDS_SINGLE_H */
USB mass storage
Commit fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") added runtime PM support for cppi41, but had corner case issues. Some of the issues were fixed with commit 098de42ad670 ("dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected"). That fix however caused a new regression where we can get error -115 messages with USB on BeagleBone when connecting a USB mass storage device to a hub. This is because when connecting a USB mass storage device to a hub, the initial DMA transfers can take over 200ms to complete and cppi41 autosuspend delay times out. To fix the issue, we want to implement refcounting for chan_busy array that contains the active dma transfers. Increasing the autosuspend delay won't help as that the delay could be potentially seconds, and it's best to let the USB subsystem to deal with the timeouts on errors. The earlier attempt for runtime PM was buggy as the pm_runtime_get/put() calls could get unpaired easily as they did not follow the state of the chan_busy array as described in commit 098de42ad670 ("dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected". Let's fix the issue by adding pm_runtime_get() to where a new transfer is added to the chan_busy array, and calls to pm_runtime_put() where chan_busy array entry is cleared. This prevents any autosuspend timeouts from happening while dma transfers are active. Fixes: 098de42ad670 ("dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected") Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Bin Liu <b-liu@ti.com> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Patrick Titiano <ptitiano@baylibre.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'sound/soc/intel')