mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ANDROID: usb: host: add max packet parameter on alloc_transfer_ring hook
It needs to add max_packet parameter on alloc_transfer_ring. It's used for setting ring->bounce_buf_len. Bug: 183761108 Signed-off-by: Daehwan Jung <dh10.jung@samsung.com> Change-Id: I2bd3ded9edf31d20b5f05c41828d5d6ccf6864e0
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3390f5d0dc
commit
9d10efa2a0
@@ -384,13 +384,13 @@ static void xhci_vendor_alloc_container_ctx(struct xhci_hcd *xhci, struct xhci_c
|
|||||||
|
|
||||||
static struct xhci_ring *xhci_vendor_alloc_transfer_ring(struct xhci_hcd *xhci,
|
static struct xhci_ring *xhci_vendor_alloc_transfer_ring(struct xhci_hcd *xhci,
|
||||||
u32 endpoint_type, enum xhci_ring_type ring_type,
|
u32 endpoint_type, enum xhci_ring_type ring_type,
|
||||||
gfp_t mem_flags)
|
unsigned int max_packet, gfp_t mem_flags)
|
||||||
{
|
{
|
||||||
struct xhci_vendor_ops *ops = xhci_vendor_get_ops(xhci);
|
struct xhci_vendor_ops *ops = xhci_vendor_get_ops(xhci);
|
||||||
|
|
||||||
if (ops && ops->alloc_transfer_ring)
|
if (ops && ops->alloc_transfer_ring)
|
||||||
return ops->alloc_transfer_ring(xhci, endpoint_type, ring_type,
|
return ops->alloc_transfer_ring(xhci, endpoint_type, ring_type,
|
||||||
mem_flags);
|
max_packet, mem_flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1558,7 +1558,8 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
|
|||||||
if (xhci_vendor_is_usb_offload_enabled(xhci, virt_dev, ep_index) &&
|
if (xhci_vendor_is_usb_offload_enabled(xhci, virt_dev, ep_index) &&
|
||||||
usb_endpoint_xfer_isoc(&ep->desc)) {
|
usb_endpoint_xfer_isoc(&ep->desc)) {
|
||||||
virt_dev->eps[ep_index].new_ring =
|
virt_dev->eps[ep_index].new_ring =
|
||||||
xhci_vendor_alloc_transfer_ring(xhci, endpoint_type, ring_type, mem_flags);
|
xhci_vendor_alloc_transfer_ring(xhci, endpoint_type, ring_type,
|
||||||
|
max_packet, mem_flags);
|
||||||
} else {
|
} else {
|
||||||
virt_dev->eps[ep_index].new_ring =
|
virt_dev->eps[ep_index].new_ring =
|
||||||
xhci_ring_alloc(xhci, 2, 1, ring_type, max_packet, mem_flags);
|
xhci_ring_alloc(xhci, 2, 1, ring_type, max_packet, mem_flags);
|
||||||
|
|||||||
@@ -2239,7 +2239,7 @@ struct xhci_vendor_ops {
|
|||||||
|
|
||||||
struct xhci_ring *(*alloc_transfer_ring)(struct xhci_hcd *xhci,
|
struct xhci_ring *(*alloc_transfer_ring)(struct xhci_hcd *xhci,
|
||||||
u32 endpoint_type, enum xhci_ring_type ring_type,
|
u32 endpoint_type, enum xhci_ring_type ring_type,
|
||||||
gfp_t mem_flags);
|
unsigned int max_packet, gfp_t mem_flags);
|
||||||
void (*free_transfer_ring)(struct xhci_hcd *xhci,
|
void (*free_transfer_ring)(struct xhci_hcd *xhci,
|
||||||
struct xhci_virt_device *virt_dev, unsigned int ep_index);
|
struct xhci_virt_device *virt_dev, unsigned int ep_index);
|
||||||
int (*sync_dev_ctx)(struct xhci_hcd *xhci, unsigned int slot_id);
|
int (*sync_dev_ctx)(struct xhci_hcd *xhci, unsigned int slot_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user