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-core: fix kernel-doc warning
sata_fsl: fix build with ATA_VERBOSE_DEBUG
[libata] ahci: AMD SB700/SB800 SATA support 64bit DMA
libata-pmp: clear hob for pmp register accesses
libata: automatically use DMADIR if drive/bridge requires it
power_state: get rid of write-only variable in SATA
pata_atiixp: Use 255 sector limit

+44 -20
+17 -6
drivers/ata/ahci.c
··· 85 85 board_ahci_ign_iferr = 2, 86 86 board_ahci_sb600 = 3, 87 87 board_ahci_mv = 4, 88 + board_ahci_sb700 = 5, 88 89 89 90 /* global controller registers */ 90 91 HOST_CAP = 0x00, /* host capabilities */ ··· 443 442 .udma_mask = ATA_UDMA6, 444 443 .port_ops = &ahci_ops, 445 444 }, 445 + /* board_ahci_sb700 */ 446 + { 447 + AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | 448 + AHCI_HFLAG_NO_PMP), 449 + .flags = AHCI_FLAG_COMMON, 450 + .link_flags = AHCI_LFLAG_COMMON, 451 + .pio_mask = 0x1f, /* pio0-4 */ 452 + .udma_mask = ATA_UDMA6, 453 + .port_ops = &ahci_ops, 454 + }, 446 455 }; 447 456 448 457 static const struct pci_device_id ahci_pci_tbl[] = { ··· 495 484 496 485 /* ATI */ 497 486 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */ 498 - { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700/800 */ 499 - { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700/800 */ 500 - { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700/800 */ 501 - { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700/800 */ 502 - { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb600 }, /* ATI SB700/800 */ 503 - { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb600 }, /* ATI SB700/800 */ 487 + { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, /* ATI SB700/800 */ 488 + { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb700 }, /* ATI SB700/800 */ 489 + { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb700 }, /* ATI SB700/800 */ 490 + { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb700 }, /* ATI SB700/800 */ 491 + { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb700 }, /* ATI SB700/800 */ 492 + { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ 504 493 505 494 /* VIA */ 506 495 { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */
+10 -6
drivers/ata/libata-core.c
··· 153 153 154 154 /** 155 155 * ata_force_cbl - force cable type according to libata.force 156 - * @link: ATA link of interest 156 + * @ap: ATA port of interest 157 157 * 158 158 * Force cable type according to libata.force and whine about it. 159 159 * The last entry which has matching port number is used, so it ··· 2396 2396 else if (dev->class == ATA_DEV_ATAPI) { 2397 2397 const char *cdb_intr_string = ""; 2398 2398 const char *atapi_an_string = ""; 2399 + const char *dma_dir_string = ""; 2399 2400 u32 sntf; 2400 2401 2401 2402 rc = atapi_cdb_len(id); ··· 2437 2436 cdb_intr_string = ", CDB intr"; 2438 2437 } 2439 2438 2439 + if (atapi_dmadir || atapi_id_dmadir(dev->id)) { 2440 + dev->flags |= ATA_DFLAG_DMADIR; 2441 + dma_dir_string = ", DMADIR"; 2442 + } 2443 + 2440 2444 /* print device info to dmesg */ 2441 2445 if (ata_msg_drv(ap) && print_info) 2442 2446 ata_dev_printk(dev, KERN_INFO, 2443 - "ATAPI: %s, %s, max %s%s%s\n", 2447 + "ATAPI: %s, %s, max %s%s%s%s\n", 2444 2448 modelbuf, fwrevbuf, 2445 2449 ata_mode_string(xfer_mask), 2446 - cdb_intr_string, atapi_an_string); 2450 + cdb_intr_string, atapi_an_string, 2451 + dma_dir_string); 2447 2452 } 2448 2453 2449 2454 /* determine max_sectors */ ··· 6567 6560 ata_lpm_enable(host); 6568 6561 6569 6562 rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); 6570 - if (rc == 0) 6571 - host->dev->power.power_state = mesg; 6572 6563 return rc; 6573 6564 } 6574 6565 ··· 6585 6580 { 6586 6581 ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, 6587 6582 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); 6588 - host->dev->power.power_state = PMSG_ON; 6589 6583 6590 6584 /* reenable link pm */ 6591 6585 ata_lpm_disable(host);
+2 -2
drivers/ata/libata-pmp.c
··· 35 35 ata_tf_init(pmp_dev, &tf); 36 36 tf.command = ATA_CMD_PMP_READ; 37 37 tf.protocol = ATA_PROT_NODATA; 38 - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 38 + tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; 39 39 tf.feature = reg; 40 40 tf.device = link->pmp; 41 41 ··· 71 71 ata_tf_init(pmp_dev, &tf); 72 72 tf.command = ATA_CMD_PMP_WRITE; 73 73 tf.protocol = ATA_PROT_NODATA; 74 - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 74 + tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; 75 75 tf.feature = reg; 76 76 tf.device = link->pmp; 77 77 tf.nsect = val & 0xff;
+2 -1
drivers/ata/libata-scsi.c
··· 2582 2582 qc->tf.protocol = ATAPI_PROT_DMA; 2583 2583 qc->tf.feature |= ATAPI_PKT_DMA; 2584 2584 2585 - if (atapi_dmadir && (scmd->sc_data_direction != DMA_TO_DEVICE)) 2585 + if ((dev->flags & ATA_DFLAG_DMADIR) && 2586 + (scmd->sc_data_direction != DMA_TO_DEVICE)) 2586 2587 /* some SATA bridges need us to indicate data xfer direction */ 2587 2588 qc->tf.feature |= ATAPI_DMADIR; 2588 2589 }
+2 -2
drivers/ata/pata_atiixp.c
··· 227 227 .queuecommand = ata_scsi_queuecmd, 228 228 .can_queue = ATA_DEF_QUEUE, 229 229 .this_id = ATA_SHT_THIS_ID, 230 - .sg_tablesize = LIBATA_MAX_PRD, 230 + .sg_tablesize = LIBATA_DUMB_MAX_PRD, 231 231 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 232 232 .emulated = ATA_SHT_EMULATED, 233 233 .use_clustering = ATA_SHT_USE_CLUSTERING, ··· 259 259 .bmdma_stop = atiixp_bmdma_stop, 260 260 .bmdma_status = ata_bmdma_status, 261 261 262 - .qc_prep = ata_qc_prep, 262 + .qc_prep = ata_dumb_qc_prep, 263 263 .qc_issue = ata_qc_issue_prot, 264 264 265 265 .data_xfer = ata_data_xfer,
+5 -3
drivers/ata/sata_fsl.c
··· 335 335 dma_addr_t indirect_ext_segment_paddr; 336 336 unsigned int si; 337 337 338 - VPRINTK("SATA FSL : cd = 0x%x, prd = 0x%x\n", cmd_desc, prd); 338 + VPRINTK("SATA FSL : cd = 0x%p, prd = 0x%p\n", cmd_desc, prd); 339 339 340 340 indirect_ext_segment_paddr = cmd_desc_paddr + 341 341 SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16; ··· 459 459 VPRINTK("CE=0x%x, DE=0x%x, CC=0x%x, CmdStat = 0x%x\n", 460 460 ioread32(CE + hcr_base), 461 461 ioread32(DE + hcr_base), 462 - ioread32(CC + hcr_base), ioread32(COMMANDSTAT + csr_base)); 462 + ioread32(CC + hcr_base), 463 + ioread32(COMMANDSTAT + host_priv->csr_base)); 463 464 464 465 return 0; 465 466 } ··· 523 522 ioread32(CQ + hcr_base), 524 523 ioread32(CA + hcr_base), 525 524 ioread32(CE + hcr_base), ioread32(DE + hcr_base)); 526 - VPRINTK("CmdStat = 0x%x\n", ioread32(csr_base + COMMANDSTAT)); 525 + VPRINTK("CmdStat = 0x%x\n", 526 + ioread32(host_priv->csr_base + COMMANDSTAT)); 527 527 528 528 /* disable interrupts on the controller/port */ 529 529 temp = ioread32(hcr_base + HCONTROL);
+5
include/linux/ata.h
··· 659 659 return (dev_id[0] >> 8) & 0x1f; 660 660 } 661 661 662 + static inline int atapi_id_dmadir(const u16 *dev_id) 663 + { 664 + return ata_id_major_version(dev_id) >= 7 && (dev_id[62] & 0x8000); 665 + } 666 + 662 667 static inline int is_multi_taskfile(struct ata_taskfile *tf) 663 668 { 664 669 return (tf->command == ATA_CMD_READ_MULTI) ||
+1
include/linux/libata.h
··· 138 138 ATA_DFLAG_AN = (1 << 7), /* AN configured */ 139 139 ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ 140 140 ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ 141 + ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ 141 142 ATA_DFLAG_CFG_MASK = (1 << 12) - 1, 142 143 143 144 ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */