1. 23 1月, 2008 15 次提交
    • T
      libata: clean up EH speed down implementation · 3884f7b0
      Tejun Heo 提交于
      Clean up EH speed down implementation.
      
      * is_io boolean variable is replaced eflags.  is_io is ATA_EFLAG_IS_IO.
      
      * Error categories now have names.
      
      * Better comments.
      
      * Reorder 5min and 10min rules in ata_eh_speed_down_verdict()
      
      * Use local variable @link to cache @dev->link in ata_eh_speed_down()
      
      These changes are to improve readability and ease further changes.
      This patch doesn't introduce any behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3884f7b0
    • T
      libata: move ata_set_mode() to libata-eh.c · 6f1d1e3a
      Tejun Heo 提交于
      Move ata_set_mode() to libata-eh.c.  ata_set_mode() is surely an EH
      action and will be more tightly coupled with the rest of error
      handling.  Move it to libata-eh.c.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6f1d1e3a
    • T
      libata: factor out ata_eh_schedule_probe() · 02c05a27
      Tejun Heo 提交于
      Factor out ata_eh_schedule_probe() from ata_eh_handle_dev_fail() and
      ata_eh_recover().  This is to improve maintainability and make future
      changes easier.
      
      In the previous revision, ata_dev_enabled() test was accidentally
      dropped while factoring out.  This problem was spotted by Bartlomiej.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      02c05a27
    • T
      libata: implement protocol tests · 405e66b3
      Tejun Heo 提交于
      Implement protocol tests - ata_is_atapi(), ata_is_nodata(),
      ata_is_pio(), ata_is_dma(), ata_is_ncq() and ata_is_data() and use
      them to replace is_atapi_taskfile() and hard coded protocol tests.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      405e66b3
    • J
      libata: checkpatch fixes · 11b7becc
      Jeff Garzik 提交于
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      11b7becc
    • T
      ahci: update PCS programming · 49f29090
      Tejun Heo 提交于
      For intel ones, ahci unconditionally OR'd 0xf to PCS.  This isn't
      correct for the following cases.
      
      * ich6/7m's which only implement P0 and P2 (0xf works fine tho)
      
      * ich8/9's which have six ports and needs 0x3f to enable all ports
      
      This patch updates PCS programming such that...
      
      * port_map determined by ahci_save_initial_config() is OR'd instead of 0xf
      
      * PCS is updated only if necessary (there are turned off enable bits)
      
      port_map is determined from PORTS_IMPL PCI register which is
      implemented as write or write-once register.  If the register isn't
      programmed, ahci automatically generates it from number of ports,
      which is good enough for PCS programming.  ICH6/7M are probably the
      only ones where non-contiguous enable bits are necessary && PORTS_IMPL
      isn't programmed properly but they're proven to work reliably with 0xf
      anyway.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      49f29090
    • A
      pata_ninja32: Cardbus ATA initial support · 51dbd490
      Alan Cox 提交于
      Lots of work needed to bring it up to scratch but it does work so you can
      now use the card. That makes it at least useful, especially as the other
      cardbus cards are usually INIC162x which aren't yet supported well.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      51dbd490
    • A
      libata-sff: tf_load · 76548eda
      Alan Cox 提交于
      Jeff said he preferred that the SFF tf_load followed the spec and we
      documented that anyone who needed different overrode it, rather than it
      using the ->check_status methods. No driver relies on the current behaviour.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      76548eda
    • A
      libata: IORDY handling · b9f8ab2d
      Alan Cox 提交于
      I believe this version meets all Sergei's objections
      
      Correct the logic for when we issue a set features for transfer mode
      
      - If the device has IORDY and the controller has IORDY - set the mode
      - If the device has IORDY and the controller does not - turn IORDY off
      - If neither has IORDY do nothing
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b9f8ab2d
    • S
      libata-acpi: add ACPI _PSx method · bd3adca5
      Shaohua Li 提交于
      ACPI spec (ver 3.0a, p289) requires IDE power on/off executes ACPI _PSx
      methods. As recently most PATA drivers use libata, this patch adds _PSx
      method support in libata. ACPI spec doesn't mention if SATA requires the
      same _PSx method.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Acked-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      bd3adca5
    • A
      libata: Disable ATA8-ACS proposed Trusted Computing features by default · ae8d4ee7
      Alan Cox 提交于
      Historically word 48 in the identify data was used to mean 32bit I/O
      was supported for VLB IDE etc. ATA8 reassigns this word to the Trusted
      Computing Group, where it is used for TCG features. This means that
      an ATA8 TCG drive is going to trigger 32bit I/O on some systems which
      will be funny.
      
      Anyway we need to sort this out ready for ATA8 so:
      - Reorder the ata.h header a bit so the ata_version function occurs early
        in it
      - Make dword_io check the ATA version
      - Add an ATA8 version checking TCG presence test
      
      While we are at it the current drafts have a flaw where it may not be
      possible to disable TCG features at boot (and opt out of the trusted
      model) as TCG intends because it relies on presence of a different
      optional feature (DCS). Handle this in software by refusing the TCG
      commands if libata.allow_tpm is not set. (We must make it possible
      as some environments such as proprietary VDR devices will doubtless
      want to use it to lock up content)
      
      Finally as with CPRM print a warning so that the user knows they may
      not be able to full access and use the device.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      ae8d4ee7
    • P
      ata_piix: Add Toshiba Satellite R20 and Tecra M6 to broken suspend list. · ffe188dd
      Peter Schwenke 提交于
      Add Toshiba Satellite R20 and Tecra M6 to broken suspend list.  Matt
      Piermarini reported and provided the M6 patch.  This is from OSDL bug 7780.
      Signed-off-by: NPeter Schwenke <peter@bluetoad.com.au>
      Cc: Matt Piermarini <mattpiermarini@yahoo.com>
      Acked-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      ffe188dd
    • J
      Fix file references in documentation and Kconfig · 889c94a1
      Johann Felix Soden 提交于
      Fix typo in arch/powerpc/boot/flatdevtree_env.h.
      There is no Documentation/networking/ixgbe.txt.
      
      README.cycladesZ is now in Documentation/.
      wavelan.p.h is now in drivers/net/wireless/.
      HFS.txt is now Documentation/filesystems/hfs.txt.
      OSS-files are now in sound/oss/.
      Signed-off-by: NJohann Felix Soden <johfel@users.sourceforge.net>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      889c94a1
    • D
      W1: w1_therm.c is flagging 0C etc as invalid · 80c002dd
      David Fries 提交于
      The extra rom[0] check is flagging valid temperatures as invalid when
      there is already a CRC data transmission check.
      
      w1_therm_read_bin()
      	if (rom[8] == crc && rom[0])
      		verdict = 1;
      
      Requiring rom[0] to be non-zero will flag as invalid temperature
      conversions when the low byte is zero, specifically the temperatures 0C,
      16C, 32C, 48C, -16C, -32C, and -48C.
      
      The CRC check is produced on the device for the previous 8 bytes and is
      required to ensure the data integrity in transmission.  I don't see why the
      extra check for rom[0] being non-zero is in there.  Evgeniy Polyakov didn't
      know either.  Just for a check I unplugged the sensor, executed a
      temperature conversion, and read the results.  The read was all ff's, which
      also failed the CRC, so it doesn't need to protect against a disconnected
      sensor.
      
      I have more extensive patches in the work, but these two trivial ones will
      do for today.  I would like to hear from people who use the ds2490 USB to
      one wire dongle.  1 if you would be willing to test the patches as I
      currently only have the one sensor on a short parisite powered wire, 2 if
      there is any cheap sources for the ds2490.
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80c002dd
    • D
      W1: w1_therm.c ds18b20 decode freezing temperatures correctly · 941ed3b5
      David Fries 提交于
      Correct the decoding of negative C temperatures.  The code did a binary OR
      of two bytes to make a 16 bit value, but assignd it to an integer.  This
      caused the value to not be sign extended and to loose that it was a
      negative number in the assignment.
      
      Before the patch (in my freezer),
      	w1_slave
      	ed fe 4b 46 7f ff 03 10 e4 : crc=e4 YES
      	ed fe 4b 46 7f ff 03 10 e4 t=4078
      With the patch,
      	e3 fe 4b 46 7f ff 0d 10 81 : crc=81 YES
      	e3 fe 4b 46 7f ff 0d 10 81 t=-17
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941ed3b5
  2. 22 1月, 2008 4 次提交
  3. 21 1月, 2008 4 次提交
    • P
      [NET]: rtnl_link: fix use-after-free · 68365458
      Patrick McHardy 提交于
      When unregistering the rtnl_link_ops, all existing devices using
      the ops are destroyed. With nested devices this may lead to a
      use-after-free despite the use of for_each_netdev_safe() in case
      the upper device is next in the device list and is destroyed
      by the NETDEV_UNREGISTER notifier.
      
      The easy fix is to restart scanning the device list after removing
      a device. Alternatively we could add new devices to the front of
      the list to avoid having dependant devices follow the device they
      depend on. A third option would be to only restart scanning if
      dev->iflink of the next device matches dev->ifindex of the current
      one. For now this seems like the safest solution.
      
      With this patch, the veth rtnl_link_ops unregistration can use
      rtnl_link_unregister() directly since it now also handles destruction
      of multiple devices at once.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68365458
    • A
      [ATM] atm/suni.c: Fix section mismatch. · 421c9914
      Adrian Bunk 提交于
      EXPORT_SYMBOL'ed code mustn't be __*init.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      421c9914
    • A
      [ATM] atm/idt77105.c: Fix section mismatch. · 799fa677
      Adrian Bunk 提交于
      EXPORT_SYMBOL'ed code mustn't be __*init.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      799fa677
    • D
      [NET]: Fix interrupt semaphore corruption in Intel drivers. · 49d85c50
      David S. Miller 提交于
      Several of the Intel ethernet drivers keep an atomic counter used to
      manage when to actually hit the hardware with a disable or an enable.
      
      The way the net_rx_work() breakout logic works during a pending
      napi_disable() is that it simply unschedules the poll even if it
      still has work.
      
      This can potentially leave interrupts disabled, but that is OK
      because all of the drivers are about to disable interrupts
      anyways in all such code paths that do a napi_disable().
      
      Unfortunately, this trips up the semaphore used here in the Intel
      drivers.  If you hit this case, when you try to bring the interface
      back up it won't enable interrupts.  A reload of the driver module
      fixes it of course.
      
      So what we do is make sure all the sequences now go:
      
      	napi_disable();
      	atomic_set(&adapter->irq_sem, 0);
      	*_irq_disable();
      
      which makes sure the counter is always in the correct state.
      
      Reported by Robert Olsson.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49d85c50
  4. 20 1月, 2008 2 次提交
  5. 19 1月, 2008 15 次提交