History log of /freebsd-head/sys/dev/hpt27xx/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2502979f0dbceaabdec42fb5b7fb2ddb4cfc362f 26-Nov-2019 scottl <scottl@FreeBSD.org> Revert r355021. In my haste to grep for Giant, I missed that it was in
conditional ifdefs for this driver. We will consider removing those ifdefs
in the future.

Reported by: imp
pt27xx_osm_bsd.c
ed06040fa5c71b32c676d4b215485ea07c645f39 22-Nov-2019 scottl <scottl@FreeBSD.org> Mark hpt27xx for removal in 13.0; all CAM drivers will be Giant-free by then.

Relnotes: yes
pt27xx_osm_bsd.c
503a0e4ebc7eeb010583328795439d1e3a502206 02-Jan-2018 emaste <emaste@FreeBSD.org> hpt27xx: plug info leak in hpt_ioctl

The hpt27xx ioctl handler allocates a buffer without M_ZERO and calls
hpt_do_ioctl(), which might not overwrite the entire buffer.

Also zero bytesReturned in case it is not written by hpt_do_ioctl().

The hpt27xx device has permissions only for root so this is not urgent,
and the fix can be MFCd and considered for a future EN.

Reported by: Ilja van Sprundel <ivansprundel@ioactive.com>
Submitted by: Domagoj Stolfa <domagoj.stolfa@gmail.com> (M_ZERO)
Reviewed by: jhb, kib
MFC after: 3 days
Security: info leak in root-only ioctl
Sponsored by: The FreeBSD Foundation
pt27xx_osm_bsd.c
1537078d8f2e62e82de3c08bdcae0fd79dc35a4a 27-Nov-2017 pfg <pfg@FreeBSD.org> sys/dev: further adoption of SPDX licensing ID tags.

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.
rray.h
im.h
imfuncs.h
pt27xx_config.c
pt27xx_config.h
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
ptintf.h
dm.h
ist.h
s_bsd.h
sm.h
j.h
447339e7f852f81d731f268fb69ef32e9267cab1 04-Nov-2017 delphij <delphij@FreeBSD.org> Avoid calling get_controller_count() until attaching, this would avoid
costly PCI config space operations that slows down systems without the
hardware.

Many thanks to HighPoint for continued support of FreeBSD!

Submitted by: Steve Chang
Reported by: cperciva
MFC after: 2 weeks
pt27xx_config.c
pt27xx_osm_bsd.c
348dce9666cf56bfcf3cd38f08391cb3c29f2e47 10-Feb-2017 pfg <pfg@FreeBSD.org> Clean redundant MIN/MAX declarations in some HighPoint drivers.

The hpt27xx(4), hptnr(4), and hptrr(4) drivers declare MIN() and MAX()
internally which match the macros from sys/param.h.

MIN() is not used, MAX is only used once and can be replaced with the
max() version in libkern.h which operates on u_ints.

MFC after: 2 weeks
pt27xx_osm_bsd.c
dm.h
2d89a50f96f54f0f3d4408dc71f81cc51258125c 04-Jan-2017 asomers <asomers@FreeBSD.org> Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)

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
pt27xx_osm_bsd.c
a299546def9ced6d3125373164a42978f6f56f5b 27-Feb-2016 jhibbits <jhibbits@FreeBSD.org> Replace several bus_alloc_resource() calls with bus_alloc_resource_any()

Most of these are BARs, and we allocate them in their entirety. The one outlier
in this is amdsbwd, which calls bus_set_resource() prior.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D5370 (partial)
pt27xx_os_bsd.c
fbc9874dd0eedf00e9d1c958c8839e995c43ecbd 19-Feb-2016 jhibbits <jhibbits@FreeBSD.org> Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any()

Since these calls only use default arguments, bus_alloc_resource_any() is the
right call.

Differential Revision: https://reviews.freebsd.org/D5306
pt27xx_osm_bsd.c
7d3cf54aed6e1c5ed5a8e0b7a91efbbbec51a994 23-Jun-2015 delphij <delphij@FreeBSD.org> Update vendor driver to 1.2.7. This update improves driver reliability and
adds support of 4Kn drives and report LUNs command.

This driver update is intended for 10.2-RELEASE.

Many thanks to HighPoint for providing this driver update.

Submitted by: Steve Chang
MFC after: 3 days
EADME
md64-elf.hpt27xx_lib.o.uu
rray.h
im.h
imfuncs.h
pt27xx_config.c
pt27xx_config.h
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
ptintf.h
386-elf.hpt27xx_lib.o.uu
dm.h
ist.h
s_bsd.h
sm.h
dd63bf99a2e07e9e0fae2c230c2dc6505f21618d 21-Nov-2014 smh <smh@FreeBSD.org> Prevent overflow issues in timeout processing

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
pt27xx_os_bsd.c
a38487921105e77eb8388ea7571b9c39d4cb7b82 05-Aug-2014 jhb <jhb@FreeBSD.org> Remove compat shims for FreeBSD versions older than 8.0.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
s_bsd.h
618eff653b66b336a76812e537d15526269785ad 12-Jun-2014 jhb <jhb@FreeBSD.org> Remove some Giant unlocks I missed in r267290.
pt27xx_osm_bsd.c
941bee44fccb1cf457ce8cd5ca79747b2caa8c87 11-Jun-2014 delphij <delphij@FreeBSD.org> Apply vendor fixes to the High Point drivers:

- Don't call xpt_free_path() in os_query_remove_device() and
always return TRUE.
- Update os_buildsgl() to support build logical SG table which
will be used by lower RAID module.
- Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target
missing.

Many thanks to HighPoint for providing this driver update.

Submitted by: Steve Chang
Reviewed by: mav
MFC after: 3 days
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
60d32b5d2dd5ce26647c12a5976766258c3dc2ba 09-Jun-2014 jhb <jhb@FreeBSD.org> Make the hpt27xx(4) driver MPSAFE.
- Use the existing vbus locks instead of Giant for the CAM sim lock.
- Use callout(9) instead of timeout(9).
- Mark the interrupt handler as MPSAFE.
- Don't attempt to pass data in the softc from probe() to attach().

Reviewed by: Steve Chang <ychang@highpoint-tech.com>
Assisted by: delphij
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
s_bsd.h
f2c6083361c4294d799d06af01a15232d0ddf795 03-Jun-2014 delphij <delphij@FreeBSD.org> Don't leak Giant.

Noticed by: Sascha Wildner (DragonFlyBSD) via IRC
Reviewed by: mav
MFC after: 3 days
pt27xx_osm_bsd.c
e9cc92746f45b2e0ad6e2997f3128b950e702770 25-Sep-2013 scottl <scottl@FreeBSD.org> Re-do r255853. Along with adding back the API/ABI changes from the
original, this hides the contents of cam_compat.h from ktrace/kdump/truss,
avoiding problems there. There are no user-servicable parts in there, so
no need for those tools to be groping around in there.

Approved by: re
pt27xx_osm_bsd.c
s_bsd.h
d965f28ba1171a60f27bd8b0e21de9412e2640f2 25-Sep-2013 gjb <gjb@FreeBSD.org> Revert r255853 pending fixes to build errors in usr.bin/kdump

Approved by: re (implicit)
pt27xx_osm_bsd.c
s_bsd.h
108b7070e7a17abc52f44f333ba095f8f0eafc3a 24-Sep-2013 scottl <scottl@FreeBSD.org> Update the CAM API for FreeBSD 10:

- Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0;
MPSAFE drivers should be managing their own timeout storage. The
remaining non-MPSAFE drivers have been modified to also manage their own
storage, and should be considered for updating to MPSAFE (or removal)
during the FreeBSD 10.x lifecycle.

- Add fields related to soft timeouts and quality of service, to be used
in upcoming work.

- Add room for more flags in the CCB header and path_inq structures.

- Begin support for extended 64-bit LUNs.

- Bump the CAM version number to 0x18, but add compat shims. Tested with
camcontrol and smartctl.

Reviewed by: nathanw, ken, kib
Approved by: re
Obtained from: Netflix
pt27xx_osm_bsd.c
s_bsd.h
6965cdad6639b93d4b619f8e095c037377cd0d66 06-Sep-2013 delphij <delphij@FreeBSD.org> Return BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC.

This change is a 9.2-RELEASE candidate.

Approved by: HighPoint Technologies
pt27xx_osm_bsd.c
15305ee17a52c5aff766233b5bd90835275f3f61 06-Jul-2013 delphij <delphij@FreeBSD.org> Import HighPoint DC Series Data Center HBA (DC7280 and R750) driver.
This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after: 1 day
pt27xx_os_bsd.c
pt27xx_osm_bsd.c
s_bsd.c
sm_bsd.c
a9fa8698ffd1caaec1b00c94dbabca108bcf2239 05-Jul-2013 delphij <delphij@FreeBSD.org> Update hpt27xx(4) driver to address a problem reported by FreeNAS
user, where when more than one hpt27xx adapters are being used,
the "unit number" stays at 0.

Many thanks to HighPoint for providing this driver update.

MFC after: 1 day
pt27xx_config.c
sm_bsd.c
3d32e6b10c85bbbaea953937412778787bba3629 14-Apr-2013 mav <mav@FreeBSD.org> MFprojects/camlock r248982:
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.
sm_bsd.c
bd7f0fa0bb4b7b0f87227e0c4d49a4bd9b113cf0 12-Feb-2013 kib <kib@FreeBSD.org> 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.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync(). Previously this was done in a type specific
way. Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by: jeff (sponsored by EMC/Isilon)
Reviewed by: kan (previous version), scottl,
mjacob (isp(4), no objections for target mode changes)
Discussed with: ian (arm changes)
Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
sm_bsd.c
24e0e32487d9cabe009c9de04b444a113660b8ac 22-Jan-2013 delphij <delphij@FreeBSD.org> - Don't include date and time the driver is built, this is useful for
generating binary diffs.
- Constify a few strings used in the driver.
- Style changes to make the driver compile with default clang settings.

Approved by: HighPoint Technologies
MFC after: 3 days
pt27xx_config.c
s_bsd.h
sm_bsd.c
3f7a414911a892c8c84206394eb643cbde706d20 22-Oct-2012 eadler <eadler@FreeBSD.org> remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week
s_bsd.c
bb016fc00aa8080b2b351bea763afa7ba55b29a4 15-Jan-2012 uqs <uqs@FreeBSD.org> Remove spurious 8bit chars, turning files into plain ASCII.
EADME
4b4e03aec0d7f0c6cb2aea32d60176814567d049 28-Dec-2011 delphij <delphij@FreeBSD.org> Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after: 2 weeks
EADME
md64-elf.hpt27xx_lib.o.uu
rray.h
im.h
imfuncs.h
pt27xx_config.c
pt27xx_config.h
ptintf.h
386-elf.hpt27xx_lib.o.uu
dm.h
ist.h
s_bsd.c
s_bsd.h
sm.h
sm_bsd.c
j.h