Lines Matching +full:render +full:- +full:max
2 * Copyright 2003-2005 Red Hat, Inc. All rights reserved.
3 * Copyright 2003-2005 Jeff Garzik
32 #include <linux/dma-mapping.h>
43 * Define if arch has non-standard setup. This is a _PCI_ standard
47 #include <asm/libata-portmap.h>
49 #include <asm-generic/libata-portmap.h>
53 * compile-time options: to be removed as soon as all the drivers are
75 #define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func…
101 #define ata_msg_drv(p) ((p)->msg_enable & ATA_MSG_DRV)
102 #define ata_msg_info(p) ((p)->msg_enable & ATA_MSG_INFO)
103 #define ata_msg_probe(p) ((p)->msg_enable & ATA_MSG_PROBE)
104 #define ata_msg_warn(p) ((p)->msg_enable & ATA_MSG_WARN)
105 #define ata_msg_malloc(p) ((p)->msg_enable & ATA_MSG_MALLOC)
106 #define ata_msg_ctl(p) ((p)->msg_enable & ATA_MSG_CTL)
107 #define ata_msg_intr(p) ((p)->msg_enable & ATA_MSG_INTR)
108 #define ata_msg_err(p) ((p)->msg_enable & ATA_MSG_ERR)
113 return default_msg_enable_bits; /* should be 0x1 - only driver info msgs */ in ata_msg_init()
116 return (1 << dval) - 1; in ata_msg_init()
127 /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */
129 ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1,
134 ATA_ALL_DEVICES = (1 << ATA_MAX_DEVICES) - 1,
138 ATA_SHT_THIS_ID = -1,
151 ATA_DFLAG_CFG_MASK = (1 << 12) - 1,
154 ATA_DFLAG_NCQ_OFF = (1 << 13), /* device limited to non-NCQ mode */
159 ATA_DFLAG_INIT_MASK = (1 << 24) - 1,
199 ATA_FLAG_FPDMA_AA = (1 << 14), /* driver supports Auto-Activate */
211 /* bits 24:31 of ap->flags are reserved for LLD specific flags */
251 /* bits 24:31 of host->flags are reserved for LLD specific flags */
279 /* If PMP is supported, we have to do follow-up SRST. As some
320 /* return values for ->qc_defer */
329 ATA_EH_SOFTRESET = (1 << 1), /* meaningful only in ->prereset */
330 ATA_EH_HARDRESET = (1 << 2), /* meaningful only in ->prereset */
339 /* ata_eh_info->flags */
345 ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */
346 ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */
356 /* max tries if error condition is still set after ->error_handler */
371 * ata_eh_cmd_timeout_table in libata-eh.c.
381 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
406 ATAPI_PASS_THRU = 3, /* SAT pass-thru */
431 ATA_ACPI_FILTER_FPDMA_OFFSET = 1 << 3, /* FPDMA non-zero offset */
440 ATA_MASK_PIO = ((1LU << ATA_NR_PIO_MODES) - 1)
442 ATA_MASK_MWDMA = ((1LU << ATA_NR_MWDMA_MODES) - 1)
444 ATA_MASK_UDMA = ((1LU << ATA_NR_UDMA_MODES) - 1)
473 * alter libata-scsi.c (for the ascii descriptions)
635 unsigned int max_sectors; /* per-device max sectors */
638 /* per-dev xfer mask */
668 unsigned int err_mask; /* port-wide err_mask */
731 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
737 /* Flags that change dynamically, protected by ap->lock */
808 * ERR_PTR(-ENOENT). Unfortunately, ERR_PTR doesn't render a constant
811 #define ATA_OP_NULL (void *)(unsigned long)(-ENOENT)
908 * ->inherits must be the last field and all the preceding
927 unsigned short act8b; /* t2 for 8-bit I/O */
928 unsigned short rec8b; /* t2i for 8-bit I/O */
929 unsigned short cyc8b; /* t0 for 8-bit I/O */
938 * Core layer - drivers/ata/libata-core.c
950 if (ehc->i.flags & ATA_EHI_HOTPLUGGED) in sata_ehc_deb_timing()
958 return ap->ops == &ata_dummy_port_ops; in ata_port_is_dummy()
1101 * ACPI - drivers/ata/libata-acpi.c
1106 if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID) in ata_acpi_init_gtm()
1107 return &ap->__acpi_init_gtm; in ata_acpi_init_gtm()
1124 return -ENOSYS; in ata_acpi_stm()
1130 return -ENOSYS; in ata_acpi_gtm()
1147 * EH - drivers/ata/libata-eh.c
1220 return ap->flags & ATA_FLAG_PMP; in sata_pmp_supported()
1225 return ap->nr_pmp_links != 0; in sata_pmp_attached()
1230 return link == &link->ap->link || link == link->ap->slave_link; in ata_is_host_link()
1251 if (sata_pmp_supported(link->ap) && ata_is_host_link(link)) in sata_srst_pmp()
1253 return link->pmp; in sata_srst_pmp()
1315 ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; in ata_ehi_hotplugged()
1316 ehi->flags |= ATA_EHI_HOTPLUGGED; in ata_ehi_hotplugged()
1317 ehi->action |= ATA_EH_RESET | ATA_EH_ENABLE_LINK; in ata_ehi_hotplugged()
1318 ehi->err_mask |= AC_ERR_ATA_BUS; in ata_ehi_hotplugged()
1363 return ata_class_enabled(dev->class); in ata_dev_enabled()
1368 return ata_class_disabled(dev->class); in ata_dev_disabled()
1373 return ata_class_absent(dev->class); in ata_dev_absent()
1381 if (ata_is_host_link(link) && link->ap->flags & ATA_FLAG_SLAVE_POSS) in ata_link_max_devices()
1388 return ata_tag_valid(link->active_tag) || link->sactive; in ata_link_active()
1438 * impossible to use ATA_LITER_* for device iteration or vice-versa.
1449 * ata_ncq_enabled - Test whether NCQ is enabled
1460 return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF | in ata_ncq_enabled()
1466 qc->tf.ctl |= ATA_NIEN; in ata_qc_set_polling()
1473 return &ap->qcmd[tag]; in __ata_qc_from_tag()
1482 if (unlikely(!qc) || !ap->ops->error_handler) in ata_qc_from_tag()
1485 if ((qc->flags & (ATA_QCFLAG_ACTIVE | in ata_qc_from_tag()
1494 return qc->nbytes - min(qc->extrabytes, qc->nbytes); in ata_qc_raw_nbytes()
1502 tf->ctl = dev->link->ap->ctl; in ata_tf_init()
1504 tf->ctl = ATA_DEVCTL_OBS; in ata_tf_init()
1506 if (dev->devno == 0) in ata_tf_init()
1507 tf->device = ATA_DEVICE_OBS; in ata_tf_init()
1509 tf->device = ATA_DEVICE_OBS | ATA_DEV1; in ata_tf_init()
1514 qc->dma_dir = DMA_NONE; in ata_qc_reinit()
1515 qc->sg = NULL; in ata_qc_reinit()
1516 qc->flags = 0; in ata_qc_reinit()
1517 qc->cursg = NULL; in ata_qc_reinit()
1518 qc->cursg_ofs = 0; in ata_qc_reinit()
1519 qc->nbytes = qc->extrabytes = qc->curbytes = 0; in ata_qc_reinit()
1520 qc->n_elem = 0; in ata_qc_reinit()
1521 qc->err_mask = 0; in ata_qc_reinit()
1522 qc->sect_size = ATA_SECT_SIZE; in ata_qc_reinit()
1524 ata_tf_init(qc->dev, &qc->tf); in ata_qc_reinit()
1527 qc->result_tf.command = ATA_DRDY; in ata_qc_reinit()
1528 qc->result_tf.feature = 0; in ata_qc_reinit()
1533 return ata_id_wcache_enabled(dev->id) || in ata_try_flush_cache()
1534 ata_id_has_flush(dev->id) || in ata_try_flush_cache()
1535 ata_id_has_flush_ext(dev->id); in ata_try_flush_cache()
1557 return *(struct ata_port **)&host->hostdata[0]; in ata_shost_to_port()
1567 return -ENODEV; in ata_check_ready()
1584 if (adev->dma_mode >= XFER_MW_DMA_0 && adev->dma_mode <= XFER_MW_DMA_4) in ata_using_mwdma()
1591 if (adev->dma_mode >= XFER_UDMA_0 && adev->dma_mode <= XFER_UDMA_7) in ata_using_udma()
1598 return (adev->dma_mode == 0xFF ? 0 : 1); in ata_dma_enabled()
1602 * PMP - drivers/ata/libata-pmp.c
1621 * SFF - drivers/ata/libata-sff.c
1732 * ata_sff_busy_wait - Wait for a port status register
1735 * @max: number of 10uS waits to perform
1737 * Waits up to max*10 microseconds for the selected bits in the port's
1745 unsigned int max) in ata_sff_busy_wait() argument
1751 status = ap->ops->sff_check_status(ap); in ata_sff_busy_wait()
1752 max--; in ata_sff_busy_wait()
1753 } while (status != 0xff && (status & bits) && (max > 0)); in ata_sff_busy_wait()
1759 * ata_wait_idle - Wait for a port to be idle.