Commit Graph

1028 Commits

Author SHA1 Message Date
phk
34e034ebc6 If the disk reports that it support the Compact Flash Association command
set, announce BIO_DELETE capability and issue ATA_CFA_ERASE when we get one.

Once we issue more BIO_DELETE, this will improve lifetime, and
possibly write speed of Flash based devices which have usable flash
adaptation layers.

For now, about the only usage is the newfs(1) -E flag.

Approved by:	sos
2008-01-02 20:33:54 +00:00
phk
340db3aed4 Follow the current fashion of gratuitously stomping into other
peoples code with irrelevant changes[1]:

Use bus_{read|write_*() instead of bus_space_{read|write}_*() for
purely stylistic reasons.

Due to compiler optimizations and inlining, this is for all practical
purposes without effect in the compiled code.

[1] NB: Approved by:	sos
2008-01-02 20:31:14 +00:00
sos
cd8dd509e5 Implement a workaround of the datacorruption problem on serverworks HT1000 chipsets.
The HT1000 DMA engine seems to not always like 64K transfers and sometimes barfs data all over memory leading to instant chrash and burn.
Also fix 48bit adressing issues, apparently newer chips needs 16bit writes and not the usual fifo thing.

HW donated by: Travis Mikalson at TerraNovaNet
2007-12-13 11:47:36 +00:00
sos
9bc486376b Fix speed report on Intel SATA chips in compat mode.
Fix broken detect of JMicron 368.
2007-12-07 13:14:31 +00:00
sos
1727174689 Use device_set_desc_copy in the generic ident as its used on a temp buffer. 2007-11-26 19:08:08 +00:00
sos
9d7c423748 Add preliminary SATA ATAPI support for sii 3132/3124 chips. 2007-11-23 08:17:14 +00:00
kevlo
1fc52ebb1e Fix KASSERT messages. 2007-11-20 04:52:19 +00:00
sos
2350167451 Dont fumble the ivars on reinit, avoids panic on suspend/resume om some systems that looses thier devices.
Patch by: jhb@
2007-11-19 21:11:26 +00:00
sos
d1d1db8b70 Try to workaound silicon bugs in Promise gen2 (ie TX4) chips
Initial patch by Alexander Sabourenkov who found it in Promise's own driver.

Further fixes and sanity checks by yours truely.
2007-11-19 20:47:31 +00:00
sos
24ced90f97 Fix the problem with certain ATAPI commands on AHCI devices.
Revert the probe in atapi-cd.c to the old usage now its fixed on AHCI.
THis change also fixes using virtual CD's om fx parallels.

Still leaves the GEOM problem of telling media vs device access apart in the access function.
2007-11-19 18:05:48 +00:00
sos
0422421099 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.
2007-11-18 14:44:52 +00:00
sos
4e65ee2c1d Fix the signature matching code on AHCI controllers.
Add SATA ATAPI support for AHCI controllers.
2007-10-26 09:01:06 +00:00
sos
8a3367a3b4 Update the way we get the mode pages on probe. 2007-10-26 08:59:23 +00:00
sos
07eb0a925e Fix treating some modern chips (mem mapped) as legacy devices. 2007-10-26 08:57:08 +00:00
delphij
afb9b9ad44 Add PCI ID for ICH9 AHCI w/ two adapters.
Tested by:	Abdullah Ibn Hamad Al-Marri <almarrie gmail com>
Approved by:	sos
Approved by:	re (kensmith)
2007-10-09 20:15:09 +00:00
sos
4a797d19e2 Add support for the VIA 8237S
Fix the LBA28/LBA48 crossover bug.

Approved by: re@
2007-10-04 19:17:16 +00:00
phk
dc63751776 Recognize the CS5536 support chip for the AMD Geode LX CPU to enable
UDMA modes.

Please notice that Soekris NET5501 bios versions before 1.32f has a bug
that prevents this from working.

Approved by:	re (gnn)
MFC:		2 weeks
2007-10-04 06:21:54 +00:00
simon
afe3e15299 Add PCI IDs for Intel ICH9.
PR:		kern/114473
Submitted by:	Michael Fuckner <michael@fuckner.net>
MFC after:	2 weeks
OK'ed by:	sos
Approved by:	re (bmah)
2007-09-10 19:16:39 +00:00
jhb
47d488244c Expand the data structure returned by the ATA RAID status ioctl to include
detailed status on each of the backing subdisks.  This allows userland
to see which subdisks are online, failed, missing, or a hot spare.

MFC after:	1 week
Approved by:	re (bmah)
Reviewed by:	sos
2007-08-13 18:46:31 +00:00
remko
62b8a82dc4 Add Viking Interworks 256MB as an ata device; this might give
some false positives but at this moment it is better to add
support then to dont have it at all (comment from Soren).

PR:		kern/111516
Submitted by:	Thomas Nystrom <thn at saeab dot se>
Approved by:	re (kensmith)
Approved by:	imp (mentor)
OK'ed by:	sos (With the comment noted above about false
		positives).
2007-06-26 22:13:43 +00:00
sos
89f565f779 Add support for the nVidia MCP61 series chipset.
Approved by: re (mux@)
2007-06-25 08:21:21 +00:00
imp
fc8857ae2a Include usb_port.h
Approved by: re@ (blanket and/or cleanup commit approval)
2007-06-23 21:52:05 +00:00
scottl
ff584e70fa Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.
2007-06-17 05:55:54 +00:00
bms
9156605d19 Do not attempt to enable AHCI mode on ALi SATA controllers other
than the 5288.

It is not correctly implemented in earlier silicon, and the BIOS often
lies about AHCI capability on platforms where these chips are deployed.
With this change I am able to boot FreeBSD on the ASUS Vintage AH-1
barebones system.

Approved by:	sos
2007-06-13 17:44:49 +00:00
pjd
ff2e47dfc4 File d_ident field with disk's serial number.
No answer from:	sos
2007-05-06 01:20:06 +00:00
scottl
523b3dc425 MPSAFE atapi-cam 2007-05-02 15:30:24 +00:00
thomas
0660149596 (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
MFC after:	2 weeks
2007-04-30 09:33:57 +00:00
thomas
334e2e141a (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
Reviewed by:	scottl
MFC after:	3 days
2007-04-30 09:26:43 +00:00
roberto
ab279db877 Use the same timeout parameters for BIO_FLUSH as with the other commands.
This workaround the problem in Parallels/VMWare where the emulated drivers are
slower, especially with ATA_FLUSHCACHE.  The problem appears much more
frequently with ZFS which use it a lot more.

Approved:	sos, pjd
2007-04-26 12:59:20 +00:00
scottl
7605c12c0f Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
sos
331106ea12 OK, this is not my day, fix the former fix :/ 2007-04-08 21:53:52 +00:00
sos
5b98ea3bb8 Hopefully unbreak the 64bit DMA support this time. 2007-04-08 19:18:51 +00:00
sos
e8b0a99e57 Dont zero out 64BIT flag on DMA ops. 2007-04-08 15:31:39 +00:00
sos
0e233ba6cc Add 64bit addressing support to SiI 3132/3124 2007-04-06 17:36:35 +00:00
sos
c81b7f4791 Remove debug gunk. 2007-04-06 16:21:34 +00:00
sos
ad1c8d45dd Add support for 64bit addressing to AHCI and Marvell controllers.
Munged into ATA shape and Marvell specifics my yours truely.

Submitted by: jhb
2007-04-06 16:18:59 +00:00
kevlo
91100b1653 Make it compile 2007-03-14 01:59:00 +00:00
thomas
0c37bdc190 (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
MFC after:	2 weeks
2007-03-13 20:42:49 +00:00
thomas
c78849acb1 (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.

PR:		kern/103602
MFC after:	2 weeks
2007-03-13 20:38:16 +00:00
thomas
dae5ad79a8 (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.

Reviewed by:	sos
MFC after:	2 weeks
2007-03-13 20:31:56 +00:00
sos
8bfc297b14 Fix writes on siiprb type chips. 2007-03-12 15:34:08 +00:00
sos
b5464da21d Fix support for the VIA8237A SATA part.
HW sponsored by: Bob Bishop
2007-03-12 09:13:13 +00:00
sos
b470e17165 Add support for the Silicon Image SiI 3124 and SiI 3132.
HW donated by: Adriaan de Groot
2007-03-09 22:23:39 +00:00
sos
7ed96d1442 More SATA phy/reset cleanup and simplification.
Fix a long standing bogon in the sii_reset code.
2007-03-09 18:45:45 +00:00
sos
5866261097 Refine ahci_status to be more simple. 2007-03-08 20:21:42 +00:00
sos
54f0b44b6e Cleanup the channel/phy reset code. 2007-03-08 16:39:25 +00:00
sos
83b66ad130 Add support for the 3 (PATA) channel on the VIA 6421 chip.
HW donated by: Fabian Peters
2007-03-01 21:18:27 +00:00
thomas
df5a88905d (cam_rescan): Do not reference ccb->ccb_h.path in CAM_DEBUG call before
it is initialized; use path instead.

This change fixes a panic when using atapicam in conjunction with CAMDEBUG,
which has been described under kern/103602.

Thanks to Josh Carroll <josh.carroll@gmail.com> for providing the traces
that allowed identifying this problem.

PR:		kern/103602
MFC after:	1 week
2007-02-27 09:00:51 +00:00
jhb
e21fb2b555 Use 'pause' in several places rather than trying to tsleep() on NULL (which
triggers a KASSERT) or local variables.  In the case of kern_ndis, the
tsleep() actually used a common sleep address (curproc) making it
susceptible to a premature wakeup.
2007-02-23 16:25:08 +00:00
piso
6a2ffa86e5 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@
2007-02-23 12:19:07 +00:00