From 564eb267f508624197c29f6b46f0b94e3e3ceabe Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Fri, 27 Jan 2012 16:19:15 +0200 Subject: [PATCH] --- yaml --- r: 289677 b: refs/heads/master c: 8d3709f3dd41769338cc383bec23673fd1ce34e7 h: refs/heads/master i: 289675: 64ee911af9cb8c30d58e9f25a01709cb040a3f1e v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index cfe7d267a500..de2c6e3857f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f99298bfa7c42da8d27c2b42050941471c0866ab +refs/heads/master: 8d3709f3dd41769338cc383bec23673fd1ce34e7 diff --git a/trunk/drivers/usb/host/xhci.h b/trunk/drivers/usb/host/xhci.h index 0f4936956103..9a7138c29030 100644 --- a/trunk/drivers/usb/host/xhci.h +++ b/trunk/drivers/usb/host/xhci.h @@ -1223,10 +1223,7 @@ union xhci_trb { /* Allow two commands + a link TRB, along with any reserved command TRBs */ #define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3) #define SEGMENT_SIZE (TRBS_PER_SEGMENT*16) -/* SEGMENT_SHIFT should be log2(SEGMENT_SIZE). - * Change this if you change TRBS_PER_SEGMENT! - */ -#define SEGMENT_SHIFT 10 +#define SEGMENT_SHIFT (__ffs(SEGMENT_SIZE)) /* TRB buffer pointers can't cross 64KB boundaries */ #define TRB_MAX_BUFF_SHIFT 16 #define TRB_MAX_BUFF_SIZE (1 << TRB_MAX_BUFF_SHIFT)