aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-14 23:10:00 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-14 23:10:00 -0400
commit4c0e176dd5e4c44dd60f398518f75eedbe1a65f3 (patch)
tree07aea7539f78f221c6fc535a94a07befa2afdb63 /drivers/usb
parentf241be74b803dcf9d70c9978292946370654320f (diff)
parent2ba84684e8cf6f980e4e95a2300f53a505eb794e (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-dbg.c2
-rw-r--r--drivers/usb/host/ehci-q.c5
-rw-r--r--drivers/usb/host/ehci-sched.c13
-rw-r--r--drivers/usb/host/ehci.h5
-rw-r--r--drivers/usb/host/isp116x-hcd.c4
-rw-r--r--drivers/usb/mon/Kconfig9
-rw-r--r--drivers/usb/mon/Makefile1
7 files changed, 24 insertions, 15 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 50cb01831075..b01efb6b36f6 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -527,7 +527,7 @@ show_periodic (struct class_device *class_dev, char *buf)
527 p.qh->period, 527 p.qh->period,
528 le32_to_cpup (&p.qh->hw_info2) 528 le32_to_cpup (&p.qh->hw_info2)
529 /* uframe masks */ 529 /* uframe masks */
530 & 0xffff, 530 & (QH_CMASK | QH_SMASK),
531 p.qh); 531 p.qh);
532 size -= temp; 532 size -= temp;
533 next += temp; 533 next += temp;
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 4f97a4ad1ed3..20df01a79b2e 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -222,7 +222,7 @@ __acquires(ehci->lock)
222 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; 222 struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv;
223 223
224 /* S-mask in a QH means it's an interrupt urb */ 224 /* S-mask in a QH means it's an interrupt urb */
225 if ((qh->hw_info2 & __constant_cpu_to_le32 (0x00ff)) != 0) { 225 if ((qh->hw_info2 & __constant_cpu_to_le32 (QH_SMASK)) != 0) {
226 226
227 /* ... update hc-wide periodic stats (for usbfs) */ 227 /* ... update hc-wide periodic stats (for usbfs) */
228 ehci_to_hcd(ehci)->self.bandwidth_int_reqs--; 228 ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
@@ -428,7 +428,8 @@ halt:
428 /* should be rare for periodic transfers, 428 /* should be rare for periodic transfers,
429 * except maybe high bandwidth ... 429 * except maybe high bandwidth ...
430 */ 430 */
431 if (qh->period) { 431 if ((__constant_cpu_to_le32 (QH_SMASK)
432 & qh->hw_info2) != 0) {
432 intr_deschedule (ehci, qh); 433 intr_deschedule (ehci, qh);
433 (void) qh_schedule (ehci, qh); 434 (void) qh_schedule (ehci, qh);
434 } else 435 } else
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 9af4f64532a9..b56f25864ed6 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -301,7 +301,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
301 301
302 dev_dbg (&qh->dev->dev, 302 dev_dbg (&qh->dev->dev,
303 "link qh%d-%04x/%p start %d [%d/%d us]\n", 303 "link qh%d-%04x/%p start %d [%d/%d us]\n",
304 period, le32_to_cpup (&qh->hw_info2) & 0xffff, 304 period, le32_to_cpup (&qh->hw_info2) & (QH_CMASK | QH_SMASK),
305 qh, qh->start, qh->usecs, qh->c_usecs); 305 qh, qh->start, qh->usecs, qh->c_usecs);
306 306
307 /* high bandwidth, or otherwise every microframe */ 307 /* high bandwidth, or otherwise every microframe */
@@ -385,7 +385,8 @@ static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
385 385
386 dev_dbg (&qh->dev->dev, 386 dev_dbg (&qh->dev->dev,
387 "unlink qh%d-%04x/%p start %d [%d/%d us]\n", 387 "unlink qh%d-%04x/%p start %d [%d/%d us]\n",
388 qh->period, le32_to_cpup (&qh->hw_info2) & 0xffff, 388 qh->period,
389 le32_to_cpup (&qh->hw_info2) & (QH_CMASK | QH_SMASK),
389 qh, qh->start, qh->usecs, qh->c_usecs); 390 qh, qh->start, qh->usecs, qh->c_usecs);
390 391
391 /* qh->qh_next still "live" to HC */ 392 /* qh->qh_next still "live" to HC */
@@ -411,7 +412,7 @@ static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
411 * active high speed queues may need bigger delays... 412 * active high speed queues may need bigger delays...
412 */ 413 */
413 if (list_empty (&qh->qtd_list) 414 if (list_empty (&qh->qtd_list)
414 || (__constant_cpu_to_le32 (0x0ff << 8) 415 || (__constant_cpu_to_le32 (QH_CMASK)
415 & qh->hw_info2) != 0) 416 & qh->hw_info2) != 0)
416 wait = 2; 417 wait = 2;
417 else 418 else
@@ -533,7 +534,7 @@ static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
533 534
534 /* reuse the previous schedule slots, if we can */ 535 /* reuse the previous schedule slots, if we can */
535 if (frame < qh->period) { 536 if (frame < qh->period) {
536 uframe = ffs (le32_to_cpup (&qh->hw_info2) & 0x00ff); 537 uframe = ffs (le32_to_cpup (&qh->hw_info2) & QH_SMASK);
537 status = check_intr_schedule (ehci, frame, --uframe, 538 status = check_intr_schedule (ehci, frame, --uframe,
538 qh, &c_mask); 539 qh, &c_mask);
539 } else { 540 } else {
@@ -569,10 +570,10 @@ static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
569 qh->start = frame; 570 qh->start = frame;
570 571
571 /* reset S-frame and (maybe) C-frame masks */ 572 /* reset S-frame and (maybe) C-frame masks */
572 qh->hw_info2 &= __constant_cpu_to_le32 (~0xffff); 573 qh->hw_info2 &= __constant_cpu_to_le32(~(QH_CMASK | QH_SMASK));
573 qh->hw_info2 |= qh->period 574 qh->hw_info2 |= qh->period
574 ? cpu_to_le32 (1 << uframe) 575 ? cpu_to_le32 (1 << uframe)
575 : __constant_cpu_to_le32 (0xff); 576 : __constant_cpu_to_le32 (QH_SMASK);
576 qh->hw_info2 |= c_mask; 577 qh->hw_info2 |= c_mask;
577 } else 578 } else
578 ehci_dbg (ehci, "reused qh %p schedule\n", qh); 579 ehci_dbg (ehci, "reused qh %p schedule\n", qh);
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 4df498231752..a7542157534c 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -385,6 +385,11 @@ struct ehci_qh {
385 __le32 hw_info1; /* see EHCI 3.6.2 */ 385 __le32 hw_info1; /* see EHCI 3.6.2 */
386#define QH_HEAD 0x00008000 386#define QH_HEAD 0x00008000
387 __le32 hw_info2; /* see EHCI 3.6.2 */ 387 __le32 hw_info2; /* see EHCI 3.6.2 */
388#define QH_SMASK 0x000000ff
389#define QH_CMASK 0x0000ff00
390#define QH_HUBADDR 0x007f0000
391#define QH_HUBPORT 0x3f800000
392#define QH_MULT 0xc0000000
388 __le32 hw_current; /* qtd list - see EHCI 3.6.4 */ 393 __le32 hw_current; /* qtd list - see EHCI 3.6.4 */
389 394
390 /* qtd overlay (hardware parts of a struct ehci_qtd) */ 395 /* qtd overlay (hardware parts of a struct ehci_qtd) */
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 50b1970fe6b6..76cb496c5836 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -229,9 +229,11 @@ static void preproc_atl_queue(struct isp116x *isp116x)
229 struct isp116x_ep *ep; 229 struct isp116x_ep *ep;
230 struct urb *urb; 230 struct urb *urb;
231 struct ptd *ptd; 231 struct ptd *ptd;
232 u16 toggle = 0, dir = PTD_DIR_SETUP, len; 232 u16 len;
233 233
234 for (ep = isp116x->atl_active; ep; ep = ep->active) { 234 for (ep = isp116x->atl_active; ep; ep = ep->active) {
235 u16 toggle = 0, dir = PTD_DIR_SETUP;
236
235 BUG_ON(list_empty(&ep->hep->urb_list)); 237 BUG_ON(list_empty(&ep->hep->urb_list));
236 urb = container_of(ep->hep->urb_list.next, 238 urb = container_of(ep->hep->urb_list.next,
237 struct urb, urb_list); 239 struct urb, urb_list);
diff --git a/drivers/usb/mon/Kconfig b/drivers/usb/mon/Kconfig
index 777642e26b9a..deb9ddffa402 100644
--- a/drivers/usb/mon/Kconfig
+++ b/drivers/usb/mon/Kconfig
@@ -9,9 +9,8 @@ config USB_MON
9 help 9 help
10 If you say Y here, a component which captures the USB traffic 10 If you say Y here, a component which captures the USB traffic
11 between peripheral-specific drivers and HC drivers will be built. 11 between peripheral-specific drivers and HC drivers will be built.
12 The USB_MON is similar in spirit and may be compatible with Dave 12 For more information, see <file:Documentation/usb/usbmon.txt>.
13 Harding's USBMon.
14 13
15 This is somewhat experimental at this time, but it should be safe, 14 This is somewhat experimental at this time, but it should be safe.
16 as long as you aren't using modular USB and try to remove this 15
17 module. 16 If unsure, say Y.
diff --git a/drivers/usb/mon/Makefile b/drivers/usb/mon/Makefile
index f18d10ce91f9..b0015b8a1d1f 100644
--- a/drivers/usb/mon/Makefile
+++ b/drivers/usb/mon/Makefile
@@ -4,4 +4,5 @@
4 4
5usbmon-objs := mon_main.o mon_stat.o mon_text.o 5usbmon-objs := mon_main.o mon_stat.o mon_text.o
6 6
7# This does not use CONFIG_USB_MON because we want this to use a tristate.
7obj-$(CONFIG_USB) += usbmon.o 8obj-$(CONFIG_USB) += usbmon.o