History log of /freebsd-10-stable/sys/dev/mpt/mpt_cam.c
Revision Date Author Comments
# 315828 23-Mar-2017 mav

MFC r315067: Partially fix target task management requests handling.

- XPT_NOTIFY_ACKNOWLEDGE was not handled, causing stuck requests.
- XPT_ABORT was not even trying to abort active ATIOs/INOTs.
- Initiator's tag was not stored and not used where needed.
- List of TM request types needed update.
- mpt_scsi_tgt_status() missed some useful debugging.

After this change global TM requests, such as reset, should work properly.
ABORT TASK (ABTS) requests are still not passes to CTL, that is not good
and should be fixed.


# 315826 23-Mar-2017 mav

MFC r315004: Add PIM_EXTLUNS support to mpt(4).

Target mode is still limited to 256 LUNs due to the way driver is written,
but initiator can now use full 8 byte LUN space.


# 315824 23-Mar-2017 mav

MFC r315002: Improve residuals reporting in target mode.


# 315821 23-Mar-2017 mav

MFC r314998: Fix FC target mode in mpt(4), broken in multiple ways.

- Not set BufferLength caused receive of empty ATIOs.
- CDB length guessing was broken at least for RC16.
- mpt_req_untimeout() was called with wrong req parameter.
- Sense data reporting was broken in several ways.

With this change my LSI7204EP-LC can pass at least basic tests as target.
The code is still far from perfect, but finally I found second hw/driver
after isp(4) that really can work in CAM target mode.


# 315819 23-Mar-2017 mav

MFC r314967: Add support for XPT_GET_SIM_KNOB in FC mode.


# 315817 23-Mar-2017 mav

MFC r314968: Report some more data in XPT_PATH_INQ.

I am not sure they are used anywhere, but why not.


# 315815 23-Mar-2017 mav

MFC r314966: Report FC link speed.


# 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


# 275982 21-Dec-2014 smh

MFC r274819:
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by: Multiplay


# 267950 27-Jun-2014 hiren

MFC r267690

Hide a harmless "QUEUE FULL EVENT" message behind bootverbose.


# 264949 25-Apr-2014 marius

MFC: r260058

- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.


# 261455 04-Feb-2014 eadler

MFC r258779,r258780,r258787,r258822:

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.


# 260342 05-Jan-2014 mav

MFC r256826:
Fix several target mode SIMs to not blindly clear ccb_h.flags field of
ATIO CCBs. Not all CCB flags there belong to them.


# 275982 21-Dec-2014 smh

MFC r274819:
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by: Multiplay


# 267950 27-Jun-2014 hiren

MFC r267690

Hide a harmless "QUEUE FULL EVENT" message behind bootverbose.


# 264949 25-Apr-2014 marius

MFC: r260058

- Remove a redundant variable in mpt_pci_attach().
- #if 0 the currently unused paired port linking and unlinking of dual
adapters.
- Simplify MSI/MSI-X allocation and release. For a single one, we don't need
to fiddle with the MSI/MSI-X count and pci_release_msi(9) is smart enough
to just do nothing in case of INTx.
- Canonicalize actions taken on attach failure and detach.
- Remove the remainder of incomplete support for older FreeBSD versions.


# 261455 04-Feb-2014 eadler

MFC r258779,r258780,r258787,r258822:

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.


# 260342 05-Jan-2014 mav

MFC r256826:
Fix several target mode SIMs to not blindly clear ccb_h.flags field of
ATIO CCBs. Not all CCB flags there belong to them.