Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: issue DIPM enable commands with LPM state updated
libata: no special completion processing for EH commands
pata_mpc52xx: driver needs BMDMA
pata_cs5536: Add support for non-X86_32 platforms
libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()

+56 -34
+11 -11
drivers/ata/Kconfig
··· 128 128 129 129 If unsure, say N. 130 130 131 - config PATA_MPC52xx 132 - tristate "Freescale MPC52xx SoC internal IDE" 133 - depends on PPC_MPC52xx && PPC_BESTCOMM 134 - select PPC_BESTCOMM_ATA 135 - help 136 - This option enables support for integrated IDE controller 137 - of the Freescale MPC52xx SoC. 138 - 139 - If unsure, say N. 140 - 141 131 config PATA_OCTEON_CF 142 132 tristate "OCTEON Boot Bus Compact Flash support" 143 133 depends on CPU_CAVIUM_OCTEON ··· 356 366 357 367 config PATA_CS5536 358 368 tristate "CS5536 PATA support" 359 - depends on PCI && X86 && !X86_64 369 + depends on PCI 360 370 help 361 371 This option enables support for the AMD CS5536 362 372 companion chip used with the Geode LX processor family. ··· 478 488 controllers. If you wish to use only the SATA ports then select 479 489 the AHCI driver alone. If you wish to the use the PATA port or 480 490 both SATA and PATA include this driver. 491 + 492 + If unsure, say N. 493 + 494 + config PATA_MPC52xx 495 + tristate "Freescale MPC52xx SoC internal IDE" 496 + depends on PPC_MPC52xx && PPC_BESTCOMM 497 + select PPC_BESTCOMM_ATA 498 + help 499 + This option enables support for integrated IDE controller 500 + of the Freescale MPC52xx SoC. 481 501 482 502 If unsure, say N. 483 503
+1 -1
drivers/ata/Makefile
··· 11 11 12 12 # SFF w/ custom DMA 13 13 obj-$(CONFIG_PDC_ADMA) += pdc_adma.o 14 - obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o 15 14 obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o 16 15 obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o 17 16 obj-$(CONFIG_SATA_SX4) += sata_sx4.o ··· 51 52 obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o 52 53 obj-$(CONFIG_PATA_MACIO) += pata_macio.o 53 54 obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o 55 + obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o 54 56 obj-$(CONFIG_PATA_NETCELL) += pata_netcell.o 55 57 obj-$(CONFIG_PATA_NINJA32) += pata_ninja32.o 56 58 obj-$(CONFIG_PATA_NS87415) += pata_ns87415.o
+15 -9
drivers/ata/libata-core.c
··· 4807 4807 { 4808 4808 struct ata_device *dev = qc->dev; 4809 4809 4810 - if (ata_tag_internal(qc->tag)) 4811 - return; 4812 - 4813 4810 if (ata_is_nodata(qc->tf.protocol)) 4814 4811 return; 4815 4812 ··· 4855 4858 if (unlikely(qc->err_mask)) 4856 4859 qc->flags |= ATA_QCFLAG_FAILED; 4857 4860 4858 - if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) { 4859 - /* always fill result TF for failed qc */ 4861 + /* 4862 + * Finish internal commands without any further processing 4863 + * and always with the result TF filled. 4864 + */ 4865 + if (unlikely(ata_tag_internal(qc->tag))) { 4860 4866 fill_result_tf(qc); 4867 + __ata_qc_complete(qc); 4868 + return; 4869 + } 4861 4870 4862 - if (!ata_tag_internal(qc->tag)) 4863 - ata_qc_schedule_eh(qc); 4864 - else 4865 - __ata_qc_complete(qc); 4871 + /* 4872 + * Non-internal qc has failed. Fill the result TF and 4873 + * summon EH. 4874 + */ 4875 + if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) { 4876 + fill_result_tf(qc); 4877 + ata_qc_schedule_eh(qc); 4866 4878 return; 4867 4879 } 4868 4880
+14 -3
drivers/ata/libata-eh.c
··· 3275 3275 struct ata_port *ap = ata_is_host_link(link) ? link->ap : NULL; 3276 3276 struct ata_eh_context *ehc = &link->eh_context; 3277 3277 struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL; 3278 + enum ata_lpm_policy old_policy = link->lpm_policy; 3278 3279 unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM; 3279 3280 unsigned int err_mask; 3280 3281 int rc; ··· 3339 3338 goto fail; 3340 3339 } 3341 3340 3341 + /* 3342 + * Low level driver acked the transition. Issue DIPM command 3343 + * with the new policy set. 3344 + */ 3345 + link->lpm_policy = policy; 3346 + if (ap && ap->slave_link) 3347 + ap->slave_link->lpm_policy = policy; 3348 + 3342 3349 /* host config updated, enable DIPM if transitioning to MIN_POWER */ 3343 3350 ata_for_each_dev(dev, link, ENABLED) { 3344 3351 if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) { ··· 3362 3353 } 3363 3354 } 3364 3355 3365 - link->lpm_policy = policy; 3366 - if (ap && ap->slave_link) 3367 - ap->slave_link->lpm_policy = policy; 3368 3356 return 0; 3369 3357 3370 3358 fail: 3359 + /* restore the old policy */ 3360 + link->lpm_policy = old_policy; 3361 + if (ap && ap->slave_link) 3362 + ap->slave_link->lpm_policy = old_policy; 3363 + 3371 3364 /* if no device or only one more chance is left, disable LPM */ 3372 3365 if (!dev || ehc->tries[dev->devno] <= 2) { 3373 3366 ata_link_printk(link, KERN_WARNING,
+3 -4
drivers/ata/libata-sff.c
··· 1532 1532 if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) 1533 1533 return ata_sff_idle_irq(ap); 1534 1534 break; 1535 - case HSM_ST: 1536 - case HSM_ST_LAST: 1537 - break; 1538 - default: 1535 + case HSM_ST_IDLE: 1539 1536 return ata_sff_idle_irq(ap); 1537 + default: 1538 + break; 1540 1539 } 1541 1540 1542 1541 /* check main status, clearing INTRQ if needed */
+12 -6
drivers/ata/pata_cs5536.c
··· 37 37 #include <linux/delay.h> 38 38 #include <linux/libata.h> 39 39 #include <scsi/scsi_host.h> 40 + 41 + #ifdef CONFIG_X86_32 40 42 #include <asm/msr.h> 43 + static int use_msr; 44 + module_param_named(msr, use_msr, int, 0644); 45 + MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); 46 + #else 47 + #define rdmsr(x, y, z) do { } while (0) 48 + #define wrmsr(x, y, z) do { } while (0) 49 + #define use_msr 0 50 + #endif 41 51 42 52 #define DRV_NAME "pata_cs5536" 43 - #define DRV_VERSION "0.0.7" 53 + #define DRV_VERSION "0.0.8" 44 54 45 55 enum { 46 56 CFG = 0, ··· 85 75 IDE_ETC_NODMA = 0x03, 86 76 }; 87 77 88 - static int use_msr; 89 - 90 78 static const u32 msr_reg[4] = { 91 79 MSR_IDE_CFG, MSR_IDE_DTC, MSR_IDE_CAST, MSR_IDE_ETC, 92 80 }; ··· 96 88 static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) 97 89 { 98 90 if (unlikely(use_msr)) { 99 - u32 dummy; 91 + u32 dummy __maybe_unused; 100 92 101 93 rdmsr(msr_reg[reg], *val, dummy); 102 94 return 0; ··· 302 294 MODULE_LICENSE("GPL"); 303 295 MODULE_DEVICE_TABLE(pci, cs5536); 304 296 MODULE_VERSION(DRV_VERSION); 305 - module_param_named(msr, use_msr, int, 0644); 306 - MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); 307 297 308 298 module_init(cs5536_init); 309 299 module_exit(cs5536_exit);