aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 0e4b25fa3bc..36cbe2226a4 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -42,15 +42,12 @@ static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci, gfp_t flag
42 seg = kzalloc(sizeof *seg, flags); 42 seg = kzalloc(sizeof *seg, flags);
43 if (!seg) 43 if (!seg)
44 return NULL; 44 return NULL;
45 xhci_dbg(xhci, "Allocating priv segment structure at %p\n", seg);
46 45
47 seg->trbs = dma_pool_alloc(xhci->segment_pool, flags, &dma); 46 seg->trbs = dma_pool_alloc(xhci->segment_pool, flags, &dma);
48 if (!seg->trbs) { 47 if (!seg->trbs) {
49 kfree(seg); 48 kfree(seg);
50 return NULL; 49 return NULL;
51 } 50 }
52 xhci_dbg(xhci, "// Allocating segment at %p (virtual) 0x%llx (DMA)\n",
53 seg->trbs, (unsigned long long)dma);
54 51
55 memset(seg->trbs, 0, SEGMENT_SIZE); 52 memset(seg->trbs, 0, SEGMENT_SIZE);
56 seg->dma = dma; 53 seg->dma = dma;
@@ -62,12 +59,9 @@ static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci, gfp_t flag
62static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg) 59static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg)
63{ 60{
64 if (seg->trbs) { 61 if (seg->trbs) {
65 xhci_dbg(xhci, "Freeing DMA segment at %p (virtual) 0x%llx (DMA)\n",
66 seg->trbs, (unsigned long long)seg->dma);
67 dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma); 62 dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma);
68 seg->trbs = NULL; 63 seg->trbs = NULL;
69 } 64 }
70 xhci_dbg(xhci, "Freeing priv segment structure at %p\n", seg);
71 kfree(seg); 65 kfree(seg);
72} 66}
73 67
@@ -101,9 +95,6 @@ static void xhci_link_segments(struct xhci_hcd *xhci, struct xhci_segment *prev,
101 val |= TRB_CHAIN; 95 val |= TRB_CHAIN;
102 prev->trbs[TRBS_PER_SEGMENT-1].link.control = cpu_to_le32(val); 96 prev->trbs[TRBS_PER_SEGMENT-1].link.control = cpu_to_le32(val);
103 } 97 }
104 xhci_dbg(xhci, "Linking segment 0x%llx to segment 0x%llx (DMA)\n",
105 (unsigned long long)prev->dma,
106 (unsigned long long)next->dma);
107} 98}
108 99
109/* XXX: Do we need the hcd structure in all these functions? */ 100/* XXX: Do we need the hcd structure in all these functions? */
@@ -117,7 +108,6 @@ void xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring)
117 if (ring->first_seg) { 108 if (ring->first_seg) {
118 first_seg = ring->first_seg; 109 first_seg = ring->first_seg;
119 seg = first_seg->next; 110 seg = first_seg->next;
120 xhci_dbg(xhci, "Freeing ring at %p\n", ring);
121 while (seg != first_seg) { 111 while (seg != first_seg) {
122 struct xhci_segment *next = seg->next; 112 struct xhci_segment *next = seg->next;
123 xhci_segment_free(xhci, seg); 113 xhci_segment_free(xhci, seg);
@@ -160,7 +150,6 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
160 struct xhci_segment *prev; 150 struct xhci_segment *prev;
161 151
162 ring = kzalloc(sizeof *(ring), flags); 152 ring = kzalloc(sizeof *(ring), flags);
163 xhci_dbg(xhci, "Allocating ring at %p\n", ring);
164 if (!ring) 153 if (!ring)
165 return NULL; 154 return NULL;
166 155
@@ -191,9 +180,6 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
191 /* See section 4.9.2.1 and 6.4.4.1 */ 180 /* See section 4.9.2.1 and 6.4.4.1 */
192 prev->trbs[TRBS_PER_SEGMENT-1].link.control |= 181 prev->trbs[TRBS_PER_SEGMENT-1].link.control |=
193 cpu_to_le32(LINK_TOGGLE); 182 cpu_to_le32(LINK_TOGGLE);
194 xhci_dbg(xhci, "Wrote link toggle flag to"
195 " segment %p (virtual), 0x%llx (DMA)\n",
196 prev, (unsigned long long)prev->dma);
197 } 183 }
198 xhci_initialize_ring_info(ring); 184 xhci_initialize_ring_info(ring);
199 return ring; 185 return ring;