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

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

Parent Directory Parent Directory | Revision Log Revision Log


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


Revision 367989 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 24 17:13:08 2020 UTC (3 years, 11 months ago) by markj
File length: 25051 byte(s)
Diff to previous 365115
ata(4): Release the ioport resource if device initialization fails

PR:		251346
Submitted by:	janm@transactionware.com
MFC after:	1 week


Revision 365115 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 1 21:40:47 2020 UTC (4 years, 1 month ago) by mjg
File length: 24944 byte(s)
Diff to previous 357455
ata: clean up empty lines in .c and .h files


Revision 357455 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 3 17:35:11 2020 UTC (4 years, 8 months ago) by imp
File length: 24946 byte(s)
Diff to previous 326255
Remove sparc64 kernel support

Remove all sparc64 specific files
Remove all sparc64 ifdefs
Removee indireeect sparc64 ifdefs


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

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

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


Revision 294883 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 27 02:23:54 2016 UTC (8 years, 9 months ago) by jhibbits
File length: 25180 byte(s)
Diff to previous 254263
Convert rman to use rman_res_t instead of u_long

Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources.  For
now, this is still compatible with u_long.

This is step one in migrating rman to use uintmax_t for resources instead of
u_long.

Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.

This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.

Reviewed By: jhb
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075


Revision 254263 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 12 23:30:01 2013 UTC (11 years, 2 months ago) by scottl
File length: 25159 byte(s)
Diff to previous 249476
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by:	jhb
Reviewed by:	jfv, marius, achadd, achim
MFC after:	1 day


Revision 249476 - (view) (download) (annotate) - [select for diffs]
Modified Sun Apr 14 14:02:34 2013 UTC (11 years, 6 months ago) by kib
File length: 25290 byte(s)
Diff to previous 249213
Usnure that PCI bus BIS_GET_DMA_TAG() method sees the actual PCI
device which makes the request for dma tag, instead of some descendant
of the PCI device, by creating a pass-through trampoline for vga_pci
and ata_pci buses.

Sponsored by:	The FreeBSD Foundation
Suggested by:	jhb
Discussed with:	jhb, mav
MFC after:	1 week


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


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

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


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

MFC after:	1 week


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

Reviewed by:	mav
MFC after:	1 week


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


Revision 227849 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 22 21:56:55 2011 UTC (12 years, 11 months ago) by hselasky
File length: 25427 byte(s)
Diff to previous 227701
Rename device_delete_all_children() into device_delete_children().

Suggested by:	jhb @ and marius @
MFC after:	1 week


Revision 227701 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 19 10:11:50 2011 UTC (12 years, 11 months ago) by hselasky
File length: 25431 byte(s)
Diff to previous 227000
Move the device_delete_all_children() function from usb_util.c
to kern/subr_bus.c. Simplify this function so that it no longer
depends on malloc() to execute. Identify a few other places where
it makes sense to use device_delete_all_children().

MFC after:	1 week


Revision 227000 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 1 17:57:21 2011 UTC (12 years, 11 months ago) by marius
File length: 25607 byte(s)
Diff to previous 226680
In r225931 I've missed the only other driver using the pointer returned
by rman_get_virtual(9) to access device registers sparc64 currently cares
about.
Ideally ata(4) should just be converted to access these using bus_space(9)
read/write functions instead as there's really no reason to do it the
former way. However, this part of ata-siliconimage.c should go away in
favor of siis(4) sooner or later anyway and I don't have the hardware to
actually test the SX4 bits of ata-promise.c.
Also ideally the other architectures should also properly handle the
BUS_SPACE_MAP_LINEAR flag of bus_space_map(9) so this code wouldn't need
to be #ifdef'ed.


Revision 226680 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 24 08:47:23 2011 UTC (13 years ago) by mav
File length: 25307 byte(s)
Diff to previous 224270
Some dmesg cosmetics:
 - for the legacy PCI ATA channels move channel number out of the device
description, same as it is for ahci(4), siis(4) and mvs(4);
 - add device description for the ISA ATA channels.


Revision 224270 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 22 16:37:04 2011 UTC (13 years, 3 months ago) by mav
File length: 25082 byte(s)
Diff to previous 214016
 - Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
 - To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.

Submitted by:   Andrew Boyer <aboyer@averesystems.com> (initial version)
Approved by:	re (kib)
MFC after:	1 week


Revision 214016 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 18 11:30:13 2010 UTC (14 years ago) by mav
File length: 25049 byte(s)
Diff to previous 210168
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 210168 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 16 17:27:43 2010 UTC (14 years, 3 months ago) by mav
File length: 25030 byte(s)
Diff to previous 210165
Make legacy ATA emulation detection more strict. This should fix false
positive legacy detection and attach failure/panic for Marvell 88SX6141
controller and potentially some others.

PR:		kern/145064


Revision 210165 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 16 10:05:00 2010 UTC (14 years, 3 months ago) by mav
File length: 24960 byte(s)
Diff to previous 208410
Improve interrupt setup errors handling.


Revision 208410 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 22 07:32:47 2010 UTC (14 years, 5 months ago) by mav
File length: 24818 byte(s)
Diff to previous 204195
Report ATA/SATA channel number to NewBus at location string.


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


Revision 203030 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 26 15:25:24 2010 UTC (14 years, 9 months ago) by mav
File length: 24450 byte(s)
Diff to previous 200171
Add support for SATA part of Marvell 88SE912x controllers to ahci(4).
Limit early revisions from 6Gb/s to 3Gb/s by default, or they negotiate
only 1.5Gbps, when 3Gb/s devices connected.

Add dummy driver for PATA part of these controllers, preventing generic
driver attach them. It causes system freeze when SATA controller used after
PATA was touched.


Revision 200171 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 6 00:10:13 2009 UTC (14 years, 10 months ago) by mav
File length: 24400 byte(s)
Diff to previous 200121
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 200121 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 5 13:40:51 2009 UTC (14 years, 10 months ago) by mav
File length: 25072 byte(s)
Diff to previous 199322
Do not ignore device interrupt if bus mastering is still active. It is
normal in case of media read error and some ATAPI cases, when transfer size
is unknown beforehand. PCI ATA BM specification tells that in case of such
underrun driver should just manually stop DMA engine. DMA engine should
same time guarantie that all bus mastering transfers completed at the moment
of driver reads interrupt flag asserted.
This change should fix interrupt storms and command timeouts in many cases.

PR:		kern/103602, sparc64/121539, kern/133122, kern/139654


Revision 199322 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 16 15:38:27 2009 UTC (14 years, 11 months ago) by mav
File length: 25118 byte(s)
Diff to previous 198717
Change the way in which AHCI+PATA combined controllers, such as JMicron
and Marvell handled. Instead of trying to attach two different drivers to
single device, wrapping each call, make one of them (atajmicron, atamarvell)
attach do device solely, but create child device for AHCI driver,
passing it all required resources. It is quite easy, as none of
resources are shared, except IRQ.

As result, it:
- makes drivers operation more independent and straitforward,
- allows to use new ahci(4) driver with such devices, adding support for
new features, such as PMP and NCQ, same time keeping legacy PATA support,
- will allow to just drop old ataahci driver, when it's time come.


Revision 198717 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 31 13:24:14 2009 UTC (14 years, 11 months ago) by mav
File length: 23518 byte(s)
Diff to previous 191674
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 191674 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 29 21:17:18 2009 UTC (15 years, 6 months ago) by mav
File length: 23527 byte(s)
Diff to previous 191600
Add experimental support for SATA interface power management.
Feature is controlled by hint.ata.X.pm_level tunable:
 0 - PM disabled, old behaviour, default.
 1 - device is allowed to initiate PM state change, host is passive.
 2 - host initiates PARTIAL state transition every time port is idle.
 3 - host initiates SLUMBER state transition every time port is idle.

PARTIAL state has up to 100us (50us for me) wakeup latency, but for my
ICH8M saves 0.5W of power per drive. SLUMBER state has up to 10ms (3.5ms
for me) wakeup latency, but saves 0.8W of power.

Modes 2 and 3 are implemented only for AHCI driver now.

Interface power management is incompatible with device presence detection
(host receives no signal from drive, so unable to monitor it), so later is
disabled when PM is used.


Revision 191600 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 27 21:34:15 2009 UTC (15 years, 6 months ago) by jkim
File length: 23430 byte(s)
Diff to previous 191593
- Give generic AHCI driver lower priority than device-specific drivers.
- Consistently use BUS_PROBE_GENERIC instead of -100.


Revision 191593 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 27 19:39:18 2009 UTC (15 years, 6 months ago) by jkim
File length: 23411 byte(s)
Diff to previous 191573
Reduce code duplication and excessive pci_get_slot() calls.

Reviewed by:	mav


Revision 191573 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 27 18:10:42 2009 UTC (15 years, 6 months ago) by jkim
File length: 23454 byte(s)
Diff to previous 190581
Reduce excessive pci_get_devid() and pci_get_revid() calls
on the same PCI device while device probing.


Revision 190581 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 30 22:18:38 2009 UTC (15 years, 7 months ago) by mav
File length: 23377 byte(s)
Diff to previous 189600
Integrate user/mav/ata branch:

Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl


Revision 189600 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 9 20:48:57 2009 UTC (15 years, 7 months ago) by mav
File length: 22974 byte(s)
Diff to previous 188812
Add type specific suspend/resume ata channel functions. Add checks to avoid
crash on detached channel resume. Add placeholder for possible type-specific
suspend/resume routines.


Revision 188812 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 19 12:47:24 2009 UTC (15 years, 8 months ago) by mav
File length: 22610 byte(s)
Diff to previous 188769
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 188769 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 19 00:32:55 2009 UTC (15 years, 8 months ago) by mav
File length: 22521 byte(s)
Diff to previous 188765
Quite mechanical ch_detach implementations for all atapci subdrivers.
Some dmainit call fixes for previous commit.


Revision 188765 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 18 22:17:48 2009 UTC (15 years, 8 months ago) by mav
File length: 22096 byte(s)
Diff to previous 188763
As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.

As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.


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


Revision 188694 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 16 19:10:07 2009 UTC (15 years, 8 months ago) by mav
File length: 22137 byte(s)
Diff to previous 188655
Give atapci knowledge about set of implemented AHCI ports. It is possible
to not allocate them after the recent ata channels enumeration changes.
It allows to save some resources, not bother user with unexisting hardware
and not check unimplemented ports status on every interrupt.


Revision 188655 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 15 20:37:55 2009 UTC (15 years, 8 months ago) by mav
File length: 22053 byte(s)
Diff to previous 188615
Add initial single-vector MSI support into atapci driver.
Works fine with AHCI and theoretically other MSI capable devices.

At this moment support disabled by default. To enable it, set
"hint.atapci.X.msi=1" device hint.


Revision 188615 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 14 21:54:44 2009 UTC (15 years, 8 months ago) by mav
File length: 21728 byte(s)
Diff to previous 186182
DEVICE_PROBE(9) claims that we must not initialize softc on probe stage.
Move channel softc initialization from ata_XXX_probe() to ata_XXX_attach().

Instead of calculating ata channel number as position in child device list,
pass it's real number directly from controller probe routine using ivars.
It is simpler and IMHO more correct.


Revision 186182 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 16 16:04:40 2008 UTC (15 years, 10 months ago) by mav
File length: 21800 byte(s)
Diff to previous 183724
Call ata_legacy() only once on attach and save it's result. Scanning PCI
configuration registers (which are not going to change) on every interrupt
looks expensive, especially when interrupt is shared. Profiling shows me 3%
of time spent by atapci0 on pure network load due to IRQ sharing with em0.


Revision 183724 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 9 12:56:57 2008 UTC (16 years ago) by sos
File length: 21503 byte(s)
Diff to previous 183141
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 183141 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 18 12:12:34 2008 UTC (16 years, 1 month ago) by sos
File length: 20173 byte(s)
Diff to previous 179717
Cleanup the AHCI code a bit.
Add suspend/resume for AHCI, general methods added.

Inspired by: Andrey V. Elsukov


Revision 179717 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 11 06:44:58 2008 UTC (16 years, 4 months ago) by sos
File length: 19740 byte(s)
Diff to previous 178375
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 178375 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 21 10:51:38 2008 UTC (16 years, 6 months ago) by sos
File length: 19853 byte(s)
Diff to previous 178278
Add HW level support for the Adaptec 1420SA controller.


Revision 178278 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 17 12:29:35 2008 UTC (16 years, 6 months ago) by sos
File length: 19714 byte(s)
Diff to previous 178156
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 178156 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 12 17:21:22 2008 UTC (16 years, 6 months ago) by sos
File length: 19709 byte(s)
Diff to previous 178067
Dont call hw.status recursively.

Spotted by: Marcel Moolenaar


Revision 178067 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 10 13:05:05 2008 UTC (16 years, 6 months ago) by sos
File length: 19716 byte(s)
Diff to previous 173734
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 173734 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 18 14:44:52 2007 UTC (16 years, 11 months ago) by sos
File length: 19612 byte(s)
Diff to previous 173010
Add generic support for chipsets that say they support AHCI.  This should catch new chipsets that we dont know but that we should support.
Add a few new PCI id's.
Misc cleanups.


Revision 173010 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 26 08:57:08 2007 UTC (17 years ago) by sos
File length: 18285 byte(s)
Diff to previous 166901
Fix treating some modern chips (mem mapped) as legacy devices.


Revision 166901 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 23 12:19:07 2007 UTC (17 years, 8 months ago) by piso
File length: 18238 byte(s)
Diff to previous 166877
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 166877 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 21 19:03:34 2007 UTC (17 years, 8 months ago) by sos
File length: 18105 byte(s)
Diff to previous 166802
Try again with supporting AHCI chipsets with partly implemented ports.


Revision 166802 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 17 16:56:39 2007 UTC (17 years, 8 months ago) by sos
File length: 18058 byte(s)
Diff to previous 166477
Add support for chipsets that has NULL'd BAR's for legacy ports.
This allows DMA to be used on a fine little geode system I got here and
most like on lots of older systems like that.

HW donated by:  Paul Ghering


Revision 166477 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 3 20:12:00 2007 UTC (17 years, 8 months ago) by rink
File length: 17988 byte(s)
Diff to previous 158471
Add support for the NetCell NC3000/5000 series SATA RAID cards.

Reviewed by:	sos
Approved by:	imp (mentor)
MFC after:	1 week


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


Revision 155761 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 16 17:09:24 2006 UTC (18 years, 8 months ago) by sos
File length: 18325 byte(s)
Diff to previous 155478
Add support for the JMicron JMB363 dual SATA + single PATA controller.
Documentation and HW kindly provided by JMicron.


Revision 155478 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 9 20:53:32 2006 UTC (18 years, 8 months ago) by sos
File length: 18389 byte(s)
Diff to previous 154829
Unbreak dump on legacy systems. Needs a more clean solution but that is
more intrusive and can wait 'til after 6.1


Revision 154829 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 25 23:07:42 2006 UTC (18 years, 9 months ago) by sos
File length: 18354 byte(s)
Diff to previous 154768
Add support for the JMicron JMB360 SATAII controller.
Thanks to JMicron for providing needed info.

HW donated by:	Ralf Folkerts


Revision 154768 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 24 12:34:56 2006 UTC (18 years, 9 months ago) by sos
File length: 18265 byte(s)
Diff to previous 154515
Do not test for DMA status on legacy ATA devices. This has the unfortunate
side effect that legacy ATA controllers at irq14 and irq15 cannot share
interrupts with anything else without major problems.
This fixes the ATAPI DMA problems some systems/devices have seen.


Revision 154515 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 18 13:10:17 2006 UTC (18 years, 9 months ago) by sos
File length: 18225 byte(s)
Diff to previous 154507
Whitespace cleanup.


Revision 154507 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 18 09:14:55 2006 UTC (18 years, 9 months ago) by sos
File length: 18243 byte(s)
Diff to previous 154063
Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.


Revision 154063 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 21:27:19 2006 UTC (18 years, 9 months ago) by sos
File length: 17459 byte(s)
Diff to previous 153755
Get rid of the advertising clause in the copyright.


Revision 153755 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 27 18:22:11 2005 UTC (18 years, 10 months ago) by sos
File length: 17611 byte(s)
Diff to previous 153753
Change the probes in ATA to return a negative value on success.
This allows other driver to take over if needed during probe, and allows
me to distribute new drivers as modules.


Revision 153753 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 27 17:09:52 2005 UTC (18 years, 10 months ago) by sos
File length: 17345 byte(s)
Diff to previous 151897
Add initial support for the Marvell 88SX[56]0[48][01] series of SATA chips.

Hardware donated by: Matthew Jacob
Hardware donated by: Y!


Revision 151897 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 31 15:41:29 2005 UTC (19 years ago) by rwatson
File length: 17267 byte(s)
Diff to previous 151267
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 151267 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 12 20:00:26 2005 UTC (19 years ago) by sos
File length: 17267 byte(s)
Diff to previous 147167
Add support for the ATI IXP[234]00 series chipsets.

HW donated by: sentex


Revision 147167 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 9 12:31:07 2005 UTC (19 years, 4 months ago) by sos
File length: 17197 byte(s)
Diff to previous 146178
Use the presence of ctlr->dmainit instead of r_res1 to find out when to
initialise DMA.


Revision 146178 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 13 10:25:19 2005 UTC (19 years, 5 months ago) by sos
File length: 17196 byte(s)
Diff to previous 145818
Cleanup comments


Revision 145818 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 3 07:55:07 2005 UTC (19 years, 5 months ago) by sos
File length: 17193 byte(s)
Diff to previous 145769
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 145769 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 1 12:24:45 2005 UTC (19 years, 6 months ago) by sos
File length: 16838 byte(s)
Diff to previous 145713
Update on the last commit, the dma* funciton needs to be called with
a channel device, not an ata device, or we'll be out of luck in
reset/timeout where we dont have a device.


Revision 145713 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 30 16:22:07 2005 UTC (19 years, 6 months ago) by sos
File length: 16876 byte(s)
Diff to previous 145641
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 145641 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 28 22:08:08 2005 UTC (19 years, 6 months ago) by sos
File length: 16727 byte(s)
Diff to previous 145499
Rearrange the way the reset code is called.
Prepare for different looking controllers.


Revision 145499 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 25 07:57:04 2005 UTC (19 years, 6 months ago) by sos
File length: 16694 byte(s)
Diff to previous 144914
Cosmetics


Revision 144914 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 11 20:28:15 2005 UTC (19 years, 6 months ago) by sos
File length: 16712 byte(s)
Diff to previous 144886
Fix the bug that caused SATA disks on VIA etc to fail attach.


Revision 144886 - (view) (download) (annotate) - [select for diffs]
Modified Sun Apr 10 21:43:29 2005 UTC (19 years, 6 months ago) by sos
File length: 16714 byte(s)
Diff to previous 144790
Use the ata_suspend/resume functions instaead of the bus_generic ones.
This should unbreak suspend/resume.

Contributed by:	Wiktor Niesiobedzki


Revision 144790 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 8 09:37:47 2005 UTC (19 years, 6 months ago) by sos
File length: 16730 byte(s)
Diff to previous 144707
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 144707 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 6 10:22:56 2005 UTC (19 years, 6 months ago) by sos
File length: 16536 byte(s)
Diff to previous 144667
Add support for controllers that doesn't have the usual taskfile
layout.  No functional changes.


Revision 144667 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 5 14:51:43 2005 UTC (19 years, 6 months ago) by sos
File length: 16505 byte(s)
Diff to previous 144397
Add firstshot support for Acer Labs Inc SATA parts
Update ALi PATA support to handle ATA133 as well


Revision 144397 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 31 15:05:40 2005 UTC (19 years, 7 months ago) by sos
File length: 16473 byte(s)
Diff to previous 144330
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 144330 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 30 12:03:40 2005 UTC (19 years, 7 months ago) by sos
File length: 16465 byte(s)
Diff to previous 138555
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 138555 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 8 11:17:38 2004 UTC (19 years, 10 months ago) by sos
File length: 15834 byte(s)
Diff to previous 136198
Add support for the ITE IT8212F controller.

HW donated by:	Yahoo!


Revision 136198 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 6 19:46:08 2004 UTC (20 years ago) by sos
File length: 15720 byte(s)
Diff to previous 135818
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 135818 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 26 11:42:42 2004 UTC (20 years, 1 month ago) by sos
File length: 15701 byte(s)
Diff to previous 134071
Rearrange the order of I/O's in dma-start/stop, some chipsets are very
picky on the order of this, especially in error situations.


Revision 134071 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 20 06:19:25 2004 UTC (20 years, 2 months ago) by sos
File length: 15701 byte(s)
Diff to previous 133556
DONT PANIC

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


Revision 133556 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 12 08:20:36 2004 UTC (20 years, 2 months ago) by sos
File length: 15682 byte(s)
Diff to previous 133184
Change the order of ata_dmainit/ata_allocate in preparation of
supporting new chipsets where this is needed.


Revision 133184 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 5 21:13:41 2004 UTC (20 years, 2 months ago) by sos
File length: 15723 byte(s)
Diff to previous 130521
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 130521 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 15 11:02:09 2004 UTC (20 years, 4 months ago) by sos
File length: 15646 byte(s)
Diff to previous 129100
Increase robustness of SATA handling.


Revision 129100 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 10 20:23:25 2004 UTC (20 years, 5 months ago) by sos
File length: 15697 byte(s)
Diff to previous 128774
Fix Sii3114 support.


Revision 128774 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 30 18:49:03 2004 UTC (20 years, 6 months ago) by sos
File length: 15634 byte(s)
Diff to previous 128676
Do at better job at unit numbering.


Revision 128676 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 27 12:54:59 2004 UTC (20 years, 6 months ago) by sos
File length: 15386 byte(s)
Diff to previous 128608
Use pci_get_progif to decide if this is one of the primary/secondary
channels. This also work when PCI native mode has been selected
(patch for /sys/dev/pci/pci.c needed for that) since pci_get_progif
uses the saved value for progif, not the one stored after we may have
changed from legacy mode to native PCI mode.


Revision 128608 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 24 16:32:06 2004 UTC (20 years, 6 months ago) by sos
File length: 15479 byte(s)
Diff to previous 128530
Try the simplify determining what is ata0 and ata1.

Remove the PCI native addressing code, it eed to be run before we even
have control in the ATA driver and should be moved to the pci code.


Revision 128530 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 21 20:03:26 2004 UTC (20 years, 6 months ago) by sos
File length: 16035 byte(s)
Diff to previous 128498
Make the test for ATA PCI legacy addressing mode more robust.
Add code (currently ifdef'd out) to allow ATA PCI native addressing.
Fix the altio offset for ATA PCI devices.


Revision 128498 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 20 20:57:29 2004 UTC (20 years, 6 months ago) by sos
File length: 15053 byte(s)
Diff to previous 128183
Do not pre-allocate resources for BAR's on ATA MASTERDEV's thats on
the standard ATA primary and secondary addresses.

Reintroduce the size 1 ALTIO space so that we can have both ATA and
floppies back working.


Revision 128183 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 13 09:44:20 2004 UTC (20 years, 6 months ago) by sos
File length: 15043 byte(s)
Diff to previous 127135
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 127135 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 17 17:50:55 2004 UTC (20 years, 7 months ago) by njl
File length: 15929 byte(s)
Diff to previous 127019
Convert callers to the new bus_alloc_resource_any(9) API.

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


Revision 127019 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 15 12:03:48 2004 UTC (20 years, 7 months ago) by sos
File length: 15931 byte(s)
Diff to previous 126073
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 126073 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 21 18:21:13 2004 UTC (20 years, 8 months ago) by sos
File length: 15275 byte(s)
Diff to previous 124534
Check both PORTEN and MEMEN for enabled HW.


Revision 124534 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 14 21:26:35 2004 UTC (20 years, 9 months ago) by sos
File length: 15256 byte(s)
Diff to previous 124403
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 124403 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 11 22:08:34 2004 UTC (20 years, 9 months ago) by sos
File length: 15236 byte(s)
Diff to previous 123361
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 123361 - (view) (download) (annotate) - [select for diffs]
Added Tue Dec 9 19:13:50 2003 UTC (20 years, 10 months ago) by sos
File length: 15214 byte(s)
Diff to previous 121634
Add back the national support, this was removed by accident earlier.



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

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27