/[base]/head/sys/dev/ata/ata-all.c
ViewVC logotype

Log of /head/sys/dev/ata/ata-all.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:


Revision 368124 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 28 12:12:51 2020 UTC (3 years, 7 months ago) by kib
File length: 38478 byte(s)
Diff to previous 358333
Make MAXPHYS tunable.  Bump MAXPHYS to 1M.

Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.

Make b_pages[] array in struct buf flexible.  Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*).  Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.

Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys.  Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight.  Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.

Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.

Suggested by: mav (*)
Reviewed by:	imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D27225


Revision 358333 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 26 14:26:36 2020 UTC (4 years, 4 months ago) by kaktus
File length: 38480 byte(s)
Diff to previous 355426
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE.  All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by:	kib (mentor, blanket)
Commented by:	kib, gallatin, melifaro
Differential Revision:	https://reviews.freebsd.org/D23718


Revision 355426 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 5 18:47:29 2019 UTC (4 years, 6 months ago) by jhb
File length: 38459 byte(s)
Diff to previous 335896
Use a void * argument to callout handlers instead of timeout_t casts.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D22684


Revision 335896 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 3 16:17:59 2018 UTC (6 years ago) by sbruno
File length: 38431 byte(s)
Diff to previous 326255
Reset indentiation of ata_suspend() such that its clear we fall through
this function and that we aren't supposed to be controlled by the first
if() conditional.  Found with gcc.

No functional change is intended with this commit.


Revision 326255 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 27 14:52:40 2017 UTC (6 years, 7 months ago) by pfg
File length: 38418 byte(s)
Diff to previous 313949
sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


Revision 313949 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 19 17:27:58 2017 UTC (7 years, 4 months ago) by mav
File length: 38366 byte(s)
Diff to previous 311305
Remove dead mentions of CAM target mode APIs from drivers.

This makes grepping kernel for target mode implementation much easier.


Revision 311305 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 4 20:26:42 2017 UTC (7 years, 5 months ago) by asomers
File length: 38598 byte(s)
Diff to previous 298955
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
Reviewed by:	imp, sephe, slm
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9037
Differential Revision:	https://reviews.freebsd.org/D9038


Revision 298955 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 3 03:41:25 2016 UTC (8 years, 2 months ago) by pfg
File length: 38598 byte(s)
Diff to previous 298143
sys/dev: minor spelling fixes.

Most affect comments, very few have user-visible effects.


Revision 298143 - (view) (download) (annotate) - [select for diffs]
Modified Sun Apr 17 05:24:36 2016 UTC (8 years, 2 months ago) by imp
File length: 38597 byte(s)
Diff to previous 295276
Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM
can handle it, and add the code to add it to the FIS that's sent to
the drive. The mvs driver is the only other ATA driver in the system,
and its hardware doesn't appear to support setting the Auxiliary
register.

Differential Revision: https://reviews.freebsd.org/D5598


Revision 295276 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 4 19:53:54 2016 UTC (8 years, 4 months ago) by rpokala
File length: 38389 byte(s)
Diff to previous 286816
Add defines for WRITE_UNCORRECTABLE ATA command, and improve command logging

Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the
decoding in ATACAM to recognize the new values. Also improve command
decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the
decoding in ata(4) up to parity with ATACAM.

Reviewed by:	mav, imp
MFC after:	1 month
Sponsored by:	Panasas, Inc.
Differential Revision:	https://reviews.freebsd.org/D5181


Revision 286816 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 15 22:55:32 2015 UTC (8 years, 10 months ago) by mav
File length: 35056 byte(s)
Diff to previous 286814
Small addition to r286814.

Submitted by:	bz
MFC after:	2 weeks


Revision 286814 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 15 21:46:02 2015 UTC (8 years, 10 months ago) by mav
File length: 35114 byte(s)
Diff to previous 286448
Remove UMA allocation of ATA requests.

After CAM replaced old ATA stack, this driver processes no more then one
request at a time per channel.  Using UMA after that is overkill, so
replace it with simple preallocation of one request per channel.

MFC after:	2 weeks


Revision 286448 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 8 11:48:11 2015 UTC (8 years, 10 months ago) by mav
File length: 35718 byte(s)
Diff to previous 286415
Disable 32-bit PIO for 6Gbit/s Intel SATA controllers.

For some reason 32-bit PIO writes are not working on 6Gbit/s Intel SATA
ports, while 16/32-bit PIO reads and 16-bit PIO writes are working fine.
3Gbit/s ports on the same controllers have no this problem.

Workaround this by disabling 32-bit PIO for all Intel controllers that may
have 6Gbit/s ports.  It halves PIO performance from 6MB/s to 3MB/s, but
who bother about speed of such rare and slow mode, which is also highly
discouraged by SATA specifications?

MFC after:	2 weeks


Revision 286415 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 7 14:38:26 2015 UTC (8 years, 10 months ago) by mav
File length: 35680 byte(s)
Diff to previous 280393
Add unmapped I/O support to ata(4) driver.

Main problem there was PIO mode support, that required KVA mapping.
Handle that case using recently added pmap_quick_enter_page(9) KPI,
mapping data pages to KVA one at a time.


Revision 280393 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 23 19:47:52 2015 UTC (9 years, 3 months ago) by mav
File length: 35665 byte(s)
Diff to previous 267992
Reduce priority of ATA/SATA drivers.

Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY;  more functional ahci(4), siis(4),
mvs(4) -> BUS_PROBE_DEFAULT;  BUS_PROBE_VENDOR leave for vendor drivers.

MFC after:	2 weeks


Revision 267992 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jun 28 03:56:17 2014 UTC (10 years ago) by hselasky
File length: 35660 byte(s)
Diff to previous 267985
Pull in r267961 and r267973 again. Fix for issues reported will follow.


Revision 267985 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 27 22:05:21 2014 UTC (10 years ago) by gjb
File length: 35722 byte(s)
Diff to previous 267961
Revert r267961, r267973:

These changes prevent sysctl(8) from returning proper output,
such as:

 1) no output from sysctl(8)
 2) erroneously returning ENOMEM with tools like truss(1)
    or uname(1)
 truss: can not get etype: Cannot allocate memory


Revision 267961 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 27 16:33:43 2014 UTC (10 years ago) by hselasky
File length: 35660 byte(s)
Diff to previous 264389
Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies


Revision 264389 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 12 23:40:54 2014 UTC (10 years, 2 months ago) by rpaulo
File length: 35722 byte(s)
Diff to previous 256843
Fix the style of ata_interrupt_locked().


Revision 256843 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 21 12:00:26 2013 UTC (10 years, 8 months ago) by mav
File length: 35774 byte(s)
Diff to previous 256304
Merge CAM locking changes from the projects/camlock branch to radically
reduce lock congestion and improve SMP scalability of the SCSI/ATA stack,
preparing the ground for the coming next GEOM direct dispatch support.

Replace big per-SIM locks with bunch of smaller ones:
 - per-LUN locks to protect device and peripheral drivers state;
 - per-target locks to protect list of LUNs on target;
 - per-bus locks to protect reference counting;
 - per-send queue locks to protect queue of CCBs to be sent;
 - per-done queue locks to protect queue of completed CCBs;
 - remaining per-SIM locks now protect only HBA driver internals.

While holding LUN lock it is allowed (while not recommended for performance
reasons) to take SIM lock.  The opposite acquisition order is forbidden.
All the other locks are leaf locks, that can be taken anywhere, but should
not be cascaded.  Many functions, such as: xpt_action(), xpt_done(),
xpt_async(), xpt_create_path(), etc. are no longer require (but allow) SIM
lock to be held.

To keep compatibility and solve cases where SIM lock can't be dropped, all
xpt_async() calls in addition to xpt_done() calls are queued to completion
threads for async processing in clean environment without SIM lock held.

Instead of single CAM SWI thread, used for commands completion processing
before, use multiple (depending on number of CPUs) threads.  Load balanced
between them using "hash" of the device B:T:L address.

HBA drivers that can drop SIM lock during completion processing and have
sufficient number of completion threads to efficiently scale to multiple
CPUs can use new function xpt_done_direct() to avoid extra context switch.
Make ahci(4) driver to use this mechanism depending on hardware setup.

Sponsored by:	iXsystems, Inc.
MFC after:	2 months


Revision 256304 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 10 22:46:49 2013 UTC (10 years, 8 months ago) by grehan
File length: 35833 byte(s)
Diff to previous 249213
Allow the legacy CDROM device to be accessed in a FreeBSD guest, while
still using enlightened drivers for other block devices.

Submitted by:	Microsoft hyperv dev team, mav@
Approved by:	re@


Revision 249213 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 6 19:12:49 2013 UTC (11 years, 2 months ago) by marius
File length: 35815 byte(s)
Diff to previous 249203
- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related
  option left but actually consumed by ada(4), so move it to opt_ada.h
  and get rid of opt_ata.h.
- Fix stand-alone build of atacore(4) by adding opt_cam.h.
- Use __FBSDID.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.


Revision 249203 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 6 15:02:06 2013 UTC (11 years, 2 months ago) by marius
File length: 35836 byte(s)
Diff to previous 249199
- Make ata_str2mode() static, it's not used outside of ata-all.c.
- Move ata_timeout() to ata-all.c so we don't need to expose both this
  function and ata_cam_end_transaction() but only the former.
- Move ata_cmd2str() from ata-queue.c to ata-all.c so we can get rid of
  the former.
- Add some missing prototypes.

MFC after:	3 days


Revision 249199 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 6 13:39:02 2013 UTC (11 years, 2 months ago) by marius
File length: 30709 byte(s)
Diff to previous 249083
Unbreak ATA_NO_48BIT_DMA with ATA_CAM by treating 48-bit DMA as an
optional property with PATA transport.

Reviewed by:	mav
MFC after:	3 days


Revision 249083 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 4 07:12:24 2013 UTC (11 years, 3 months ago) by mav
File length: 30121 byte(s)
Diff to previous 249052
Remove all legacy ATA code parts, not used since options ATA_CAM enabled in
most kernels before FreeBSD 9.0.  Remove such modules and respective kernel
options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam.  Remove the
atacontrol utility and some man pages.  Remove useless now options ATA_CAM.

No objections:	current@, stable@
MFC after:	never


Revision 249052 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 3 14:10:37 2013 UTC (11 years, 3 months ago) by mav
File length: 56146 byte(s)
Diff to previous 247165
Add some more ATA_CAM ifdefs.

Submitted by:	marius (partially)
MFC after:	1 week


Revision 247165 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 22 21:43:21 2013 UTC (11 years, 4 months ago) by mav
File length: 56070 byte(s)
Diff to previous 242422
Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713.  There are two places where ata_request is
filled in ATA_CAM: ata_cam_begin_transaction() and ata_cam_request_sense().
In the first case DMA should be done for addresses from the CCB. In second
case, DMA should be done to the different address, the address of the sense
buffer inside the CCB structure itself.


Revision 242422 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 1 00:09:01 2012 UTC (11 years, 8 months ago) by mav
File length: 56032 byte(s)
Diff to previous 242156
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt).  All other ATA PIO commands transfer one sector or 512 bytes
at one time.  Hardcode these exceptions in ata(4) with ATA_CAM option.
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.


Revision 242156 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 26 20:03:08 2012 UTC (11 years, 8 months ago) by mav
File length: 55665 byte(s)
Diff to previous 241144
Implement CAM_ATAIO_NEEDRESULT (fetching full set of result registers) for
ata(4) driver in ATA_CAM mode.  That slighty improves error reporting and
also should fix `smartctl -l scterc /dev/adaX` operation.

MFC after:	3 weeks


Revision 241144 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 2 22:03:21 2012 UTC (11 years, 9 months ago) by mav
File length: 55575 byte(s)
Diff to previous 238666
Implement SATA revision (speed) control for legacy SATA controller for
both boot (via loader tunables) and run-time (via `camcontrol negotiate`).
Tested to work at least on NVIDIA MCP55 chipset.

H/w provided by:	glebius


Revision 238666 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 21 08:19:43 2012 UTC (11 years, 11 months ago) by mav
File length: 55238 byte(s)
Diff to previous 236847
Fix typo in bzero length argument during sense fetching.
For me it at least fixed CD burning in PIO mode.

MFC after:	3 days


Revision 236847 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 10 11:17:14 2012 UTC (12 years ago) by mav
File length: 55238 byte(s)
Diff to previous 236666
Partially revert r236666:
Return PROTO_ATA protocol in response to XPT_PATH_INQ.

smartmontools uses it to identify ATA devices and I don't know any other
place now where it is important. It could probably use XPT_GDEV_TYPE
instead for more accurate protocol information, but let it live for now.

Reported by:	matthew
MFC after:	3 days


Revision 236666 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 6 06:52:51 2012 UTC (12 years ago) by mav
File length: 55246 byte(s)
Diff to previous 236184
ATA/SATA controllers have no idea about protocol of the connected device
until transport will do some probe actions (at least soft reset).
Make ATA/SATA SIMs to not report bogus and confusing PROTO_ATA protocol.
Make ATA/SATA transport to fill that gap by reporting protocol to SIM with
XPT_SET_TRAN_SETTINGS and patching XPT_GET_TRAN_SETTINGS results if needed.


Revision 236184 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 28 14:33:15 2012 UTC (12 years, 1 month ago) by mav
File length: 55230 byte(s)
Diff to previous 235333
Make legacy ATA to not call device_add_child() with unit number but
without driver name. This fixed legacy ATA breakage by r235978.

MFC after:	1 week


Revision 235333 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 12 13:55:36 2012 UTC (12 years, 1 month ago) by mav
File length: 55210 byte(s)
Diff to previous 233282
Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing
them to the CAM SWI thread removing extra context switch.
Modify all ATA/SATA drivers to use them.

Reviewed by:	gibbs, ken
MFC after:	2 weeks


Revision 233282 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 21 16:59:39 2012 UTC (12 years, 3 months ago) by marius
File length: 55151 byte(s)
Diff to previous 233274
- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers

MFC after:	1 week


Revision 233274 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 21 08:57:15 2012 UTC (12 years, 3 months ago) by marius
File length: 55145 byte(s)
Diff to previous 230132
Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
along with functions, SYSCTLs and tunables that are not used with
ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
code for the other way around. This makes it easier to understand
which parts of ata(4) actually are used in the new world order and
to later on remove the !ATA_CAM bits. It also makes it obvious that
there is something fishy with the C-bus front-end as well as in the
ATP850 support, as these used ATA_LOCKING which is defunct in the
ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
be brought back in some form or other.

Reviewed by:	mav
MFC after:	1 week


Revision 230132 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 15 13:23:18 2012 UTC (12 years, 5 months ago) by uqs
File length: 54708 byte(s)
Diff to previous 227309
Convert files to UTF-8


Revision 227309 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 7 15:43:11 2011 UTC (12 years, 7 months ago) by ed
File length: 54707 byte(s)
Diff to previous 226179
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.


Revision 226179 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 9 21:42:02 2011 UTC (12 years, 8 months ago) by rodrigc
File length: 54700 byte(s)
Diff to previous 226064
Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined.  This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out.  These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's.  For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR:		160979
Reviewed by:	jh, Arnaud Lacombe <lacombar at gmail dot com>
Reported by:	Joe Barbish <fbsd8 at a1poweruser dot com>
MFC after:	3 days


Revision 226064 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 6 16:13:47 2011 UTC (12 years, 8 months ago) by wxs
File length: 54606 byte(s)
Diff to previous 220917
Fix a typo in a comment.

Approved by:	kib@


Revision 220917 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 21 09:02:19 2011 UTC (13 years, 2 months ago) by mav
File length: 54605 byte(s)
Diff to previous 220563
Use periodic status polling added at r214671 only in ATA_CAM mode. Legacy
mode won't receive much benefit from it due to its hot-plug limitations.


Revision 220563 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 12 09:55:24 2011 UTC (13 years, 2 months ago) by mav
File length: 54545 byte(s)
Diff to previous 215468
Implement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.
While it could be successfully done by CAM error recovery code, I was
told by several people that it is also a SIM obligation.


Revision 215468 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 18 19:28:45 2010 UTC (13 years, 7 months ago) by mav
File length: 52449 byte(s)
Diff to previous 214988
Make ATA_CAM wrapper to report SATA power management capabilities to CAM to
make it configure device to initiate transitions if controller configured
to accept them. This makes hint.ata.X.pm_level=1 mode working.


Revision 214988 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 8 15:36:15 2010 UTC (13 years, 7 months ago) by mav
File length: 51755 byte(s)
Diff to previous 214016
Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual
I/O length on underruns, that often happens for some SCSI commands.


Revision 214016 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 18 11:30:13 2010 UTC (13 years, 8 months ago) by mav
File length: 51493 byte(s)
Diff to previous 210471
Set of legacy mode SATA enchancements:
- Implement proper combined mode decoding for Intel controllers to properly
identify SATA and PATA channels and associate ATA channels with SATA ports.
This fixes wrong reporting and in some cases hard resets to wrong SATA ports.
- Improve SATA registers support to handle hot-plug events and potentially
interface errors. For ICH5/6300ESB chipsets these registers accessible via
PCI config space. For later ones they may be accessible via PCI BAR(5).
- For controllers not generating interrupts on hot-plug events, implement
periodic status polling. Use it to detect hot-plug on Intel and VIA
controllers. Same probably could also be used for Serverworks and SIS.


Revision 210471 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 25 15:43:52 2010 UTC (13 years, 11 months ago) by mav
File length: 50798 byte(s)
Diff to previous 209944
Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers to
GEOM. This information needed for proper soft-RAID's on-disk metadata
reading and writing.


Revision 209944 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 12 12:16:11 2010 UTC (13 years, 11 months ago) by mav
File length: 50445 byte(s)
Diff to previous 209883
Revert and remake r209883:
Do not grab lock while setting up interrupt, as it causes LOR with
allocation code. Instead make interrupt handler check that CAM bus
initialization completed before touching it.

While there, slightly improve attach errors handling.

Reported by:	kib


Revision 209883 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 10 15:27:27 2010 UTC (13 years, 11 months ago) by mav
File length: 50326 byte(s)
Diff to previous 209872
On attach, grab channel lock before setting up interrupt. This fixes crash
in ATA_CAM mode if phy connect event arrive before CAM bus initialization
completed.


Revision 209872 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 10 13:46:14 2010 UTC (13 years, 11 months ago) by mav
File length: 50265 byte(s)
Diff to previous 209664
Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but
also controller side cable checks. Make respective sysctl writable.

PR:		kern/143462


Revision 209664 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 3 14:14:42 2010 UTC (14 years ago) by mav
File length: 50268 byte(s)
Diff to previous 208375
Add ata(4) ability to limit initial ATA mode for devices via device hints.
After boot this mode can be changed with atacontrol/camcontrol as usual.
It works for both legacy and ATA_CAM wrapper mode.

PR:		kern/123980


Revision 208375 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 21 13:29:28 2010 UTC (14 years, 1 month ago) by mav
File length: 48216 byte(s)
Diff to previous 207432
Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.


Revision 207432 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 30 08:37:00 2010 UTC (14 years, 2 months ago) by mav
File length: 47882 byte(s)
Diff to previous 204250
Add Target/LUN ID checks.


Revision 204250 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 23 16:39:53 2010 UTC (14 years, 4 months ago) by mav
File length: 48180 byte(s)
Diff to previous 204195
Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.


Revision 204195 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 22 10:45:40 2010 UTC (14 years, 4 months ago) by mav
File length: 48178 byte(s)
Diff to previous 203376
Improve output for controllers that doesn't report SATA speed.


Revision 203376 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 2 11:09:28 2010 UTC (14 years, 5 months ago) by mav
File length: 47934 byte(s)
Diff to previous 203108
- Give ATA/SATA SIMs info about ATAPI packet size, supported by device.
- Make ATA XPT to reject longer SCSI CDBs then supported by device, or
any SCSI CDBs, if device doesn't support ATAPI.


Revision 203108 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 28 08:41:30 2010 UTC (14 years, 5 months ago) by mav
File length: 47456 byte(s)
Diff to previous 201990
MFp4: Large set of CAM inprovements.

- Unify bus reset/probe sequence. Whenever bus attached at boot or later,
CAM will automatically reset and scan it. It allows to remove duplicate
code from many drivers.
- Any bus, attached before CAM completed it's boot-time initialization,
will equally join to the process, delaying boot if needed.
- New kern.cam.boot_delay loader tunable should help controllers that
are still unable to register their buses in time (such as slow USB/
PCCard/ CardBus devices), by adding one more event to wait on boot.
- To allow synchronization between different CAM levels, concept of
requests priorities was extended. Priorities now split between several
"run levels". Device can be freezed at specified level, allowing higher
priority requests to pass. For example, no payload requests allowed,
until PMP driver enable port. ATA XPT negotiate transfer parameters,
periph driver configure caching and so on.
- Frozen requests are no more counted by request allocation scheduler.
It fixes deadlocks, when frozen low priority payload requests occupying
slots, required by higher levels to manage theit execution.
- Two last changes were holding proper ATA reinitialization and error
recovery implementation. Now it is done: SATA controllers and Port
Multipliers now implement automatic hot-plug and should correctly
recover from timeouts and bus resets.
- Improve SCSI error recovery for devices on buses without automatic sense
reporting, such as ATAPI or USB. For example, it allows CAM to wait, while
CD drive loads disk, instead of immediately return error status.
- Decapitalize diagnostic messages and make them more readable and sensible.
- Teach PMP driver to limit maximum speed on fan-out ports.
- Make boot wait for PMP scan completes, and make rescan more reliable.
- Fix pass driver, to return CCB to user level in case of error.
- Increase number of retries in cd driver, as device may return several UAs.


Revision 201990 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 10 09:20:56 2010 UTC (14 years, 5 months ago) by mav
File length: 47143 byte(s)
Diff to previous 200459
- Report SATA in legacy emulation mode still as SATA.
- Make ATA XPT able to handle such case.


Revision 200459 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 13 00:13:21 2009 UTC (14 years, 6 months ago) by marius
File length: 47312 byte(s)
Diff to previous 200359
Unbreak the ata_atapi() usage. Since r200171 the mode setting functions
get a ata_device type device passed instead of a ata_channel one, thus
ata_atapi() has to be adjusted accordingly.

Reviewed by:	mav
MFC after:	3 days


Revision 200359 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 10 16:55:16 2009 UTC (14 years, 6 months ago) by takawata
File length: 47380 byte(s)
Diff to previous 200171
Add module dependency for cam if configured as ATA_CAM.


Revision 200171 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 6 00:10:13 2009 UTC (14 years, 7 months ago) by mav
File length: 47324 byte(s)
Diff to previous 199822
MFp4:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this options deprecates all ata(4)
peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers
(ada, cd, ...) and interfaces to be natively used instead.

As side effect of this, ata(4) mode setting code was completely rewritten
to make controller API more strict and permit above change. While doing
this, SATA revision was separated from PATA mode. It allows DMA-incapable
SATA devices to operate and makes hw.ata.atapi_dma tunable work again.

Also allow ata(4) controller drivers (except some specific or broken ones)
to handle larger data transfers. Previous constraint of 64K was artificial
and is not really required by PCI ATA BM specification or hardware.

Submitted by:	nwitehorn (powerpc part)


Revision 199822 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 26 12:41:43 2009 UTC (14 years, 7 months ago) by mav
File length: 31361 byte(s)
Diff to previous 198717
Drop USB mass storage devices support from ata(4). It is out of the build as
long as I remember, and completely superseded by better maintained umass(4).
It's main idea was to optionally avoid CAM dependency for such devices, but
with move ATA to CAM, it is not actual any more.

No objections:	hselasky@, thompsa@, arch@


Revision 198717 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 31 13:24:14 2009 UTC (14 years, 8 months ago) by mav
File length: 31461 byte(s)
Diff to previous 196403
MFp4:
- Remove most of direct relations between ATA(4) peripherial and controller
levels. It makes logic more transparent and is a mandatory step to wrap
ATA(4) controller level into ATA-native CAM SIM.
- Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger
I/O transaction sizes without additional cost.


Revision 196403 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 20 19:17:53 2009 UTC (14 years, 10 months ago) by jhb
File length: 31495 byte(s)
Diff to previous 196037
Temporarily revert the new-bus locking for 8.0 release.  It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio


Revision 196037 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 2 14:28:40 2009 UTC (14 years, 11 months ago) by attilio
File length: 31341 byte(s)
Diff to previous 195893
Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)


Revision 195893 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 26 14:04:48 2009 UTC (14 years, 11 months ago) by mav
File length: 31495 byte(s)
Diff to previous 195724
Restore PATA device probe order, broken by PMP support implementation,
requesting IDENTIFY from slave device first. This order is important
for proper cable type detection by master device.

PR:		kern/136438
Approved by:	re (kib)


Revision 195724 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 16 19:48:39 2009 UTC (14 years, 11 months ago) by mav
File length: 31049 byte(s)
Diff to previous 192479
Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size.
It fixes kernel panic when requested size is too large (0xffffffff),

PR:             kern/136726
Approved by:    re (kib)
MFC after:      2 weeks


Revision 192479 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 20 21:31:47 2009 UTC (15 years, 1 month ago) by imp
File length: 30870 byte(s)
Diff to previous 192450
Last commit was in error, revert.


Revision 192450 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 20 17:29:21 2009 UTC (15 years, 1 month ago) by imp
File length: 30875 byte(s)
Diff to previous 189195
We no longer need to use d_thread_t, migrate to struct thread *.


Revision 189195 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 28 22:07:15 2009 UTC (15 years, 4 months ago) by mav
File length: 30870 byte(s)
Diff to previous 189166
Revert my ata_identify()/ata_reinit() related changes: r189166, r189091
and partially r188903. Revert breaks new drives detection on reinit to the
state as it was before me, but fixes series of new bugs reported by some
people.

Unconditional queueing of ata_completed() calls can lead to deadlock if
due to timeout ata_reinit() was called at the same thread by previous
ata_completed(). Calling of ata_identify() on ata_reinit() in current
implementation opens numerous races and deadlocks.

Problems I was touching here are still exist and should be addresed, but
probably in different way.


Revision 189166 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 28 11:25:05 2009 UTC (15 years, 4 months ago) by mav
File length: 30904 byte(s)
Diff to previous 189094
Rework device probing by moving ata_getparam() call from ata_identify() to
drivers' probe routines. It allows not to sleep and so not drop Giant inside
ata_identify() critical section and so avoid crash if it reentered on
request timeout. Reentering of probe call checked inside of it.

Give device own knowledge about it's type (ata/atapi/atapicam). It is not
a good idea to ask channel status for device type inside ata_getparam().

Add softc memory deallocation on device destruction.


Revision 189094 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 26 23:07:40 2009 UTC (15 years, 4 months ago) by mav
File length: 30865 byte(s)
Diff to previous 189091
Unhide IDENTIFY command timeouts when verbose messages enabled.
I think it should be suitable for debugging.


Revision 189091 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 26 21:33:48 2009 UTC (15 years, 4 months ago) by mav
File length: 30822 byte(s)
Diff to previous 188936
Remove direct ata_completed() call options from ata_finish(), except for the
kernel dumping case.

ata_completed() may initiate ata_reinit() on error, that may lead to drives
attach or detach. Attach and detach are sending requests to drives and sleep
waiting for results. But ata_finish() can be called directly from
interrupt handler where sleeping is prohibited, so we must break this chain
somewhere. This place seems to fit best.


Revision 188936 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 23 08:58:29 2009 UTC (15 years, 4 months ago) by mav
File length: 30822 byte(s)
Diff to previous 188912
Do not call devices probe/attach if there is nothing new was found.


Revision 188912 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 22 10:26:02 2009 UTC (15 years, 4 months ago) by mav
File length: 30764 byte(s)
Diff to previous 188903
Remove one more place of master/slave terms usage.


Revision 188903 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 21 22:57:26 2009 UTC (15 years, 4 months ago) by mav
File length: 30854 byte(s)
Diff to previous 188812
Improve ata_reinit():
 - protect againtst recursions,
 - add new devices detection using ata_identify().

Improve ata_identify():
 - do not add duplicate device if device already exist.

Rework SATA hot-plug events handling. Instead of unsafe duplicate
implementation use common ata_reinit() to handle all state changes.

All together this gives quite stable and robust cold- and hot-plug operation,
invariant to false, lost and duplicate events.


Revision 188812 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 19 12:47:24 2009 UTC (15 years, 4 months ago) by mav
File length: 29916 byte(s)
Diff to previous 188763
Use channel driver's attach/detach routines instead of ata_attach()/
ata_detach() to implement IOCATAATTACH/IOCATADETACH ioctls.
This will permit channel drivers to properly shutdown port hardware on channel
detach and init it on attach.


Revision 188763 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 18 21:12:48 2009 UTC (15 years, 4 months ago) by mav
File length: 29875 byte(s)
Diff to previous 188755
Make ch->dma.free() called symmetrically to ch->dma.alloc().


Revision 188755 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 18 18:36:13 2009 UTC (15 years, 4 months ago) by mav
File length: 29785 byte(s)
Diff to previous 188733
Remove unused variable.

Submitted by:	ganbold


Revision 188733 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 17 21:35:17 2009 UTC (15 years, 4 months ago) by mav
File length: 29820 byte(s)
Diff to previous 188731
Remove useless return, that left from previous commit.


Revision 188731 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 17 21:17:21 2009 UTC (15 years, 4 months ago) by mav
File length: 29832 byte(s)
Diff to previous 183724
ata_interrupt() does not need to return anything. It is not it's business
to report request completion, expecially when it is not reliable.


Revision 183724 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 9 12:56:57 2008 UTC (15 years, 8 months ago) by sos
File length: 29852 byte(s)
Diff to previous 181753
This is the roumored ATA modulerisation works, and it needs a little explanation.

If you just config KERNEL as usual there should be no apparent changes, you'll get all chipset support code compiled in.

However there is now a way to only compile in code for chipsets needed on a pr vendor basis. ATA now has the following "device" entries:

atacore:	ATA core functionality, always needed for any ATA setup

atacard:	CARDBUS support
atacbus:	PC98 cbus support
ataisa:		ISA bus support
atapci:		PCI bus support only generic chipset support.

ataahci:	AHCI support, also pulled in by some vendor modules.

ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, atamarvell, atamicron, atanational, atanetcell, atanvidia, atapromise, ataserverworks, atasiliconimage, atasis, atavia;	Vendor support, ie atavia for VIA chipsets

atadisk:	ATA disk driver
ataraid:	ATA softraid driver

atapicd:	ATAPI cd/dvd driver
atapifd:	ATAPI floppy/flashdisk driver
atapist:	ATAPI tape driver

atausb:		ATA<>USB bridge
atapicam:	ATA<>CAM bridge

This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:

device          atacore
device          atapci
device          atavia

And then you need the atadisk, atapicd etc lines in there just as usual.

If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.


Revision 181753 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 15 10:55:11 2008 UTC (15 years, 10 months ago) by philip
File length: 29721 byte(s)
Diff to previous 179717
Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1.
This can be used to disable the 80pin cable check on systems which forget to
set the bit -- such as certain laptops and Soekris boards.

PR:		kern/114605 (somewhat reworked)
Submitted by:	marck
MFC after:	1 week


Revision 179717 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 11 06:44:58 2008 UTC (16 years ago) by sos
File length: 29474 byte(s)
Diff to previous 179312
Rearrange how to call dma.alloc() so that we have resources alloc'd when need but also late enough to know how many to create.


Revision 179312 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 26 08:58:48 2008 UTC (16 years, 1 month ago) by sos
File length: 29379 byte(s)
Diff to previous 178339
Dont call ata_start() when ata_reinit fails in the ioctl path.


Revision 178339 - (view) (download) (annotate) - [select for diffs]
Modified Sun Apr 20 17:45:32 2008 UTC (16 years, 2 months ago) by bz
File length: 29399 byte(s)
Diff to previous 178300
devclass_get_maxunit() returns n+1 with n starting at 0.
So if we have channel 0..3  devclass_get_maxunit is 4.

It's never been a problem as devclass_get_device() has
catched a possibly bad input.

Discussed with:	scottl


Revision 178300 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 18 15:15:04 2008 UTC (16 years, 2 months ago) by sos
File length: 29337 byte(s)
Diff to previous 178278
Fix the breakage that caused AHCI devices to vanish. Editor droppings :(

Put the ATAPI device numbering back to the old ways.


Revision 178278 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 17 12:29:35 2008 UTC (16 years, 2 months ago) by sos
File length: 29327 byte(s)
Diff to previous 178128
Go back to preallocating everything possible on init.
This avoids calling busdma in the request processing path which caused a traumatic performance degradation.
Allocation has be postponed to after we know how many devices we possible can have on portmulitpliers to save some space.


Revision 178128 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 11 22:56:27 2008 UTC (16 years, 2 months ago) by sos
File length: 31174 byte(s)
Diff to previous 178114
Fix badly placed '{'
Dont leak requests on busdma failure (not that we'd get anywhere anyhow).

Reported by: antoine@


Revision 178114 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 11 11:30:27 2008 UTC (16 years, 2 months ago) by sos
File length: 31046 byte(s)
Diff to previous 178067
Fix the brokenness in the former commit, sorry for the mess.
The problem is that the PM support is part of a much larger WIP here, but due to popular demand I decided to get some of it imported.

Also I forgot the mention:

HW sponsored by: Vitsch Electronics / VEHosting


Revision 178067 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 10 13:05:05 2008 UTC (16 years, 2 months ago) by sos
File length: 29274 byte(s)
Diff to previous 177298
Add experimental support for SATA Port Multipliers

Support is working on the Silicon Image SiI3124/3132.
Support is working on some AHCI chips but far from all.

Remember this is WIP, so test reports and (constructive) suggestions are welcome!


Revision 177298 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 17 10:33:23 2008 UTC (16 years, 3 months ago) by phk
File length: 28966 byte(s)
Diff to previous 172446
Add a "spindown" facility to ata-disks:  If no requests have been received
for a configurable number of seconds, spin the disk down.  Spin it back
up on the next request.

Notice that the timeout is only armed by a request, so to spin down a
disk you may have to do:

	atacontrol spindown ad10 5
	dd if=/dev/ad10 of=/dev/null count=1

To disable spindown, set timeout to zero:

	atacontrol spindown ad10 0

In order to debug any trouble caused, this code is somewhat noisy on the
console.

Enabling spindown on a disk containing / or /var/log/messages is not
going to do anything sensible.

Spinning a disk up and down all the time will wear it out, use sensibly.

Approved by:	sos


Revision 172446 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 4 19:17:16 2007 UTC (16 years, 9 months ago) by sos
File length: 28838 byte(s)
Diff to previous 166909
Add support for the VIA 8237S
Fix the LBA28/LBA48 crossover bug.

Approved by: re@


Revision 166909 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 23 16:25:08 2007 UTC (17 years, 4 months ago) by jhb
File length: 28813 byte(s)
Diff to previous 166901
Use 'pause' in several places rather than trying to tsleep() on NULL (which
triggers a KASSERT) or local variables.  In the case of kern_ndis, the
tsleep() actually used a common sleep address (curproc) making it
susceptible to a premature wakeup.


Revision 166901 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 23 12:19:07 2007 UTC (17 years, 4 months ago) by piso
File length: 28865 byte(s)
Diff to previous 166878
o break newbus api: add a new argument of type driver_filter_t to
  bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


Revision 166878 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 21 19:07:19 2007 UTC (17 years, 4 months ago) by sos
File length: 28859 byte(s)
Diff to previous 165286
Update copyright headers.


Revision 165286 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 16 14:00:54 2006 UTC (17 years, 6 months ago) by cognet
File length: 28859 byte(s)
Diff to previous 164354
Do not special-case __ARMEB__, we handle that in the arm code.

Approved by:	sos


Revision 164354 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 11:13:47 2006 UTC (17 years, 7 months ago) by sos
File length: 28884 byte(s)
Diff to previous 162221
Deal more generically with the byteswap needed on !littleendian HW.
Account for the odd layout on ARM bigendian HW.


Revision 162221 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 11 18:33:59 2006 UTC (17 years, 9 months ago) by sos
File length: 28895 byte(s)
Diff to previous 158471
CF devices are ATA not ATAPI.


Revision 158471 - (view) (download) (annotate) - [select for diffs]
Added Fri May 12 05:04:46 2006 UTC (18 years, 1 month ago) by jhb
File length: 28801 byte(s)
Diff to previous 157756
Remove various bits of conditional Alpha code and fixup a few comments.



This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27