~ubuntu-branches/ubuntu/karmic/linux-fsl-imx51/karmic

« back to all changes in this revision

Viewing changes to drivers/ata/libata-eh.c

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Andy Whitcroft, Upstream Kernel Changes, Ubuntu: 2.6.31-14.46, Ubuntu: 2.6.31-13.45, Ubuntu: 2.6.31-13.44
  • Date: 2009-10-13 15:59:33 UTC
  • Revision ID: james.westby@ubuntu.com-20091013155933-hxzquigs9nqajd9x
Tags: 2.6.31-105.14
[ Andy Whitcroft ]

* rebase to Ubuntu-2.6.31-14.46
* [Config] update configs since rebase to Ubuntu-2.6.31-14.46
* lirc update dropped module lirc_mceusb2

[ Upstream Kernel Changes ]

* mxc spi: fix spi driver for 2.6.31
  - LP: #427289, #446140

[ Ubuntu: 2.6.31-14.46 ]

* reinstate armel.mk with no flavours
  - LP: #449637
* [Upstream] elevator: fix fastfail checks to allow merge of readahead
  requests
  - LP: #444915
* [Upstream] block: silently error unsupported empty barriers too
  - LP: #420423
* SAUCE: AppArmor: Fix mediation of "deleted" paths
  - LP: #415632
* [Config] CONFIG_X86_MCE
  https://lists.ubuntu.com/archives/kernel-team/2009-October/007584.html
* Revert "appletalk: Fix skb leak when ipddp interface is not loaded,
  CVE-2009-2903" - Use patch from 2.6.31.4 which is slightly different.
* x86: fix csum_ipv6_magic asm memory clobber
* tty: Avoid dropping ldisc_mutex over hangup tty re-initialization
* x86: Don't leak 64-bit kernel register values to 32-bit processes
* tracing: correct module boundaries for ftrace_release
* ftrace: check for failure for all conversions
* futex: fix requeue_pi key imbalance
* futex: Move exit_pi_state() call to release_mm()
* futex: Nullify robust lists after cleanup
* futex: Fix locking imbalance
* NOHZ: update idle state also when NOHZ is inactive
* ima: ecryptfs fix imbalance message
* libata: fix incorrect link online check during probe
* sound: via82xx: move DXS volume controls to PCM interface
* ASoC: WM8350 capture PGA mutes are inverted
* KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID
* KVM: VMX: flush TLB with INVEPT on cpu migration
* KVM: fix LAPIC timer period overflow
* KVM: SVM: Fix tsc offset adjustment when running nested
* KVM: SVM: Handle tsc in svm_get_msr/svm_set_msr correctly
* net: Fix wrong sizeof
* mm: add_to_swap_cache() must not sleep
* sis5513: fix PIO setup for ATAPI devices
* PIT fixes to unbreak suspend/resume (bug #14222)
* IMA: open new file for read
* ACPI: Clarify resource conflict message
* ACPI: fix Compaq Evo N800c (Pentium 4m) boot hang regression
* net: restore tx timestamping for accelerated vlans
* net: unix: fix sending fds in multiple buffers
* tun: Return -EINVAL if neither IFF_TUN nor IFF_TAP is set.
* tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
* net: Fix sock_wfree() race
* smsc95xx: fix transmission where ZLP is expected
* sky2: Set SKY2_HW_RAM_BUFFER in sky2_init
* appletalk: Fix skb leak when ipddp interface is not loaded
* ax25: Fix possible oops in ax25_make_new
* ax25: Fix SIOCAX25GETINFO ioctl
* sit: fix off-by-one in ipip6_tunnel_get_prl
* Linux 2.6.31.4
* drm/i915: Fix FDI M/N setting according with correct color depth
  - LP: #416792

[ Ubuntu: 2.6.31-13.45 ]

* [Config] Add sd_mod to scsi-modules udeb for powerpc
* SAUCE: Update to LIRC 0.8.6
  - LP: #432678
* [Config] CONFIG_X86_PAT=y
  https://lists.ubuntu.com/archives/kernel-team/2009-October/007477.html
  https://lists.ubuntu.com/archives/kernel-team/2009-October/007534.html
* [Config] Add armel arch to linux-libc-dev arches.
  - LP: #449637
* e1000e: swap max hw supported frame size between 82574 and 82583
* drm/i915: Initialize HDMI outputs as HDMI connectors, not DVI.
  - LP: #392017
* ALSA: hda - Add quirks for some HP laptops
  - LP: #449742
* ALSA: hda - Add support for HP dv6
  - LP: #449742

[ Ubuntu: 2.6.31-13.44 ]

* sgi-gru: Fix kernel stack buffer overrun, CVE-2009-2584
* appletalk: Fix skb leak when ipddp interface is not loaded,
  CVE-2009-2903
  Note - This patch causes an ABI change in the symbol aarp_send_ddp
  which I'm ignoring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2541
2541
                dev->pio_mode = XFER_PIO_0;
2542
2542
                dev->flags &= ~ATA_DFLAG_SLEEPING;
2543
2543
 
2544
 
                if (!ata_phys_link_offline(ata_dev_phys_link(dev))) {
2545
 
                        /* apply class override */
2546
 
                        if (lflags & ATA_LFLAG_ASSUME_ATA)
2547
 
                                classes[dev->devno] = ATA_DEV_ATA;
2548
 
                        else if (lflags & ATA_LFLAG_ASSUME_SEMB)
2549
 
                                classes[dev->devno] = ATA_DEV_SEMB_UNSUP;
2550
 
                } else
2551
 
                        classes[dev->devno] = ATA_DEV_NONE;
 
2544
                if (ata_phys_link_offline(ata_dev_phys_link(dev)))
 
2545
                        continue;
 
2546
 
 
2547
                /* apply class override */
 
2548
                if (lflags & ATA_LFLAG_ASSUME_ATA)
 
2549
                        classes[dev->devno] = ATA_DEV_ATA;
 
2550
                else if (lflags & ATA_LFLAG_ASSUME_SEMB)
 
2551
                        classes[dev->devno] = ATA_DEV_SEMB_UNSUP;
2552
2552
        }
2553
2553
 
2554
2554
        /* record current link speed */
2581
2581
                slave->eh_info.serror = 0;
2582
2582
        spin_unlock_irqrestore(link->ap->lock, flags);
2583
2583
 
2584
 
        /* Make sure onlineness and classification result correspond.
 
2584
        /*
 
2585
         * Make sure onlineness and classification result correspond.
2585
2586
         * Hotplug could have happened during reset and some
2586
2587
         * controllers fail to wait while a drive is spinning up after
2587
2588
         * being hotplugged causing misdetection.  By cross checking
2588
 
         * link onlineness and classification result, those conditions
2589
 
         * can be reliably detected and retried.
 
2589
         * link on/offlineness and classification result, those
 
2590
         * conditions can be reliably detected and retried.
2590
2591
         */
2591
2592
        nr_unknown = 0;
2592
2593
        ata_for_each_dev(dev, link, ALL) {
2593
 
                /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */
2594
 
                if (classes[dev->devno] == ATA_DEV_UNKNOWN) {
2595
 
                        classes[dev->devno] = ATA_DEV_NONE;
2596
 
                        if (ata_phys_link_online(ata_dev_phys_link(dev)))
 
2594
                if (ata_phys_link_online(ata_dev_phys_link(dev))) {
 
2595
                        if (classes[dev->devno] == ATA_DEV_UNKNOWN) {
 
2596
                                ata_dev_printk(dev, KERN_DEBUG, "link online "
 
2597
                                               "but device misclassifed\n");
 
2598
                                classes[dev->devno] = ATA_DEV_NONE;
2597
2599
                                nr_unknown++;
 
2600
                        }
 
2601
                } else if (ata_phys_link_offline(ata_dev_phys_link(dev))) {
 
2602
                        if (ata_class_enabled(classes[dev->devno]))
 
2603
                                ata_dev_printk(dev, KERN_DEBUG, "link offline, "
 
2604
                                               "clearing class %d to NONE\n",
 
2605
                                               classes[dev->devno]);
 
2606
                        classes[dev->devno] = ATA_DEV_NONE;
 
2607
                } else if (classes[dev->devno] == ATA_DEV_UNKNOWN) {
 
2608
                        ata_dev_printk(dev, KERN_DEBUG, "link status unknown, "
 
2609
                                       "clearing UNKNOWN to NONE\n");
 
2610
                        classes[dev->devno] = ATA_DEV_NONE;
2598
2611
                }
2599
2612
        }
2600
2613
 
2601
2614
        if (classify && nr_unknown) {
2602
2615
                if (try < max_tries) {
2603
2616
                        ata_link_printk(link, KERN_WARNING, "link online but "
2604
 
                                       "device misclassified, retrying\n");
 
2617
                                        "%d devices misclassified, retrying\n",
 
2618
                                        nr_unknown);
2605
2619
                        failed_link = link;
2606
2620
                        rc = -EAGAIN;
2607
2621
                        goto fail;
2608
2622
                }
2609
2623
                ata_link_printk(link, KERN_WARNING,
2610
 
                               "link online but device misclassified, "
2611
 
                               "device detection might fail\n");
 
2624
                                "link online but %d devices misclassified, "
 
2625
                                "device detection might fail\n", nr_unknown);
2612
2626
        }
2613
2627
 
2614
2628
        /* reset successful, schedule revalidation */