History log of /freebsd-10-stable/sys/dev/isp/isp_library.c
Revision Date Author Comments
# 317366 24-Apr-2017 mav

MFC r315908: Unify initiator and target DMA setup and command sending.

The code is so alike that it is pointless to keep it separate.


# 316155 29-Mar-2017 mav

MFC r315485: Remove dead remnants of SPI target.


# 316087 28-Mar-2017 mav

MFC r315234: Improvements around attach, reset and detach.

This change fixes DMA resource leak on driver unload. Also it removes
DMA resources allocation for hardcoded number of requests before fetching
the real number from firmware. Also it prepares ground for more flexible
IRQs allocation according to firmware capabilities.


# 300580 24-May-2016 mav

MFC r300052: Completely remove broken now autologin port flag.

Firmware automatically logs in only to local loop ports, and those ports
can be easily identified without extra flag by zero domain and area IDs.


# 298972 03-May-2016 mav

MFC r297991: Extract virtual port address from RQSTYPE_RPT_ID_ACQ.

This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.


# 298963 03-May-2016 mav

MFC r297817: Polish debugging IOCB dumping.

Add few more missing cases, unify byte order.


# 298962 03-May-2016 mav

MFC r297751: Register symbolic port/node names in FC name server.

This is cosmetics that simplifies identification of new ports on FC switch.

It would be good to use target name from CTL here instead of hostname, but
it is not passed here through CAM now.


# 292922 30-Dec-2015 mav

MFC r292739: Make virtual ports control asynchronous.

Before this change virtual ports control IOCBs were executed synchronously
via Execute IOCB mailbox command. It required exclusive use of scratch
space of driver and mailbox registers of the hardware. Because of that
shared resources use this code could not really sleep, having to spin for
completion, blocking any other operation.

This change introduces new asynchronous design, sending the IOCBs directly
on request queue and gracefully waiting for their return on response queue.
Returned IOCBs are identified with unified handle space from r292725.


# 292921 30-Dec-2015 mav

MFC r292725: Unify handles allocation for initiator and target IOCBs.

I am not sure why this was split long ago, but I see no reason for it.
At this point this unification just slightly reduces memory usage, but
as next step I plan to reuse shared handle space for other IOCB types.


# 292919 30-Dec-2015 mav

MFC r292715: Clear virtual port's port database when disabling it.

Previously it was done only on full chip reinit, that caused old ports
resurrect in case of virtual port reenabling.


# 292596 22-Dec-2015 mav

MFC r291730: Update isp_put_icb_2400() for new structure fields.


# 291532 30-Nov-2015 mav

MFC r291365, r291369: One more round of port scanner rewrite.

- Make scan aborted by event restart immediately and infinitely.
- Improve handling of some loop events from firmware.
- Remove loop down timer, adding its functionality to scanner thread.
- Some more unification and simplification.


# 291529 30-Nov-2015 mav

MFC r291209: Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.


# 291528 30-Nov-2015 mav

MFC r291188: Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work. And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.


# 291517 30-Nov-2015 mav

MFC r291144: Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests. But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.


# 291514 30-Nov-2015 mav

MFC r291080: Another round of port scanner rewrite.

This change simplifies and unifies port adding/updating for loop and
fabric scanners. It also fixes problems with scanning restarts due to
concurrent port databases changes. It also fixes many cosmetic issues.


# 291512 30-Nov-2015 mav

MFC r291013: Remove some confusions between loopid and nphdl.

Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs. Leave loopid used only where it really
goes about local loop IDs.

While there, fix few more cases where LUNs were still printed in decimal.


# 291511 30-Nov-2015 mav

MFC r291000: Register our FC4 Features in SNS.


# 291510 30-Nov-2015 mav

MFC r290993, r290994: Unify and cleanup FC ports scan.


# 291508 30-Nov-2015 mav

MFC r290980: Make firmware handle virtual ports SNS logins for us.


# 291507 30-Nov-2015 mav

MFC r290978: Add real initial support for RQSTYPE_RPT_ID_ACQ.


# 291498 30-Nov-2015 mav

MFC r290104: Improve/fix loop scanning routine.

For the most of chips (except anscient ones) port handlers have no relation
to port IDs. In such situation old code scanning first 125 handlers was
quite naive. Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.


# 290798 13-Nov-2015 mav

MFC r290018: Reimplement enable and implement disable of virtual ports.

Now on 24xx and above chips it is really possible to simulate several
virtual FC ports with single physical one. For example, it allows to
configure several targets in ctl.conf, assign each of them to separate
virtual port, and let user to control access to them with switch zoning.

I still doubt that all problems are solved there, but at now it passes
at least basic tests.


# 290792 13-Nov-2015 mav

MFC r289886: Add new field to Abort IOCB.


# 290788 13-Nov-2015 mav

MFC r289855: Minor additions to Status Type 0 IOCB.


# 290787 13-Nov-2015 mav

MFC r289838: Improve INOTs handling for 24xx and above chips.


# 288714 05-Oct-2015 mav

MFC r285459: Unify port database use for target and initiator roles.

Aside from cleaner and more consistent code, this allows ports to be both
target and initiator same time, and easily switch from any role to any.


# 288709 05-Oct-2015 mav

MFC r285146: Drop discovered targets when initiator role is disabled.


# 284904 28-Jun-2015 mav

MFC r284681: Rewrite port database handling for target mode.

Previous implementation was too fragile to initiator parameters changes.
In case of port role change it could not survive different handle assigned
to the same initiator by firmware, even though initiator was logged out.
The new implementation should be more resillient to this kind of problems,
trying to work in any situation and only warn user about suspisious events.


# 276232 26-Dec-2014 mav

MFC r275112:
Make isp_find_pdb_by_*() search for targets in portdb in reverse order.

Records with target_mode == 1 are allocated from the end of portdb, so it
seems logical to start search from the end not traverse whole array.


# 275498 05-Dec-2014 mav

MFC r272937: Fix r272936 build with old GCC.


# 274385 11-Nov-2014 mav

MFC r272936:
Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned. Previously that code worked only once, confusing CTL.


# 261718 10-Feb-2014 mav

MFC r261515:
Fix I/O freezes in some cases, caused by r257916.

Delaying isp_reqodx update, we should be ready to update it every time
we read it. Otherwise requests using several indexes may be requeued
ndefinitely without ever updating the variable.


# 260345 05-Jan-2014 mav

MFC r257916:
Save one more register read per command by not reading rqstoutrp register
every time. The purpose of that register is unlikely output queue overflow
detection, so read it only when its last known (and probably stale now)
value signals overflow.


# 288714 05-Oct-2015 mav

MFC r285459: Unify port database use for target and initiator roles.

Aside from cleaner and more consistent code, this allows ports to be both
target and initiator same time, and easily switch from any role to any.


# 288709 05-Oct-2015 mav

MFC r285146: Drop discovered targets when initiator role is disabled.


# 284904 28-Jun-2015 mav

MFC r284681: Rewrite port database handling for target mode.

Previous implementation was too fragile to initiator parameters changes.
In case of port role change it could not survive different handle assigned
to the same initiator by firmware, even though initiator was logged out.
The new implementation should be more resillient to this kind of problems,
trying to work in any situation and only warn user about suspisious events.


# 276232 26-Dec-2014 mav

MFC r275112:
Make isp_find_pdb_by_*() search for targets in portdb in reverse order.

Records with target_mode == 1 are allocated from the end of portdb, so it
seems logical to start search from the end not traverse whole array.


# 275498 05-Dec-2014 mav

MFC r272937: Fix r272936 build with old GCC.


# 274385 11-Nov-2014 mav

MFC r272936:
Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned. Previously that code worked only once, confusing CTL.


# 261718 10-Feb-2014 mav

MFC r261515:
Fix I/O freezes in some cases, caused by r257916.

Delaying isp_reqodx update, we should be ready to update it every time
we read it. Otherwise requests using several indexes may be requeued
ndefinitely without ever updating the variable.


# 260345 05-Jan-2014 mav

MFC r257916:
Save one more register read per command by not reading rqstoutrp register
every time. The purpose of that register is unlikely output queue overflow
detection, so read it only when its last known (and probably stale now)
value signals overflow.