| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and
allow mrsas(4) from LSI to attach to newer LSI cards that are support by
mrsas(4). If mrsas(4) is not loaded into the system at boot then mfi(4)
will always attach. If a modified mrsas(4) is loaded in the system. That
modification is return "-30" in it's probe since that is between
BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY.
This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident
that denotes cards that should work with mrsas(4). New entries that should
have this option.
This is the first step to get mrsas(4) checked into FreeBSD and to avoid
collision with people that use mrsas(4) from LSI. Since mfi(4) takes
priority, then mrsas(4) users need to rebuild GENERIC. Using the
.disabled="1" method doesn't work since that blocks attaching and the
probe gave it to mfi(4).
MFC r267451 (by delphij):
Correct variable for loader tunable variable hw.mfi.mrsas_enable.
Notes:
svn path=/stable/9/; revision=270733
|
| |
|
|
|
|
|
|
|
|
|
| |
Add support for MegaRAID Fury cards. The main change needed to boot from a
9341-4i controller was to ensure that scatter/gather lists are ended with
an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use
this marker with Invader cards as well, so we do the same thing, though
it is apparently not strictly necessary.
Notes:
svn path=/stable/9/; revision=262968
|
| |
|
|
|
|
|
|
| |
Add PCI device ID for MegaRAID Invader cards. This was the only
change needed to make it work on my card.
Notes:
svn path=/stable/9/; revision=256924
|
| |
|
|
|
|
|
|
|
| |
Hold mfi_io_lock across calls to xpt_rescan() and xpt_alloc_ccb_nowait().
xpt_rescan() expects the SIM lock to be held, and we trip a mtx_assert if
the driver initiates multiple rescans in quick succession.
Notes:
svn path=/stable/9/; revision=255740
|
| |
|
|
| |
Notes:
svn path=/stable/9/; revision=255479
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR. Thus, the bit is no longer
a reliable indication of capability, and should not be checked. This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.
This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.
Candidate for 9.2
Submitted by: jhb
Reviewed by: jfv, marius, adrian, achim
Notes:
svn path=/stable/9/; revision=254306
|
| |
|
|
|
|
|
|
|
| |
Implement foreign device handling.
PR: kern/172091
Notes:
svn path=/stable/9/; revision=253244
|
| |
|
|
|
|
|
|
|
|
|
| |
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning. NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph". If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.
Notes:
svn path=/stable/9/; revision=253037
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add support for SCSI pass through devices to be attached and detached.
MFC r251172 (sbruno):
xpt_create_path() requires mfi_io_lock to be held, so do it.
mfi(4) doesn't panic on host startup now.
Notes:
svn path=/stable/9/; revision=252643
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove forced timeout of in-flight commands from mfi_timeout.
While this prevents commands getting stuck forever there is no way to guarantee
that data from the command hasn't been committed to the device.
In addition older mfi firmware has a bug that would cause the controller to
frequently stall IO for over our timeout value, which when combined with
a forced timeout often resulted in panics in UFS; which would otherwise be
avoided when the command eventually completed if left alone.
For reference this timeout issue is resolved in Dell FW package 21.2.1-0000.
Fixed FW package version for none Dell controller will likely vary.
Notes:
svn path=/stable/9/; revision=252554
|
| |
|
|
|
|
|
| |
because it fixes r250496, i.e., MFC of r247369 to stable/9.
Notes:
svn path=/stable/9/; revision=252038
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have been in production at Netflix for several months with significant
success.
MFC r246713:
Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c. It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code. The MD busdma is then given a chance to do any final processing
in the complete() callback.
MFC r249538:
Some compilers issue a warning when wider integer is casted to narrow
pointer. Supposedly shut down the warning by casting through
uintptr_t.
MFC r251479:
Simplify the checking of flags for cam_periph_mapmem(). This gets rid of
a lot of code redundancy and grossness at very minor expense.
MFC r251837:
MFC r251842:
Add infrastructure for doing compatibility shims, as has been sorely
needed for the last 10 years. Far too much of the internal API is
exposed, and every small adjustment causes applications to stop working.
To kick this off, bump the API version to 0x17 as should have been done
with r246713, but add shims to compensate. Thanks to the shims, there
should be no visible change in application behavior.
Submitted by: kib, jeffr
Approved by: kib
Obtained from: Netflix
Notes:
svn path=/stable/9/; revision=251874
|
| |
|
|
|
|
|
| |
Add hw.mfi.cmd_timeout loader / sysctl tuneable.
Notes:
svn path=/stable/9/; revision=251406
|
| |
|
|
|
|
|
|
|
|
| |
MFC r247367 Fix non-recusive mutex MFI I/O lock
MFC r247369 Fix a large amount of bugs in MFI that cause panics
Approved by: pjd (mentor)
Notes:
svn path=/stable/9/; revision=250496
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.
MFC r249258:
Switch to a 2-clause license.
Notes:
svn path=/stable/9/; revision=250482
|
| |
|
|
|
|
|
|
|
|
| |
Don't attempt to reference sc before testing whether it's NULL.
Submitted by: Sascha Wildner
Obtained from: DragonFly
Notes:
svn path=/stable/9/; revision=249290
|
| |
|
|
|
|
|
|
|
|
| |
Fix a typo in mfi_stp_cmd() that would give wrong assignment.
Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev 0dc98fff2206d7bb78ce5e07ac34d6954e4bd96a
Notes:
svn path=/stable/9/; revision=247828
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Extend the prior commit to use the generic SCSI command building
function use that for JBOD and Thunderbolt disk write command. Now
we only have one implementation in mfi.
- Fix dumping on Thunderbolt cards. Polled IO commands do not seem to
be normally acknowledged by changing cmd_status to MFI_STAT_OK.
In order to get acknowledgement of the IO is complete, the Thunderbolt
command queue needs to be run through. I added a flag MFI_CMD_SCSI
to indicate this command is being polled and to complete the
Thunderbolt wrapper and indicate the result. This flag needs to be
set in the JBOD case in case if that us using Thunderbolt card.
When in the polling loop check for completed commands.
- Remove mfi_tbolt_is_ldio and just do the check when needed.
- Fix an issue when attaching of disk device happens when a device is
already scheduled to be attached but hasn't attached.
- add a tunable to allow raw disk attachment to CAM via:
hw.mfi.allow_cam_disk_passthrough=1
- fixup aborting of commands (AEN and LD state change). Use a generic
abort function and only wait the command being aborted not both.
Thunderbolt cards don't seem to abort commands so the abort times
out.
Notes:
svn path=/stable/9/; revision=243824
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI
command properly. Without this change, mfi(4) always sends 10 byte READ
and WRITE commands, which will cause data corruption when device is
larger than 2^32 sectors.
PR: kern/173291
Submitted by: Steven Hartland <steven.hartland multiplay.co.uk>
Reviewed by: mav
Notes:
svn path=/stable/9/; revision=243823
|
| |
|
|
|
|
|
|
|
|
| |
Add deviceid to the disk output on boot to help debugging.
PR: kern/173290
Approved by: cperciva (implicit)
Notes:
svn path=/stable/9/; revision=243697
|
| |
|
|
|
|
|
|
| |
Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORT
request on behalf of a user utility.
Notes:
svn path=/stable/9/; revision=241324
|
| |
|
|
|
|
|
|
|
|
|
| |
When an MFI command fails, the driver needs to set bio->bio_resid so that
the upper levels notice. Otherwise we see commands silently failing leading
to data corruption. This mirrors dadone()
Submitted by: Andrew Boyer aboyer@averesystems.com
Notes:
svn path=/stable/9/; revision=240873
|
| |
|
|
|
|
|
|
|
| |
sys/dev/mfivar.h contains references to MFI_DEBUG, but it never gets turned on unless the file also includes opt_mfi.h.
Submitted by: Andrew Boyer aboyer@averesystems.com
Notes:
svn path=/stable/9/; revision=240867
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer
is treated as the buffer length. mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map. Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user. For now
it fails any user attempts to use a buffer larger than 1MB.
While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.
Notes:
svn path=/stable/9/; revision=239866
|
| |
|
|
|
|
|
|
|
| |
Correct sizeof usage
Obtained from: DragonFly
Notes:
svn path=/stable/9/; revision=238013
|
| |
|
|
|
|
|
|
| |
Cosmetic nit. If a configured volume has no label, don't emit an empty
string for the name during probe. Simply indicate that it has no label.
Notes:
svn path=/stable/9/; revision=236719
|
| |
|
|
|
|
|
| |
Fix and update battery status bits according to linux driver
Notes:
svn path=/stable/9/; revision=235738
|
| |
|
|
|
|
|
|
|
| |
Fix inappropriate data type for two bus_dmamap_t variables that were causing
PAE to insta-panic on startup. Remove one unused variable that was
commented out.
Notes:
svn path=/stable/9/; revision=235525
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
based cards.
MFC r235016: Some style improvements.
MFC r235040: Fix the returns in mfi_tbolt_sync_map_info that I added.
PR: 167226
Notes:
svn path=/stable/9/; revision=235135
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major update to driver to support for Drake Skinny and ThunderBolt cards.
MFC r233768:
Change typedef atomic_t to struct mfi_atomic to avoid name space
collision and some couple more style changes.
MFC r233805:
Move struct megasas_sge from mfi_ioctl.h to mfivar.h so we can
remove including machine/bus.h. Add some more mfi_ prefixes to
avoid name space pollution.
MFC r233877:
- Do not include machine/atomic.h. It is no longer necessary since r233768.
- Remove bogus "atomic" macros and a read-only variable from softc.
Notes:
svn path=/stable/9/; revision=234429
|
| |
|
|
| |
Notes:
svn path=/stable/9/; revision=233024
|
| |
|
|
| |
Notes:
svn path=/stable/9/; revision=229661
|
| |
|
|
|
|
|
|
|
|
| |
Add single-message MSI support to mfi(4). It is disabled by default but
can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also
support MSI-X, but in testing it seems that many adapters do not work with
MSI-X but do work with MSI.
Notes:
svn path=/stable/9/; revision=229611
|
| |
|
|
|
|
|
|
|
| |
Use DEVMETHOD_END to mark end of device methods.
Remove superfluous device methods.
Add some missing __FBSBID() macros.
Notes:
svn path=/stable/9/; revision=229093
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do a dummy read to flush the interrupt ACK that we just performed,
ensuring that everything is really, truly consistent.
This fixes certain cases where one will see various:
mfi0: COMMAND 0xffffffXXXXXXXXXX TIMEOUT AFTER XX SECONDS
Submitted by: scottl
Ok'ed by: jhb
Approved by: re (kib)
Notes:
svn path=/stable/9/; revision=227533
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix an implicit dependency between the MFI driver and CAM that had grown due
to an API change in CAM. It's once again possible to link a static kernel
with 'mfi' without requiring 'scbus' as well. Ditto for KLD loading.
Approved by: re (bz)
Notes:
svn path=/stable/9/; revision=227117
|
| |
|
|
|
|
|
|
|
|
| |
Set the sense residual properly.
Reviewed by: ken
Approved by: re (kib)
Notes:
svn path=/stable/9/; revision=226910
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add special support for the MFI_CMD ioctl with MFI_CMD_STP command,
used by present MegaCLI version. It has some special meaning for the
first s/g list entry, while the main s/g list begins from the the second
entry, and those lists should remain separate after loading to the
busdma map.
- Fix bug in 32bit ioctl compatibility shims when s/g list consists of
more then on element.
Approved by: re (kib)
Notes:
svn path=/stable/9/; revision=225918
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.
Reviewed by: rwatson
Approved by: re (bz)
Notes:
svn path=/head/; revision=225617
|
| |
|
|
|
|
|
|
|
|
|
| |
casting the input argument again, making the code more readable.
Reviewed by: jhb
MFC after: 2 weeks
Approved by: re (kib)
Notes:
svn path=/head/; revision=225428
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel for FreeBSD 9.0:
Add a new capability mask argument to fget(9) and friends, allowing system
call code to declare what capabilities are required when an integer file
descriptor is converted into an in-kernel struct file *. With options
CAPABILITIES compiled into the kernel, this enforces capability
protection; without, this change is effectively a no-op.
Some cases require special handling, such as mmap(2), which must preserve
information about the maximum rights at the time of mapping in the memory
map so that they can later be enforced in mprotect(2) -- this is done by
narrowing the rights in the existing max_protection field used for similar
purposes with file permissions.
In namei(9), we assert that the code is not reached from within capability
mode, as we're not yet ready to enforce namespace capabilities there.
This will follow in a later commit.
Update two capability names: CAP_EVENT and CAP_KEVENT become
CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they
represent.
Approved by: re (bz)
Submitted by: jonathan
Sponsored by: Google Inc
Notes:
svn path=/head/; revision=224778
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the firmware so that it boots.
PR: kern/154978
Submitted by: Andrew Boyer aboyer of averesystems com
Obtained from: LSI
MFC after: 1 week
Notes:
svn path=/head/; revision=224041
|
| |
|
|
|
|
|
|
|
|
|
| |
numbers in a few places.
PR: bin/145960
Submitted by: gcooper
MFC after: 1 week
Notes:
svn path=/head/; revision=224039
|
| |
|
|
| |
Notes:
svn path=/head/; revision=223624
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These cause problems when trying to include the header in a C++ project.
Rename them to 'evt_class', and track the change in mfi and mfiutil.
Submitted by: Mark Johnston
Sponsored by: Sandvine Incorporated
Reviewed by: jhb@
MFC after: 1 week
Notes:
svn path=/head/; revision=222589
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
preserve the upper bits of the first data byte.
While here, shorten a few nearby lines.
PR: kern/152768
Reported by: Sascha Wildner saw of online.de
Reviewed by: scottl
MFC after: 1 week
Notes:
svn path=/head/; revision=216235
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: jhb
Approved by: avg (mentor)
MFC after: 1 week
Notes:
svn path=/head/; revision=214130
|
| |
|
|
|
|
|
|
|
|
| |
module when mfi is a module itself.
Reviewed by: jhb, scottl
MFC after: 1 week
Notes:
svn path=/head/; revision=204590
|
| |
|
|
|
|
|
|
| |
Pointed out by: jhb
Pointy hat: jkim
Notes:
svn path=/head/; revision=200238
|
| |
|
|
| |
Notes:
svn path=/head/; revision=200231
|