summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Grumble. VMWare ESX and VMWare WorkStation have *slightly* differentmjacob2006-06-261-1/+1
| | | | | | | inquiry data (pointlessly different I might add). Pick the common parts. MFC after: 1 day
* VMware disk volumes are only on LUN 0, andmjacob2006-06-241-0/+5
| | | | | | | some VMware HBAs have known bugs with commands sent to other than LUN 0. MFC after: 1 day
* Add PIM_SEQSCAN for HBA misc flags and code that understandsmjacob2006-06-052-33/+81
| | | | | | | | | | | | | | | | | | | | | | | what to do with it. This forces us to scan targets sequentially, not in parallel. The reason we might want to do this is that SPI negotiation might not work right at the SIM level if we try to do it in parallel. We *could* fix this for each SIM where this is broken, but it's a lot harder to do that when we can simply ask CAM to probe sequentially. If PIM_SEQSCAN is not set (default), the original behaviour for probing is unchanged. LUN probing is still done in parallel for each target in either case. While we're at it, clean up some resource leakage for error cases. Reviewed by: ken, scott, scsi@ MFC after: 1 week
* Handle some of the inquiry flags that have come intomjacob2006-05-302-6/+17
| | | | | | | | | | | 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
* Forced commit - last checkin got away from me.mjacob2006-05-241-0/+1
| | | | | | | | | | 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
* Sorry- last delta was checked in by mistake.mjacob2006-05-241-2/+1
|
* Make physical buffers in cam_periph_mapmem owned by the kernel in case wemjacob2006-05-243-58/+21
| | | | | | | | 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).
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-4/+0
| | | | unnecessary.
* Actually check to see if XPT_CALC_GEOMETRY had an errormjacob2006-04-181-3/+17
| | | | | and pick a bogus geometry if it had so we don't later get a divide by zero trap.
* Do more guarding against zero divide traps for the geom subroutine.mjacob2006-04-181-1/+14
|
* o Do not double i/o stats for cd(4) already acounted in g_disk_done().maxim2006-04-171-1/+1
| | | | | | | PR: kern/95707 Submitted by: Andre Albsmeier Reviewed by: phk MFC after: 2 weeks
* Add reference to PR to TOSHIBA TransMemory quirk entry.joerg2006-03-181-0/+1
|
* - Add a PR number for future reference.flz2006-03-181-1/+1
| | | | Approved by: njl
* Add the TOSHIBA TransMemory USB sticks to the list of devices thatjoerg2006-03-131-0/+7
| | | | | | hate "Synchronize cache" commands. MFC after: 1 day
* - Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader.flz2006-01-301-0/+8
| | | | | | | Reported by: anders on freebsd-usb@ Tested by: anders Approved by: ssouhlal MFC after: 3 days
* Add Product IDs :flz2006-01-261-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* CAM_NEW_TRAN_CODE placeholders for SAS support.mjacob2006-01-202-5/+25
| | | | | Reviewed by: nate, ken, justin MFC after: 1 month
* Fix ioctl to not get swallowed by ioctl code (i.e., make sure the darnedmjacob2006-01-181-1/+1
| | | | | | code sticks within 8 bits) MFC after: 1 week
* Incorporate the O_NONBLOCK open semantics of Linux and Solaris. This allowsmjacob2006-01-141-6/+87
| | | | | | | | | | | | | | | | | | | 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
* Allow to use Time DPA20B 1GB MP3 Player [1]mnag2006-01-131-0/+16
| | | | | | | | | 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
* When deregistering a bus, attempt to flush out all outstandingiedowse2006-01-111-8/+111
| | | | | | | | | | | | | | | | | | | operations before returning. Point the bus at a dummy cam_sim structure so that any CCBs will complete immediately with a CAM_DEV_NOT_THERE status, and ensure that any xpt_schedule() calls on the bus's devices will immediately call the peripheral's periph_start() routine. Also repeat the async messages because devices that were part of the way through being probed may appear after the original AC_LOST_DEVICE was sent, and would otherwise never go away. These changes make it possible to deregister a bus and free the SIM at most stages during bus probing without the usual crashes in camisr(). In particular, plugging in a umass device and then unplugging it as soon as the first probe messages appeared would almost always result in a crash. Now the device just goes away with a few CAM errors and all references to the CAM bus, target and device are dropped correctly.
* There should be no need to retry when the CCB status code isiedowse2006-01-081-0/+2
| | | | | | | CAM_LUN_INVALID or CAM_TID_INVALID. Retries were being triggered here when a umass device was unplugged, and while the retries themselves are probably harmless, they complicated finding the real SIM removal problems.
* Style nit.pjd2005-12-191-2/+2
|
* Allow to use TransFlash drive, which can be found in Motorola E398 Mobile Phone.pjd2005-12-191-0/+9
| | | | | | PR: usb/89889 Submitted by: Wojciech A. Koszek <dunstan@freebsd.czest.pl> MFC after: 1 week
* Fix a bug that caused some /dev entries to continue to exist afterjdp2005-11-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | | the underlying drive had been hot-unplugged from the system. Here is a specific example. Filesystem code had opened /dev/da1s1e. Subsequently, the drive was hot-unplugged. This (correctly) caused all of the associated /dev/da1* entries to be deleted. When the filesystem later realized that the drive was gone it closed the device, reducing the write-access counts to 0 on the geom providers for da1s1e, da1s1, and da1. This caused geom to re-taste the providers, resulting in the devices being created again. When the drive was hot-plugged back in, it resulted in duplicate /dev entries for da1s1e, da1s1, and da1. This fix adds a new disk_gone() function which is called by CAM when a drive goes away. It orphans all of the providers associated with the drive, setting an error condition of ENXIO in each one. In addition, we prevent a re-taste on last close for writing if an error condition has been set in the provider. Sponsored by: Isilon Systems Reviewed by: phk MFC after: 1 week
* Make the exploring of all luns supported by an HBA more of amjacob2005-09-161-5/+38
| | | | | | | | | | | | | | | tunable (until we get REPORT LUNS in place). If we're probing luns, and each probe succeeds, we keep going past lun 7 if we're a SCSI3 or better device (until we fail to probe). If we're probing luns, and a probe fails, we only keep going if we're quirked *for* it (CAM_QUIRK_HILUNS), and if we're not quirked *against* it (CAM_QUIRK_NOHILUNS), or we're a SCSI3 or better device and the tunable (kern.cam.cam_srch_hi) is set non-zero. Reviewed by: nate@rootlabs.org, gibbs@scsiguy.com, ken@kdm.com, scottl@samsco.org MFC after: 1 week
* Merge the dev_clone and dev_clone_cred event handlers into a singlerwatson2005-08-081-3/+4
| | | | | | | | | | | | | event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
* Fix the recent panics/LORs/hangs created by my kqueue commit by:ssouhlal2005-07-011-1/+1
| | | | | | | | | | | | | | | | | - Introducing the possibility of using locks different than mutexes for the knlist locking. In order to do this, we add three arguments to knlist_init() to specify the functions to use to lock, unlock and check if the lock is owned. If these arguments are NULL, we assume mtx_lock, mtx_unlock and mtx_owned, respectively. - Using the vnode lock for the knlist locking, when doing kqueue operations on a vnode. This way, we don't have to lock the vnode while holding a mutex, in filt_vfsread. Reviewed by: jmg Approved by: re (scottl), scottl (mentor override) Pointyhat to: ssouhlal Will be happy: everyone
* - Providing fine-grained malloc statistic by replacing M_DEVBUF withavatar2005-07-019-66/+98
| | | | | | | | | | | | | module-specific malloc types. These should help us to pinpoint the possible memory leakage in the future. - Implementing xpt_alloc_ccb_nowait() and replacing all malloc/free based CCB memory management with xpt_alloc_ccb[_nowait]/xpt_free_ccb. Hopefully this would be helpful if someday we move the CCB allocator to use UMA instead of malloc(). Encouraged by: jeffr, rwatson Reviewed by: gibbs, scottl Approved by: re (scottl)
* Fixing a memory leak in xpt_release_device(), which can be quicklyavatar2005-06-241-0/+2
| | | | | | | | | | | | | | | | (depends on how many memory you have) observed through "tar -tvf /dev/sa0." Without this patch, RELENG_5 and HEAD panics with something like: kmem_malloc(4096): kmem_map too small: 42258432 total allocated RELENG_4 doesn't panic but spews following errors: camq_init: - cannot malloc array! Reviewed by: gibbs, scottl Approved by: re (scottl) MFC after: 3 days
* Add a quirk for my pen-drive.pjd2005-06-091-0/+8
|
* Do not initialize path variable with useless value just beforekan2005-05-111-1/+0
| | | | | | xpt_create_path overwrites it anyway. Noticed by: Coverity Prevent analysis tool
* Add quirk for TEAC USB floppy drives.dwhite2005-05-051-0/+7
|
* Make sure we look at the correct sub op codes whenmjacob2005-04-141-3/+22
| | | | | | | | deciding whether it's an operation we can perform via the control device. PR: kern/72010 MFC after: 1 week
* Take constructive advice from njl && reformatmjacob2005-04-141-0/+6
| | | | previously added quirks slightly.
* Quirk for ZICPlay USB MP3 Player.njl2005-04-141-0/+8
| | | | | PR: kern/75057 Submitted by: Aurelien Nephtali <aurelien.nephtali wanadoo.fr>
* Apply quirk.mjacob2005-04-141-0/+4
| | | | | | PR: 57469 Submitted by: walter@pelissero.de MFC after: 1 week
* Applied conservative version of suggested quirk.mjacob2005-04-141-0/+7
| | | | | | PR: 57468 Submitted by: walter@pelissero.de MFC after: 1 week
* Apply quirk suggested by submitter.mjacob2005-04-141-1/+1
| | | | | | PR: 75486 Submitted by: no_bs@web.de MFC after: 1 week
* The divide by zero panic must have been due to a bogusmjacob2005-04-141-0/+9
| | | | | | | | | period value. I suppose the BT adapter driver should be fixed, but more importantly we should protect against dividing by zero. PR: kern/75603 MFC after: 1 week
* avoid use after freesam2005-03-311-8/+8
| | | | | | Submitted by: gibbs Reviewed by: mdodd Approved by: Coverity Prevent analysis tool
* avoid use after freesam2005-03-311-1/+1
| | | | | | Submitted by: gibbs Reviewed by: mdodd Noticed by: Coverity Prevent analysis tool
* Explicitly hold a reference to the cdev we have just cloned. Thisphk2005-03-311-0/+1
| | | | | closes the race where the cdev was reclaimed before it ever made it back to devfs lookup.
* Fix a problem with the cd(4) driver -- the CAMGETPASSTHRU ioctl wouldn'tken2005-03-261-1/+7
| | | | | | | | | | | | succeed if there was no media in the drive. This was broken in rev 1.72 when the media check was added to cdioctl(). For now, check the ioctl group to decide whether to check for media or not. (We only need to check for media on CD-specific ioctls.) Reported by: bland MFC after: 3 days
* Fix a place where we were referencing a pointer after it had been freed.ken2005-03-261-0/+2
| | | | | Submitted by: "Henry Miller" <hank@blackhole.com> MFC after: 3 days
* Restore queue depth settings across tag disable events. The system oftengibbs2005-03-231-2/+13
| | | | | | | | | | | | | | | | disables tag queuing temporarily in order to allow controllers a window to safely perform transfer negotiation with non-compliant devices. Before this change, CAM would restore the queue depth to the controller specified maximum or device quirk level rather than any depth determined by reactions to QUEUE FULL/BUSY events or an explicit user setting. During device probe, initialize the flags field for XPT_SCAN_BUS. The uninitialized value often confused CAM into not bothering to issue an AC_FOUND_DEVICE async event for new devices. The reason this bug wasn't reported earlier is that CAM manually announces devices after the initial system bus scans. MFC: 3 days
* Don't free the SIM object twice.scottl2005-03-191-1/+0
| | | | Submitted by: Coverity Prevent analysis tool
* Reference a pointer correctly when copying to it's location.scottl2005-02-211-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Check the correct periph pointer after search for it.scottl2005-02-201-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Protect against trying to free a non-existant peripheral.scottl2005-02-201-0/+4
| | | | | Submitted by: Coverity Prevent analysis tool MFC After: 3 days
OpenPOWER on IntegriCloud