Commit Graph

952 Commits

Author SHA1 Message Date
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