#
50711c71 |
| 09-May-1999 |
Kenneth D. Merry <ken@FreeBSD.org> |
Add a facility in the CAM error handling code to retry selection timeouts. If the client requests that the error recovery code retry a selection timeout, it will be retried after half a second. The
Add a facility in the CAM error handling code to retry selection timeouts. If the client requests that the error recovery code retry a selection timeout, it will be retried after half a second. The delay is to give the device time to recover.
For most of these drivers, I only added selection timeout retries where they were also retrying unit attention type errors. The sa(4) driver calls saerror() in a number of places, but most of them don't request retrying unit attentions.
Also, bump the default minimum CD changer timeout from 2 to 5 seconds and the maximum timeout from 10 to 15 seconds. Some Pioneer changers seem to have trouble with the shorter timeout.
Reviewed by: gibbs
show more ...
|
Revision tags: release/3.1.0 |
|
#
2a888f93 |
| 10-Feb-1999 |
Kenneth D. Merry <ken@FreeBSD.org> |
Add a prioritization field to the devstat_add_entry() call so that peripheral drivers can determine where in the devstat(9) list they are inserted.
This requires recompilation of libdevstat, systat,
Add a prioritization field to the devstat_add_entry() call so that peripheral drivers can determine where in the devstat(9) list they are inserted.
This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and any ports that depend on the devstat code, since the size of the devstat structure has changed. The devstat version number has been incremented as well to reflect the change.
This sorts devices in the devstat list in "more interesting" to "less interesting" order. So, for instance, da devices are now more important than floppy drives, and so will appear before floppy drives in the default output from systat, iostat, vmstat, etc.
The order of devices is, for now, kept in a central table in devicestat.h. If individual drivers were able to make a meaningful decision on what priority they should be at attach time, we could consider splitting the priority information out into the various drivers. For now, though, they have no way of knowing that, so it's easier to put them in an easy to find table.
Also, move the checkversion() call in vmstat(8) to a more logical place.
Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and for putting up with the long time it has taken me to commit it. Bruce did object somewhat to the central priority table (he would rather the priorities be distributed in each driver), so his objection is duly noted here.
Reviewed by: bde, obrien
show more ...
|
Revision tags: release/3.0.0, release/2.2.8 |
|
#
3c68dd1a |
| 22-Dec-1998 |
Eivind Eklund <eivind@FreeBSD.org> |
Staticize.
Reviewed by: gibbs
|
#
10fc9d90 |
| 13-Dec-1998 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Return ENODEV instead of EINVAL when a particular exchange or move operation exceeds the capabilities of the changer device.
|
#
2127f260 |
| 04-Dec-1998 |
Archie Cobbs <archie@FreeBSD.org> |
Examine all occurrences of sprintf(), strcat(), and str[n]cpy() for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where a
Examine all occurrences of sprintf(), strcat(), and str[n]cpy() for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
show more ...
|
#
22b9c86c |
| 23-Nov-1998 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix a few problems that Bruce noticed about a month ago, and fix oup one other problem.
- Hold onto splsoftcam() in the peripheral driver open routines until we have locked the periph. This elimi
Fix a few problems that Bruce noticed about a month ago, and fix oup one other problem.
- Hold onto splsoftcam() in the peripheral driver open routines until we have locked the periph. This eliminates a race condition.
- Disallow opening the pass driver when securelevel > 1.
- If a user tries to open the pass driver with O_NONBLOCK set, return EINVAL instead of ENODEV. (noticed by gibbs)
show more ...
|
#
ee9c90c7 |
| 23-Oct-1998 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix a problem with the way we handled device invalidation when attaching to a device failed.
In theory, the same steps that happen when we get an AC_LOST_DEVICE async notification should have been t
Fix a problem with the way we handled device invalidation when attaching to a device failed.
In theory, the same steps that happen when we get an AC_LOST_DEVICE async notification should have been taken when a driver fails to attach. In practice, that wasn't the case.
This only affected the da, cd and ch drivers, but the fix affects all peripheral drivers.
There were several possible problems: - In the da driver, we didn't remove the peripheral's softc from the da driver's linked list of softcs. Once the peripheral and softc got removed, we'd get a kernel panic the next time the timeout routine called dasendorderedtag(). - In the da, cd and possibly ch drivers, we didn't remove the peripheral's devstat structure from the devstat queue. Once the peripheral and softc were removed, this could cause a panic if anyone tried to access device statistics. (one component of the linked list wouldn't exist anymore) - In the cd driver, we didn't take the peripheral off the changer run queue if it was scheduled to run. In practice, it's highly unlikely, and maybe impossible that the peripheral would have been on the changer run queue at that stage of the probe process.
The fix is: - Add a new peripheral callback function (the "oninvalidate" function) that is called the first time cam_periph_invalidate() is called for a peripheral.
- Create new foooninvalidate() routines for each peripheral driver. This routine is always called at splsoftcam(), and contains all the stuff that used to be in the AC_LOST_DEVICE case of the async callback handler.
- Move the devstat cleanup call to the destructor/cleanup routines, since some of the drivers do I/O in their close routines.
- Make sure that when we're flushing the buffer queue, we traverse it at splbio().
- Add a check for the invalid flag in the pt driver's open routine.
Reviewed by: gibbs
show more ...
|
#
11021a1a |
| 15-Oct-1998 |
Kenneth D. Merry <ken@FreeBSD.org> |
Clean up some unused variables.
Reviewed by: ken Submitted by: phk
|
#
6326180f |
| 02-Oct-1998 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix a printf format warning that shows up when CAMDEBUG is defined.
|
#
696db222 |
| 02-Oct-1998 |
Kenneth D. Merry <ken@FreeBSD.org> |
Modify the changer driver so it can handle (hopefully!) changers that need block descriptors enabled on mode sense commands.
Basically, we try sending a mode sense with block descriptors disabled (t
Modify the changer driver so it can handle (hopefully!) changers that need block descriptors enabled on mode sense commands.
Basically, we try sending a mode sense with block descriptors disabled (the previous default), and if it fails, we try sending the mode sense with block descriptors enabled. If that works, we note that in a runtime quirk entry, so we don't bother disabling block descriptors again for the device.
This problem was first reported by Chris Jones <cjones@honors.montana.edu> on one of the NetBSD lists, but I'd imagine that some FreeBSD users would have run into it eventually as well, since our changer driver is derived form the NetBSD changer driver.
Also, change some of the probe logic so that we do the right thing in the case of a failure to attach.
Fix a memory leak in chgetparams().
Add a couple of inline helper functions to scsi_all.h to correctly return the start of a mode page.
NetBSD PR: kern/6214 Reviewed by: gibbs
show more ...
|
#
76babe50 |
| 15-Sep-1998 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
SCSI Peripheral drivers for CAM:
da - Direct Access Devices (disks, optical devices, SS disks) cd - CDROM (or devices that can act like them, WORM, CD-RW, etc) ch - Medium Changer devices. sa -
SCSI Peripheral drivers for CAM:
da - Direct Access Devices (disks, optical devices, SS disks) cd - CDROM (or devices that can act like them, WORM, CD-RW, etc) ch - Medium Changer devices. sa - Sequential Access Devices (tape drives) pass - Application pass-thru driver targ - Target Mode "Processor Target" Emulator pt - Processor Target Devices (scanners, cpus, etc.)
Submitted by: The CAM Team
show more ...
|
#
83c5d981 |
| 28-Jan-2010 |
Alexander Motin <mav@FreeBSD.org> |
MFp4: Large set of CAM inprovements.
- Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many
MFp4: Large set of CAM inprovements.
- Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
show more ...
|
#
9199c09a |
| 06-Jan-2010 |
Warner Losh <imp@FreeBSD.org> |
Merge from head at r201628.
# This hasn't been tested, and there are at least three bad commits # that need to be backed out before the branch will be stable again.
|
#
d84c90a6 |
| 14-Nov-2009 |
Alexander Motin <mav@FreeBSD.org> |
MFp4: Fix several device freeze counting bugs.
|
#
874108ae |
| 12-Nov-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
MFC @199204
|
#
bbfa4aa1 |
| 23-Oct-2009 |
Alexander Motin <mav@FreeBSD.org> |
Replace most of priority numbers with defines. No logical changes.
|
#
11e9b8ba |
| 04-Aug-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC @196061
|
#
52c9ce25 |
| 10-Jul-2009 |
Scott Long <scottl@FreeBSD.org> |
Separate the parallel scsi knowledge out of the core of the XPT, and modularize it so that new transports can be created.
Add a transport for SATA
Add a periph+protocol layer for ATA
Add a driver
Separate the parallel scsi knowledge out of the core of the XPT, and modularize it so that new transports can be created.
Add a transport for SATA
Add a periph+protocol layer for ATA
Add a driver for AHCI-compliant hardware.
Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS.
The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers.
ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available.
This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options.
Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies.
The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged.
Submitted by: scottl, mav Approved by: re
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
5f3fed85 |
| 10-Jan-2009 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
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:
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
show more ...
|
Revision tags: release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
85d92640 |
| 16-May-2007 |
Scott Long <scottl@FreeBSD.org> |
Add a helper function for registering async callbacks. Besides eliminating a lot of duplicated code, this also fixes a locking edge case.
|
#
0dd50e9b |
| 14-May-2007 |
Scott Long <scottl@FreeBSD.org> |
Eliminate the use of M_TEMP.
|
#
2b83592f |
| 15-Apr-2007 |
Scott Long <scottl@FreeBSD.org> |
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 a
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.
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
f0d9af51 |
| 05-Dec-2006 |
Matt Jacob <mjacob@FreeBSD.org> |
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
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
#
b3b73720 |
| 26-Mar-2005 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix a place where we were referencing a pointer after it had been freed.
Submitted by: "Henry Miller" <hank@blackhole.com> MFC after: 3 days
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
898b0535 |
| 05-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
Start each of the license/copyright comments with /*-
|