Commit Graph

611 Commits

Author SHA1 Message Date
Konstantin Belousov
d8b0556c6d Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by:	jhb [1]
Noted by:	jhb [2]
Reviewed by:	jhb
Tested by:	rnoland
2009-06-10 20:59:32 +00:00
Edward Tomasz Napierala
ee857ce73b Remove dead code.
Found with:	Coverity Prevent(tm)
CID:		3667
2009-05-12 16:38:32 +00:00
Edward Tomasz Napierala
0c70e3070b Add missing 'break' statements.
Found with:	Coverity Prevent(tm)
CID:		3936, 3937
Reviewed by:	scottl@
2009-05-12 15:03:47 +00:00
Ed Schouten
2cbf101b17 Get rid of the device index number stored in the sa(4) unit number.
The device index number stored in the unit number of sa(4) devices is
only used to print debug messages. Get rid of this index number and use
devtoname() to just print the entire device name.
2009-04-20 10:40:42 +00:00
Ed Schouten
dae0d1b1d5 Remove unused SESUNIT() macro from ses(4). 2009-04-18 07:39:11 +00:00
John Baldwin
be246f9e94 Reorder dacleanup() and cdcleanup() slightly so that the sysctl context is
freed while the periph lock is not held.  While here, wait until after
freeing the softc before reacquiring the periph lock.

Tested by:	sbruno
2009-02-11 22:29:09 +00:00
John Baldwin
b7208da623 Adding dynamic sysctls no longer requires Giant.
Submitted by:	rdivacky
2009-02-10 22:39:44 +00:00
Bjoern A. Zeeb
53071a66d4 There is no need to initialize the variable here.
Submitted by:	Christoph Mallon christoph.mallon@gmx.de
Reviewed by:	kib (as part of a larger patch)
MFC after:	2 weeks
2009-01-31 17:34:55 +00:00
Edward Tomasz Napierala
041361d899 Don't leak memory when alloc fails.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		2908
2009-01-23 21:06:16 +00:00
Edward Tomasz Napierala
4fee613e42 Add missing 'break' statement.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3667
2009-01-14 21:31:22 +00:00
Edward Tomasz Napierala
c654e30995 Remove unused variable.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3665
2009-01-14 21:27:30 +00:00
Edward Tomasz Napierala
1cec6ef6a9 Add missing 'break' statement.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3927
2009-01-14 21:25:17 +00:00
Edward Tomasz Napierala
5f3fed855c Don't call destroy_dev(9) with a mutex held. While here, shuffle
things around so the periph destructors look alike.  Based on a patch
by Jaakko Heinonen.

Submitted by:	Jaakko Heinonen
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2009-01-10 17:22:49 +00:00
Warner Losh
8550170477 Make it possible to override the number of retries for the CD media.
When trying to read scratched or damaged CDs and DVDs, the default
mechanism is sub-optimal.  Programs like ddrescue do much better if
you turn off retries entirely, since their algorithms are designed
scan big areas fast, then winnow the areas down.  Turning off retries
speeds these programs up by as much as 20x, since the drive is able to
'stream past' many small errors...

The sysctl/tunable kern.cam.cd.retry_count controls this.  That
defaults to '4' (for a total of 5 attempts).  Setting to 0 turns off
all retry attempts.

Reviewed by:	scottl@
2009-01-08 00:45:47 +00:00
Remko Lodder
6333256401 Add quirk for the Storcase InfoStation 12bay
SATA to FC SAN.

PR:		129858
Submitted by:	Nick Triantos <nick-freebsd at triantos dot com>
MFC after:	1 week
2008-12-23 09:11:05 +00:00
Scott Long
835187bff8 Fix refcount locking in cd, pass, and sg periphs. 2008-12-21 06:20:11 +00:00
Edward Tomasz Napierala
24ebf56636 Periph driver fixes, second try.
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-19 14:31:40 +00:00
Edward Tomasz Napierala
1fa9ee7d60 Revert r186186 for now; it breaks stuff.
Approved by:	rwatson (mentor)
2008-12-17 10:49:03 +00:00
Edward Tomasz Napierala
f5bc800067 Fix locking in periph drivers - don't try to unlock periph
that was already deallocated.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 17:01:52 +00:00
Dag-Erling Smørgrav
1ede983cc9 Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after:	3 months
2008-10-23 15:53:51 +00:00
Ed Schouten
6bfa9a2d66 Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
Ed Schouten
d3ce832719 Remove unit2minor() use from kernel code.
When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.

We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().

Reviewed by:	kib
2008-09-26 14:19:52 +00:00
Scott Long
b574dd8dd1 Fix a locking mistake in daopen(). If the open fails, which can happen
because the media was removed, the periph would get its refcount dropped
and ultimately freed before getting unlocked.  This created a dangling
pointer that was easy to trip over.  This fixes a common source of
crashes with removaable media, but problems remain and will get tracked
down.
2008-08-29 04:39:46 +00:00
Kenneth D. Merry
337b89a0e0 SCSI_DELAY is specified in milliseconds, not seconds.
Submitted by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after:	1 week
2008-08-16 21:26:58 +00:00
Jung-uk Kim
874bd08821 Update SCSI opcodes and ASCs from t10.org.
http://www.t10.org/lists/1spc-lst.htm

Note opcodes for scanner and communication devices are taken from the previous
revision because they are not listed in the files any more.
Also, note newly added ASCs are all marked with 'XXX TBD' and take SS_RDEF action
for now.  Some ASCs need SS_TUR for error recovery or SS_FATAL to prevent further
retrials.  We should deal with them later.

Reviewed by:	scottl, ken
2008-08-07 17:25:05 +00:00
Remko Lodder
7a7ce8a36a Add quirk for the Samsung YP-U3
PR:		125398
Submitted by:	Tino Engel <goaengel at gmx dot net>
Approved by:	imp (mentor, implicit)
MFC after:	1 week
2008-07-09 17:00:14 +00:00
Scott Long
ad97d96c40 Locking in the ses_ioctl handler doesn't have to be so strict because
the referenced data is only obtained/changed in the device open handler,
and the ioctl handler can only run after the open handler.  Also fix a
few nearby style issues.

Submitted by: Matt Jacob
2008-03-17 17:18:16 +00:00
Scott Long
c9f892eb86 Fix a couple of locking mistakes in the ses_ioctl path.
Submitted by: Matt Jacob
2008-02-20 19:49:46 +00:00
Maxim Konovalov
d5b851f626 o Correct EasyMP3 EM732X usb 2.0 flash mp3 player revision:
it's 1.00 not 1.0.

PR:		usb/96546
Submitted by:	Eugene Grosbein
MFC after:	1 month
2008-01-12 19:24:55 +00:00
Robert Watson
3de213cc00 Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument.  This will allow DDB to detect the broad category of
reason why the debugger has been entered, which it can use for the
purposes of deciding which DDB script to run.

Assign approximate why values to all current consumers of the
kdb_enter() interface.
2007-12-25 17:52:02 +00:00
David Xu
f5ae94753b Add quirks for Netac Onlydisk 2000 USB disk. 2007-12-11 06:41:38 +00:00
Scott Long
9be53ee86b Fix a change in the previous commit that was actually a type-o. 2007-11-15 16:23:38 +00:00
Scott Long
44344254dd Add a bunch of definitions and structures to support newer drivers. 2007-10-12 22:11:22 +00:00
Alexander Kabaev
f7c7c876de Do not forget to cam_periph_unhold the peripheral before exiting
due to error.

PR:		kern/114636
Submitted by:	Tijl Coosemans
Approved by:	re (hrs)
2007-07-21 18:07:45 +00:00
Warner Losh
3702980c1c After talking with njl@, change this wildcard entry to be a bit less wild.
Approved by: re (blanket)
2007-07-01 17:42:07 +00:00
Warner Losh
73bbb79dd4 Quirk for ChipsBnk usb stick
Submitted by: Mark Andrews
PR: 103702
Approved by: re@ (blanket)
2007-06-30 14:44:09 +00:00
Warner Losh
cdbcad0542 Add quirk for JoyFly 128mb USB Flash Drive
submitted by: Toni Schmidbauer
PR: 96133
Approved by: re@ (blanket)
2007-06-30 14:41:30 +00:00
Warner Losh
dd7153acf3 quirk for I/O Magic USB flash drive "Giga Bank"
Submitted by: Jeff Anton
PR: 108810
Approved by: re@ (blanket)
2007-06-30 05:24:25 +00:00
Warner Losh
3693ebaeac Samsung MP0402H quirk
Submitted by: Gipsy<wint3r@securimail.com>
PR: 108427
Approved by: re@ (blanket)
2007-06-30 05:21:18 +00:00
Warner Losh
c16d852cca Add support for JNC MP3 Player
Submitted by: User & <dhenin@cypries.cyclopes.org>
PR: 94439
Approved by: re (blanket)
2007-06-30 05:03:03 +00:00
Warner Losh
6d30287972 Philips USB Key Audio KEY013
Submitted by: Arnoud Engelfriet
PR: 68412
Approved by: re (blanket)
2007-06-30 04:34:45 +00:00
Warner Losh
f8f10e94cf Support for iRiver U10 USB connection
PR: 92306
Submitted by: Soren Dossing
Approved by: re (blanket)
2007-06-28 06:12:55 +00:00
Warner Losh
dcf43907af Quirk for Denver MP3 player usb.
Submitted by: Ed Schouten
PR: 107101
Approved by: re (blanket for device supprot)
2007-06-28 04:51:19 +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
Scott Long
036472e3ee Revert an accidental change from the previous rev. 2007-06-16 18:22:19 +00:00
Scott Long
d9fd6daad5 Work around the other uses of M_WAITOK. 2007-06-16 18:20:29 +00:00
Scott Long
ddd8ed26ea Work around a malloc locking problem. 2007-06-16 18:13:26 +00:00
David Malone
041b706b2f Despite several examples in the kernel, the third argument of
sysctl_handle_int is not sizeof the int type you want to export.
The type must always be an int or an unsigned int.

Remove the instances where a sizeof(variable) is passed to stop
people accidently cut and pasting these examples.

In a few places this was sysctl_handle_int was being used on 64 bit
types, which would truncate the value to be exported.  In these
cases use sysctl_handle_quad to export them and change the format
to Q so that sysctl(1) can still print them.
2007-06-04 18:25:08 +00:00
Matt Jacob
b76f27d25b Back out 1.212 at Nate's request in order to go through the
actual formal process he's trying to get established for quirks..
2007-05-29 20:04:01 +00:00
Matt Jacob
ca05119e8a Use the Hitachi 2.5" HD, 120 GB as a USB device.
Submitted by:		Joakim Bentholm`
MFC after:	3 days
2007-05-29 01:23:38 +00:00
Olivier Houchard
302e130edc Remove duplicate includes.
Submitted by:   Cyril Nguyen Huu <cyril ci0 org>
2007-05-23 13:36:02 +00:00
Matt Jacob
1cd1670b48 Zero scsi_readcapacity allocations so we can really
tell if there has been data returned (for some broken
residual checking points).

MFC after:	3 days
2007-05-18 21:58:07 +00:00
Scott Long
85d92640f8 Add a helper function for registering async callbacks. Besides
eliminating a lot of duplicated code, this also fixes a locking edge case.
2007-05-16 16:54:23 +00:00
Scott Long
0dd50e9b5e Eliminate the use of M_TEMP. 2007-05-14 21:48:53 +00:00
Scott Long
06b7b89f0d Remove obsolete headers. Move kernel specific headers under #ifdefs 2007-04-23 18:01:44 +00:00
Scott Long
919c80dfc7 Fix a leaked lock in dashutdown. 2007-04-19 22:18:15 +00:00
Scott Long
58b0b144e8 Avoid problems with make_dev. 2007-04-19 18:14:33 +00:00
Scott Long
545f17a3c8 Missed locking the dump and shutdown entry points in the scsi_da driver. 2007-04-18 05:14:16 +00:00
Scott Long
8008a935a7 Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix a
couple of associated error checks.
2007-04-18 04:58:53 +00:00
Scott Long
b653ca76bc Don't delete the devalias, as per the man page.
Submitted by: jmg
2007-04-17 01:12:35 +00:00
Scott Long
cd5c9285cd Drop the periph/sim lock when calling disk_destroy(). 2007-04-16 19:41:14 +00:00
Scott Long
d292906a7c Destroy the devalias before destroying the dev. 2007-04-16 19:40:13 +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
Scott Long
715ab2120d A fix for the SG_GET_TIMEOUT function slipped into a previous commit by
accident.  Remove the text describing the problem as it is no longer
relevant.  Also give real implementations for the GET and SET ioctls.
2007-04-10 20:03:42 +00:00
Scott Long
4400b36d94 Make use of M_ZERO in various malloc calls. 2007-04-09 05:47:32 +00:00
Scott Long
472cdbef04 Fix a logic bug that slipped in at the last minute and apparently escaped
testing.
2007-04-09 05:43:02 +00:00
Scott Long
1eba4c7948 Add the CAM 'SG' peripheral device. This device implements a subset of the
Linux SCSI SG passthrough device API.  The intention is to allow for both
running of Linux apps that want to talk to /dev/sg* nodes, and to facilitate
porting of apps from Linux to FreeBSD.  As such, both native and linuxolator
entry points and definitions are provided.

Caveats:
 - This does not support the procfs and sysfs nodes that the Linux SG
   driver provides.  Some Linux apps may rely on these for operation,
   others may only use them for informational purposes.
 - More ioctls need to be implemented.
 - Linux uses a naming scheme of "sg[a-z]" for devices, while FreeBSD uses a
   scheme of "sg[0-9]".  Devfs aliasis (symlinks) are automatically created
   to link the two together.  However, tools like camcontrol only see the
   native names.
 - Some operations were originally designed to return byte counts or other
   data directly as the syscall return value.  The linuxolator doesn't appear
   to support this well, so this driver just punts for these cases.

Now that the driver is in place, others are welcome to add missing
functionality.  Thanks to Roman Divacky for pushing this work along.
2007-04-07 19:40:58 +00:00
John Baldwin
552e9b06bb Use tsleep() rather than msleep() with a NULL mtx. 2007-02-27 17:15:39 +00:00
Nick Hibma
55fe33a350 Reduce the noise when plugging in (USB) mass storage devices, like a 4 port
flash card reader.
Also remove an 'Opened da0 -> <random number>' which is not needed on a daily
basis (available through bootverbose).

Reviewed by:	phk, ken
MFC after:	1 week
2007-02-21 07:45:02 +00:00
Warner Losh
8bd73484dc Use the more specific 'EM732X' designation rather than * to disable sync
cache commands, per request from njl@.
2007-01-23 17:29:31 +00:00
Warner Losh
d5f2a6f556 Add quirk for EasyMP3 EM732X usb 2.0 flash mp3 player.
(It appears that the quirk proceedures link has disappeared and that
this PR complied with it, if there's a problem, please contact me).

PR: usb/96546
2007-01-22 04:34:03 +00:00
Matt Jacob
f0d9af51a1 Add an xpt_print function to reduce most of the xpt_print_path/printf
pairs. Convert the core code to use it.

Reviewed by:	scsi (various folks weighing in with good advice)
MFC after:	2 weeks
2006-12-05 07:45:28 +00:00
Matt Jacob
2afca7acfb Initial cut at Basic Domain Validation- just add some states to
traverse through during probing.

Reviewed by:	scsi (scottl)
2006-12-04 23:04:13 +00:00
Maxim Konovalov
64d5b4fdad o Style: remove a w/space before a comma. 2006-11-26 17:18:31 +00:00
Maxim Konovalov
b18f224062 o Style(9): trim eol w/spaces, w/spaces to tabs, kill an empty line. 2006-11-26 17:15:54 +00:00
Maxim Konovalov
a9622c854a o Add a quirk for X-Micro Flash Disk.
PR:		usb/96901
Submitted by:	Szalai Andras
Reviewed by:	nate (a half of year ago)
MFC after:	3 weeks
2006-11-26 17:13:24 +00:00
Nate Lawson
76f3dbcac7 Remove extra whitespace 2006-11-03 05:42:15 +00:00
Matt Jacob
84d67ea566 Add a tunable that allows one to turn off the automatic sending of
the ORDERED tag. This recoups significant performance gains for many
arrays.

The default is still to send out the ORDERED tag periodically.

Reviewed by:	scsi (justin+timeout)
2006-11-02 21:12:37 +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
Pawel Jakub Dawidek
9cd394ea96 Implement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).
Sponsored by:	home.pl
2006-10-31 21:19:25 +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
f2322e0f52 Add a SCSI da(4) quirk for Rekam USB Camera.
PR:		usb/98713
Submitted by:	Alex <goo@t72.ru>
MFC after:	3 days
2006-10-07 19:04:23 +00:00
Florent Thoumie
41d810c6f4 Add SCSI da(4) quirk for the iRiver H10.
PR:		usb/102547
Submitted by:	Sven Esbjerg <freebsd-pr@xbsd.net>
MFC after:	3 days
2006-10-07 18:28:55 +00:00
Matt Jacob
059cce1a75 Don't allow attachment of disks that could cause GEOM to panic. 2006-09-16 21:21:07 +00:00
Kenneth D. Merry
42cb6a80b6 Implement 'camcontrol reportluns'. This allows users to send the SCSI
REPORT LUNS command to a device.

camcontrol.[c8]:	Implement reportluns.  This tries to print the LUNs
			out in a reasonable format.  Only the periph
			addressing method has been tested, since very little
			hardware that I know of supports the other methods.

scsi_all.[ch]:		Revamp the report luns CDB structure and helper
			functions.  This constitutes a little bit of an API
			change, but since the old CDB length was 10 bytes,
			and the REPORT LUNS CDB length is actually 12 bytes,
			it's clear that no one was using this API in the
			first place.

MFC After:	1 week
2006-08-21 13:24:50 +00:00
John Baldwin
c6cb3ff429 access only has 2 esses.
MFC after:	3 days
2006-08-14 19:29:45 +00:00
Xin LI
232e7000f5 Drop Giant before returning in error path, thus eliminates
two mutex leaks.

Submitted by:	Beyond Luo <fedora ercist iscas ac cn>
PR:		kern/100046
Reviewed by:	ken, scottl
2006-07-14 13:58:32 +00:00
Matt Jacob
4e359f5ad1 Handle some of the inquiry flags that have come into
usage as of SPC2r20. Specifically, handle the BQueue
flag which will indicate that a device supports the
Basic Queueing model (no Head of Queue or Ordered tags).
When this flag is set, SID_CmdQueue is clear. This has
causes FreeBSD to assume that the device did not support
tagged operations.

MFC after:	1 month
2006-05-30 22:44:00 +00:00
Matt Jacob
336b293c8f Forced commit - last checkin got away from me.
This version of scsi_target.c removes all SMP locking until
we have a lock-aware CAM stack. This allows us to use KNOTE
without a panic at least.

It's not yet clear whether target mode is working yet or not.

Discussed with: Scott, Ken, Nate, Justin
2006-05-24 15:26:07 +00:00
Matt Jacob
a62525f3c8 Make physical buffers in cam_periph_mapmem owned by the kernel in case we
return to user space w/o waiting for I/O to complete.

I tried to get several folks who know this code better than me to review it
with no luck. I *do* know that w/o this code, using the SCSI target driver
panics in userret (if it doesn't panic in knote first).
2006-05-24 15:22:21 +00:00
Matt Jacob
9dcfabf816 Actually check to see if XPT_CALC_GEOMETRY had an error
and pick a bogus geometry if it had so we don't later
get a divide by zero trap.
2006-04-18 22:01:59 +00:00
Maxim Konovalov
ae2772f800 o Do not double i/o stats for cd(4) already acounted in g_disk_done().
PR:		kern/95707
Submitted by:	Andre Albsmeier
Reviewed by:	phk
MFC after:	2 weeks
2006-04-17 09:12:53 +00:00
Joerg Wunsch
d7dfbb6b44 Add reference to PR to TOSHIBA TransMemory quirk entry. 2006-03-18 21:13:14 +00:00
Florent Thoumie
f010421bda - Add a PR number for future reference.
Approved by:	njl
2006-03-18 18:28:13 +00:00
Joerg Wunsch
0f9f3dd16b Add the TOSHIBA TransMemory USB sticks to the list of devices that
hate "Synchronize cache" commands.

MFC after:	1 day
2006-03-13 22:26:33 +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
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
Matt Jacob
fba92123ac Fix ioctl to not get swallowed by ioctl code (i.e., make sure the darned
code sticks within 8 bits)

MFC after:	1 week
2006-01-18 08:37:27 +00:00
Matt Jacob
de8fa52e52 Incorporate the O_NONBLOCK open semantics of Linux and Solaris. This allows
an application to upon a tape (yea, even the non-control device) even if
it cannot establish a mount session. If the open cannot establish a mount
session and O_NONBLOCK was specified, the tape becomes 'open pending mount'.
All I/O operations that would require access to a tape thereafter until
a close attempt to initiate the mount session. If the mount session succeeds,
the tape driver transitions to full open state, else returns an appropriate
I/O error (ENXIO).

At the same time, add a change that remembers whether tape is being opened
read-only. If so, disallow 'write' operations like writing filemarks that
bypass the normal read-only filtering operations that happen in the write(2)
syscall.

Reviewed by:	ken, justin, grog
MFC after:	2 weeks
Suggested by:	The Bacula Team
2006-01-14 14:32:41 +00:00
Marcus Alves Grando
fa1d87f552 Allow to use Time DPA20B 1GB MP3 Player [1]
Allow to use Qware BeatZkey! Pro [2]

PR:             usb/81846 [1], usb/79164 [2]
Submitted by:   Ruben de Groot <rdg@bzerk.org> [1], Radek Kozlowski <radek@raadradd.com> [2]
Approved by:    njl
MFC:            1 week
2006-01-13 11:33:40 +00:00