Commit a1f6376d authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

xhci: dbc: Pass dbc pointer to dbc_handle_xfer_event() instead of xhci_hcd pointer

The event handling function only used xhci pointer to get the dbc pointer.
Pass the dbc pointer instead as a parameter

No functional changes
This change helps decoupling xhci and DbC
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200723144530.9992-15-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 903089b7
...@@ -579,7 +579,7 @@ dbc_handle_port_status(struct xhci_dbc *dbc, union xhci_trb *event) ...@@ -579,7 +579,7 @@ dbc_handle_port_status(struct xhci_dbc *dbc, union xhci_trb *event)
writel(portsc & ~DBC_PORTSC_RESET_CHANGE, &dbc->regs->portsc); writel(portsc & ~DBC_PORTSC_RESET_CHANGE, &dbc->regs->portsc);
} }
static void dbc_handle_xfer_event(struct xhci_hcd *xhci, union xhci_trb *event) static void dbc_handle_xfer_event(struct xhci_dbc *dbc, union xhci_trb *event)
{ {
struct dbc_ep *dep; struct dbc_ep *dep;
struct xhci_ring *ring; struct xhci_ring *ring;
...@@ -588,7 +588,6 @@ static void dbc_handle_xfer_event(struct xhci_hcd *xhci, union xhci_trb *event) ...@@ -588,7 +588,6 @@ static void dbc_handle_xfer_event(struct xhci_hcd *xhci, union xhci_trb *event)
u32 comp_code; u32 comp_code;
size_t remain_length; size_t remain_length;
struct dbc_request *req = NULL, *r; struct dbc_request *req = NULL, *r;
struct xhci_dbc *dbc = xhci->dbc;
comp_code = GET_COMP_CODE(le32_to_cpu(event->generic.field[2])); comp_code = GET_COMP_CODE(le32_to_cpu(event->generic.field[2]));
remain_length = EVENT_TRB_LEN(le32_to_cpu(event->generic.field[2])); remain_length = EVENT_TRB_LEN(le32_to_cpu(event->generic.field[2]));
...@@ -654,7 +653,6 @@ static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc) ...@@ -654,7 +653,6 @@ static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc)
struct dbc_ep *dep; struct dbc_ep *dep;
union xhci_trb *evt; union xhci_trb *evt;
u32 ctrl, portsc; u32 ctrl, portsc;
struct xhci_hcd *xhci = dbc->xhci;
bool update_erdp = false; bool update_erdp = false;
/* DbC state machine: */ /* DbC state machine: */
...@@ -763,7 +761,7 @@ static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc) ...@@ -763,7 +761,7 @@ static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc)
dbc_handle_port_status(dbc, evt); dbc_handle_port_status(dbc, evt);
break; break;
case TRB_TYPE(TRB_TRANSFER): case TRB_TYPE(TRB_TRANSFER):
dbc_handle_xfer_event(xhci, evt); dbc_handle_xfer_event(dbc, evt);
break; break;
default: default:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment