dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

2492 Commits

Author SHA1 Message Date
Linus Torvalds 3151367f87 SCSI for-linus on 20121002
This is a large set of updates, mostly for drivers (qla2xxx [including support
 for new 83xx based card], qla4xxx, mpt2sas, bfa, zfcp, hpsa, be2iscsi, isci,
 lpfc, ipr, ibmvfc, ibmvscsi, megaraid_sas).  There's also a rework for tape
 adding virtually unlimited numbers of tape drives plus a set of dif fixes for
 sd and a fix for a live lock on hot remove of SCSI devices.
 
 This round includes a signed tag pull of isci-for-3.6
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQaqCFAAoJEDeqqVYsXL0MKJ4IALg/Obnk0/fNvBUNIrh5zRmj
 r9UlXFJnlEDT03qRGdn8okgWMChbgaD1ZrwDTQnjNsabVQoTXI6oO6/uL2c8crpY
 BFBwJvkNJS99nbcZv10CpJ3K7ykmRnKlkYon12iknhGwdtU+XJ14Z4PUcZkI9jmg
 sBQQ6uNVWyosaONNE+k6o+dw6OTttJkzRX8e9in3thstxNTcG+h9iB1zZ/ETkSEj
 tD4MyOgDiPf8kPV2awQThQGpni9Tu3SQr5dEn/iUUktUjiYsDNQuyaAk+QzyhUU7
 D35iIJnIHlXTSTMQkrG4qpJHBvqPkWlYJzaOmheQryQ3vzp2C5Ly/hS9il45uIQ=
 =49u9
 -----END PGP SIGNATURE-----

Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "This is a large set of updates, mostly for drivers (qla2xxx [including
  support for new 83xx based card], qla4xxx, mpt2sas, bfa, zfcp, hpsa,
  be2iscsi, isci, lpfc, ipr, ibmvfc, ibmvscsi, megaraid_sas).

  There's also a rework for tape adding virtually unlimited numbers of
  tape drives plus a set of dif fixes for sd and a fix for a live lock
  on hot remove of SCSI devices.

  This round includes a signed tag pull of isci-for-3.6

  Signed-off-by: James Bottomley <JBottomley@Parallels.com>"

Fix up trivial conflict in drivers/scsi/qla2xxx/qla_nx.c due to new PCI
helper function use in a function that was removed by this pull.

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (198 commits)
  [SCSI] st: remove st_mutex
  [SCSI] sd: Ensure we correctly disable devices with unknown protection type
  [SCSI] hpsa: gen8plus Smart Array IDs
  [SCSI] qla4xxx: Update driver version to 5.03.00-k1
  [SCSI] qla4xxx: Disable generating pause frames for ISP83XX
  [SCSI] qla4xxx: Fix double clearing of risc_intr for ISP83XX
  [SCSI] qla4xxx: IDC implementation for Loopback
  [SCSI] qla4xxx: update copyrights in LICENSE.qla4xxx
  [SCSI] qla4xxx: Fix panic while rmmod
  [SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
  [SCSI] qla4xxx: Prevent MSI/MSI-X falling back to INTx for ISP82XX
  [SCSI] qla4xxx: Update idc reg in case of PCI AER
  [SCSI] qla4xxx: Fix double IDC locking in qla4_8xxx_error_recovery
  [SCSI] qla4xxx: Clear interrupt while unloading driver for ISP83XX
  [SCSI] qla4xxx: Print correct IDC version
  [SCSI] qla4xxx: Added new mbox cmd to pass driver version to FW
  [SCSI] scsi_dh_alua: Enable STPG for unavailable ports
  [SCSI] scsi_remove_target: fix softlockup regression on hot remove
  [SCSI] ibmvscsi: Fix host config length field overflow
  [SCSI] ibmvscsi: Remove backend abstraction
  ...
2012-10-02 19:01:32 -07:00
Linus Torvalds 51562cba98 Minor libata updates, nothing notable.
1) Apply -- and then revert -- the FUA feature.  Caused
    disk corruption in linux-next, proving it cannot be turned on by
    default.
 
    Net effect to upstream tree:  zero
 
 2) New AHCI platform driver sata_highbank
 
 3) Improve SCSI MODE SENSE handling; support MODE SELECT
 
 4) AHCI: support aggressive device sleep (power mgmt)
 
 5) sata_fsl: minor fix
 
 6) pata_arasan: clk support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUGtCHCWzCDIBeCsvAQLHFA//X6IM8ymHasCzEXvB2IusarPZYqfrGOUX
 DVHPPeBdNbuNtX1iIp9NEvx5PONEvBgylrzbH0jOW9f+8GZM7sgT0NFlUWAfg7hO
 HF3RN3EsQMMcSK+BoOLzo+vzSEAIbPB7zqKAGqh9QBBpfKAYbAy2WHr7P5OMuy9J
 IjKoknc8jaOWavg8oavx3dU5PCFU7BoPQzrPSNB/MY5L1Ia3H29zyCmoW1Ha05wa
 LRZzJes4X3H+tStNhtrNmItaRfxJNW7xPluNOn4FIyQmK+Nh3NDk6IBuwPdFpltn
 m6azzOfHreaP9J9xcIiU1NX7Gu+IBYZpOyL61B+WUmCRLXMdnhDTZE6mkKe10ReZ
 o9oBn636swDVMXG+zS0hjv+nQgV0l+sHX/0GsTCxDapZal7icCUsLzW9flaCh0n+
 zkwoxjvGZOkFf6ZsAgFVo8h2YMe7Ph2I5JIiN12rqee4grV7cHStKQn076Kyb9zo
 5LsR1/+YuuWz9G2dEmirDA8xBtydIZ4thvblwXipnqyZWkAwLue+opIWxau7BlPZ
 qz6KjNp2L1hS8QgQnYHYmk/EDPDg5SNP4RTCCO9TKUBcu9fcke2c+R8V7ebKCI02
 AaaccV4N6t7c1rdQUH6bnizi9aZ+tRoBAheLEDrrkOx72f71hE6JgueqhI+EaTw6
 LyrSiiVITxA=
 =i3EH
 -----END PGP SIGNATURE-----

Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

Pull libata changes from Jeff Garzik:
 "Minor libata updates, nothing notable.

   1) Apply -- and then revert -- the FUA feature.  Caused disk
      corruption in linux-next, proving it cannot be turned on by
      default.

      Net effect to upstream tree:  zero

   2) New AHCI platform driver sata_highbank

   3) Improve SCSI MODE SENSE handling; support MODE SELECT

   4) AHCI: support aggressive device sleep (power mgmt)

   5) sata_fsl: minor fix

   6) pata_arasan: clk support"

* tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_mv: Fix warnings when no PCI
  [libata] Makefile: Fix build error in sata_highbank
  [libata] export ata_dev_set_feature()
  libata-core: use ATA_LBA in ata_build_rw_tf()
  ata/ahci_platform: Add clock framework support
  pata_arasan: add Device Tree probing capability
  pata_arasan: Add clk_{un}prepare() support
  ata: add platform driver for Calxeda AHCI controller
  sata_fsl: add workaround for data length mismatch on freescale V2 controller
  ahci: implement aggressive SATA device sleep support
  ata: define enum constants for IDENTIFY DEVICE
  Revert "libata: enable SATA disk fua detection on default"
  [libata] scsi: implement MODE SELECT command
  [libata] scsi: support MODE SENSE request for changeable and default parameters
  [libata] scsi: Remove unlikely() from FUA check
  libata: enable SATA disk fua detection on default
2012-10-02 18:23:35 -07:00
James Bottomley fe709ed827 Merge SCSI misc branch into isci-for-3.6 tag 2012-10-02 08:55:12 +01:00
Andrew Lunn 13b74085d9 sata_mv: Fix warnings when no PCI
Dove can be configured without PCI. We then get a number of warnings:

warning: 'msi' defined but not used
warning: 'mv5_sht' defined but not used
warning: 'mv_dump_pci_cfg' defined but not used.

Move around variables and add #ifdef as necassary to fix the warnings.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-10-01 22:53:23 -04:00
Mark Langsdorf 40dad0af2d [libata] Makefile: Fix build error in sata_highbank
Allow sata_highbank to build even if no other users of libahci.o are built.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-10-01 22:50:37 -04:00
Olof Johansson e3a66aa33a Merge branch 'multiplatform/platform-data' into next/multiplatform
* multiplatform/platform-data:
  ARM: spear: move platform_data definitions
  ARM: samsung: move platform_data definitions
  ARM: orion: move platform_data definitions
  ARM: nomadik: move platform_data definitions
  ARM: w90x900: move platform_data definitions
  ARM: vt8500: move platform_data definitions
  ARM: tegra: move sdhci platform_data definition
  ARM: sa1100: move platform_data definitions
  ARM: pxa: move platform_data definitions
  ARM: netx: move platform_data definitions
  ARM: msm: move platform_data definitions
  ARM: imx: move platform_data definitions
  ARM: ep93xx: move platform_data definitions
  ARM: davinci: move platform_data definitions
  ARM: at91: move platform_data definitions

Conflicts due to removed files:
	arch/arm/mach-tegra/board-harmony.c
	arch/arm/mach-tegra/board-trimslice.c

Conflicts due to code removal:
	arch/arm/mach-tegra/board-paz00.c

Context conflicts in:
	drivers/mmc/host/sdhci-tegra.c
	drivers/net/irda/pxaficp_ir.c

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-22 01:07:21 -07:00
Arnd Bergmann 436d42c61c ARM: samsung: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the samsung include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
2012-09-19 17:42:18 +02:00
Arnd Bergmann 293b2da1b6 ARM: pxa: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the pxa include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Paul Parsons <lost.distance@yahoo.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-By: Stefan Schmidt <stefan@openezx.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Harald Welte <laforge@openezx.org>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Tomas Cech <sleep_walker@suse.cz>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Dan Williams <djbw@fb.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: openezx-devel@lists.openezx.org
2012-09-14 11:18:10 +02:00
Arnd Bergmann a3b2924547 ARM: ep93xx: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the ep93xx include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Axel Lin <axel.lin@gmail.com>
2012-09-14 11:16:55 +02:00
Jeff Garzik 633de4cc2c [libata] export ata_dev_set_feature()
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:12:29 -04:00
Sergei Shtylyov 9ca7cfa4d0 libata-core: use ATA_LBA in ata_build_rw_tf()
Since READ/WRITE FPDMA QUEUED commands are 48-bit, bit 6 of the device register
means LBA, the same as for READ/WRITE DMA EXT commands. So use ATA_LBA instead
of the bare number in ata_build_rw_tf()'s branch dedicated to the NCQ commands.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:10:23 -04:00
Viresh Kumar f1e70c2c53 ata/ahci_platform: Add clock framework support
On many architectures, drivers are supposed to prepare/unprepare &
enable/disable functional clock of device. This patch adds clock support for
ahci_platform.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:10:18 -04:00
Viresh Kumar 26fdaa7453 pata_arasan: add Device Tree probing capability
SPEAr platforms now support DT and so must convert all drivers to support DT.
This patch adds DT probing support for Arasan Compact Flash controller and
updates its documentation too.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:09:56 -04:00
Viresh Kumar 3f09e6c0d3 pata_arasan: Add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:09:51 -04:00
Mark Langsdorf 8996b89d6b ata: add platform driver for Calxeda AHCI controller
Calxeda highbank SATA phy has intermittent problems bringing up a link
with Gen3 drives. Retrying the phy hard reset can work-around this issue,
but each reset also disables spread spectrum support. The reset function
also needs to reprogram the phy to enable spread spectrum support.

Create a new driver based on ahci_platform to support the Calxeda Highbank
SATA controller.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:09:41 -04:00
Shaohui Xie 100f586bd0 sata_fsl: add workaround for data length mismatch on freescale V2 controller
The freescale V2 SATA controller checks if the received data length matches
the programmed length 'ttl', if not, it assumes that this is an error.
In ATAPI, the 'ttl' is based on max allocation length and not the actual
data transfer length, controller will raise 'DLM' (Data length Mismatch)
error bit in Hstatus register. Along with 'DLM', DE (Device error) and
FE (fatal Error) bits are also set in Hstatus register, 'E' (Internal Error)
bit is set in Serror register and CE (Command Error) and DE (Device error)
registers have the corresponding bit set. In this condition, we need to
clear errors in following way: in the service routine, based on 'DLM' flag,
HCONTROL[27] operation clears Hstatus, CE and DE registers, clear Serror
register.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Anju Bhartiya <Anju.Bhartiya@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:09:19 -04:00
Shane Huang 65fe1f0f66 ahci: implement aggressive SATA device sleep support
Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal.
This feature enables an HBA and SATA storage device to enter the DevSleep
interface state, enabling lower power SATA-based systems.

Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as
soon as there are no commands outstanding to the device and the port
specific Device Sleep idle timer has expired. This enables autonomous
entry into the DevSleep interface state without waiting for software
in power sensitive systems.

This patch enables Aggressive Device Sleep only if both host controller
and device support it.

Tested on AMD reference board together with Device Sleep supported device
sample.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Reviewed-by: Aaron Lu <aaron.lwe@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 01:08:53 -04:00
Alan Cox 7b4f6ecacb ahci: Add identifiers for ASM106x devices
They don't always appear as AHCI class devices but instead as IDE class.

Based on an initial patch by Hiroaki Nito

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42804
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:24:29 -04:00
Alan Cox 17c60c6b76 ahci: Add alternate identifier for the 88SE9172
This can also appear as 0x9192. Reported in bugzilla and confirmed with the
board documentation for these boards.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42970
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: The Stables <stable@vger.kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:23:57 -04:00
Ben Hutchings 1fefb8fdc6 ahci: Add JMicron 362 device IDs
The JMicron JMB362 controller supports AHCI only, but some revisions
use the IDE class code.  These need to be matched by device ID.

These additions have apparently been included by QNAP in their NAS
devices using these controllers.

References: http://bugs.debian.org/634180
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:23:12 -04:00
Jeff Garzik 9973a1c306 Revert "libata: enable SATA disk fua detection on default"
It caused several reported regressions.

This reverts commit 91895b786e.
2012-09-13 00:14:21 -04:00
Prarit Bhargava d17d794c63 libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry
commit d70e551c8e, Add " 2GB ATA Flash
Disk"/"ADMA428M" to DMA blacklist, should have added a space before 2GB.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-25 10:16:45 -04:00
Dan Williams 8d8e7d1314 [SCSI] libsas, ipr: cleanup ata_host flags initialization via ata_host_init
libsas and ipr pass flags to ata_host_init that are meant for the port.

ata_host flags:
	ATA_HOST_SIMPLEX	= (1 << 0),	/* Host is simplex, one DMA channel per host only */
	ATA_HOST_STARTED	= (1 << 1),	/* Host started */
	ATA_HOST_PARALLEL_SCAN	= (1 << 2),	/* Ports on this host can be scanned in parallel */
	ATA_HOST_IGNORE_ATA	= (1 << 3),	/* Ignore ATA devices on this host. */

flags passed by libsas:
	ATA_FLAG_SATA		= (1 << 1),
	ATA_FLAG_PIO_DMA	= (1 << 7), /* PIO cmds via DMA */
	ATA_FLAG_NCQ		= (1 << 10), /* host supports NCQ */

The only one that aliases is ATA_HOST_STARTED which is a 'don't care' in
the libsas and ipr cases since ata_hosts from these sources are not
registered with libata.

Reported-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Brian King <brking@us.ibm.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-08-24 13:10:24 +04:00
Dan Williams 2fcbdcb4c8 [SCSI] libata: export ata_port suspend/resume infrastructure for sas
Reuse ata_port_{suspend|resume}_common for sas.  This path is chosen
over adding coordination between ata-tranport and sas-transport because
libsas wants to revalidate the domain at resume-time at the host level.
It can not validate links have resumed properly until libata has had a
chance to perform its revalidation, and any sane placing of an ata_port
in the sas-transport model would delay it's resumption until after the
host.

Export the common portion of port suspend/resume (bypass pm_runtime),
and allow sas to perform these operations asynchronously (similar to the
libsas async-ata probe implmentation).  Async operation is determined by
having an external, rather than stack based, location for storing the
result of the operation.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jacek Danecki <jacek.danecki@intel.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-08-24 13:10:23 +04:00
Dan Williams ca6d43b051 [SCSI] libata: reset once
Hotplug testing with libsas currently encounters a 55 second wait for
link recovery to give up.  In the case where the user trusts the
response time of their devices permit the recovery attempts to be
limited to one.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-08-24 13:04:08 +04:00
Paolo Bonzini 1b26d29ccd [libata] scsi: implement MODE SELECT command
The cache_type file in sysfs lets users configure the disk cache in
write-through or write-back modes.  However, ata disks do not support
writing to the file because they do not implement the MODE SELECT
command.

This patch adds a translation from MODE SELECT (for the caching page
only) to the ATA SET FEATURES command.  The set of changeable parameters
answered by MODE SENSE is also adjusted accordingly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 14:10:36 -04:00
Paolo Bonzini 6ca8e79466 [libata] scsi: support MODE SENSE request for changeable and default parameters
Since the next patch will introduce support for MODE SELECT, it
makes sense to start advertising which bits are actually changeable.
For now, the answer is none.

Default parameters can also be reported, they are simply the same
as the current parameters.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 14:09:59 -04:00
Jeff Garzik 3e451a495d [libata] scsi: Remove unlikely() from FUA check
Some other unlikely() should probably be removed as well.  A fresh look
reveals an over-enthusiasm for unlikely() in libata-scsi.c.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 14:04:50 -04:00
Zheng Liu 91895b786e libata: enable SATA disk fua detection on default
Currently, SATA disk fua detection is disabled on default because most of
devices don't support this feature at that time.  With the development of
technology, more and more SATA disks support this feature.  So now we can enable
this detection on default.

Although fua detection is defined as a kernel module parameter, it is too hard
to set its value because it must be loaded and set before system starts up.
That needs to modify initrd file.  So it is inconvenient for administrator who
needs to manage a huge number of servers.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:57:12 -04:00
Jeff Garzik 04d0f1b849 [libata] new quirk, lift bridge limits for Buffalo DriveStation Quattro
Michael Eitelwein writes:

I have an external SATA drive that was slowed down by bridge limits. I
found a solution in a thread on this list posted in 2008: It introduces
whitelist entries in libata-core.c for devices with well working bridges
(e.g. email on Fri, 31 Oct 2008 01:45:27 -0400).

I added my device to this whitelist in a custom built kernel and it
works fine for weeks now. How can I have this device added on the
whitelist within the official kernel? Is this whitelist mechanism still
supported or is there a smarter way to achieve whitelisting?

I added the following whitelist entry for my Buffalo DriveStation
Quattro "BUFFALO HD-QSU2/R5":

        /* Devices that do not need bridging limits applied */
        { "MTRON MSP-SATA*",            NULL,   ATA_HORKAGE_BRIDGE_OK, },
        { "BUFFALO HD-QSU2/R5",         NULL,   ATA_HORKAGE_BRIDGE_OK, },

Reported-by: Michael Eitelwein <michael@eitelwein.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:36:59 -04:00
Paul Menzel ebd6002815 [libata] Kconfig: Elaborate that SFF is meant for legacy and PATA stuff
Building Linux for an ASUS Eee PC 701 4G with

        ata2.00: CFA: SILICONMOTION SM223AC, , max UDMA/66
        ata2.00: 7815024 sectors, multi 0: LBA
        ata2.00: configured for UDMA/66
        scsi 1:0:0:0: Direct-Access     ATA      SILICONMOTION SM n/a  PQ: 0 ANSI: 5
        sd 1:0:0:0: [sda] 7815024 512-byte logical blocks: (4.00 GB/3.72 GiB)
        sd 1:0:0:0: [sda] Write Protect is off
        sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
        sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
         sda: sda1
        sd 1:0:0:0: [sda] Attached SCSI disk
        sd 1:0:0:0: Attached scsi generic sg0 type 0

I followed the advice to not use the deprecated old PATA subsystem

        ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->

and use the ATA subsystem instead.

        Serial ATA and Parallel ATA drivers  --->

Unfortunately I needed several tries to find out, that I needed the SFF
menu I had not selected before because I had never heard that term
before. I think it would have helped me, to have PATA or legacy IDE in
that item’s name.

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:31:18 -04:00
Aaron Lu 8340091709 [libata] acpi: call ata_acpi_gtm during ata port init time
Commit 30dcf76acc mistakenly dropped
the code to get an initial gtm for the IDE channel. This caused the
following problem for Sergei:
http://marc.info/?l=linux-kernel&m=134484963618457&w=2

Fix this by adding the call back in ata_acpi_bind_host, and due to
this, the ata_ap_acpi_handle is modified accordingly.

Tested-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:29:27 -04:00
James Ralston 389cd78496 ata_piix: Add Device IDs for Intel Lynx Point-LP PCH
This patch adds the IDE-mode SATA Device IDs for the Intel Lynx Point-LP PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:27:22 -04:00
James Ralston 77b12bc9cf ahci: Add Device IDs for Intel Lynx Point-LP PCH
This patch adds the AHCI-mode SATA Device IDs for the Intel Lynx Point-LP PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:26:59 -04:00
Arnd Hannemann 1117c811a6 pata_atiixp: override cable detection on MSI E350DM-E33
The mainboard MSI E350DM-E33 is advertised with 6 SATA ports.
As it turns out, two of them seem to be driven by on-board
SATA<->PATA converters. If a disk drive is connected to one
of them kernel uses UDMA/33 mode due to cable detection:

[   34.550823] scsi4 : pata_atiixp
[   34.555517] scsi5 : pata_atiixp
[   34.555942] ata5: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xf100 irq 14
[   34.555948] ata6: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xf108 irq 15
...
[   35.040799] ata5.00: ATA-8: WDC WD20EADS-00R6B0, 01.00A01, max UDMA/133
[   35.040806] ata5.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[   35.040817] ata5.00: limited to UDMA/33 due to 40-wire cable
[   35.049166] ata5.00: configured for UDMA/33
[   35.049402] scsi 4:0:0:0: Direct-Access     ATA      WDC WD20EADS-00R 01.0 PQ: 0 ANSI: 5

This patch forces "short cable" mode on this board, as it seems clear that
the on-board SATA<->PATA "cable" is short.
With this patch the disk is configured for UDMA/100:

[    5.976756] ata5.00: ATA-8: WDC WD20EADS-00R6B0, 01.00A01, max UDMA/133
[    5.996434] ata5.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    6.024787] ata5.00: configured for UDMA/100

Testing revealed no transfer issues.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:26:51 -04:00
Rob Herring bbb4ab43f8 ahci: un-staticize ahci_dev_classify
Make ahci_dev_classify available to the ahci platform driver for custom
hard reset function.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-08-17 13:26:22 -04:00
Linus Torvalds 44d82e2963 ARM: arm-soc Marvell Orion device-tree updates
This branch contains a set of device-tree conversions for Marvell Orion
 platforms that were staged early but took a few tries to get the branch
 into a format where it was suitable for us to pick up.
 
 Given that most people working on these platforms are hobbyists with
 limited time, we were a bit more flexible with merging it even though
 it came in late.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQGrp8AAoJEIwa5zzehBx3Ou8P/3HA53sS2WotNsBjpGTPuJim
 TppOmfFU6e7TLaY2oOWjIb5tPxK96u4vvCnQFAv+9TF+ewW0yCQlkBIJga3uVE7+
 tlz5TbKBo+vQYrFgFCpEwwTHYuLgjpIK4wDs+09EkIM4cMqe6RnLK1KGo6vCAqO9
 CKE0rqEfUFjdUq2jed7HA39iwNqJrz8VGLviozvTjW2R42x9iGuy5m2DpThYrLzr
 7IYwKGMaJIatG1C/pai7KLEjdJgQl9PeDsgG0oyYY2HHeNy3o8m7tLOL3tnWXeyj
 XaniNs/YZBp4nADf2sCzXxEVjqRBPVyiw8qCHEOW5L1cfUTq//1QDI3I4kcQzffg
 VsfLPNvzFsPEMlLI1Xo5UX/8w3xQhBeoI8PtlX7coBMBLn5rJXGnjGpEnH+5SsSA
 8KXxm4hP2aOGF+injoEv5HCEiUngH4YPN4hgXwyYdJKcln2YHy8xoIVabsmx27+v
 bSfododiEvHsBNxfz0Nn5Vo5O3trubU3qe4FEBAhS3pU3GksBocokAqtxeR+BBbH
 RfBVJ09QEYx1N+c6bhGQXt7F+8sUYO0s9tA7BEkeJtiXp8OX6M8eE4mFoMpIJbsC
 SmyxsVEE9pna9x3TSy42jiGO3yxbuKEoAy2HfyU1R8yq84XBFXbkgwV02tQcgClz
 vH4VgGdQoGULqa83GImG
 =xb8w
 -----END PGP SIGNATURE-----

Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc Marvell Orion device-tree updates from Olof Johansson:
 "This contains a set of device-tree conversions for Marvell Orion
  platforms that were staged early but took a few tries to get the
  branch into a format where it was suitable for us to pick up.

  Given that most people working on these platforms are hobbyists with
  limited time, we were a bit more flexible with merging it even though
  it came in late."

* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
  ARM: Kirkwood: Replace mrvl with marvell
  ARM: Kirkwood: Describe GoFlex Net LEDs and SATA in DT.
  ARM: Kirkwood: Describe Dreamplug LEDs in DT.
  ARM: Kirkwood: Describe iConnects LEDs in DT.
  ARM: Kirkwood: Describe iConnects temperature sensor in DT.
  ARM: Kirkwood: Describe IB62x0 LEDs in DT.
  ARM: Kirkwood: Describe IB62x0 gpio-keys in DT.
  ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
  ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
  ARM: Kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
  ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
  ARM: Kirkwood: Use DT to configure SATA device.
  ARM: kirkwood: use devicetree for SPI on dreamplug
  ARM: kirkwood: Add LS-XHL and LS-CHLv2 support
  ARM: Kirkwood: Initial DTS support for Kirkwood GoFlex Net
  ARM: Kirkwood: Add basic device tree support for QNAP TS219.
  ATA: sata_mv: Add device tree support
  ARM: Orion: DTify the watchdog timer.
  ARM: Orion: Add arch support needed for I2C via DT.
  ARM: kirkwood: use devicetree for orion-spi
  ...

Conflicts:
	drivers/watchdog/orion_wdt.c
2012-08-02 11:50:24 -07:00
Viresh Kumar d14fb1e930 ata/pata_arasan: remove conditional compilation of clk code
With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in
clk.h, there is no need to have clk code enclosed in #ifdef
CONFIG_HAVE_CLK, #endif macros.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: viresh kumar <viresh.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30 17:25:12 -07:00
Andrew Lunn 97b414e119 ATA: sata_mv: Add device tree support
Add support for instantiating this driver from device tree, and add
the necassary DT information to the kirkwood.dtsi file.

This is based on previous work by Michael Walle and Jason Cooper.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Josh Coombs <josh.coombs@gmail.com>
2012-07-27 16:48:45 +02:00
Jeff Garzik 641589bff7 [libata] pata_cmd64x: whitespace cleanup
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 16:07:40 -04:00
Stephen Rothwell 354b2eac38 libata-acpi: fix up for acpi_pm_device_sleep_state API
After merging the libata tree, today's [2012-07-01] linux-next build (x86_64
allmodconfig) failed like this:

drivers/ata/libata-acpi.c: In function 'ata_acpi_set_state':
drivers/ata/libata-acpi.c:872:5: error: too few arguments to function 'acpi_pm_device_sleep_state'
include/acpi/acpi_bus.h:418:5: note: declared here

Caused by commit 3bd46600a7 ("libata-acpi: add ata port runtime D3Cold
support") from the libata tree interacting with commit ee85f54371
("ACPI/PM: specify lowest allowed state for device sleep state") from the
pci tree.

This patch adds ACPI_STATE_D3 as the new third parameter to
acpi_pm_device_sleep_state()

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 16:02:19 -04:00
Jeff Garzik 8407884dd9 Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream
Two bits were appended to the end of the bitfield
list in struct scsi_device.  Resolve that conflict
by including both bits.

Conflicts:
	include/scsi/scsi_device.h
2012-07-25 15:58:48 -04:00
Thang Q. Nguyen dc7f71f486 sata_dwc_460ex: device tree may specify dma_channel
Only channel 0 is currently support and the driver code is fixed on
channel 0. This patch lets device node specifying dma-channel in case
it is not 0. If no dma-channel property is specified, channel 0 is
used as default.

Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:54:21 -04:00
Jeffrin Jose facb8fa6c7 ahci, trivial: fixed coding style issues related to braces
Fixed coding style issues related to braces found
by checkpatch.pl in drivers/ata/ahci.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:50:20 -04:00
Shiraz Hashim 18c25ff457 ahci_platform: add hibernation callbacks
Use existing suspend, resume implementation for hibernation callbacks.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:31:08 -04:00
H Hartley Sweeten 604284071a libata-eh.c: local functions should not be exposed globally
The function ata_ering_clear_cb is only referenced in this file and
should be marked static to prevent it from being exposed globally.

This quiets the sparse warning:

warning: symbol 'ata_ering_clear_cb' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:17:32 -04:00
H Hartley Sweeten b0e73af78a libata-transport.c: local functions should not be exposed globally
Functions not referenced outside of a source file should be marked
static to prevent it from being exposed globally.

This quiets the sparse warnings:

warning: symbol 'ata_is_port' was not declared. Should it be static?
warning: symbol 'ata_is_link' was not declared. Should it be static?
warning: symbol 'ata_is_ata_dev' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:14:55 -04:00
Thang Q. Nguyen 3a8b788f61 sata_dwc_460ex: support hardreset
The hardreset operation is currently not supported. This causes
sometime the SATA driver does cause kernel crash because of
none-determined state.a This patch will fix the issue.

Signed-off-by: Thang Q. Nguyen <tqnguyen@apm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:13:53 -04:00
Axel Lin 2fc75da0c5 ata: use module_pci_driver
This patch converts the drivers in drivers/ata/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Cc: Mark Lord <kernel@teksavvy.com>
Cc: Jeremy Higdon <jeremy@sgi.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:12:11 -04:00
Julia Lawall b08f5bc404 drivers/ata/pata_pcmcia.c: adjust suspicious bit operation
IO_DATA_PATH_WIDTH_8 is 0, so a bit-and with it is always false.  The
value IO_DATA_PATH_WIDTH covers the bits of the IO_DATA_PATH constants, so
first pick those bits and then make the test using !=.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-07-25 15:06:20 -04:00