Commit Graph

1117 Commits

Author SHA1 Message Date
David E. O'Brien
0204ca844f Recognize the OHCI USB device on Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:40:17 +00:00
Bernd Walter
c4bc00e509 Try a port reset if initial contact to a device failed.
tested by:	Lee Damon <nomad@castle.org>
2003-09-01 07:47:42 +00:00
John-Mark Gurney
c5b3755306 eliminate casts from the DMAADDR macro. This depends upon bus_addr_t being
a type that you can do arithmetic with.  This eliminates many warnings when
compiling with PAE.

Various by:	scottl
2003-09-01 01:07:24 +00:00
Josef Karthauser
3af4b6b4d7 Implement the last commit properly. 2003-08-25 22:10:52 +00:00
Josef Karthauser
219b479f9f Fix the cdevsw compatibility for -stable. 2003-08-25 22:01:06 +00:00
David E. O'Brien
aad970f1fe Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
Warner Losh
90cf0136c4 Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
2003-08-22 07:08:17 +00:00
Nate Lawson
f6681bd6f0 SHUTTLE_INIT quirk for EXATELECOM i-Bead mp3 player 2003-08-22 05:54:57 +00:00
Nate Lawson
e1dca0e939 Add quirks for the EXATELECOM i-Bead mp3 player.
PR:		kern/51675
Submitted by:	Nicolas Jombart <ecu@ipv42.net>
MFC after:	3 days
2003-08-22 05:43:30 +00:00
Josef Karthauser
338a591019 Crank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
the Palm device and the USB host controller deadlock. The USB host
controller is expecting an early-end-of-transmission packet with 0
data, and the Palm doesn't send one because it's already communicated
the amount of data it's going to send in a header (which ucom/uvisor
are oblivious to). This is the problem that has been known on the
pilot-link lists as the "[Free]BSD USB problem", but not understood.

Submitted by:	Nathan J. Williams <nathanw@MIT.EDU>
2003-08-14 00:15:23 +00:00
Nate Lawson
2b2187130e Remove the 6-10 byte translation from UFI and ATAPI command sets. It is
no longer needed now that we have PIM_NO_6_BYTE.

Requested by:	jhb
2003-08-06 17:19:06 +00:00
John-Mark Gurney
44de8a989d fix another bus_dma leak due to not having a size param for our bus_dma
allocation function.  With this patch, it prevents continous growth of
the devbuf memory pool.

Tested with ssh <host> dd of=/dev/null < /dev/zero and vmstat -m | grep devbuf
2003-07-29 05:07:37 +00:00
Nate Lawson
1deac58179 Add a PATH_INQ flag, PIM_NO_6_BYTE, which indicates the SIM never wishes to
receive 6 byte commands.  Add a check for this flag to da(4) and cd(4) so
that they honor it.  This is a quick workaround for many devices (especially
USB) that require da(4) quirks to operate.  The more complete approach is
to finish the new transport code which will be aware of the SCSI version a
transport implements.

MFC after:	1 day
2003-07-28 06:15:59 +00:00
Peter Wemm
899c48a1cb Fix a 64 bit bug lost in the inline warning noise. sizeof is not always
an int.  Do not printf() it as though it were.
2003-07-22 06:58:04 +00:00
John-Mark Gurney
9e17948f72 override the tag. usb_block_allocmem allocates a new tag, which when we
go looking for free fragments won't match.  Since we never free this, we
can "throw away" the tag.  This is very dirty, and needs to be reimplemented
properly, but fixes performance problems with uhci.

Also assert that when we overlay a structure on some space, that the
space is large enough for the structure.
2003-07-21 02:41:01 +00:00
John-Mark Gurney
587757b066 seems like i386 && DIAGNOSTIC needs sys/proc.h
Noticed by:	tinderbox
2003-07-16 08:15:02 +00:00
John-Mark Gurney
fb393615ed add missing machine/bus.h headers that are now necessary because of the
bus_dma addition.
2003-07-16 02:20:14 +00:00
John-Mark Gurney
57499a32b1 make allocation of the necessary data structures most efficent by using
a full page instead of only part of a page.

Reviewed by:	joe
2003-07-15 23:19:49 +00:00
John-Mark Gurney
86231a1846 fix support for umass and related devices on ohci. This is a partial
sync of the NetBSD code.

fix isochornous support for ohci.  This gets webcams like my OV511
working on sparc64.

PR:		kern/52589
Submitted by:	Bruce R. Montague (isochonous support)
Reviewed by:	joe among others
2003-07-15 23:12:54 +00:00
John-Mark Gurney
45dd937507 make usb bus_dma aware.
Reviewed by:	joe among others
2003-07-15 22:42:37 +00:00
John-Mark Gurney
9f4b5407ca sync w/ NetBSD
part of:
revision 1.101
date: 2002/06/01 23:51:04;  author: lukem;  state: Exp;  lines: +5 -7
2003-07-15 22:19:00 +00:00
John-Mark Gurney
e65f8c784d minor white space fix up
initalize itds
remove extra htole32.  Things don't work to well when you do
htole32(htole32(var))
2003-07-15 22:14:22 +00:00
Josef Karthauser
094fb32de7 Update to reflect the NetBSD patches that are already included. 2003-07-14 20:31:03 +00:00
Alexander Kabaev
fc71f32c53 Use swi to process port status changes. Calling ucom layer directly
from interrupt handler panics the machine.
2003-07-14 20:26:37 +00:00
Josef Karthauser
8695068f27 Make note that we already have these NetBSD patches. 2003-07-14 20:19:21 +00:00
Josef Karthauser
5c8ea6280c Make note of some NetBSD patches that we already have. 2003-07-14 20:11:52 +00:00
Josef Karthauser
f16f7f274c Make a note of some patches from NetBSD that we already have. 2003-07-14 20:08:21 +00:00
Josef Karthauser
b214af6eba Backout the last commit!
MFNetBSD: revision 1.137
    date: 2003/01/20 07:12:13;  author: simonb;
    Grrr.  So much for my ability to use grep(1) effectively.  Pointed out
    by Stephen Degler in private mail.
2003-07-14 19:56:32 +00:00
Josef Karthauser
563a940856 MFNetBSD: revision 1.136
date: 2003/01/20 05:30:09;  author: simonb;
    The Double-Semi-Colon Police.
2003-07-14 19:54:21 +00:00
Josef Karthauser
a237c6ec2e MFNetBSD: revision 1.135
date: 2002/12/10 14:07:37;  author: toshii;  state: Exp;  lines: +6 -6
    Add a couple of le32toh which were missing in the previous.
    Pointed out by SOMEYA Yoshihiko.
2003-07-14 19:51:53 +00:00
Josef Karthauser
e35285ad59 MFNetBSD: revision 1.134
date: 2002/12/07 07:33:20;  author: toshii;  state: Exp;  lines: +50 -29
    Update xfer->frlengths for input isoc transfer.  Based on patches from
    SOMEYA Yoshihiko.
    Also fix error handling for isoc transfer somewhat; usb_transfer_complete
    shouldn't be called for more than once.
2003-07-14 19:50:06 +00:00
Josef Karthauser
0ab3fe8a80 MFNetBSD: revision 1.133
date: 2002/12/07 07:14:28;  author: toshii;
    Fix several nits.  Mostly from SOMEYA Yoshihiko.
    - Call usbd_transfer_complete at splusb.
    - Fix a botched for loop in ohci_rem_ed.
    - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race
     condition.

The splusb change is non-functional on FreeBSD.
The botched loop and race condition changes came from us.

This patch is non-functional.
2003-07-14 19:47:59 +00:00
Josef Karthauser
4999f44917 MFNetBSD: revision 1.132
date: 2002/12/07 06:52:11;  author: toshii;
    Remove junk at the end of a DPRINTF.  From SOMEYA Yoshihiko.
2003-07-14 19:42:05 +00:00
Josef Karthauser
99112dddf2 MFNetBSD: revision 1.129
date: 2002/09/29 20:58:25;  author: augustss;
    Add some spl calls to protect critical regions. From kern/18440,
    Takeshi Nakayama.

(No functional change on FreeBSD).
2003-07-14 19:39:16 +00:00
Josef Karthauser
69e07da0ff Regen. 2003-07-14 19:30:49 +00:00
Josef Karthauser
83c1347694 MFNetBSD: Update the list of devices that can attach to uvisor (untested). 2003-07-14 19:30:01 +00:00
Josef Karthauser
771b291ad0 MFNetBSD:
date: 2003/05/13 04:41:59;  author: gson;
    Function names printed in debug messages did not always match the
    actual name of the function.
2003-07-14 18:56:33 +00:00
Josef Karthauser
d0eba3629e MFNetBSD: revision 1.172
date: 2003/02/23 04:19:26;  author: simonb;
    Remove unreachable break after return.
2003-07-14 18:52:12 +00:00
Josef Karthauser
b6cc3bf979 MFNetBSD: revision 1.170
date: 2003/02/19 01:35:04;  author: augustss;
    Bail out early in isoc_done if the ii is not on the interrupt list.
2003-07-14 18:49:18 +00:00
Josef Karthauser
40d6041c4d MFNetBSD: rev 1.169
date: 2003/02/16 23:15:28;  author: augustss;
    Don't take xfers off the interrupt list if they are not on it yet.
2003-07-14 18:47:27 +00:00
Josef Karthauser
40facef91c Make a note of which patches we already have incorporated from NetBSD. 2003-07-14 18:42:58 +00:00
Josef Karthauser
4dbc7c2826 Merge up-to-date with NetBSD. No functional changes. 2003-07-14 18:37:47 +00:00
Josef Karthauser
8c14b22d09 MFNetBSD:
date: 2002/10/01 01:25:25;  author: thorpej;
    Use CFATTACH_DECL().

Not a functional change on FreeBSD.
2003-07-14 18:33:55 +00:00
Josef Karthauser
d4322278fa MFNetBSD:
date: 2002/09/23 05:51:20;  author: simonb;
    Remove breaks after returns, unreachable returns and returns after
    returns(!).
2003-07-14 18:25:47 +00:00
Josef Karthauser
222841679f MFNetBSD:
date: 2003/02/08 03:32:51;  author: ichiro;
    change URL pointers of USB[1,2] specification
2003-07-14 18:14:15 +00:00
Josef Karthauser
e36ee542ba MFNetBSD: rev 1.166
date: 2002/12/31 02:21:31;  author: dsainty;
    Be somewhat more persuasive about enabling the port on a port reset.
    USB protocol dictates that the port enable must be implied by the port
    reset. To implement this on (at least) the VIA VT83C572 this means we
    need to wait around tweaking the chip state until the port actually
    transitions to enabled (or the device goes away).  Likely fixes
    kern/11018.
2003-07-14 18:07:54 +00:00
Josef Karthauser
bddc8bd3e9 MFNetBSD: 1.165
date: 2002/12/31 02:04:49;  author: dsainty;
    CONSTCOND away some lint warnings
2003-07-14 17:58:26 +00:00
Josef Karthauser
753bb32e49 As defined by USB Specification Rev 2.0 (in section 11.24.2.5), to
get a Hub descriptor, we have to set req.wValue to "Descriptor Type
and Descriptor Index". In this case, Descriptor Type is 0x29
(UDESC_HUB), Descriptor Index should be 0.

If I don't do a check (dev->address > 1 ... ), root hub fails.

A new Cytronix 4-port USB 2.0 Hub (Cypress CY7C65640 chip) now works
after this patch.

Submitted by:	Alexander Pohoyda <alexander.pohoyda@gmx.net>
MFC after:	7 days
2003-07-14 17:46:27 +00:00
Josef Karthauser
4fbf101dc9 Regen. 2003-07-14 17:15:29 +00:00
Josef Karthauser
aaa3471f0b Add an entry for the Cypress slim hub.
Submitted by:	Alexander Pohoyda <alexander.pohoyda@gmx.net>
2003-07-14 17:14:04 +00:00