summaryrefslogtreecommitdiff
path: root/drivers/ata
AgeCommit message (Collapse)Author
2006-10-11Merge branch 'master' into upstream-fixesJeff Garzik
2006-10-11[PATCH] pata-qdi: fix le32 in data_xferPeter Korsgaard
The following tiny patch fixes a typo in qdi_data_xfer (le32 instead of le16). Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11[libata] sata_promise: add PCI IDJeff Garzik
Noticed by Steve Brown <sbrown25@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-11[PATCH] libata: return sense data in HDIO_DRIVE_CMD ioctlEran Tromer
Make the HDIO_DRIVE_CMD ioctl in libata (ATA command pass through) return a few ATA registers to userspace, following the same convention as the drivers/ide implementation of the same ioctl. This is needed to support ATA commands like CHECK POWER MODE, which return information in nsectors. This fixes "hdparm -C" on SATA drives. Forcing the sense data read via the cc flag causes spurious check conditions, so we filter these out (following the ATA command pass-through specification T10/04-262r7). Signed-off-by: Eran Tromer <eran@tromer.org> Acked-by: Tejun Heo <htejun@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-10[PATCH] trivial iomem annotations: sata_promiseAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10[PATCH] misc sata __iomem annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-06Merge branch 'master' into upstream-fixesJeff Garzik
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05[PATCH] libata: Don't believe bogus claims in the older PIO mode registerAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-04[PATCH] pata: teach ali about rev C8, keep pcmcia driver in syncAlan Cox
This fixes support for rev c8 of the ALi/ULi PATA, and keeps pcmcia in sync so ide_cs and pata_pcmcia are interchangable, both are only changes to constants. Right now rev 0xC8 and higher don't work with libata but 0xc8 is in the field now. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: [libata] pata_artop: kill gcc warning [PATCH] libata: turn off NCQ if queue depth is adjusted to 1 [PATCH] libata: cosmetic changes to constants [libata] DocBook minor updates, fixes [libata] PCI ID table cleanup in various drivers [libata] Print out Status register, if a BSY-sleep takes too long [libata] init probe_ent->private_data in a common location [libata] minor PCI IDE probe fixes and cleanups [libata] Use new PCI_VDEVICE() macro to dramatically shorten ID lists [PATCH] Fix reference of uninitialised memory in ata_device_add()
2006-10-03[PATCH] pata_hpt366: fix typoOGAWA Hirofumi
switch(reg1 & 0x700) { case 5: info_hpt366.private_data = &hpt366_40; break; case 9: info_hpt366.private_data = &hpt366_25; break; default: info_hpt366.private_data = &hpt366_33; break; } The above runs always default part. It should be "(reg1 & 0x700) >> 8". Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01[libata] pata_artop: kill gcc warningJeff Garzik
gcc complains thusly: drivers/ata/pata_artop.c: In function ‘artop_init_one’: drivers/ata/pata_artop.c:429: warning: ‘info’ may be used uninitialized in this function While this warning is indeed bogus, even with improved static analysis and value range propagation, gcc will probably never be able to detect this. Add a BUG_ON() to trap invalid driver_data entries in the PCI table. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-30[PATCH] libata: turn off NCQ if queue depth is adjusted to 1Tejun Heo
Turn off NCQ if queue depth is adjusted to 1. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-29[libata] DocBook minor updates, fixesJeff Garzik
Update copyright year, fix minor stuff 'make xmldocs' complains about. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-29[libata] PCI ID table cleanup in various driversJeff Garzik
* Use PCI_VDEVICE() macro * const-ify pci_device_id table * standardize list terminator as "{ }" * convert spaces to tab in pci_driver struct (Alan-ism) * various minor whitespace cleanups Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-28[libata] Print out Status register, if a BSY-sleep takes too longJeff Garzik
We have the info stored in an ata_busy_sleep() variable, so might as well print it, and provide some additional diagnostic info. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-28[libata] init probe_ent->private_data in a common locationJeff Garzik
Don't write the same code twice, in two different functions, when they both call the same initialization function, with the same private_data pointer info. Also, note a bug found with a FIXME. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-28[libata] minor PCI IDE probe fixes and cleanupsJeff Garzik
* Replace needless 'n_ports > 2' check with a simple BUG_ON(). No existing driver ever wants more than 2 ports. * Delete ATA_FLAG_NO_LEGACY check. No current driver uses ata_pci_init_one(), that sets this flag. * Move PCI_CLASS_PROG register read below pci_enable_device() * Handle ata_device_add() failure Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-28[libata] Use new PCI_VDEVICE() macro to dramatically shorten ID listsJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27[PATCH] Fix reference of uninitialised memory in ata_device_add()Dave Jones
ata_device_add fails, calls ata_host_remove with pointers to unitialized memory. Signed-off-by: Dave Jones <davej@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27[libata] Don't use old-EH ->eng_timeout() hook when not neededJeff Garzik
The PATA driver set got converted to the new error handling setup, but the old hooks were accidentally left in place. Now, removed. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-27[libata] sata_mv: fix oops by filling in missing hookJeff Garzik
Only two of three ata_port_operations structs had a ->data_xfer member, which led to, uh, a lack of data xfer. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[libata] One more s/15/ATA_SECONDARY_IRQ/ substitutionJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[libata] pata_serverworks: fill in ->irq_clear hookJeff Garzik
Required by libata, as it is called unconditionally. Fixes an obvious oops. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] pata_serverworks: correct PCI ID in cable detection tableAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] libata-sff: use our IRQ definesAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] libata-eh: Remove layering violation and duplication when handling ↵Alan Cox
absent ports This removes the layering violation where drivers have to fiddle directly with EH flags. Instead we now recognize -ENOENT means "no port" and do the handling in the core code. This also removes an instance of a call to disable the port, and an identical printk from each driver doing this. Even better - future rule changes will be in one place only. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] libata: tighten rules for legacy dependanciesAlan Cox
The legacy and QDI drivers are ISA/VLB bus [we don't have a VLB define but ISA will do nicely]. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] libata: refuse to register IRQless portsAlan Cox
We don't currently support pure polled operation so when we meet a BIOS which forgot to assign an IRQ to a PCI device it all goes a little pear shaped. Trap this case properly. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[libata] Fix oops introduced in non-uniform port handling fixJeff Garzik
Noticed by several people. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-26[PATCH] ata-piix: fixes kerneldoc errorHenne
Fixes an error in kerneldoc of ata_piix.c. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-25[PATCH] pata_pdc2027x iomem annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24[PATCH] libata won't build on SUN4Al Viro
marked as such... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24[PATCH] libata won't build on m68k and m32rAl Viro
no ioread*(), for one thing Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24Merge branch 'master' into upstreamJeff Garzik
2006-09-20[libata] Delete pata_it8172 driverJeff Garzik
This MIPS platform is going away. Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-19[PATCH] libata: improve handling of diagostic fail (and hardware that ↵Alan Cox
misreports it) Our ATA probe code checks that a device is not reporting a diagnostic failure during start up. Unfortunately at least one device seems to like doing this - the Gigabyte iRAM. This is only done for the master right now (which is fine for the iRAM as it is SATA), as with PATA some combinations of ATAPI device seem to fool the check into seeing a drive that isn't there if it is applied to the slave. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-19Merge branch 'master' into upstreamJeff Garzik
2006-09-19[PATCH] libata: fix non-uniform ports handlingTejun Heo
Non-uniform ports handling got broken while updating libata to handle those in the same host. Only separate irq for the non-uniform secondary port was implemented while all other fields (host flags, transfer mode...) of the secondary port simply shared those of the first. For ata_piix combined mode, which ATM is the only user of non-uniform ports, this causes the secondary port assume the wrong type. This can cause PATA port to use SATA ops, which results in bogus check on PCS and detection failure. This patch adds ata_probe_ent->pinfo2 which points to optional port_info for the secondary port. For the time being, this seems to be the simplest solution. This workaround will be removed together with ata_probe_ent itself after init model is updated to allow more flexibility. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Nelson A. de Oliveira <naoliv@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-19Merge branch 'tmp' into upstreamJeff Garzik
Conflicts: drivers/ata/libata-sff.c
2006-09-13[libata] ata_piix: build fixJeff Garzik
Spotted by Andrew Morton. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-12[PATCH] pata_amd: Check enable bits on NvidiaAlan Cox
A couple of people reported long delays on probe with the newer kernels and Nvidia PATA. This turned out to be because the Nvidia path forgot to check the enable bits so probed empty ports. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-12[PATCH] Update SiS PATAAlan Cox
New chipset identifiers Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-11Merge branch 'upstream-fixes' into upstreamJeff Garzik
Conflicts: drivers/ata/ata_piix.c
2006-09-06[libata] Add pata_jmicron driver to Kconfig, MakefileJeff Garzik
Someone on LKML noticed it was missing (sorry, missed the name). Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-31[libata #pata-drivers] Trim trailing whitespace.Jeff Garzik
2006-08-31Merge branch 'upstream' into pata-driversJeff Garzik
2006-08-31[libata] Trim trailing whitespace.Jeff Garzik
2006-08-29[libata] Add a bunch of PATA drivers.Jeff Garzik
The vast majority of drivers and changes are from Alan Cox. Albert Lee contributed and maintains pata_pdc2027x. Adrian Bunk, Andrew Morton, and Tejun Heo contributed various minor fixes and updates. Signed-off-by: Jeff Garzik <jeff@garzik.org>