summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [XFS] Initialise current offset in xfs_file_readdir correctlyLachlan McIlroy2007-12-211-0/+1
| | | | | | | | | | | | | | | After reading the directory contents into the temporary buffer, we grab each dirent and pass it to filldir witht eh current offset of the dirent. The current offset was not being set for the first dirent in the temporary buffer, which coul dresult in bad offsets being set in the f_pos field result in looping and duplicate entries being returned from readdir. SGI-PV: 974905 SGI-Modid: xfs-linux-melb:xfs-kern:30282a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
* [XFS] Fix mknod regressionChristoph Hellwig2007-12-211-3/+1
| | | | | | | | | | | | | | | | | | This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype', which assigned the re-shuffled ondisk dev_t back to the rdev variable in xfs_vn_mknod. Because of that i_rdev is set to the ondisk dev_t instead of the linux dev_t later down the function. Fortunately the fix for it is trivial: we can just remove the assignment because xfs_revalidate_inode has done the proper job before unlocking the inode. SGI-PV: 974873 SGI-Modid: xfs-linux-melb:xfs-kern:30273a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
* [XFS] Put the correct offset in dirent d_offLachlan McIlroy2007-12-184-13/+8
| | | | | | | | | | | | | | | | The recent filldir regression fix was not putting the correct d_off in each dirent. This was resulting in incorrect cookies being passed to dmapi ioctls and the wrong offset appearing in the dirents. readdir was unaffected as the filp->f_pos was being updated with the correct offset and this was being written into the last dirent in each buffer. Fix the XFS code to do the right thing. SGI-PV: 973746 SGI-Modid: xfs-linux-melb:xfs-kern:30240a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
* [XFS] Don't wait for pending I/Os when purging blocks beyond eof.Lachlan McIlroy2007-12-181-2/+4
| | | | | | | | | | | | | | | On last close of a file we purge blocks beyond eof. The same code is used when we truncate the file size down. In this case we need to wait for any pending I/Os for dirty pages beyond the new eof. For the last close case we are not changing the file size and therefore do not need to wait for any I/Os to complete. This fixes a performance bottleneck where writes into the page cache and cache flushes can become mutually exclusive. SGI-PV: 964002 SGI-Modid: xfs-linux-melb:xfs-kern:30220a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Peter Leckie <pleckie@sgi.com>
* Merge branch 'upstream-linus' of ↵Linus Torvalds2007-12-1724-91/+168
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (23 commits) iwlwifi: fix rf_kill state inconsistent during suspend and resume b43: Fix rfkill radio LED bcm43xx_debugfs sscanf fix libertas: select WIRELESS_EXT iwlwifi3945/4965: fix rate control algo reference leak ieee80211_rate: missed unlock wireless/ipw2200.c: add __dev{init,exit} annotations zd1211rw: Fix alignment problems libertas: add Dan Williams as maintainer sis190 endianness ucc_geth: really fix section mismatch pcnet_cs: add new id ixgb: make sure jumbos stay enabled after reset Net: ibm_newemac, remove SPIN_LOCK_UNLOCKED net: smc911x: shut up compiler warnings ucc_geth: minor whitespace fix drivers/net/s2io.c section fixes drivers/net/sis190.c section fix hamachi endianness fixes e100: free IRQ to remove warningwhenrebooting ...
| * Merge branch 'fixes-jgarzik' of ↵Jeff Garzik2007-12-1711-24/+76
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
| | * iwlwifi: fix rf_kill state inconsistent during suspend and resumeZhu Yi2007-12-172-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes the STATUS_RF_KILL_HW state is not cleared problem if the device goes to suspend when the rf_kill switch is enabled. The bug causes the driver always thinks the rf_kill switch is enabled (although it is disabled) after resume. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43: Fix rfkill radio LEDLarry Finger2007-12-173-16/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes Bug #9414 Since addition of the rfkill callback, the LED associated with the off switch on the radio has not worked for several reasons: (1) Essential data in the rfkill structure were missing. (2) The rfkill structure was initialized after the LED initialization. (3) There was a minor memory leak if the radio LED structure was inited. Once the above problems were fixed, additional difficulties were noted: (4) The radio LED was in the wrong state at startup. (5) The radio switch had to be manipulated twice for each state change. (6) A circular mutex locking situation existed. (7) If rfkill-input is built as a module, it is not automatically loaded. This patch fixes all of the above. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * bcm43xx_debugfs sscanf fixAndrew Morton2007-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ia64: drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c: In function `tsf_write_file': drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c:237: warning: long long int format, u64 arg (arg 3) drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c:237: warning: long long int format, u64 arg (arg 3) We do not know what type was used to implement u64 and we can never use u64 in printk(), sscanf(), etc. Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * libertas: select WIRELESS_EXTDan Williams2007-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that libertas selects WIRELESS_EXT, since selecting other stuff that should depend on WEXT, like IEEE80211, doesn't seem to drag that in for us. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * iwlwifi3945/4965: fix rate control algo reference leakCyrill Gorcunov2007-12-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rate control algo reference leak in case if network device has been failed to register. In this case special flag priv->mac80211_registered is not set and the rate algo reference is not freeing on module unload. That leads to OOPs in further ieee80211 rate register/unregister procedure (by any callee). It should fix the bug #9470 http://bugzilla.kernel.org/show_bug.cgi?id=9470 [akpm@linux-foundation.org: build fix] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * ieee80211_rate: missed unlockCyrill Gorcunov2007-12-171-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * wireless/ipw2200.c: add __dev{init,exit} annotationsAdrian Bunk2007-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | This patch adds __dev{init,exit} annotations. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * zd1211rw: Fix alignment problemsUlrich Kunitz2007-12-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shaddy Baddah found an alignment problem with zd1211rw driver at 2007-11-19. This patch fixes it, it is based on the patch proposed by Herbert Xu. The alignment 4 has been the agreed value on the linux-wireless mailing list. Notify that the problem does only affect the old zd1211rw softmac driver and not the zd1211rw-mac80211 driver. Daniel Drake has already provided a patch for the replacement of the softmac driver, which this patch will break. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * libertas: add Dan Williams as maintainerStefano Brivio2007-12-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add Dan Williams as maintainer for libertas driver. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | sis190 endiannessAl Viro2007-12-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check in sis190_rx_interrupt() is broken on big-endian (desc->status is little-endian and everything else actually uses it correctly, including other checks for OWNbit. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | ucc_geth: really fix section mismatchAnton Vorontsov2007-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ed7e63a51d46e835422d89c687b8a3e419a4212a has tried to fix section mismatch: WARNING: vmlinux.o(.init.text+0x17278): Section mismatch: reference to .exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init') But that mismatch still happens. This patch actually fixing section mismatch by removing __exit from the header file. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | pcnet_cs: add new idKomuro2007-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | add new id: Planex CF-10T Signed-off-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | ixgb: make sure jumbos stay enabled after resetMatheos Worku2007-12-141-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a device reset (ethtool -r ethX) would cause the adapter to fall back to regular MTU sizes. Signed-off-by: Matheos Worku <matheos.worku@sun.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | Net: ibm_newemac, remove SPIN_LOCK_UNLOCKEDJiri Slaby2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | net: smc911x: shut up compiler warningsPaul Mundt2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial fix to shut up gcc. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | ucc_geth: minor whitespace fixAndrew Morton2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zombie whitespace from outer space that will not die! Cc: "David S. Miller" <davem@davemloft.net> Cc: Emil Medve <Emilian.Medve@Freescale.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | drivers/net/s2io.c section fixesAdrian Bunk2007-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code used by the non-__devinit s2io_open() mustn't be __devinit. This patch fixes the following section mismatch with CONFIG_HOTPLUG=n: <-- snip --> ... WARNING: vmlinux.o(.text+0x6f6e3e): Section mismatch: reference to .init.text.20:s2io_test_intr (between 's2io_open' and 's2io_ethtool_sset') ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | drivers/net/sis190.c section fixAdrian Bunk2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following section mismatch with CONFIG_HOTPLUG=n: <-- snip --> ... WARNING: vmlinux.o(.init.text.20+0x4cb25): Section mismatch: reference to .exit.text:sis190_mii_remove (between 'sis190_init_one' and 'read_eeprom') ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | hamachi endianness fixesAl Viro2007-12-141-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | badly broken on big-endian * passing little-endian to pci_unmap_single() et.al. * cpu_to_le32() before passing value to writel() * worse, cpu_to_le64() and shifting/masking result before the same * hmp->tx_ring[i].status_n_length = cpu_to_le32( DescEndRing | (hmp->tx_ring[i].status_n_length & 0x0000FFFF)); is obviously bogus on big-endian. Not hard to untangle, fortunately... * poisoning addresses in rx_ring is better done after we'd done pci_unmap_single() on them, not before that. [this one affects little-endian as well, obviously, provided that pci_unmap_single() is not a no-op on target in question] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | e100: free IRQ to remove warningwhenrebootingAuke Kok2007-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapted from Ian Wienand <ianw@gelato.unsw.edu.au> Explicitly free the IRQ before removing the device to remove a warning "Destroying IRQ without calling free_irq" Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Cc: Ian Wienand <ianw@gelato.unsw.edu.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | starfire VLAN fixAl Viro2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recognized VLAN ids are set via writew(), should go in host-endian. That's a long-standing bug, BTW - see http://lkml.org/lkml/2004/2/27/180 for example. What happens is that card gets VLAN id table populated by byteswapped values on little-endian boxen (so 257 works as expected, 256 and 258 do not, etc.). Bug is easily reproduced, patch fixes it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | sundance fixesAl Viro2007-12-141-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * all places where we assign ->addr get cpu_to_le32(pci_map_single(....)), so we ought to convert back to host-endian before doing pci_unmap_single() et.al. * poisoning addresses in netdev_close() should be done _after_ unmapping them, not before it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | sky2: RX lockup fixStephen Hemminger2007-12-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm using a Marvell 88E8062 on a custom PPC64 blade and ran into RX lockups while validating the sky2 driver. The receive MAC FIFO would become stuck during testing with high traffic. One port of the 88E8062 would lockup, while the other port remained functional. Re-inserting the sky2 module would not fix the problem - only a power cycle would. I looked over Marvell's most recent sk98lin driver and it looks like they had a "workaround" for the Yukon XL that the sky2 doesn't have yet. The sk98lin driver disables the RX MAC FIFO flush feature for all revisions of the Yukon XL. According to skgeinit.c of the sk98lin driver, "Flushing must be enabled (needed for ASF see dev. #4.29), but the flushing mask should be disabled (see dev. #4.115)". Nice. I implemented this same change in the sky2 driver and verified that the RX lockup I was seeing was resolved. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | Merge branch 'upstream-linus' of ↵Linus Torvalds2007-12-178-173/+419
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: fix ATAPI draining libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size libata-acpi: implement _GTF command filtering libata-acpi: improve _GTF execution error handling and reporting libata-acpi: improve ACPI disabling libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume libata-acpi: implement and use ata_acpi_init_gtm() libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable() libata: ata_dev_disable() should be called from EH context libata: add more opcodes to ata.h libata: update ata_*_printk() macros such that level can be a variable libata-acpi: adjust constness in ata_acpi_gtm/stm() parameters sata_mv: improve warnings about Highpoint RocketRAID 23xx cards libata: add ST3160023AS / 3.42 to NCQ blacklist libata: clear link->eh_info.serror from ata_std_postreset() sata_sil: fix spurious IRQ handling
| * | | libata: fix ATAPI drainingTejun Heo2007-12-172-22/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With ATAPI transfer chunk size properly programmed, libata PIO HSM should be able to handle full spurious data chunks. Also, it's a good idea to suppress trailing data warning for misc ATAPI commands as there can be many of them per command - for example, if the chunk size is 16 and the drive tries to transfer 510 bytes, there can be 31 trailing data messages. This patch makes the following updates to libata ATAPI PIO HSM implementation. * Make it drain full spurious chunks. * Suppress trailing data warning message for misc commands. * Put limit on how many bytes can be drained. * If odd, round up consumed bytes and the number of bytes to be drained. This gets the number of bytes to drain right for drivers which do 16bit PIO. This patch is partial backport of improve-ATAPI-data-xfer patchset pending for #upstream. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer sizeTejun Heo2007-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While updating lbam/h for ATAPI commands, atapi_eh_request_sense() was left out. Update it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: implement _GTF command filteringTejun Heo2007-12-171-44/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement _GTF command filtering which can be controlled by libata.acpi_filter kernel parameter. Currently SETXFER and LOCK commands are filtered. libata configures transfer mode by itself and _GTF SETXFER commands can potentially disrupt device configuration. _GTM/_STM mechanism can't handle hotplugging too well and when _GTF is executed, controller is in PIO0 rather than the mode _STM configured. Note that detecting SET MAX LOCK requires looking at the previous command. This adds a bit to code complexity. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: improve _GTF execution error handling and reportingTejun Heo2007-12-171-31/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As _GTF commands can't transfer data, device error never signals transfer error. It indicates that the device vetoed the operation, so it's meaningless to retry. This patch makes libata-acpi to report and continue on device errors when executing _GTF commands. Also commands rejected by device don't contribute to the number of _GTF commands executed. While at it, update _GTF execution reporting such that all successful commands are logged at KERN_DEBUG and rename taskfile_load_raw() to ata_acpi_run_tf() for consistency. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: improve ACPI disablingTejun Heo2007-12-171-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * If _GTF evalution fails, it's pointless to retry. If nothing else is wrong, just ignore the error. * After disabling ACPI, return success iff the number of executed _GTF command equals zero. Otherwise, tell EH to retry. This change fixes bogus 1 return bug where ata_acpi_on_devcfg() expects the caller to reload IDENTIFY data and continue but the caller interprets it as an error. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM ↵Tejun Heo2007-12-172-20/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | during resume On certain implementations, _GTF evaluation depends on preceding _STM and both can be pretty picky about the configuration. Using _GTM result cached during controller initialization satisfies the most neurotic _STM implementation. However, libata evaluates _GTF after reset during device configuration and the hardware state can be different from what _GTF expects and can cause evaluation failure. This patch adds dev->gtf_cache and updates ata_dev_get_GTF() such that it uses the cached value if available. Cache is cleared with a call to ata_acpi_clear_gtf(). Because for SATA ACPI nodes _GTF must be evaluated after _SDD which can't be done till IDENTIFY is complete, _GTF caching from ata_acpi_on_resume() is used only for IDE ACPI nodes. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: implement and use ata_acpi_init_gtm()Tejun Heo2007-12-172-37/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _GTM fetches currently configured transfer mode while _STM configures controller according to _GTM parameter and prepares transfer mode configuration TFs for _GTF. In many cases _GTM and _STM implementations are quite brittle and can't cope with configuration changed by libata. libata does not depend on ATA ACPI to configure devices. The only reason libata performs _GTM and _STM are to make _GTF evaluation succeed and libata also doesn't care about how _GTF TFs configure transfer mode. It overrides that configuration anyway, so from libata's POV, it doesn't matter what value is feeded to _STM as long as evaluation succeeds for _STM and following _GTF. This patch adds dev->__acpi_init_gtm and store initial _GTM values on host initialization before modified by reset and mode configuration. If the field is valid, ata_acpi_init_gtm() returns pointer to the saved _GTM structure; otherwise, NULL. This saved value is used for _STM during resume and peek at BIOS/firmware programmed initial timing for later use. The accessor is there to make building w/o ACPI easy as dev->__acpi_init doesn't exist if ACPI is not enabled. On driver detach, the initial BIOS configuration is restored by executing _STM with the initial _GTM values such that the next driver can also use the initial BIOS configured values. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable()Tejun Heo2007-12-173-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two hooks - ata_acpi_dissociate() which is called during driver detach after the whole host is shutdown and ata_acpi_on_disable() which is called when a device is disabled. Signed-off-by: Tejun heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: ata_dev_disable() should be called from EH contextTejun Heo2007-12-171-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ata_port_detach() calls ata_dev_disable() with host lock held but ata_dev_disable() should be called from EH context. ata_port_detach() steals EH context by setting ATA_PFLAG_UNLOADAING and flushing EH. Drop locking around ata_dev_disable() and note that ata_port_detach() owns EH context at that point. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: add more opcodes to ata.hTejun Heo2007-12-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add constants for DEVICE CONFIGURATION OVERLAY and SET_MAX to include/linux/ata.h. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: update ata_*_printk() macros such that level can be a variableTejun Heo2007-12-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make prink helpers format @lv together rather than prepending to the format string as constant. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata-acpi: adjust constness in ata_acpi_gtm/stm() parametersTejun Heo2007-12-172-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * No internal function uses const ata_port. Drop const from @ap. * Make ata_acpi_stm() copy @stm before using it and change @stm to const. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | sata_mv: improve warnings about Highpoint RocketRAID 23xx cardsMark Lord2007-12-171-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the existing boot/load time warnings from sata_mv for Highpoint RocketRAID 23xx cards, based on new knowledge about where the BIOS likes to overwrite sectors with metadata. Harmless to us, but very useful for end users. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: add ST3160023AS / 3.42 to NCQ blacklistTejun Heo2007-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like ST380817AS / 3.42, ST3160023AS / 3.42 times out commands if NCQ is used. Blacklist it. This is reported by Matheus Izvekov in the following thread. http://thread.gmane.org/gmane.linux.ide/24202 Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Matheus Izvekov <mizvekov@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | libata: clear link->eh_info.serror from ata_std_postreset()Tejun Heo2007-12-172-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | link->eh_info.serror is used to cache SError for controllers which need it cleared from interrupt handler to clear IRQ. It also should be cleared after reset just like SError itself. Make ata_std_postreset() clear link->eh_info.serror too and update sata_sil such that it doesn't care about bookkeeping the value. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | sata_sil: fix spurious IRQ handlingTejun Heo2007-12-171-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interestingly, sata_sil raises spurious interrupts if it's coupled with Sil SATA_PATA bridge. Currently, sata_sil interrupt handler is strict about spurious interrupts and freezes the port when it occurs. This patch makes it more forgiving. * On SATA PHY event interrupt, serror value is checked to see whether it really is PHYRDY CHG event. If not, SATA PHY event interrupt is ignored. * If ATA interrupt occurs while no command is in progress, it's cleared and ignored. This fixes bugzilla bug 9505. http://bugzilla.kernel.org/show_bug.cgi?id=9505 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | | sysctl: fix ax25 checksEric W. Biederman2007-12-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: sysctl table check failed: /net/ax25/ax0/ax25_default_mode .3.9.1.2 Unknown sysctl binary path Pid: 2936, comm: kissattach Not tainted 2.6.24-rc5 #1 [<c012ca6a>] set_fail+0x3b/0x43 [<c012ce7a>] sysctl_check_table+0x408/0x456 [<c012ce8e>] sysctl_check_table+0x41c/0x456 [<c012ce8e>] sysctl_check_table+0x41c/0x456 ... Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Bernard Pidoux <pidoux@ccr.jussieu.fr> Cc: "David S. Miller" <davem@davemloft.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | quicklist: Set tlb->need_flush if pages are remaining in quicklist 0Christoph Lameter2007-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that the quicklists are drained. Otherwise draining may only occur when the processor reaches an idle state. Fixes fatal leakage of pgd_t's on 2.6.22 and later. Signed-off-by: Christoph Lameter <clameter@sgi.com> Reported-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | SLUB: remove useless masking of GFP_ZEROChristoph Lameter2007-12-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a recently added useless masking of GFP_ZERO. GFP_ZERO is already masked out in new_slab() (See how it calls allocate_slab). No need to do it twice. This reverts the SLUB parts of 7fd272550bd43cc1d7289ef0ab2fa50de137e767. Cc: Matt Mackall <mpm@selenic.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | Fix compilation warning in dquot.cJan Kara2007-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation warning about discarded const. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud