]> Git Repo - linux.git/commitdiff
Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
authorLinus Torvalds <[email protected]>
Wed, 15 Nov 2017 22:11:41 +0000 (14:11 -0800)
committerLinus Torvalds <[email protected]>
Wed, 15 Nov 2017 22:11:41 +0000 (14:11 -0800)
Pull libata updates from Tejun Heo:
 "Nothing too interesting or alarming. Other than a new power saving
  mode addition to ahci and crash fix on a tracepoint, all changes are
  trivial or device-specific"

* 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits)
  ahci: imx: Handle increased read failures for IMX53 temperature sensor in low frequency mode.
  ata: sata_dwc_460ex: Propagate platform device ID to DMA driver
  ata: fixes kernel crash while tracing ata_eh_link_autopsy event
  ata: pata_pdc2027x: Fix space before '[' error.
  libata: fix spelling mistake: 'ambigious' -> 'ambiguous'
  ata: ceva: Add SMMU support for SATA IP
  ata: ceva: Correct the suspend and resume logic for SATA
  ata: ceva: Correct the AXI bus configuration for SATA ports
  ata: ceva: Add CCI support for SATA if CCI is enabled
  ata: ceva: Make RxWaterMark value as module parameter
  ata: ceva: Disable Device Sleep capability
  ata: ceva: Add gen 3 mode support in driver
  ata: ceva: Move sata port phy oob settings to device-tree
  devicetree: bindings: Add sata port phy config parameters in ahci-ceva
  ata: mark expected switch fall-throughs
  ata: sata_mv: remove a redundant assignment to pointer ehi
  ahci: Add support for Cavium's fifth generation SATA controller
  ata: sata_rcar: Use of_device_get_match_data() helper
  libata: make ata_port_type const
  libata: make static arrays const, reduces object code size
  ...

1  2 
drivers/ata/ahci.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata.h

diff --combined drivers/ata/ahci.c
index 9f78bb03bb763c8ba9577ffce47c405c9fa7fb27,6e26c1c2d18cbc51169aad151cb9693d235c878c..5443cb71d7bac90eec800040b19b88870cf70d04
@@@ -57,6 -57,7 +57,7 @@@ enum 
        AHCI_PCI_BAR_STA2X11    = 0,
        AHCI_PCI_BAR_CAVIUM     = 0,
        AHCI_PCI_BAR_ENMOTUS    = 2,
+       AHCI_PCI_BAR_CAVIUM_GEN5        = 4,
        AHCI_PCI_BAR_STANDARD   = 5,
  };
  
@@@ -621,11 -622,8 +622,11 @@@ static void ahci_pci_save_initial_confi
  static int ahci_pci_reset_controller(struct ata_host *host)
  {
        struct pci_dev *pdev = to_pci_dev(host->dev);
 +      int rc;
  
 -      ahci_reset_controller(host);
 +      rc = ahci_reset_controller(host);
 +      if (rc)
 +              return rc;
  
        if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
                struct ahci_host_priv *hpriv = host->private_data;
@@@ -1570,8 -1568,12 +1571,12 @@@ static int ahci_init_one(struct pci_de
                ahci_pci_bar = AHCI_PCI_BAR_STA2X11;
        else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000)
                ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
-       else if (pdev->vendor == 0x177d && pdev->device == 0xa01c)
-               ahci_pci_bar = AHCI_PCI_BAR_CAVIUM;
+       else if (pdev->vendor == PCI_VENDOR_ID_CAVIUM) {
+               if (pdev->device == 0xa01c)
+                       ahci_pci_bar = AHCI_PCI_BAR_CAVIUM;
+               if (pdev->device == 0xa084)
+                       ahci_pci_bar = AHCI_PCI_BAR_CAVIUM_GEN5;
+       }
  
        /* acquire resources */
        rc = pcim_enable_device(pdev);
index b8ac4902d3122d138e050511648e6c7a81b7c938,36ea7b59e88d21c825f0a2a971c3620938332aae..2a882929de4aa3cfcce6b46de459ee7f7360a075
@@@ -1879,6 -1879,7 +1879,7 @@@ retry
        switch (class) {
        case ATA_DEV_SEMB:
                class = ATA_DEV_ATA;    /* some hard drives report SEMB sig */
+               /* fall through */
        case ATA_DEV_ATA:
        case ATA_DEV_ZAC:
                tf.command = ATA_CMD_ID_ATA;
@@@ -2975,6 -2976,7 +2976,7 @@@ int ata_bus_probe(struct ata_port *ap
        case -ENODEV:
                /* give it just one more chance */
                tries[dev->devno] = min(tries[dev->devno], 1);
+               /* fall through */
        case -EIO:
                if (tries[dev->devno] == 1) {
                        /* This is the last chance, better to slow
@@@ -3462,6 -3464,7 +3464,7 @@@ int ata_down_xfermask_limit(struct ata_
  
        case ATA_DNXFER_FORCE_PIO0:
                pio_mask &= 1;
+               /* fall through */
        case ATA_DNXFER_FORCE_PIO:
                mwdma_mask = 0;
                udma_mask = 0;
@@@ -3964,6 -3967,7 +3967,7 @@@ int sata_link_scr_lpm(struct ata_link *
                scontrol &= ~(0x1 << 8);
                scontrol |= (0x6 << 8);
                break;
+       case ATA_LPM_MED_POWER_WITH_DIPM:
        case ATA_LPM_MIN_POWER:
                if (ata_link_nr_enabled(link) > 0)
                        /* no restrictions on LPM transitions */
@@@ -5823,7 -5827,7 +5827,7 @@@ void ata_host_resume(struct ata_host *h
  }
  #endif
  
- struct device_type ata_port_type = {
const struct device_type ata_port_type = {
        .name = "ata_port",
  #ifdef CONFIG_PM
        .pm = &ata_port_pm_ops,
@@@ -5979,8 -5983,9 +5983,8 @@@ struct ata_port *ata_port_alloc(struct 
        INIT_LIST_HEAD(&ap->eh_done_q);
        init_waitqueue_head(&ap->eh_wait_q);
        init_completion(&ap->park_req_pending);
 -      setup_deferrable_timer(&ap->fastdrain_timer,
 -                             ata_eh_fastdrain_timerfn,
 -                             (unsigned long)ap);
 +      timer_setup(&ap->fastdrain_timer, ata_eh_fastdrain_timerfn,
 +                  TIMER_DEFERRABLE);
  
        ap->cbl = ATA_CBL_NONE;
  
@@@ -6903,7 -6908,7 +6907,7 @@@ static int __init ata_parse_force_one(c
                return -EINVAL;
        }
        if (nr_matches > 1) {
-               *reason = "ambigious value";
+               *reason = "ambiguous value";
                return -EINVAL;
        }
  
diff --combined drivers/ata/libata-eh.c
index ece6fd91a947674f6f9c8cb46e46f5c4c22a1a86,6d45bfa6d6116300533780c69ad58db8aeabf3a4..11c3137d7b0af5dda9cc3c45364f7677d7fa892d
@@@ -879,9 -879,9 +879,9 @@@ static int ata_eh_nr_in_flight(struct a
        return nr;
  }
  
 -void ata_eh_fastdrain_timerfn(unsigned long arg)
 +void ata_eh_fastdrain_timerfn(struct timer_list *t)
  {
 -      struct ata_port *ap = (void *)arg;
 +      struct ata_port *ap = from_timer(ap, t, fastdrain_timer);
        unsigned long flags;
        int cnt;
  
@@@ -2264,8 -2264,8 +2264,8 @@@ static void ata_eh_link_autopsy(struct 
                if (dev->flags & ATA_DFLAG_DUBIOUS_XFER)
                        eflags |= ATA_EFLAG_DUBIOUS_XFER;
                ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask);
+               trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask);
        }
-       trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask);
        DPRINTK("EXIT\n");
  }
  
@@@ -3454,9 -3454,9 +3454,9 @@@ static int ata_eh_maybe_retry_flush(str
   *    @r_failed_dev: out parameter for failed device
   *
   *    Enable SATA Interface power management.  This will enable
-  *    Device Interface Power Management (DIPM) for min_power
-  *    policy, and then call driver specific callbacks for
-  *    enabling Host Initiated Power management.
+  *    Device Interface Power Management (DIPM) for min_power and
+  *    medium_power_with_dipm policies, and then call driver specific
+  *    callbacks for enabling Host Initiated Power management.
   *
   *    LOCKING:
   *    EH context.
@@@ -3502,7 -3502,7 +3502,7 @@@ static int ata_eh_set_lpm(struct ata_li
                        hints &= ~ATA_LPM_HIPM;
  
                /* disable DIPM before changing link config */
-               if (policy != ATA_LPM_MIN_POWER && dipm) {
+               if (policy < ATA_LPM_MED_POWER_WITH_DIPM && dipm) {
                        err_mask = ata_dev_set_feature(dev,
                                        SETFEATURES_SATA_DISABLE, SATA_DIPM);
                        if (err_mask && err_mask != AC_ERR_DEV) {
  
        /* host config updated, enable DIPM if transitioning to MIN_POWER */
        ata_for_each_dev(dev, link, ENABLED) {
-               if (policy == ATA_LPM_MIN_POWER && !no_dipm &&
+               if (policy >= ATA_LPM_MED_POWER_WITH_DIPM && !no_dipm &&
                    ata_id_has_dipm(dev->id)) {
                        err_mask = ata_dev_set_feature(dev,
                                        SETFEATURES_SATA_ENABLE, SATA_DIPM);
@@@ -3711,9 -3711,11 +3711,11 @@@ static int ata_eh_handle_dev_fail(struc
        case -ENODEV:
                /* device missing or wrong IDENTIFY data, schedule probing */
                ehc->i.probe_mask |= (1 << dev->devno);
+               /* fall through */
        case -EINVAL:
                /* give it just one more chance */
                ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
+               /* fall through */
        case -EIO:
                if (ehc->tries[dev->devno] == 1) {
                        /* This is the last chance, better to slow
diff --combined drivers/ata/libata.h
index 08a245b76417b14aec139f1b2f94833d7443002e,18bf1e995a183b793d72b4b1ebe19dc349f67388..f953cb4bb1ba8fe015167d522e08c11b17fa91c7
@@@ -51,7 -51,7 +51,7 @@@ extern int atapi_passthru16
  extern int libata_fua;
  extern int libata_noacpi;
  extern int libata_allow_tpm;
- extern struct device_type ata_port_type;
+ extern const struct device_type ata_port_type;
  extern struct ata_link *ata_dev_phys_link(struct ata_device *dev);
  extern void ata_force_cbl(struct ata_port *ap);
  extern u64 ata_tf_to_lba(const struct ata_taskfile *tf);
@@@ -154,7 -154,7 +154,7 @@@ extern void ata_internal_cmd_timed_out(
  extern void ata_eh_acquire(struct ata_port *ap);
  extern void ata_eh_release(struct ata_port *ap);
  extern void ata_scsi_error(struct Scsi_Host *host);
 -extern void ata_eh_fastdrain_timerfn(unsigned long arg);
 +extern void ata_eh_fastdrain_timerfn(struct timer_list *t);
  extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
  extern void ata_dev_disable(struct ata_device *dev);
  extern void ata_eh_detach_dev(struct ata_device *dev);
This page took 0.266575 seconds and 4 git commands to generate.