diff options
| -rw-r--r-- | MAINTAINERS | 75 | ||||
| -rw-r--r-- | drivers/ata/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/ata/ahci.c | 1 | ||||
| -rw-r--r-- | drivers/ata/ahci_xgene.c | 14 | ||||
| -rw-r--r-- | drivers/ata/libahci.c | 2 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 36 | ||||
| -rw-r--r-- | drivers/ata/libata-eh.c | 1 | ||||
| -rw-r--r-- | drivers/ata/libata-scsi.c | 10 | ||||
| -rw-r--r-- | drivers/ata/libata-sff.c | 12 | ||||
| -rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 26 | ||||
| -rw-r--r-- | drivers/ata/sata_sil24.c | 2 | ||||
| -rw-r--r-- | include/linux/libata.h | 2 |
12 files changed, 118 insertions, 64 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 64e13d5c1e65..93409ade65a5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -754,13 +754,6 @@ L: linux-media@vger.kernel.org | |||
| 754 | S: Maintained | 754 | S: Maintained |
| 755 | F: drivers/media/i2c/aptina-pll.* | 755 | F: drivers/media/i2c/aptina-pll.* |
| 756 | 756 | ||
| 757 | ARASAN COMPACT FLASH PATA CONTROLLER | ||
| 758 | M: Viresh Kumar <viresh.linux@gmail.com> | ||
| 759 | L: linux-ide@vger.kernel.org | ||
| 760 | S: Maintained | ||
| 761 | F: include/linux/pata_arasan_cf_data.h | ||
| 762 | F: drivers/ata/pata_arasan_cf.c | ||
| 763 | |||
| 764 | ARC FRAMEBUFFER DRIVER | 757 | ARC FRAMEBUFFER DRIVER |
| 765 | M: Jaya Kumar <jayalk@intworks.biz> | 758 | M: Jaya Kumar <jayalk@intworks.biz> |
| 766 | S: Maintained | 759 | S: Maintained |
| @@ -5704,6 +5697,49 @@ F: drivers/lguest/ | |||
| 5704 | F: include/linux/lguest*.h | 5697 | F: include/linux/lguest*.h |
| 5705 | F: tools/lguest/ | 5698 | F: tools/lguest/ |
| 5706 | 5699 | ||
| 5700 | LIBATA SUBSYSTEM (Serial and Parallel ATA drivers) | ||
| 5701 | M: Tejun Heo <tj@kernel.org> | ||
| 5702 | L: linux-ide@vger.kernel.org | ||
| 5703 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 5704 | S: Maintained | ||
| 5705 | F: drivers/ata/ | ||
| 5706 | F: include/linux/ata.h | ||
| 5707 | F: include/linux/libata.h | ||
| 5708 | |||
| 5709 | LIBATA PATA ARASAN COMPACT FLASH CONTROLLER | ||
| 5710 | M: Viresh Kumar <viresh.linux@gmail.com> | ||
| 5711 | L: linux-ide@vger.kernel.org | ||
| 5712 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 5713 | S: Maintained | ||
| 5714 | F: include/linux/pata_arasan_cf_data.h | ||
| 5715 | F: drivers/ata/pata_arasan_cf.c | ||
| 5716 | |||
| 5717 | LIBATA PATA DRIVERS | ||
| 5718 | M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | ||
| 5719 | M: Tejun Heo <tj@kernel.org> | ||
| 5720 | L: linux-ide@vger.kernel.org | ||
| 5721 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 5722 | S: Maintained | ||
| 5723 | F: drivers/ata/pata_*.c | ||
| 5724 | F: drivers/ata/ata_generic.c | ||
| 5725 | |||
| 5726 | LIBATA SATA AHCI PLATFORM devices support | ||
| 5727 | M: Hans de Goede <hdegoede@redhat.com> | ||
| 5728 | M: Tejun Heo <tj@kernel.org> | ||
| 5729 | L: linux-ide@vger.kernel.org | ||
| 5730 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 5731 | S: Maintained | ||
| 5732 | F: drivers/ata/ahci_platform.c | ||
| 5733 | F: drivers/ata/libahci_platform.c | ||
| 5734 | F: include/linux/ahci_platform.h | ||
| 5735 | |||
| 5736 | LIBATA SATA PROMISE TX2/TX4 CONTROLLER DRIVER | ||
| 5737 | M: Mikael Pettersson <mikpelinux@gmail.com> | ||
| 5738 | L: linux-ide@vger.kernel.org | ||
| 5739 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 5740 | S: Maintained | ||
| 5741 | F: drivers/ata/sata_promise.* | ||
| 5742 | |||
| 5707 | LIBLOCKDEP | 5743 | LIBLOCKDEP |
| 5708 | M: Sasha Levin <sasha.levin@oracle.com> | 5744 | M: Sasha Levin <sasha.levin@oracle.com> |
| 5709 | S: Maintained | 5745 | S: Maintained |
| @@ -7578,12 +7614,6 @@ W: http://wireless.kernel.org/en/users/Drivers/p54 | |||
| 7578 | S: Obsolete | 7614 | S: Obsolete |
| 7579 | F: drivers/net/wireless/prism54/ | 7615 | F: drivers/net/wireless/prism54/ |
| 7580 | 7616 | ||
| 7581 | PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER | ||
| 7582 | M: Mikael Pettersson <mikpelinux@gmail.com> | ||
| 7583 | L: linux-ide@vger.kernel.org | ||
| 7584 | S: Maintained | ||
| 7585 | F: drivers/ata/sata_promise.* | ||
| 7586 | |||
| 7587 | PS3 NETWORK SUPPORT | 7617 | PS3 NETWORK SUPPORT |
| 7588 | M: Geoff Levand <geoff@infradead.org> | 7618 | M: Geoff Levand <geoff@infradead.org> |
| 7589 | L: netdev@vger.kernel.org | 7619 | L: netdev@vger.kernel.org |
| @@ -8557,25 +8587,6 @@ S: Maintained | |||
| 8557 | F: drivers/misc/phantom.c | 8587 | F: drivers/misc/phantom.c |
| 8558 | F: include/uapi/linux/phantom.h | 8588 | F: include/uapi/linux/phantom.h |
| 8559 | 8589 | ||
| 8560 | SERIAL ATA (SATA) SUBSYSTEM | ||
| 8561 | M: Tejun Heo <tj@kernel.org> | ||
| 8562 | L: linux-ide@vger.kernel.org | ||
| 8563 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 8564 | S: Supported | ||
| 8565 | F: drivers/ata/ | ||
| 8566 | F: include/linux/ata.h | ||
| 8567 | F: include/linux/libata.h | ||
| 8568 | |||
| 8569 | SERIAL ATA AHCI PLATFORM devices support | ||
| 8570 | M: Hans de Goede <hdegoede@redhat.com> | ||
| 8571 | M: Tejun Heo <tj@kernel.org> | ||
| 8572 | L: linux-ide@vger.kernel.org | ||
| 8573 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
| 8574 | S: Supported | ||
| 8575 | F: drivers/ata/ahci_platform.c | ||
| 8576 | F: drivers/ata/libahci_platform.c | ||
| 8577 | F: include/linux/ahci_platform.h | ||
| 8578 | |||
| 8579 | SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER | 8590 | SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER |
| 8580 | M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> | 8591 | M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> |
| 8581 | L: linux-scsi@vger.kernel.org | 8592 | L: linux-scsi@vger.kernel.org |
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index a3a13605a9c4..5f601553b9b0 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
| @@ -835,6 +835,7 @@ config PATA_AT32 | |||
| 835 | config PATA_AT91 | 835 | config PATA_AT91 |
| 836 | tristate "PATA support for AT91SAM9260" | 836 | tristate "PATA support for AT91SAM9260" |
| 837 | depends on ARM && SOC_AT91SAM9 | 837 | depends on ARM && SOC_AT91SAM9 |
| 838 | depends on !ARCH_MULTIPLATFORM | ||
| 838 | help | 839 | help |
| 839 | This option enables support for IDE devices on the Atmel AT91SAM9260 SoC. | 840 | This option enables support for IDE devices on the Atmel AT91SAM9260 SoC. |
| 840 | 841 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 49f1e6890587..33bb06e006c9 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -325,7 +325,6 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 325 | { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ | 325 | { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ |
| 326 | { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ | 326 | { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ |
| 327 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ | 327 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ |
| 328 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */ | ||
| 329 | { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ | 328 | { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ |
| 330 | { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */ | 329 | { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */ |
| 331 | { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ | 330 | { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ |
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index feeb8f1e2fe8..cbcd20810355 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c | |||
| @@ -125,10 +125,11 @@ static int xgene_ahci_restart_engine(struct ata_port *ap) | |||
| 125 | * xgene_ahci_qc_issue - Issue commands to the device | 125 | * xgene_ahci_qc_issue - Issue commands to the device |
| 126 | * @qc: Command to issue | 126 | * @qc: Command to issue |
| 127 | * | 127 | * |
| 128 | * Due to Hardware errata for IDENTIFY DEVICE command, the controller cannot | 128 | * Due to Hardware errata for IDENTIFY DEVICE command and PACKET |
| 129 | * clear the BSY bit after receiving the PIO setup FIS. This results in the dma | 129 | * command of ATAPI protocol set, the controller cannot clear the BSY bit |
| 130 | * state machine goes into the CMFatalErrorUpdate state and locks up. By | 130 | * after receiving the PIO setup FIS. This results in the DMA state machine |
| 131 | * restarting the dma engine, it removes the controller out of lock up state. | 131 | * going into the CMFatalErrorUpdate state and locks up. By restarting the |
| 132 | * DMA engine, it removes the controller out of lock up state. | ||
| 132 | */ | 133 | */ |
| 133 | static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) | 134 | static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) |
| 134 | { | 135 | { |
| @@ -137,7 +138,8 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) | |||
| 137 | struct xgene_ahci_context *ctx = hpriv->plat_data; | 138 | struct xgene_ahci_context *ctx = hpriv->plat_data; |
| 138 | int rc = 0; | 139 | int rc = 0; |
| 139 | 140 | ||
| 140 | if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA)) | 141 | if (unlikely((ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA) || |
| 142 | (ctx->last_cmd[ap->port_no] == ATA_CMD_PACKET))) | ||
| 141 | xgene_ahci_restart_engine(ap); | 143 | xgene_ahci_restart_engine(ap); |
| 142 | 144 | ||
| 143 | rc = ahci_qc_issue(qc); | 145 | rc = ahci_qc_issue(qc); |
| @@ -188,7 +190,7 @@ static unsigned int xgene_ahci_read_id(struct ata_device *dev, | |||
| 188 | * | 190 | * |
| 189 | * Clear reserved bit 8 (DEVSLP bit) as we don't support DEVSLP | 191 | * Clear reserved bit 8 (DEVSLP bit) as we don't support DEVSLP |
| 190 | */ | 192 | */ |
| 191 | id[ATA_ID_FEATURE_SUPP] &= ~(1 << 8); | 193 | id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8)); |
| 192 | 194 | ||
| 193 | return 0; | 195 | return 0; |
| 194 | } | 196 | } |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 97683e45ab04..61a9c07e0dff 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -2003,7 +2003,7 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep) | |||
| 2003 | 2003 | ||
| 2004 | devslp = readl(port_mmio + PORT_DEVSLP); | 2004 | devslp = readl(port_mmio + PORT_DEVSLP); |
| 2005 | if (!(devslp & PORT_DEVSLP_DSP)) { | 2005 | if (!(devslp & PORT_DEVSLP_DSP)) { |
| 2006 | dev_err(ap->host->dev, "port does not support device sleep\n"); | 2006 | dev_info(ap->host->dev, "port does not support device sleep\n"); |
| 2007 | return; | 2007 | return; |
| 2008 | } | 2008 | } |
| 2009 | 2009 | ||
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 5c84fb5c3372..d1a05f9bb91f 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -4233,10 +4233,33 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
| 4233 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, | 4233 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, |
| 4234 | 4234 | ||
| 4235 | /* devices that don't properly handle queued TRIM commands */ | 4235 | /* devices that don't properly handle queued TRIM commands */ |
| 4236 | { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4236 | { "Micron_M[56]*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | |
| 4237 | { "Crucial_CT???M500SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4237 | ATA_HORKAGE_ZERO_AFTER_TRIM, }, |
| 4238 | { "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4238 | { "Crucial_CT*SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, |
| 4239 | { "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4239 | |
| 4240 | /* | ||
| 4241 | * As defined, the DRAT (Deterministic Read After Trim) and RZAT | ||
| 4242 | * (Return Zero After Trim) flags in the ATA Command Set are | ||
| 4243 | * unreliable in the sense that they only define what happens if | ||
| 4244 | * the device successfully executed the DSM TRIM command. TRIM | ||
| 4245 | * is only advisory, however, and the device is free to silently | ||
| 4246 | * ignore all or parts of the request. | ||
| 4247 | * | ||
| 4248 | * Whitelist drives that are known to reliably return zeroes | ||
| 4249 | * after TRIM. | ||
| 4250 | */ | ||
| 4251 | |||
| 4252 | /* | ||
| 4253 | * The intel 510 drive has buggy DRAT/RZAT. Explicitly exclude | ||
| 4254 | * that model before whitelisting all other intel SSDs. | ||
| 4255 | */ | ||
| 4256 | { "INTEL*SSDSC2MH*", NULL, 0, }, | ||
| 4257 | |||
| 4258 | { "INTEL*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
| 4259 | { "SSD*INTEL*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
| 4260 | { "Samsung*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
| 4261 | { "SAMSUNG*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
| 4262 | { "ST[1248][0248]0[FH]*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
| 4240 | 4263 | ||
| 4241 | /* | 4264 | /* |
| 4242 | * Some WD SATA-I drives spin up and down erratically when the link | 4265 | * Some WD SATA-I drives spin up and down erratically when the link |
| @@ -4748,7 +4771,10 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) | |||
| 4748 | return NULL; | 4771 | return NULL; |
| 4749 | 4772 | ||
| 4750 | for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { | 4773 | for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { |
| 4751 | tag = tag < max_queue ? tag : 0; | 4774 | if (ap->flags & ATA_FLAG_LOWTAG) |
| 4775 | tag = i; | ||
| 4776 | else | ||
| 4777 | tag = tag < max_queue ? tag : 0; | ||
| 4752 | 4778 | ||
| 4753 | /* the last tag is reserved for internal command. */ | 4779 | /* the last tag is reserved for internal command. */ |
| 4754 | if (tag == ATA_TAG_INTERNAL) | 4780 | if (tag == ATA_TAG_INTERNAL) |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 3dbec8954c86..8d00c2638bed 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -2389,6 +2389,7 @@ const char *ata_get_cmd_descript(u8 command) | |||
| 2389 | 2389 | ||
| 2390 | return NULL; | 2390 | return NULL; |
| 2391 | } | 2391 | } |
| 2392 | EXPORT_SYMBOL_GPL(ata_get_cmd_descript); | ||
| 2392 | 2393 | ||
| 2393 | /** | 2394 | /** |
| 2394 | * ata_eh_link_report - report error handling to user | 2395 | * ata_eh_link_report - report error handling to user |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e364e86e84d7..6abd17a85b13 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -2532,13 +2532,15 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) | |||
| 2532 | rbuf[15] = lowest_aligned; | 2532 | rbuf[15] = lowest_aligned; |
| 2533 | 2533 | ||
| 2534 | if (ata_id_has_trim(args->id)) { | 2534 | if (ata_id_has_trim(args->id)) { |
| 2535 | rbuf[14] |= 0x80; /* TPE */ | 2535 | rbuf[14] |= 0x80; /* LBPME */ |
| 2536 | 2536 | ||
| 2537 | if (ata_id_has_zero_after_trim(args->id)) | 2537 | if (ata_id_has_zero_after_trim(args->id) && |
| 2538 | rbuf[14] |= 0x40; /* TPRZ */ | 2538 | dev->horkage & ATA_HORKAGE_ZERO_AFTER_TRIM) { |
| 2539 | ata_dev_info(dev, "Enabling discard_zeroes_data\n"); | ||
| 2540 | rbuf[14] |= 0x40; /* LBPRZ */ | ||
| 2541 | } | ||
| 2539 | } | 2542 | } |
| 2540 | } | 2543 | } |
| 2541 | |||
| 2542 | return 0; | 2544 | return 0; |
| 2543 | } | 2545 | } |
| 2544 | 2546 | ||
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index db90aa35cb71..2e86e3b85266 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
| @@ -1333,7 +1333,19 @@ void ata_sff_flush_pio_task(struct ata_port *ap) | |||
| 1333 | DPRINTK("ENTER\n"); | 1333 | DPRINTK("ENTER\n"); |
| 1334 | 1334 | ||
| 1335 | cancel_delayed_work_sync(&ap->sff_pio_task); | 1335 | cancel_delayed_work_sync(&ap->sff_pio_task); |
| 1336 | |||
| 1337 | /* | ||
| 1338 | * We wanna reset the HSM state to IDLE. If we do so without | ||
| 1339 | * grabbing the port lock, critical sections protected by it which | ||
| 1340 | * expect the HSM state to stay stable may get surprised. For | ||
| 1341 | * example, we may set IDLE in between the time | ||
| 1342 | * __ata_sff_port_intr() checks for HSM_ST_IDLE and before it calls | ||
| 1343 | * ata_sff_hsm_move() causing ata_sff_hsm_move() to BUG(). | ||
| 1344 | */ | ||
| 1345 | spin_lock_irq(ap->lock); | ||
| 1336 | ap->hsm_task_state = HSM_ST_IDLE; | 1346 | ap->hsm_task_state = HSM_ST_IDLE; |
| 1347 | spin_unlock_irq(ap->lock); | ||
| 1348 | |||
| 1337 | ap->sff_pio_task_link = NULL; | 1349 | ap->sff_pio_task_link = NULL; |
| 1338 | 1350 | ||
| 1339 | if (ata_msg_ctl(ap)) | 1351 | if (ata_msg_ctl(ap)) |
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index c7ddef89e7b0..8e8248179d20 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
| @@ -797,7 +797,7 @@ static int dma_dwc_init(struct sata_dwc_device *hsdev, int irq) | |||
| 797 | if (err) { | 797 | if (err) { |
| 798 | dev_err(host_pvt.dwc_dev, "%s: dma_request_interrupts returns" | 798 | dev_err(host_pvt.dwc_dev, "%s: dma_request_interrupts returns" |
| 799 | " %d\n", __func__, err); | 799 | " %d\n", __func__, err); |
| 800 | goto error_out; | 800 | return err; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | /* Enabe DMA */ | 803 | /* Enabe DMA */ |
| @@ -808,11 +808,6 @@ static int dma_dwc_init(struct sata_dwc_device *hsdev, int irq) | |||
| 808 | sata_dma_regs); | 808 | sata_dma_regs); |
| 809 | 809 | ||
| 810 | return 0; | 810 | return 0; |
| 811 | |||
| 812 | error_out: | ||
| 813 | dma_dwc_exit(hsdev); | ||
| 814 | |||
| 815 | return err; | ||
| 816 | } | 811 | } |
| 817 | 812 | ||
| 818 | static int sata_dwc_scr_read(struct ata_link *link, unsigned int scr, u32 *val) | 813 | static int sata_dwc_scr_read(struct ata_link *link, unsigned int scr, u32 *val) |
| @@ -1662,7 +1657,7 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1662 | char *ver = (char *)&versionr; | 1657 | char *ver = (char *)&versionr; |
| 1663 | u8 *base = NULL; | 1658 | u8 *base = NULL; |
| 1664 | int err = 0; | 1659 | int err = 0; |
| 1665 | int irq, rc; | 1660 | int irq; |
| 1666 | struct ata_host *host; | 1661 | struct ata_host *host; |
| 1667 | struct ata_port_info pi = sata_dwc_port_info[0]; | 1662 | struct ata_port_info pi = sata_dwc_port_info[0]; |
| 1668 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 1663 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
| @@ -1725,7 +1720,7 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1725 | if (irq == NO_IRQ) { | 1720 | if (irq == NO_IRQ) { |
| 1726 | dev_err(&ofdev->dev, "no SATA DMA irq\n"); | 1721 | dev_err(&ofdev->dev, "no SATA DMA irq\n"); |
| 1727 | err = -ENODEV; | 1722 | err = -ENODEV; |
| 1728 | goto error_out; | 1723 | goto error_iomap; |
| 1729 | } | 1724 | } |
| 1730 | 1725 | ||
| 1731 | /* Get physical SATA DMA register base address */ | 1726 | /* Get physical SATA DMA register base address */ |
| @@ -1734,14 +1729,16 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1734 | dev_err(&ofdev->dev, "ioremap failed for AHBDMA register" | 1729 | dev_err(&ofdev->dev, "ioremap failed for AHBDMA register" |
| 1735 | " address\n"); | 1730 | " address\n"); |
| 1736 | err = -ENODEV; | 1731 | err = -ENODEV; |
| 1737 | goto error_out; | 1732 | goto error_iomap; |
| 1738 | } | 1733 | } |
| 1739 | 1734 | ||
| 1740 | /* Save dev for later use in dev_xxx() routines */ | 1735 | /* Save dev for later use in dev_xxx() routines */ |
| 1741 | host_pvt.dwc_dev = &ofdev->dev; | 1736 | host_pvt.dwc_dev = &ofdev->dev; |
| 1742 | 1737 | ||
| 1743 | /* Initialize AHB DMAC */ | 1738 | /* Initialize AHB DMAC */ |
| 1744 | dma_dwc_init(hsdev, irq); | 1739 | err = dma_dwc_init(hsdev, irq); |
| 1740 | if (err) | ||
| 1741 | goto error_dma_iomap; | ||
| 1745 | 1742 | ||
| 1746 | /* Enable SATA Interrupts */ | 1743 | /* Enable SATA Interrupts */ |
| 1747 | sata_dwc_enable_interrupts(hsdev); | 1744 | sata_dwc_enable_interrupts(hsdev); |
| @@ -1759,9 +1756,8 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1759 | * device discovery process, invoking our port_start() handler & | 1756 | * device discovery process, invoking our port_start() handler & |
| 1760 | * error_handler() to execute a dummy Softreset EH session | 1757 | * error_handler() to execute a dummy Softreset EH session |
| 1761 | */ | 1758 | */ |
| 1762 | rc = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht); | 1759 | err = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht); |
| 1763 | 1760 | if (err) | |
| 1764 | if (rc != 0) | ||
| 1765 | dev_err(&ofdev->dev, "failed to activate host"); | 1761 | dev_err(&ofdev->dev, "failed to activate host"); |
| 1766 | 1762 | ||
| 1767 | dev_set_drvdata(&ofdev->dev, host); | 1763 | dev_set_drvdata(&ofdev->dev, host); |
| @@ -1770,7 +1766,8 @@ static int sata_dwc_probe(struct platform_device *ofdev) | |||
| 1770 | error_out: | 1766 | error_out: |
| 1771 | /* Free SATA DMA resources */ | 1767 | /* Free SATA DMA resources */ |
| 1772 | dma_dwc_exit(hsdev); | 1768 | dma_dwc_exit(hsdev); |
| 1773 | 1769 | error_dma_iomap: | |
| 1770 | iounmap((void __iomem *)host_pvt.sata_dma_regs); | ||
| 1774 | error_iomap: | 1771 | error_iomap: |
| 1775 | iounmap(base); | 1772 | iounmap(base); |
| 1776 | error_kmalloc: | 1773 | error_kmalloc: |
| @@ -1791,6 +1788,7 @@ static int sata_dwc_remove(struct platform_device *ofdev) | |||
| 1791 | /* Free SATA DMA resources */ | 1788 | /* Free SATA DMA resources */ |
| 1792 | dma_dwc_exit(hsdev); | 1789 | dma_dwc_exit(hsdev); |
| 1793 | 1790 | ||
| 1791 | iounmap((void __iomem *)host_pvt.sata_dma_regs); | ||
| 1794 | iounmap(hsdev->reg_base); | 1792 | iounmap(hsdev->reg_base); |
| 1795 | kfree(hsdev); | 1793 | kfree(hsdev); |
| 1796 | kfree(host); | 1794 | kfree(host); |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index d81b20ddb527..ea655949023f 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
| @@ -246,7 +246,7 @@ enum { | |||
| 246 | /* host flags */ | 246 | /* host flags */ |
| 247 | SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA | | 247 | SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA | |
| 248 | ATA_FLAG_NCQ | ATA_FLAG_ACPI_SATA | | 248 | ATA_FLAG_NCQ | ATA_FLAG_ACPI_SATA | |
| 249 | ATA_FLAG_AN | ATA_FLAG_PMP, | 249 | ATA_FLAG_AN | ATA_FLAG_PMP | ATA_FLAG_LOWTAG, |
| 250 | SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */ | 250 | SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */ |
| 251 | 251 | ||
| 252 | IRQ_STAT_4PORTS = 0xf, | 252 | IRQ_STAT_4PORTS = 0xf, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 2d182413b1db..91f705de2c0b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -231,6 +231,7 @@ enum { | |||
| 231 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity | 231 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity |
| 232 | * led */ | 232 | * led */ |
| 233 | ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ | 233 | ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ |
| 234 | ATA_FLAG_LOWTAG = (1 << 24), /* host wants lowest available tag */ | ||
| 234 | 235 | ||
| 235 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 236 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
| 236 | 237 | ||
| @@ -422,6 +423,7 @@ enum { | |||
| 422 | ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ | 423 | ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ |
| 423 | ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */ | 424 | ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */ |
| 424 | ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ | 425 | ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ |
| 426 | ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */ | ||
| 425 | 427 | ||
| 426 | /* DMA mask for user DMA control: User visible values; DO NOT | 428 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 427 | renumber */ | 429 | renumber */ |
