877 Commits

Author SHA1 Message Date
jhb
89484a85d7 MFC: Support 64-bit scatter-gather DMA addresses in 64-bit capable AHCI and
Marvell controllers.

Approved by:	sos
2007-05-25 17:06:46 +00:00
thomas
55679f42fd MFC rev. 1.53:
(atapi_action, case XPT_SCSI_IO): Enable DMA only for READ and WRITE commands
 as some combinations of chipset, controller and target do not behave
 correctly when DMA is enabled for other commands.

PR:		kern/103602
2007-05-15 16:19:42 +00:00
thomas
87397c1304 MFC rev. 1.52:
(atapi_cb): Fix test for the presence of sense data. An incorrect condition
 was being tested, which would result in a system hang in some configurations.

PR:	kern/112119
2007-05-03 09:38:54 +00:00
thomas
c2648672c1 MFC rev. 1.48:
(reinit_bus): When the ATAPI bus is reset, do not schedule an automated
 CAM rescan if the ATAPI device entries have not changed.

The ATAPI bus may be reset for a variety of reasons, including any time an
ATAPI request times out. It is not necessary to rescan at the CAM level
in such a case, unless a device has appeared or disappeared, or has
otherwise changed.
---
MFC revs. 1.49 and 1.50:
(atapi_action): Improve error reporting by removing ATA_R_QUIET flag
 from ATAPI requests. If CAM debugging is enabled, also mark ATAPI
 requests with ATA_R_DEBUG flag.

(atapi_cb): Report ATAPI timeouts to the CAM layer.
 Fix incorrect debugging traces in the presence of ATAPI errors.

PR:	kern/103602
2007-03-29 20:08:32 +00:00
thomas
f06ae47d41 MFC rev. 1.69:
(ata_completed): When REQUEST SENSE is automatically issued after a failed
 ATAPI request, do not clear the ATA_R_DEBUG flag. This allows a request
 marked as requiring debug traces to produce these traces also during
 the completion of the autosense processing.
2007-03-29 19:14:39 +00:00
thomas
67d43c42e6 MFC rev. 1.47:
(cam_rescan): Do not reference ccb->ccb_h.path in CAM_DEBUG call before
it is initialized; use path instead.
PR: kern/103602
2007-03-06 16:56:50 +00:00
rink
c81047efc7 MFC: Add support for the NetCell NC3000/5000 series SATA RAID cards.
Reviewed by:	sos
Approved by:	imp (mentor)
2007-02-11 23:46:45 +00:00
remko
30c3499120 MFC:
Fix a typo in ata-queue.c

  PR:             kern/107100
  Submitted by:   Stephen J. Roznowski <sjr at comcast dot net>
  Approved by:    sos

and

  Add the SMART command to the ATA instruction set.
  When the disk has an error, it will now print SMART
  instead of 'Unknown CMD'.

  PR:             kern/93368
  Submitted by:   Garry Belka <garry at NetworkPhysics dot COM>
  Approved by:    sos

Approved by:	sos (implicitly with the previous two commits)
2007-02-02 07:42:44 +00:00
sos
6be68672c5 MFC:
Add missing PCI ID for the acer m5288

Approved by: re@
2006-10-09 16:01:35 +00:00
sos
2c92928f9d 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@
2006-09-30 14:51:49 +00:00
cvs2svn
335209b3be This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-09-16 10:44:34 +00:00
sos
f6a52f2223 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.
2006-09-02 17:01:32 +00:00
glebius
b92f12daa7 MFC rev. 1.163 by sos:
Fix type casts so that we get at the right response queue.

  Submitted by: glebius+ru
2006-08-10 10:19:03 +00:00
maxim
b85b31836a MFC rev. 1.120: s/PsuedoRAID/PseudoRAID/.
Approved by:	re (kensmith)
2006-05-01 19:37:55 +00:00
sos
0c9e2e4dab MFC:
Make the ATAPI sense data accessible when using the ioctl interface
Approved by: re@ (scottl)
2006-04-04 16:07:42 +00:00
marcel
1928247f58 MFC rev. 1.109: In afd_describe(), don't initialize sizestring.
Approved by: re (hrs@)
2006-04-02 18:39:59 +00:00
sos
7e7021166c MFC:
Add support for the JMicron JMB361, 365 and 366 chips.
HW and documentation kindly provided by JMicron.

Approved by: re@ (mux)
2006-03-16 21:28:51 +00:00
sos
df6d640227 MFC
missed line in last commit
Approved by:    re@ (implicit)
2006-03-10 12:43:42 +00:00
sos
332e8a29dc 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)
2006-03-10 12:30:08 +00:00
sos
ada2531dd6 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)
2006-03-01 18:36:43 +00:00
sos
a3ddb94db9 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)
2006-02-19 15:18:23 +00:00
sos
4a73be6cc3 MFC:
Add support for the JMicron JMB360 SATAII controller.
2006-01-30 10:32:40 +00:00
sos
f11f5a5c34 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)
2006-01-25 08:13:46 +00:00
sos
56f69933d8 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)
2005-10-27 16:41:39 +00:00
sos
80d71f6514 Disable RAID5 for the release.
The RIAD5 code is not complete, it does not use nor maintain the parity, so
it does actually only do RAID0. This is not wanted for a production release.

Approved by: re@ (scottl)
2005-10-13 08:15:48 +00:00
sos
c43f86ba12 MFC:
Add support for ATI IXP[234]00 series chipsets.

Approved by: re@ (scottl)
2005-10-13 08:07:46 +00:00
sos
4ecb87dfee MFC:
Properly react to allocation failures.
        Correct the former patch to the way it would have looked after review.

Approved by: re@ (scottl)
2005-10-12 20:17:34 +00:00
peadar
b6a59515a1 MFC revision 1.181
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

Approved by: re (scottl@)
2005-10-09 21:24:11 +00:00
sos
4a8dd7f589 MFC:
Add support for setting the SG list segment size.
Use this for the SiI3112 workaround to get rid of the "oversized DMA" errors.

Approved by: re@ (scottl)
2005-10-07 19:25:05 +00:00
sos
d397569b01 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)
2005-09-23 18:06:11 +00:00
sos
4e9db3bd6f 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)
2005-08-25 16:21:05 +00:00
sos
d1c511cad7 MFC:
Remove stale struct ata_channel declaration
        Add support for the ITE IT8211F controller
        Dont limit all transfers to DEV_BSIZE (stale dbug code)
        Hide the loaded/unloaded message behind bootverbose

Approved by: re@
2005-08-07 11:20:28 +00:00
sos
880222c4c8 Zero donecount on auto request sense.
PR:		81450
Approved by:	re@ (scottl)
2005-06-28 09:06:52 +00:00
sos
f96bc0932a 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
imp
8616206ff9 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
4729e22704 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
sos
b6acc8219d Enable SATA hotplug support.
Submitted by:	Olivier Houchard
2005-06-10 07:43:10 +00:00
sos
4fa0803f24 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
sos
7dd85e5dc3 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
sos
caaf3d4c8e 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
sos
9178faa91c 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
sos
1408d92f09 Apply the usual woodoo for 64bitness. 2005-06-06 15:49:09 +00:00
sos
5211f7a307 Add support for nVidia's software RAID "MediaShield".
HW Sponsored by:	Yahoo!
2005-06-06 13:35:24 +00:00
sos
d5b041c0d9 Make nVidia SATA hotplug support DTRT.
HW sponsored by: Yahoo!
2005-06-05 21:18:26 +00:00
sos
86f5e64b88 Unbreak the ICH6 AHCI support in !48Bit mode. 2005-06-05 18:37:56 +00:00
sos
b33daefd83 Make certain the the 48bit flag is reset if we dont translate LBA. 2005-05-17 12:31:54 +00:00
sos
c05a9b3913 longer used (contents added to sys/ata.h) 2005-05-16 13:39:49 +00:00
sos
05399c3127 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
sos
84c444f8a4 Cleanup comments 2005-05-13 10:25:19 +00:00
sos
9f93814a13 Fix more ATAPI breakage.
Apparently some devices are very picky on details :)
2005-05-13 07:58:05 +00:00