summaryrefslogtreecommitdiffstats
path: root/sbin/camcontrol
Commit message (Collapse)AuthorAgeFilesLines
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-2/+0
| | | | Submitted by: Ulrich Spörlein
* Fethch more information from IDENTIFY result.mav2009-09-271-15/+48
|
* MFp4:mav2009-09-221-12/+11
| | | | Reduce code duplication.
* Add to `camcontrol cmd` support for sending arbitrary ATA commands.mav2009-09-042-52/+141
| | | | | | It could be used for broad range of tasks, such as configuring drive power management modes, caching, security and any other features and tasks, not supported by existing drivers.
* Short ATA command format has 28bit address, not 36bit.mav2009-08-301-2/+2
| | | | | | Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy. MFC after: 2 days
* MFp4:mav2009-08-301-27/+120
| | | | | | | - Tune protocol version reporting, - Add supported DMA/PIO modes reporting. - Fix IDENTIFY for ATAPI devices. - Remove confusing "-" for NCQ status.
* Fix alignment issue with ATA IDENTIFY structure.scottl2009-07-101-11/+11
| | | | Approved by: re
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-102-6/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add SCSI READ CAPACITY support to camcontrol. The new 'readcap' subcommandken2007-09-083-5/+283
| | | | | | | | | | | | will automatically issue the 16 byte verison of read capacity if the device in question is larger than 2TB. There are also a number of output options here (last block, number of blocks, human readable) that should meet most needs, and also aid in scripting. Approved by: re (bmah) MFC after: 1 week
* typo: s/tranport layer/transport layer/wilko2007-01-281-2/+2
| | | | MFC after: 1 week
* It's confusing to say that "Command Queueing Supported" just basedmjacob2006-12-031-3/+2
| | | | | upon the scsi flag validity field. Instead, just say "Command Queueing Enabled" when it is- otherwise remain mute.
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-93/+143
| | | | | | as the default. Reviewed by multitudes.
* Markup fixes.ru2006-09-181-2/+2
|
* Implement 'camcontrol reportluns'. This allows users to send the SCSIken2006-08-212-2/+300
| | | | | | | | | | | | | | | | | | 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
* Markup fixes.ru2005-06-141-1/+1
| | | | Approved by: re (blanket)
* Add "report only" functionality to 'camcontrol format', so users can get aken2005-03-262-5/+20
| | | | | | | | | | report on the status of a format already running on a drive. Fix status reporting for 'camcontrol format'. This was broken in rev 1.34 of camcontrol.c, almost 4 years ago! Submitted by: joerg (most of the reportonly changes) MFC after: 3 days
* Expand *n't contractions.ru2005-02-131-12/+12
|
* Deal with double whitespace.ru2004-07-031-2/+2
|
* Mechanically kill hard sentence breaks.ru2004-07-021-100/+197
|
* Use WARNS?=3 for these in the arm case for now, due to toolchain issues.cognet2004-05-141-0/+4
|
* Fix a couple of camcontrol issues that popped up on sparc64:ken2004-03-031-2/+12
| | | | | | | | | | | | - bzero the CCB header in getdevtree() and set the path properly, to avoid having random garbage in the CCB header. - if the lun isn't specified in a device specifier, it should default to 0, not whatever random data happens to be in the lun variable. - move the prototype for getdevtree() out from under #ifndef MINIMALISTIC, since it is used in both cases. Submitted by: Marius Strobl <marius@alchemy.franken.de> (mostly) MFC After: 2 weeks
* Userland signed char fixes for PPC build. Problems were using a chargrehan2004-01-221-4/+6
| | | | | | | | | return for getopt() and comparing to -1, ditto with fgetc() and EOF, and using the kg_nice value from <sys/user.h> Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Reviewed by: obrien, bde (a while back) Tested lightly on: ppc, i386, make universe
* Fix alignment of the trailing \imp2003-08-221-1/+1
|
* Make this WARNS=6 clean by:johan2003-08-054-41/+41
| | | | | | | | | | | | | | | | | | | | 1: add 'const' to char * where needed; 2: mark unused variables with __unused; 3: remove double prototypes for mode_edit and mode_list. 4: moves the global variables 'bus', 'target', and 'lun' into the main function and protect them with #ifndef MINIMALISTIC, 5: renames 3 variable in order not to shadow other things index -> indx -- in modepage_dump since index is a function from <strings.h.> arglist -> arglst -- in the function parse_btl since arglist is also a global variable convertend -> convertend2 -- in the function editentry_set since that name is used two times within the function. 6: cast 0xffffffff in the macro RESOLUTION_MAX(size) to (int) since it is unsigned otherwise. Tested by: make universe Approved by: ken
* Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcamken2003-06-141-2/+0
| | | | | | | | and libdevstat, since the new way of doing things is to just list maintainership in src/MAINTAINERS. Also, remove duplicate entries in src/MAINTAINERS for those utilities. I already had entries for them.
* Set WARNS=1. RESOLUTION_MAX macro has major signed/unsigned issues.obrien2003-05-021-0/+1
|
* Use __FBSDID.obrien2003-05-023-10/+7
|
* Fixed (soon might be fatal) -Wformat warnings.ru2003-03-151-3/+3
|
* Make camcontrol WARNS=2 clean.johan2003-02-204-7/+12
| | | | Approved by: ken
* Add PERIPH and XPT debug options to camcontrol. This makes all CAM debugnjl2002-12-172-4/+22
| | | | | | | options tunable from userland. Approved by: ken MFC after: 3 days
* Split cam_argmask and move "commands" into cam_cmdmask. This addressesmdodd2002-09-081-94/+102
| | | | | | | the issue of not having any free bits left for additional commands. Approved by: ken MFC after: 4 weeks
* Add 'camcontrol load' as a complement to 'camcontrol eject'.mdodd2002-09-062-1/+11
| | | | | Approved by: ken MFC after: 4 weeks
* Take care of WARNS=3 warnings by using unsigned/signed variablejohan2002-08-201-6/+7
| | | | | | as needed. Approved by: ken, sheldonh (mentor)
* Remove unused variable. camcontrol is now WARNS=2 clean on i386.johan2002-08-181-1/+0
| | | | Approved by: ken, sheldonh (mentor)
* The .Nm utilitycharnier2002-07-061-6/+17
|
* Fix syntax errors (labels with no statement).wollman2002-05-301-4/+4
|
* Fix a bzero length calculation. sizeof(struct ccb_getdev) should have beenken2002-04-011-1/+1
| | | | | | sizeof(struct ccb_getdevstats). MFC after: 3 days
* Remove 'register' keyword.obrien2002-03-202-2/+2
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Correct an out of date device node name. We do not have /dev/rsd0.ctlmaxim2002-02-112-2/+2
| | | | | | | | | nowadays. Spotted by: Sergey Osokin <osa@freebsd.org.ru> Reviewed by: ken, ru Approved by: ken, ru MFC after: 1 week
* Style.ru2002-01-241-11/+8
| | | | Approved by: ken
* By popular demand, also include the "devlist" subcommand into the setjoerg2002-01-181-1/+7
| | | | | | of commands available in the boot floppy environment. MFC after: 1 week
* Well, RELEASE_BUILD_FIXIT has now been renamed into RELEASE_CRUNCH.joerg2002-01-181-2/+2
| | | | | At least, the old version is still good for the MFC though (where everything is still going the old way). ;-)
* Add 'camcontrol rescan all' and 'camcontrol reset all' functionality token2002-01-182-46/+185
| | | | | | | | | | | | | | | camcontrol. This enables rescanning all busses or resetting all busses in a system. The current implementation is not the ideal way to do it -- the ideal way to do it would be for the transport layer to handle wildcarded busses on bus rescan and reset operations. The current implementation enumerates all the busses and sends a rescan or reset CCB individually. Handling this behavior in the transport layer will happen later. Reviewed by: imp Tested by: joerg MFC after: 1 week
* Provide an option to make camcontrol `minimalistic': if the (env/make)joerg2002-01-172-1/+37
| | | | | | | | | variable RELEASE_BUILD_FIXIT is defined, a camcontrol binary will be built that only knows the "rescan" and "reset" subcommands. The resulting code is small enough to still fit onto the boot floppy. Reviewed by: ken MFC after: 1 week
* Fix breakage in 'camcontrol defects' introduced in rev 1.34 (the new errorken2001-12-051-2/+2
| | | | | | | | | | recovery code) back in March, 2001. In effect, this brain-o would cause 'camcontrol defects' to always return an error. Pointed out by: joerg Tested by: mdodd
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* mdoc(7) police: replace `\*(Ba' with a simple `|', it's handled specially.ru2001-08-161-1/+1
|
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-1/+3
|
* mdoc(7) police:ru2001-08-071-1/+1
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. Thesheldonh2001-07-261-1/+1
| | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
OpenPOWER on IntegriCloud