~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4139
4139
         */
4140
4140
        { "PIONEER DVD-RW  DVRTD08",    "1.00", ATA_HORKAGE_NOSETXFER },
4141
4141
        { "PIONEER DVD-RW  DVR-212D",   "1.28", ATA_HORKAGE_NOSETXFER },
 
4142
        { "PIONEER DVD-RW  DVR-216D",   "1.08", ATA_HORKAGE_NOSETXFER },
4142
4143
 
4143
4144
        /* End Marker */
4144
4145
        { }
4210
4211
                return 0;  /* End of both strings: match */
4211
4212
        return 1;  /* No match */
4212
4213
}
4213
 
 
 
4214
 
4214
4215
static unsigned long ata_dev_blacklisted(const struct ata_device *dev)
4215
4216
{
4216
4217
        unsigned char model_num[ATA_ID_PROD_LEN + 1];
5340
5341
 *
5341
5342
 *      Resume @host.  Actual operation is performed by EH.  This
5342
5343
 *      function requests EH to perform PM operations and returns.
5343
 
 *      Note that all resume operations are performed parallely.
 
5344
 *      Note that all resume operations are performed parallelly.
5344
5345
 *
5345
5346
 *      LOCKING:
5346
5347
 *      Kernel thread context (may sleep).
5479
5480
        ap = kzalloc(sizeof(*ap), GFP_KERNEL);
5480
5481
        if (!ap)
5481
5482
                return NULL;
5482
 
        
5483
 
        ap->pflags |= ATA_PFLAG_INITIALIZING;
 
5483
 
 
5484
        ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;
5484
5485
        ap->lock = &host->lock;
5485
5486
        ap->print_id = -1;
5486
5487
        ap->host = host;
5887
5888
        host->ops = ops;
5888
5889
}
5889
5890
 
5890
 
 
5891
 
static void async_port_probe(void *data, async_cookie_t cookie)
 
5891
int ata_port_probe(struct ata_port *ap)
5892
5892
{
5893
 
        int rc;
5894
 
        struct ata_port *ap = data;
5895
 
 
5896
 
        /*
5897
 
         * If we're not allowed to scan this host in parallel,
5898
 
         * we need to wait until all previous scans have completed
5899
 
         * before going further.
5900
 
         * Jeff Garzik says this is only within a controller, so we
5901
 
         * don't need to wait for port 0, only for later ports.
5902
 
         */
5903
 
        if (!(ap->host->flags & ATA_HOST_PARALLEL_SCAN) && ap->port_no != 0)
5904
 
                async_synchronize_cookie(cookie);
 
5893
        int rc = 0;
5905
5894
 
5906
5895
        /* probe */
5907
5896
        if (ap->ops->error_handler) {
5927
5916
                DPRINTK("ata%u: bus probe begin\n", ap->print_id);
5928
5917
                rc = ata_bus_probe(ap);
5929
5918
                DPRINTK("ata%u: bus probe end\n", ap->print_id);
5930
 
 
5931
 
                if (rc) {
5932
 
                        /* FIXME: do something useful here?
5933
 
                         * Current libata behavior will
5934
 
                         * tear down everything when
5935
 
                         * the module is removed
5936
 
                         * or the h/w is unplugged.
5937
 
                         */
5938
 
                }
5939
5919
        }
 
5920
        return rc;
 
5921
}
 
5922
 
 
5923
 
 
5924
static void async_port_probe(void *data, async_cookie_t cookie)
 
5925
{
 
5926
        struct ata_port *ap = data;
 
5927
 
 
5928
        /*
 
5929
         * If we're not allowed to scan this host in parallel,
 
5930
         * we need to wait until all previous scans have completed
 
5931
         * before going further.
 
5932
         * Jeff Garzik says this is only within a controller, so we
 
5933
         * don't need to wait for port 0, only for later ports.
 
5934
         */
 
5935
        if (!(ap->host->flags & ATA_HOST_PARALLEL_SCAN) && ap->port_no != 0)
 
5936
                async_synchronize_cookie(cookie);
 
5937
 
 
5938
        (void)ata_port_probe(ap);
5940
5939
 
5941
5940
        /* in order to keep device order, we need to synchronize at this point */
5942
5941
        async_synchronize_cookie(cookie);
5943
5942
 
5944
5943
        ata_scsi_scan_host(ap, 1);
 
5944
}
5945
5945
 
5946
 
}
5947
5946
/**
5948
5947
 *      ata_host_register - register initialized ATA host
5949
5948
 *      @host: ATA host to register
5983
5982
        for (i = 0; i < host->n_ports; i++)
5984
5983
                host->ports[i]->print_id = ata_print_id++;
5985
5984
 
5986
 
        
 
5985
 
5987
5986
        /* Create associated sysfs transport objects  */
5988
5987
        for (i = 0; i < host->n_ports; i++) {
5989
5988
                rc = ata_tport_add(host->dev,host->ports[i]);
6471
6470
                ata_sff_exit();
6472
6471
                rc = -ENOMEM;
6473
6472
                goto err_out;
6474
 
        }               
 
6473
        }
6475
6474
 
6476
6475
        printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n");
6477
6476
        return 0;