| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Print req->index instead of printing the pointer itself to avoid kernel
pointer leakage.
PR: 238661
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Reviewed-by: imp
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*). Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys. Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight. Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*)
Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D27225
Notes:
svn path=/head/; revision=368124
|
|
|
|
| |
Notes:
svn path=/head/; revision=365202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace archaic "busses" with modern form "buses."
Intentionally excluded:
* Old/random drivers I didn't recognize
* Old hardware in general
* Use of "busses" in code as identifiers
No functional change.
http://grammarist.com/spelling/buses-busses/
PR: 216099
Reported by: bltsrc at mail.ru
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=312234
|
|
|
|
|
|
|
|
|
|
| |
VMWare and elsewhere) with the precision of a dull, rusty butter knife.
Reported by: tuexen
Obtained from: Netflix
Notes:
svn path=/head/; revision=308423
|
|
|
|
|
|
|
| |
Most affect comments, very few have user-visible effects.
Notes:
svn path=/head/; revision=298955
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
raw data to the doorbell offset in order to clarify the intent and for
avoiding unnecessarily converting the endianess back and forth.
Unfortunately, the same can't be done in mpt_recv_handshake_reply() as
16-bit data needs to be read using 32-bit bus accessors.
- In mpt_recv_handshake_reply(), get rid of a redundant variable.
MFC after: 1 fortnight
Notes:
svn path=/head/; revision=285840
|
|
|
|
| |
Notes:
svn path=/head/; revision=274926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, any timeout value for which (timeout * hz) will overflow the
signed integer, will give weird results, since callout(9) routines will
convert negative values of ticks to '1'. For unsigned integer overflow we
will get sufficiently smaller timeout values than expected.
Switch from callout_reset, which requires conversion to int based ticks
to callout_reset_sbt to avoid this.
Also correct isci to correctly resolve ccb timeout.
This was based on the original work done by Eygene Ryabinkin
<rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid
the overlow.
Differential Revision: https://reviews.freebsd.org/D1157
Reviewed by: mav, davide
MFC after: 1 month
Sponsored by: Multiplay
Notes:
svn path=/head/; revision=274819
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=241874
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
be the same chip):
- The I/O port resource may not be available with these. However, given
that we actually only need this resource for some controllers that
require their firmware to be up- and downloaded (which excludes the
SAS1078{,DE}) just handle failure to allocate this resource gracefully
when possible. While at it, generally put non-fatal resource allocation
failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
gather elements of these controllers.
Tested by: Slawa Olhovchenkov
PR: 149220 (remaining part)
Notes:
svn path=/head/; revision=231518
|
|
|
|
| |
Notes:
svn path=/head/; revision=231228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
corresponding Linux driver uses. This allows mpt(4) to still recognize
all good SATA devices in presence of a defective one, which takes about
45 seconds.
In the long term we probably should implement the logic used by mpt2sas(4)
allowing IOC port initialization to complete at a later time.
Submitted by: Andrew Boyer
MFC after: 3 days
Notes:
svn path=/head/; revision=227001
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
and mpt_is_raid_volume().
- Fix some whitespace bugs.
Approved by: re (kib)
Notes:
svn path=/head/; revision=224493
|
|
|
|
|
|
|
| |
Submitted by: brucec
Notes:
svn path=/head/; revision=220945
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
coherent.
- Add some missing bus_dmamap_sync() calls. This includes putting such
calls before calling reply handlers instead of calling bus_dmamap_sync()
for the request queue from individual reply handlers as these handlers
generally read back updates by the controller.
Tested on amd64 and sparc64.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=219335
|
|
|
|
|
|
|
| |
Commit the rest of the devices.
Notes:
svn path=/head/; revision=217323
|
|
|
|
|
|
|
|
|
|
| |
the chain in which case it shouldn't be removed twice.
Reported by: Staale Kristoffersen
MFC after: 1 week
Notes:
svn path=/head/; revision=213105
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was missed in r209599.
Reported and tested by: Michael Moll
- Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are
used in mpt.c only.
Reviewed by: ken
MFC after: r209599
Notes:
svn path=/head/; revision=209960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mpt driver previously didn't report a 'maxio' size to CAM, and so the
da(4) driver limited I/O sizes to DFLTPHYS (64K) by default. The number
of scatter gather segments allowed, as reported to busdma, was
(128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages.
Change things around so that we wait until we've determined how many
segments the adapter can support before creating the busdma tag used for
buffers, so we can potentially support more S/G segments and therefore
larger I/O sizes.
Also, fix some things that were broken about the module unload path. It
still gets hung up inside CAM, though.
mpt.c: Move some busdma initialization calls in here, and call
them just after we've gotten the IOCFacts, and know how
many S/G segments this adapter can support.
mpt.h: Get rid of MPT_MAXPHYS, it is no longer used.
Add max_cam_seg_cnt, which is used to report our maximum
I/O size up to CAM.
mpt_cam.c: Use max_cam_seg_cnt to report our maximum I/O size to CAM.
Fix the locking in mpt_cam_detach().
mpt_pci.c: Pull some busdma initialization and teardown out and put
it in mpt.c. We now delay it until we know many scatter
gather segments the adapter can support, and therefore
how to setup our busdma tags.
mpt_raid.c: Make sure we wake up the right wait channel to get the
raid thread to wake up when we're trying to shut it down.
Reviewed by: gibbs, mjacob
MFC after: 2 weeks
Notes:
svn path=/head/; revision=209599
|
|
|
|
|
|
|
|
|
|
|
| |
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
Notes:
svn path=/head/; revision=207287
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the race where interrupt thread can complete the request for which
timeout has fired and while mpt_timeout has blocked on mpt_lock.
Do a best effort to keep 4.x ang Giant-locked configurartions
compiling still.
Reported by: ups
Reviewed by: scottl
Notes:
svn path=/head/; revision=198262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specifically SPI controllers now also work in big-endian
machines and some conversions relevant for FC and SAS
controllers as well as support for ILP32 machines which all
were omitted in previous attempts are now also implemented.
The IOCTL-interface is intentionally left (and where needed
actually changed) to be completely little-endian as otherwise
we would have to add conversion code for every possible
configuration page to mpt(4), which didn't seem the right
thing to do, neither did converting only half of the user-
interface to the native byte order.
This change was tested on amd64 (SAS+SPI), i386 (SAS) and
sparc64 (SAS+SPI). Due to lack of the necessary hardware
the target mode code is still left to be made endian-clean.
Reviewed by: scottl
MFC after: 1 month
Notes:
svn path=/head/; revision=186878
|
|
|
|
|
|
|
| |
adapters, apparently.
Notes:
svn path=/head/; revision=177881
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abstraction as the RAID and CAM modules, making it nearly impossible
for enough initialization to be done in time for the RAID module to
know whether to attach. On top of this, no reset was being done on
the controller on attach, in violation of the spec. Additionally,
the port enable step was being deferred to the end of the attach
process, long after it should have been done to ensure reliable
operation from the controller. Fix all of these with a few hacks
to force the "attach" and "enable" steps of the core module early
on, and ensure that a reset and port enable also happens early on.
In the future, the driver needs to be refactored to eliminate the
core module abstraction, clean up withe reset/enable steps, and
defer event messages until all of the modules are available to
recieve them.
Notes:
svn path=/head/; revision=177808
|
|
|
|
|
|
|
|
|
| |
it's been printing out scary messages about "Unhanded Event Notify Frame"
that are needlessly worrisome to users. Change this warning to only print
out at an elevated debugging level.
Notes:
svn path=/head/; revision=173303
|
|
|
|
| |
Notes:
svn path=/head/; revision=172568
|
|
|
|
|
|
|
|
|
|
| |
error recovery.
Approved by: re
Found by: kan
Notes:
svn path=/head/; revision=171842
|
|
|
|
| |
Notes:
svn path=/head/; revision=170276
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mpt.h:
Add support for reading extended configuration pages.
mpt_cam.c:
Do a top level topology scan on the SAS controller. If any SATA
device are discovered in this scan, send a passthrough FIS to set
the write cache. This is controllable through the following
tunable at boot:
hw.mpt.enable_sata_wc:
-1 = Do not configure, use the controller default
0 = Disable the write cache
1 = Enable the write cache
The default is -1. This tunable is just a hack and may be
deprecated in the future.
Turning on the write cache alleviates the write performance problems with
SATA that many people have observed. It is not recommend for those who
value data reliability! I cannot stress this strongly enough. However,
it is useful in certain circumstances, and it brings the performence in line
with what a generic SATA controller running under the FreeBSD ATA driver
provides (and the ATA driver has had the WC enabled by default for years).
Notes:
svn path=/head/; revision=170252
|
|
|
|
|
|
|
|
| |
Obtained from: 99% of the work done by Scott Long.
MFC after: 3 days
Notes:
svn path=/head/; revision=169293
|
|
|
|
|
|
|
| |
Some code to make diffs with RELENG_6 easier.
Notes:
svn path=/head/; revision=165814
|
|
|
|
|
|
|
| |
the ENDIAN defines are consistent between mpt.h and mpt.c.
Notes:
svn path=/head/; revision=164998
|
|
|
|
| |
Notes:
svn path=/head/; revision=164990
|
|
|
|
|
|
|
|
|
| |
Fix things to use the LSI-Logic Fusion Library mask and shift names for
offset and sync, no matter how awkward they are, in preference to just
plain numbers.
Notes:
svn path=/head/; revision=164837
|
|
|
|
|
|
|
|
| |
Submitted by: scottl
Reviewed by: mjacob
Notes:
svn path=/head/; revision=164315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is to able to be called after *all* attach and enable events are done.
We establish a SYSINIT hook to call this handler. The current usage for it
is to add scsi target resources *after* all enables are done. There seems
to be some dependencies between different halves of a dual-port with respect
to target mode.
Put in more meaningful event messages for some events- in particular
QUEUE FULL events so we can see what the queue depth was when the
IOC sent us this message.
MFC after: 1 week
Notes:
svn path=/head/; revision=162133
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mark it as timed out. Don't try and free the config
request for read_cfg_header that times out because
it's still active. Put in code for the config reply
handler that will then free up timed out requests.
Fix the FC_PRIMITIVE_SEND completion to not try
and free a command twice. Dunno how this possibly
could have been working for awhile.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=160396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
actually go write the config page. This fixes the long standing
problem about updating NVRAM on Fibre Channel cards and seems
so far to not break SPI config page writes.
Put back role setting into mpt. That is, you can set a desired role
for mpt as a hint. On the next reboot, it'll pick that up and redo
the NVRAM settings appropriately and warn you that this won't take
effect until the next reboot. This saves people the step of having
to find a BIOS utilities disk to set target and/or initiator role
for the MPT cards.
Notes:
svn path=/head/; revision=160290
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't enable/disable I/O space except for SAS adapters.
This fixes a problem with VMware 4.5 Workstation.
Fix an egregious bug introduced to target mode so it actually
will not panic when you first enable a lun.
Minor fixes:
Take more infor from port facts and configuration pages.
MFC after: 1 week
Notes:
svn path=/head/; revision=159919
|
|
|
|
|
|
|
|
|
|
|
| |
fixing speed negotiation.
Also fix the mpt_execute_req function to actually
match mpt_execute_req_a64. This may explain why
i386 users were having more grief.
Notes:
svn path=/head/; revision=159178
|
|
|
|
| |
Notes:
svn path=/head/; revision=159052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lost one set to a peninsula power failure last night. After
this, I can see both submembers and the raid volumes again,
but speed negotiation is still broken.
Add a mpt_raid_free_mem function to centralize the resource
reclaim and fixed a small memory leak.
Remove restriction on number of targets for systems with IM enabled-
you can have setups that have both IM volumes as well as other devices.
Fix target id selection for passthru and nonpastrhu cases.
Move complete command dumpt to MPT_PRT_DEBUG1 level so that just
setting debug level gets mostly informative albeit less verbose
dumping.
Notes:
svn path=/head/; revision=158982
|
|
|
|
|
|
|
| |
mpt_send_cmd and replace with a new debug function.
Notes:
svn path=/head/; revision=158932
|
|
|
|
|
|
|
|
| |
and watching a debounce followed by a timeout, I think
I'm forced to conclude that it was not a good idea.
Notes:
svn path=/head/; revision=157885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
+ Add boatloads of KASSERTs and *really* check out more locking
issues (to catch recursions when we actually go to real locking
in CAM soon). The KASSERTs also caught lots of other issues like
using commands that were put back on free lists, etc.
+ Target mode: role setting is derived directly from port capabilities.
There is no need to set a role any more. Some target mode resources
are allocated early on (ELS), but target command buffer allocation
is deferred until the first lun enable.
+ Fix some breakages I introduced with target mode in that some commands
are *repeating* commands. That is, the reply shows up but the command
isn't really done (we don't free it). We still need to take it off the
pending list because when we resubmit it, bad things then happen.
+ Fix more of the way that timed out commands and bus reset is done. The
actual TMF response code was being ignored.
+ For SPI, honor BIOS settings. This doesn't quite fix the problems we've
seen where we can't seem to (re)negotiate U320 on all drives but avoids
it instead by letting us honor the BIOS settings. I'm sure this is not
quite right and will have to change again soon.
Notes:
svn path=/head/; revision=157662
|
|
|
|
| |
Notes:
svn path=/head/; revision=157382
|