aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pms
Commit message (Collapse)AuthorAgeFilesLines
* pms(4): Stop checking for failures from malloc(M_WAITOK)Zhenlei Huang2024-09-301-34/+4
| | | | | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 4fb8a80a78aa65e0b30bd5a74373512c678841c9) (cherry picked from commit 025c4754941956e24830a9c3c6f5e2466b19a9e1)
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-2348-48/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in current: (cherry picked from commit 685dc743dc3b)
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/ Similar commit in current: (cherry picked from commit 71625ec9ad2a)
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-2374-74/+0
| | | | | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/ Similar commit in current: (cherry picked from commit 2ff63af9b88c)
* Adjust tdsaContext_t::NvmdResponseSet declaration to avoid clang 15 warningDimitry Andric2022-07-241-1/+1
| | | | | | | | | | | | | | | | | | | With clang 15, the following -Werror warnings are produced: In file included from sys/dev/pms/freebsd/driver/ini/src/agtiapi.c:70: sys/dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h:346:13: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] volatile NvmdResponseSet; ~~~~~~~~ ^ int The NvmdResponseSet member is effectively only used as a boolean in the pms(4) driver, so it could be a single bit. But to avoid changing the semantics at all in this unmaintained driver, simply declare it as a volatile int. MFC after: 3 days (cherry picked from commit 95204d7a6368990e216db0ad51ef3e6018aed27c)
* Fix some common typos in source code commentsGordon Bergling2021-08-194-4/+4
| | | | | | | - s/struture/structure/ - s/structre/structure/ (cherry picked from commit 17db4b52fb41aeabeb945c68c1b5edd4db4eac31)
* LinuxKPI: remove < 5.0 version supportBjoern A. Zeeb2021-07-181-2/+2
| | | | | | | | | | | | | | | We are not aware of any out-of-tree consumers anymore which would need KPI support for before Linux version 5. Update the two in-tree consumers to use the new KPI. This allows us to remove the extra version check and will also give access to {lower,upper}_32_bits() unconditionally. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky, rlibby, rstone X-MFC: to 13 only Differential Revision: https://reviews.freebsd.org/D29391 (cherry picked from commit 3b1ecc9fa1b57ca7a1c86661e9a323bc41c97ecc)
* pms(4): Limit maximum I/O size to 256KB instead of 1MB.Alexander Motin2021-04-232-2/+2
| | | | | | | | | | | | There is a weird limit of AGTIAPI_MAX_DMA_SEGS (128) S/G segments per I/O since the initial driver import. I don't know why it was added, can only guess some hardware limitation, but in worst case it means maximum I/O size of 508KB. Respect it to be safe, rounding to 256KB. MFC after: 1 week Sponsored by: iXsystems, Inc. (cherry picked from commit 3e347834200b5d91a33384e696793e4ac20a44d4)
* pms(4): Do not return CAM_REQ_CMP on errors.Alexander Motin2021-04-231-9/+11
| | | | | | | | | | It is a direct request for data corruptions, one report of which we have received. I am very surprised that only one. MFC after: 1 week Sponsored by: iXsystems, Inc. (cherry picked from commit 8434a65ce49bd6bc6779f0e57b0ce0f4bc46f48e)
* pms: handle maximum size IO with any alignmentRyan Libby2021-01-202-2/+3
| | | | | | | | | | Define the maximum numbers of segments to allow for non-page alignment at the beginning and end of a maxphys size transfer. Also set ccb_pathinq.maxio consistent with maxphys. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28043
* pms: quiet -Wunused-variableRyan Libby2021-01-201-1/+1
| | | | | Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27994
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove extraneous double ;s in sys/Ed Maste2020-03-307-11/+11
| | | | Notes: svn path=/head/; revision=359441
* Miscellaneous typo fixesEd Maste2020-02-071-2/+2
| | | | | | | | Submitted by: Gordon Bergling <gbergling_gmail.com> Differential Revision: https://reviews.freebsd.org/D23453 Notes: svn path=/head/; revision=357664
* Fix a scribbler in the PMS driver.David Bright2019-03-111-1/+3
| | | | | | | | | | | | | | | | The ESGL bit was left uninitialized when executing the REPORT LUNS ioctl. This could allow a zeroed data buffer to be treated as a scatter/gather list. The firmware would eventually walk past the end of the data buffer, potentially find what looked like a valid address/length pair, and write the result to semi-random memory. Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19398 Notes: svn path=/head/; revision=345009
* CID 1332000: Logically dead code in ↵David Bright2019-02-221-6/+0
| | | | | | | | | | | | | | | | | | sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c A pointer is first tested for NULL. If non-NULL, another pointer is set equal to the first. The second pointer is then checked for NULL and an error path taken if so. This second test and the associated path is dead code as the pointer value, having just been checked for NULL, cannot be NULL at this point. Remove the dead code. Reported by: Coverity Reviewed by: daniel.william.ryan_gmail.com, vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19165 Notes: svn path=/head/; revision=344473
* pms(4) should use bus_get_dma_tag() to get parent tag.Tycho Nightingale2019-02-081-1/+1
| | | | | | | | Reviewed by: imp Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=343912
* pms/freebsd: fix compiler warningsRyan Libby2017-10-213-27/+6
| | | | | | | | | | | | | - A number of unused variable warnings, - a missing prototype warning (actually a dead function), - and a potential use of an uninitialized variable. Reviewed by: pfg Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12683 Notes: svn path=/head/; revision=324811
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-203-6/+6
| | | | | | | | | | | Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Notes: svn path=/head/; revision=313982
* Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Notes: svn path=/head/; revision=311305
* Don't repeat the the word 'the'Eitan Adler2016-05-173-3/+3
| | | | | | | | | | (one manual change to fix grammar) Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix) Notes: svn path=/head/; revision=300050
* dev/pms: minor spelling fixes for the FreeBSD-specific part.Pedro F. Giffuni2016-05-044-11/+11
| | | | Notes: svn path=/head/; revision=299081
* sys: use our roundup2/rounddown2() macros when param.h is available.Pedro F. Giffuni2016-04-211-6/+5
| | | | | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted. Notes: svn path=/head/; revision=298433
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* ostiInitiatorIOCompleted(): wrong sizeof() argument.Pedro F. Giffuni2016-02-211-1/+1
| | | | | | | | Detected by: PVS Static Analysis CID: 1331601, 1331523 Notes: svn path=/head/; revision=295861
* Don't forget to check the vendor when probing. Also, there's no needWarner Losh2015-08-022-57/+33
| | | | | | | | | | | | to double check for if the card has probed before. In fact, there's no reason to single check either. Simplify the code as a result. $FreeBSD$ added to lxutil.c in a non-standard way to help keep the diffs with upstream to a minimum. Differential Revision: https://reviews.freebsd.org/D3263 Notes: svn path=/head/; revision=286208
* Disable debugging.Benno Rice2015-07-171-4/+4
| | | | | | | | Submitted by: Vasanthalakshmi Tharmarajan <Vasanthalakshmi.Tharmarajan@pmcs.com> Reviewed by: scottl Notes: svn path=/projects/pms/; revision=285659
* Driver 'pmspcv' added. Supports PMC-Sierra ↵Achim Leubner2015-07-07134-0/+377839
PM8001/8081/8088/8089/8074/8076/8077 SAS/SATA HBA Controllers. Notes: svn path=/projects/pms/; revision=285242