aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-24 00:40:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-24 00:40:32 -0500
commit4fa2b1cde0e3797549f711ce9e51c395b3d6d2a7 (patch)
tree312e07715c088d4ed1e79b9b18b1d52e3b585ca9 /drivers
parentbdc08942897f6be33d00bb659761516f4652836d (diff)
parent4cdfa1b3ce4731dd538ac3ed010bcf127ed6e836 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ahci.c23
-rw-r--r--drivers/ata/libata-core.c16
-rw-r--r--drivers/ata/libata-pmp.c4
-rw-r--r--drivers/ata/libata-scsi.c3
-rw-r--r--drivers/ata/pata_atiixp.c4
-rw-r--r--drivers/ata/sata_fsl.c8
6 files changed, 38 insertions, 20 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 6dd12f7019a0..1db93b619074 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -85,6 +85,7 @@ enum {
85 board_ahci_ign_iferr = 2, 85 board_ahci_ign_iferr = 2,
86 board_ahci_sb600 = 3, 86 board_ahci_sb600 = 3,
87 board_ahci_mv = 4, 87 board_ahci_mv = 4,
88 board_ahci_sb700 = 5,
88 89
89 /* global controller registers */ 90 /* global controller registers */
90 HOST_CAP = 0x00, /* host capabilities */ 91 HOST_CAP = 0x00, /* host capabilities */
@@ -442,6 +443,16 @@ static const struct ata_port_info ahci_port_info[] = {
442 .udma_mask = ATA_UDMA6, 443 .udma_mask = ATA_UDMA6,
443 .port_ops = &ahci_ops, 444 .port_ops = &ahci_ops,
444 }, 445 },
446 /* board_ahci_sb700 */
447 {
448 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
449 AHCI_HFLAG_NO_PMP),
450 .flags = AHCI_FLAG_COMMON,
451 .link_flags = AHCI_LFLAG_COMMON,
452 .pio_mask = 0x1f, /* pio0-4 */
453 .udma_mask = ATA_UDMA6,
454 .port_ops = &ahci_ops,
455 },
445}; 456};
446 457
447static const struct pci_device_id ahci_pci_tbl[] = { 458static const struct pci_device_id ahci_pci_tbl[] = {
@@ -484,12 +495,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
484 495
485 /* ATI */ 496 /* ATI */
486 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */ 497 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
487 { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700/800 */ 498 { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, /* ATI SB700/800 */
488 { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700/800 */ 499 { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb700 }, /* ATI SB700/800 */
489 { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700/800 */ 500 { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb700 }, /* ATI SB700/800 */
490 { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700/800 */ 501 { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb700 }, /* ATI SB700/800 */
491 { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb600 }, /* ATI SB700/800 */ 502 { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb700 }, /* ATI SB700/800 */
492 { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb600 }, /* ATI SB700/800 */ 503 { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */
493 504
494 /* VIA */ 505 /* VIA */
495 { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */ 506 { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4cf8662df99e..fbc24358ada0 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -153,7 +153,7 @@ MODULE_VERSION(DRV_VERSION);
153 153
154/** 154/**
155 * ata_force_cbl - force cable type according to libata.force 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 * Force cable type according to libata.force and whine about it. 158 * Force cable type according to libata.force and whine about it.
159 * The last entry which has matching port number is used, so it 159 * The last entry which has matching port number is used, so it
@@ -2396,6 +2396,7 @@ int ata_dev_configure(struct ata_device *dev)
2396 else if (dev->class == ATA_DEV_ATAPI) { 2396 else if (dev->class == ATA_DEV_ATAPI) {
2397 const char *cdb_intr_string = ""; 2397 const char *cdb_intr_string = "";
2398 const char *atapi_an_string = ""; 2398 const char *atapi_an_string = "";
2399 const char *dma_dir_string = "";
2399 u32 sntf; 2400 u32 sntf;
2400 2401
2401 rc = atapi_cdb_len(id); 2402 rc = atapi_cdb_len(id);
@@ -2436,13 +2437,19 @@ int ata_dev_configure(struct ata_device *dev)
2436 cdb_intr_string = ", CDB intr"; 2437 cdb_intr_string = ", CDB intr";
2437 } 2438 }
2438 2439
2440 if (atapi_dmadir || atapi_id_dmadir(dev->id)) {
2441 dev->flags |= ATA_DFLAG_DMADIR;
2442 dma_dir_string = ", DMADIR";
2443 }
2444
2439 /* print device info to dmesg */ 2445 /* print device info to dmesg */
2440 if (ata_msg_drv(ap) && print_info) 2446 if (ata_msg_drv(ap) && print_info)
2441 ata_dev_printk(dev, KERN_INFO, 2447 ata_dev_printk(dev, KERN_INFO,
2442 "ATAPI: %s, %s, max %s%s%s\n", 2448 "ATAPI: %s, %s, max %s%s%s%s\n",
2443 modelbuf, fwrevbuf, 2449 modelbuf, fwrevbuf,
2444 ata_mode_string(xfer_mask), 2450 ata_mode_string(xfer_mask),
2445 cdb_intr_string, atapi_an_string); 2451 cdb_intr_string, atapi_an_string,
2452 dma_dir_string);
2446 } 2453 }
2447 2454
2448 /* determine max_sectors */ 2455 /* determine max_sectors */
@@ -6560,8 +6567,6 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
6560 ata_lpm_enable(host); 6567 ata_lpm_enable(host);
6561 6568
6562 rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); 6569 rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
6563 if (rc == 0)
6564 host->dev->power.power_state = mesg;
6565 return rc; 6570 return rc;
6566} 6571}
6567 6572
@@ -6580,7 +6585,6 @@ void ata_host_resume(struct ata_host *host)
6580{ 6585{
6581 ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, 6586 ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET,
6582 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); 6587 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
6583 host->dev->power.power_state = PMSG_ON;
6584 6588
6585 /* reenable link pm */ 6589 /* reenable link pm */
6586 ata_lpm_disable(host); 6590 ata_lpm_disable(host);
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index caef2bbd4a8a..d91f5090ba9d 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -35,7 +35,7 @@ static unsigned int sata_pmp_read(struct ata_link *link, int reg, u32 *r_val)
35 ata_tf_init(pmp_dev, &tf); 35 ata_tf_init(pmp_dev, &tf);
36 tf.command = ATA_CMD_PMP_READ; 36 tf.command = ATA_CMD_PMP_READ;
37 tf.protocol = ATA_PROT_NODATA; 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 tf.feature = reg; 39 tf.feature = reg;
40 tf.device = link->pmp; 40 tf.device = link->pmp;
41 41
@@ -71,7 +71,7 @@ static unsigned int sata_pmp_write(struct ata_link *link, int reg, u32 val)
71 ata_tf_init(pmp_dev, &tf); 71 ata_tf_init(pmp_dev, &tf);
72 tf.command = ATA_CMD_PMP_WRITE; 72 tf.command = ATA_CMD_PMP_WRITE;
73 tf.protocol = ATA_PROT_NODATA; 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 tf.feature = reg; 75 tf.feature = reg;
76 tf.device = link->pmp; 76 tf.device = link->pmp;
77 tf.nsect = val & 0xff; 77 tf.nsect = val & 0xff;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f888babc8283..0562b0a49f3b 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2582,7 +2582,8 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2582 qc->tf.protocol = ATAPI_PROT_DMA; 2582 qc->tf.protocol = ATAPI_PROT_DMA;
2583 qc->tf.feature |= ATAPI_PKT_DMA; 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 /* some SATA bridges need us to indicate data xfer direction */ 2587 /* some SATA bridges need us to indicate data xfer direction */
2587 qc->tf.feature |= ATAPI_DMADIR; 2588 qc->tf.feature |= ATAPI_DMADIR;
2588 } 2589 }
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 9623f5295530..408bdc1a9776 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -227,7 +227,7 @@ static struct scsi_host_template atiixp_sht = {
227 .queuecommand = ata_scsi_queuecmd, 227 .queuecommand = ata_scsi_queuecmd,
228 .can_queue = ATA_DEF_QUEUE, 228 .can_queue = ATA_DEF_QUEUE,
229 .this_id = ATA_SHT_THIS_ID, 229 .this_id = ATA_SHT_THIS_ID,
230 .sg_tablesize = LIBATA_MAX_PRD, 230 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
231 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 231 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
232 .emulated = ATA_SHT_EMULATED, 232 .emulated = ATA_SHT_EMULATED,
233 .use_clustering = ATA_SHT_USE_CLUSTERING, 233 .use_clustering = ATA_SHT_USE_CLUSTERING,
@@ -259,7 +259,7 @@ static struct ata_port_operations atiixp_port_ops = {
259 .bmdma_stop = atiixp_bmdma_stop, 259 .bmdma_stop = atiixp_bmdma_stop,
260 .bmdma_status = ata_bmdma_status, 260 .bmdma_status = ata_bmdma_status,
261 261
262 .qc_prep = ata_qc_prep, 262 .qc_prep = ata_dumb_qc_prep,
263 .qc_issue = ata_qc_issue_prot, 263 .qc_issue = ata_qc_issue_prot,
264 264
265 .data_xfer = ata_data_xfer, 265 .data_xfer = ata_data_xfer,
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 9323dd0c7d8d..07791a7a48a5 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -335,7 +335,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
335 dma_addr_t indirect_ext_segment_paddr; 335 dma_addr_t indirect_ext_segment_paddr;
336 unsigned int si; 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 indirect_ext_segment_paddr = cmd_desc_paddr + 340 indirect_ext_segment_paddr = cmd_desc_paddr +
341 SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16; 341 SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16;
@@ -459,7 +459,8 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc)
459 VPRINTK("CE=0x%x, DE=0x%x, CC=0x%x, CmdStat = 0x%x\n", 459 VPRINTK("CE=0x%x, DE=0x%x, CC=0x%x, CmdStat = 0x%x\n",
460 ioread32(CE + hcr_base), 460 ioread32(CE + hcr_base),
461 ioread32(DE + hcr_base), 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 return 0; 465 return 0;
465} 466}
@@ -522,7 +523,8 @@ static void sata_fsl_freeze(struct ata_port *ap)
522 ioread32(CQ + hcr_base), 523 ioread32(CQ + hcr_base),
523 ioread32(CA + hcr_base), 524 ioread32(CA + hcr_base),
524 ioread32(CE + hcr_base), ioread32(DE + hcr_base)); 525 ioread32(CE + hcr_base), ioread32(DE + hcr_base));
525 VPRINTK("CmdStat = 0x%x\n", ioread32(csr_base + COMMANDSTAT)); 526 VPRINTK("CmdStat = 0x%x\n",
527 ioread32(host_priv->csr_base + COMMANDSTAT));
526 528
527 /* disable interrupts on the controller/port */ 529 /* disable interrupts on the controller/port */
528 temp = ioread32(hcr_base + HCONTROL); 530 temp = ioread32(hcr_base + HCONTROL);