/* Section 4.11.1.1: "All components of all Command and Transfer TRBs shall be initialized to '0'"  */
static struct xhci_segment* xhci_segment_alloc(struct xhci_hcd *xhci, gfp_t flags)
/* Section 4.11.1.1: "All components of all Command and Transfer TRBs shall be initialized to '0'"  */
static struct xhci_segment* xhci_segment_alloc(struct xhci_hcd *xhci, gfp_t flags)
{
	struct xhci_segment *seg;
	dma_addr_t	dma;
	seg = kzalloc(sizeof *seg, flags);
	if (!seg)
		return 0;
	xhci_dbg(xhci, "Allocating priv segment structure at %p\n", seg);
	seg->trbs = dma_pool_alloc(xhci->segment_pool, flags, &dma);
	if (!seg->trbs) {
		kfree(seg);
		return 0;
	}
	xhci_dbg(xhci, "
			seg->trbs, (unsigned long long)dma);
	memset(seg->trbs, 0, SEGMENT_SIZE);
	seg->dma = dma;
	seg->next = NULL;
	return seg;
}