summaryrefslogtreecommitdiffstats
path: root/sys/cam
Commit message (Collapse)AuthorAgeFilesLines
* Retire the spl() markers. Add in some minor missed locking as a result.scottl2007-04-192-193/+31
|
* Inline cam_periph_lock|unlock to make debugging easier. Use morescottl2007-04-193-30/+21
| | | | CAM_SIM_LOCK() more uniformly.
* Fix a leaked lock in dashutdown.scottl2007-04-191-1/+3
|
* Avoid problems with make_dev.scottl2007-04-192-0/+4
|
* Zero the CCBs when mallocing them.scottl2007-04-191-2/+2
|
* Split the camisr into per-SIM done queues. This optimizes the locking ascottl2007-04-193-45/+49
| | | | | little bit and allows for direct dispatch of the doneq from certain contexts that would otherwise face recursive locking problems.
* Missed locking the dump and shutdown entry points in the scsi_da driver.scottl2007-04-181-2/+9
|
* Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix ascottl2007-04-185-18/+31
| | | | couple of associated error checks.
* Don't delete the devalias, as per the man page.scottl2007-04-171-4/+1
| | | | Submitted by: jmg
* For the XPT_SASYNC_CB operation, only decouple the broadcast to the busscottl2007-04-161-86/+67
| | | | | and device lists instead of decoupling the whole operation. This avoids problems with SIMs going away.
* Drop the topology lock before calling the periph oninvalidate and dtorscottl2007-04-161-7/+5
| | | | vectors.
* Drop the periph/sim lock when calling disk_destroy().scottl2007-04-162-5/+3
|
* Destroy the devalias before destroying the dev.scottl2007-04-161-1/+1
|
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-1519-957/+1210
| | | | | | | | | | | 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.
* A fix for the SG_GET_TIMEOUT function slipped into a previous commit byscottl2007-04-102-8/+22
| | | | | accident. Remove the text describing the problem as it is no longer relevant. Also give real implementations for the GET and SET ioctls.
* Make use of M_ZERO in various malloc calls.scottl2007-04-091-5/+4
|
* Fix a logic bug that slipped in at the last minute and apparently escapedscottl2007-04-091-4/+3
| | | | testing.
* Add the CAM 'SG' peripheral device. This device implements a subset of thescottl2007-04-072-0/+1126
| | | | | | | | | | | | | | | | | | | | | | | 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.
* A silly buglet found by Coverity- check the return value frommjacob2007-03-151-1/+7
| | | | cam_periph_acquire.
* Use tsleep() rather than msleep() with a NULL mtx.jhb2007-02-271-3/+3
|
* Add an xpt_rescan function and a thread that will fieldmjacob2007-02-232-4/+50
| | | | | | | | | | | | | | rescan requests. The purpose of this is to allow a SIM (or other entities) to request a bus rescan and have it then fielded in a different (process) context from the caller. There are probably better ways to accomplish this, but it's a very small change that helps solve a number of problems. Reviewed by: Justin, Ken and Scott. MFC after: 2 weeks
* Reduce the noise when plugging in (USB) mass storage devices, like a 4 portn_hibma2007-02-211-2/+6
| | | | | | | | | 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
* Use the more specific 'EM732X' designation rather than * to disable syncimp2007-01-231-1/+1
| | | | cache commands, per request from njl@.
* Add quirk for EasyMP3 EM732X usb 2.0 flash mp3 player.imp2007-01-221-0/+8
| | | | | | | (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
* fix botchmjacob2006-12-211-1/+1
|
* Pay attention to return value from xpt_bus_register in xpt_init.mjacob2006-12-211-1/+5
| | | | | Obtained from: Xin Li (Coverity) MFC after: 3 days
* Make cam_xpt's pronouncements match camcontrolmjacob2006-12-101-1/+1
| | | | (Tagged -> Command) Queueing.
* Add an xpt_print function to reduce most of the xpt_print_path/printfmjacob2006-12-0512-259/+216
| | | | | | | pairs. Convert the core code to use it. Reviewed by: scsi (various folks weighing in with good advice) MFC after: 2 weeks
* Initial cut at Basic Domain Validation- just add some states tomjacob2006-12-042-9/+216
| | | | | | traverse through during probing. Reviewed by: scsi (scottl)
* Remove CTS_SPI_FLAGS_TAG_ENB. Nobody is using it and at least onemjacob2006-12-031-1/+0
| | | | | | | | | | | | | author can't remember why it was there. The CTS_SCSI_FLAGS_TAG_ENB remains in place, and makes sense, and is checked all over the place. The CTS_SPI_FLAGS_TAG_ENB was probably an attempt to distinguish protocol and transport tag capabilities. At the very least this can be confusing and prone to many bugs, so let's just assume that the transport tag case just flows from the protocol (and vice versa) for now.
* o Style: remove a w/space before a comma.maxim2006-11-261-1/+1
|
* o Style(9): trim eol w/spaces, w/spaces to tabs, kill an empty line.maxim2006-11-261-4/+3
|
* o Add a quirk for X-Micro Flash Disk.maxim2006-11-261-0/+8
| | | | | | | PR: usb/96901 Submitted by: Szalai Andras Reviewed by: nate (a half of year ago) MFC after: 3 weeks
* XPT_GET_TRAN_SETTINGS can fail- so check for an error andmjacob2006-11-071-1/+9
| | | | don't blindly assume it succeeded.
* Fix the hanging chad if the NEW_TRAN_CODE change and change themjacob2006-11-071-2/+2
| | | | qualifier to force async from cur_spi to spi.
* 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
OpenPOWER on IntegriCloud