Commit Graph

697 Commits (fccb6ea5c240b9f29baa55448488fd6aee49f5a5)

Author SHA1 Message Date
Tejun Heo fccb6ea5c2 libata: clear HOTPLUG flag after a reset
ATA_EHI_HOTPLUGGED is a hint for reset functions indicating the the
port might have gone through hotplug/unplug just before entering EH.
Reset functions modify their behaviors a bit to handle the situation
better - e.g. using longer debouncing delay.

Currently, once HOTPLUG is set, it isn't cleared till the end of EH.
This is unnecessary and makes EH take longer.  Clear the HOTPLUGGED
flag after a reset try (successful or not).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:26:25 -04:00
Tejun Heo 1ae463171c libata: improve SCSI scan failure handling
SCSI scan may fail due to memory allocation failure even if EH is not
in progress.  Due to use of GFP_ATOMIC in SCSI scan path, allocation
failure isn't too rare especially while probing multiple devices at
once which is the case when a bunch of devices are connected to PMP.

This patch moves SCSI scan failure detetion logic from
ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous
scan behavior.  The synchronous path sleeps briefly and repeats SCSI
scan if some devices aren't attached properly.  It contains robust
retry loop to minimize the chance of device misdetection during boot
and falls back to async retry if everything fails.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:26:25 -04:00
Tejun Heo f1545154a5 libata: quickly trigger SATA SPD down after debouncing failed
Debouncing failure is a good indicator of basic link problem.  Use
-EPIPE to indicate debouncing failure and make ata_eh_reset() invoke
sata_down_spd_limit() if the error occurs during reset.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:19:06 -04:00
Tejun Heo 008a78961e libata: improve SATA PHY speed down logic
sata_down_spd_limit() first reads the current SPD from SStatus and
limit the speed to the lower one of one below the current limit or one
below the current SPD in SStatus.  SPD may not be accessible or valid
when SPD down is requested making sata_down_spd_limit() fail when it's
most needed.

This patch makes the current SPD cached after each successful reset
and forces GEN I speed (1.5Gbps) if neither of SStatus or the cached
value is valid, so sata_down_spd_limit() is now guaranteed to lower
the speed limit if lower speed is available.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:19:05 -04:00
su henry badc234157 The SATA controller device ID is different according to
the onchip SATA type set in the system BIOS:
Device                              Device ID
SATA in IDE mode             0x4390
SATA in AHCI mode           0x4391
SATA in non-raid5 driver     0x4392
SATA in raid5 driver           0x4393

Although the device ID is different, they use the same AHCI driver
.The attached file is the patch for adding these device
IDs for ATI SB700.

Signed-off-by: henry.su.ati@gmail.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:07:46 -04:00
Tejun Heo 203ef6c456 ahci: implement SCR_NOTIFICATION r/w
Make ahci_scr_read/write() handle SCR_NOTIFICATION if the controller
supports it.  Also, print "sntf" in the cap line if supported.

While at it, convert eight space into a tab in ahci_print_info().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:11 -04:00
Tejun Heo 274c1fde5c ahci: make NO_NCQ handling more consistent
ahci_save_initial_config() is responsible for reading, screening the
host CAP register and storing the modified result into hpriv->cap for
the rest of the driver.  Move ATA_FLAG_NO_NCQ handling into
ahci_save_initial_config().  It's more consistent this way and the
rest of the driver can always refer to hpriv->cap to determine
configured capability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:11 -04:00
Tejun Heo da3dbb17a0 libata: make ->scr_read/write callbacks return error code
Convert ->scr_read/write callbacks to return error code to better
indicate failure.  This will help handling of SCR_NOTIFICATION.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:11 -04:00
Tejun Heo 5335b72906 libata: implement AC_ERR_NCQ
When an NCQ command fails, all commands in flight are aborted and the
offending one is reported using log page 10h.  Depending on controller
characteristics and LLD implementation, all commands may appear as
having a device error due to shared TF status making it hard to
determine what's actually going on.

This patch adds AC_ERR_NCQ, marks the command reported by log page 10h
with it and print extra "<F>" after the error report for the command
to help distinguishing the offending command.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:11 -04:00
Tejun Heo b64bbc39f2 libata: improve EH report formatting
Requiring LLDs to format multiple error description messages properly
doesn't work too well.  Help LLDs a bit by making ata_ehi_push_desc()
insert ", " on each invocation.  __ata_ehi_push_desc() is the raw
version without the automatic separator.

While at it, make ehi_desc interface proper functions instead of
macros.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:11 -04:00
Tejun Heo 975530e8a3 sata_sil24: separate out sil24_do_softreset()
Separate out sil24_do_softreset() which takes @pmp as its last
argument.  This will be used to implement sil24_pmp_softreset().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo 37b99cba8c sata_sil24: separate out sil24_exec_polled_cmd()
Separate out sil24_exec_polled_cmd() from sil24_softreset().  This
will be used to implement sil24_pmp_read/write().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo e59f0dad33 sata_sil24: replace sil24_update_tf() with sil24_read_tf()
Replace sil24_update_tf() to sil24_read_tf() which reads TF into
passed int result TF argument and can read TFs of PMP links.  This
will be used by PMP support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo a9cf5e8581 ahci: separate out ahci_do_softreset()
Separate out ahci_do_softreset() which takes @pmp as its last
argument.  This will be used to implement ahci_pmp_softreset().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo 91c4a2e092 ahci: separate out ahci_exec_polled_cmd()
Separate out ahci_exec_polled_cmd() from ahci_softreset().  This will
be used to implement ahci_pmp_read/write().  ahci_exec_polled_cmd()
performs reset_engine before returning if the command fails (times
out).  This is to improve robustness.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo d2e75dfffb ahci: separate out ahci_kick_engine()
Separate out stop_engine - CLO - start_engine sequence from
ahci_softreset() and ahci_clo() into ahci_reset_engine() and use it in
ahci_softreset() and ahci_post_internal_cmd().  The function will also
be used to prepare for and clean up after PMP register access
commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo 2cbb79ebbd ahci: use deadline instead of fixed timeout for 1st FIS for SRST
Use deadline instead of fixed timeout for 1st FIS for SRST to improve
robustness of SRST.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Tejun Heo 9977126c4b libata: add @is_cmd to ata_tf_to_fis()
Add @is_cmd to ata_tf_to_fis().  This controls bit 7 of the second
byte which tells the device whether this H2D FIS is for a command or
not.  This cleans up ahci a bit and will be used by PMP.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 08:02:10 -04:00
Petr Vandrovec fe36cb53cf [libata] Fix reported task file values in sense data
ata_tf_read was setting HOB bit when lba48 command was submitted, but
was not clearing it before reading "normal" data.  As it is only place
which sets HOB bit in control register, and register reads should not
be affected by other bits, let's just clear it when we are done with
reading upper bytes so non-48bit commands do not have to touch ctl
at all.

pata_scc suffered from same problem...

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:44:44 -04:00
Dave Jones f3a03b0934 Correct comment in libata-sff.c
The filename in the file header is incorrect.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:16:24 -04:00
Akira Iguchi dcd0344775 pata_scc.c: small fixes (Workaround for errata A308)
This patch fixes some issues of the previous patch:
- Use mode_filter() hook to limit ATAPI UDMA mode
- "data loss" warning message
- handling of udma_mask

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:16:24 -04:00
Alexey Dobriyan 028a259633 ahci.c: fix CONFIG_PM=n compilation
Commit df69c9c543 moved only prototype of
out of CONFIG_PM. Move function out as well. Box seems to boot fine.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:16:24 -04:00
Tejun Heo 3fb6589cea libata: add ST9160821AS 3.CLF to NONCQ blacklist
Yay, the first one from Seagate.  3.ALC firmware is okay.  This was
reported by Sam Freed on bugzilla bug 8759.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Sam Freed <sam@freed.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:16:24 -04:00
Magnus Damm 83b6839ec3 pata_platform: Fix NULL pointer dereference
pata_platform: Fix NULL pointer dereference

pata_platform currently dereferences a NULL pointer in pata_platform_probe()
if pdev->dev.platform_data is set to NULL. This breakage was most likely
introduced by commit 5f45bc5097.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 07:16:24 -04:00
Jeff Garzik 0ea9e179f4 [libata] sata_mv: minor cleanups
* trim trailing whitespace
* document some flags, registers, and register bits
* fix locking around EDMA on/off and configuration
* continue replacing "constant OP var" with "var OP constant"
* use new pci_try_set_mwi()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 05:58:25 -04:00
Jeff Garzik 6c1153e00a [libata] sata_mv: Micro-optimization and cleanups
* Micro-optimization in the EDMA interrupt handling code
* s/EDMA_ERR_CRBQ_PAR/EDMA_ERR_CRQB_PAR/
* Document EDMA Error Interrupt Cause register bits

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-20 05:58:23 -04:00
Marcin Juszkiewicz 363f7e428d PCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia
One card submitted by user.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20 01:11:53 +02:00
Jeff Garzik ea8b4db97a [libata] sata_mv: use pci_try_set_mwi()
Because sometimes in life, it's ok to fail.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17 16:18:00 -04:00
Linus Torvalds 21ba0f88ae Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
  PCI: Only build PCI syscalls on architectures that want them
  PCI: limit pci_get_bus_and_slot to domain 0
  PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
  PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
  PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
  PCI: hotplug: pciehp: wait for 1 second after power off slot
  PCI: pci_set_power_state(): check for PM capabilities earlier
  PCI: cpci_hotplug: Convert to use the kthread API
  PCI: add pci_try_set_mwi
  PCI: pcie: remove SPIN_LOCK_UNLOCKED
  PCI: ROUND_UP macro cleanup in drivers/pci
  PCI: remove pci_dac_dma_... APIs
  PCI: pci-x-pci-express-read-control-interfaces cleanups
  PCI: Fix typo in include/linux/pci.h
  PCI: pci_ids, remove double or more empty lines
  PCI: pci_ids, add atheros and 3com_2 vendors
  PCI: pci_ids, reorder some entries
  PCI: i386: traps, change VENDOR to DEVICE
  PCI: ATM: lanai, change VENDOR to DEVICE
  PCI: Change all drivers to use pci_device->revision
  ...
2007-07-12 13:40:57 -07:00
Albert Lee c6e54a5781 libata: remove irq_on from ata_bus_reset() and ata_std_postreset()
It seems irq_on() in ata_bus_reset() and ata_std_postreset()
are leftover of the EDD reset. Remove them.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 16:12:15 -04:00
Tejun Heo e04b3b9d03 ata_piix: kill incorrect invalid map value warning
The last two slots of MAP 00b of ich6m was incorrectly marked as
reserved.  This is left over from converting the entry to allow 00b.
This causes no real problem.  It only makes the driver print annoying
warning message.  Fix it.

[patch also proferred by Pierre Tardy at the end of 2006 -jg]

Signed-off-by: Tejun Heo <htejun@gmail.com>
--
 drivers/ata/ata_piix.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 16:09:38 -04:00
Chuck Ebbert e8361fc410 libata: add another Maxtor drive with broken NCQ to the list
Add another Maxtor 6B200M0 drive with broken NCQ to the list.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 16:09:38 -04:00
Jeff Garzik ee9ccdf701 [libata] sata_mv: Fix and clean up per-chip-generation tests
Due to a mistake in test logic, Gen-IIE chips were being treated as
Gen-II chips in some cases.  Fix this, and in the process, clean up
IS_50XX/IS_60XX tests to the more uniform IS_GEN_{I,II,IIE} tests.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 15:51:22 -04:00
Jeff Garzik bdd4dddee3 [libata] sata_mv: Convert to new exception handling (EH) infrastructure
This makes hotplug, NCQ, etc. possible, and removes one of the few
remaining old-EH drivers.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 14:34:26 -04:00
Jeff Garzik 4537deb5e9 [libata] sata_mv: minor bug fixes, enhancements, and cleanups (prep for new EH)
* Continue replacing "CONSTANT & var" tests with "var & CONSTANT"
* Don't clear EDMA_CFG_NCQ_GO_ON_ERR on Gen-IIE, where that bit does
  not exist
* Set I/O Id field in descriptor, where present.  Appears to work
  fine on all versions, even though queueing is still disabled.
* call pci_set_mwi(), to (a) make sure cacheline size is set properly,
  and (b) enable MWI transactions
* Remove never-used handling of coalescing interrupt bits (these events
  are always masked)

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-12 14:30:19 -04:00
Randy Dunlap 694625c0b3 PCI: add pci_try_set_mwi
As suggested by Andrew, add pci_try_set_mwi(), which does not require
return-value checking.

- add pci_try_set_mwi() without __must_check
- make it return 0 on success, errno if the "try" failed or error
- review callers

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:02:11 -07:00
Auke Kok 44c10138fd PCI: Change all drivers to use pci_device->revision
Instead of all drivers reading pci config space to get the revision
ID, they can now use the pci_device->revision member.

This exposes some issues where drivers where reading a word or a dword
for the revision number, and adding useless error-handling around the
read. Some drivers even just read it for no purpose of all.

In devices where the revision ID is being copied over and used in what
appears to be the equivalent of hotpath, I have left the copy code
and the cached copy as not to influence the driver's performance.

Compile tested with make all{yes,mod}config on x86_64 and i386.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:02:10 -07:00
Jeff Garzik c5d3e45a22 [libata] sata_mv: Minor cleanups and renaming, preparing for new EH & NCQ
Minor cleanups, new definitions, and code movement, preparing for
upcoming new-EH and NCQ changes.  This commit shoult not change behavior
at all.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-11 18:30:50 -04:00
Tejun Heo fee7ca72d3 libata-link: separate out ata_eh_handle_dev_fail()
Separate out ata_eh_handle_dev_fail() from ata_eh_recover().  This is
in preparation of ata_link and PMP support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:46:03 -04:00
Jeff Garzik 790956e7bb pata_hpt3x3: fix DMA Kconfig option to actually have a hope of working
The hook that set DMA mode was accidentally deleted in the original patch.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:36:13 -04:00
Prarit Bhargava 2f8d90ab79 Add Hitachi HDS7250SASUN500G 0621KTAWSD to NCQ blacklist
Add Hitachi HDS7250SASUN500G 0621KTAWSD to list of devices with broken NCQ.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:30:33 -04:00
Akira Iguchi fae57d3483 pata_scc.c: Workaround for errata A308
Workaround for errata A308: turn down the UDMA mode and retry
the DMA command when the data lost condition is detected.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:30:33 -04:00
Tejun Heo a520f26146 libata: add FUJITSU MHV2080BH to NCQ blacklist
Please warmly welcome the first member from FUJITSU to the prestigious
NCQ spurious completion club.

This is reported by Serge Van Thillo in bugzilla bug 8730.

  http://bugzilla.kernel.org/show_bug.cgi?id=8730

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Serge van Thillo <nulleke@hotmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:30:33 -04:00
Alan Cox 66e7da4e34 pata_hpt3x3: major reworking and testing
The HPT343/345 (aka 363) is a bit of a warped device.  For many setups you
need to access the other registers via BAR4 offsets.  PIO is now rock
solid, DMA isn't.  Unfortunately the drivers/ide hpt34x driver is
completely broken so doesn't help further debug.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:30:33 -04:00
Tejun Heo 75683fe715 libata: clean up horkage handling
Horkage handling had the following problems.

* dev->horkage was positioned after ATA_DEVICE_CLEAR_OFFSET, so it was
  cleared before the device is configured.  This broke
  HORKAGE_DIAGNOSTIC.

* Some used dev->horkage while others called ata_device_blacklisted()
  directly.  This was at best confusing.

This patch moves dev->horkage right after dev->flags and set the field
according to the blacklist during device configuration.  All users
test against dev->horkage.  ata_device_blacklisted() now has only one
user, make it static.  While at it, rename it to ata_dev_blacklisted()
for consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:30:33 -04:00
Tejun Heo 39ce712806 libata: quirk IOMEGA ZIP 250 ATAPI FLOPPY
The Zip 250 which chokes on MWDMA SET_XFERMODE sometimes have "Floppy"
appeneded to its model number.  Quirk it too.

  http://bugzilla.kernel.org/show_bug.cgi?id=8563

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Hans de Bruin <bruinjm@xs4all.nl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:27:09 -04:00
Tejun Heo d583bc1881 libata: simplify PCI legacy SFF host handling
With PCI resource fix up for legacy hosts.  We can use the same code
path to allocate IO resources and initialize host for both legacy and
native SFF hosts.  Only IRQ requesting needs to be different.

Rename ata_pci_*_native_host() to ata_pci_*_sff_host(), kill all
legacy specific functions and use the renamed functions instead.  This
simplifies code a lot.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:27:09 -04:00
Domen Puncer 35142ddbf7 pata_mpc52xx: suspend/resume support
Implement suspend and resume routines for mpc52xx ata driver.
Tested on Lite5200b with deep-sleep and low-power (not yet in-tree)
modes.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:14:20 -04:00
Mikael Pettersson a77720ad0a sata_promise: SATA hotplug support, take 2
This patch enables hotplugging of SATA devices in the
sata_promise driver. It's been tested successfully on
both first- and second-generation Promise SATA chips:
SATA150 TX2plus, SATAII150 TX2plus, SATAII150 TX4,
SATA300 TX2plus, and SATA300 TX4.

The only quirk I've seen is that hotplugging (insertion)
on the first-generation SATA150 TX2plus requires a lengthier
EH sequence than on the second-generation chips.
On the second-generation chips a simple soft reset seems
to suffice, but on the first-generation chip there's a
"port is slow to respond" after the initial soft reset,
after which libata issues a hard reset, and then the
device is recognised.

The hotplug checks are high up in the interrupt handling
path, not deep down in error_intr as in ahci/sata_sil24.
That's because the chip doesn't signal hotplug status changes
in the per-port status register: instead a global register
contains hotplug control and status flags for all ports.
I considered following the ahci/sata_sil24 structure, but
that would have required non-trivial changes to the interrupt
handling path, so I chose to keep the hotplug changes simple
and unobtrusive.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--
This patch depends on the "sata_promise: cleanups" patch.

Changes since the previous version (posted June 19):
- Correct pdc_interrupt() to increment 'handled' also in
  the hotplug case. This prevents IRQ_NONE from being
  returned when an interrupt only has hotplug events to
  handle, which could confuse the kernel's IRQ machinery.
- Added testing on the SATAII150 TX4.

 drivers/ata/sata_promise.c |   41 ++++++++++++++++++++++++++++++++++++-----
 1 files changed, 36 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:14:19 -04:00
Alan Cox 15ce09432a pata_sis: FIFO whack
If you are using a SiS controller and the BIOS didn't set it up then the
FIFO may be left active when we try and set up the CD. Not convinced this
matters but I'd prefer to be safe

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10 21:14:19 -04:00