04 Nov, 2009
3 commits
-
Just remove redundant device ID for VIA VT8261.
The device ID 0x9000 and 0x9040 are redundant (for VT8261).
The 0x9040 is reserved for other usage.Signed-off-by: Joseph Chan
Signed-off-by: Jeff Garzik -
In each case, if the NULL test on qc is needed, then the derefernce
should be after the NULL test.A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/)://
@match exists@
expression x, E;
identifier fld;
@@* x->fld
... when != \(x = E\|&x\)
* x == NULL
//Signed-off-by: Julia Lawall
Signed-off-by: Jeff Garzik -
Like the Asus M2A-VM, MSI's K9A2 Platinum (MS-7376) can also support 64bit
DMA. It is a new enough board that all the BIOS releases work correctly with
64bit DMA enabled.Signed-off-by: Mark Nelson
Signed-off-by: Jeff Garzik
16 Oct, 2009
8 commits
-
Use excl_link when non NCQ commands are defered, to be sure they are processed
as soon as outstanding commands are completed. It prevents some commands to be
defered indifinitely when using a port multiplier.Signed-off-by: Gwendal Grignou
Signed-off-by: Jeff Garzik -
The SC1200 needs a NULL terminator or it may cause a crash on boot.
Bug #14227
Also correct a bogus comment as the driver had serializing added so can run
dual port.Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
When an internal command fails, it should be failed directly without
invoking EH. In the original implemetation, this was accomplished by
letting internal command bypass failure handling in ata_qc_complete().
However, later changes added post-successful-completion handling to
that code path and the success path is no longer adequate as internal
command failure path. One of the visible problems is that internal
command failure due to timeout or other freeze conditions would
spuriously trigger WARN_ON_ONCE() in the success path.This patch updates failure path such that internal command failure
handling is contained there.Signed-off-by: Tejun Heo
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik -
Commit 842faa6c1a1d6faddf3377948e5cf214812c6c90 fixed error handling
during attach by not committing detected device class to dev->class
while attaching a new device. However, this change missed the PMP
class check in the configuration loop causing a new PMP device to go
through ata_dev_configure() as if it were an ATA or ATAPI device.As PMP device doesn't have a regular IDENTIFY data, this makes
ata_dev_configure() tries to configure a PMP device using an invalid
data. For the most part, it wasn't too harmful and went unnoticed but
this ends up clearing dev->flags which may have ATA_DFLAG_AN set by
sata_pmp_attach(). This means that SATA_PMP_FEAT_NOTIFY ends up being
disabled on PMPs and on PMPs which honor the flag breaks hotplug
support.This problem was discovered and reported by Ethan Hsiao.
Signed-off-by: Tejun Heo
Reported-by: Ethan Hsiao
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik -
prereset doesn't bring link online if hardreset is about to happen and
nv_hardreset() may skip if conditions are not right so softreset may
be entered with non-working link status if the system firmware didn't
bring it up before entering OS code which can happen during resume.
This patch makes nv_hardreset() to bring up the link if it's skipping
reset.This bug was reported by frodone@gmail.com in the following bug entry.
http://bugzilla.kernel.org/show_bug.cgi?id=14329
Signed-off-by: Tejun Heo
Reported-by: frodone@gmail.com
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik -
This patch renames the code name SB900 into Hudson-2
Signed-off-by: Shane Huang
Signed-off-by: Jeff Garzik -
Add the generic device ID for NVIDIA AHCI controller.
Signed-off-by: Peer Chen
Signed-off-by: Jeff Garzik -
Fix the VT6330 issue, it's because the rev_max of VT6330 exceeds 0x2f.
The VT6415 and VT6330 share the same device ID.Signed-off-by: Joseph Chan
Signed-off-by: Jeff Garzik
09 Oct, 2009
1 commit
-
Commit f80ae7e45a0e03da188494c6e947a5c8b0cdfb4a
ahci: filter FPDMA non-zero offset enable for Aspire 3810T
breaks the current git build for configurations that don't define
CONFIG_ATA_ACPI.
This adds an ifdef wrapper to ahci_gtf_filter_workaround.Signed-off-by: Markus Trippelsdorf
Acked-by: Tejun Heo
Signed-off-by: Jeff Garzik
07 Oct, 2009
5 commits
-
Cc: Jung-Ik (John) Lee
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jeff Garzik -
* use 8 clk setting for active clocks == 7 (was 12 clk)
* use 12 clk setting for active clocks > 12 (was 8 clk)
* do 66MHz bus fixup before mapping active clocks
* fix setup of PIO command timingsAcked-by: Jung-Ik (John) Lee
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jeff Garzik -
Signed-off-by: John(Jung-Ik) Lee
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jeff Garzik -
MWDMA modes are not supported by this driver currently.
Acked-by: Jung-Ik (John) Lee
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jeff Garzik -
While trying to work around spurious detection retries for
non-existent devices on slave links, commit
816ab89782ac139a8b65147cca990822bb7e8675 incorrectly added link
offline check logic before ata_eh_thaw() was called. This means that
if an occupied link goes down briefly at the time that offline check
was performed, device class will be cleared to ATA_DEV_NONE and libata
wouldn't retry thus failing detection of the device.The offline check should be done after the port is thawed together
with online check so that such link glitches can be detected by the
interrupt handler and handled properly.Signed-off-by: Tejun Heo
Reported-by: Tim Blechmann
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik
06 Oct, 2009
7 commits
-
Curiously, Aspire 3810T issues many SATA feature enable commands via
_GTF, of which one is invalid and another is not supported by the
drive. In the process, it also enables FPDMA non-zero offset.
However, the feature also needs to be supported and enabled from the
controller and it's wrong to enable it from _GTF unless the controller
can do it by default.Currently, this ends up enabling FPDMA non-zero offset only on the
drive side leading to NCQ command failures and eventual disabling of
NCQ. This patch makes libata filter out FPDMA non-zero offset enable
for the machine.This was reported by Marcus Meissner in bnc#522790.
https://bugzilla.novell.com/show_bug.cgi?id=522790
Reported-by: Marcus Meissner
Signed-off-by: Jeff Garzik
-
Add ->gtf_filter to ata_device and set it to ata_acpi_gtf_filter when
initializing ata_link. This is to allow quirks which apply different
gtf filters.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Currently libata-acpi can only filter DIPM among SATA feature enables
via _GTF. This patch adds the capability to filter out FPDMA non-zero
offset, in-order guarantee and auto-activation.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
We're about to add more SATA_* and ATA_ACPI_FILTER_* constants.
Reformat them in preparation.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Update the AHCI driver to display all of the HBA capabilities defined in the
AHCI 1.3 specification. Some of these are in a new CAP2 (HBA Capabilities
Extended) register which is only defined on AHCI 1.2 or later. The spec says
that undefined registers should always return 0 on read, but to be safe we
assume a value of 0 unless the controller reports AHCI version 1.2 or later.
The value can also be retrieved through sysfs as with the existing capability
field.For example, on an Intel Ibex Peak (PCH) controller:
ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ems
sxs apstWe don't do anything special with the new flags yet.
Also, change the code that displays the flags to use the same bit enumerations
that are used to control actual operation.Signed-off-by: Robert Hancock
Signed-off-by: Jeff Garzik -
something-bility is spelled as something-blity
so a grep for 'blit' would find these linesI broke this one out from the rest as it actually changes
the output of a kernel message - so it could in theory
change the behavior of tools that parse that ouputSigned-off-by: Dirk Hohndel
Signed-off-by: Jeff Garzik -
Till now only one board, ASUS M2A-VM, can do 64bit dma with recent
BIOSen. Enabling 64bit DMA by default already broke three boards.
Enabling 64bit DMA isn't worth these regressions. Disable 64bit DMA
by default and enable it only on boards which are known to work.Signed-off-by: Tejun Heo
Reported-by: Gabriele Balducci
Reported-by: maierp@informatik.tu-muenchen.de
Cc: Shane Huang
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik
21 Sep, 2009
1 commit
-
A comment fix in drivers/ata/pata_hpt37x.c.
Signed-off-by: Krzysztof Ha³asa
Signed-off-by: Jiri Kosina
18 Sep, 2009
6 commits
-
This is a new pata driver for ARTOP 867X 64bit 4-channel UDMA133 ATA ctrls.
Based on the Atp867 data sheet rev 1.2, Acard, and in part on early ide codes
from Eric Uhrhane .Signed-off-by: John(Jung-Ik) Lee
Reviewed-by: Grant Grundler
Reviewed-by: Gwendal Gringo
Signed-off-by: Jeff Garzik -
On a Compaq Presario V3000 laptop (NVIDIA MCP51 chipset), pata_amd selects
PIO0 mode for the PATA DVD-RAM drive instead of MWDMA2 which it supports:ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-4084N, KQ09, max MWDMA2
ata4: nv_mode_filter: 0x39f&0x7001->0x1, BIOS=0x0 (0x0) ACPI=0x7001 (60:600:0x11)
ata4.00: configured for PIO0For some reason, the BIOS-set UDMA configuration returns 0 and the ACPI _GTM
reports that UDMA2 and PIO0 are enabled. This causes nv_mode_filter to end up
allowing only PIO0 and UDMA0-2. Since the drive doesn't support UDMA we end up
using PIO0.Since the controllers should always support PIO4, MWDMA2 and UDMA2 regardless
of what cable type is used, let's make sure we don't filter out these modes
regardless of what wacky settings the BIOS is using.Signed-off-by: Robert Hancock
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik -
sata_promise's reset code has deviated quite a bit from
the Promise reference driver's, and it has been observed
to fail to recover from errors in some cases.This patch thus updates the reset code to more closely
match the reference driver:- soft reset (pdc_reset_port):
* wait for ATA engine to not be in packet command mode
(2nd gen only)
* write reset bit in PDC_CTLSTAT before the first read
in the loop
* for 2nd gen SATA follow up with FPDMA reset and clearing
error status registers
- hard reset (pdc_sata_hardreset):
* wait for ATA engine to not be in packet command mode
(2nd gen only)
* reset ATA engine via the PCI control register
* Tejun's change to use non-waiting hardreset + follow-up SRSTI'm not changing the hotplug mask bits since they are taken care
of by sata_promise's ->freeze() and ->thaw() operations. And I'm
not writing the PMP port # because that's always zero (for now).Tested here on various controllers. In particular, one disk
which used to timeout and fail to recover from certain hdparm
and smartmonctl commands now works nicely.Signed-off-by: Mikael Pettersson
Signed-off-by: Jeff Garzik -
1st generation Promise SATA chips are prone to generating spurious
hotplug events which can disrupt normal operation. This has been
observed on 20376 and 20378 chips. This patch thus disables hotplug
support on 1st gen chips while leaving it enabled for 2nd gen chips.The pdc_sata_hotplug_offset() function becomes redundant so it is
removed.Tested on 1st gen 20376 and 20378 mainboard chips and on a 2nd gen
SATA300 PCI card.Signed-off-by: Mikael Pettersson
Tested-by: Kurt Roeckx
Signed-off-by: Jeff Garzik -
Commit 54c38444fad6a99b4b19512f8f0055d69115e69e makes libata abort qcs
after the port is frozen. This is necessary to guarantee that TF
registers are accessed after the DMA engine is shutdown after an
error. However, this triggers WARN_ON_ONCE() check in
ata_qc_complete() spuriously. Move WARN_ON_ONCE() downwards such that
failing commands while frozen doesn't trigger it.Signed-off-by: Tejun Heo
Cc: stable
Signed-off-by: Jeff Garzik -
Commit a5bfc4714b3f01365aef89a92673f2ceb1ccf246 dropped explicit
pci_intx() manipulation from ahci because it seemed unnecessary and
ahci doesn't seem to be the right place to be tweaking it if it were.
This was largely okay but there are exceptions. There was one on an
embedded platform which was fixed via firmware and now bko#14124
reports it on a HP DL320.http://bugzilla.kernel.org/show_bug.cgi?id=14124
I still think this isn't something libata drivers should be caring
about (the only ones which are calling pci_intx() explicitly are
libata ones and one other driver) but for now reverting the change
seems to be the right thing to do.Signed-off-by: Tejun Heo
Reported-by: Thomas Jarosch
Signed-off-by: Jeff Garzik
11 Sep, 2009
5 commits
-
Signed-off-by: Marcin Slusarz
Signed-off-by: Jeff Garzik -
This patch refines ahci_kick_engine() after discussion with Tejun about
FBS(FIS-based switching) support preparation:
a. Kill @force_restart and always kick the engine. The only case where
@force_restart is zero is when it's called from ahci_p5wdh_hardreset()
Actually at that point, BSY is pretty much guaranteed to be set.
b. If PMP is attached, ignore busy and always do CLO. (AHCI-1.3 9.2)Signed-off-by: Shane Huang
Acked-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Signed-off-by: Otavio Salvador
Signed-off-by: Jeff Garzik -
Add AMD SB900 SATA/IDE controller device IDs.
Signed-off-by: Shane Huang
Signed-off-by: Jeff Garzik -
Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
struct resource *res;
@@- (res->end - res->start) + 1
+ resource_size(res)
//Signed-off-by: Julia Lawall
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Jeff Garzik
09 Sep, 2009
4 commits
-
Fix for non-ncq & ncq commands causing timeouts when both are issued
simultaneously to the same device.Signed-off-by: Ashish Kalra
[fixed to be actual compileable C code -jg]
Signed-off-by: Jeff Garzik -
This small patch is just adding the information for PMP spec 1.2
Signed-off-by: Shane Huang
Signed-off-by: Jeff Garzik -
ata_tf_read_block() has off-by-one error when converting CHS address
to LBA. The bug isn't very visible because ata_tf_read_block() is
used only when generating sense data for a failed RW command and CHS
addressing isn't used too often these days.This problem was spotted by Atsushi Nemoto.
Signed-off-by: Tejun Heo
Reported-by: Atsushi Nemoto
Signed-off-by: Jeff Garzik -
Gigabyte GA-MA69VM-S2 can't do 64bit DMA either. It's yet unknown
whether recent BIOS fixes the problem. Blacklist regardless of BIOS
revisions for now.Sandor Bodo-Merle reported and provided the initial patch for this
issue.Signed-off-by: Tejun Heo
Reported-by: Sandor Bodo-Merle
Cc: Shane Huang
Signed-off-by: Jeff Garzik