Commit Graph

1004 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
1bfd71cfc5 File d_ident field with disk's serial number.
No answer from:	sos
2007-05-06 01:20:06 +00:00
Scott Long
ae780f57f6 MPSAFE atapi-cam 2007-05-02 15:30:24 +00:00
Thomas Quinot
057f398585 (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 Quinot
e651554bf6 (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
Ollivier Robert
825f8b5050 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
Scott Long
2b83592fdc 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
Søren Schmidt
ae4ce3ceef OK, this is not my day, fix the former fix :/ 2007-04-08 21:53:52 +00:00
Søren Schmidt
f27a14650f Hopefully unbreak the 64bit DMA support this time. 2007-04-08 19:18:51 +00:00
Søren Schmidt
cd945eed47 Dont zero out 64BIT flag on DMA ops. 2007-04-08 15:31:39 +00:00
Søren Schmidt
fe2fb53542 Add 64bit addressing support to SiI 3132/3124 2007-04-06 17:36:35 +00:00
Søren Schmidt
2cfcfef1fc Remove debug gunk. 2007-04-06 16:21:34 +00:00
Søren Schmidt
16194fc40b 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
Kevin Lo
dc0a8e318e Make it compile 2007-03-14 01:59:00 +00:00
Thomas Quinot
c9b9952154 (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 Quinot
8810211656 (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 Quinot
3a5f6750df (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
Søren Schmidt
9642d2661b Fix writes on siiprb type chips. 2007-03-12 15:34:08 +00:00
Søren Schmidt
e9827ac415 Fix support for the VIA8237A SATA part.
HW sponsored by: Bob Bishop
2007-03-12 09:13:13 +00:00
Søren Schmidt
b9842b47e6 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
Søren Schmidt
031fcf925c 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
Søren Schmidt
f449d80b7c Refine ahci_status to be more simple. 2007-03-08 20:21:42 +00:00
Søren Schmidt
895671548e Cleanup the channel/phy reset code. 2007-03-08 16:39:25 +00:00
Søren Schmidt
82f45ed29d 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 Quinot
4647ebfc01 (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
John Baldwin
a96255b62d 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
Paolo Pisati
ef544f6312 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
Søren Schmidt
129230b816 Update copyright headers. 2007-02-21 19:07:19 +00:00
Søren Schmidt
4471f79eb4 Try again with supporting AHCI chipsets with partly implemented ports. 2007-02-21 19:03:34 +00:00
Søren Schmidt
7d5609f105 Be a little less stringent in getting progress report data. 2007-02-21 14:06:51 +00:00
Søren Schmidt
ceeb99652d Temporarily disable the support for some incarnations of the ICH8 chip that has
non consecutively numbered ports.
This should fix current SATA problems.
Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
2007-02-21 14:05:57 +00:00
Søren Schmidt
cfaed55fd5 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
2007-02-17 16:56:39 +00:00
Søren Schmidt
233fcaed71 Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
Also fix the panic introduced by the last commit.
2007-02-15 21:51:42 +00:00
Søren Schmidt
4bba89b85e Rearrange the SATA connect logic so that we so that we pickup ATAPI devices.
The rest of the logic should be in place for most supporting chipsets.
2007-02-12 17:17:31 +00:00
Rink Springer
cece26a63a Add support for the NetCell NC3000/5000 series SATA RAID cards.
Reviewed by:	sos
Approved by:	imp (mentor)
MFC after:	1 week
2007-02-03 20:12:00 +00:00
Remko Lodder
7fd6875fc5 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
2007-01-27 21:15:59 +00:00
Søren Schmidt
22fe2182e7 Add support for the Marvell 6101/6145 PATA chips used on many new Intel boards.
HW donated by:	Sentex
2007-01-04 16:09:11 +00:00
Søren Schmidt
a4b0727299 Add new PATA only JMicron chip. 2007-01-04 07:56:12 +00:00
Remko Lodder
9409f9ed87 Fix a typo in ata-queue.c
PR:		kern/107100
Submitted by:	Stephen J. Roznowski <sjr at comcast dot net>
Approved by:	sos
2006-12-23 12:40:54 +00:00
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