Home | History | Annotate | Download | only in ata
History log of /src/sys/dev/ata/sata_subr.c
RevisionDateAuthorComments
 1.24  21-Jun-2018  jdolecek split the port status reporting to new function sata_interpret_det()
so it can be called separately from sata_reset_interface()

do not treat PHY offline as an error, it's pretty normal when there
is no device actually connected

debugging aid for PR kern/52372
 1.23  07-Oct-2017  jdolecek branches: 1.23.2;
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.22  10-May-2017  msaitoh branches: 1.22.2;
KNF. No functional change.
 1.21  03-Apr-2013  bouyer branches: 1.21.12; 1.21.24; 1.21.26;
Fix kernel dump on ahci controller, by making sure we won't sleep
while dumping:
- introduce ata_delay() which either use delay() or kpause()
depending on flags. use it in sata_reset_interface() and
some ahci functions
- kill ATA_NOSLEEP, it was tested but never set. use ATA_POLL instead.
- reduce delay while polling in ahci, to speed up the dump

Should fix PR kern/41095
 1.20  31-Jul-2012  bouyer branches: 1.20.2;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.19  26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.18  24-Jul-2012  jakllsch Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
 1.17  15-Jul-2012  dsl Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
 1.16  02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.15  15-May-2012  bouyer If the PHY reports link up but no communication, wait 5 more
seconds for communications to be established. This seems to be needed for
some configurations.
 1.14  12-Dec-2010  jakllsch branches: 1.14.8; 1.14.12;
Actually, 31244 does not refer to the Silicon Image SiI3124,
but the now-obscure Intel GD31244.
 1.13  11-Dec-2010  matt Fix typo (31224 -> 3124) and constify an array.
 1.12  18-Nov-2008  cegger branches: 1.12.8;
SATA GEN3 speed is 6.0Gb/s
 1.11  28-Apr-2008  martin branches: 1.11.6; 1.11.8; 1.11.10;
Remove clause 3 and 4 from TNF licenses
 1.10  18-Mar-2008  cube branches: 1.10.2; 1.10.4;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.9  11-Dec-2007  lukem branches: 1.9.4; 1.9.8;
use __KERNEL_RCSID()
 1.8  30-Nov-2006  bouyer branches: 1.8.24; 1.8.34; 1.8.36; 1.8.38;
It's 3.0Gb/s, not GB/s. Pointed out by Thomas E. Spanjaard.
 1.7  27-Nov-2006  dogcow revert last change, as havard's fix is more general.
 1.6  22-Nov-2006  dogcow #include <sys/device.h> to fix build failure on sparc64.
(why only sparc64? no idea.)
 1.5  22-Nov-2006  bouyer Cosmetic: remove one ":" from the port status string, it looks better this
way.
 1.4  22-Nov-2006  bouyer In sata_reset_interface() return only DET bits of SStatus, as the
return value is compared against SStatus_DET_*
 1.3  20-Nov-2006  bouyer Move part of wdc_sataprobe() to sys/dev/ata/sata_subr.c so that it can be
shared with non-wdc SATA controllers.
 1.2  11-Dec-2005  christos branches: 1.2.20; 1.2.22;
merge ktrace-lwp.
 1.1  28-May-2004  thorpej branches: 1.1.2; 1.1.14;
Add common routines for SATA controllers. Right now, we have sata_speed(),
which reports the speed encoded in the SStatus register.
 1.1.14.3  24-Mar-2008  yamt sync with head.
 1.1.14.2  21-Jan-2008  yamt sync with head
 1.1.14.1  30-Dec-2006  yamt sync with head.
 1.1.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2  03-Aug-2004  skrll Sync with HEAD
 1.1.2.1  28-May-2004  skrll file sata_subr.c was added on branch ktrace-lwp on 2004-08-03 10:45:46 +0000
 1.2.22.1  10-Dec-2006  yamt sync with head.
 1.2.20.1  12-Jan-2007  ad Sync with head.
 1.8.38.1  13-Dec-2007  bouyer Sync with HEAD
 1.8.36.1  11-Dec-2007  yamt sync with head.
 1.8.34.1  26-Dec-2007  ad Sync with head.
 1.8.24.2  23-Mar-2008  matt sync with HEAD
 1.8.24.1  09-Jan-2008  matt sync with HEAD
 1.9.8.3  17-Jan-2009  mjf Sync with HEAD.
 1.9.8.2  02-Jun-2008  mjf Sync with HEAD.
 1.9.8.1  03-Apr-2008  mjf Sync with HEAD.
 1.9.4.1  24-Mar-2008  keiichi sync with head.
 1.10.4.2  04-May-2009  yamt sync with head.
 1.10.4.1  16-May-2008  yamt sync with head.
 1.10.2.1  18-May-2008  yamt sync with head.
 1.11.10.1  22-Nov-2008  snj branches: 1.11.10.1.8;
Pull up following revision(s) (requested by cegger in ticket #99):
sys/dev/ata/sata_subr.c: revision 1.12
SATA GEN3 speed is 6.0Gb/s
 1.11.10.1.8.1  07-Jan-2011  matt small fixes (constification + comment type).
 1.11.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.11.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.12.8.1  05-Mar-2011  rmind sync with head
 1.14.12.1  02-Jun-2012  mrg sync to latest -current.
 1.14.8.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.8.2  30-Oct-2012  yamt sync with head
 1.14.8.1  23-May-2012  yamt sync with head.
 1.20.2.2  03-Dec-2017  jdolecek update from HEAD
 1.20.2.1  23-Jun-2013  tls resync from head
 1.21.26.1  11-May-2017  pgoyette Sync with HEAD
 1.21.24.1  19-Sep-2017  jdolecek replace all remaining tsleep()/wakeup() calls with condition variables, or
calls to ata_delay(), as appropriate; change ata_delay() to require the
channel lock on entry, and pass the lock to kpause() for unlocking while
sleeping
 1.21.12.1  28-Aug-2017  skrll Sync with HEAD
 1.22.2.1  24-Feb-2023  martin Pull up following revision(s) (requested by msaitoh in ticket #1805):

sys/dev/ata/satavar.h: revision 1.10
sys/dev/ata/sata_subr.c: revision 1.24

split the port status reporting to new function sata_interpret_det()
so it can be called separately from sata_reset_interface()

do not treat PHY offline as an error, it's pretty normal when there
is no device actually connected

debugging aid for PR kern/52372
 1.23.2.1  25-Jun-2018  pgoyette Sync with HEAD

RSS XML Feed