summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Remove extra whitespacenjl2006-11-031-1/+0
|
* Add a tunable that allows one to turn off the automatic sending ofmjacob2006-11-021-16/+26
| | | | | | | | | 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)
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-023-479/+0
| | | | | | as the default. Reviewed by multitudes.
* Implement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).pjd2006-10-311-14/+31
| | | | Sponsored by: home.pl
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-0/+53
| | | | | | | | | | | | | | | | | | | | | 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
* Add a SCSI da(4) quirk for Rekam USB Camera.flz2006-10-071-0/+8
| | | | | | PR: usb/98713 Submitted by: Alex <goo@t72.ru> MFC after: 3 days
* Add SCSI da(4) quirk for the iRiver H10.flz2006-10-071-0/+8
| | | | | | PR: usb/102547 Submitted by: Sven Esbjerg <freebsd-pr@xbsd.net> MFC after: 3 days
* Put a bit of hysteresis into both BUSY SCSI status returnsmjacob2006-10-011-4/+20
| | | | | | | | | | | | | | | | | and CAM_RESRC_UNAVAIL returns. Delay a tunable amount for either between retries. This came up because the MPT IOC was returning "IOC out of resources" for some user and this caused a CAM_RESRC_UNAVAIL return. Putting a bit of delay between retries helped them out. There was some discussion that an async event should be used to clear CAM_RESRC_UNAVAIL. That's probably a better notion eventually. Reviewed by: scsi@freebsd.org (ade, scott) MFC after: 1 week
* Don't allow attachment of disks that could cause GEOM to panic.mjacob2006-09-161-9/+24
|
* New Dell 1950/2950 SES backplane drops off the bus if you pokemjacob2006-09-161-0/+4
| | | | | | at greater then lun 0. MFC after: 1 week
* null commit to provide commit message to previousmjacob2006-09-111-1/+1
| | | | | | at the request of Sam Leffler: The previous commit established min and maxtags for VMware pseudo disks to fix a submitted PR.
* PR: 103130mjacob2006-09-111-1/+1
| | | | | Submitted by: Shusuke Shinomiya MFC after: 1 day
* Implement 'camcontrol reportluns'. This allows users to send the SCSIken2006-08-212-15/+35
| | | | | | | | | | | | | | | | | | 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
* access only has 2 esses.jhb2006-08-141-1/+1
| | | | MFC after: 3 days
* Drop Giant before returning in error path, thus eliminatesdelphij2006-07-142-0/+2
| | | | | | | | two mutex leaks. Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: ken, scottl
* 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.
OpenPOWER on IntegriCloud