History log of /freebsd-10-stable/sys/dev/hptiop/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
315813 23-Mar-2017 mav

MFC r311305 (by asomers):
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


/freebsd-10-stable/sys/cam/cam_xpt.c
/freebsd-10-stable/sys/cam/ctl/ctl_frontend_cam_sim.c
/freebsd-10-stable/sys/cam/scsi/scsi_low.c
/freebsd-10-stable/sys/dev/aac/aac_cam.c
/freebsd-10-stable/sys/dev/aacraid/aacraid_cam.c
/freebsd-10-stable/sys/dev/advansys/advansys.c
/freebsd-10-stable/sys/dev/advansys/adwcam.c
/freebsd-10-stable/sys/dev/aha/aha.c
/freebsd-10-stable/sys/dev/ahb/ahb.c
/freebsd-10-stable/sys/dev/ahci/ahci.c
/freebsd-10-stable/sys/dev/ahci/ahciem.c
/freebsd-10-stable/sys/dev/aic/aic.c
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx_osm.c
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx_osm.c
/freebsd-10-stable/sys/dev/amr/amr_cam.c
/freebsd-10-stable/sys/dev/arcmsr/arcmsr.c
/freebsd-10-stable/sys/dev/ata/ata-all.c
/freebsd-10-stable/sys/dev/buslogic/bt.c
/freebsd-10-stable/sys/dev/ciss/ciss.c
/freebsd-10-stable/sys/dev/dpt/dpt_scsi.c
/freebsd-10-stable/sys/dev/esp/ncr53c9x.c
/freebsd-10-stable/sys/dev/firewire/sbp.c
/freebsd-10-stable/sys/dev/firewire/sbp_targ.c
/freebsd-10-stable/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
hptiop.c
/freebsd-10-stable/sys/dev/hptmv/entry.c
/freebsd-10-stable/sys/dev/hptnr/hptnr_osm_bsd.c
/freebsd-10-stable/sys/dev/hptrr/hptrr_osm_bsd.c
/freebsd-10-stable/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
/freebsd-10-stable/sys/dev/iir/iir.c
/freebsd-10-stable/sys/dev/isci/isci_controller.c
/freebsd-10-stable/sys/dev/iscsi_initiator/isc_cam.c
/freebsd-10-stable/sys/dev/isp/isp_freebsd.c
/freebsd-10-stable/sys/dev/mfi/mfi_cam.c
/freebsd-10-stable/sys/dev/mly/mly.c
/freebsd-10-stable/sys/dev/mpr/mpr_sas.c
/freebsd-10-stable/sys/dev/mps/mps_sas.c
/freebsd-10-stable/sys/dev/mpt/mpt_cam.c
/freebsd-10-stable/sys/dev/mrsas/mrsas_cam.c
/freebsd-10-stable/sys/dev/mvs/mvs.c
/freebsd-10-stable/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
/freebsd-10-stable/sys/dev/ppbus/vpo.c
/freebsd-10-stable/sys/dev/siis/siis.c
/freebsd-10-stable/sys/dev/sym/sym_hipd.c
/freebsd-10-stable/sys/dev/trm/trm.c
/freebsd-10-stable/sys/dev/twa/tw_osl_cam.c
/freebsd-10-stable/sys/dev/tws/tws_cam.c
/freebsd-10-stable/sys/dev/virtio/scsi/virtio_scsi.c
/freebsd-10-stable/sys/powerpc/ps3/ps3cdrom.c
/freebsd-10-stable/sys/powerpc/pseries/phyp_vscsi.c
300060 17-May-2016 pfg

MFC r298931, r298981, r299375:

Minor spelling fixes in:
sys/dev, sys/sys

Many of these have user-visible strings.


/freebsd-10-stable/sys/dev/aic7xxx/aic79xx.c
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx.h
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx.reg
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx.seq
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx_inline.h
/freebsd-10-stable/sys/dev/aic7xxx/aic79xx_pci.c
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx.c
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx.h
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx.reg
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx.seq
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx_inline.h
/freebsd-10-stable/sys/dev/aic7xxx/aic7xxx_pci.c
/freebsd-10-stable/sys/dev/aic7xxx/aicasm/aicasm.c
/freebsd-10-stable/sys/dev/aic7xxx/aicasm/aicasm_gram.y
/freebsd-10-stable/sys/dev/ciss/ciss.c
/freebsd-10-stable/sys/dev/drm2/radeon/radeon_fb.c
/freebsd-10-stable/sys/dev/drm2/ttm/ttm_bo_vm.c
hptiop.c
/freebsd-10-stable/sys/dev/hwpmc/hwpmc_mod.c
/freebsd-10-stable/sys/dev/isci/scil/scic_phy.h
/freebsd-10-stable/sys/dev/isci/scil/scic_sds_phy.c
/freebsd-10-stable/sys/dev/pccbb/pccbb_pci.c
/freebsd-10-stable/sys/dev/wbwd/wbwd.c
/freebsd-10-stable/sys/dev/wtap/if_wtap.c
/freebsd-10-stable/sys/dev/wtap/if_wtap_module.c
/freebsd-10-stable/sys/dev/wtap/plugins/visibility.c
/freebsd-10-stable/sys/sys/ata.h
/freebsd-10-stable/sys/sys/buf.h
/freebsd-10-stable/sys/sys/buf_ring.h
/freebsd-10-stable/sys/sys/iconv.h
/freebsd-10-stable/sys/sys/imgact_binmisc.h
/freebsd-10-stable/sys/sys/imgact_elf.h
/freebsd-10-stable/sys/sys/ipc.h
/freebsd-10-stable/sys/sys/ipmi.h
/freebsd-10-stable/sys/sys/linker.h
/freebsd-10-stable/sys/sys/memrange.h
/freebsd-10-stable/sys/sys/pmc.h
/freebsd-10-stable/sys/sys/priority.h
/freebsd-10-stable/sys/sys/priv.h
/freebsd-10-stable/sys/sys/proc.h
/freebsd-10-stable/sys/sys/procctl.h
/freebsd-10-stable/sys/sys/shm.h
/freebsd-10-stable/sys/sys/sockio.h
/freebsd-10-stable/sys/sys/soundcard.h
/freebsd-10-stable/sys/sys/sx.h
/freebsd-10-stable/sys/sys/sysctl.h
/freebsd-10-stable/sys/sys/user.h
256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255871 25-Sep-2013 scottl

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


255865 25-Sep-2013 gjb

Revert r255853 pending fixes to build errors in usr.bin/kdump

Approved by: re (implicit)


255853 24-Sep-2013 scottl

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


252851 05-Jul-2013 delphij

Add PCI IDs for HighPoint RocketRAID 4521, 3620, 3622 and 3640
controllers. Update the hptiop(4) manual page to reflect this
as well as mentioning that some cards are already end-of-life.

Many thanks to Highpoint for providing this driver update.

MFC after: 1 day


250124 30-Apr-2013 eadler

Remove ancient compatibility cruft.

Reviewed by: delphij


250123 30-Apr-2013 eadler

Add missing braces

Reviewed by: swildner@dragonflybsd.org
Reviewed by: delphij


250050 29-Apr-2013 delphij

Add missing braces.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly
MFC after: 1 week


249468 14-Apr-2013 mav

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.


246713 12-Feb-2013 kib

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>)


242086 25-Oct-2012 delphij

Update hptiop(4) to version 1.8, which added support for HighPoint
RocketRAID 4500 series.

Many thanks to HighPoint Technologies for their continued support
of FreeBSD!

Submitted by: HighPoint Technologies
MFC after: 3 days


239084 06-Aug-2012 delphij

Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices.

Obtained from: FreeNAS
MFC after: 3 days


236379 01-Jun-2012 eadler

Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.

PR: kern/166239
Submitted by: Pavel Timofeev <timp87@gmail.com>
Discussed on: -stable, -scsi
Reviewed by: scottl
No objection from: mjacob
Approved by: cperciva
MFC after: 3 days


232854 12-Mar-2012 scottl

Convert a number of drivers to obtaining their parent DMA tag from their
PCI device attachment.


227912 23-Nov-2011 marius

- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
duplicating it.
- In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.


226350 13-Oct-2011 marius

Merge from r225950:

Set the sense residual properly.

Reviewed by: ken


224583 01-Aug-2011 delphij

Add PCI ID for RocketRAID 4321 and 4322. A FreeNAS user have tested the
change on RocketRAID 4322.

Sponsored by: iXsystems, Inc.
MFC after: 3 days
Approved by: re (kib)


209340 19-Jun-2010 mav

Report transport type in XPT_PATH_INQ.

PR: i386/147929
MFC after: 3 days


203108 28-Jan-2010 mav

MFp4: Large set of CAM inprovements.

- Unify bus reset/probe sequence. Whenever bus attached at boot or later,
CAM will automatically reset and scan it. It allows to remove duplicate
code from many drivers.
- Any bus, attached before CAM completed it's boot-time initialization,
will equally join to the process, delaying boot if needed.
- New kern.cam.boot_delay loader tunable should help controllers that
are still unable to register their buses in time (such as slow USB/
PCCard/ CardBus devices), by adding one more event to wait on boot.
- To allow synchronization between different CAM levels, concept of
requests priorities was extended. Priorities now split between several
"run levels". Device can be freezed at specified level, allowing higher
priority requests to pass. For example, no payload requests allowed,
until PMP driver enable port. ATA XPT negotiate transfer parameters,
periph driver configure caching and so on.
- Frozen requests are no more counted by request allocation scheduler.
It fixes deadlocks, when frozen low priority payload requests occupying
slots, required by higher levels to manage theit execution.
- Two last changes were holding proper ATA reinitialization and error
recovery implementation. Now it is done: SATA controllers and Port
Multipliers now implement automatic hot-plug and should correctly
recover from timeouts and bus resets.
- Improve SCSI error recovery for devices on buses without automatic sense
reporting, such as ATAPI or USB. For example, it allows CAM to wait, while
CD drive loads disk, instead of immediately return error status.
- Decapitalize diagnostic messages and make them more readable and sensible.
- Teach PMP driver to limit maximum speed on fan-out ports.
- Make boot wait for PMP scan completes, and make rescan more reliable.
- Fix pass driver, to return CCB to user level in case of error.
- Increase number of retries in cd driver, as device may return several UAs.


196970 08-Sep-2009 phk

Revert previous commit and add myself to the list of people who should
know better than to commit with a cat in the area.


196969 08-Sep-2009 phk

Add necessary include.


190405 25-Mar-2009 delphij

Use __packed from cdefs.h

Submitted by: pyunyh
Reviewed by: Shaowei WANG <wsw1wsw2 gmail com>
MFC after: 2 weeks


190398 25-Mar-2009 delphij

Use __attribute__((packed)) for the structure so that hptiop management
utility would work.

Submitted by: Shaowei WANG <wsw1wsw2 gmail com>
MFC after: 2 weeks


183590 04-Oct-2008 antoine

- Spell cam correctly (scbus), this makes it possible to compile hptiop
in GENERIC and LINT. [1]
- Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition
of hpt_dbg_level (hptmv also has hpt_dbg_level).

PR: 127551 [1]
Reviewed by: scottl@
MFC after: 1 month


183397 27-Sep-2008 ed

Replace all calls to minor() with dev2unit().

After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by: kib


175942 03-Feb-2008 scottl

Update the hptiop driver to version 1.3. This adds support for the 4xxx
series of adapters. Thanks again to Highpoint for their continued support
of FreeBSD.

Submitted by: Highpoint Technologies


170872 17-Jun-2007 scottl

Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now. This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.


169412 09-May-2007 scottl

Introduce a driver for the Highpoint RocketRAID 3xxx series of controllers.
The driver relies on CAM.

Many thanks to Highpoint for providing this driver.