02 Aug, 2010
1 commit
-
SIDPR window registers are shared across ports and as each access is
done in two steps, accesses to different ports under EH may race.
This primarily is caused by incorrect host locking in EH context and
should be fixed by defining locking requirements for each EH operation
which can be used during EH and enforcing them but for now work around
the problem by adding a dedicated SIDPR lock and grabbing it for each
SIDPR access.Signed-off-by: Tejun Heo
Reported-by: Mark Knecht
Reported-by: Paul Check
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik
26 May, 2010
2 commits
-
Separate out ata_pci_bmdma_prepare_host() and ata_pci_bmdma_init_one()
from their SFF counterparts. SFF ones no longer try to initialize
BMDMA or set PCI master.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Separate out BMDMA irq handler from SFF irq handler. The misnamed
host_intr() functions are renamed to ata_sff_port_intr() and
ata_bmdma_port_intr(). Common parts are factored into
__ata_sff_port_intr() and __ata_sff_interrupt() and used by sff and
bmdma interrupt routines.All BMDMA drivers now use ata_bmdma_interrupt() or
ata_bmdma_port_intr() while all non-BMDMA SFF ones use
ata_sff_interrupt() or ata_sff_port_intr().For now, ata_pci_sff_init_one() uses ata_bmdma_interrupt() as it's
used by both SFF and BMDMA drivers.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
23 Apr, 2010
1 commit
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
16 Mar, 2010
1 commit
-
[Ss]ytem => [Ss]ystem
udpate => update
paramters => parameters
orginal => originalSigned-off-by: Thomas Weber
Acked-by: Randy Dunlap
Signed-off-by: Jiri Kosina
02 Mar, 2010
2 commits
-
Traditional IDE interface sucks in that it doesn't have a reliable IRQ
pending bit, so if the controller raises IRQ while the driver is
expecting it not to, the IRQ won't be cleared and eventually the IRQ
line will be killed by interrupt subsystem. Some controllers have
non-standard mechanism to indicate IRQ pending so that this condition
can be detected and worked around.This patch adds an optional operation ->sff_irq_check() which will be
called for each port from the ata_sff_interrupt() if an unexpected
interrupt is received. If the operation returns %true,
->sff_check_status() and ->sff_irq_clear() will be cleared for the
port. Note that this doesn't mark the interrupt as handled so it
won't prevent IRQ subsystem from killing the IRQ if this mechanism
fails to clear the spurious IRQ.This patch also implements ->sff_irq_check() for ata_piix. Note that
this adds slight overhead to shared IRQ operation as IRQs which are
destined for other controllers will trigger extra register accesses to
check whether IDE interrupt is pending but this solves rare screaming
IRQ cases and for some curious reason also helps weird BIOS related
glitch on Samsung n130 as reported in bko#14314.http://bugzilla.kernel.org/show_bug.cgi?id=14314
* piix_base_ops dropped as suggested by Sergei.
* Spurious IRQ detection doesn't kick in anymore if polling qc is in
progress. This provides less protection but some controllers have
possible data corruption issues if the wrong register is accessed
while a command is in progress.Signed-off-by: Tejun Heo
Reported-by: Johannes Stezenbach
Reported-by: Hans Werner
Cc: Alan Cox
Cc: Sergei Shtylyov
Signed-off-by: Jeff Garzik -
Signed-off-by: Seth Heasley
Signed-off-by: Jeff Garzik
13 Jan, 2010
1 commit
-
Commit 871af1210f13966ab911ed2166e4ab2ce775b99d enabled 32bit PIO for
PATA piix but didn't for SATA. There's no reason not to use 32bit PIO
on SATA piix. Enable it.Signed-off-by: Tejun Heo
Cc: Alan Cox
Signed-off-by: Jeff Garzik
10 Dec, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
tree-wide: fix misspelling of "definition" in comments
reiserfs: fix misspelling of "journaled"
doc: Fix a typo in slub.txt.
inotify: remove superfluous return code check
hdlc: spelling fix in find_pvc() comment
doc: fix regulator docs cut-and-pasteism
mtd: Fix comment in Kconfig
doc: Fix IRQ chip docs
tree-wide: fix assorted typos all over the place
drivers/ata/libata-sff.c: comment spelling fixes
fix typos/grammos in Documentation/edac.txt
sysctl: add missing comments
fs/debugfs/inode.c: fix comment typos
sgivwfb: Make use of ARRAY_SIZE.
sky2: fix sky2_link_down copy/paste comment error
tree-wide: fix typos "couter" -> "counter"
tree-wide: fix typos "offest" -> "offset"
fix kerneldoc for set_irq_msi()
spidev: fix double "of of" in comment
comment typo fix: sybsystem -> subsystem
...
04 Dec, 2009
2 commits
-
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.Signed-off-by: André Goddard Rosa
Signed-off-by: Jiri Kosina -
Fix erroneous check for ap->udma_mask in do_pata_set_dmamode()
resulting in controller not being programmed properly for MWDMA.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Jeff Garzik
01 Sep, 2009
1 commit
-
Commit log for commit 517d3cc15b36392e518abab6bacbb72089658313
("[libata] ata_piix: Enable parallel scan") says:This patch turns on parallel scanning for the ata_piix driver.
This driver is used on most netbooks (no AHCI for cheap storage it seems).
The scan is the dominating time factor in the kernel boot for these
devices; with this flag it gets cut in half for the device I used
for testing (eeepc).
Alan took a look at the driver source and concluded that it ought to be safe
to do for this driver. Alan has also checked with the hardware team.and it is all true but once we put all things together additional
constraints for PATA controllers show up (some hardware registers
have per-host not per-port atomicity) and we risk misprogramming
the controller.I used the following test to check whether the issue is real:
@@ -736,8 +736,20 @@ static void piix_set_piomode(struct ata_
(timings[pio][1] << 8);
}
pci_write_config_word(dev, master_port, master_data);
- if (is_slave)
+ if (is_slave) {
+ if (ap->port_no == 0) {
+ u8 tmp = slave_data;
+
+ while (slave_data == tmp) {
+ pci_read_config_byte(dev, slave_port, &tmp);
+ msleep(50);
+ }
+
+ dev_printk(KERN_ERR, &dev->dev, "PATA parallel scan "
+ "race detected\n");
+ }
pci_write_config_byte(dev, slave_port, slave_data);
+ }/* Ensure the UDMA bit is off - it will be turned back on if
UDMA is selected */and it indeed triggered the error message.
Lets fix all such races by adding an extra locking to ->set_piomode
and ->set_dmamode methods for PATA controllers.[ Alan: would be better to take the host lock in libata-core for these
cases so that we fix all the adapters in one swoop. "Looks fine as a
temproary quickfix tho" ]Cc: Arjan van de Ven
Acked-by: Alan Cox
Cc: Jeff Garzik
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Linus Torvalds
29 Jul, 2009
2 commits
-
OriginalAuthor: Tony Espy
Signed-off-by: Steve Conklin
Signed-off-by: Jeff Garzik -
OriginalAuthor: Michael Frey
Signed-off-by: Steve Conklin
Signed-off-by: Jeff Garzik
10 Jun, 2009
3 commits
-
This patch turns on parallel scanning for the ata_piix driver.
This driver is used on most netbooks (no AHCI for cheap storage it seems).
The scan is the dominating time factor in the kernel boot for these
devices; with this flag it gets cut in half for the device I used
for testing (eeepc).
Alan took a look at the driver source and concluded that it ought to be safe
to do for this driver. Alan has also checked with the hardware team.Signed-off-by: Arjan van de Ven
Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
Combined mode pci quirk hacks went away - so the table to keep in sync
no longer exists.Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
We can't do this for the later ones as they have all sorts of magic boot
time stuff that needs reviewing and the like. However we can do it for the
older ones and it turns out we need to as some IBM docking stations have a
second PIIX series device in them and without this change you can't use it
very wellSigned-off-by: Alan Cox
Signed-off-by: Jeff Garzik
06 Jun, 2009
1 commit
-
HP Compaq nc6000 suffers from the double disk spindown issue.
Add it to the broken poweroff DMI list.Signed-off-by: Ville Syrjala
Signed-off-by: Jeff Garzik
12 May, 2009
2 commits
-
The Sony TZ90 needs the cable type hardcoding. See bug #12734
Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
See Errata documentation. The recommended workaround is to use PIO4 instead
which will we automatically do by flagging this mode not available.Signed-off-by: Alan Cox
Signed-off-by: Jeff Garzik
07 Apr, 2009
1 commit
-
Sony VGN-BX297XP fails suspend if the controller is powered down when
calling into ACPI suspend. Add the machine to piix_broken_suspend
list.This problem was reported by GNUtoo@no-log.org on bko#10293.
Signed-off-by: Tejun Heo
Cc: Rafael J. Wysocki
Reported-by: GNUtoo@no-log.org
Signed-off-by: Jeff Garzik
25 Mar, 2009
1 commit
-
No functional changes in this patch.
Signed-off-by: Erik Inge Bolsø
Signed-off-by: Jeff Garzik
14 Mar, 2009
1 commit
-
Samsung DB-P70 somehow botched the first ICH9 SATA port. The board
doesn't expose the first port but somehow SStatus reports link online
while failing SRST protocol leading to repeated probe failures and
thus long boot delay.Because the BIOS doesn't carry any identifying DMI information, the
port can't be blacklisted safely. Fortunately, the controller does
have subsystem vendor and ID set. It's unclear whether the subsystem
IDs are used only for the board but it can be safely worked around by
disabling SIDPR access and just using SRST works around the problem.
Even when the workaround is triggered on an unaffected board the only
side effect will be missing SCR access.Signed-off-by: Tejun Heo
Reported-by: Joseph Jang
Reported-by: Jonghyon Sohn
Signed-off-by: Jeff Garzik
27 Jan, 2009
1 commit
-
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.To prevent this from happening we can blacklist the affected systems
using DMI information.Blacklist HP 2510p that uses the ata_piix driver.
Signed-off-by: Rafael J. Wysocki
Signed-off-by: Jeff Garzik
09 Jan, 2009
2 commits
-
This matters for some controllers and in one or two cases almost doubles
PIO performance. Add a bmdma32 operations set we can inherit and activate
it for some controllersSigned-off-by: Alan Cox
Signed-off-by: Jeff Garzik -
Certain ACPI implementations mess up IOCFG on _STM making libata
detect cable type incorrectly after a suspend/resume cycle. This
patch makes ata_piix save IOCFG on attach, use the saved value for
things which aren't dynamic and restore it on detach so that the next
driver also gets the BIOS initialized value.This patch contains the following changes.
* makes ich_pata_cable_detect() use saved_iocfg.
* make piix_iocfg_bit18_quirk() take @host and use saved_iocfg.
* hpriv allocation moved upwards to save iocfg before doing anything
else.This fixes bz#11879. Andreas Mohr reported and diagnosed the problem.
Signed-off-by: Tejun Heo
Cc: Andreas Mohr
Signed-off-by: Jeff Garzik
29 Dec, 2008
1 commit
-
Commit
ATA: piix, fix pointer deref on suspend
fixed a possible oops in an ugly manner. Use newly introduced dmi_match()
to make the code pretty again.Signed-off-by: Jiri Slaby
Cc: Alexandru Romanescu
Cc: Tejun Heo
Cc: Alan Cox
Signed-off-by: Jeff Garzik
09 Dec, 2008
1 commit
-
Hi,
I've found this issue in the mmotm 2008-12-02-17-08.
--
Commit
ata_piix: add borked Tecra M4 to broken suspend list
introduced DMI variables checking, but they can be null, so that
we possibly dereference null.Check if they are null and avoid checks in that case.
Solves:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
IP: [] piix_pci_device_suspend+0x117/0x230Signed-off-by: Jiri Slaby
Cc: Jeff Garzik
Cc: Alexandru Romanescu
Cc: Tejun Heo
Signed-off-by: Jeff Garzik
02 Dec, 2008
1 commit
-
Tecra M4 sometimes forget what it is and reports bogus data via DMI
which makes the machine evade broken suspend matching and thus fail
suspend/resume. This patch updates piix_broken_suspend() such that it
can match such case. As the borked DMI data is a bit generic,
matching many entries to make the match more specific is necessary.
As the usual DMI matching is limited to four entries, this patch uses
hard coded manual matching.This is reported by Alexandru Romanescu.
Signed-off-by: Tejun Heo
Cc: Alexandru Romanescu
Signed-off-by: Jeff Garzik
31 Oct, 2008
1 commit
-
Remove excess kernel-doc function parameter notation from drivers/ata/:
Warning(drivers/ata/libata-core.c:1622): Excess function parameter or struct member 'fn' description in 'ata_pio_queue_task'
Warning(drivers/ata/libata-core.c:4655): Excess function parameter or struct member 'err_mask' description in 'ata_qc_complete'
Warning(drivers/ata/ata_piix.c:751): Excess function parameter or struct member 'udma' description in 'do_pata_set_dmamode'Signed-off-by: Randy Dunlap
Signed-off-by: Jeff Garzik
28 Oct, 2008
1 commit
-
Signed-off-by: Jeff Garzik
29 Sep, 2008
4 commits
-
This patch updates the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs.
Signed-off-by: Seth Heasley
Signed-off-by: Jeff Garzik -
Signed-off-by: Herton Ronaldo Krzesinski
Signed-off-by: Jeff Garzik -
Now that libata has slave_link, there's no need to keep ugly merged
SCR access. Drop it and use slave_link instead. This results in
simpler code and much better separate link handling for master and
slave.Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik -
Logically, SCR access ops should take @link; however, there was no
compelling reason to convert all SCR access ops when adding @link
abstraction as there's one-to-one mapping between a port and a non-PMP
link. However, that assumption won't hold anymore with the scheduled
addition of slave link.Make SCR access ops per-link.
Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
14 Sep, 2008
1 commit
-
drivers/ata/ata_piix.c:1502:7: warning: symbol 'rc' shadows an earlier one
Signed-off-by: Stephen Hemminger
Signed-off-by: Jeff Garzik
22 Aug, 2008
1 commit
-
This patch adds the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs.
Signed-off-by: Seth Heasley
Signed-off-by: Jeff Garzik
31 Jul, 2008
1 commit
-
Subsys 106b:00a3 also is the weird apple ich8m which chokes when the
latter two ports are accessed, add it. Reported by Felipe Sere.Signed-off-by: Tejun Heo
Cc: Felipe Sere
Signed-off-by: Jeff Garzik
19 Jun, 2008
1 commit
-
TOSHIBA also used "TECRA M4" in additon to "Tecra M4", add it.
Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik