aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-25Merge branch 'sg' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds1-2/+2
* 'sg' of git://git.kernel.dk/linux-2.6-block: fix sg_phys to use dma_addr_t ub: add sg_init_table for sense and read capacity commands x86: pci-gart fix blackfin: fix sg fallout xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it SG: audit of drivers that use blk_rq_map_sg() arch/um/drivers/ubd_kern.c: fix a building error SG: Change sg_set_page() to take length and offset argument AVR32: Fix sg_page breakage mmc: sg fallout m68k: sg fallout More SG build fixes sg: add missing sg_init_table calls to zfcp SG build fix
2007-10-25[libata] sata_nv: SWNCQ should not apply to MCP61Kuan Luo1-3/+3
The mcp61 has bug with ncq. Signed-off-by: Kuan Luo <kluo@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-25libata-core: Be a bit more relaxed about early DMA zero devicesAlan Cox1-3/+7
I guess Windows didn't care about the command so neither did they Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-25ahci: ahci: implement workaround for ASUS P5W-DH Deluxe ahci_broken_hardreset(), take #2Tejun Heo1-0/+144
P5W-DH Deluxe has ICH9 which doesn't have PMP support but SIMG 4726 hardwired to the second port of AHCI controller at PCI device 1f.2. The 4726 doesn't work as PMP but as a storage processor which can do hardware RAID on downstream ports. When no device is attached to the downstream port of the 4726, pseudo ATA device for configuration appears. Unfortunately, ATA emulation on the device is very lousy and causes long hang during boot. This patch implements workaround for the board. If the mainboard is P5W-DH Deluxe (matched using DMI), only hardreset is used on the second port of AHCI controller @ 1f.2 and the hardreset doesn't depend on receiving the first FIS and just proceed to IDENTIFY. This workaround fixes bugzilla #8923. http://bugzilla.kernel.org/show_bug.cgi?id=8923 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-25Fix pata_icside build for recent libata API changesAl Viro1-20/+22
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-25libata: cosmetic clean up in ata_eh_reset()Tejun Heo1-6/+6
Local variable @action usage in ata_eh_reset() is a bit confusing. It's used only to cache ehc->i.action to test reset masks after clearing it; however, due to the generic name "action", it's easy to misinterpret the local variable as containing the selected reset method later. Also, the reason for caching the original value is easy to miss. This patch renames @action to @tmp_action and make it buffer newly selected value instead to improve readability. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-25libata-core.c: make 2 functions staticAdrian Bunk1-2/+2
strn_pattern_cmp() and ata_port_detach() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-25[libata] Create internal helper ata_dev_set_feature()Jeff Garzik1-15/+11
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-24SG: Change sg_set_page() to take length and offset argumentJens Axboe1-2/+2
Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23libata: add HTS542525K9SA00 to NCQ blacklistTejun Heo1-0/+1
Another one doing spurious NCQ completions. Blacklist it. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-23libata-core: auditting chk_status v check_statusAlan Cox1-1/+1
Did a complete audit of these and found we have another error case. ata_bus_softreset calls ata_check_status which means that it tries to do an ioread8 on the port blindly and check versus 0xFF for an error. It should of course be using the ap->ops method for this via chk_status, and this bug causes a wrog status call on the NS87415 at least. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-23[libata] checkpatch-inspired cleanupsJeff Garzik11-250/+248
Tackle the relatively sane complaints of checkpatch --file. The vast majority is indentation and whitespace changes, the rest are * #include fixes * printk KERN_xxx prefix addition * BSS/initializer cleanups Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe2-6/+6
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds13-14/+14
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits) fix do_sys_open() prototype sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake Documentation: Fix typo in SubmitChecklist. Typo: depricated -> deprecated Add missing profile=kvm option to Documentation/kernel-parameters.txt fix typo about TBI in e1000 comment proc.txt: Add /proc/stat field small documentation fixes Fix compiler warning in smount example program from sharedsubtree.txt docs/sysfs: add missing word to sysfs attribute explanation documentation/ext3: grammar fixes Documentation/java.txt: typo and grammar fixes Documentation/filesystems/vfs.txt: typo fix include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros trivial copy_data_pages() tidy up Fix typo in arch/x86/kernel/tsc_32.c file link fix for Pegasus USB net driver help remove unused return within void return function Typo fixes retrun -> return x86 hpet.h: remove broken links ...
2007-10-19[libata] sata_sis: use correct S/G table sizeJeff Garzik1-1/+1
sata_sis has the same restrictions as other SFF controllers, and so must use LIBATA_MAX_PRD to denote that SCSI may only fill ATA_MAX_PRD/2 entries, due to our need to handle IOMMU merging. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-19pata_cs5536: MWDMA fixBartlomiej Zolnierkiewicz1-2/+2
* Fix out-of-bound array access for MWDMA modes. * Bump driver version. Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-19sata_sis: fix SCR read breakageTejun Heo1-5/+8
SCR read for controllers which uses PCI configuration space for SCR access got broken while adding @val argument to SCR accessors. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-19libata: fix kernel-doc param nameRandy Dunlap1-1/+1
Fix libata kernel-doc parameter name. Warning(linux-2.6.23-git13//drivers/ata/libata-core.c:1415): No description found for parameter 'sgl' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-20pata_cmd64x.c typo fixAdrian Bunk1-1/+1
Spotted by David Miller <davem@davemloft.net>. Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day12-13/+13
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-18Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-devLinus Torvalds9-74/+1560
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: [libata] kill ata_sg_is_last() Update libata driver for bf548 atapi controller against the 2.6.24 tree. libata-sff: Correct use of check_status() drivers/ata: add support to Freescale 3.0Gbps SATA Controller pata_acpi: fix build breakage if !CONFIG_PM
2007-10-18sparse pointer use of zero as nullStephen Hemminger1-1/+1
Get rid of sparse related warnings from places that use integer as NULL pointer. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Andi Kleen <ak@suse.de> Cc: Jeff Garzik <jeff@garzik.org> Cc: Matt Mackall <mpm@selenic.com> Cc: Ian Kent <raven@themaw.net> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18[libata] kill ata_sg_is_last()Jeff Garzik3-26/+20
Short term, this works around a bug introduced by early sg-chaining work. Long term, removing this function eliminates a branch from a hot path loop in each scatter/gather table build. Also, as this code demonstrates, we don't need to _track_ the end of the s/g list, as long as we mark it in some way. And doing so programatically is nice. So its a useful cleanup, regardless of its short term effects. Based conceptually on a quick patch by Jens Axboe. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-17Update libata driver for bf548 atapi controller against the 2.6.24 tree.Sonic Zhang2-47/+37
Changes: 1. Remove irq_ack() and port_disable() methods 2. Acocomodate for the libata-link patches 3. Change Kconfig ATAPI mode option into a module param. 4. Add supported WMDMA mode. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-17libata-sff: Correct use of check_status()Alan Cox1-1/+1
ata_check_status() does an SFF compliant check ata_chk_status() does a generic call to ap->ops->check_status (usually ata_check_status) libata-sff uses the wrong one. Hardly suprising given the naming here, which ought to get fixed to ata_sff_check_status() perhaps ? Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-17drivers/ata: add support to Freescale 3.0Gbps SATA ControllerLi Yang3-0/+1500
This patch adds support for Freescale 3.0Gbps SATA Controller supporting Native Command Queueing(NCQ), device hotplug, and ATAPI. This controller can be found on MPC8315 and MPC8378. Signed-off-by: Ashish Kalra <ashish.kalra@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-17pata_acpi: fix build breakage if !CONFIG_PMTejun Heo1-0/+2
There are configurations where CONFIG_ACPI but !CONFIG_PM. In this case, pata_acpi can be selected but won't build. Fix it. Reported by Avuton Olrich. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Avuton Olrich <avuton@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-16Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2-16/+21
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits) Fix memory leak in dm-crypt SPARC64: sg chaining support SPARC: sg chaining support PPC: sg chaining support PS3: sg chaining support IA64: sg chaining support x86-64: enable sg chaining x86-64: update pci-gart iommu to sg helpers x86-64: update nommu to sg helpers x86-64: update calgary iommu to sg helpers swiotlb: sg chaining support i386: enable sg chaining i386 dma_map_sg: convert to using sg helpers mmc: need to zero sglist on init Panic in blk_rq_map_sg() from CCISS driver remove sglist_len remove blk_queue_max_phys_segments in libata revert sg segment size ifdefs Fixup u14-34f ENABLE_SG_CHAINING qla1280: enable use_sg_chaining option ...
2007-10-16remove blk_queue_max_phys_segments in libataFUJITA Tomonori1-2/+0
LIBATA_MAX_PRD is the maximum number of DMA scatter/gather elements permitted by the HBA's DMA engine. It's properly set to q->max_hw_segments via the sg_tablesize parameter. libata shouldn't call blk_queue_max_phys_segments. Now LIBATA_MAX_PRD is equal to SCSI_MAX_PHYS_SEGMENTS by default (both is 128), so everything is fine. But if they are changed, some code (like the scsi mid layer, sg chaining, etc) might not work properly. (Addition from Jens) The basic issue is that the physical segment setting is purely a driver issue. And since SCSI is managing the sglist, libata has no business changing the setting. All libata should care about is the hw segment setting. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16libata sg chaining support fixFUJITA Tomonori1-1/+6
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16libata: convert to using sg helpersJens Axboe1-14/+16
This converts libata to using the sg helpers for looking up sg elements, instead of doing it manually. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-15docbook: fix libata contentRandy Dunlap1-1/+1
Fix libata docbook warnings. Warning(linux-2.6.23-git8//drivers/ata/libata-scsi.c:3251): No description found for parameter 'dev' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-15[libata] pata_cs5536: new API build fixJeff Garzik1-2/+0
This driver was using hooks that were very recently removed. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-15[libata] pata_pcmcia: Add additional id string (corsair, 1GB)Kristoffer Ericson1-0/+2
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-15libata: prevent devices with blank model names from being DMA blacklistedAndrew Paprocki1-1/+7
The strn_pattern_cmp routine does not handle a blank name parameter properly. The only patterns which should match a blank name are "*" and an explicit "". If the function is passed a blank name in current code, it will always match against the patt parameter. The bug manifests itself as the device with the empty model name always matching the first device in the DMA blacklist, forcing it to revert to PIO mode. Signed-off-by: Andrew Paprocki <andrew@ishiboo.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-15ata_piix: SATA 2port controller port map fixJason Gaston1-5/+30
This patch adds a port map for ICH9 and ICH8 SATA controllers that have only 2 ports available in that mode. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15pata_cs5536: ATA driver for Geode companion chipMartin K. Petersen3-0/+356
This is a driver for the ATA controller on the Geode CS5536 companion chip. The PCI device ID for this device was previously claimed by pata_amd.c but the PIO timings were not correct. This driver also works around a bug in some BIOSes that handle unaligned access to the PCI config registers poorly. Finally, the driver allows fallback to using MSR registers for configuration on BIOSes that are truly broken. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15libata: add ST9160821AS / 3.CCD to NCQ blacklistTejun Heo1-0/+1
ST9160821AS / 3.CCD does spurious completions too. Blacklist it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15libata: fix revalidation issuing after configuration commandsTejun Heo1-2/+3
After commands which can change device configuration, EH is scheduled to revalidate and reconfigure the device. Host link was incorrectly used unconditionally when scheduling EH action. This resulted in bogus revalidation request and mismatched configuration between device and driver. Fix it. This bug was reported by Igor Durdanovic. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Igor Durdanovic <idurdanovic@comcast.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15[libata] sata_nv: add SW NCQ support for MCP51/MCP55/MCP61Kuan Luo1-9/+842
Add the Software NCQ support to sata_nv.c for MCP51/MCP55/MCP61 SATA controller. NCQ function is disable by default, you can enable it with 'swncq=1'. NCQ will be turned off if the drive is Maxtor on MCP51 or MCP55 rev 0xa2 platform. [akpm@linux-foundation.org: build fix] Signed-off-by: Kuan Luo <kluo@nvidia.com> Signed-off-by: Peer Chen <pchen@nvidia.com> Cc: Zoltan Boszormenyi <zboszor@dunaweb.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-15[libata] pata_sil680: Add MMIO supportBenjamin Herrenschmidt1-4/+57
This patch adds MMIO support to the pata_sil680 for taskfile IOs, based on what the old siimage does. I haven't bothered changing the chip setup stuff from PCI config cycles to MMIO though (siimage does it), I don't think it matters, I've only adapted it to use MMIO for taskfile accesses. I've tested it on a Cell blade and it seems to work fine. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-14more trivial signedness fixes in driversAl Viro2-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14mpc52xx-ata: fix compile warning (unused variable)Grant Likely1-1/+0
Trivial unused variable fix Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-12[libata] struct pci_dev related cleanupsJeff Garzik3-20/+3
* remove pointless pci_dev_to_dev() wrapper. Just directly reference the embedded struct device like everyone else does. * pata_cs5520: delete cs5520_remove_one(), it was a duplicate of ata_pci_remove_one() * linux/libata.h: don't bother including linux/pci.h, we don't need it. Simply declare 'struct pci_dev' and assume interested parties will include the header, as they should be doing anyway. * linux/libata.h: consolidate all CONFIG_PCI declarations into a single location in the header. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-12libata: use ata_exec_internal() for PMP register accessTejun Heo5-189/+118
PMP registers used to be accessed with dedicated accessors ->pmp_read and ->pmp_write. During reset, those callbacks are called with the port frozen so they should be able to run without depending on interrupt delivery. To achieve this, they were implemented polling. However, as resetting the host port makes the PMP to isolate fan-out ports until SError.X is cleared, resetting fan-out ports while port is frozen doesn't buy much additional safety. This patch updates libata PMP support such that PMP registers are accessed using regular ata_exec_internal() mechanism and kills ->pmp_read/write() callbacks. The following changes are made. * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(), sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which are now standalone PMP register access functions. * sata_pmp_read/write() returns err_mask instead of rc. This is consistent with other functions which issue internal commands and allows more detailed error reporting. * ahci interrupt handler is modified to ignore BAD_PMP and spurious/illegal completion IRQs while reset is in progress. These conditions are expected during reset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12libata: implement ATA_PFLAG_RESETTINGTejun Heo1-0/+11
Implement ATA_PFLAG_RESETTING. This flag is set while reset is in progress. It's set before prereset is called and cleared after reset fails or postreset is finished. This flag itself doesn't have any function. It will be used by LLDs to tell whether reset is in progress if it needs to behave differently during reset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12libata: add @timeout to ata_exec_internal[_sg]()Tejun Heo4-17/+26
Add @timeout argument to ata_exec_internal[_sg](). If 0, default timeout ata_probe_timeout is used. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12ahci: fix notification handlingTejun Heo1-9/+21
Asynchronous notification on ICH9 didn't work because it didn't write AN FIS into the RX area - it only updates SNotification. Also, snooping SDB_FIS RX area is racy against further SDB FIS receptions. Let sata_async_notification() determine using SNTF if it's available and snoop RX area iff SNTF isn't available Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12ahci: clean up PORT_IRQ_BAD_PMP enablingTejun Heo1-5/+10
Now that we have pp->intr_mask, move PORT_IRQ_BAD_PMP enabling to ahci_pmp_attach/detach() where it belongs. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-12ahci: kill leftover from enabling NCQ over PMPTejun Heo1-8/+0
ahci had problems with NCQ over PMP and NCQ used to be disabled while PMP was attached. After fixing the problem, the temporary NCQ disabling code wasn't removed completely. Kill the remaining piece. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>