| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Attempt to report a better error if sanitize is not supported
|
|
|
|
|
|
|
|
|
|
| |
devq_openings counter lost its meaning after allocation queues has gone.
held counter is still meaningful, but problematic to update due to separate
locking of CCB allocation and queuing.
To fix that replace devq_openings counter with allocated counter. held is
now calculated on request as difference between number of allocated, queued
and active CCBs.
|
|
|
|
|
|
|
|
| |
Fix character case in examples for "camcontrol security" - should be
"-U user" not "-u user".
PR: 193179
Submitted by: milios ccsys com
|
|
|
|
|
|
|
| |
Add persistent reservation support to camcontrol(8).
camcontrol(8) now supports a new 'persist' subcommand that allows users to
issue SCSI PERSISTENT RESERVE IN / OUT commands.
|
|
|
|
|
|
| |
Add information about supported NCQ functionality to camcontrol identify.
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
| |
Replace several instances of -1 with appropriate CAM_*_WILDCARD and types.
It was equal before r259397, but for good or bad, not any more for LUNs.
This change fixes at least CAM debugging.
|
|
|
|
|
|
|
| |
Add the '-b' flag to 'camcontrol devlist'. This prints only the existing
buses and their parent sims, useful for creating a sim->bus->device map.
Obtained from: Netflix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement extended LUN support. If PIM_EXTLUNS is set by a SIM, encode
the upper 32-bits of the LUN, if possible, into the target_lun field as
passed directly from the REPORT LUNs response. This allows extended LUN
support to work for all LUNs with zeros in the lower 32-bits, which covers
most addressing modes without breaking KBI. Behavior for drivers not
setting PIM_EXTLUNS is unchanged. No user-facing interfaces are modified.
Extended LUNs are stored with swizzled 16-bit word order so that, for
devices implementing LUN addressing (like SCSI-2), the numerical
representation of the LUN is identical with and without PIM_EXTLUNS. Thus
setting PIM_EXTLUNS keeps most behavior, and user-facing LUN IDs, unchanged.
This follows the strategy used in Solaris. A macro (CAM_EXTLUN_BYTE_SWIZZLE)
is provided to transform a lun_id_t into a uint64_t ordered for the wire.
This is the second part of work for full 64-bit extended LUN support and is
designed to a bridge for stable/10 to the final 64-bit LUN code. The
third and final part will involve widening lun_id_t to 64 bits and will
not be MFCed. This third part will break the KBI but will keep the KPI
unchanged so that all drivers that will care about this can be updated now
and not require code changes between HEAD and stable/10.
Reviewed by: scottl
|
|
|
|
|
|
|
| |
Fix mode page length calculation to remove last garbage line from the
`camcontrol mode daX -l` output.
Approved by: re (gjb)
|
|
|
|
|
|
|
| |
PR: bin/182703
Submitted by: Scott Burns <scott@bqinternet.com>
Approved by: re (gjb)
MFC after: 3 days
|
|
|
|
|
| |
Found by: Coverity Scan, CID 1016673, 1007118
Approved by: re
|
|
|
|
| |
- Minor language fixes.
|
|
|
|
| |
Requested by: joel
|
|
|
|
| |
Tested on Samsung SM1625 SSDs.
|
|
|
|
|
| |
Reviewed by: ken, mjacob (eariler version)
Sponsored by: Netapp
|
| |
|
|
|
|
|
| |
ATA since it ignored transport errors like command timeouts, while for SCSI
it was just wrong.
|
| |
|
|
|
|
|
|
| |
Wrong values there confuse some drivers.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an expander returns 0x00 (no device attached) in the ATTACHED DEVICE
field of the SMP DISCOVER response, ignore the value of ATTACHED SAS
ADDRESS, because it is invalid. Some expanders zero out the address
when the attached device is removed, but others do not. Section
9.4.3.10 of the SAS Protocol Layer 2 revision 04b does not require them
to do so.
Approved by: ken (mentor)
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
| |
Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
| |
We're only interested in the enumeration fields; we don't want to create
a variable to store them.
MFC after: 1 week
|
|
|
|
| |
here.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
disks such as SSD's
Adds the ability to run ATA commands via the SCSI ATA Pass-Through(16) comand
Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to adding `static' where possible:
- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
|
| |
|
|
|
|
|
|
|
|
|
| |
Initialize devlist.dev_queue tail queue early enough before its any
potential traversal in freebusdevlist() when in smpphylist error path.
Reported by: Pavel Polyakov <bsd kobyla org> (on irc)
Reviewed by: ken
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'error' variable to zero, to avoid returning garbage in several cases.
This fixes the following clang 3.2 warnings:
sbin/camcontrol/camcontrol.c:4634:8: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (amt_written == -1) {
^~~~~~~~~~~~~~~~~
sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
return (error);
^~~~~
sbin/camcontrol/camcontrol.c:4619:7: warning: variable 'error' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (fd_response == 0) {
^~~~~~~~~~~~~~~~
sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
return (error);
^~~~~
sbin/camcontrol/camcontrol.c:4617:6: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sbin/camcontrol/camcontrol.c:4656:10: note: uninitialized use occurs here
return (error);
^~~~~
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
defect information it has before grabbing the full defect list.
This works around a bug with some Hitachi drives that generate data overrun
errors when they are asked for more defect data than they have.
The change is done in a spec-compliant way, so it should have no negative
impact on drives that don't have this issue.
This is based on work originally done at Sandvine.
scsi_da.h: Add a define for the maximum amount of data that can be
contained in a defect list.
camcontrol.c: Update the readdefects() function to issue an initial
command to determine the length of the defect list, and
then use that length in the request for the full defect
list.
camcontrol.8: Add a note that some drives will report 0 defects available
if you don't request either the PLIST or GLIST.
Submitted by: Mark Johnston <markjdb@gmail.com> (original version)
MFC after: 3 days
|
|
|
|
|
| |
Submitted by: Garrett Cooper
Obtained from: Netflix, Inc.
|
|
|
|
|
|
|
|
|
|
| |
ATA/SATA transport. The detection logic is automatic, so it should Just
Work. While here, also improve the progress meter that is displayed
during firmware download.
Submitted by: Alistair Crooks
Obtained from: Netflix, Inc.
MFC after: 3 days
|
| |
|
|
|
|
| |
added at r208911.
|
|
|
|
|
|
|
| |
This allows to control it with `camcontrol negotiate adaX -T (en|dis)able`
on the fly, same as for SCSI devices.
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
| |
PR: bin/163053
Submitted by: Peter <pmc@citylink.dinoex.sub.org>
Approved by: cperciva
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
- Add low-level support for SATA Enclosure Management Bridge (SEMB)
devices -- SATA equivalents of the SCSI SES/SAF-TE devices.
- Add some utility functions for SCSI SAF-TE devices access.
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data changes.
cam_ccb.h: Add a new advanced information type, CDAI_TYPE_RCAPLONG,
for long read capacity data.
cam_xpt_internal.h:
Add a read capacity data pointer and length to struct cam_ed.
cam_xpt.c: Free the read capacity buffer when a device goes away.
While we're here, make sure we don't leak memory for other
malloced fields in struct cam_ed.
scsi_all.c: Update the scsi_read_capacity_16() to take a uint8_t * and
a length instead of just a pointer to the parameter data
structure. This will hopefully make this function somewhat
immune to future changes in the parameter data.
scsi_all.h: Add some extra bit definitions to struct
scsi_read_capacity_data_long, and bump up the structure
size to the full size specified by SBC-3.
Change the prototype for scsi_read_capacity_16().
scsi_da.c: Register changes in read capacity data with the transport
layer. This allows the transport layer to send out an
async notification to interested parties. Update the
dasetgeom() API.
Use scsi_extract_sense_len() instead of
scsi_extract_sense().
scsi_xpt.c: Add support for the new CDAI_TYPE_RCAPLONG advanced
information type.
Make sure we set the physpath pointer to NULL after freeing
it. This allows blindly freeing it in the struct cam_ed
destructor.
sys/param.h: Bump __FreeBSD_version from 1000005 to 1000006 to make it
easier for third party drivers to determine that the read
capacity data async notification is available.
camcontrol.c,
mptutil/mpt_cam.c:
Update these for the new scsi_read_capacity_16() argument
structure.
Sponsored by: Spectra Logic
|
|
|
|
|
|
|
|
|
| |
error: variable 'freq' set but not used
error: variable 'mode_pars' set but not used
Reviewed by: mav
Approved by: dim
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
not being literals.
MFC after: 1 week
|
|
|
|
|
| |
While there, make the vendor list const and add appropriate keywords to
functions that use this list.
|
|
|
|
|
| |
fwdownload.c is derived from Andre Albsmeier's fwdownload.c, which was
written from scratch but was inspired by Marc's original idea and code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Firmware can be reprogrammed on devices from Hitachi, HP, IBM, Plextor,
Quantum, and Seagate. At least one device from each manufacturer has
been tested with some version of this code, and it has been used to
update thousands of drives so far.
The man page suggests having a backup of the drive's data, and the
operation must be confirmed, either interactively or on the command
line. (This is the same as the confirmation on the format command.)
This work is largely derived from fwprog.c by Andre Albsmeier.
Submitted by: Nima Misaghian
Sponsored by: Sandvine Incorporated
MFC after: 3 months
|