Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/dev/ata/ata-all.c

[BACK] Up to [FreeBSD] / src / sys / dev / ata

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.335: download - view: text, markup, annotated - select for diffs
Sun Jan 15 13:23:18 2012 UTC (3 weeks, 4 days ago) by uqs
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +1 -1 lines
SVN rev 230132 on 2012-01-15 13:23:18Z by uqs

Convert files to UTF-8

Revision 1.331.2.2.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.331.2.2: preferred, colored; next MAIN 1.332: preferred, colored
Changes since revision 1.331.2.2: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.334: download - view: text, markup, annotated - select for diffs
Mon Nov 7 15:43:11 2011 UTC (3 months ago) by ed
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +1 -1 lines
SVN rev 227309 on 2011-11-07 15:43:11Z by ed

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 1.331.2.2: download - view: text, markup, annotated - select for diffs
Wed Oct 26 17:04:26 2011 UTC (3 months, 2 weeks ago) by rodrigc
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.331.2.1: preferred, colored; branchpoint 1.331: preferred, colored; next MAIN 1.332: preferred, colored
Changes since revision 1.331.2.1: +3 -0 lines
SVN rev 226800 on 2011-10-26 17:04:26Z by rodrigc

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>
Approved by:	re (kib)
Reported by:	Joe Barbish <fbsd8 at a1poweruser dot com>

Revision 1.333: download - view: text, markup, annotated - select for diffs
Sun Oct 9 21:42:02 2011 UTC (4 months ago) by rodrigc
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +3 -0 lines
SVN rev 226179 on 2011-10-09 21:42:02Z by rodrigc

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 1.332: download - view: text, markup, annotated - select for diffs
Thu Oct 6 16:13:47 2011 UTC (4 months ago) by wxs
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +1 -1 lines
SVN rev 226064 on 2011-10-06 16:13:47Z by wxs

Fix a typo in a comment.

Approved by:	kib@

Revision 1.331.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.308.2.21: download - view: text, markup, annotated - select for diffs
Thu Apr 28 07:33:14 2011 UTC (9 months, 2 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.20: preferred, colored; branchpoint 1.308: preferred, colored; next MAIN 1.309: preferred, colored
Changes since revision 1.308.2.20: +13 -7 lines
SVN rev 221155 on 2011-04-28 07:33:14Z by mav

MFC r220917:
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 1.331: download - view: text, markup, annotated - select for diffs
Thu Apr 21 09:02:19 2011 UTC (9 months, 3 weeks ago) by mav
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +13 -7 lines
SVN rev 220917 on 2011-04-21 09:02:19Z by mav

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 1.308.2.20: download - view: text, markup, annotated - select for diffs
Tue Apr 19 17:01:05 2011 UTC (9 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.19: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.19: +78 -2 lines
SVN rev 220855 on 2011-04-19 17:01:05Z by mav

MFC r220563:
Implement automatic SCSI sense fetching for ata(4) in ATA_CAM mode.

Revision 1.330: download - view: text, markup, annotated - select for diffs
Tue Apr 12 09:55:24 2011 UTC (9 months, 4 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +78 -2 lines
SVN rev 220563 on 2011-04-12 09:55:24Z by mav

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 1.280.2.10.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.280.2.10: preferred, colored; next MAIN 1.281: preferred, colored
Changes since revision 1.280.2.10: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.308.2.19.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.308.2.19: preferred, colored; next MAIN 1.308.2.20: preferred, colored
Changes since revision 1.308.2.19: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.308.2.19: download - view: text, markup, annotated - select for diffs
Tue Nov 23 21:42:26 2010 UTC (14 months, 2 weeks ago) by mav
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.308.2.18: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.18: +19 -0 lines
SVN rev 215777 on 2010-11-23 21:42:26Z by mav

MFC r215468:
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 1.308.2.18: download - view: text, markup, annotated - select for diffs
Fri Nov 19 09:14:53 2010 UTC (14 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.17: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.17: +9 -0 lines
SVN rev 215509 on 2010-11-19 09:14:53Z by mav

MFC r214988:
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 1.329: download - view: text, markup, annotated - select for diffs
Thu Nov 18 19:28:45 2010 UTC (14 months, 3 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +19 -0 lines
SVN rev 215468 on 2010-11-18 19:28:45Z by mav

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 1.328: download - view: text, markup, annotated - select for diffs
Mon Nov 8 15:36:15 2010 UTC (15 months ago) by mav
Branches: MAIN
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +9 -0 lines
SVN rev 214988 on 2010-11-08 15:36:15Z by mav

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 1.308.2.17: download - view: text, markup, annotated - select for diffs
Tue Nov 2 09:26:12 2010 UTC (15 months, 1 week ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.16: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.16: +21 -0 lines
SVN rev 214671 on 2010-11-02 09:26:12Z by mav

MFC r214016:
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 1.327: download - view: text, markup, annotated - select for diffs
Mon Oct 18 11:30:13 2010 UTC (15 months, 3 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +21 -0 lines
SVN rev 214016 on 2010-10-18 11:30:13Z by mav

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 1.326: download - view: text, markup, annotated - select for diffs
Sun Jul 25 15:43:52 2010 UTC (18 months, 2 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +10 -1 lines
SVN rev 210471 on 2010-07-25 15:43:52Z by mav

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 1.308.2.16: download - view: text, markup, annotated - select for diffs
Sun Jul 18 07:23:00 2010 UTC (18 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.15: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.15: +12 -4 lines
SVN rev 210208 on 2010-07-18 07:23:00Z by mav

MFC r209883, r209944:
Make interrupt handler check that CAM bus initialization completed before
touching it. It fixes possible panic during controller attach in ATA_CAM
mode.

While there, slightly improve attach errors handling.

Revision 1.308.2.15: download - view: text, markup, annotated - select for diffs
Sun Jul 18 07:11:03 2010 UTC (18 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.14: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.14: +1 -1 lines
SVN rev 210204 on 2010-07-18 07:11:03Z by mav

MFC r209872:
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 1.308.2.14: download - view: text, markup, annotated - select for diffs
Fri Jul 16 09:12:47 2010 UTC (18 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.13: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.13: +55 -2 lines
SVN rev 210164 on 2010-07-16 09:12:47Z by mav

MFC r209664:
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 1.325: download - view: text, markup, annotated - select for diffs
Mon Jul 12 12:16:11 2010 UTC (19 months ago) by mav
Branches: MAIN
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +15 -9 lines
SVN rev 209944 on 2010-07-12 12:16:11Z by mav

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 1.324: download - view: text, markup, annotated - select for diffs
Sat Jul 10 15:27:27 2010 UTC (19 months ago) by mav
Branches: MAIN
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +5 -3 lines
SVN rev 209883 on 2010-07-10 15:27:27Z by mav

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 1.323: download - view: text, markup, annotated - select for diffs
Sat Jul 10 13:46:14 2010 UTC (19 months ago) by mav
Branches: MAIN
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +1 -1 lines
SVN rev 209872 on 2010-07-10 13:46:14Z by mav

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 1.322: download - view: text, markup, annotated - select for diffs
Sat Jul 3 14:14:42 2010 UTC (19 months, 1 week ago) by mav
Branches: MAIN
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +55 -2 lines
SVN rev 209664 on 2010-07-03 14:14:42Z by mav

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 1.308.2.13.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.308.2.13: preferred, colored; next MAIN 1.308.2.14: preferred, colored
Changes since revision 1.308.2.13: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.308.2.13: download - view: text, markup, annotated - select for diffs
Sun May 23 11:29:34 2010 UTC (20 months, 2 weeks ago) by mav
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.308.2.12: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.12: +15 -4 lines
SVN rev 208448 on 2010-05-23 11:29:34Z by mav

MFC r208375, r208393:
Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.

Revision 1.321: download - view: text, markup, annotated - select for diffs
Fri May 21 13:29:28 2010 UTC (20 months, 3 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +15 -4 lines
SVN rev 208375 on 2010-05-21 13:29:28Z by mav

Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.

Revision 1.308.2.12: download - view: text, markup, annotated - select for diffs
Sat May 8 13:07:50 2010 UTC (21 months ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.11: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.11: +26 -39 lines
SVN rev 207773 on 2010-05-08 13:07:50Z by mav

MFC r207432:
Add Target/LUN ID checks.

Revision 1.252.2.15: download - view: text, markup, annotated - select for diffs
Tue May 4 05:17:11 2010 UTC (21 months, 1 week ago) by delphij
Branches: RELENG_6
Diff to: previous 1.252.2.14: preferred, colored; branchpoint 1.252: preferred, colored; next MAIN 1.253: preferred, colored
Changes since revision 1.252.2.14: +1 -1 lines
SVN rev 207597 on 2010-05-04 05:17:11Z by delphij

Fixup MFC.  I should have done test build before committing this.

Pointy hat to:	delphij

Revision 1.252.2.14: download - view: text, markup, annotated - select for diffs
Tue May 4 00:42:03 2010 UTC (21 months, 1 week ago) by delphij
Branches: RELENG_6
Diff to: previous 1.252.2.13: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.13: +5 -0 lines
SVN rev 207591 on 2010-05-04 00:42:03Z by delphij

MFC r195724 (mav):

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

Revision 1.320: download - view: text, markup, annotated - select for diffs
Fri Apr 30 08:37:00 2010 UTC (21 months, 1 week ago) by mav
Branches: MAIN
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +26 -39 lines
SVN rev 207432 on 2010-04-30 08:37:00Z by mav

Add Target/LUN ID checks.

Revision 1.308.2.11: download - view: text, markup, annotated - select for diffs
Wed Mar 3 19:12:53 2010 UTC (23 months, 1 week ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.10: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.10: +3 -3 lines
SVN rev 204652 on 2010-03-03 19:12:53Z by mav

MFC r204250:
Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.

Revision 1.308.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 1 19:16:34 2010 UTC (23 months, 1 week ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.9: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.9: +10 -2 lines
SVN rev 204528 on 2010-03-01 19:16:34Z by mav

MFC r204195:
Improve output for controllers that doesn't report SATA speed.

Revision 1.319: download - view: text, markup, annotated - select for diffs
Tue Feb 23 16:39:53 2010 UTC (23 months, 2 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +3 -3 lines
SVN rev 204250 on 2010-02-23 16:39:53Z by mav

Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.

Revision 1.318: download - view: text, markup, annotated - select for diffs
Mon Feb 22 10:45:40 2010 UTC (23 months, 2 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +10 -2 lines
SVN rev 204195 on 2010-02-22 10:45:40Z by mav

Improve output for controllers that doesn't report SATA speed.

Revision 1.308.2.9: download - view: text, markup, annotated - select for diffs
Sun Feb 14 19:44:48 2010 UTC (23 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.8: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.8: +12 -3 lines
SVN rev 203890 on 2010-02-14 19:44:48Z by mav

MFC r203376, r203384:
- 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 1.308.2.8: download - view: text, markup, annotated - select for diffs
Sun Feb 14 19:38:27 2010 UTC (23 months, 3 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.7: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.7: +21 -6 lines
SVN rev 203889 on 2010-02-14 19:38:27Z by mav

MFC r203108:
Large set of CAM improvements:
- 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 1.280.2.10.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.280.2.10: preferred, colored; next MAIN 1.281: preferred, colored
Changes since revision 1.280.2.10: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.317: download - view: text, markup, annotated - select for diffs
Tue Feb 2 11:09:28 2010 UTC (2 years ago) by mav
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +12 -3 lines
SVN rev 203376 on 2010-02-02 11:09:28Z by mav

- 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 1.316: download - view: text, markup, annotated - select for diffs
Thu Jan 28 08:41:30 2010 UTC (2 years ago) by mav
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +21 -6 lines
SVN rev 203108 on 2010-01-28 08:41:30Z by mav

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 1.308.2.7: download - view: text, markup, annotated - select for diffs
Tue Jan 19 13:00:33 2010 UTC (2 years ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.6: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.6: +3 -5 lines
SVN rev 202616 on 2010-01-19 13:00:33Z by mav

MFC r201990:
- Report SATA in legacy emulation mode still as SATA.
- Make ATA XPT able to handle such case.

Revision 1.315: download - view: text, markup, annotated - select for diffs
Sun Jan 10 09:20:56 2010 UTC (2 years, 1 month ago) by mav
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +3 -5 lines
SVN rev 201990 on 2010-01-10 09:20:56Z by mav

- Report SATA in legacy emulation mode still as SATA.
- Make ATA XPT able to handle such case.

Revision 1.308.2.6: download - view: text, markup, annotated - select for diffs
Wed Dec 16 18:39:32 2009 UTC (2 years, 1 month ago) by marius
Branches: RELENG_8
Diff to: previous 1.308.2.5: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.5: +3 -4 lines
SVN rev 200611 on 2009-12-16 18:39:32Z by marius

MFC: r200459

Unbreak the ata_atapi() usage. Since r200171 (MFC'ed in r200432) 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

Revision 1.314: download - view: text, markup, annotated - select for diffs
Sun Dec 13 00:13:21 2009 UTC (2 years, 1 month ago) by marius
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +3 -4 lines
SVN rev 200459 on 2009-12-13 00:13:21Z by marius

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 1.308.2.5: download - view: text, markup, annotated - select for diffs
Sat Dec 12 10:37:31 2009 UTC (2 years, 1 month ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.4: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.4: +567 -7 lines
SVN rev 200432 on 2009-12-12 10:37:31Z by mav

MFC r200171, r200182, r200275, r200295, r200359:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this option 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.(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 1.313: download - view: text, markup, annotated - select for diffs
Thu Dec 10 16:55:16 2009 UTC (2 years, 2 months ago) by takawata
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +3 -0 lines
SVN rev 200359 on 2009-12-10 16:55:16Z by takawata

Add module dependency for cam if configured as ATA_CAM.

Revision 1.312: download - view: text, markup, annotated - select for diffs
Sun Dec 6 00:10:13 2009 UTC (2 years, 2 months ago) by mav
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +564 -7 lines
SVN rev 200171 on 2009-12-06 00:10:13Z by mav

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 1.308.2.4: download - view: text, markup, annotated - select for diffs
Wed Dec 2 10:47:11 2009 UTC (2 years, 2 months ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.3: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.3: +0 -3 lines
SVN rev 200024 on 2009-12-02 10:47:11Z by mav

MFC r199822:
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 1.311: download - view: text, markup, annotated - select for diffs
Thu Nov 26 12:41:43 2009 UTC (2 years, 2 months ago) by mav
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +0 -3 lines
SVN rev 199822 on 2009-11-26 12:41:43Z by mav

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 1.308.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 23 08:45:17 2009 UTC (2 years, 2 months ago) by mav
Branches: RELENG_8
Diff to: previous 1.308.2.2: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.2: +4 -4 lines
SVN rev 199696 on 2009-11-23 08:45:17Z by mav

MFC r198717:
- 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 1.310: download - view: text, markup, annotated - select for diffs
Sat Oct 31 13:24:14 2009 UTC (2 years, 3 months ago) by mav
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +4 -4 lines
SVN rev 198717 on 2009-10-31 13:24:14Z by mav

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 1.308.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.308.2.2: preferred, colored; next MAIN 1.308.2.3: preferred, colored
Changes since revision 1.308.2.2: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.308.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 20 20:23:28 2009 UTC (2 years, 5 months ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.308.2.1: preferred, colored; branchpoint 1.308: preferred, colored
Changes since revision 1.308.2.1: +15 -19 lines
SVN rev 196405 on 2009-08-20 20:23:28Z by jhb

MFC 196403: Temporarily revert the new-bus locking for 8.0 release.

Approved by:	re (kib)

Revision 1.309: download - view: text, markup, annotated - select for diffs
Thu Aug 20 19:17:53 2009 UTC (2 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +15 -19 lines
SVN rev 196403 on 2009-08-20 19:17:53Z by jhb

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 1.308.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.308: download - view: text, markup, annotated - select for diffs
Sun Aug 2 14:28:40 2009 UTC (2 years, 6 months ago) by attilio
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +19 -15 lines
SVN rev 196037 on 2009-08-02 14:28:40Z by attilio

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 1.280.2.10: download - view: text, markup, annotated - select for diffs
Fri Jul 31 07:53:09 2009 UTC (2 years, 6 months ago) by mav
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP
Branch point for: RELENG_7_4, RELENG_7_3
Diff to: previous 1.280.2.9: preferred, colored; branchpoint 1.280: preferred, colored; next MAIN 1.281: preferred, colored
Changes since revision 1.280.2.9: +1 -1 lines
SVN rev 195987 on 2009-07-31 07:53:09Z by mav

Fix build breakage introduced by rev. 195973 due to difference from HEAD,

Submitted by:	Oliver Pinter

Revision 1.280.2.9: download - view: text, markup, annotated - select for diffs
Thu Jul 30 13:19:12 2009 UTC (2 years, 6 months ago) by mav
Branches: RELENG_7
Diff to: previous 1.280.2.8: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.8: +5 -0 lines
SVN rev 195973 on 2009-07-30 13:19:12Z by mav

MFC rev. 195724:

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

Revision 1.307: download - view: text, markup, annotated - select for diffs
Sun Jul 26 14:04:48 2009 UTC (2 years, 6 months ago) by mav
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +17 -1 lines
SVN rev 195893 on 2009-07-26 14:04:48Z by mav

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 1.306: download - view: text, markup, annotated - select for diffs
Thu Jul 16 19:48:39 2009 UTC (2 years, 6 months ago) by mav
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +5 -0 lines
SVN rev 195724 on 2009-07-16 19:48:39Z by mav

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 1.305: download - view: text, markup, annotated - select for diffs
Wed May 20 21:31:47 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +1 -1 lines
SVN rev 192479 on 2009-05-20 21:31:47Z by imp

Last commit was in error, revert.

Revision 1.304: download - view: text, markup, annotated - select for diffs
Wed May 20 17:29:21 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +1 -1 lines
SVN rev 192450 on 2009-05-20 17:29:21Z by imp

We no longer need to use d_thread_t, migrate to struct thread *.

Revision 1.280.2.8.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.280.2.8: preferred, colored; next MAIN 1.280.2.9: preferred, colored
Changes since revision 1.280.2.8: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.280.2.8: download - view: text, markup, annotated - select for diffs
Tue Mar 3 08:14:43 2009 UTC (2 years, 11 months ago) by mav
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.280.2.7: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.7: +3 -4 lines
SVN rev 189299 on 2009-03-03 08:14:43Z by mav

MFC rev. 188700, 188731, 188733.

Make core dumping to ad not to freeze even if interrupts, not disabled
for some reason (noticed on SMP), stealing our events.

ata_interrupt() does not need to return anything. It is not it's business
to report request completion, expecially when it is not reliable.

PR:		kern/114370, kern/115801

Revision 1.303: download - view: text, markup, annotated - select for diffs
Sat Feb 28 22:07:15 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +41 -46 lines
SVN rev 189195 on 2009-02-28 22:07:15Z by mav

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 1.302: download - view: text, markup, annotated - select for diffs
Sat Feb 28 11:25:05 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +44 -39 lines
SVN rev 189166 on 2009-02-28 11:25:05Z by mav

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 1.301: download - view: text, markup, annotated - select for diffs
Thu Feb 26 23:07:40 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +3 -1 lines
SVN rev 189094 on 2009-02-26 23:07:40Z by mav

Unhide IDENTIFY command timeouts when verbose messages enabled.
I think it should be suitable for debugging.

Revision 1.300: download - view: text, markup, annotated - select for diffs
Thu Feb 26 21:33:48 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +1 -1 lines
SVN rev 189091 on 2009-02-26 21:33:48Z by mav

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 1.299: download - view: text, markup, annotated - select for diffs
Mon Feb 23 08:58:29 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +4 -0 lines
SVN rev 188936 on 2009-02-23 08:58:29Z by mav

Do not call devices probe/attach if there is nothing new was found.

Revision 1.298: download - view: text, markup, annotated - select for diffs
Sun Feb 22 10:26:02 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +1 -2 lines
SVN rev 188912 on 2009-02-22 10:26:02Z by mav

Remove one more place of master/slave terms usage.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Sat Feb 21 22:57:26 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +37 -4 lines
SVN rev 188903 on 2009-02-21 22:57:26Z by mav

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 1.296: download - view: text, markup, annotated - select for diffs
Thu Feb 19 12:47:24 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +10 -8 lines
SVN rev 188812 on 2009-02-19 12:47:24Z by mav

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 1.295: download - view: text, markup, annotated - select for diffs
Wed Feb 18 21:12:48 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +5 -0 lines
SVN rev 188763 on 2009-02-18 21:12:48Z by mav

Make ch->dma.free() called symmetrically to ch->dma.alloc().

Revision 1.294: download - view: text, markup, annotated - select for diffs
Wed Feb 18 18:36:13 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +1 -2 lines
SVN rev 188755 on 2009-02-18 18:36:13Z by mav

Remove unused variable.

Submitted by:	ganbold

Revision 1.293: download - view: text, markup, annotated - select for diffs
Tue Feb 17 21:35:17 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +0 -1 lines
SVN rev 188733 on 2009-02-17 21:35:17Z by mav

Remove useless return, that left from previous commit.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Tue Feb 17 21:17:21 2009 UTC (2 years, 11 months ago) by mav
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +4 -4 lines
SVN rev 188731 on 2009-02-17 21:17:21Z by mav

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 1.280.2.7: download - view: text, markup, annotated - select for diffs
Wed Jan 21 17:23:06 2009 UTC (3 years ago) by n_hibma
Branches: RELENG_7
Diff to: previous 1.280.2.6: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.6: +1 -1 lines
SVN rev 187542 on 2009-01-21 17:23:06Z by n_hibma

Couple of pointy hats to me, please. Not only did I make an unnecessary
commit, I actually managed to screw up the revert as well.

Submitted by:	quite a few people...

Revision 1.280.2.6: download - view: text, markup, annotated - select for diffs
Tue Jan 20 20:32:48 2009 UTC (3 years ago) by n_hibma
Branches: RELENG_7
Diff to: previous 1.280.2.5: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.5: +1 -1 lines
SVN rev 187484 on 2009-01-20 20:32:48Z by n_hibma

revert my previous commit. It was in error. I got primed by a few other
similar typos in man-pages.

Submitted by:	jhb

Revision 1.280.2.5: download - view: text, markup, annotated - select for diffs
Sun Jan 18 18:50:18 2009 UTC (3 years ago) by n_hibma
Branches: RELENG_7
Diff to: previous 1.280.2.4: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.4: +1 -1 lines
SVN rev 187401 on 2009-01-18 18:50:18Z by n_hibma

Speling mistake.

Revision 1.280.2.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.280.2.4: preferred, colored; next MAIN 1.280.2.5: preferred, colored
Changes since revision 1.280.2.4: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.252.2.12.4.2: download - view: text, markup, annotated - select for diffs
Thu Oct 30 13:18:28 2008 UTC (3 years, 3 months ago) by kib
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.252.2.12.4.1: preferred, colored; branchpoint 1.252.2.12: preferred, colored; next MAIN 1.252.2.13: preferred, colored
Changes since revision 1.252.2.12.4.1: +0 -1 lines
SVN rev 184470 on 2008-10-30 13:18:28Z by kib

MFC of the r179312 by sos:
Do not call ata_start() when ata_reinit fails in the ioctl path.

Approved by:	re (kensmith), sos
Prodded by:	Andrey V. Elsukov <bu7cher@yandex.ru>

Revision 1.252.2.13: download - view: text, markup, annotated - select for diffs
Thu Oct 30 13:10:33 2008 UTC (3 years, 3 months ago) by kib
Branches: RELENG_6
Diff to: previous 1.252.2.12: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.12: +0 -1 lines
SVN rev 184468 on 2008-10-30 13:10:33Z by kib

MFC of the r179312 by sos:
Do not call ata_start() when ata_reinit fails in the ioctl path.

Approved by:	re (kensmith), sos
Prodded by:	Andrey V. Elsukov <bu7cher@yandex.ru>

Revision 1.291: download - view: text, markup, annotated - select for diffs
Thu Oct 9 12:56:57 2008 UTC (3 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +23 -19 lines
SVN rev 183724 on 2008-10-09 12:56:57Z by sos

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 1.252.2.12.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
Diff to: previous 1.252.2.12: preferred, colored
Changes since revision 1.252.2.12: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.280.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 29 19:54:38 2008 UTC (3 years, 4 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.280.2.3: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.3: +0 -1 lines
SVN rev 183475 on 2008-09-29 19:54:38Z by kib

MFC of the r179312 by sos:
Do not call ata_start() when ata_reinit fails in the ioctl path.

Approved by:	re (kensmith), sos
Prodded by:	Andrey V. Elsukov <bu7cher@yandex.ru>

Revision 1.280.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 22 08:09:13 2008 UTC (3 years, 5 months ago) by philip
Branches: RELENG_7
Diff to: previous 1.280.2.2: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.2: +5 -0 lines
SVN rev 181995 on 2008-08-22 08:09:13Z by philip

MFC r181753:

  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.

Revision 1.290: download - view: text, markup, annotated - select for diffs
Fri Aug 15 10:55:11 2008 UTC (3 years, 5 months ago) by philip
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +5 -0 lines
SVN rev 181753 on 2008-08-15 10:55:11Z by philip

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 1.289: download - view: text, markup, annotated - select for diffs
Wed Jun 11 06:44:58 2008 UTC (3 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +4 -0 lines
SVN rev 179717 on 2008-06-11 06:44:58Z by sos

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 1.288: download - view: text, markup, annotated - select for diffs
Mon May 26 08:58:48 2008 UTC (3 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +0 -1 lines
Dont call ata_start() when ata_reinit fails in the ioctl path.

Revision 1.280.2.2: download - view: text, markup, annotated - select for diffs
Sat May 24 10:15:20 2008 UTC (3 years, 8 months ago) by bz
Branches: RELENG_7
Diff to: previous 1.280.2.1: preferred, colored; branchpoint 1.280: preferred, colored
Changes since revision 1.280.2.1: +5 -4 lines
MFC: rev. 1.287 ata-all.c

  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
  caught any possibly bad input.

Revision 1.287: download - view: text, markup, annotated - select for diffs
Sun Apr 20 17:45:32 2008 UTC (3 years, 9 months ago) by bz
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +5 -4 lines
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 1.286: download - view: text, markup, annotated - select for diffs
Fri Apr 18 15:15:04 2008 UTC (3 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +3 -1 lines
Fix the breakage that caused AHCI devices to vanish. Editor droppings :(

Put the ATAPI device numbering back to the old ways.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Thu Apr 17 12:29:35 2008 UTC (3 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +7 -58 lines
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 1.284: download - view: text, markup, annotated - select for diffs
Fri Apr 11 22:56:27 2008 UTC (3 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +5 -2 lines
Fix badly placed '{'
Dont leak requests on busdma failure (not that we'd get anywhere anyhow).

Reported by: antoine@

Revision 1.283: download - view: text, markup, annotated - select for diffs
Fri Apr 11 11:30:27 2008 UTC (3 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +54 -5 lines
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 1.282: download - view: text, markup, annotated - select for diffs
Thu Apr 10 13:05:04 2008 UTC (3 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +73 -57 lines
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 1.280.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 8 10:48:21 2008 UTC (3 years, 10 months ago) by phk
Branches: RELENG_7
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +6 -0 lines
MFC:

Add support for "atacontrol spindown"

Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon Mar 17 10:33:23 2008 UTC (3 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +6 -0 lines
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 1.252.2.12: download - view: text, markup, annotated - select for diffs
Fri Nov 9 09:58:07 2007 UTC (4 years, 3 months ago) by delphij
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.252.2.11: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.11: +2 -4 lines
MFC: Sync the -HEAD state of ata(4) back to RELENG_6, except interrupt filtering,
CAM MPSAFE, BIO_FLUSH and alpha support removal, which are not suitable for
RELENG_6.

This makes RELENG_6 to support the same set of ATA devices as RELENG_7 and -CURRENT
did.

Reviewed by:	sos

Revision 1.280: download - view: text, markup, annotated - select for diffs
Thu Oct 4 19:17:15 2007 UTC (4 years, 4 months ago) by sos
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +1 -1 lines
Add support for the VIA 8237S
Fix the LBA28/LBA48 crossover bug.

Approved by: re@

Revision 1.279: download - view: text, markup, annotated - select for diffs
Fri Feb 23 16:25:08 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +3 -3 lines
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 1.278: download - view: text, markup, annotated - select for diffs
Fri Feb 23 12:18:32 2007 UTC (4 years, 11 months ago) by piso
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +1 -1 lines
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 1.277: download - view: text, markup, annotated - select for diffs
Wed Feb 21 19:07:18 2007 UTC (4 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +1 -1 lines
Update copyright headers.

Revision 1.276: download - view: text, markup, annotated - select for diffs
Sat Dec 16 14:00:54 2006 UTC (5 years, 1 month ago) by cognet
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +0 -2 lines
Do not special-case __ARMEB__, we handle that in the arm code.

Approved by:	sos

Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri Nov 17 11:13:47 2006 UTC (5 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +2 -2 lines
Deal more generically with the byteswap needed on !littleendian HW.
Account for the odd layout on ARM bigendian HW.

Revision 1.252.2.11: download - view: text, markup, annotated - select for diffs
Sat Sep 30 14:51:48 2006 UTC (5 years, 4 months ago) by sos
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.252.2.10: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.10: +3 -1 lines
MFC:

CF devices are ATA not ATAPI.
Add support for the ALI/ULI M5288 AHCI part
Busmaster DMA address fix in VIA 6421 case
Add support for a few more Serverworks and lookalikes chips
If current_heads or current_sectors in the disk cap page are zero, dont try to use the current_ geometry. This avoids a panic with BIOS'n that sets these to zero.
Format mask lacks one bit.

Approved by: re@

Revision 1.274: download - view: text, markup, annotated - select for diffs
Mon Sep 11 18:33:59 2006 UTC (5 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +3 -1 lines
CF devices are ATA not ATAPI.

Revision 1.252.2.10: download - view: text, markup, annotated - select for diffs
Sat Sep 2 17:01:32 2006 UTC (5 years, 5 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.9: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.9: +2 -2 lines
MFC: Sync with -current.

Dont poll for ATA_IDLE on a detached channel in suspend.
Add support for the Serverworks HT1000 chip.
Finally fix support for the newer MCP51/MCP55 nVidia chipsets.
Add support for the ICH8 and ESB2 chips, also add a few other missing ICH7 partsUpdate JMicron support to also work with chips where the PATA and SATA
parts are on individual PCI functions.
Add support for VIA 8237A.
Add support for AHCI on the VIA VT8251.
Dont call free on non-alloc'd items.

Revision 1.273: download - view: text, markup, annotated - select for diffs
Fri May 12 05:04:40 2006 UTC (5 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +0 -3 lines
Remove various bits of conditional Alpha code and fixup a few comments.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Fri Apr 14 16:25:42 2006 UTC (5 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +2 -2 lines
Dont poll for ATA_IDLE on a detached channel in suspend.

Revision 1.252.2.9: download - view: text, markup, annotated - select for diffs
Tue Apr 4 16:07:42 2006 UTC (5 years, 10 months ago) by sos
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.252.2.8: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.8: +6 -2 lines
MFC:
	Make the ATAPI sense data accessible when using the ioctl interface
Approved by: re@ (scottl)

Revision 1.271: download - view: text, markup, annotated - select for diffs
Fri Mar 31 08:09:04 2006 UTC (5 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +5 -1 lines
Make the ATAPI sense data accessible when using the ioctl interface

MFC candidate.

Revision 1.252.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 10 12:43:42 2006 UTC (5 years, 11 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.7: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.7: +1 -1 lines
MFC
        missed line in last commit
Approved by:    re@ (implicit)

Revision 1.252.2.7: download - view: text, markup, annotated - select for diffs
Fri Mar 10 12:30:07 2006 UTC (5 years, 11 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.6: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.6: +7 -3 lines
MFC:

Only use the channel in the request given to ata_completed if its
still present.
Only look for ICRC and CORR errors on ATA devices not ATAPI.
Get rid of all the "long long"/"maxint" casting around in printf's.
On all our platforms intmax == int64_t so simply using %j to print
int64_t's is safe all over, and doesn't pullute the code.
Update atapi-fd to support direct devices such as disks.
ATAUSB will need to hook into the delayed boot identify to have
interrupts running, so externalize it.
Add USB modes.

Approved by: re@ (mux)

Revision 1.270: download - view: text, markup, annotated - select for diffs
Fri Mar 10 12:20:53 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +2 -1 lines
write the right unit # on verbose output.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu Mar 9 10:24:03 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +1 -1 lines
typo.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Thu Mar 9 08:34:44 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +1 -1 lines
Get rid of all the "long long"/"maxint" casting around in printf's.
On all our platforms intmax == int64_t so simply using %j to print
int64_t's is safe all over, and doesn't pullute the code.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Wed Mar 8 16:39:01 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +1 -1 lines
ATA_USB will need to hook into the delayed boot identify to have
interrupts running, so externalize it.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Sun Mar 5 21:32:38 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +3 -0 lines
Add USB modes.

Revision 1.252.2.6: download - view: text, markup, annotated - select for diffs
Wed Mar 1 18:36:43 2006 UTC (5 years, 11 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.5: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.5: +31 -37 lines
MFC:
Keep the parent device (in this case the channel) around in ata_request,
so we dont panic device removal or failure.
Clean up ata_fail_requests to prevent the queue munging to fail.
Fix ata_reinit so it does things in the right order to prevent panic's.
Lock the channel so master/slave setups wont trash during reinit.
Work around the deadlock that occours when ATA waits for the taskqueue
to call back for completition and something else is holding the taskqueue
waiting for ATA to return data.
This should clear up the "semaphore timeout !! DANGER Will Robinson !!"
in most situations, and log "taskqueue timeout - completing request directly"
instead, with a delayed "WARNING - freeing taskqueue zombie request" when
the taskqueue finally calls us back with the now stale request.
(It would have been nice if there was a way to remove a scheduled item from
the taskqueue finally calls us back with the now stale request.

Approved by:	re@ (scottl)

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sat Feb 25 17:27:32 2006 UTC (5 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +31 -37 lines
Fix ata_reinit so it does things in the right order to prevent panic's.
Lock the channel so master/slave setups wont trash during reinit.

Revision 1.252.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 19 15:18:23 2006 UTC (5 years, 11 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.4: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.4: +1 -1 lines
MFC:
	Add support for the JMicron JMB363 dual SATA + single PATA controller.
	Add r/w support for JMicron ATA RAID metadata.
	Add a reset of the AHCI machinery to the ICH6/ICH7 support.
	Unbreak Promise SATAII/150 controllers caused by the DMA dump changes.
	Unbreak DMA dump on Intel 31224.

Approved by:	re@ (scottl)

Revision 1.264: download - view: text, markup, annotated - select for diffs
Thu Feb 9 20:54:42 2006 UTC (6 years ago) by sos
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +1 -1 lines
Unbreak Promise SATAII/150 controllers caused by the DMA dump changes.

Revision 1.252.2.4: download - view: text, markup, annotated - select for diffs
Wed Jan 25 08:13:43 2006 UTC (6 years ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.3: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.3: +42 -36 lines
MFC:
        Bring ATA up to -current standards:

Fix SiS SATA support, the SATA registers was off.
Update the ICH7 support so it deals better with chips without AHCI.
Unbreak hotplug support on the ICH6 and ICH7 chipsets.
Add support for VIA VT8251 southbridge.
Add new nVidia nForce4 chips.
Add support for the Marvell 88SX[56]0[48][01] series of SATA chips.
Fix the promise modesetting for old chips.
Get rid of the advertising clause in the copyright.
Add support for using DMA on dump, greatly speeds up the dump process.
When IOCATAGPARM is called, update the capabilities page that is stored
in the kernel and return the new values.
Fix rebuilds of arrays that got stuck.
Add dump support in ataraid.
Add support for for reading and writing SiS metadata.
Add support for writing VIA metadata.
Add support for writing Intel metadata.
Correct calculation of RAID0 sizes on VIA RAID arrays.
Update Intel MatrixRAID support to be able to pick up RAID0+1 (RAID10)

Revision 1.263: download - view: text, markup, annotated - select for diffs
Wed Jan 18 13:10:16 2006 UTC (6 years ago) by sos
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +3 -3 lines
Whitespace cleanup.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Wed Jan 18 09:14:54 2006 UTC (6 years ago) by sos
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +9 -12 lines
Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Thu Jan 5 21:27:18 2006 UTC (6 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +1 -3 lines
Get rid of the advertising clause in the copyright.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Nov 25 09:00:56 2005 UTC (6 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +28 -17 lines
When IOCATAGPARM is called, update the capabilities page that is stored
in the kernel and return the new values.

Revision 1.259: download - view: text, markup, annotated - select for diffs
Mon Oct 31 15:41:18 2005 UTC (6 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +1 -1 lines
Normalize a significant number of kernel malloc type names:

- Prefer '_' to ' ', as it results in more easily parsed results in
  memory monitoring tools such as vmstat.

- Remove punctuation that is incompatible with using memory type names
  as file names, such as '/' characters.

- Disambiguate some collisions by adding subsystem prefixes to some
  memory types.

- Generally prefer lower case to upper case.

- If the same type is defined in multiple architecture directories,
  attempt to use the same name in additional cases.

Not all instances were caught in this change, so more work is required to
finish this conversion.  Similar changes are required for UMA zone names.

Revision 1.252.2.2.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 27 16:41:39 2005 UTC (6 years, 3 months ago) by sos
Branches: RELENG_6_0
CVS tags: RELENG_6_0_0_RELEASE
Diff to: previous 1.252.2.2: preferred, colored; next MAIN 1.252.2.3: preferred, colored
Changes since revision 1.252.2.2: +10 -6 lines
MFC:
	Enclose the delayed attach in Giant so we dont loose the race with other
	drivers trying to attach ATA devices like pccard.
	Dont clear the delayed flag before we are acutally finished.

Approved by: re@ (scottl)

Revision 1.252.2.3: download - view: text, markup, annotated - select for diffs
Thu Oct 27 16:39:19 2005 UTC (6 years, 3 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252.2.2: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.2: +10 -6 lines
MFC:
	Enclose the delayed attach in Giant so we dont loose the race with other
	drivers trying to attach ATA devices like pccard.
	Dont clear the delayed flag before we are acutally finished.

Approved by: re@ (scottl)

Revision 1.258: download - view: text, markup, annotated - select for diffs
Thu Oct 27 16:32:39 2005 UTC (6 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +10 -6 lines
Enclose the delayed attach in Giant so we dont loose the race with other
drivers trying to attach ATA devices like pccard.
Dont clear the delayed flag before we are acutally finished.

Spotted by: imp

Revision 1.252.2.2: download - view: text, markup, annotated - select for diffs
Fri Sep 23 18:06:10 2005 UTC (6 years, 4 months ago) by sos
Branches: RELENG_6
CVS tags: RELENG_6_0_BP
Branch point for: RELENG_6_0
Diff to: previous 1.252.2.1: preferred, colored; branchpoint 1.252: preferred, colored
Changes since revision 1.252.2.1: +40 -10 lines
MFC:
	Harden the hotplug support for SATA devices.
	This also fixes a few races that was present in the timeout/detach code.
	Fix support for the VIA 6421 controller.
	Fixes the losage of some ATAPI device that reported failed probing.
	Fix problem finding the still working disk in a broken mirror on VIA.

Approved by: re@ (scottl)

Revision 1.257: download - view: text, markup, annotated - select for diffs
Wed Sep 14 12:45:06 2005 UTC (6 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +39 -10 lines
Harden the hotplug support for SATA devices.
This also fixes a few races that was present in the timeout/detach code.

Sponsored by: pair.com

Revision 1.256: download - view: text, markup, annotated - select for diffs
Mon Aug 29 18:19:06 2005 UTC (6 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +1 -0 lines
In ata_mode2str() properly list -1 as UNSUPPORTED.

Revision 1.252.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 25 16:21:05 2005 UTC (6 years, 5 months ago) by sos
Branches: RELENG_6
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +59 -15 lines
MFC:
	Add support for working around controllers that cannot do DMA in 48bit.
	The workaround use PIO mode above ~137GB to allow using the disk.
	Add the Acer chips with rev < 0xc4 as first candidate.

	Add support for the Promise PDC4071[89] chips on the Fasttrak TX4300.
	Docs kindly provided by Promise.

	Apply fix for "pr82261 DMA-support on Sparc64 broken"

	Use the bio field instead of the driver field as intended.

	Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.

Approved by: re@ (scottl)

Revision 1.255: download - view: text, markup, annotated - select for diffs
Thu Aug 25 15:45:03 2005 UTC (6 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +3 -1 lines
Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.

Revision 1.254: download - view: text, markup, annotated - select for diffs
Wed Aug 17 15:00:33 2005 UTC (6 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +55 -14 lines
Add support for working around controllers that cannot do DMA in 48bit mode.
The workaround use PIO mode above ~137GB to allow using the disk.
Add the Acer chips with rev < 0xc4 as first candidate.

Revision 1.253: download - view: text, markup, annotated - select for diffs
Fri Aug 12 16:54:11 2005 UTC (6 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +1 -0 lines
Add support for the Promise PDC4071[89] chips used on fx the Fasttrak TX4300.
Docs kindly provided by Promise.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Tue May 17 12:31:54 2005 UTC (6 years, 8 months ago) by sos
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +2 -2 lines
Make certain the the 48bit flag is reset if we dont translate LBA.

Revision 1.251: download - view: text, markup, annotated - select for diffs
Mon May 16 13:07:26 2005 UTC (6 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +152 -197 lines
Change the way ioctls are issue to ATA.
The most prominent part is that its now possible to issue ata_requests
directly to say acd0, instead of going through the cumbersome /dev/ata
device.

Revision 1.250: download - view: text, markup, annotated - select for diffs
Fri May 13 10:25:18 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +2 -2 lines
Cleanup comments

Revision 1.50.2.51: download - view: text, markup, annotated - select for diffs
Tue May 3 15:53:47 2005 UTC (6 years, 9 months ago) by ambrisko
Branches: RELENG_4
Diff to: previous 1.50.2.50: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.50: +36 -169 lines
Backout the Promise SATA support due to some reported hangs.  I have
an idea what the problem is but need more testing.

Leave in the Intel PCI Device ID changes.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Tue May 3 07:55:06 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +41 -1 lines
Reshape the dma code to be a bit more flexible so it can cope with
new HW that has new and different demands.
Fix a few nits in former commit in this cleanup crusade.

Sponsored by:	pair.com

Revision 1.248: download - view: text, markup, annotated - select for diffs
Sat Apr 30 16:22:06 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +16 -12 lines
Take newbusification one step further, ie use the device_t more consequently
all way through the code down the layers, instead of the mix'n'match that
resulted from the conversion done earlier.

Sponsored by:	pair.com

Revision 1.247: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:30:03 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +165 -55 lines
Now that probing is working in the new fashion, we need to go back to
having ata_getparm issue an ata_request and not fool around with the HW
on its own.
Needed for new HW support.

Revision 1.246: download - view: text, markup, annotated - select for diffs
Thu Apr 28 22:08:08 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +2 -2 lines
Rearrange the way the reset code is called.
Prepare for different looking controllers.

Revision 1.50.2.50: download - view: text, markup, annotated - select for diffs
Tue Apr 26 21:31:40 2005 UTC (6 years, 9 months ago) by ps
Branches: RELENG_4
Diff to: previous 1.50.2.49: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.49: +1 -0 lines
Add support for the Intel ICH6

Revision 1.245: download - view: text, markup, annotated - select for diffs
Thu Apr 21 11:13:39 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +23 -26 lines
Rehash the timeout code to make it more simple.
This also removes the warning timeout on the taskqueues stalling as
I'm tired of getting ATA error reports for problems in other parts ;)
Misc cosmetic and comment cleanups now we are here.

Revision 1.50.2.49: download - view: text, markup, annotated - select for diffs
Wed Apr 20 23:51:31 2005 UTC (6 years, 9 months ago) by ambrisko
Branches: RELENG_4
Diff to: previous 1.50.2.48: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.48: +168 -36 lines
Add in Promise and Intel SATA support based on FreeBSD 5.X ATAng.
This gets the HW to work but not to deal with SATA errors.  So if
the drive has a read error it will probably lock up.  This is
a small subset of my patches that do deal with these errors and
other issues in FreeBSD and ata-raid.

Sponsored by:	IronPort Systems

Revision 1.244: download - view: text, markup, annotated - select for diffs
Wed Apr 20 12:51:54 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +1 -2 lines
Properly hook in devices found by SATA connect events.
This broke on the changes done to get atapicam happy earlier.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Mon Apr 18 21:21:26 2005 UTC (6 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +3 -0 lines
Add a named reference-count KPI to hold off mounting of the root filesystem.

While we wait for holds to be released, print a list of who holds us
back once per second.

Use the new KPI from GEOM instead of vfs_mount.c calling g_waitidle().

Use the new KPI also from ata.

With ATAmkIII's newbusification, ata could narrowly miss the window
and ad0 would not exist when we tried to mount root.

Revision 1.242: download - view: text, markup, annotated - select for diffs
Mon Apr 18 16:01:56 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +15 -5 lines
Add uma zone for composite ops.

Submitted by:	des

Revision 1.241: download - view: text, markup, annotated - select for diffs
Fri Apr 15 14:19:41 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +2 -2 lines
Make things compile again with ATA_STATIC_ID.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Fri Apr 15 10:20:51 2005 UTC (6 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +36 -41 lines
Move the creation of ata_channel child devices to the channel code.
This allows to attach to the children (ATA devices) even without a
driver being attached. This allows atapi-cam to do its work both
with and without the pure ATAPI driver being present.

ATA patches by /me
ATAPI-cam pathes by Thomas

Revision 1.239: download - view: text, markup, annotated - select for diffs
Fri Apr 8 09:37:47 2005 UTC (6 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +2 -2 lines
Generalise the SATA PHY handling code so it wont be duplicated for
each SATA chip.
Promise and Silicon Image are the current candidates for this.

Revision 1.222.2.10.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 7 14:26:34 2005 UTC (6 years, 10 months ago) by kensmith
Branches: RELENG_5_4
CVS tags: RELENG_5_4_0_RELEASE
Diff to: previous 1.222.2.10: preferred, colored; next MAIN 1.222.2.11: preferred, colored
Changes since revision 1.222.2.10: +1 -1 lines
MFR5 changing the hw.ata.atapi_dma default setting so ATAPI drives
run in PIO mode:

> sys/dev/ata/ata-all.c:
> revision 1.222.2.11
> date: 2005/04/04 16:42:35;  author: kensmith;  state: Exp;  lines: +1 -1
> Change the default for hw.ata.atapi_dma so that DMA is off.  We are
> seeing a lot of install problems that get fixed by turning DMA
> off.  The sparc64 mailing list sees the most reports of this but it
> does come up on others.  Changing the default should give us a more
> robust install, at the expense of people who need DMA for burning
> CDs needing to turn it on (maybe).
>
> The same change will be made in HEAD shortly by the ata maintainer.
>
> Discussed with: sos, scottl
>
> ---------
>
> share/man/man4/ata.4
> revision 1.46.2.3
> date: 2005/04/04 17:23:16;  author: kensmith;  state: Exp;  lines: +1 -1
> Default for hw.ata.atapi_dma is now PIO.
>
> Reminded by:    Joel Dahl <joel (at) automatvapen (dot) se>

Approved by:	re (scottl)

Revision 1.238: download - view: text, markup, annotated - select for diffs
Wed Apr 6 10:22:56 2005 UTC (6 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +14 -0 lines
Add support for controllers that doesn't have the usual taskfile
layout.  No functional changes.

Revision 1.222.2.11: download - view: text, markup, annotated - select for diffs
Mon Apr 4 16:42:35 2005 UTC (6 years, 10 months ago) by kensmith
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.222.2.10: preferred, colored; branchpoint 1.222: preferred, colored; next MAIN 1.223: preferred, colored
Changes since revision 1.222.2.10: +1 -1 lines
Change the default for hw.ata.atapi_dma so that DMA is off.  We are
seeing a lot of install problems that get fixed by turning DMA
off.  The sparc64 mailing list sees the most reports of this but it
does come up on others.  Changing the default should give us a more
robust install, at the expense of people who need DMA for burning
CDs needing to turn it on (maybe).

The same change will be made in HEAD shortly by the ata maintainer.

Discussed with:	sos, scottl

Revision 1.237: download - view: text, markup, annotated - select for diffs
Thu Mar 31 15:05:40 2005 UTC (6 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +10 -10 lines
Change the ata_* methods to use a channel device instead of a
controller device. This helps when there is no controller parent
to a channel (PPC port).

Revision 1.236: download - view: text, markup, annotated - select for diffs
Wed Mar 30 12:03:37 2005 UTC (6 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +410 -677 lines
This is the much rumoured ATA mkIII update that I've been working on.

o       ATA is now fully newbus'd and split into modules.
        This means that on a modern system you just load "atapci and ata"
        to get the base support, and then one or more of the device
        subdrivers "atadisk atapicd atapifd atapist ataraid".
        All can be loaded/unloaded anytime, but for obvious reasons you
        dont want to unload atadisk when you have mounted filesystems.

o       The device identify part of the probe has been rewritten to fix
        the problems with odd devices the old had, and to try to remove
        so of the long delays some HW could provoke. Also probing is done
	without the need for interrupts, making earlier probing possible.

o       SATA devices can be hot inserted/removed and devices will be created/
        removed in /dev accordingly.
	NOTE: only supported on controllers that has this feature:
	Promise and Silicon Image for now.
	On other controllers the usual atacontrol detach/attach dance is
	still needed.

o	Support for "atomic" composite ATA requests used for RAID.

o       ATA RAID support has been rewritten and and now supports these
        metadata formats:
                 "Adaptec HostRAID"
                 "Highpoint V2 RocketRAID"
                 "Highpoint V3 RocketRAID"
                 "Intel MatrixRAID"
                 "Integrated Technology Express"
                 "LSILogic V2 MegaRAID"
                 "LSILogic V3 MegaRAID"
                 "Promise FastTrak"
                 "Silicon Image Medley"
		 "FreeBSD PseudoRAID"

o       Update the ioctl API to match new RAID levels etc.

o       Update atacontrol to know about the new RAID levels etc
        NOTE: you need to recompile atacontrol with the new sys/ata.h,
        make world will take care of that.
	NOTE2: that rebuild is done differently from the old system as
	the rebuild is now done piggybacked on read requests to the
	array, so atacontrol simply starts a background "dd" to rebuild
	the array.

o       The reinit code has been worked over to be much more robust.

o       The timeout code has been overhauled for races.

o	Support of new chipsets.

o       Lots of fixes for bugs found while doing the modulerization and
        reviewing the old code.

Missing or changed features from current ATA:

o       atapi-cd no longer has support for ATAPI changers. Todays its
        much cheaper and alot faster to copy those CD images to disk
        and serve them from there. Besides they dont seem to be made
        anymore, maybe for that exact reason.

o       ATA RAID can only read metadata from all the above metadata formats,
	not write all of them (Promise and Highpoint V2 so far). This means
	that arrays can be picked up from the BIOS, but they cannot be
	created from FreeBSD. There is more to it than just the missing
	write metadata support, those formats are not unique to a given
	controller like Promise and Highpoint formats, instead they exist
	for several types, and even worse, some controllers can have
	different formats and its impossible to tell which one.
	The outcome is that we cannot reliably create the metadata of those
	formats and be sure the controller BIOS will understand it.
	However write support is needed to update/fail/rebuild the arrays
	properly so it sits fairly high on the TODO list.

o       So far atapicam is not supported with these changes. When/if this
	will change is up to the maintainer of atapi-cam so go there for
	questions.

HW donated by:  Webveveriet AS
HW donated by:  Frode Nordahl
HW donated by:  Yahoo!
HW donated by:  Sentex
Patience by:	Vife and my boys (and even the cats)

Revision 1.222.2.10: download - view: text, markup, annotated - select for diffs
Thu Mar 24 18:44:27 2005 UTC (6 years, 10 months ago) by mdodd
Branches: RELENG_5
CVS tags: RELENG_5_4_BP
Branch point for: RELENG_5_4
Diff to: previous 1.222.2.9: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.9: +4 -4 lines
MFC: Whitespace diff reduction.

Approved by:	re

Revision 1.222.2.9: download - view: text, markup, annotated - select for diffs
Thu Mar 24 15:09:50 2005 UTC (6 years, 10 months ago) by fjoe
Branches: RELENG_5
Diff to: previous 1.222.2.8: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.8: +3 -0 lines
ata_shutdown: Do nothing (do not flush ata cache) if in panic.
This behaviour is inline with ata-mkIII that will be committed to HEAD
soon and fixes making crashdumps (and automatic reboots) after panic.

Approved by:	re (the patch slightly differs from what was sent for approval)
No objections from:	sos

Revision 1.222.2.8: download - view: text, markup, annotated - select for diffs
Wed Mar 23 04:48:32 2005 UTC (6 years, 10 months ago) by mdodd
Branches: RELENG_5
Diff to: previous 1.222.2.7: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.7: +4 -0 lines
MFC 1.234: Return ATA register values in the request struct
           when ATAREQUEST returns.

Approved by:	 re

Revision 1.222.2.7: download - view: text, markup, annotated - select for diffs
Wed Mar 2 02:15:13 2005 UTC (6 years, 11 months ago) by mdodd
Branches: RELENG_5
Diff to: previous 1.222.2.6: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.6: +4 -4 lines
MFC: 1.233

Cosmetic change to suspend, dont call tsleep an extra time at exit.

Revision 1.222.2.6: download - view: text, markup, annotated - select for diffs
Sun Feb 27 20:35:23 2005 UTC (6 years, 11 months ago) by mdodd
Branches: RELENG_5
Diff to: previous 1.222.2.5: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.5: +4 -1 lines
MFC: 1.235

Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.

This allows my Thinkpad to resume successfully with APM.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Mon Feb 7 17:14:42 2005 UTC (7 years ago) by mdodd
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +4 -1 lines
Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.

This allows my Thinkpad to resume successfully with APM.

Approved by:	 sos
MFC after:	 2 weeks

Revision 1.50.2.47.6.1: download - view: text, markup, annotated - select for diffs
Thu Jan 13 23:03:12 2005 UTC (7 years ago) by kensmith
Branches: RELENG_4_11
CVS tags: RELENG_4_11_0_RELEASE
Diff to: previous 1.50.2.47: preferred, colored; next MAIN 1.50.2.48: preferred, colored
Changes since revision 1.50.2.47: +1 -1 lines
MFS revision 1.50.2.48

  date: 2005/01/11 18:25:01;  author: kensmith;  state: Exp;  lines: +1 -1
  MFC of an off-by-one fix sos made to HEAD in v1.96 of ata-chipset.c and
  v1.50 of ata-lowlevel.c.  From his log message:

    Log:
    Compensate for off by one bugs in disk firmware for 48BIT addressing cutover.

  Requested by:   marck
  Glanced at by:  sos

Approved by:	re (scottl)

Revision 1.50.2.48: download - view: text, markup, annotated - select for diffs
Tue Jan 11 18:25:01 2005 UTC (7 years, 1 month ago) by kensmith
Branches: RELENG_4
Diff to: previous 1.50.2.47: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.47: +1 -1 lines
MFC of an off-by-one fix sos made to HEAD in v1.96 of ata-chipset.c and
v1.50 of ata-lowlevel.c.  From his log message:

  Log:
  Compensate for off by one bugs in disk firmware for 48BIT addressing cutover.

Requested by:	marck
Glanced at by:	sos
MFC after:	2 days

Revision 1.234: download - view: text, markup, annotated - select for diffs
Wed Nov 24 10:47:26 2004 UTC (7 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +8 -4 lines
Return ATA register values in the request struct when ATAREQUEST returns.

Revision 1.222.2.4.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 24 09:31:25 2004 UTC (7 years, 3 months ago) by scottl
Branches: RELENG_5_3
CVS tags: RELENG_5_3_0_RELEASE
Diff to: previous 1.222.2.4: preferred, colored; next MAIN 1.222.2.5: preferred, colored
Changes since revision 1.222.2.4: +6 -6 lines
MFC:

Do not retry on requests that has lost thier device during reinit.

Should fix hangs on IBM's etc with the fake slave problem.

Approved by: re

Revision 1.222.2.5: download - view: text, markup, annotated - select for diffs
Sun Oct 24 09:27:37 2004 UTC (7 years, 3 months ago) by sos
Branches: RELENG_5
Diff to: previous 1.222.2.4: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.4: +6 -6 lines
MFC:

        Do not retry on requests that has lost thier device during reinit.

        Should fix hangs on IBM's etc with the fake slave problem.

Approved by: re@ (scottl)

Revision 1.233: download - view: text, markup, annotated - select for diffs
Tue Oct 19 20:13:38 2004 UTC (7 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +10 -10 lines
Idle the channel earlier in reinit().
Cosmetic change to suspend, dont call tsleep an extra time at exit.

Revision 1.222.2.4: download - view: text, markup, annotated - select for diffs
Sat Oct 16 08:43:06 2004 UTC (7 years, 3 months ago) by sos
Branches: RELENG_5
CVS tags: RELENG_5_3_BP
Branch point for: RELENG_5_3
Diff to: previous 1.222.2.3: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.3: +39 -42 lines
MFC:
	latest locking updates/fixes.

Approved by: re@ (scottl)

Revision 1.232: download - view: text, markup, annotated - select for diffs
Wed Oct 13 15:16:35 2004 UTC (7 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +39 -42 lines
Refine locking so it covers the "running" variable as well.
Adjust comments etc to fit the new locking system.

Revision 1.222.2.3: download - view: text, markup, annotated - select for diffs
Sun Oct 10 15:01:47 2004 UTC (7 years, 4 months ago) by sos
Branches: RELENG_5
Diff to: previous 1.222.2.2: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.2: +17 -11 lines
MFC:

Pull ATA up to -current levels minus PC98 geometry changes:

Fix the serverworks modesetting code, of mask offset was wrong.
Always set half'n'half mode on ICH* chips.
Fix the PC98 lockups on boot.
Add SHARP to the pool of drives that doesn not need byteswapping.
Add support for the ICH6 in legacy mode.
Dont sleep with lock held.

Approved by:	re@ (scottl)

Revision 1.231: download - view: text, markup, annotated - select for diffs
Sun Oct 10 13:24:39 2004 UTC (7 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +1 -1 lines
Dont sleep with lock held.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Thu Oct 7 11:43:25 2004 UTC (7 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +7 -5 lines
Add SHARP to the pool of drives that doesn not need byteswapping of
the model etc fields from identify.

Revision 1.229: download - view: text, markup, annotated - select for diffs
Wed Oct 6 19:46:07 2004 UTC (7 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +9 -5 lines
Fix the PC98 lockups on boot.
The interchannel locking for PC98 needed to be updated to match the
rest of the locking in ATA.

Revision 1.222.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 30 21:29:18 2004 UTC (7 years, 4 months ago) by sos
Branches: RELENG_5
Diff to: previous 1.222.2.1: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.2.1: +117 -19 lines
MFC:
Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.

Approved by: re@ (scottl)

Revision 1.228: download - view: text, markup, annotated - select for diffs
Sun Sep 26 11:48:43 2004 UTC (7 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +109 -12 lines
Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.

Revision 1.227: download - view: text, markup, annotated - select for diffs
Thu Sep 16 09:35:01 2004 UTC (7 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +1 -1 lines
Ignore leading '_' in model name returned by devices.

This make "_NEC" devices appear as "NEC" which is more corrent.
The reason is tha NEC originally screwed up on the byteorder in the
model string, so now that they have realized that they prefixed the '_'
so that not every ATA driver on the planet would call them "EN C" :)

Revision 1.226: download - view: text, markup, annotated - select for diffs
Thu Sep 9 13:25:46 2004 UTC (7 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +7 -6 lines
Release the hold on ata_delayed_attach earlier so we can use tsleep
in the boot probe as well.

Suggested by:	gibbs

Revision 1.222.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 6 19:36:25 2004 UTC (7 years, 5 months ago) by sos
Branches: RELENG_5
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +16 -6 lines
Update ATA to -current level. Summary:

Fix the handling of "inflight" requests when doing reinit's.

Always pick up giant before returning from an ioctl call.

Sii_reset needs to wait up to 1 second to get slow disks with it.

Set and reset the right bit for UDMA enable/disable on the ICH* chips.

Only call dmainit() if there is a valid busmaster resource.

Workaround devices that responds with registers as *both* master & slave.

Introduce ata_udelay() that uses tsleep instead of DELAY if possible.

Properly check malloc returns.

Approved by: re@

Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Sep 3 12:10:44 2004 UTC (7 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +9 -0 lines
Introduce ata_udelay() that uses tsleep instead of DELAY if possible.
In places where we have long delays that doesn't depend on too accurate
timing, use ata_udelay() instead of DELAY() so we dont uselessly spin
the CPU if not nessesary;

Revision 1.224: download - view: text, markup, annotated - select for diffs
Fri Aug 27 14:48:32 2004 UTC (7 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +3 -4 lines
Fix the handling of "inflight" requests when doing reinit's.
Add missing untimeout that would get lost in handling of some
error situations, and caused what looked like random timeouts
afterwards when the timeout fired.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Tue Aug 24 15:09:05 2004 UTC (7 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +4 -2 lines
Always pick up giant before returning from an ioctl call.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Aug 16 09:32:35 2004 UTC (7 years, 5 months ago) by sos
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +1 -1 lines
Improve (hopefully) on the workaround code for devices that doesn't
interrupt when command is done, ie some ATAPI CD drives with no
media loaded.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Thu Aug 12 08:20:36 2004 UTC (7 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +14 -17 lines
Change the order of ata_dmainit/ata_allocate in preparation of
supporting new chipsets where this is needed.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Mon Aug 9 12:02:32 2004 UTC (7 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +7 -0 lines
Close a race in ata_reinit().

Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Aug 9 06:47:53 2004 UTC (7 years, 6 months ago) by jmg
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -0 lines
make sure that ioctl's to ata use the proper cmd IOCATA...

Reviewed by:	sos

Revision 1.218: download - view: text, markup, annotated - select for diffs
Thu Aug 5 21:13:40 2004 UTC (7 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -11 lines
Try to narrow down the race window on HW that does not have ways to
poll for which channel actually pulled the irq line.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Sun Aug 1 12:31:38 2004 UTC (7 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +5 -3 lines
Change the default to switch on DMA on ATAPI devices if they can
do UDMA2 (ATA33) mode and beyond.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Sat Jul 31 10:29:29 2004 UTC (7 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +1 -0 lines
Fix the panic (""memory modified after free") when ata_getparam() fails
and retries.

Found by:	Nate Lawson

Revision 1.215: download - view: text, markup, annotated - select for diffs
Mon Jul 12 10:50:49 2004 UTC (7 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +9 -15 lines
Attempt to handle suspend/resume better.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Tue Jun 22 11:18:24 2004 UTC (7 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +1 -1 lines
Use the right ordering of args on mtx_init(). No functional changes
since the args in question was all zero's.

Found by: Jimmy Olgeni <olgeni@FreeBSD.org>

Revision 1.213: download - view: text, markup, annotated - select for diffs
Wed Jun 16 09:46:37 2004 UTC (7 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +1 -1 lines
Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Tue Jun 15 11:38:48 2004 UTC (7 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +0 -4 lines
Oops, backout debug code..

Revision 1.211: download - view: text, markup, annotated - select for diffs
Tue Jun 15 11:16:36 2004 UTC (7 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +4 -1 lines
Dont set prefetch etc on VIA chips, causes problems on newer chips and
ATAPI devices.

Revision 1.210: download - view: text, markup, annotated - select for diffs
Thu May 20 14:49:12 2004 UTC (7 years, 8 months ago) by des
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +29 -29 lines
Whitespace cleanup.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Fri Apr 30 16:21:34 2004 UTC (7 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -3 lines
Spring cleanup of macros

Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Apr 13 09:44:20 2004 UTC (7 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +4 -11 lines
Add support for the Promise command sequencer present on all modern Promise
controllers (PDC203** PDC206**).

This also adds preliminary support for the Promise SX4/SX4000 but *only*
as a "normal" Promise ATA controller (ATA RAID's are supported though
but only RAID0, RAID1 and RAID0+1).

This cuts off yet another 5-8% of the command overhead on promise controllers,
making them the fastest we have ever had support for.

Work is now continuing to add support for this in ATA RAID, to accellerate
ATA RAID quite a bit on these controllers, and especially the SX4/SX4000
series as they have quite a few tricks in there..

This commit also adds a few fixes to the SATA code needed for proper support.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Wed Mar 17 17:50:27 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +2 -2 lines
Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde

Revision 1.206: download - view: text, markup, annotated - select for diffs
Mon Mar 15 12:03:47 2004 UTC (7 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +0 -19 lines
Add support for detaching PCI controllers.

This adds support for cardbus ATA/SATA controllers. I get roughly the
same transfer speeds as on true PCI controllers. Nice to be able to add
a couble of "real" disks to a laptop :)

Revision 1.205: download - view: text, markup, annotated - select for diffs
Mon Mar 1 13:17:07 2004 UTC (7 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +6 -3 lines
Remember to mtx_destroy mutexes.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Sat Feb 21 21:10:41 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +2 -0 lines
Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.

Revision 1.198.2.3: download - view: text, markup, annotated - select for diffs
Wed Feb 11 08:47:21 2004 UTC (8 years ago) by scottl
Branches: RELENG_5_2
CVS tags: RELENG_5_2_1_RELEASE
Diff to: previous 1.198.2.2: preferred, colored; branchpoint 1.198: preferred, colored; next MAIN 1.199: preferred, colored
Changes since revision 1.198.2.2: +10 -11 lines
MFC many more fixes for the ata driver.

Approved by:	re (implicit)

Revision 1.203: download - view: text, markup, annotated - select for diffs
Fri Jan 30 19:16:08 2004 UTC (8 years ago) by sos
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +10 -11 lines
Be more robust in the probe. We dont want to get into a loop with
reinitting when we try to identify devices. If they dont interrupt
on identify we retry once. If this fails we simply ignore that device.

Revision 1.198.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 27 15:11:35 2004 UTC (8 years ago) by scottl
Branches: RELENG_5_2
Diff to: previous 1.198.2.1: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.1: +0 -4 lines
Remove local changes to ata that accidentally crept in.

Revision 1.198.2.1: download - view: text, markup, annotated - select for diffs
Tue Jan 27 05:53:18 2004 UTC (8 years ago) by scottl
Branches: RELENG_5_2
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +81 -44 lines
Don peril-senstive goggles and update the ata driver to HEAD.

Approved by:	re

Revision 1.202: download - view: text, markup, annotated - select for diffs
Mon Jan 19 15:19:59 2004 UTC (8 years ago) by sos
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +2 -1 lines
Fix breakage on timeout/retries. The bug cause a sema to be leaked so
that the calling process would newer wakeup.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Wed Jan 14 21:26:34 2004 UTC (8 years ago) by sos
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +7 -2 lines
Use UMA instead of plain malloc for getting ATA request storage.
This gives +10% performance on simple tests, so definitly worth it.
A few percent more could be had by not using M_ZERO'd alloc's, but
we then need to clear fields all over the place to be safe, and
that was deemed not worth the trouble (and it makes life dangerous).

Revision 1.200: download - view: text, markup, annotated - select for diffs
Tue Jan 13 21:35:39 2004 UTC (8 years ago) by sos
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +12 -10 lines
Fix ata_getparam to accept the fact that some crappy devices can pose as
both master and slave at the same time confusing the probe code.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sun Jan 11 22:08:34 2004 UTC (8 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +62 -37 lines
Overhaul of the timeout/reinit framework. This should clear up most
of the leftovers from the old version that really doesn't work anymore.

Add a reset function for host-end of the ATA channel. This is needed
for the SiI3112 in order to whack it back to reality if a device
locks up the SATA interface (thereby preventing that we can reset the
device). The result is that ATA now recovers from the timeouts that
happens with the SiI3112A and more or less all disks based on old
PATA electronics with a Marvell PATA->SATA converter. This includes
lots of the popular SATA dongles and the WDC Raptor disks..

Revision 1.198: download - view: text, markup, annotated - select for diffs
Sun Nov 30 16:27:58 2003 UTC (8 years, 2 months ago) by sos
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_0_RELEASE
Branch point for: RELENG_5_2
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +1 -1 lines
Fix ata-card.
The altio resource magic no longer worked probably due to other changes
in the kernel. Redo that part so it also fits better into ATAng.
Fix detach so it doesn't panic the system when a pccard device is
yanked.

Approved by: re@

Revision 1.197: download - view: text, markup, annotated - select for diffs
Tue Nov 11 14:55:35 2003 UTC (8 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +27 -10 lines
Centralise mode setting. Instead of doing it in all subdrivers, do
it in ata-all.c where it belongs.

Prime controller HW by always setting PIO mode first in attach.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Mon Nov 3 09:25:02 2003 UTC (8 years, 3 months ago) by des
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +6 -0 lines
Move sysctl declarations next to the corresponding tunable declarations.
Add a sysctl declaration for hw.ata.atapi_dma, which had gone MIA (though
setting it in loader.conf still worked, it was not visible at runtime)

Approved by:	sos

Revision 1.195: download - view: text, markup, annotated - select for diffs
Sun Oct 12 12:37:11 2003 UTC (8 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +2 -0 lines
Put devices into sleep mode (ie spin down) on detach.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Sun Oct 12 11:10:41 2003 UTC (8 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +1 -1 lines
Use isprint instead of isalpha in determining valid ident string.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Fri Oct 10 11:03:27 2003 UTC (8 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +7 -0 lines
Restore transfermode on devices after reinit.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Fri Oct 10 11:00:06 2003 UTC (8 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +3 -0 lines
Dont store ata_params for devices that return a bogus ident string.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Tue Oct 7 13:44:15 2003 UTC (8 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +22 -3 lines
In case we loose a device during reset in reinit() finish off
the request with error instead of loosing it.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Sat Sep 27 12:00:58 2003 UTC (8 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +0 -2 lines
The present defaults for the open and close for device drivers which
provide no methods does not make any sense, and is not used by any
driver.

It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.

Change the defaults to be nullopen() and nullclose() which simply
does nothing.

Remove explicit initializations to these from the drivers which
already used them.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon Sep 8 08:30:43 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +9 -7 lines
Update the PIO mode gathering code.

Reported by: bde

Revision 1.50.2.47: download - view: text, markup, annotated - select for diffs
Fri Sep 5 18:27:38 2003 UTC (8 years, 5 months ago) by dg
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_11_BP, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Branch point for: RELENG_4_11
Diff to: previous 1.50.2.46: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.46: +12 -12 lines
Fixed panics that will occur during attempts to rescan ATA disk devices
(which occur after disk errors). The panic is due to attempts to acquire
the ATA channel lock multiple times (at different levels), with the second
attempt trying to sleep in an interrupt context. The fix is to indicate
to the other levels that we already have the lock.
The problem has been fixed in -current a different way and isn't portable
to -stable.

Reviewed by:	sos@freebsd.org
Approved by:	re@freebsd.org

Revision 1.50.2.46: download - view: text, markup, annotated - select for diffs
Fri Sep 5 07:29:10 2003 UTC (8 years, 5 months ago) by luoqi
Branches: RELENG_4
Diff to: previous 1.50.2.45: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.45: +2 -1 lines
MFC: ata driver bus dma code.

Eyeballed by:	sos
Approved by:	re

Revision 1.188: download - view: text, markup, annotated - select for diffs
Mon Sep 1 11:13:21 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +9 -4 lines
Rearrange the probe code yet again.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Wed Aug 27 15:27:56 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +2 -2 lines
Return the translated result code from ATA/ATAPI commands.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Mon Aug 25 09:01:49 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +6 -6 lines
Unify prototypes.
Cosmetics.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Mon Aug 25 07:59:50 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +8 -4 lines
Only call FLUSH_CACHE on devices that say they can.

This will get rid of the warnings issued at shutdown (that seems to
worry alot of users), but will also no flush cache on lots of
devices that can, but doesn't set the right support bits...

Revision 1.184: download - view: text, markup, annotated - select for diffs
Sun Aug 24 17:48:05 2003 UTC (8 years, 5 months ago) by obrien
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +3 -2 lines
Use __FBSDID().
Also some minor style cleanups.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Sun Aug 24 09:22:25 2003 UTC (8 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +449 -1136 lines
This is a major rework of the ATA driver (ATAng)

Restructure the way ATA/ATAPI commands are processed, use a common
ata_request structure for both. This centralises the way requests
are handled so locking is much easier to handle.

The driver is now layered much more cleanly to seperate the lowlevel
HW access so it can be tailored to specific controllers without touching
the upper layers. This is needed to support some of the newer
semi-intelligent ATA controllers showing up.

The top level drivers (disk, ATAPI devices) are more or less still
the same with just corrections to use the new interface.

Pull ATA out from under Gaint now that locking can be done in a sane way.

Add support for a the National Geode SC1100. Thanks to Soekris engineering
for sponsoring a Soekris 4801 to make this support.

Fixed alot of small bugs in the chipset code for various chips now
we are around in that corner anyways.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Sun May 18 16:43:08 2003 UTC (8 years, 8 months ago) by sos
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +1 -0 lines
Add string for SATA150

Approved by: re

Revision 1.181: download - view: text, markup, annotated - select for diffs
Sun May 4 09:34:14 2003 UTC (8 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +13 -0 lines
Grap the ATA lock on all channels before suspend, this makes certain
that we have no outstanding ops in transit, which would cause problems
on resume.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Sat May 3 18:28:43 2003 UTC (8 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +16 -4 lines
Fix locking on reinit.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Fri May 2 13:47:44 2003 UTC (8 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +38 -4 lines
Add flushing of devices on shutdown.
Note: this might print failure messages on some systems, unfortunatly
the info from the device, stating if flushing is supported, cannot be trusted
so the operation is always issued on all devices, just in case...

Revision 1.178: download - view: text, markup, annotated - select for diffs
Fri May 2 12:41:44 2003 UTC (8 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +3 -0 lines
Add ioctl to add a spare disk to a RAID array.
Fix the discovery of RAID's to not grap unused disks.
Change the probe printing of a RAID a bit.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Apr 7 14:12:12 2003 UTC (8 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +1 -1 lines
Third round of updates to the ATA driver.

More DMA cleanups, including fix for breakage on older Promise controllers.

Add more ways of getting to the ATA registers.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Apr 1 15:06:23 2003 UTC (8 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +1 -1 lines
Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Sun Mar 30 09:27:59 2003 UTC (8 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +1 -1 lines
Fix ATA_DEBUG case breakage.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Sat Mar 29 13:37:09 2003 UTC (8 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +103 -146 lines
Second round of updates to the ATA driver.

Clean up the DMA interface too much unneeded stuff crept in with
the busdma code back when.

Modify the ATA_IN* / ATA_OUT* macros so that resource and offset
are gotten from a table. That allows for new chipsets that doesn't
nessesarily have things ordered the good old way. This also removes
the need for the wierd PC98 resource functions.

Tested on: i386, PC98, Alpha, Sparc64

Revision 1.173: download - view: text, markup, annotated - select for diffs
Sat Mar 22 12:18:20 2003 UTC (8 years, 10 months ago) by mux
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +5 -0 lines
- Add a new ioctl to get the maximum number of ATA channels.
- Use it in atacontrol(8) when listing ATA devices instead of
  stopping at the first ENXIO received.

This makes atacontrol list work on my sparc64 where the two ATA
channels I have are numbered 2 and 3.

Reviewed by:	sos

Revision 1.172: download - view: text, markup, annotated - select for diffs
Tue Mar 18 08:45:20 2003 UTC (8 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +0 -1 lines
Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.

Revision 1.50.2.45: download - view: text, markup, annotated - select for diffs
Wed Mar 12 14:47:12 2003 UTC (8 years, 11 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8
Diff to: previous 1.50.2.44: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.44: +17 -16 lines
MFC:
Dont hang the channel on enclosures without sensors.

Approved by: re

Revision 1.171: download - view: text, markup, annotated - select for diffs
Wed Mar 12 10:59:35 2003 UTC (8 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +17 -16 lines
Dont hang the channel on enclosures without sensors.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Sat Mar 8 08:01:27 2003 UTC (8 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +0 -1 lines
Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c.

As a side effect this makes a lot of #include <sys/devicestat.h>
lines not needed and some biofinish() calls can be reduced to
biodone() again.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Mon Mar 3 12:15:41 2003 UTC (8 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +5 -13 lines
Gigacommit to improve device-driver source compatibility between

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sun Mar 2 16:54:33 2003 UTC (8 years, 11 months ago) by des
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +2 -2 lines
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).

Revision 1.167: download - view: text, markup, annotated - select for diffs
Tue Feb 25 08:22:01 2003 UTC (8 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +2 -2 lines
Revert the probe code change.
It helped those fake devices probe delays to go away, but as a side
effect it also made some not so conforming CD/DVD drives go away...

Revision 1.166: download - view: text, markup, annotated - select for diffs
Thu Feb 20 20:01:01 2003 UTC (8 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +102 -96 lines
First round off updates/fixes to the ATA driver.

This moves all chipset specific code to a new file 'ata-chipset.c'.
Extensive use of tables and pointers to avoid having the same switch
on chipset type in several places, and to allow substituting various
functions for different HW arch needs.
Added PIO mode setup and all DMA modes.
Support for all known SiS chipsets. Thanks to Christoph Kukulies for
sponsoring a nice ASUS P4S8X SiS648 based board for this work!

Tested on:	i386, PC98, alpha and sparc64

Revision 1.165: download - view: text, markup, annotated - select for diffs
Fri Feb 14 13:10:40 2003 UTC (8 years, 11 months ago) by alfred
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +2 -1 lines
Fix crash dumps on ata and scsi.

To fix scsi, don't wait for ithreads if we're dumping, it makes the
debugger sad.

To fix ata, use what appears to be a polling method if we're dumping,
I stole this from tmm but added code to ensure that this change is
only in effect while dumping.

Tested by: des

Revision 1.50.2.44: download - view: text, markup, annotated - select for diffs
Thu Jan 30 07:19:59 2003 UTC (9 years ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.43: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.43: +116 -58 lines
MFC:

Update the code that deals with disk enclosures:

Properly handle the newer Promise SuperSwap 1000 enclosures.
Print out what kind of enclosure was found in the probe.
Misc cleanups in the enclosure handling code.

Sponsored by: Advanis Inc.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Mon Jan 27 09:04:29 2003 UTC (9 years ago) by sos
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +121 -62 lines
Update the code that deals with disk enclosures:

Properly handle the newer Promise SuperSwap 1000 enclosures.
Print out what kind of enclosure was found in the probe.
Misc cleanups in the enclosure handling code.

Sponsored by: Advanis Inc.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Sun Jan 19 20:18:07 2003 UTC (9 years ago) by sos
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +1 -0 lines
Small change to the previous commit, zero out the 48BIT flag in ata_command
instead of in dmadone.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Sun Jan 19 11:47:32 2003 UTC (9 years ago) by sos
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +1 -0 lines
Fix the 48bit access support for the older Promise 66/100 controllers, the
first attempt was wrong and could cause r/w timeouts.

Add yet another Promise PCI id.

Revision 1.50.2.43: download - view: text, markup, annotated - select for diffs
Mon Dec 16 14:30:39 2002 UTC (9 years, 1 month ago) by thomas
Branches: RELENG_4
Diff to: previous 1.50.2.42: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.42: +5 -4 lines
MFC rev. 1.159:
In ata_reinit, when ata_getparam fails for a supposed new device,
clear the corresponding bit in the ch->devices bitmap.
Resolves a case of panic on APM suspend/resume.

Approved by:    sos
Reviewed by:    roberto

Revision 1.161: download - view: text, markup, annotated - select for diffs
Fri Dec 6 19:29:52 2002 UTC (9 years, 2 months ago) by sos
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +2 -0 lines
Fix linking problem when atadisk is not use in ata-all.c

Add dummy intr_func and lock_func to ata-card.c

Dont call ad_print if the driver decided there is no disk.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue Dec 3 20:19:37 2002 UTC (9 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +53 -17 lines
Add support for the PC98 platform to the ATA driver.
This mostly consists of functionality to serialize accesses to
the two ATA channels (which can also be used to "fix" certain
PCI based controllers).
Add support for Acard controllers.
Enable the ATA driver in PC98 GENERIC, and add device hints.
Update man page with latest support.

The PC98 core team has kindly provided me with a PC98
machine that made this all possible, thanks to all that
contributed to that effort, without that this would
probably newer have been possible..

Approved by: re@

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Dec 1 14:20:08 2002 UTC (9 years, 2 months ago) by thomas
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +5 -4 lines
In ata_reinit, when ata_getparam fails for a new device (indicating that
the device is not actually present), clear the corresponding bit in
the ch->devices bitmap. This resolves a panic that occurred with ATAPI/CAM
after an APM suspend/resume, when the ATA hardware would erroneously
report an extra ATAPI device.

Approved by:	re, sos
Reviewed by:	roberto
MFC after:	7 days

Revision 1.158: download - view: text, markup, annotated - select for diffs
Thu Nov 7 22:23:46 2002 UTC (9 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +3 -2 lines
Use [u]intmax_t and %j instead of long long and %ll to better fix warnings
I fixed earlier.

Requested by:	mux, jake

Revision 1.157: download - view: text, markup, annotated - select for diffs
Wed Nov 6 19:52:13 2002 UTC (9 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +1 -1 lines
Use some long long casts to quiet warnings in debug printf's on alpha.

Revision 1.50.2.42: download - view: text, markup, annotated - select for diffs
Fri Nov 1 22:04:06 2002 UTC (9 years, 3 months ago) by thomas
Branches: RELENG_4
Diff to: previous 1.50.2.41: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.41: +1 -1 lines
Unbreak the build when 'device ata' is configured, but none of
'device atapi*'.

This fix is specific to RELENG_4 (the problem was introduced in rev.
1.50.2.41, when I MFCd ATAPI/CAM).

Reviewed by:	rwatson
Based on a patch submitted by:	Arno J. Klaassen <arno@heho.snv.jussieu.fr>
Pointy hat to:	thomas

Revision 1.50.2.41: download - view: text, markup, annotated - select for diffs
Thu Oct 31 23:10:33 2002 UTC (9 years, 3 months ago) by thomas
Branches: RELENG_4
Diff to: previous 1.50.2.40: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.40: +28 -10 lines
MFC: ATAPI/CAM driver. This driver allows ATAPI devices to be used through
the CAM framework.

Reviewed by:	sos, roberto
OK'd by:	re

Revision 1.156: download - view: text, markup, annotated - select for diffs
Tue Oct 22 20:18:51 2002 UTC (9 years, 3 months ago) by thomas
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +4 -12 lines
Fill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUS
and XPT_RESET_DEV.

In order to properly handle reset requests whether they originate in the
ATA layer (atacontrol reinit) or from the CAM layer (camcontrol reset)
ata_reinit does not cause the SIM to be deallocated anymore. The SIM
is now unconditionnally created for each ATAPI bus.

This change may cause existing bus ids to change on some setups.

Reviewed by:	roberto
Approved by:	sos

Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue Oct 1 15:21:57 2002 UTC (9 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +1 -1 lines
Misc cleanups.

Pointed out by: phk/flexelint

Revision 1.50.2.40: download - view: text, markup, annotated - select for diffs
Mon Sep 16 19:35:30 2002 UTC (9 years, 4 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7
Diff to: previous 1.50.2.39: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.39: +8 -6 lines
MFC:
Rearrange where to get the ATAPI magic sequence.

Approved by: re@

Revision 1.154: download - view: text, markup, annotated - select for diffs
Thu Sep 12 14:32:33 2002 UTC (9 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +8 -6 lines
Rearrange where to get the ATAPI magic sequence.

Submitted by: Benjamin Close <cisbjc@cs.unisa.edu.au>

Revision 1.50.2.39: download - view: text, markup, annotated - select for diffs
Tue Aug 20 12:24:20 2002 UTC (9 years, 5 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.38: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.38: +3 -0 lines
MFC:
 Byteswap the serial string:

Revision 1.50.2.38: download - view: text, markup, annotated - select for diffs
Mon Aug 19 18:59:04 2002 UTC (9 years, 5 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.37: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.37: +1 -1 lines
Fix a type in the 48bit handling code use >> not << for the upper
32bits. However this is only cosmetical since the -stable kernel
only has 32 bit block numbers...

Revision 1.153: download - view: text, markup, annotated - select for diffs
Fri Aug 9 20:51:53 2002 UTC (9 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +34 -10 lines
Add the ability to use ATAPI devices via CAM.

The CAM<>ATAPI layer was submitted by "Thomas Quinot <thomas@cuivre.fr.eu.org>"
changes form the version on the net by me (formatting, ability to be used
alone without the ATAPI native device driver, proper speed reporting...)

See /sys/conf/NOTES for usage.

Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>

Revision 1.152: download - view: text, markup, annotated - select for diffs
Wed Jul 31 18:29:34 2002 UTC (9 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -0 lines
Byteswap the serial #

Revision 1.151: download - view: text, markup, annotated - select for diffs
Mon Jul 22 18:35:01 2002 UTC (9 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +16 -35 lines
Update the tags handling a bit, which makes support for the
older IBM DTTA series of drives possible.
Update error handling a bit now we are here.

Revision 1.50.2.36.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 8 18:43:47 2002 UTC (9 years, 7 months ago) by murray
Branches: RELENG_4_6
CVS tags: RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE
Diff to: previous 1.50.2.36: preferred, colored; next MAIN 1.50.2.37: preferred, colored
Changes since revision 1.50.2.36: +1 -1 lines
MFS: Fix a misplaced splx().

Approved by:	sos,so,re

Revision 1.50.2.37: download - view: text, markup, annotated - select for diffs
Wed Jun 19 08:30:48 2002 UTC (9 years, 7 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.36: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.36: +1 -1 lines
Fix the tags bug. Too simple really a misplaced splx()..

Revision 1.150: download - view: text, markup, annotated - select for diffs
Sat Jun 8 21:33:42 2002 UTC (9 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +1 -1 lines
Fix a '<<' that should have been a '>>' in the 48bit case.

Fortunately we only have had 32bit block counts until recently,
and no 2TB disks :)

Revision 1.149: download - view: text, markup, annotated - select for diffs
Wed Apr 10 11:18:07 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +1 -1 lines
Fix the FreeBSD native ATA RAID code a bit.

Revision 1.50.2.36: download - view: text, markup, annotated - select for diffs
Sun Apr 7 09:54:12 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_6_BP, RELENG_4_6_0_RELEASE
Branch point for: RELENG_4_6
Diff to: previous 1.50.2.35: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.35: +9 -4 lines
MFC:
Dont allow to detach twice.
Unlock the channel again if an ata_reinit() fails.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Fri Apr 5 18:37:04 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -1 lines
Unlock the channel again if an ata_reinit() fails.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Fri Apr 5 18:02:33 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -1 lines
Dont allow to detach twice.

Revision 1.50.2.35: download - view: text, markup, annotated - select for diffs
Fri Apr 5 15:59:38 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.34: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.34: +3 -1 lines
MFC:
Add forgotten ATA_UNLOCK_CH when getting status from non-existing
enclosure.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Fri Apr 5 15:58:45 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +3 -1 lines
Add forgotten ATA_UNLOCK_CH when getting status from non-existing
enclosure.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri Apr 5 13:13:55 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +2 -1 lines
Make the ATA driver compile & work on the sparc64 platform.

Initial work & code by tmm.

Lots of changes and rearrangements by yours truely to make busdma
be a little less a PITA (but I still dont like it).

Revision 1.50.2.34: download - view: text, markup, annotated - select for diffs
Tue Apr 2 14:48:18 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.33: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.33: +3 -0 lines
MFC:
        Add get-status to the ATA RAID subsystem.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Tue Apr 2 13:47:23 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -0 lines
Add get-status to the ATA RAID subsystem.

Revision 1.50.2.33: download - view: text, markup, annotated - select for diffs
Sun Mar 31 11:37:12 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.32: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.32: +152 -13 lines
MFC:
Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.
Add support for creating/deleting ATA RAID's.
This completes the ATA RAID support, since all functions to manipulate
the RAID are accessible from FreeBSD, the BIOS on the ATA RAID cards
are only nessesary for booting.

I decided to allow for creation of ATA RAID's on any ATA controller, but
please keep in mind the restrictions on that. Due to the BIOS not
knowing what to do you can only boot from a RAID1 or the first disk
in a SPAN, if its not located on a "real" ATA RAID controller like
the Promise or Highpoint controllers.

Sponsored by: Advanis

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Mar 30 16:51:47 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +0 -10 lines
Remove debug output in last commit.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Mar 30 16:33:13 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +152 -9 lines
Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.

Sponsored by: Advanis

Revision 1.141: download - view: text, markup, annotated - select for diffs
Wed Mar 27 10:58:59 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +10 -4 lines
Add support for creating/deleting ATA RAID's.
This completes the ATA RAID support, since all functions to manipulate
the RAID are accessible from FreeBSD, the BIOS on the ATA RAID cards
are only nessesary for booting.

I decided to allow for creation of ATA RAID's on any ATA controller, but
please keep in mind the restrictions on that. Due to the BIOS not
knowing what to do you can only boot from a RAID1 or the first disk
in a SPAN, if its not located on a "real" ATA RAID controller like
the Promise or Highpoint controllers.

Sponsored by: Advanis

Revision 1.50.2.32: download - view: text, markup, annotated - select for diffs
Tue Mar 26 09:34:21 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.31: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.31: +8 -12 lines
Fix the panic on resume, the problem is that we cant use
tsleep that early in the resume code path. Using ATA_IMMEDIATE
works nicely around this problem by not waiting in tsleep, and
we poll for the ready state of the device anyways (now we just
poll a little longer)...

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue Mar 26 09:31:22 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +7 -11 lines
Misc little cleanups.

Revision 1.50.2.31: download - view: text, markup, annotated - select for diffs
Mon Mar 25 21:42:47 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.30: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.30: +6 -1 lines
Fix the vmware boot prope problem.

Add missing splbio's

Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue Mar 19 12:14:13 2002 UTC (9 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -0 lines
Add some break's after default: in the end of switch statements to
keep gcc-3.1+ happy:
ata-all.c:410: warning: deprecated use of label at end of compound statement
ata-all.c:587: warning: deprecated use of label at end of compound statement
ata-raid.c:99: warning: deprecated use of label at end of compound statement
ata-raid.c:151: warning: deprecated use of label at end of compound statement

Revision 1.50.2.30: download - view: text, markup, annotated - select for diffs
Mon Mar 18 08:37:33 2002 UTC (9 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.29: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.29: +772 -1341 lines
MFC:    the entire ATA driver with all functionality as of 2002-03-18.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Thu Mar 14 21:35:55 2002 UTC (9 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +3 -3 lines
Unbreak the probing of some CDROM drives.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Mar 11 21:04:32 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +22 -24 lines
Add new support for locking an ATA channel and use that throughout
the ATA/ATAPI driver. This solves the concurrency problem with
the new GEOM code, and also cuts a good deal of the patch size
in the upcoming MFC.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Mar 10 21:03:04 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +4 -3 lines
Silence a warning when compile without atapi devices.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Fri Mar 8 21:36:49 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +1 -1 lines
Even more Highpoint RAID support.

Fix the 80pin cable detection system.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Fri Mar 8 11:31:37 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +1 -1 lines
cosmetics

Revision 1.133: download - view: text, markup, annotated - select for diffs
Thu Mar 7 16:34:19 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +1 -9 lines
Minor cosmetic changes to minimise diffs for MFC.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Mar 5 09:24:18 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +2 -2 lines
Misc little cleanups:

Link if only ATAPI device in kernel config
Remove unused #includes
Rearrange a bit in ata-raid to make diff against -stable smaller
Enable wc as default again, dunne how this happend...

Revision 1.131: download - view: text, markup, annotated - select for diffs
Sun Mar 3 15:36:20 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +29 -43 lines
Major update of the ATA RAID code, part 3:

Add code to properly detach/attach disks that are part of a RAID.

Mark a disk that is attached on an ATA channel belonging to a
RAID as a spare disk that can be used for rebuilding failed RAID1's.

Add support for rebuilding failed RAID1's.

Several fixes to the detach/attach code.

For replacing a disk in a failed RAID1 do the following:

Find the controller channel# of the failed disk.

Exec 'atacontrol detach <channel#>' to free the disk from the system.

Replace the failed disk with a new one of at least the same size.
If your have your disks in drawers/enclosures this can be done with
the system still running.

Exec 'atacontrol attach <channel#>' to add the disk to the system and
mark it as a valid spare for rebuild.

Exec 'atacontrol rebuild <array#>'

The system will rebuild the array on the fly, the array can still
be used during this, although with slower performance.

Please let me know of any problems with this!

Sponsored by: Advanis Inc.

MFC after: 2 weeks

Revision 1.130: download - view: text, markup, annotated - select for diffs
Tue Feb 12 13:21:51 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +16 -8 lines
Fix buglets in the ATAPI resume code.

This also fixes an old bug where some ATAPI devices went into
funny mode on an 'atacontrol reinit' command.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Tue Feb 12 11:35:15 2002 UTC (9 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +1 -12 lines
Major update of the ATA RAID code, part 2:

More cleanups of the RAID1 failure mode code.

Add functionality that writes the changed RAID config setup
back to the disks (in controller BIOS specific format), so
that a reboot will make the BIOS pick up the changed config.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Feb 6 19:35:36 2002 UTC (10 years ago) by julian
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +1 -1 lines
Make LINT compile after fruitless attempts to get the authors
to fix their code.

ata stuff:
Change name of ar_attach to not colide with existing ar_attach in if_ar.c.
usb stuff:
Create a dummy function to satisfy a call to it when in DEBUG mode.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Feb 4 19:23:40 2002 UTC (10 years ago) by sos
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +560 -519 lines
Major update of the ATA RAID code, part 1:

Overhaul of the attach/detach code and structures, there were some nasty
bugs in the old implementation. This made it possible to collapse the
ATA/ATAPI device control structures into one generic structure.

A note here, the kernel is NOT ready for detach of active devices,
it fails all over in random places, but for inactive devices it works.
However for ATA RAID this works, since the RAID abstration layer
insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the
physical disks.

Proberly detect the RAID's from the BIOS, and mark critical RAID1
arrays as such, but continue if there is enough of the mirror left
to do so.

Properly fail arrays on a live system. For RAID0 that means return EIO,
and for RAID1 it means continue on the still working part of the mirror
if possible, else return EIO.
If the state changes, log this to the console.

Allow for Promise & Highpoint controllers/arrays to coexist on the
same machine. It is not possible to distribute arrays over different
makes of controllers though.

If Promise SuperSwap enclosures are used, signal disk state on the
status LED on the front.

Misc fixes that I had lying around for various minor bugs.

Sponsored by: Advanis Inc.

Revision 1.50.2.29: download - view: text, markup, annotated - select for diffs
Sat Jan 5 17:49:36 2002 UTC (10 years, 1 month ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.50.2.28: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.28: +77 -75 lines
Add support for 48bit access for devices >137G.

Approved by: RE@

Revision 1.50.2.28: download - view: text, markup, annotated - select for diffs
Wed Jan 2 15:30:22 2002 UTC (10 years, 1 month ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.27: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.27: +82 -25 lines
Add support for latest SiS chipsets.

Add support for HPT 372.

Add VIA 82c686b southbridge data corruption fix.

Fix size of media bug in atapi-cd.

Update copyright headers.

Approved by: RE@

Revision 1.126: download - view: text, markup, annotated - select for diffs
Tue Dec 25 14:43:08 2001 UTC (10 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +11 -6 lines
Fix yet another fake slave problem for PCCARD devices.

Revision 1.50.2.27: download - view: text, markup, annotated - select for diffs
Sat Dec 22 19:12:18 2001 UTC (10 years, 1 month ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.26: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.26: +3 -1 lines
Allow some broken PCCARD CDROMS to be used.

Approved by: RE@freebsd.org

Revision 1.125: download - view: text, markup, annotated - select for diffs
Fri Dec 14 21:23:19 2001 UTC (10 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +1 -1 lines
Do be so anal on detach, properly free interrupt even if no devices.

Revision 1.50.2.26: download - view: text, markup, annotated - select for diffs
Wed Dec 12 08:45:32 2001 UTC (10 years, 2 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.25: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.25: +1 -1 lines
Fix bogon that caused compile warnings.

Revision 1.50.2.25: download - view: text, markup, annotated - select for diffs
Wed Dec 12 08:42:55 2001 UTC (10 years, 2 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.24: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.24: +3 -0 lines
Properly detect the Promise TX2 ata133 controller.

Revision 1.50.2.24: download - view: text, markup, annotated - select for diffs
Tue Dec 11 10:52:57 2001 UTC (10 years, 2 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.23: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.23: +9 -2 lines
MFC:

Fix support for the Promise Tx2 line of controllers.

Add support for Promises new ATA133 controllers.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Tue Nov 13 11:33:23 2001 UTC (10 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -2 lines
Fix bogon, free() the right memory type.

Revision 1.50.2.23: download - view: text, markup, annotated - select for diffs
Wed Oct 31 18:58:09 2001 UTC (10 years, 3 months ago) by asmodai
Branches: RELENG_4
Diff to: previous 1.50.2.22: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.22: +1 -1 lines
Fix result of pasting wrong buffer, this changes a MFC'd ID to the
correct one.

Notified of by:	Michal Mertl <mime@traveller.cz>

Revision 1.50.2.22: download - view: text, markup, annotated - select for diffs
Wed Oct 31 15:29:52 2001 UTC (10 years, 3 months ago) by asmodai
Branches: RELENG_4
Diff to: previous 1.50.2.21: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.21: +6 -0 lines
MFC: Add some Intel ID's:
	ICH3 controller chipset (including mobile),
	Additional ICH ID,
	Additional PIIX4 ID

Approved by:	sos

Revision 1.50.2.21: download - view: text, markup, annotated - select for diffs
Fri Oct 26 17:47:47 2001 UTC (10 years, 3 months ago) by asmodai
Branches: RELENG_4
Diff to: previous 1.50.2.20: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.20: +2 -2 lines
Reduce diff, add Soren's email address.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sat Oct 6 11:07:04 2001 UTC (10 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +83 -98 lines
Update with latest ATA/ATAPI ver 6 rev 2 items.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Oct 3 08:25:11 2001 UTC (10 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +8 -3 lines
Hopefully fix the identify failed on ATAPI slaves on some notebooks.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Thu Sep 20 15:25:23 2001 UTC (10 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +13 -9 lines
Overhaul to minimize stack usage, in some places >2K was used
on the stack *blush*...

Revision 1.120: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:37:01 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -2 lines
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha

Revision 1.119: download - view: text, markup, annotated - select for diffs
Sat Sep 1 08:47:11 2001 UTC (10 years, 5 months ago) by sos
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -1 lines
Make "atapi less" kernels link again.

Question is if we should allow the ioctl only interface to be
created if atapi devices are present, but no driver linked in....

Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Aug 30 09:47:17 2001 UTC (10 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +42 -1 lines
Add support for sending ATAPI commands via ioctl.

Revision 1.50.2.20: download - view: text, markup, annotated - select for diffs
Tue Aug 28 17:56:14 2001 UTC (10 years, 5 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.50.2.19: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.19: +16 -9 lines
MFC:

Add support for yet another VIA '686 chip combo.

Fix minor bug in the VIA code.

Add support for Promise TX2 chips, includind tagged queueing.

Allow sharing of the primary/secondary irq's (14 & 15)

Add support for tagged queueing on new IBM disks (IC*).

Fix support for Yamaha & NEC burners.

Fix calculation of EOM on CDROM's

Quiet the READ TOC errors when burning CDR/RW's.

This brings the 4.x branch in sync with -current as of 2001-08-28.

Approved by: jkh

Revision 1.117: download - view: text, markup, annotated - select for diffs
Tue Aug 21 11:35:46 2001 UTC (10 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +11 -14 lines
Finally commit some of the minor things I've collected over the last month(s):

Add tagged queueing support for new IBM drives.

Add support for Yet Another Promise ATA 100 chip.

Flush disk cache on close.

Dont flush the disk cache on BIO_ORDERED anymore.

Cleanup the tests for DMA on ATAPI devices.

Allow to share ALL irq's even the std irg 14 & 15.

Fix calculation bug in end of media code on CD's.

Add REZERO on opening a CDR/CDRW.

Cleanup ataioctl a bit.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Fri Aug 10 06:37:05 2001 UTC (10 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +2 -3 lines
- Remove asleep(), await(), and M_ASLEEP.
- Callers of asleep() and await() have been converted to calling tsleep().
  The only caller outside of M_ASLEEP was the ata driver, which called both
  asleep() and await() with spl-raised, so there was no need for the
  asleep() and await() pair.  M_ASLEEP was unused.

Reviewed by:	jasone, peter

Revision 1.50.2.19: download - view: text, markup, annotated - select for diffs
Mon May 28 07:27:16 2001 UTC (10 years, 8 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.18: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.18: +6 -2 lines
MFC:

Add support for the AMD 766 chipset.
Fix bogon in VIA code.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Thu May 17 10:29:30 2001 UTC (10 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +43 -46 lines
Update to use the changed ioctl interface.

Revision 1.50.2.18: download - view: text, markup, annotated - select for diffs
Wed Apr 18 07:06:47 2001 UTC (10 years, 9 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.50.2.17: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.17: +2 -1 lines
MFC:
Add support the the Intel ICH2 mobile.

Approved by: jkh

Revision 1.50.2.17: download - view: text, markup, annotated - select for diffs
Thu Apr 5 17:21:54 2001 UTC (10 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.16: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.16: +4 -1 lines
MFC:

Add tunables to control DMA/WC/TAGS/ATAPI_DMA and associated
sysctl's to read settings.

Approved by: jkh

Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu Apr 5 11:15:23 2001 UTC (10 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +3 -3 lines
Add new flag ATPR_F_QUIET to atapi_request.

Cleanup error handling.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Mar 26 12:40:07 2001 UTC (10 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +1 -2 lines
Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Wed Mar 21 11:44:58 2001 UTC (10 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +11 -7 lines
Do not change/get mode on a nonexisting device.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Mon Mar 19 11:55:13 2001 UTC (10 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -2 lines
Only allow root to attach/detach/etc ATA/ATAPI devices.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Mon Mar 19 08:04:53 2001 UTC (10 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +63 -37 lines
Add sysctls for reading the tunables as suggested by des.
Minor cleanups plus checks of the ->active state.
Cosmetics.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Mar 15 15:36:25 2001 UTC (10 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +199 -60 lines
Provide the interface to atacontrol and associated logic.

see atacontrol(8) for more.

Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS
options are gone, use the tuneables listed in ata.4 instead from
the loader (this makes it possible to switch off DMA before the
driver has to touch the devices on broken hardware).

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Mar 14 14:00:08 2001 UTC (10 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +12 -10 lines
Minor cleanup to the previous commit:

Print what devices went away and which arrived.

Avoid timeout loop on missing status.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Wed Mar 14 12:05:42 2001 UTC (10 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +188 -150 lines
Refine the detach/attach code.

Proberly fail outstanding bio requests on devices that are detached.

This makes it possible to change between disk/cdrom/dvd/whathaveyou
in a notebook, just by suspending it, changing the device in the
bay (or what you model calls it), unsuspend and the ATA driver
will figure out what disappeared and properly fail those, and attach
any new devices found.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Tue Mar 6 21:43:46 2001 UTC (10 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +21 -778 lines
Split out the ata probes in seperate files for each bus type.

Revision 1.50.2.16: download - view: text, markup, annotated - select for diffs
Sun Feb 25 21:35:19 2001 UTC (10 years, 11 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.15: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.15: +15 -12 lines
MFC:

Get the ata drive in sync with -current to the following versions:

ata-all.c       1.102 (minus 1.100)
ata-all.h       1.37
ata-disk.c      1.92
ata-disk.h      1.31
ata-dma.c       1.57
ata-raid.c      1.10
ata-raid.h      1.4
atapi-all.c     1.63 (minus 1.62)
atapi-all.h     1.32
atapi-cd.c      1.76 (minus progress stuff)
atapi-cd.h      1.22 (minus progress stuff)
atapi-fd.c      1.57
atapi-fd.h      1.13
atapi-tape.c    1.49
atapi-tape.h    1.14

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun Feb 18 18:02:15 2001 UTC (10 years, 11 months ago) by markm
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -2 lines
Set the interrupt-harvesting bit for those hardware items that I
can actually test.

Nothing will happen until the sysadmin turns on intr-harvesting
on her computer.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Mon Feb 12 14:29:13 2001 UTC (10 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -2 lines
Oops, its no longer NISA its DEV_ISA, sigh....

Revision 1.103: download - view: text, markup, annotated - select for diffs
Mon Feb 12 10:18:59 2001 UTC (10 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -3 lines
Dont rely on isa includes to get at the std port adresses.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Mon Feb 12 08:33:28 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +4 -2 lines
Properly report the VIA '586 type.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Feb 8 21:59:27 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +5 -6 lines
Fix a memory leak.

Pointed out by: Asmodai

Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Feb 6 16:44:25 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +190 -175 lines
Introduce busspace instead of the good old in/out instructions.
Not pretty but it works (I hope)...

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Feb 6 12:49:33 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +2 -2 lines
Damn! that was the wrong patch! get it right this time....

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Feb 6 12:41:52 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +7 -1 lines
Fix the clone functionality in atapi-cd, it didn't work for
devs other than the first, and allowed to clone a nonexistent
device..

Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Jan 29 10:01:11 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +16 -21 lines
Convert ata and atapi #if NATA* > 0 to options instead.  Stop config
trying to count the number of ata* devs since they were not used anyway.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Jan 29 09:38:37 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Jan 17 09:22:13 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +4 -1 lines
Add first cut support for the ATA100 capable VIA82c686b.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Jan 14 19:36:20 2001 UTC (11 years ago) by sos
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +5 -7 lines
Use prober atomic operations when test&set'ing ->active.

This turns some of my lockups under SMP into spontanious reboots...

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Jan 10 19:19:47 2001 UTC (11 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -2 lines
Add session argument to *close_disk, allowing to set session type on fixate.
Add support for different blank/erase types.

Update headers.

Revision 1.50.2.15: download - view: text, markup, annotated - select for diffs
Thu Jan 4 09:08:56 2001 UTC (11 years, 1 month ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.14: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.14: +5 -2 lines
MFC:
Proberly back down DMA modes on the Acer Aladdin.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue Dec 26 12:05:48 2000 UTC (11 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -4 lines
Use M_ZERO flag on malloc when approbiate.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Tue Dec 19 10:37:03 2000 UTC (11 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +5 -2 lines
Proberly back down DMA modes on the Acer Aladdin.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Dec 8 20:08:06 2000 UTC (11 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -2 lines
Staticize some malloc M_ instances.

Revision 1.50.2.14: download - view: text, markup, annotated - select for diffs
Sun Nov 19 12:01:10 2000 UTC (11 years, 2 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_2_0_RELEASE
Diff to: previous 1.50.2.13: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.13: +2 -2 lines
MFC:

Fix a bogon..

Revision 1.89: download - view: text, markup, annotated - select for diffs
Sat Nov 18 12:14:35 2000 UTC (11 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2 lines
Fix a braino ..

Revision 1.50.2.13: download - view: text, markup, annotated - select for diffs
Thu Nov 16 10:52:26 2000 UTC (11 years, 2 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.12: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.12: +16 -12 lines
Put the probe verboseness behind bootverbose

Approved by: jkh

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Nov 16 10:52:00 2000 UTC (11 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +16 -12 lines
Put the probe verboseness behind bootverbose

Revision 1.50.2.12: download - view: text, markup, annotated - select for diffs
Mon Nov 13 08:20:40 2000 UTC (11 years, 2 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.11: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.11: +68 -53 lines
MFC:
Fix the probing problems that caused lost slaves etc..

Approved by: jkh

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Nov 12 20:40:05 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +68 -54 lines
Hopefully fix the probing problems that caused lost slaves etc..

Revision 1.50.2.11: download - view: text, markup, annotated - select for diffs
Thu Nov 9 10:47:29 2000 UTC (11 years, 3 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.10: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.10: +29 -31 lines
MFC:

Fix the missing slave problem, rearrange reset code a bit to
allow all ATAPI devices to reset proberly.

Approved by: jkh

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Nov 8 21:25:43 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3 lines
Rearrange the timeouts in the reset code a bit, some ATAPI devices
are picky about this.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Nov 8 19:31:39 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +18 -7 lines
Hopefully solve the lost slave problem.

Revision 1.50.2.10: download - view: text, markup, annotated - select for diffs
Sat Nov 4 12:33:17 2000 UTC (11 years, 3 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.9: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.9: +12 -4 lines
MFC:

Fix probing of CMD646 controllers..
Dont allow DMA on broken HW.

Approved by: jkh

Revision 1.84: download - view: text, markup, annotated - select for diffs
Fri Nov 3 17:09:34 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +31 -46 lines
Fix breakage on some ATA chips that dont have busmastering set.
Tidy up the probe a bit..

Revision 1.83: download - view: text, markup, annotated - select for diffs
Mon Oct 30 20:45:24 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +16 -4 lines
Try a bit harder to test for ATA/ATAPI HW to probe, this is to avoid
some of the false comrades some devices fakes...

Revision 1.50.2.9: download - view: text, markup, annotated - select for diffs
Mon Oct 30 09:41:28 2000 UTC (11 years, 3 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.8: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.8: +7 -3 lines
MFC:

Fix the PCCARD ATA breakage..
This is due to a bug that has been in there since Warneer did the
PCCARD stuff, the altioaddr is not offset 8 its offset 14 from
the base address.
Also only probe the master device, no known PCCARD ATA thingies
has a slave AFAIK..

Revision 1.82: download - view: text, markup, annotated - select for diffs
Mon Oct 30 09:36:40 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +7 -3 lines
Fix the PCCARD ATA breakage..
This is due to a bug that has been in there since Warneer did the
PCCARD stuff, the altioaddr is not offset 8 its offset 14 from
the base address.
Also only probe the master device, no known PCCARD ATA thingies
has a slave AFAIK..

Revision 1.50.2.8: download - view: text, markup, annotated - select for diffs
Fri Oct 27 21:01:49 2000 UTC (11 years, 3 months ago) by dfr
Branches: RELENG_4
Diff to: previous 1.50.2.7: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.7: +3 -3 lines
Fix merge breakage.

Revision 1.50.2.7: download - view: text, markup, annotated - select for diffs
Wed Oct 25 06:43:01 2000 UTC (11 years, 3 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.6: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.6: +248 -193 lines
Add support for tagged queing.
Add options ATA_ENABLE_TAGS.
Add support for ATA software RAID's (Promise Fasttrak Highpoint 370).
Dont use ivars anymore.
Fix the "resource already allocated" panic.
Up the reset pulse to 100ms.
Add support for ServerWorks ROSB4 ATA33 chipset.
Add support for CMD 648 ATA66 & CMD 649 ATA100 chipsets.
Add support for the Promise ATA100 OEM chip (pdc20265).
Add support for the Cyrix 5530.

This brings the ata driver in sync with these -current versions:

src/sys/dev/ata/ata-all.c,v 1.81 2000/10/24 13:50:22 sos Exp $
src/sys/dev/ata/ata-all.h,v 1.34 2000/10/18 18:49:42 sos Exp $
src/sys/dev/ata/ata-disk.c,v 1.86 2000/10/22 12:16:51 sos Exp $
src/sys/dev/ata/ata-disk.h,v 1.30 2000/10/13 13:04:45 sos Exp $
src/sys/dev/ata/ata-dma.c,v 1.51 2000/10/22 12:17:38 sos Exp $
src/sys/dev/ata/ata-raid.c,v 1.3 2000/10/22 12:17:57 sos Exp $
src/sys/dev/ata/ata-raid.h,v 1.2 2000/10/22 12:17:57 sos Exp $
src/sys/dev/ata/atapi-all.c,v 1.55 2000/10/15 14:18:03 phk Exp $
src/sys/dev/ata/atapi-all.h,v 1.29 2000/09/19 11:08:39 sos Exp $
src/sys/dev/ata/atapi-cd.c,v 1.66 2000/09/20 07:00:24 sos Exp $
src/sys/dev/ata/atapi-cd.h,v 1.20 2000/09/19 11:08:39 sos Exp $
src/sys/dev/ata/atapi-fd.c,v 1.53 2000/09/20 07:00:24 sos Exp $
src/sys/dev/ata/atapi-fd.h,v 1.12 2000/09/19 11:08:39 sos Exp $
src/sys/dev/ata/atapi-tape.c,v 1.45 2000/09/19 11:08:39 sos Exp $
src/sys/dev/ata/atapi-tape.h,v 1.13 2000/09/19 11:08:39 sos Exp $

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Oct 24 13:50:22 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -3 lines
Fix the problem with DMA mode not working on Aladdin chips.
Amasing in how many ways Acer has screwed up that chip.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Oct 22 12:16:00 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -8 lines
Up the reset pulse to 100ms in ata_reset, some drives especially
DVD drives need this to reset proberly.

Remove some verboseness..

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Oct 18 18:49:42 2000 UTC (11 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -8 lines
Minor changes to the ATA RAID support code, remove some verbosity
and put some under bootverbose..

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Oct 15 14:18:03 2000 UTC (11 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +1 -2 lines
Remove unneeded #include <machine/clock.h>

Revision 1.77: download - view: text, markup, annotated - select for diffs
Fri Oct 13 12:09:23 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +6 -2 lines
Fix ISA only systems.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Fri Oct 13 11:21:27 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +37 -24 lines
Get rid of the ivars entirely.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Oct 5 23:09:51 2000 UTC (11 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
- Heavyweight interrupt threads on the alpha for device I/O interrupts.
- Make softinterrupts (SWI's) almost completely MI, and divorce them
  completely from the x86 hardware interrupt code.
  - The ihandlers array is now gone.  Instead, there is a MI shandlers array
    that just contains SWI handlers.
  - Most of the former machine/ipl.h files have moved to a new sys/ipl.h.
- Stub out all the spl*() functions on all architectures.

Submitted by:	dfr

Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Oct 5 08:28:06 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -7 lines
Cleanup the chipset specific interrupt code a bit.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Oct 4 08:28:37 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -2 lines
Fix the MASTERDEV breakage the caused the PIIX controllers to get
missed in the probe. This might break the CMD chips again, more
testing is needed on that, but we need the mainstream chips to
work again ...

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Oct 3 13:12:36 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +45 -46 lines
Add support for ServerWorks ROSB4 ATA33 chipset.

Add support for CMD 648 ATA66 & CMD 649 ATA100 chipsets.

Fix the "resource already allocated" panic with the CMD and other
braindead controllers.

Add options ATA_ENABLE_TAGS, without this option tagged queuing will
not be attempted.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Sep 29 16:50:31 2000 UTC (11 years, 4 months ago) by dfr
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +13 -13 lines
Make the alpha hacks dependant on __alpha__ instead of !__i386__.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Sep 24 18:19:43 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +23 -18 lines
Fix the breakage that snatched the ioports from the fdc device.

Fix promise support.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Sep 20 07:00:24 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +1 -3 lines
Remove unneeded includes

Pointed out by: phk

Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue Sep 19 11:08:37 2000 UTC (11 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +163 -106 lines
Add support for tagged queuing on ATA drives. There is only support for
IBM's DPTA and DTLA series of drives (no other disk vendors are known
to support this) on non-Promise controllers (promise controllers lockup
when given the tagged queuing specific commands).
It gives especially master/slave comboes about 5% better performance.

Add support for the Promise ATA100 OEM chip (pdc20265)

Add support for the Cyrix 5530

Change the way status is read from the drives, use the alternate
status reg when possible.

Better support for DEVFS, the acdXtY devices are now created when needed.

Lots of little cleanups.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Sep 13 18:33:22 2000 UTC (11 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +1 -7 lines
- Remove the inthand2_t type and use the equivalent driver_intr_t type from
  newbus for referencing device interrupt handlers.
- Move the 'struct intrec' type which describes interrupt sources into
  sys/interrupt.h instead of making it just be a x86 structure.
- Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd'
  and 'struct intrec'
- Move the code to translate new-bus interrupt flags into an interrupt thread
  priority out of the x86 nexus code and into a MI ithread_priority()
  function in sys/kern/kern_intr.c.
- Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and
  sys/pci/pci_compat.c.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu Sep 7 01:32:42 2000 UTC (11 years, 5 months ago) by jasone
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -1 lines
Major update to the way synchronization is done in the kernel.  Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Aug 28 21:48:07 2000 UTC (11 years, 5 months ago) by dfr
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +2 -2 lines
* Completely rewrite the alpha busspace to hide the implementation from
  the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.

Revision 1.50.2.6: download - view: text, markup, annotated - select for diffs
Tue Aug 22 08:41:28 2000 UTC (11 years, 5 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_1_1_RELEASE
Diff to: previous 1.50.2.5: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.5: +105 -67 lines
MFC:

Update with latest fixes from -current.

ATA100 support.
New improved probe.
Multisector setup more restrictive ata-disk.
New error recovery in ata-disk.
Remove sequence checks in atapi-cd

Brings -stable functionality up to and including following -current revisions:

$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.64
$FreeBSD: src/sys/dev/ata/ata-all.h,v 1.30
$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.74
$FreeBSD: src/sys/dev/ata/ata-disk.h,v 1.27
$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.42
$FreeBSD: src/sys/dev/ata/atapi-all.c,v 1.51
$FreeBSD: src/sys/dev/ata/atapi-all.h,v 1.28
$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.63
$FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.19
$FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.51
$FreeBSD: src/sys/dev/ata/atapi-fd.h,v 1.11
$FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.44
$FreeBSD: src/sys/dev/ata/atapi-tape.h,v 1.12

Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Aug 16 07:09:04 2000 UTC (11 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +58 -60 lines
Rearrange the probe a bit, hopefully this will help to eleminate
some of the fake devices sometimes seen on single device ATA
channels.

Proberly fail on failures in ata-disk.c, retry instead of hang.

Cleanup the VIA probe/init code a bit.

Fix a couble of missing free's in atapi-cd.c in the changer code.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Aug 11 10:34:22 2000 UTC (11 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -5 lines
Backout the tsleep on probe, it breaks in resume mode as tsleep
not always has a context to sleep on.
Back to the drawing board...

Revision 1.62: download - view: text, markup, annotated - select for diffs
Tue Aug 8 14:57:36 2000 UTC (11 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -2 lines
Fix braino in the tsleep call, ata_delayed_attach might be a NULL
pointer..

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Aug 6 19:51:58 2000 UTC (11 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +49 -9 lines
Add experimental code for ATA100 support on:

Promise Ultra100 / Fasttrak100
HighPoint HPT370 controllers (fx Abit KA7-100 onboard ctrl, Abit HotRod 100)
Intel ICH2 (Intel 815E based motherboards)

So far I can read >90MB/s on the Promise and the HPT370.
I can write >64MB/s on the promise and >50MB/s on the HPT370 so it seems
writing is still done in ATA66 mode :(
The ICH2 support is untested as of yet...

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Aug 6 19:10:05 2000 UTC (11 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +5 -2 lines
Use tsleep instead od DELAY in probe when not in boot.
This fixes the uptil 30s hangs on PCCARD ata device probes.

Revision 1.50.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 3 00:09:28 2000 UTC (11 years, 6 months ago) by ps
Branches: RELENG_4
Diff to: previous 1.50.2.4: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.4: +2 -2 lines
MFC: Sanitize SYSCTL_HANDLER_ARGS.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Jul 4 11:25:16 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.

Pointed out by:	bde

Revision 1.58: download - view: text, markup, annotated - select for diffs
Mon Jul 3 09:34:58 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -2 lines
Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:

Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

        -sysctl_vm_zone SYSCTL_HANDLER_ARGS
        +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)

Revision 1.50.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 11 17:02:46 2000 UTC (11 years, 8 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_1_0_RELEASE
Diff to: previous 1.50.2.3: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.3: +5 -5 lines
MFC:

Update with latest fixes from -current, brings -stable functionality
up to and including following -current revisions:

ata-all.c  $FreeBSD: src/sys/dev/ata/ata-all.c,v 1.57 2000/05/28 07:51:23
ata-all.h  $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.27 2000/04/09 15:08:26
ata-disk.c $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.69 2000/05/23 19:05:56
ata-dma.c  $FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.38 2000/05/23 19:05:56
atapi-cd.h $FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.18 2000/05/28 07:50:19

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun May 28 07:51:23 2000 UTC (11 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2 lines
Cosmetics: dont say Unknown but Generic chipset in probe..

Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue May 23 19:05:56 2000 UTC (11 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -4 lines
Fix a nasty bug in ata_intr, parens are a good thing if used right.

Make the error recovery code a little more obvious.

Inform the user if UDMA66 mode couldn't be selected due to a
non ATA66 compliant 80pin cable.

Minor cosmetics.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri May 5 09:57:32 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +2 -2 lines
Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter

Revision 1.50.2.3: download - view: text, markup, annotated - select for diffs
Wed May 3 08:56:39 2000 UTC (11 years, 9 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50.2.2: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.2: +16 -12 lines
MFC: Add support for ATA66 on newer revisions of the VIA 82C596

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Apr 9 15:08:26 2000 UTC (11 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +16 -12 lines
Add support for ATA66 on newer revisions of the VIA 82C596

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Mar 18 22:42:44 2000 UTC (11 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -35 lines
Remove the old DSC code, it doesn't work anymore.

Revision 1.50.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 18 22:26:28 2000 UTC (11 years, 10 months ago) by sos
Branches: RELENG_4
CVS tags: RELENG_4_0_0_RELEASE
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.1: +2 -35 lines
Remove the old DSC code, it doesn't work anymore.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 14 20:25:06 2000 UTC (11 years, 10 months ago) by sos
Branches: RELENG_4
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +19 -5 lines
MFC: make disksort do what its supposed to.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Mar 13 12:27:04 2000 UTC (11 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +5 -5 lines
Cleanup sweep.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Mar 13 12:04:52 2000 UTC (11 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +19 -5 lines
Enable disksort the right way both on ATA disks and ATAPI devices.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Feb 27 12:41:07 2000 UTC (11 years, 11 months ago) by sos
Branches: MAIN
CVS tags: RELENG_4_BP
Branch point for: RELENG_4
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3 lines
Fix the problem that caused the boot to fail when modules were loaded.

Real braino, confuses two different softc types, I wonder how this
could ever work :(

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Feb 25 09:48:23 2000 UTC (11 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +57 -40 lines
Add (partial) support for the Cypress ATA controller.

Call intr_teardown on detach.

Always add non masterdevice from unit 2 upwards.

Update to the pccard code, at least some cards are now working,
more testing to follow.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Feb 18 20:57:27 2000 UTC (11 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +795 -438 lines
Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)

Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.

Lots of cosmetic fixes here and there.

Sorry for the size of this megapatchfromhell but it was not
possible otherwise...

newbus patches based on work from: dfr (Doug Rabson)

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Feb 4 10:20:20 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +61 -12 lines
fix support for shared IRQ's.

fix support for multiple HPT & Promise controllers.

support mixed 33/66 devices on the Promise 66 controllers.

fix the refcount stuff in the atapi drivers.

misc cleanups.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Jan 28 20:18:19 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -3 lines
Fix the atapi-fd.c (afd device) so that fx MSDOS formatted ZIP
disks can be mounted. Use b_pblkno instead of b_blkno

Found by: phk

Protect (proberly) against setting modes on nonexisting devices.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Jan 27 19:00:48 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +71 -3 lines
Add sysctl oid hw.atamodes to set the transfermodes online.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Jan 25 20:14:48 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +45 -25 lines
Retry a bit more agressively on the atapi identify.

Try to support older systems reporting irq0 for the first channels.

Support sharing of the std interrupts (says peter :) )

Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.

Add the geometry to the ad probe, its still usefull.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jan 24 20:45:23 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +90 -90 lines
General cleanup.

Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.

Repeat the identify command if drive fails the first.

Protect the timeout functions with splbio.

Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.

Move the handling of next_writeable to userland.

Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Jan 19 07:25:46 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -1 lines
Quantify the calls to ad_attach and atapi_attach so that diskless
or atapiless kernels can be built.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Jan 18 21:02:58 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +152 -5 lines
Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Jan 17 02:04:17 2000 UTC (12 years ago) by sos
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +53 -21 lines
Add support for the Intel 810 chipset (ICH type of chips)

Prober support for the VIA 82C686, I finally got the right datasheet.

Get rid of atapi_wait, merge it into ata_wait.

Avoid a couple of races by using asleep instead of tsleep.

Always use 16bit transfers on ISA systems.

Clear up the atapi_read/write functions.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Jan 3 20:01:18 2000 UTC (12 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -5 lines
Fix link problem on ISA only systems..

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Jan 3 10:26:54 2000 UTC (12 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +84 -39 lines
Add support for VIA 82C596 controller

Better shared irq handeling for Promise & HPT366 controllers

Setup prober PIO mode timings on Promise & HPT366 controllers

Update Copyright headers to be Y2K compliant :)

Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Dec 21 20:18:54 1999 UTC (12 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -19 lines
Yet another cleanup of the VIA code, this time it should work
on all combinations (I hope)...

Add DMA support for the AMD 756 chip (K7 chipset) this is actually the
same as the VIA 82C686 chip (the ATA part that is).

Treat the intel MX chipset PIIX as a PIIX4

Allow UDMA on all disks that say they can handle it.

Cleanup probe printf's a bit

Remove alot of the old #ifdef DEBUG crap.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Dec 18 20:06:30 1999 UTC (12 years, 1 month ago) by sos
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +25 -25 lines
Relax the requirements for doing WDMA2, this should enable DMA
on non ATA[234] compliant disks.

Move all PCI dependent stuff under #ifdef NPCI > 0

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Dec 14 10:25:23 1999 UTC (12 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +30 -9 lines
Have another go at the VIA support, this time use the PCI ID form the
main component in the southbridge chip to determine which VIA chip
we are dealing with.

Try to enable DMA on generic controllers that say they has the
capability, instead of relying on the BIOS to have set it up.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Dec 13 10:19:37 1999 UTC (12 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +10 -7 lines
Add DMA support for the SiS 5591 and old PIIX chipsets.

Add a missing DELAY(1) in ata_wait.

Change the info from ad_version, so the ATA version from the disk can
be used to quantify the DAM modes valid for this drive, ie be more
selective with turning DMA on on older disks that should not support it..

Fix the probe for BIOS enabled DMA in the generic case, master/slave
was reversed in the test.

Check the return for ata_command in all cases, and print warnings if
it fails.

Call ata_dmainit with all dmamodes off when falling back to PIO mode,
that should take care of both the Promise & HPT366 controllers not
being able to handle the fallback...

Cleanup the printf's in the drivers, use the prober device name (if
possible) instead of ataN-master/slave.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Dec 7 22:07:18 1999 UTC (12 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +25 -16 lines
Try a little harder at the VIA DMA support.
Only use UDMA66 on 82C686 and with prober cable.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Nov 26 19:24:26 1999 UTC (12 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +32 -6 lines
Tidy up the VIA support a bit, make it more generic.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Nov 24 21:40:02 1999 UTC (12 years, 2 months ago) by sos
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -2 lines
Add DMA support for the VIA 82C586 & 82C686 chips, also rearrange
to fall back to slower speeds if the faster ones fails to probe.

Log and retry request on UDMA CRC errors.

Fix a couple of warnings.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Nov 8 21:35:59 1999 UTC (12 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +29 -21 lines
Unbreak ATAPI on the Aladdin chipset, only DMA access worked.

Try to use a 32bit mask on the IO addresses, this fixes the alpha
and hopefully doesn't break on any i386 machines.

Try to enable both read & write cache on disks, they should be as
default, but better be sure..

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Nov 6 16:50:19 1999 UTC (12 years, 3 months ago) by sos
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +30 -22 lines
Fix IRQ allocation bug on controllers using a shared interrupt.

Fix a bug which could cause panics in ad/atapi-interrupt.

Add support for UDMA66 on Promise Ultra/Fasttrak controllers.

Get rid of ATA_IGNORE_INTR, and introduce ATA_WAIT_INTR instead.

Add a delay in the dump routine in ata-disk.c, some controllers
seem to need this. Also dont use the timeout watchdog when dumping.

Disable DMA on ATAPI devices as default, add option ATA_ENABLE_ATAPI_DMA
for those that has HW that works.

Add support for some not-up-to-spec ATAPI devices that returns data
together with completition status on data moving cmd's.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Oct 16 09:00:49 1999 UTC (12 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -3 lines
Relax the check for class=storage, subclass=ide to just class=storage.
This allows ata to probe correctly for the HPT366 on Abit's BP6.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed Oct 13 18:56:49 1999 UTC (12 years, 4 months ago) by dfr
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +5 -1 lines
Don't match non-IDE devices in probe.

Reviewed by: sos

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Oct 11 11:04:43 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Fix a bug in the isa attach code which would panic isa systems.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Oct 10 18:08:36 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -3 lines
Remove unused include files.

Submitted by: phk

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Oct 9 19:57:10 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +191 -160 lines
Add support for the HPT366 chip, this is used on the Abit boards and
their HotRod controller and on SIIG PCI ultra DMA controller. These
changes also made lots of the Promise code go away, its all much more
generic this way.

Get rid of atapi_immed_cmd, instead use the queue to move atapi commands
from interrupt context if nessesary, the entire atapi layer has
gotten an overhaul.

Lots of fixes to utililize the new features in subr_disk.c etc, and
get rid of the last biots of softc arrays in the drivers, the
only one left is atadevices which cannot easily go away (yet).

Use our own malloc names, its a lot easier to track memory usage this way.

General cleanup overall.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Oct 7 02:17:19 1999 UTC (12 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +31 -37 lines
Be much more selective in claiming devices that might be IDE controllers.

The old algorithm was:

 if class == storage and subclass != SCSI device must be IDE

This results in claiming 'raid' and 'other' storage devices as IDE,
which is typically not the case.

Reviewed by:	sos

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Sep 24 12:36:10 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +5 -5 lines
Fix timeout handeling and add retry counts.
Add HPT366 probe message (but no real support yet),
Add CDR support for several diffenrent blocktypes, also close
disk as a multisession CD.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Sep 22 12:04:50 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -5 lines
Support quad & max speeds in wormcontrol.
A bit more general cleanup.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Sep 21 19:50:39 1999 UTC (12 years, 4 months ago) by sos
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +257 -151 lines
Ten'th update to the new ATA/ATAPI driver:

It been awhile since the last major update, as a benefit there
are some cool things in this one (and new bugs probably :) )...

The ATA driver has grown "real" timeout support for all devices.
This means that it should be possible to get in contact with
(especially) lost ATAPI devices. It also means that the ATA
driver is now usable on notebooks as it will DTRT on resume.

An experimental hack at utilizing the Promise66's at UDMA66 is
in there, but I cant test it. If someone feels like sending
me one, give me a ping.

The ATAPI DMA enableling scheme has been changed, also better DMA
support for the Aladdin chipset has been implemented for ATAPI
devices. Note that the Aladdin apparently only can do DMA reads
on ATAPI devices, and the Promise cant do ATAPI DMA at all.
I have seen problems on some ATAPI devices that should be able
to run in DMA mode, so if you encounter problems with hanging
atapi devices during the probe, or during access, disable DMA
in atapi-all.c, and let me know. It might be nessesary to do this
via a "white list" for known good devices...

The ATAPI CDROM driver can now use eject/close without hanging and
the bug that caused reading beyond the end of a CD has been fixed.
Media change is also handled proberly. DVD drives are identified
and are usable as CDROM devices at least, I dont have the HW to
test this further, see above :).

The ATAPI tape driver has gotten some support for using the DSC
method for not blocking the IDE channel during read/write when
the device has full buffers. It knows about the OnStream DI-30
device, support is not completed yet, but it can function as a
primitive backup medium, without filemarks, and without bad media
handeling. This is because the OnStream device doesn't handle this
(like everybody else) in HW. It also now supports getting/setting
the record position on devices that supports it.

Some rather major cleanups and rearrangements as well (cvs -b diff
is your freind). I'm closing in on declaring this for beta code,
most of the infrastruture is in place by now.

As usual USE AT YOUR OWN RISK!!, this is still alpha level code.
This driver can hose your disk real bad if anything goes wrong, but
now you have been warned :)

But please tell me how it works for you!

Enjoy!

-Søren

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Sep 3 10:57:16 1999 UTC (12 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -2 lines
Use micro "disk" layer in ata-disk

Reviewed by:	sos

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Sep 1 20:53:35 1999 UTC (12 years, 5 months ago) by dfr
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +13 -2 lines
This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.

This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:41:28 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Aug 6 17:39:37 1999 UTC (12 years, 6 months ago) by sos
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +8 -5 lines
Add limitted support for the Promise Ultra/66 controller. Its
only supported upto UDMA33 like the old Promise, but it works
now. More when I have specs ....

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Jun 25 09:02:56 1999 UTC (12 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +9 -9 lines
Nine'th update to the new ATA/ATAPI driver:

The atapi subsystem has gotten better error handeling and timeouts,
it also tries a REQUEST SENSE command when devices returns errors,
to give a little more info as to what went wrong. It might be a
little verbose for now, but I'm interested in as much feedback on
errors as possible, especially timeouts, as I'm a bit in doubt if
I've chosen resonable default values everywhere.

The disk driver has been changed a bit to prepare for tagged queing,
which is next on my list.

The disk driver has grown a dump routine, I got one implementation
from Darrell Anderson <anderson@cs.duke.edu> which also did
partial dumps (usefull on big memory machines) I left out the
partial stuff for now, and changed the rest alot to fit into the new
ad_request framework.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

-Søren

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu May 20 09:12:02 1999 UTC (12 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +8 -7 lines
Eigth update to the new ATA/ATAPI driver:

Fixed problems:

    LS120/ZIP drives still currupted data.
	Reworked once again, buffered I/O is just ignoring any sizehints
	it is given :(
	Now the atapifd driver splits up requests for devices that has
	limitted transfer size.

    ISA only configs fails on boot with interrupt timeouts.
	The new-bus integration introduced a bug where the softc ptr
	was lost during the probe.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon May 17 15:58:44 1999 UTC (12 years, 8 months ago) by sos
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +20 -14 lines
Seventh update to the new ATA/ATAPI driver:

Fixed problems:

    LS120 drives currupted data.
	The workaround for drives not supporting upto 64K transfers
	has been reworked. It works now both on LS120 & ZIP drives.

    ISA only configs wont compile.
	Fixed.

    The ATA driver wont share interrupts.
	Fixed.

    The "unwanted interrupt" warning gave wrong controller.
	Another lun<>unit messup from the newbus integration.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!

-Søren

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat May 8 21:58:58 1999 UTC (12 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -7 lines
Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Apr 22 08:07:44 1999 UTC (12 years, 9 months ago) by sos
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -2 lines
Fix the promise_intr function, it should use 'lun' not 'unit'
to get the offset into ata_devices.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Apr 21 10:58:07 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +20 -29 lines
Merge a diff that Soren sent me to resolve some lun / unit problems.
While here, also fix my additions to use naming that's more consistant
with Sorens.  (ie: s/softc/scp/)

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Apr 21 07:26:25 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +28 -33 lines
Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager.  There is further room for optimizing
the interfaces still.  All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Apr 18 20:48:15 1999 UTC (12 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +193 -87 lines
Update to use the new-bus framework. No functional changes.

Mostly done by Doug Rabson, minor fixes by me.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Apr 16 21:21:52 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: POST_NEWBUS
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +27 -7 lines
Bring the 'new-bus' to the i386.  This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Apr 10 18:53:35 1999 UTC (12 years, 10 months ago) by sos
Branches: MAIN
CVS tags: PRE_NEWBUS
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +18 -11 lines
Sixth update to the new ATA/ATAPI driver:

Fixed problems:

    Promise controllers was not always set up correctly.
        Parantheses are a good thing, fixed.

    Some older CDROM's could hang the probe.
        Proberly wait for the drive to catch its breath after IDENTIFY.

    Some CD writers fails because they dont support rezero.
        Rearranged the code to not use rezero.

    Warnings now that we use EGCS.
        Fixed.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:57:18 1999 UTC (12 years, 10 months ago) by sos
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +108 -70 lines
Fourth update to the new ATA/ATAPI driver:

Well, better late than newer, but things has been hectic
around here, sorry for the long delay.

DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.

The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.

Fixed problems:

    All known hang problems should be solved
	The probe code has been sligthly changed, this should solve
	the reports I have lying around (I hope).

    Hangs when accessing ata & atapi device on the same channel simultaniously.
	A real braino in ata_start caused this, fixed.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, agaiin you have been warned :)

But please tell me how it works for you!

Enjoy!

-Søren

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Mar 7 21:49:14 1999 UTC (12 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +23 -13 lines
ZIP drives should now be working, I'm not sure about LS120 drives,
reports on those most welcome!

Fixed problems:

    Hang on probe on "fantom" devices.
	The probe now use a timeout to avoid hangs if no interrupt
	is recevied.

There has also been more general code clenaups, and some reorgs.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Mar 5 09:43:30 1999 UTC (12 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +40 -121 lines
Now all actual probing of both ATA & ATAPI devices are done after
interrupts are enabled, this kills the last "unwanted interrupts"
(and there is no ugly hacks like in the old driver to avoid them).
COmmand interrupt devices are now supported, this applies mostly
to older CDROM's and apparently also the ZIP.

Fixed problems:

    Number of total sectors wrong on some older drives.
        Fixed by not using the LBA size unless we know its valid.

There has also been more general code clenaups, some reorgs also.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Mar 3 21:10:29 1999 UTC (12 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +51 -48 lines
Added driver to support ATAPI floppies ie LS-120 & ZIP drives.

Added "options ATA_STATIC_ID" that wires ATA disks like the old wd driver.

Fixed problems:

	Dont use more sectors/intr than the drive supports.
	Fix announce of > 8.4G disks.
	Dont call ad_interrupt/ad_transfer when no disks config'd.
	Use the right page# for CDR write mode params.
	Fix breakage when no PCI support in kernel.
	Implement DEVFS stuff.

General code clenaup.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Mar 1 21:19:18 1999 UTC (12 years, 11 months ago) by sos
Branches: MAIN
Finally!!

The much roumored replacement for our current IDE/ATA/ATAPI is
materialising in the CVS repositories around the globe.

So what does this bring us:

A new reengineered ATA/ATAPI subsystem, that tries to overcome
most of the deficiencies with the current drivers.

It supports PCI as well as ISA devices without all the hackery
in ide_pci.c to make PCI devices look like ISA counterparts.

It doesn't have the excessive wait problem on probe, in fact you
shouldn't notice any delay when your devices are getting probed.

Probing and attaching of devices are postponed until interrupts
are enabled (well almost, not finished yet for disks), making
things alot cleaner.

Improved performance, although DMA support is still WIP and not
in this pre alpha release, worldstone is faster with the new
driver compared to the old even with DMA.

So what does it take away:

There is NO support for old MFM/RLL/ESDI disks.
There is NO support for bad144, if your disk is bad, ditch it, it has
already outgrown its internal spare sectors, and is dying.

For you to try this out, you will have to modify your kernel config
file to use the "ata" controller instead of all wdc? entries.

example:

# for a PCI only system (most modern machines)
controller 	ata0
device		atadisk0	# ATA disks
device		atapicd0	# ATAPI CDROM's
device		atapist0	# ATAPI tapes

#You should add the following on ISA systems:
controller	ata1	at isa? port "IO_WD1" bio irq 14
controller	ata2	at isa? port "IO_WD2" bio irq 15

You can leave it all in there, the system knows how to manage.

For now this driver reuses the device entries from the old system
(that will probably change later), but remember that disks are
now numbered in the sequence they are found (like the SCSI system)
not as absolute positions as the old system.

Although I have tested this on all the systems I can get my hands on,
there might very well be gremlins in there, so use AT YOU OWN RISK!!
This is still WIP, so there are lots of rough edges and unfinished
things in there, and what I have in my lab might look very different
from whats in CVS at any given time. So please have all eventual
changes go through me, or chances are they just dissapears...

I would very much like to hear from you, both good and bad news
are very welcome.

Enjoy!!

-Søren

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options