Commit Graph

997 Commits

Author SHA1 Message Date
Poul-Henning Kamp
182a9f7455 Make nokqfilter() return the correct return value.
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
2003-03-03 16:24:47 +00:00
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
Poul-Henning Kamp
95e4359c8e Use canonical format for cdevsw initialization. 2003-03-02 18:51:46 +00:00
Dag-Erling Smørgrav
521f364b80 More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
Scott Long
1a3a935b84 Fix 'bulk in' and 'bulk out' being reversed in a couple of error messages. 2003-03-02 02:35:00 +00:00
John Hay
11229bf39e Implement outgoing interrupt pipes. It is part of the USB 1.1 spec.
The Lego Infrared Tower use it.
2003-02-28 19:28:29 +00:00
Warner Losh
56dd04580a ufm doesn't care what major it uses. 2003-02-28 13:23:31 +00:00
Warner Losh
cfb14e7100 These appear to work as cardbus cards too 2003-02-28 13:21:17 +00:00
Marcel Moolenaar
0f265fea23 Use the correct size for reading and writing the PCI config space.
Reading the PCI config space with the wrong (larger) size is not
a problem in this case, but writing can be as it clobbers unrelated
registers. In this case the clobbering is for reserved fields, which
too is mostly harmless... for now. Hence, this change is mostly
preventive in nature.
2003-02-23 23:09:17 +00:00
Kenneth D. Merry
56eac725a3 Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix
a number of related problems along the way.

 - Automatically detect CDROM drives that can't handle 6 byte mode
   sense and mode select, and adjust our command size accordingly.
   We have to handle this in the cd(4) driver (where the buffers are
   allocated), since the parameter list length is different for the
   6 and 10 byte mode sense commands.

 - Remove MODE_SENSE and MODE_SELECT translation removed in ATAPICAM
   and in the umass(4) driver, since there's no way for that to work
   properly.

 - Add a quirk entry for CDROM drives that just hang when they get a 6
   byte mode sense or mode select.  The reason for the quirk must be
   documented in a PR, and all quirks must be approved by
   ken@FreeBSD.org.  This is to make sure that we fully understand why
   each quirk is needed.  Once the CAM_NEW_TRAN_CODE is finished, we
   should be able to remove any such quirks, since we'll know what
   protocol the drive speaks (SCSI, ATAPI, etc.) and therefore whether
   we should use 6 or 10 byte mode sense/select commands.

 - Change the way the da(4) handles the no_6_byte sysctl.  There is
   now a per-drive sysctl to set the minimum command size for that
   particular disk.  (Since you could have multiple disks with
   multiple requirements in one system.)

 - Loader tunable support for all the sysctls in the da(4) and cd(4)
   drivers.

 - Add a CDIOCCLOSE ioctl for cd(4) (bde pointed this out a long
   time ago).

 - Add a media validation routine (cdcheckmedia()) to the cd(4)
   driver, to fix some problems bde pointed out a long time ago.  We
   now allow open() to succeed no matter what, but if we don't detect
   valid media, the user can only issue CDIOCCLOSE or CDIOCEJECT
   ioctls.

 - The media validation routine also reads the table of contents off
   the drive.  We use the table of contents to implement the
   CDIOCPLAYTRACKS ioctl using the PLAY AUDIO MSF command.  The
   PLAY AUDIO TRACK INDEX command that we previously used was
   deprecated after SCSI-2.  It works in every SCSI CDROM I've tried,
   but doesn't seem to work on ATAPI CDROM drives.  We still use the
   play audio track index command if we don't have a valid TOC, but
   I suppose it'll fail anyway in that case.

 - Add _len() versions of scsi_mode_sense() and scsi_mode_select() so
   that we can specify the minimum command length.

 - Fix a couple of formatting problems in the sense printing code.

MFC after: 	4 weeks
2003-02-21 06:19:38 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
MIHIRA Sanpei Yoshiro
ba5014037c Sync to 1.114 of usbdevs 2003-02-13 12:57:24 +00:00
MIHIRA Sanpei Yoshiro
f3e45b4bdc Add support SUNTAC Ir-Trinity IS96U
PR:		48212
Submitted by:	Masaharu FUJITA <m@fjts.org>
2003-02-13 12:55:18 +00:00
MIHIRA Sanpei Yoshiro
fe84a7c1b9 Sync to 1.113 of usbdevs 2003-02-12 13:22:55 +00:00
MIHIRA Sanpei Yoshiro
7d44829c5e Add support YAMAHA NetVolante Routers
NetVolante RTA54i Broadband&ISDN Router
	NetVolante RTA55i Broadband VoIP Router
	NetVolante RTW65b Broadband Wireless Router
	NetVolante RTW65i Broadband&ISDN Wireless Router

PR:		bin/42574
Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
2003-02-12 13:20:39 +00:00
MIHIRA Sanpei Yoshiro
3b88c9eb7a Regen 2003-02-11 00:16:56 +00:00
MIHIRA Sanpei Yoshiro
a109b1c786 Add support SUNTAC U-Cable TypeD2 (DS96L)
PR:		kern/47547
Submitted by:	Kazu TAKAMUNE <takamune@mail.com>
2003-02-11 00:15:01 +00:00
MIHIRA Sanpei Yoshiro
553684bcea Regen 2003-02-07 13:19:29 +00:00
MIHIRA Sanpei Yoshiro
c524738eae Add support FUJITSU AH-F401U Air H device
Submitted by:	[bsd-nomads:16601]
		Kouichi ABE (WALL) <kouichi@MysticWALL.COM>
2003-02-07 12:53:21 +00:00
MIHIRA Sanpei Yoshiro
8541fbec79 Fix `umass0: BBB bulk-in clear stall failed, IOERROR' problem with
some USB devices.  (Make sure to set xfer data length when we force
a short inquiry.)

Obtained from: NetBSD(sys/dev/usb/umass_scsipi.c rev.1.8)
Original idea from: Shingo WATANABE <nabe@nabechan.org>
2003-02-04 13:45:41 +00:00
MIHIRA Sanpei Yoshiro
ab0a90de0a Remove duplicated entry
Put the Trek Smart Thumbdrives (8MB model) entry in the right place.
(Entries are sorted by vendor id).
2003-02-04 13:36:32 +00:00
Marcel Moolenaar
a3909515f4 Regenerate after fixing duplicate device entries. 2003-02-02 01:58:28 +00:00
Marcel Moolenaar
7c125c1c6a Unbreak kernel builds caused by what appears to be a merge conflict.
This change has been tested.
2003-02-02 01:57:31 +00:00
MIHIRA Sanpei Yoshiro
c799e00130 Regen 2003-02-01 23:09:33 +00:00
MIHIRA Sanpei Yoshiro
a9451985f7 Add Genesys Logic products
- GL650 HUB
	- GL641USB CompactFlash Card Reade
	- GL641USB USB-IDE Bridge
Add MELCO product
	- USB-IDE Bridge: DUB-PxxG
2003-02-01 22:50:50 +00:00
Tom Rhodes
40cbf25dbb Add support for the Trek Thumbdrive 8MB USB Drive.
PR:		46004
Submitted by:	Brian J. McGovern <mcgovern@tick.beta.com> (original version)
2003-01-30 18:33:01 +00:00
Josef Karthauser
4de19bd9c8 Put the Perfection 1660 scanner entry in the right place. (Entries
are sorted by product id).
2003-01-27 09:43:24 +00:00
Josef Karthauser
d617f4ca0c Regen 2003-01-21 11:38:17 +00:00
Josef Karthauser
652fde6f1f Add support for Epson 1660 scanner.
Submitted by:	Bruno Schwander <bruno@tinkerbox.org>
MFC after:	3 days
2003-01-21 11:37:54 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Josef Karthauser
f4e618b499 Regen 2003-01-20 00:51:19 +00:00
Josef Karthauser
6ee4bee25a Support for the "Seiko Epson Perfection 1260 scanner".
Submitted by:	Michael Lestinsky <michael@lestinsky.de>
MFC After:	3 days
2003-01-20 00:41:30 +00:00
Josef Karthauser
e22514406d Some USB devices are not prepared to deal with a single byte string
descriptor request, which usbd_get_string_desc() uses to get the
length of a descriptor.  One device for instance returns a full 8
byte long packet instead which confuses the rest of the stack and
leads to the USB port being reset.  The fix is to instead request
two bytes, but not to complain if we only get one.

Submitted by:	kan
MFC after:	3 days
2003-01-14 23:07:43 +00:00
Warner Losh
26b6ab4e45 Make compile cleanly when USB_DEBUG is defined. 2003-01-12 08:28:14 +00:00
Warner Losh
52b019b3ed Merge from NetBSD and arrange for FreeBSD's slight differences in
ucom.

This gets my Sanyo SCP-4900 working.

Approved by: joe
2003-01-09 04:24:28 +00:00
David Xu
ce5c58974a Retry to get full device descriptor, this let my slow CD Tower device work. 2003-01-08 05:03:35 +00:00
Warner Losh
3225a9881d Update to correct NetBSD Id 2003-01-02 04:22:44 +00:00
Warner Losh
d77b690ff6 Sync to 1.104 of usbdevs 2003-01-02 04:21:38 +00:00
Warner Losh
cb33fc95b9 Add NEODIO TURBOCONNECT (from NetBSD) 2003-01-02 04:21:04 +00:00
Warner Losh
1732632481 MFNetBSD through 1.42 (to be committed in a moment by me).
o Whitespace nits
o NEODIO added
2003-01-02 04:15:55 +00:00
Alexander Kabaev
851d388443 Do not print the value of sc pointer before is has been ininialized. 2003-01-02 02:46:13 +00:00
Alexander Kabaev
64fe778489 Create debug sysctl nodes if USB_DEBUG is defined.
UBSA_DEBUG is inconsistent with other drivers.
2003-01-02 02:38:57 +00:00
Warner Losh
82e10e2428 It appears that the SANYO SCP-4900 needs similar quirks to the
Metricom Ricochet GS modem.  Add them here.

# A new umodem appears to be needed to make the sanyo phone work, but that's
# more extensive and will come after coordination.
2003-01-01 20:21:48 +00:00
Warner Losh
4dac02c8db Sync to usbdevs 1.103 2003-01-01 20:18:58 +00:00
Warner Losh
4cce0eba8d Add Sanyo SCP-4900 phone. It needs quirks. 2003-01-01 20:18:15 +00:00
Warner Losh
f56d03c008 Now that we've 'branched' 5.0, desupport FreeBSD 3.x in this driver. It
appears that NetBSD has already done this in their tree.
2003-01-01 20:15:42 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Ian Dowse
326b4d74c4 When resuming after a system suspend, re-issue the UHCI_CMD_MAXP
command in case this setting was not saved. Since bandwidth reclamation
(-current only) often results in bus activity continuing to the end
of every frame, most transfers would fail with IOERROR if this
setting is missed.

Reviewed by:	n_hibma
MFC after:	1 week
2002-12-26 13:25:57 +00:00
Matthew Dillon
6c82636572 Revert part of the last commit. Do not fake-up the cylinders to make
the sectors fit (at least, don't fake them up any more then they are
already faked up).
2002-12-22 04:46:44 +00:00
Matthew Dillon
cc7bab9032 Modify the fake cylinders calculation so it is >= the size of the device,
not < the size of the device.  This avoids geom complaints.

Fix a serious bug in the handling of the RS_NO_CLEAR_UA quirk.  When we
go and insert the test-unit-ready command the umass_cam_quirk_cb() function
sets the status as if the READ_CAPACITY command suceeded when, in fact, it
did not.  This leads to the CAM layer trying to use garbage in the return
buffer and panicing the system (or doing other bad things).

Add a quirk entry for MSYSTEMS DISK-ON-KEY, which is sold under the Sony
brand as a solid state disk-on-key usb device.  This device requires
several quirks to work properly.

Note that the disk-on-key device will not work properly until CAM also
gets a quirk entry for it, which has been submitted to the CAM maintainer,
and you may have to temporarily uncomment the DELAY() as well.  -current
does not properly wait for devices to power up so you may also have
to temporarily uncomment the DELAY(300000) to make your device work.
A solution must be found to that issue.

MFC after:	3 days
X-MFC note:	the quirk support must MFCd before this patch can be
2002-12-20 18:56:55 +00:00