summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-linus' of ↵Linus Torvalds2010-06-045-8/+48
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: implement on-demand HPA unlocking libata: use the enlarged capacity after late HPA unlock SCSI: implement sd_unlock_native_capacity() libata-sff: trivial corrections to Kconfig help text sata_nv: don't diddle with nIEN on mcp55 sata_via: magic vt6421 fix for transmission problems w/ WD drives
| * libata: implement on-demand HPA unlockingTejun Heo2010-06-022-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement ata_scsi_unlock_native_capacity() which will be called through SCSI layer when block layer notices that partitions on a device extend beyond the end of the device. It requests EH to unlock HPA, waits for completion and returns the current device capacity. This allows libata to unlock HPA on demand instead of having to decide whether to unlock upfront. Unlocking on demand is safer than unlocking by upfront because some BIOSes write private data to the area beyond HPA limit. This was suggested by Ben Hutchings. Signed-off-by: Tejun Heo <tj@kernel.org> Suggested-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * libata: use the enlarged capacity after late HPA unlockTejun Heo2010-06-021-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | After late HPA unlock, libata kept using the original capacity ignoring the new larger native capacity. Enlarging device on the fly doesn't cause any harm. Use the larger native capacity instead. This will enable on-demand HPA unlocking. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * libata-sff: trivial corrections to Kconfig help textStefan Richter2010-06-021-3/+3
| | | | | | | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_nv: don't diddle with nIEN on mcp55Tejun Heo2010-06-021-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On mcp55, nIEN gets stuck once set and liteon blueray rom iHOS104-08 violates ATA specification and fails to set I on D2H Reg FIS if nIEN is set when the command was issued. When the other party is following the spec, both devices can work fine but when the two flaws are put together, they can't talk to each other. mcp55 has its own IRQ masking mechanism and there's no reason to mess with nIEN in the first place. Fix it by dropping nIEN diddling from nv_mcp55_freeze/thaw(). This was originally reported by Cengiz. Although Cengiz hasn't verified the fix yet, I could reproduce this problem and verfiy the fix. Even if Cengiz is experiencing different or additional problems, this patch is needed. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Cengiz Günay <cgunay@emory.edu> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * sata_via: magic vt6421 fix for transmission problems w/ WD drivesTejun Heo2010-06-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vt6421 has problems talking to recent WD drives. It causes a lot of transmission errors while high bandwidth transfer as reported in the following bugzilla entry. https://bugzilla.kernel.org/show_bug.cgi?id=15173 Joseph Chan provided the following fix. I don't have any idea what it does but I can verify the issue is gone with the patch applied. Signed-off-by: Tejun Heo <tj@kernel.org> Originally-from: Joseph Chan <JosephChan@via.com.tw> Reported-by: Jorrit Tijben <sjorrit@gmail.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | powerpc/macio: Fix probing of macio devices by using the right of match tableBenjamin Herrenschmidt2010-06-021-5/+5
|/ | | | | | | | | | | | | | Grant patches added an of mach table to struct device_driver. However, while he changed the macio device code to use that, he left the match table pointer in struct macio_driver and didn't update drivers to use the "new" one, thus breaking the probing. This completes the change by moving all drivers to setup the "new" one, removing all traces of the old one, and while at it (since it changes the exact same locations), I also remove two other duplicates from struct driver which are the name and owner fields. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* libata: implement dump_id force paramTejun Heo2010-05-261-0/+9
| | | | | | | | | Add dump_id libata.force parameter. If specified, libata dumps full IDENTIFY data during device configuration. This is to aid debugging. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Larry Baker <baker@usgs.gov> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: disable ATAPI AN by defaultTejun Heo2010-05-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | There are ATAPI devices which raise AN when hit by commands issued by open(). This leads to infinite loop of AN -> MEDIA_CHANGE uevent -> udev open() to check media -> AN. Both ACS and SerialATA standards don't define in which case ATAPI devices are supposed to raise or not raise AN. They both list media insertion event as a possible use case for ATAPI ANs but there is no clear description of what constitutes such events. As such, it seems a bit too naive to export ANs directly to userland as MEDIA_CHANGE events without further verification (which should behave similarly to windows as it apparently is the only thing that some hardware vendors are testing against). This patch adds libata.atapi_an module parameter and disables ATAPI AN by default for now. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Nick Bowler <nbowler@elliptictech.com> Cc: David Zeuthen <david@fubar.dk> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata-sff: make BMDMA optionalTejun Heo2010-05-263-280/+325
| | | | | | | | | | | | | | | | | | | | | Make BMDMA optional depending on new config variable CONFIG_ATA_BMDMA. In Kconfig, drivers are grouped into five groups - non-SFF native, SFF w/ custom DMA interface, SFF w/ BMDMA, PIO-only SFF, and generic fallback / legacy ones. Kconfig and Makefile are reorganized according to the groups and ordered alphabetically inside each group. ata_ioports.bmdma_addr and ata_port.bmdma_prd[_dma] are put into CONFIG_ATA_BMDMA, as are all bmdma related ops, variables and functions. This increase the binary size slightly when BMDMA is enabled but on both native-only and PIO-only configurations the size is slightly reduced. Either way, the size difference is insignificant. This change is more meaningful to signify the separation between SFF and BMDMA and as a tool to verify the separation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata-sff: kill dummy BMDMA ops from sata_qstor and pata_octeon_cfTejun Heo2010-05-262-32/+0Star
| | | | | | | | | Now that SFF and BMDMA are completely separate, sata_qstor and pata_octeon_cf which inherit from ata_sff_port_ops don't need to worry about BMDMA ops being called. Kill the dummy BMDMA ops. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata-sff: separate out BMDMA initTejun Heo2010-05-2640-66/+159
| | | | | | | | | 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 <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata-sff: separate out BMDMA irq handlerTejun Heo2010-05-2621-99/+151
| | | | | | | | | | | | | | | | | | 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 <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata-sff: ata_sff_irq_clear() is BMDMA specificTejun Heo2010-05-266-36/+43
| | | | | | | | | | | | | ata_sff_irq_clear() is BMDMA specific. Rename it to ata_bmdma_irq_clear(), move it to ata_bmdma_port_ops and make ->sff_irq_clear() optional. Note: ata_bmdma_irq_clear() is actually only needed by ata_piix and possibly by sata_sil. This should be moved to respective low level drivers later. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sata_mv: drop unncessary EH callback resettingTejun Heo2010-05-261-2/+0Star
| | | | | | | | | Now that BMDMA EH ops are separated out from SFF ops, mv5_ops doesn't have to explicitly reset ->error_handler() and ->post_internal_cmd(). Drop them. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely2010-05-2254-3866/+4144
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * Merge branch 'upstream-linus' of ↵Linus Torvalds2010-05-2053-3826/+4126
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (49 commits) libata-sff: separate out BMDMA qc_issue libata-sff: prd is BMDMA specific libata-sff: ata_sff_[dumb_]qc_prep are BMDMA specific libata-sff: separate out BMDMA EH libata-sff: port_task is SFF specific libata-sff: ap->[last_]ctl are SFF specific libata-sff: rename ap->ops->drain_fifo() to sff_drain_fifo() libata-sff: introduce ata_sff_init/exit() and ata_sff_port_init() libata-sff: clean up BMDMA initialization libata-sff: clean up inheritance in several drivers libata-sff: reorder SFF/BMDMA functions sata_inic162x: kill PORT_PRD_ADDR initialization libata: kill ATA_FLAG_DISABLED libata-sff: kill unused prototype and make ata_dev_select() static libata-sff: update bmdma host bus error handling sata_mv: remove unnecessary initialization sata_inic162x: inic162x is not dependent on CONFIG_ATA_SFF pata_sch: use ata_pci_sff_init_one() pata_sil680: Do our own exec_command posting libata: Remove excess delay in the tf_load path ...
| | * libata-sff: separate out BMDMA qc_issueTejun Heo2010-05-1910-57/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate out ata_bmdma_qc_issue() from ata_sff_qc_issue() such that ata_sff_qc_issue() only deals with non-BMDMA SFF protocols (PIO and nodata) while ata_bmdma_qc_issue() deals with the BMDMA protocols and uses ata_sff_qc_issue() for non-DMA commands. All the users are updated accordingly. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: prd is BMDMA specificTejun Heo2010-05-197-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | struct ata_prd and ap->prd are BMDMA specific. Add bmdma_ prefix to them and move them inside CONFIG_ATA_SFF. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: ata_sff_[dumb_]qc_prep are BMDMA specificTejun Heo2010-05-198-156/+154Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both qc_prep functions deal only with BMDMA PRD setup and PIO only SFF drivers don't need them. Rename to ata_bmdma_[dumb_]qc_prep() and relocate. All usages are renamed except for pdc_adma and sata_qstor. Those two drivers are not BMDMA drivers and don't need to call BMDMA qc_prep functions. Calls to ata_sff_qc_prep() in the two drivers are removed. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: separate out BMDMA EHTejun Heo2010-05-199-87/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of error handling logic in ata_sff_error_handler() and all of ata_sff_post_internal_cmd() are for BMDMA. Create ata_bmdma_error_handler() and ata_bmdma_post_internal_cmd() and move BMDMA part into those. While at it, change DMA protocol check to ata_is_dma(), fix post_internal_cmd to call ap->ops->bmdma_stop instead of directly calling ata_bmdma_stop() and open code hardreset selection so that ata_std_error_handler() doesn't have to know about sff hardreset. As these two functions are BMDMA specific, there's no reason to check for bmdma_addr before calling bmdma methods if the protocol of the failed command is DMA. sata_mv and pata_mpc52xx now don't need to set .post_internal_cmd to ATA_OP_NULL and pata_icside and sata_qstor don't need to set it to their bmdma_stop routines. ata_sff_post_internal_cmd() becomes noop and is removed. This fixes p3 described in clean-up-BMDMA-initialization patch. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: port_task is SFF specificTejun Heo2010-05-195-91/+61Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port_task is tightly bound to the standard SFF PIO HSM implementation. Using it for any other purpose would be error-prone and there's no such user and if some drivers need such feature, it would be much better off using its own. Move it inside CONFIG_ATA_SFF and rename it to sff_pio_task. The only function which is exposed to the core layer is ata_sff_flush_pio_task() which is renamed from ata_port_flush_task() and now also takes care of resetting hsm_task_state to HSM_ST_IDLE, which is possible as it's now specific to PIO HSM. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: ap->[last_]ctl are SFF specificTejun Heo2010-05-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | ap->[last_]ctl are specific to SFF controllers. Put them inside CONFIG_ATA_SFF and move initialization into ata_sff_port_init(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: rename ap->ops->drain_fifo() to sff_drain_fifo()Tejun Heo2010-05-192-4/+4
| | | | | | | | | | | | | | | | | | | | | ->drain_fifo() is SFF specific. Rename and relocate it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: introduce ata_sff_init/exit() and ata_sff_port_init()Tejun Heo2010-05-193-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation of proper SFF/BMDMA separation, introduce ata_sff_init/exit() and ata_sff_port_init(). These functions currently don't do anything. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: clean up BMDMA initializationTejun Heo2010-05-1926-165/+113Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When BMDMA initialization failed or BMDMA was not available for whatever reason, bmdma_addr was left at zero and used as an indication that BMDMA shouldn't be used. This leads to the following problems. p1. For BMDMA drivers which don't use traditional BMDMA register, ata_bmdma_mode_filter() incorrectly inhibits DMA modes. Those drivers either have to inherit from ata_sff_port_ops or clear ->mode_filter explicitly. p2. non-BMDMA drivers call into BMDMA PRD table allocation. It doesn't actually allocate PRD table if bmdma_addr is not initialized but is still confusing. p3. For BMDMA drivers which don't use traditional BMDMA register, some methods might not be invoked as expected (e.g. bmdma_stop from ata_sff_post_internal_cmd()). p4. SFF drivers w/ custom DMA interface implement noop BMDMA ops worrying libata core might call into one of them. These problems are caused by the muddy line between SFF and BMDMA and the assumption that all BMDMA controllers initialize bmdma_addr. This patch fixes p1 and p2 by removing the bmdma_addr assumption and moving prd allocation to BMDMA port start. Later patches will fix the remaining issues. This patch improves BMDMA initialization such that * When BMDMA register initialization fails, falls back to PIO instead of failing. ata_pci_bmdma_init() never fails now. * When ata_pci_bmdma_init() falls back to PIO, it clears ap->mwdma_mask and udma_mask instead of depending on ata_bmdma_mode_filter(). This makes ata_bmdma_mode_filter() unnecessary thus resolving p1. * ata_port_start() which actually is BMDMA specific is moved to ata_bmdma_port_start(). ata_port_start() and ata_sff_port_start() are killed. * ata_sff_port_start32() is moved and renamed to ata_bmdma_port_start32(). Drivers which no longer call into PRD table allocation are... pdc_adma, sata_inic162x, sata_qstor, sata_sx4, pata_cmd640 and all drivers which inherit from ata_sff_port_ops. pata_icside sets ->port_start to ATA_OP_NULL as it doesn't need PRD but is a BMDMA controller and doesn't have custom port_start like other such controllers. Note that with the previous patch which makes all and only BMDMA drivers inherit from ata_bmdma_port_ops, this change doesn't break drivers which need PRD table. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: clean up inheritance in several driversTejun Heo2010-05-195-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. pata_cmd640 is PIO only. Inherit from sff. 2. pata_macio is BMDMA. Inherit from bmdma and drop explicit bmdma_mode_filter() setting. 3. In sata_mv, unlike mv5, mv6 is BMDMA. Inherit from bmdma and don't clear ->post_internal_cmd(). 4. bf54x and icside are quasi-BMDMA controllers which don't use the standard BMDMA registers so they don't initialize bmdma_addr and inherit from sff to avoid the default mode_filter which disables DMA modes if bmdma_addr is not initialized. For 2 and 3, this patch makes the drivers explicitly specify ->mode_filter to ATA_OP_NULL while inheriting from ata_bmdma_port_ops. These will be removed by the next patch. This patch makes all and only BMDMA drivers inherit from ata_bmdma_port_ops to ease further SFF/BMDMA separation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: reorder SFF/BMDMA functionsTejun Heo2010-05-181-222/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reorder functions such that SFF and BMDMA functions are grouped. While at it, s/BMDMA/SFF in a few comments where it actually meant SFF. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * sata_inic162x: kill PORT_PRD_ADDR initializationTejun Heo2010-05-181-2/+1Star
| | | | | | | | | | | | | | | | | | | | | sata_inic162x doesn't use PRD anymore. No need to initialize it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: kill ATA_FLAG_DISABLEDTejun Heo2010-05-1815-346/+205Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATA_FLAG_DISABLED is only used by drivers which don't use ->error_handler framework and is largely broken. Its only meaningful function is to make irq handlers skip processing if the flag is set, which is largely useless and even harmful as it makes those ports more likely to cause IRQ storms. Kill ATA_FLAG_DISABLED and makes the callers disable attached devices instead. ata_port_probe() and ata_port_disable() which manipulate the flag are also killed. This simplifies condition check in IRQ handlers. While updating IRQ handlers, remove ap NULL check as libata guarantees consecutive port allocation (unoccupied ports are initialized with dummies) and long-obsolete ATA_QCFLAG_ACTIVE check (checked by ata_qc_from_tag()). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: kill unused prototype and make ata_dev_select() staticTejun Heo2010-05-152-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ata_irq_on() was renamed to ata_sff_irq_on() and exported a while ago but prototype for the original function lingered in drivers/ata/libata.h. Kill it. Also, ata_dev_select() is only used inside drivers/ata/libata-sff.c. Make it static. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: update bmdma host bus error handlingTejun Heo2010-05-151-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clearing IRQ from ata_sff_error_handler() is necessary only when the port is gonna be thawed before performing EH actions and some controllers don't like being accessed after certain failure modes until they're reset. Clear IRQ iff the port is being thawed. * When the controller succesfully indicated bus error, the point of thawing doesn't matter. Move thawing inside bmdma part of EH. This is a bit ugly but will ease code reorganization later. * Remove the unneeded ata_sff_sync(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * sata_mv: remove unnecessary initializationTejun Heo2010-05-151-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sata_mv initializes unused ioports fields including bmdma_addr to NULL. As later changes will conditionalize BMDMA, this makes sata_mv unnecessarily dependent on BMDMA. Remove the unnecessary initialization. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * sata_inic162x: inic162x is not dependent on CONFIG_ATA_SFFTejun Heo2010-05-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | sata_inic162x no longer uses SFF interface. Move it out of CONFIG_ATA_SFF. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * pata_sch: use ata_pci_sff_init_one()Tejun Heo2010-05-151-11/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | pata_sch is standard SFF. No reason to open code init. Use ata_pci_sff_init_one() instead. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * pata_sil680: Do our own exec_command postingAlan Cox2010-05-151-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | Use our own mmio area to avoid PCI posting. This avoids the rather slow paranoid implementation in the default handler. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: Remove excess delay in the tf_load pathAlan Cox2010-05-152-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to stall and wait after loading the task file and before issuing a command, so don't do it. This shows up on profiles and is not needed. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * sata_nv: use ata_pci_sff_activate_host() instead of ata_host_activate()Tejun Heo2010-05-151-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sata_nv was incorrectly using ata_host_activate() instead of ata_pci_sff_activate_host() leading to IRQ assignment failure in legacy mode. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Robert Hancock <hancockr@shaw.ca> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: don't flush dcache on slab pagesSebastian Andrzej Siewior2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | page_mapping() check this via VM_BUG_ON(PageSlab(page)) so we bug here with the according debuging turned on. Future TODO: replace this with a flush_dcache_page_for_pio() API Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Cc: stable@kernel.org
| | * pata_cmd640: don't read CFR pointlesslySergei Shtylyov2010-05-141-3/+0Star
| | | | | | | | | | | | | | | | | | | | | cmd640_hardware_init() reads CFR but doesn't use the value read... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: make sff_irq_on() method optionalSergei Shtylyov2010-05-144-64/+18Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, with the introduction of the sff_set_devctl() method, we can use it in sff_irq_on() method too -- that way its implementations in 'pata_bf54x' and 'pata_scc' become virtually identical to ata_sff_irq_on(). The sff_irq_on() method now becomes quite superfluous, and the only reason not to remove it completely is the existence of the 'pata_octeon_cf' driver which implements it as an empty function. Just make the method optional then, with ata_sff_irq_on() becoming generic taskfile-bound function, still global for the 'pata_bf54x' driver to be able to call it from its thaw() and postreset() methods. While at it, make the sff_irq_on() method and ata_sff_irq_on() return 'void' as the result is always ignored anyway. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: introduce sff_set_devctl() methodSergei Shtylyov2010-05-143-59/+50Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set of libata's taskfile access methods is clearly incomplete as it lacks a method to write to the device control register -- which forces drivers like 'pata_bf54x' and 'pata_scc' to implement more "high level" (and more weighty) methods like freeze() and postreset(). So, introduce the optional sff_set_devctl() method which the drivers only have to implement if the standard iowrite8() can't be used (just like the existing sff_check_altstatus() method) and make use of it in the freeze() and postreset() method implementations (I could also have used it in softreset() method but it also reads other taskfile registers without using tf_read() making that quite pointless); this makes freeze() method implementations in the 'pata_bf54x' and 'pata_scc' methods virtually identical to ata_sff_freeze(), so we can get rid of them completely. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * ahci_platform: properly set up EM messagingJeff Garzik2010-05-141-1/+1
| | | | | | | | | | | | Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * ahci: add "em_buffer" attribute for AHCI hostsHarry Zhang2010-05-142-3/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "em_buffer" attribute for SATA AHCI hosts to provide a way for userland to access AHCI EM (enclosure management) buffer directly if the host supports EM. AHCI driver should support SGPIO EM messages. However the SATA/AHCI specs did not define the SGPIO message format filled in EM buffer. Different HW vendors may have different definitions. The mainly purpose of this attribute is to solve this issue by allowing HW vendors to provide userland drivers and tools for their SGPIO initiators. Signed-off-by: Harry Zhang <harry.zhang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * ahci: EM message type auto detectHarry Zhang2010-05-143-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | Detect enclosure management message type automatically at driver initialization, instead of using module parameter "ahci_em_messages". Signed-off-by: Harry Zhang <harry.zhang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * pata_scc: kill useless check in scc_postreset()Sergei Shtylyov2010-05-141-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | The device control register exists and its address is set by scc_setup_ports(), hence the check is useless... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * pata_scc: make scc_wait_after_reset() staticSergei Shtylyov2010-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | ... since, of course, it's not used outside this driver. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: use __ratelimitAkinobu Mita2010-05-141-16/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use __ratelimit() instead of its own private rate limit implementation. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: linux-ide@vger.kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata: use longer 0xff wait if parallel scan is enabledTejun Heo2010-05-141-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some SATA devices which take relatively long to get out of 0xff status after reset. In libata, this timeout is determined by ATA_TMOUT_FF_WAIT. Quantum GoVault is the worst requring about 2s for reliable detection. However, because 2s 0xff timeout can introduce rather long spurious delay during boot, libata has been compromising at the next longest timeout of 800ms for HHD424020F7SV00 iVDR drive. Now that parallel scan is in place for common drivers, libata can afford 2s 0xff timeout. Use 2s 0xff timeout if parallel scan is enabled. Please note that the chance of spurious wait is pretty slim w/ working SCR access so this will only affect SATA controllers w/o SCR access which isn't too common these days. Please read the following thread for more information on the GoVault drive. http://thread.gmane.org/gmane.linux.ide/14545/focus=14663 Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Gary Hade <garyhade@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * libata-sff: kill unused ata_bus_reset()Sergei Shtylyov2010-05-141-94/+0Star
| | | | | | | | | | | | | | | | | | | | | ... since I see no callers of it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>