Commit Graph

1066 Commits

Author SHA1 Message Date
Olivier Houchard
c29765b647 Do not special-case __ARMEB__, we handle that in the arm code.
Approved by:	sos
2006-12-16 14:00:54 +00:00
Søren Schmidt
72a426ba26 Deal more generically with the byteswap needed on !littleendian HW.
Account for the odd layout on ARM bigendian HW.
2006-11-17 11:13:47 +00:00
Robert Watson
acd3428b7d Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges.  These may
require some future tweaking.

Sponsored by:           nCircle Network Security, Inc.
Obtained from:          TrustedBSD Project
Discussed on:           arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
                        Alex Lyashkov <umka at sevcity dot net>,
                        Skip Ford <skip dot ford at verizon dot net>,
                        Antoine Brodin <antoine dot brodin at laposte dot net>
2006-11-06 13:42:10 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Pawel Jakub Dawidek
9cd394ea96 Implement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).
Sponsored by:	home.pl
2006-10-31 21:19:25 +00:00
Matt Jacob
fa9ed86506 The first of 3 major steps to move the CAM layer forward to using
the CAM_NEW_TRAN_CODE that has been in the tree for some years now.

This first step consists solely of adding to or correcting
CAM_NEW_TRAN_CODE pieces in the kernel source tree such
that a both a GENERIC (at least on i386) and a LINT build
with CAM_NEW_TRAN_CODE as an option will compile correctly
and run (at least with some the h/w I have).

After a short settle time, the other pieces (making
CAM_NEW_TRAN_CODE the default and updating libcam
and camcontrol) will be brought in.

This will be an incompatible change in that the size of structures
related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change
in both size and content. However, basic system operation and
basic system utilities work well enough with this change.

Reviewed by:	freebsd-scsi and specific stakeholders
2006-10-31 05:53:29 +00:00
Søren Schmidt
1830897634 Add missing PCI ID for the acer m5288 2006-10-08 09:58:00 +00:00
Søren Schmidt
6182698f19 add support for the ALI/ULI M5288 AHCI part.
patch by: Sven Petai
2006-09-25 11:26:29 +00:00
Søren Schmidt
abd7633203 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.
2006-09-14 19:12:29 +00:00
Søren Schmidt
8a0b22718a Busmaster DMA address fix in VIA 6421 case. 2006-09-12 22:06:39 +00:00
Søren Schmidt
d5bddfcbfc Format mask lacks one bit.
Reported by:	jkim
2006-09-12 20:37:22 +00:00
Søren Schmidt
594e3d5d6f Add support for a few more Serverworks and lookalikes chips. 2006-09-11 19:48:30 +00:00
Søren Schmidt
92dc84876a Update to fit latest USB cleanup crusade. 2006-09-11 19:47:53 +00:00
Søren Schmidt
a4ed04c719 CF devices are ATA not ATAPI. 2006-09-11 18:33:59 +00:00
John-Mark Gurney
378f231e7d add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there
are seperate IOMMU's for each PCI bus...  For all other arches, it will
end up returning NULL, which makes it a no-op...

Convert a few drivers (the ones we've been working w/ on sun4v) to the
new convection...  Eventually all drivers will need to replace the parent
tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for
each driver, and will require hand inspection...

Reviewed by:	scottl (earlier version)
2006-09-03 00:27:42 +00:00
Søren Schmidt
adf1bdac4f Add support for VIA 8237A. 2006-09-02 12:55:42 +00:00
Søren Schmidt
4f991fd676 Properly initialize the nVidia MCP5X interrupts etc.
Suggested by:	nVidia
2006-08-30 11:50:22 +00:00
Søren Schmidt
9e34f8233b Properly initialize and destroy the RAID lock.
Also dont mess with RAID's thats not attached yet and avoid panic.
2006-08-25 09:33:56 +00:00
Søren Schmidt
97c9f9ff21 Update JMicron support to also work with chips where the PATA and SATA
parts are on individual PCI functions.

HW donated by: JMicron
2006-08-18 09:56:12 +00:00
Warner Losh
39926f1ff3 Appened ull to a really large integer constant to fix build on i386 2006-08-18 00:01:29 +00:00
Søren Schmidt
e7de1a3978 Add support for the ICH8 and ESB2 chips, also add a few other missing ICH7 parts.
HW donated by:	JMicron
2006-08-14 19:39:33 +00:00
Søren Schmidt
d7cd375c47 Unbreak nForce4 SATA support.
Hopefully I dont break something else this time.....
2006-08-11 21:19:29 +00:00
Warner Losh
ab649fd4d2 Most platforms map the actual drive geometry to the firmware's notion
of geometry.  However, some platforms have a more complicated mapping
of the firmware values to the actual values.  pc98 is the only
platform that currently does this.  This mapping is necessary for
large disks connected to pc98 boxes, as the firmware labels require do
special hacks to the actual geometry for interoperability.  We cannot
do this all in the geom layer because of initialization issues (geom
looks for an already initialized pc98 label, but we need the geometry
information prior to initialization, classic chicken and egg problem).
We pass the disk and the device_t to this function because the
geometry mapping depends on what kind of controller is used.

This hook allows platforms that want to override things to do so, and
has 0 overhead on all other platforms.  These patches have been in use
locally for a long time, and received good feedback from the pc98
community and sos@ at various times during their development.

MFC After: 1 week
2006-08-09 18:23:47 +00:00
Søren Schmidt
392cb477c3 Unbreak nForce3 SATA support. 2006-08-05 11:41:46 +00:00
Søren Schmidt
30ea1fb138 Finally fix support for the newer MCP51/MCP55 nVidia chipsets.
The register layout has changed since the original NV4 - sigh.
Hotplug support has been fixed for all nVidia chipsets that supports it
(including the MCP51/55).

HW donated by: Kingsley College
2006-07-24 10:44:50 +00:00
Warner Losh
8fcb4ef1cf If we get an error w/o atapi sense information, just print a newline
to terminate the message we started.  I get non-terminated messages
when reading audio tracks w/o this patch.
2006-07-21 19:13:05 +00:00
Søren Schmidt
891abbfa12 Add preliminary support for the Serverworks HT1000 chip.
HW sponsored by:	Yahoo!
2006-07-04 20:36:03 +00:00
Søren Schmidt
055ec4dbbc Dont call free on non-alloc'd items. 2006-06-28 15:04:10 +00:00
Søren Schmidt
ca40bd0b02 Update AHCI support to be more generic.
Add support for AHCI on the VIA VT8251.
2006-06-28 09:59:09 +00:00
Søren Schmidt
1ebe29d0de Fix type casts so that we get at the right response queue.
Submitted by: glebius+ru
2006-06-19 11:47:57 +00:00
John Baldwin
73dbd3da73 Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
Søren Schmidt
110ce88054 Fix probe printing of highpoint and promise controllers. 2006-05-11 10:43:08 +00:00
Søren Schmidt
305a0b7123 Add missing ";"
found by:	jmg
2006-04-17 10:47:01 +00:00
Maxim Konovalov
a09367f089 o s/PsuedoRAID/PseudoRAID/.
PR:		kern/94306
Submitted by:	Esa Karkkainen
2006-04-15 10:27:41 +00:00
Søren Schmidt
3559734cee Dont poll for ATA_IDLE on a detached channel in suspend. 2006-04-14 16:25:42 +00:00
Søren Schmidt
cd8a592bb3 Make the ATAPI sense data accessible when using the ioctl interface
MFC candidate.
2006-03-31 08:09:05 +00:00
Marcel Moolenaar
0f0d108e27 In afd_describe(), don't initialize sizestring. On ia64, gcc(1) will
generate code that calls memset, which we don't have in the kernel.

MFC after: 3 days
2006-03-30 05:29:57 +00:00
Søren Schmidt
6f1b833f36 Properly use the sense key info 2006-03-18 13:14:38 +00:00
Søren Schmidt
0118b48b7e Add support for the JMicron JMB361, 365 and 366 chips.
HW and documentation kindly provided by JMicron.
2006-03-13 14:01:37 +00:00
Søren Schmidt
124902face Put autosense data in the right place (needs a 4pos left shift). 2006-03-13 14:00:08 +00:00
Søren Schmidt
56728c9249 Module that adds support for using USB storage devices through the
ATA framework. Mainly written to be able to use USB Flash keys.
This is work in progress so use with care :)
Doesn't need CAM and cannot coexist with umass.c
2006-03-10 19:08:52 +00:00
Søren Schmidt
d95f23aab8 write the right unit # on verbose output. 2006-03-10 12:20:53 +00:00
Søren Schmidt
c4ee770324 Only use the channel in the request given to ata_completed if its
still present.
2006-03-09 10:25:35 +00:00
Søren Schmidt
a0f9099364 typo. 2006-03-09 10:24:03 +00:00
Søren Schmidt
2d7994d97e 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.
2006-03-09 08:34:44 +00:00
Søren Schmidt
59de60dd73 ATA_USB will need to hook into the delayed boot identify to have
interrupts running, so externalize it.
2006-03-08 16:39:01 +00:00
Søren Schmidt
d0bf5478e0 Always read the TOC in acd_read_toc even if MEDIA_CHANGED wasn't set.
Since we cannot (reliably) detect when media has been removed before we
try to touch it, this could leave stale TOC's around.
2006-03-08 10:14:39 +00:00
Søren Schmidt
de0ed44e2f Bail out of afd_sense if ENODEV. 2006-03-08 09:21:48 +00:00
Søren Schmidt
f09934b191 Poll device for readiness before trying to get geometry etc. 2006-03-07 16:05:38 +00:00
Søren Schmidt
a68193c985 Only look for ICRC and CORR errors on ATA devices not ATAPI. 2006-03-07 14:27:54 +00:00
Max Laier
3e3a2a7ddc Fix the build. %ju prints uintmax_t not unsigned long long (which is
actually "longer" than uintmax_t for the understanding of printf).
2006-03-06 16:02:06 +00:00
Søren Schmidt
62fba1c397 Add USB modes. 2006-03-05 21:32:38 +00:00
Søren Schmidt
b83fcd52ba Update atapi-fd to support direct devices such as disks. 2006-03-05 20:30:54 +00:00
Søren Schmidt
0b03bcd2f9 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
 a taskqueue, but that is not currently implemented in the kernel).

A real fix for this is in the works but wont make it to 6.1RELEASE

definite MFC candidate.
2006-03-01 07:48:41 +00:00
Søren Schmidt
a62b100d96 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.
2006-02-25 17:27:33 +00:00
Søren Schmidt
28baad63bd 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.
2006-02-23 20:15:22 +00:00
Søren Schmidt
c94b3e542e In ata_cmd_allocate() only call ata_pci_allocate once.
found by:	jhb@
2006-02-23 18:52:15 +00:00
Søren Schmidt
608e65bb2a Add r/w support for JMicron ATA RAID metadata.
Acknowledgement should definitly go to JMicron Technology for providing full
docs on the metadata format as the only vendor so far, big thanks from here.
2006-02-17 13:02:10 +00:00
Søren Schmidt
e3989d3ebf Add support for the JMicron JMB363 dual SATA + single PATA controller.
Documentation and HW kindly provided by JMicron.
2006-02-16 17:09:24 +00:00
Søren Schmidt
2ca38c74df Add a reset of the AHCI machinery to the ICH6/ICH7 support.
This should fix the missed devices on some systems.
2006-02-13 13:47:58 +00:00
Søren Schmidt
466be09c2a Unbreak Promise SATAII/150 controllers caused by the DMA dump changes. 2006-02-09 20:54:42 +00:00
Søren Schmidt
0a3a1935b3 Unbreak dump on legacy systems. Needs a more clean solution but that is
more intrusive and can wait 'til after 6.1
2006-02-09 20:53:32 +00:00
Søren Schmidt
52c7e322b2 Unbreak DMA dumo on Intel 31224. 2006-02-06 19:17:48 +00:00
Søren Schmidt
797c12eed9 Add support for the JMicron JMB360 SATAII controller.
Thanks to JMicron for providing needed info.

HW donated by:	Ralf Folkerts
2006-01-25 23:07:42 +00:00
Søren Schmidt
634c377652 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.
2006-01-24 12:34:56 +00:00
Søren Schmidt
669367a9a1 Fix panic on boot due to not all SATA chipsets having SSTATUS registeri
resources set.
2006-01-21 17:38:10 +00:00
Søren Schmidt
b258da4ee8 Correct two promise entries, these are only 2port SATA. 2006-01-18 13:34:28 +00:00
Søren Schmidt
8453acf105 Whitespace cleanup. 2006-01-18 13:10:17 +00:00
Søren Schmidt
ac1731fb20 Properly report SATA connection speed. 2006-01-18 10:02:23 +00:00
Søren Schmidt
f5f55db308 Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.
2006-01-18 09:14:55 +00:00
Søren Schmidt
e2bf77c5c2 Get rid of the advertising clause in the copyright. 2006-01-05 21:27:19 +00:00
Søren Schmidt
49824061be Return the proper rmi field in DVDIOCREADSTRUCTURE.
PR:	89650
2006-01-04 21:35:57 +00:00
Søren Schmidt
93b2c0cf02 Fix the promise modesetting for old chips.
Pointy hat to:	sos
2006-01-04 10:23:47 +00:00
Søren Schmidt
8a07d88d9f Fix promise probe printing. 2006-01-04 08:20:25 +00:00
Søren Schmidt
d028250086 Add hotplug support for Marvell chips. 2005-12-30 23:15:02 +00:00
Søren Schmidt
796bd93e5e Further updates to the Marvell support code.
Should be reliable enough for actual use by now.
2005-12-28 11:55:43 +00:00
Søren Schmidt
7af3abd894 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.
2005-12-27 18:22:11 +00:00
Søren Schmidt
091bb42ceb Update the last commit to also take 48Bit access functions. 2005-12-27 17:13:11 +00:00
Søren Schmidt
4b55f0c7c7 Add initial support for the Marvell 88SX[56]0[48][01] series of SATA chips.
Hardware donated by: Matthew Jacob
Hardware donated by: Y!
2005-12-27 17:09:52 +00:00
Søren Schmidt
8ec96d7b8d Fix rebuilds of arrays that got stuck.
Misc minor fixes.

Bughunting and initial fixes by Pav@ and Anton.
2005-12-27 16:49:33 +00:00
Søren Schmidt
121b478372 Cleanup the strings for printing chipset names, saves quite some space.
Add a couble new nVidia chips now we are here.
2005-12-16 08:12:13 +00:00
Scott Long
7f512e8f29 Make this compile on 64bit systems. It likely isn't correct, but that can
be sorted out later.
2005-12-16 06:11:22 +00:00
Søren Schmidt
5608e472c1 Add support for writing VIA metadata.
Null out the metadata on disks when array is deleted.
2005-12-15 13:30:23 +00:00
Søren Schmidt
59a269294f Add RAID0+1 and RAID5 support to VIA RAID code.
Fix support for multiple arrays.
2005-12-14 13:07:49 +00:00
Søren Schmidt
a569390328 Add support for VIA VT8251 southbridge.
SATA support for now in compat mode, but all 4 channels usable.
2005-12-14 12:13:00 +00:00
Søren Schmidt
c6c6c58a89 Correct calculation of RAID0 sizes on VIA RAID arrays. 2005-12-14 12:11:51 +00:00
Søren Schmidt
921f15117f Add support for writing SiS metadata. 2005-12-12 14:13:55 +00:00
Søren Schmidt
fb504bef5c Unbreak hotplug support on the ICH6 and ICH7 chipsets. 2005-12-09 14:23:24 +00:00
Søren Schmidt
b39424ba7a Dont use the BUS_DMA_ALLOCNOW flag. Instead use BUS_DMA_NOWAIT and return
ENOMEM to the upper layers if we run out of memory.

This solves part of the trouble with running on >4GB memory systems.
2005-12-05 22:31:55 +00:00
Søren Schmidt
02268a2d11 Switch off debugging that was left on in last commit. 2005-12-05 17:58:11 +00:00
Søren Schmidt
eed08844c9 Add support for writing Intel MatrixRAID arrays.
Do a little better on handling volumes as well, however we cant create
multiple volumes from FreeBSD yet.

HW sponsored by:        Mullet Scandinavia AB
2005-12-05 17:33:57 +00:00
Søren Schmidt
ddaf769709 Update the ICH7 support so it deals better with chips without AHCI.
Update Intel MatrixRAID support to be able to pick up RAID0+1 (RAID10)
and RAID5 arrays without panic'ing.
This has the side effect of now also supporting multiple volumes on
MatrixRAID's now I have the metadata better understood..

HW sponsored by:	Mullet Scandinavia AB
2005-12-02 10:13:53 +00:00
Søren Schmidt
e9bd25bff0 Fix the ata_composite/ata_request leak when using RAID0+1.
Submitted by:	Michael Butler

Minor changes to fit ATA style by me.
2005-11-29 20:08:26 +00:00
Søren Schmidt
7c7e96f58c Fix SiS SATA support, the SATA registers was off.
Add support for SiS metadata.

HW donated by:	obrien
2005-11-28 23:08:37 +00:00
Giorgos Keramidas
6f26936c0f Fix two identical harmless typos in ata error messages:
s/issueing/issuing/

PR:		kern/89481
Submitted by:	John Nielsen
Approved by:	sos
MFC after:	1 week
2005-11-28 13:23:15 +00:00
Søren Schmidt
6c22760c61 When IOCATAGPARM is called, update the capabilities page that is stored
in the kernel and return the new values.
2005-11-25 09:00:56 +00:00
Robert Watson
5bb84bc84b 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.
2005-10-31 15:41:29 +00:00
Søren Schmidt
ae539be6f8 Return the right format (LBA/MSF) in TOC entries.
Null the TOC on media change even if no media present.

Reported by: des
2005-10-28 21:41:42 +00:00
Søren Schmidt
f373190c49 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
2005-10-27 16:32:39 +00:00
Søren Schmidt
ca107a4b1e Minor cleanups, no functional changes 2005-10-13 08:05:21 +00:00
Søren Schmidt
7ebce0231b Add support for the ATI IXP[234]00 series chipsets.
HW donated by: sentex
2005-10-12 20:00:26 +00:00
Søren Schmidt
e0c41a23d7 Correct the former patch to the way it would have looked after review. 2005-10-10 19:13:27 +00:00
Søren Schmidt
8e4e979e1e Properly react to allocation failures.
Found by:	imp@
2005-10-10 19:12:43 +00:00
Peter Edwards
96ca84d197 When breaking up a large request into smaller ones for the strategy
routine, create all the child bio objects before starting the
requests, rather than starting them as created. This closes a race
whereby some number of child operations could complete before the
rest were ever created, and prematurely freeing the parent bio.
This fixes the panics installing in VMWare and qemu
2005-10-09 21:11:05 +00:00
Søren Schmidt
40fdf81237 Add support for setting the SG list segment size.
Use this for the SiI3112 workaround to get rid of the "oversized DMA" errors.

MFC to 6.0 candidate.
2005-10-06 15:44:07 +00:00
Warner Losh
b7a9396a75 Forgot to commit ata-card fixes last night. Fix gleb's attempt to do
the right thing by merging in the changes I neglected to commit last
night.
2005-09-22 18:46:29 +00:00
Gleb Smirnoff
e21d20fc4c Fix build. 2005-09-22 18:41:56 +00:00
Søren Schmidt
3d42c6d13a Dont wait for READY on ATAPI_IDENTIFY.
Fixes the losage of some ATAPI device that reported failed probing with
"timeout waiting for read DRQ".
2005-09-19 07:35:42 +00:00
Søren Schmidt
0387836deb 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
2005-09-14 12:45:06 +00:00
Søren Schmidt
fba8a154bd Fix problem with finding the still working disk in a broken mirror on VIA. 2005-09-06 19:17:48 +00:00
Søren Schmidt
f7da27dd85 In ata_mode2str() properly list -1 as UNSUPPORTED. 2005-08-29 18:19:06 +00:00
Søren Schmidt
84b3b6455f Fix support for the VIA 6421 controller. 2005-08-29 09:01:57 +00:00
Søren Schmidt
071e98cbeb Dont set default mode to ATA_DMA_MAX on devices not capable of DMA. 2005-08-25 15:45:03 +00:00
Søren Schmidt
70037ab36a Apply fix for "pr82261 DMA-support on Sparc64 broken"
The Acer chip or wiring that SUN uses has problems that this patch
tries to work around.
Original patch by Marius Strobl, hacked into shape by me..
2005-08-23 08:53:01 +00:00
Søren Schmidt
971846e49c Fix problem on Promise "mio" controllers and 48bit mode caused by last commit 2005-08-22 11:38:53 +00:00
Søren Schmidt
85047b1b0c 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.
2005-08-17 15:00:33 +00:00
Søren Schmidt
fb235b243c Use the bio field instead of the driver field as intended. 2005-08-17 14:50:18 +00:00
Søren Schmidt
c7dc7718f6 Add support for the Promise PDC4071[89] chips used on fx the Fasttrak TX4300.
Docs kindly provided by Promise.
2005-08-12 16:54:11 +00:00
Søren Schmidt
77ada08656 Add support for the ITE IT8211F controller. 2005-08-05 13:14:00 +00:00
Søren Schmidt
08f7225609 Dont limit all transfers to DEV_BSIZE (stale dbug code)
Hide the loaded/unloaded message behind bootverbose
2005-08-04 18:39:36 +00:00
Søren Schmidt
785a5193b7 Remove stale struct ata_channel declaration.
Reported by:	rodrigc
2005-07-29 18:14:06 +00:00
Søren Schmidt
c782b027b4 Zero donecount on auto request sense.
PR:		81450
Approved by:	re@ (scottl)
2005-06-28 09:06:52 +00:00
Søren Schmidt
4c2d9f25f3 Dont call ata_finish in ad_dump as that is no longer needed and causes panic.
Dont try to enable read/write caching on devices that doesn't support it,
this reduces the noise from ATA on flash devices and the like.

Approved by: re@ (scottl)
2005-06-27 09:12:11 +00:00
Warner Losh
ab581af779 Eliminate unused argument in PCMCIA_CARD macro.
Provide a backwards compatible way to have the extra macro by defining
PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that
want/need to have the same driver on 5 and 6 with pccard attachments.

Approved by: re (dwhite)
2005-06-24 14:36:54 +00:00
Marcel Moolenaar
217578215b Avoid GCC optimizations from injecting a call to memset(?) in order
to initialize the buffer array in ata_raid_attach() by removing the
initializer. There's no memset(?) in the kernel. Instead, assign
'\0' to the first element. The buffer array holds strings only, so
this is functionally equivalent.

Applies to: ia64
Tripped over by: tinderbox
2005-06-11 03:21:20 +00:00
Søren Schmidt
0c818c44db Enable SATA hotplug support.
Submitted by:	Olivier Houchard
2005-06-10 07:43:10 +00:00
Søren Schmidt
a9b4f88e01 Fix the long standing problem with poor transferrates on Intel ICHH type
chips. The DMA timing value was set on device 0 for all devices :/

Prodded by: Harald Schmalzbauer
2005-06-09 21:13:44 +00:00
Søren Schmidt
52ac6e8db8 Fix the register offset for the ATAPI count register thats used to
wrestle the older Promise chips to do 48bit addressing.

Spotted by:	Martin Birgmeier
2005-06-09 19:00:37 +00:00
Søren Schmidt
a3ebeaa87b Use the presence of ctlr->dmainit instead of r_res1 to find out when to
initialise DMA.
2005-06-09 12:31:07 +00:00
Søren Schmidt
a77a43c709 Add support for the Intel 31244.
Most code by the submitters, hammered upon to get the right ATA fell by me.

Submitted by:	Olivier Houchard
Submitted by:	Jia-Shiun Li
2005-06-08 20:02:55 +00:00
Søren Schmidt
167719c3b2 Apply the usual woodoo for 64bitness. 2005-06-06 15:49:09 +00:00
Søren Schmidt
b397739aab Add support for nVidia's software RAID "MediaShield".
HW Sponsored by:	Yahoo!
2005-06-06 13:35:24 +00:00
Søren Schmidt
b9203a8aca Make nVidia SATA hotplug support DTRT.
HW sponsored by: Yahoo!
2005-06-05 21:18:26 +00:00
Søren Schmidt
05c84db123 Unbreak the ICH6 AHCI support in !48Bit mode. 2005-06-05 18:37:56 +00:00
Søren Schmidt
d78c6e89ae Make certain the the 48bit flag is reset if we dont translate LBA. 2005-05-17 12:31:54 +00:00
Søren Schmidt
ae337d1ee5 longer used (contents added to sys/ata.h) 2005-05-16 13:39:49 +00:00
Søren Schmidt
6667b30d15 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.
2005-05-16 13:07:27 +00:00
Søren Schmidt
265da99ce9 Cleanup comments 2005-05-13 10:25:19 +00:00
Søren Schmidt
bb8a0cf2cf Fix more ATAPI breakage.
Apparently some devices are very picky on details :)
2005-05-13 07:58:05 +00:00
Søren Schmidt
c46e1f5333 Add new Intel PCI ID's for the ICH7 chips (untested). 2005-05-11 18:29:15 +00:00
Søren Schmidt
d81c813f10 Add support for AHCI compliant ATA devices.
For now just support the Intel ICH6 as that the HW at hand.

Sponsored by:	pair.com
2005-05-11 16:10:08 +00:00
Søren Schmidt
d0968d7845 Add back one line that got deleted in the last commit.
Change the comment there so it better describes whats going on.

This should fix the boot problems of late.
2005-05-11 14:36:26 +00:00
Søren Schmidt
faca873f76 Fix ATAPI DMA. We need to set the proper flags for DMA modes. 2005-05-11 12:41:35 +00:00
Søren Schmidt
eeda55ce8e 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
2005-05-03 07:55:07 +00:00
Søren Schmidt
4156b20c71 Always attach a subdisk even if no valid metadata found.
This allows the disks to be used later in a raid create.
2005-05-02 07:06:50 +00:00
Søren Schmidt
9ec5e87f63 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.
2005-05-01 12:24:45 +00:00
Søren Schmidt
1191f58127 Go back to the old way of finding the Promise metadata, the new way was
too simple causing older controllers metadata to get lost.
2005-05-01 08:45:12 +00:00
Søren Schmidt
0068f98f88 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
2005-04-30 16:22:07 +00:00
Søren Schmidt
e47099593a 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.
2005-04-29 11:30:03 +00:00
Søren Schmidt
ca8c70e9e3 Provide a default setmode method.
This shaves off multiple copies of the same setmode stub.
2005-04-28 22:15:44 +00:00