Commit graph

12 commits

Author SHA1 Message Date
David van Moolenbroek a1f00d5527 Move SUB_PER_DRIVE definition into minix/drvlib.h
Change-Id: Id25761085ce1868955da34d8e530e170448ea154
2014-02-19 11:21:56 +01:00
David van Moolenbroek 9d89e72a5c ahci: more robustness against flaky devices
- if supported, override BSY/DRQ flags and start the port anyway if it
  times out with DET=3h status during device detection;
- no longer rely on the device signature to be set; unless a valid
  signature is obtained, try both ATA and ATAPI device identification.
2013-02-13 14:29:44 +00:00
David van Moolenbroek eb89b33d39 ahci: device detection rewrite
- do not start a port before the BSY and DRQ flags have been cleared;
  as such, poll on device status rather than signature availability.
- change "ahci_sig_timeout" to "ahci_device_timeout" variable setting
  accordingly; this variable determines the polling duration before a
  newly attached device is given up on, and uses 30 seconds as default;
- use port connect changes (PCS/X/DET->1h) to kick off polling for an
  attached device; detachment is still detected by means of PhyRdy
  status changes (PRCS/N/DET<->3h).
2013-02-13 14:26:48 +00:00
David van Moolenbroek 23b12e29a2 ahci: rewrite timeout initialization code
- the "ahci_sig_timeout" variable now denotes the entire checking
  period, and the delay between checks has been hardcoded; what was
  previously "ahci_sig_checks" is now computed from those two;
- timeout values are no longer used for both millisecond and clock
  tick values, and better typed;
- the computation of timeouts is no longer off by half a second.
2013-02-12 13:53:09 +00:00
David van Moolenbroek ad0b58fe83 ahci: centralize, fix port reset 2013-02-12 13:52:52 +00:00
David van Moolenbroek 186a4db672 ahci: use sys_vumap() instead of sys_umap()
This is only an optimization for CPU performance. Callers are
currently still required to supply contiguous memory.
2012-03-24 19:51:13 +01:00
Raja Appuswamy 8ab7667da4 ahci: NCQ support 2011-12-12 14:13:05 +01:00
David van Moolenbroek 9874865a6f ahci: FUA (force-write) support 2011-11-23 15:40:38 +01:00
David van Moolenbroek e1d867b686 ahci/libdriver: multithreading support
This patch adds support for executing multiple concurrent requests on
different devices on the same AHCI controller. The libdriver library
has been extended to include a generic multithreading interface, and
the AHCI driver has been extended to make use of this interface.

The original version of this code has been written by Arne Welzel.
2011-11-04 09:37:53 +00:00
David van Moolenbroek 484b2f43d6 at_wini/ahci: write cache ioctls 2010-08-12 14:09:34 +00:00
David van Moolenbroek 5998a4b2af AHCI driver: miscellaneous changes
- check the DF status flag after each command
- increase I/O timeout from 15 to 30 seconds
- share some code between ATA and ATAPI after all
- produce more accurate errors on DIOCEJECT
- rename AHCI_ID_SIZE to the more appropriate ATA_ID_SIZE
- rearrange ahci.h in a now more sensible way
2010-08-12 14:08:23 +00:00
David van Moolenbroek 16f2eb25f4 AHCI driver 2010-08-05 16:37:58 +00:00