Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/siisatavar.h
RevisionDateAuthorComments
 1.9  24-Oct-2018  jdolecek detach the controller itself on shutdown; adjust to not detach already
detached atabus/channel
 1.8  22-Oct-2018  jdolecek Merge jdolecek-ncqfixes branch

- ata_xfer's are dynamicall allocated as needed using a pool, no longer
limited to number of possible openings supported by controller; dump
and recovery paths use dedicated pre-allocated storage
- moved callouts and condvars from ata_xfer to queue or channel, so that
ata_xfer does not need special initialization
- slot allocation now done when xfer is being activated, uncoupled
from memory allocation; active slots are no longer tracked by controller
code
- channel and drive reset is done always via the atabus thread, and
now executes with channel locked the whole time
- NCQ recovery moved to shared function, and run via the thread also
- added some workarounds for buggy error recovery AHCI emulation in QEMU
and Parallels

designed to primarily fix kern/52614, but might also help with kern/47041
and kern/53183
 1.7  07-Oct-2017  jdolecek branches: 1.7.2; 1.7.4; 1.7.6;
Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)
 1.6  26-Jul-2010  jakllsch branches: 1.6.18; 1.6.48;
Store information for bus_dmamem_unmap() and bus_dmamem_free()
somewhere outside the bus_dmamap_t. The bus_dmamap_t has already
been destroyed by this time.

Fixes DMA memory leak at siisata_detach() time.
 1.5  19-Oct-2009  bouyer branches: 1.5.2; 1.5.4;
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.4  04-Jul-2009  jakllsch Remove unused elements from siisata_softc.

Clean up siisata pci attachment.
noteable changes:
- Use aprint_*_dev where appropriate.
- Condense board match table and use C99 initializers.
- Use aprint_verbose for extra info.

Also, add 2009 to my copyright, as well as remove my local CVS tags.
 1.3  17-Jun-2009  jakllsch A few changes for siisata(4):

- Support detachment. From KIYOHARA Takashi.
- Add PCI detachment functionality (albeit not very interesting when
the bus can not yet be rescanned).
- Rework interrupt handlers to reduce near-duplicate code.
Borrowed from ahcisata(4).
- Attempt to make polled I/O work. Untested.
- Fix formatting of some messages.
- For always-polled commands, disable interrupt
at slot level rather than port level.
- Instead of busy-waiting indefinitely for completion of some commands
move on after 31 seconds. Use cv_timedwait(9) instead of DELAY(9).
- Use abstracted SATA FIS code.
- Enable use of disks that don't respond with the standard signature.
 1.2  14-Sep-2008  jakllsch branches: 1.2.4; 1.2.8; 1.2.12; 1.2.14;
A few cleanups for siisata(4)

No functional changes intended (except maybe un-reseting the chip a bit later
in attach).

- pass fewer arguments to local functions where arguments can be derived from
an existing argument
- some coding style fixes
- more abstraction for PRB activation and deactivation
- bus_dma(9) properification in error cases
- undefine SIISATA_DEBUG, and cleanup variables used only for DEBUG_PRINT()s
 1.1  23-May-2008  jnemeth branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10;
Import siisata(4) by Jonathan A. Kollasch.

The siisata driver supports the Silicon Image SteelVine family of SATA-II
controllers, interfacing the hardware with the ata(4) and atapi(4) sub-
systems.

The following controllers are supported by the siisata driver:

Silicon Image SiI3124 4-port PCI/PCI-X
Silicon Image SiI3132 2-port PCI-Express x1
Silicon Image SiI3531 1-port PCI-Express x1

SATA Native Command Queueing is not yet supported.
Device hot swapping is not yet supported.
Silicon Image's Software RAID is not yet supported by the
ataraid(4) driver.

Approved by: core (christos), releng (bouyer)
 1.1.10.1  19-Oct-2008  haad Sync with HEAD.
 1.1.8.3  24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.1.8.2  23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.1.8.1  23-May-2008  wrstuden file siisatavar.h was added on branch wrstuden-revivesa on 2008-06-23 05:02:13 +0000
 1.1.4.2  04-Jun-2008  yamt sync with head
 1.1.4.1  23-May-2008  yamt file siisatavar.h was added on branch yamt-pf42 on 2008-06-04 02:05:10 +0000
 1.1.2.3  28-Sep-2008  mjf Sync with HEAD.
 1.1.2.2  02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1  23-May-2008  mjf file siisatavar.h was added on branch mjf-devfs2 on 2008-06-02 13:23:27 +0000
 1.2.14.1  21-Apr-2010  matt sync to netbsd-5
 1.2.12.6  11-Aug-2010  yamt sync with head.
 1.2.12.5  11-Mar-2010  yamt sync with head
 1.2.12.4  18-Jul-2009  yamt sync with head.
 1.2.12.3  20-Jun-2009  yamt sync with head
 1.2.12.2  04-May-2009  yamt sync with head.
 1.2.12.1  14-Sep-2008  yamt file siisatavar.h was added on branch yamt-nfs-mp on 2009-05-04 08:12:44 +0000
 1.2.8.1  23-Jul-2009  jym Sync with HEAD.
 1.2.4.2  28-Sep-2009  snj Pull up following revision(s) (requested by jakllsch in ticket #1023):
sys/dev/ic/siisatavar.h: revision 1.4
sys/dev/pci/siisata_pci.c: revision 1.4
Remove unused elements from siisata_softc.
Clean up siisata pci attachment.
noteable changes:
- Use aprint_*_dev where appropriate.
- Condense board match table and use C99 initializers.
- Use aprint_verbose for extra info.
Also, add 2009 to my copyright, as well as remove my local CVS tags.
 1.2.4.1  28-Sep-2009  snj Pull up following revision(s) (requested by jakllsch in ticket #1023):
sys/dev/ic/siisata.c: revision 1.3
sys/dev/ic/siisatareg.h: revision 1.3
sys/dev/ic/siisatavar.h: revision 1.3
sys/dev/pci/files.pci: revision 1.315
sys/dev/pci/siisata_pci.c: revision 1.3
A few changes for siisata(4):
- Support detachment. From KIYOHARA Takashi.
- Add PCI detachment functionality (albeit not very interesting when
the bus can not yet be rescanned).
- Rework interrupt handlers to reduce near-duplicate code.
Borrowed from ahcisata(4).
- Attempt to make polled I/O work. Untested.
- Fix formatting of some messages.
- For always-polled commands, disable interrupt
at slot level rather than port level.
- Instead of busy-waiting indefinitely for completion of some commands
move on after 31 seconds. Use cv_timedwait(9) instead of DELAY(9).
- Use abstracted SATA FIS code.
- Enable use of disks that don't respond with the standard signature.
 1.5.4.1  05-Mar-2011  rmind sync with head
 1.5.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.6.48.3  01-Aug-2017  jdolecek fix logic bug in processing of finished commands - mask of active
commands can change during the loop as c_intr() callback can queue
new commands, so the interrupt routine should only mark as finished
those which were actually active before the loop started; otherwise
the code marked as finished commands which were just started, and
being executed by HBA, leading to all sorts of data corruption

while here mark the active mask volatile, as it is modified from
interrupt context

this fixes for good the random crashes, short reads, and fatal command
errors which I've been tracing down for past couple weeks

thanks to Jonathan (jakllsch@) for testing, and a script to easily
triggered the condition, and led to this bug being finally found and squashed
 1.6.48.2  19-Jul-2017  jdolecek header changes for siisata switch to new error handling world order
 1.6.48.1  13-Jun-2017  jakllsch Add NCQ support to siisata(4).

There are still issues that need to be address before I consider this
mergable.
 1.6.18.1  03-Dec-2017  jdolecek update from HEAD
 1.7.6.1  11-Oct-2018  jdolecek refactor shared parts of the SATA error recovery into new function
ata_recovery_resume() and use for ahcisata/siisata/mvsata, also replace
per-controller hold/unhold with generic version

move the shared recovery code into separate file ata_recovery.c
 1.7.4.1  10-Jun-2019  christos Sync with HEAD
 1.7.2.1  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts

RSS XML Feed