uhci-hcd.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) uhci-hcd.c (28b9325e6ae45ffb5e99fedcafe00f25fcaacf06)
1/*
2 * Universal Host Controller Interface driver for USB.
3 *
4 * Maintainer: Alan Stern <stern@rowland.harvard.edu>
5 *
6 * (C) Copyright 1999 Linus Torvalds
7 * (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
8 * (C) Copyright 1999 Randy Dunlap

--- 102 unchanged lines hidden (view full) ---

111 * 2,6,10,... => ffs = 1 => use skel_int4_qh = skelqh[7], etc.
112 * ffs >= 7 => not on any high-period queue, so use
113 * skel_int1_qh = skelqh[9].
114 * Add in UHCI_NUMFRAMES to insure at least one bit is set.
115 */
116 skelnum = 8 - (int) __ffs(frame | UHCI_NUMFRAMES);
117 if (skelnum <= 1)
118 skelnum = 9;
1/*
2 * Universal Host Controller Interface driver for USB.
3 *
4 * Maintainer: Alan Stern <stern@rowland.harvard.edu>
5 *
6 * (C) Copyright 1999 Linus Torvalds
7 * (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
8 * (C) Copyright 1999 Randy Dunlap

--- 102 unchanged lines hidden (view full) ---

111 * 2,6,10,... => ffs = 1 => use skel_int4_qh = skelqh[7], etc.
112 * ffs >= 7 => not on any high-period queue, so use
113 * skel_int1_qh = skelqh[9].
114 * Add in UHCI_NUMFRAMES to insure at least one bit is set.
115 */
116 skelnum = 8 - (int) __ffs(frame | UHCI_NUMFRAMES);
117 if (skelnum <= 1)
118 skelnum = 9;
119 return UHCI_PTR_QH | cpu_to_le32(uhci->skelqh[skelnum]->dma_handle);
119 return LINK_TO_QH(uhci->skelqh[skelnum]);
120}
121
122#include "uhci-debug.c"
123#include "uhci-q.c"
124#include "uhci-hub.c"
125
126/*
127 * Finish up a host controller reset and update the recorded state.

--- 502 unchanged lines hidden (view full) ---

630 * then link int1 to control and control to bulk
631 */
632 uhci->skel_int128_qh->link =
633 uhci->skel_int64_qh->link =
634 uhci->skel_int32_qh->link =
635 uhci->skel_int16_qh->link =
636 uhci->skel_int8_qh->link =
637 uhci->skel_int4_qh->link =
120}
121
122#include "uhci-debug.c"
123#include "uhci-q.c"
124#include "uhci-hub.c"
125
126/*
127 * Finish up a host controller reset and update the recorded state.

--- 502 unchanged lines hidden (view full) ---

630 * then link int1 to control and control to bulk
631 */
632 uhci->skel_int128_qh->link =
633 uhci->skel_int64_qh->link =
634 uhci->skel_int32_qh->link =
635 uhci->skel_int16_qh->link =
636 uhci->skel_int8_qh->link =
637 uhci->skel_int4_qh->link =
638 uhci->skel_int2_qh->link = UHCI_PTR_QH |
639 cpu_to_le32(uhci->skel_int1_qh->dma_handle);
638 uhci->skel_int2_qh->link = LINK_TO_QH(
639 uhci->skel_int1_qh);
640
640
641 uhci->skel_int1_qh->link = UHCI_PTR_QH |
642 cpu_to_le32(uhci->skel_ls_control_qh->dma_handle);
643 uhci->skel_ls_control_qh->link = UHCI_PTR_QH |
644 cpu_to_le32(uhci->skel_fs_control_qh->dma_handle);
645 uhci->skel_fs_control_qh->link = UHCI_PTR_QH |
646 cpu_to_le32(uhci->skel_bulk_qh->dma_handle);
647 uhci->skel_bulk_qh->link = UHCI_PTR_QH |
648 cpu_to_le32(uhci->skel_term_qh->dma_handle);
641 uhci->skel_int1_qh->link = LINK_TO_QH(uhci->skel_ls_control_qh);
642 uhci->skel_ls_control_qh->link = LINK_TO_QH(uhci->skel_fs_control_qh);
643 uhci->skel_fs_control_qh->link = LINK_TO_QH(uhci->skel_bulk_qh);
644 uhci->skel_bulk_qh->link = LINK_TO_QH(uhci->skel_term_qh);
649
650 /* This dummy TD is to work around a bug in Intel PIIX controllers */
651 uhci_fill_td(uhci->term_td, 0, uhci_explen(0) |
652 (0x7f << TD_TOKEN_DEVADDR_SHIFT) | USB_PID_IN, 0);
645
646 /* This dummy TD is to work around a bug in Intel PIIX controllers */
647 uhci_fill_td(uhci->term_td, 0, uhci_explen(0) |
648 (0x7f << TD_TOKEN_DEVADDR_SHIFT) | USB_PID_IN, 0);
653 uhci->term_td->link = cpu_to_le32(uhci->term_td->dma_handle);
649 uhci->term_td->link = LINK_TO_TD(uhci->term_td);
654
655 uhci->skel_term_qh->link = UHCI_PTR_TERM;
650
651 uhci->skel_term_qh->link = UHCI_PTR_TERM;
656 uhci->skel_term_qh->element = cpu_to_le32(uhci->term_td->dma_handle);
652 uhci->skel_term_qh->element = LINK_TO_TD(uhci->term_td);
657
658 /*
659 * Fill the frame list: make all entries point to the proper
660 * interrupt queue.
661 */
662 for (i = 0; i < UHCI_NUMFRAMES; i++) {
663
664 /* Only place we don't use the frame list routines */

--- 323 unchanged lines hidden ---
653
654 /*
655 * Fill the frame list: make all entries point to the proper
656 * interrupt queue.
657 */
658 for (i = 0; i < UHCI_NUMFRAMES; i++) {
659
660 /* Only place we don't use the frame list routines */

--- 323 unchanged lines hidden ---