Commit Graph

162 Commits

Author SHA1 Message Date
Remko Lodder
03206b569c Add support for the VIA USB2IDE bridge [1].
PR:		usb/95173
Submitted by:	Goegele Hannes <diazepam@gmx.net>
		Ben Kelly <bkelly at vadev dot org>
Tested by:	blackend
Approved by:	imp (mentor, blanket for simple patches)
X-MFC-After:	1 week
2008-02-21 19:07:08 +00:00
David Xu
f5ae94753b Add quirks for Netac Onlydisk 2000 USB disk. 2007-12-11 06:41:38 +00:00
Warner Losh
8705c3d30b Add quirks, derived from the linux quirks table for:
o Adonics Cable 205
o Aiptek PocketCAM 3Mega
o Belkin USB2SCSI
o Casio QV DigiCam
o CCYU EasyDisk ED1064
o Desknote UCR-61S2B
o Epson Stylus Photo 875DC Card Reader
o Epson Stylus Photo 895 Card Reader
o Feiya 5-in-1 Card Reader
o Hitachi Dvd-CAM DZ-MV100A Camcorder
o HP CD-WRiter+ CD-4e
o Insystem Storage Adapter v2
o Kyocera Finecam S3x
o Kyocera Finecam S4
o Kyocera Finecam S5
o Kyocera Finecam L3
o Lexar USB CF Reader
o MindAtWork Digital Wallet
o Minolta Dimage F300
o Minolta Dimage E223
o Minsumi USB Fdd
o Netac USB-CF-Card
o NetChip USB Clik! 40
o Onspec MDCFE-B USB CF Reader
o Onspec SIIG/Datafab Memory Stick + CF Reader/Writer
o Onspec Datafab-based Reader
o Onspec PNY/Datafab CF+SM Reader
o Onspec SimpleTech/Datafab CF+SM Reader
o Onspec MDSM-b Reader
o Onspec USB To CF + SM Combo (LC1)
o Onspec ImageMate SDDR55
o Panasonic LS-120 Camera
o Samsung Techwin Digimax 410
o Shuttle eUSB SmartMedia / CompactFlash Adapter
o Skanhex MD 7425 Camera
o Skanhex SX 520z Camera
o Sony Memorystick NW-MS7
o Sony Portable USB Hardrive V2
o Sony Memorystick PEG N760c
o Sony Memorystick MSC-U03
o TREK/IBM USB memory key
o Trumpion T33520 USB Flash Card Controller
o Trumpion MP3 Player
o Vivtar Vivicam 35Xx
o WinMaxGroup USB Flash Disk 64M-C
o Zoran Digital Camera EX-20 DSC

and maybe a few others...

Submitted by: Vaidas Damosevicius and flz
PR: 79893
Reviewed by: njl, flz
Approved by: re (blanket)
2007-07-05 05:26:08 +00:00
Warner Losh
e196c772a8 Add support for Western Digital MyBook external enclosures. They need
this quirk to work.

Submitted by: Dierk Sacher
PR: usb/99419
Approved by: re (blanket)
2007-07-05 04:05:51 +00:00
Warner Losh
bf21ee8d91 WD Firewire/USB Combo hangs under load on USB interface. Fix with
these quirks.

Submitted by: John Pettitt
PR: 79140
Approved by: re@ (blanket)
2007-07-02 04:55:56 +00:00
Warner Losh
ad416b7abe umass quirk: Samsung YP-U2 USB MP3/Ogg Player
Submitted by: Ulrich Spoerlein
PR: 114154
Approved by: re@ (blanket)
2007-06-30 14:53:44 +00:00
Warner Losh
439ebffe8d quirk for CENTURY EX35QUAT disk enclosure
Submitted by: Daniel Hartmeier
PR: 94132
Approved by: re (blanket)
2007-06-30 04:58:35 +00:00
Warner Losh
a72de103a1 Fix cheapy Myson USB-IDE adapter
Submitted by: Arno J. Klaassen
PR: 88939
Approved by: re@ (blanket)
2007-06-30 04:42:29 +00:00
Warner Losh
006bd3063f Expand the transform API to allow transports to return 'success' for
the command.  Make UFI devices return 'success' when asked to do a
SYNC_CACHE.  There's no support for write caching in the UFI spec, so
this is the most appropriate action to undertake.

Reviewed by: scottl
Approved by: re@ (blanket)
2007-06-30 02:50:57 +00:00
Warner Losh
638c640a71 Add support for YANO external USB-HDD.
Submitted by: Norihiro TANAKA
PR: 94742
Approved by: re (kensmith blanket)
2007-06-21 20:13:07 +00:00
Warner Losh
bbc84740c1 Latest round of usb cleanups:
o Consistently use device_foo_t and bus_foo_t for functions implementing
  device_foo and bus_foo respectively.  Adjust those routines that were wrong
  (we should do this throughout the tree).
o make all the modules depend on usb.  Otherwise these modules won't
  load.
o ucycom doesn't need usb_port.h
o Minor unifdefing
o uhub, umass, ums, urio, uscanner conversion complete.
o ukbd: Remove the NO_SET_PROTO quirk (fixes a PR 77940).  NetBSD removed
  their check and setting the proto a long time ago.
o umodem panic fixed.  UQ_ASSUME_CM_OVER_DATA quirk removed because I've never
  seen a umodem that needed this rejection for proection (this gets rid of
  ~20% of the quirks).

Approved by: re@ (kensmith)
PR: 77940
2007-06-21 14:42:34 +00:00
Warner Losh
7bd250d818 s/logprintf/printf/g
Approved by: re@
2007-06-20 05:11:37 +00:00
Warner Losh
c8222a9830 Mark the few remaining drivers that haven't been converted as needing
usb_port.h by explicitly including it.
2007-06-18 22:32:09 +00:00
Warner Losh
fc5d431363 Expand USB_MATCH_START 2007-06-17 16:24:49 +00:00
Scott Long
b50569b71d Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.
2007-06-17 05:55:54 +00:00
Warner Losh
63ba0d2d76 Remove more __OtherBSD__ ifdefs that don't make sense, and haven't for
some time.
2007-06-13 05:45:48 +00:00
Warner Losh
778e5b6687 Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functional
change, and MD5's appear to be the same.
2007-06-13 05:37:59 +00:00
Warner Losh
645016c0e4 Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from
usb_port.h.  They aren't needed, and are a legacy of this code's past.
2007-06-12 15:37:19 +00:00
Warner Losh
7f5ede5819 Kill USB_MATCH_SETUP, since this is the only place it was used in the tree.
While I'm here, kill devinfo junk.
2007-06-09 06:38:19 +00:00
Scott Long
2b83592fdc Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
Warner Losh
76ddd31f5a Some USB mass storage devices return the number of sectors in response
to a READ_CAPACITY request rather than the maximum sector (off by one
problem).  This causes a huge cascade of errors as the geom tasting
code tries to read the last sector (which isn't really there in the
face of this error).  automated tools that manipulate disk labels and
such also have issues.

Create a new quirk READ_CAPACITY_OFFBY1 and add a quirk for the
SanDISK ImageMate that I have that suffers from this problem (the
SDDR-31).  It intercepts the READ_CAPACITY response and adjusts it
from number of sectors to max sector for devices with this quirk.

Reading the Linux source suggests that there are a host of
other devices with this issue, including iPods and some popular
cameras.  I've not added quirks for them, since I don't have the
devices in front of me to test.
2007-02-27 22:33:50 +00:00
Nick Hibma
814ee007c3 Initialise {transport,protocol}{,_version} fields during a PATH_INQ to avoid a
warning message.
2007-02-21 07:46:40 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Matt Jacob
fa9ed86506 The first of 3 major steps to move the CAM layer forward to using
the CAM_NEW_TRAN_CODE that has been in the tree for some years now.

This first step consists solely of adding to or correcting
CAM_NEW_TRAN_CODE pieces in the kernel source tree such
that a both a GENERIC (at least on i386) and a LINT build
with CAM_NEW_TRAN_CODE as an option will compile correctly
and run (at least with some the h/w I have).

After a short settle time, the other pieces (making
CAM_NEW_TRAN_CODE the default and updating libcam
and camcontrol) will be brought in.

This will be an incompatible change in that the size of structures
related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change
in both size and content. However, basic system operation and
basic system utilities work well enough with this change.

Reviewed by:	freebsd-scsi and specific stakeholders
2006-10-31 05:53:29 +00:00
Florent Thoumie
f45164d8b1 Add a USB umass(4) quirk for Panasonic KXL-840AN CD-R drive.
PR:		usb/81073
Submitted by:	James E. Flemer <jflemer@alum.rpi.edu>
MFC after:	3 days
2006-10-07 20:08:37 +00:00
Warner Losh
2deae8fa2f More removing compatibility macros.
md5 still the same.

"Dave, stop.  I feel my mind slipping away." -- hal
2006-09-07 00:06:42 +00:00
Warner Losh
56635f6bd3 s/Static/static/g
s/device_ptr_t/device_t/g

No md5 changes in the .o's

# Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit
# so you need to checkout -kk to get $FreeBSD$ instead of the actual value
# of the keyword.
2006-09-06 23:44:25 +00:00
Ian Dowse
fad8387468 Sony DSC cameras with revision number 6.0 require the same quirk
as those reporting revision 5.0.

Reported by:	Brian Reichert
MFC after:	1 week
2006-03-17 18:16:22 +00:00
Poul-Henning Kamp
327643e3ca When we get an unknown ATAPI comand, try it even if it is not listed,
in all likelyhood just passing it through will work.
2006-03-05 17:52:32 +00:00
Ian Dowse
496a1b8908 Add USB polling calls to umass_cam_poll(). This appears to be enough
to make kernel crash dumps to umass devices work, at least in some
cases.
2006-02-12 15:51:03 +00:00
Warner Losh
01538a58fd ADDON is registered as 0x0d7d, not PNY. Don't confuse the two as we
try to use the registrant for numbers in this file, not the OEM that
put their label on it.  Use PNY's real number 0x154b.  Add another PNY
atachmate with quirks from a PR filed a while ago, but that I can't
seem to find now...
2006-01-31 19:09:38 +00:00
Florent Thoumie
b308457205 - Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.
Reported by:	anders on freebsd-usb@
Tested by:	anders
Approved by:	ssouhlal
MFC after:	3 days
2006-01-30 20:27:44 +00:00
Florent Thoumie
5cd7adbfe3 - Add a umass quirk that should have been part of latest commit.
Approved by:	iedowse (implicit)
MFC after:	3 days
2006-01-26 01:23:29 +00:00
Florent Thoumie
fa9d414d41 Add Product IDs :
- Sandisk Cruzer Micro 128MB [5]
- DANE-ELEC zMate 512MB USB flash drive [7]
- Attache 256MB USB 2.0 Flash Drive [8]
- Sandisk Cruzer Micro 256MB [9]

Add scsi_da.c quirks :
- Samsung USB key 128Mb [1]
- Kingston DataTraveler 2.0 [2]
- Creative MuVo Slim [3]
- United MP 5512 Portable MP3 Player [4]
- Sandisk Cruzer Micro 128MB [5], [9]
- PNY USB Flash keys [6], [7], [8]

Add umass.c quirks :
- Sandisk Cruzer Micro 128MB [5]
- DANE-ELEC zMate 512MB USB flash drive [7]
- Attache 256MB USB 2.0 Flash Drive [8]
- Sandisk Cruzer Micro 256MB [9]

PR:		usb/90081 [1],
		usb/89196 [2],
		kern/86131 [3],
		usb/80487 [4],
		usb/75970 [5],
		usb/75578 [6],
		usb/72344 [7],
		usb/65436 [8],
		usb/70835 [9]
Submitted by:	Henri-Pierre CHARLES <hpc@prism.uvsq.fr> [1],
		Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> [2],
		Erich Rickheit KSC <rickheit-fbp@numachi.com> [3],
		tnu@chania.di.uoa.gr [4],
		Bram Abbekerk <bram@abbekerk.demon.nl> [5],
		Thomas Pornin <pornin@bolet.org> [6],
		parv <parv@pair.com> [7],
		Peter D. Quilty <pdquilty@adelphia.net> [8],
		Raymundo M. Vega <rvega@ms-smtp-03-eri0.socal.rr.com> [9]
Approved by:	iedowse
MFC after:	3 days
2006-01-26 00:35:54 +00:00
Florent Thoumie
465ad22910 Enable NO_GETMAXLUN quirk.
PR:		usb/90670
Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
Approved by:	iedowse
MFC after:	1 week
2006-01-09 01:33:53 +00:00
Pav Lucistnik
612477f7ac - Fix type in previous commit; unbreak build
Approved by:	ssouhlal
Pointy hat to:	pav
2005-12-20 23:07:38 +00:00
Pav Lucistnik
f651aa2d2f - Ignore incorrect CSW signatures on my PURE PocketDab 2000 player
Approved by:	ssouhlal
MFC after:	1 week
2005-12-20 16:21:17 +00:00
Pawel Jakub Dawidek
ef5d77f464 Allow to use TransFlash drive, which can be found in Motorola E398 Mobile Phone.
PR:		usb/89889
Submitted by:	Wojciech A. Koszek <dunstan@freebsd.czest.pl>
MFC after:	1 week
2005-12-19 03:27:28 +00:00
Ian Dowse
c20e7ce621 Revision 5.0 of the Sony DSC camera appears to require RBC commands
to be padded to 12 bytes in length. Otherwise the requests just
time out.

Reported by:	anders
MFC after:	1 week
2005-11-26 17:11:31 +00:00
Xin LI
f467e51eba PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
through umass(4), in order to make cdcontrol(1) to issue commands to
a USB CD driver.

The command IDs were obtained from the CAM subsystem.  This was tested
on half dozen of USB CD drivers from different vendors.

Suggested by:	"intron" <intron at intron dot ac>
PR:		usb/83439
Reviewed by:	sanpei
MFC After:	1 week
2005-07-19 05:18:23 +00:00
Alexander Kabaev
59195c3a3d Plug a potential memory leak.
Noticed by: Coverity Prevent analysis tool.
2005-05-11 18:53:14 +00:00
Ian Dowse
5e1f111310 Fix an incorrect NULL argument to usbd_set_interface() associated
with the ALT_IFACE_1 quirk.

PR:		usb/79190
Submitted by:	Hans Petter Selasky <hselasky@c2i.net>
2005-03-25 01:47:01 +00:00
Ian Dowse
70a18c2253 Use M_NOWAIT when allocating from a callout routine.
PR:	kern/73295
2005-03-25 00:38:46 +00:00
Ian Dowse
e0a4f554be Abort any active transfers when the device detaches. This fixes a
few situations where we used to crash, but by no means all of them.
2005-02-14 02:17:53 +00:00
Ian Dowse
a66e65f5a9 When attached to a high-speed device, report a more appropriate
base transfer speed to CAM. The actual value used (40MB/s) is fairly
arbitrary, but assumes the same 33% overhead as was implied by the
1MB/s figure we used for USB1 devices.
2005-02-13 21:38:34 +00:00
Ian Dowse
01a95e0acf Add support for the TwinMOS Memory Disk IV.
PR:		kern/73766
Submitted by:	Valentin Nechayev
MFC after:	1 week
2004-11-28 21:49:30 +00:00
Ian Dowse
3589f4d21c Add support for the Trumpion/Comotron C3310 MP3 player. 2004-11-28 21:36:39 +00:00
Ian Dowse
a5158af81f Keep a handle on the startup rescan timer and cancel the timer if
the device goes away.
2004-11-10 00:48:22 +00:00
Bruce M Simpson
cdd2389652 Pass through the commands necessary to format USB floppy devices,
from within umass_ufi_transform(). This includes the 12-byte commands
FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES
(sorted in numerical order).

Reviewed by:	ken, scottl
MFC after:	2 weeks
2004-10-12 08:58:57 +00:00
MIHIRA Sanpei Yoshiro
e7934ccbaa Add support Western Digital External USB HDD
ONSPEC entry are sorted

PR:		kern/71031
Submitted by:	Johann Hugo <jhugo@icomtek.csir.co.za>
MFC after:	1 week
2004-09-04 07:07:35 +00:00