Commit eaf5fbc4 authored by Alan Stern's avatar Alan Stern Committed by Deepak Saxena

[PATCH] USB: ERRBUF_LEN compiling error when PAGE_SIZE=64KB on IA64

Randy, thanks for forwarding this to me.

> Johannes,
>
> When I compile base kernel 2.6.1 with PAGE_SIZE=64KB on an IA64
> platform, there is an error.
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> drivers/built-in.o(.init.text+0x168a2): In function `uhci_hcd_init':
> : undefined reference to `__you_cannot_kmalloc_that_much'
> make: *** [.tmp_vmlinux1] Error 1
>
> That's because ERRBUF_LEN (equal to PAGE_SIZE*8) is too long when
> PAGE_SIZE=64KB. Actually, there was a similar error found by Tony. See
> http://marc.theaimsgroup.com/?l=linux-ia64&m=105604765306485&w=2.
>
> Could you change the definition of ERRBUF_LEN to a fixed value? For
> example, 32*1024?
>
> Yanmin

Yanmin, I'm the new maintainer for the UHCI driver.  Yep, that's a
definite error.  This will fix it.

Also included in this patch: change some confusing references from "high
speed" to "full speed" and add proper hyphenation.
parent 4f650496
......@@ -81,7 +81,7 @@ static int debug = 0;
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug level");
static char *errbuf;
#define ERRBUF_LEN (PAGE_SIZE * 8)
#define ERRBUF_LEN (32 * 1024)
#include "uhci-hub.c"
#include "uhci-debug.c"
......@@ -914,7 +914,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct ur
uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH);
/* Low speed transfers get a different queue, and won't hog the bus */
/* Low-speed transfers get a different queue, and won't hog the bus */
if (urb->dev->speed == USB_SPEED_LOW)
skelqh = uhci->skel_ls_control_qh;
else {
......@@ -972,7 +972,7 @@ static int usb_control_retrigger_status(struct uhci_hcd *uhci, struct urb *urb)
/* One TD, who cares about Breadth first? */
uhci_insert_tds_in_qh(urbp->qh, urb, UHCI_PTR_DEPTH);
/* Low speed transfers get a different queue */
/* Low-speed transfers get a different queue */
if (urb->dev->speed == USB_SPEED_LOW)
uhci_insert_qh(uhci, uhci->skel_ls_control_qh, urb);
else
......@@ -1256,7 +1256,7 @@ static inline int uhci_submit_bulk(struct uhci_hcd *uhci, struct urb *urb, struc
{
int ret;
/* Can't have low speed bulk transfers */
/* Can't have low-speed bulk transfers */
if (urb->dev->speed == USB_SPEED_LOW)
return -EINVAL;
......@@ -2194,10 +2194,10 @@ static int uhci_reset(struct usb_hcd *hcd)
* of the queues. We don't do that here, because
* we'll create the actual TD entries on demand.
* - The first queue is the interrupt queue.
* - The second queue is the control queue, split into low and high speed
* - The second queue is the control queue, split into low- and full-speed
* - The third queue is bulk queue.
* - The fourth queue is the bandwidth reclamation queue, which loops back
* to the high speed control queue.
* to the full-speed control queue.
*/
static int uhci_start(struct usb_hcd *hcd)
{
......
......@@ -200,8 +200,8 @@ struct uhci_td {
* The UHCI driver places Interrupt, Control and Bulk into QH's both
* to group together TD's for one transfer, and also to faciliate queuing
* of URB's. To make it easy to insert entries into the schedule, we have
* a skeleton of QH's for each predefined Interrupt latency, low speed
* control, high speed control and terminating QH (see explanation for
* a skeleton of QH's for each predefined Interrupt latency, low-speed
* control, full-speed control and terminating QH (see explanation for
* the terminating QH below).
*
* When we want to add a new QH, we add it to the end of the list for the
......@@ -216,9 +216,9 @@ struct uhci_td {
* skel int32 QH
* ...
* skel int1 QH
* skel low speed control QH
* skel low-speed control QH
* dev 5 control QH
* skel high speed control QH
* skel full-speed control QH
* skel bulk QH
* dev 1 bulk QH
* dev 2 bulk QH
......@@ -227,7 +227,7 @@ struct uhci_td {
* The terminating QH is used for 2 reasons:
* - To place a terminating TD which is used to workaround a PIIX bug
* (see Intel errata for explanation)
* - To loop back to the high speed control queue for full speed bandwidth
* - To loop back to the full-speed control queue for full-speed bandwidth
* reclamation
*
* Isochronous transfers are stored before the start of the skeleton
......@@ -336,7 +336,7 @@ struct uhci_hcd {
spinlock_t frame_list_lock;
struct uhci_frame_list *fl; /* P: uhci->frame_list_lock */
int fsbr; /* Full speed bandwidth reclamation */
int fsbr; /* Full-speed bandwidth reclamation */
unsigned long fsbrtimeout; /* FSBR delay */
enum uhci_state state; /* FIXME: needs a spinlock */
......
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