Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/ata/ata_piix.c
static int ich_pata_cable_detect(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); struct piix_host_priv *hpriv = ap->host->private_data; const struct ich_laptop *lap = &ich_laptop[0]; u8 mask; while (lap->device) { if (lap->device == pdev->device && lap->subvendor == pdev-...
[ 1, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static void piix_sidpr_sel(struct ata_link *link, unsigned int reg) { struct ata_port *ap = link->ap; struct piix_host_priv *hpriv = ap->host->private_data; iowrite32(((ap->port_no * 2 + link->pmp) << 8) | piix_sidx_map[reg], hpriv->sidpr + PIIX_SIDPR_IDX); }
[ 1, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static int piix_sidpr_scr_write(struct ata_link *link, unsigned int reg, u32 val) { struct piix_host_priv *hpriv = link->ap->host->private_data; if (reg >= ARRAY_SIZE(piix_sidx_map)) return -EINVAL; piix_sidpr_sel(link, reg); iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);...
[ 1, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static int piix_sidpr_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, unsigned hints) { return sata_link_scr_lpm(link, policy, false); }
[ 0, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static bool piix_irq_check(struct ata_port *ap) { unsigned char host_stat; if (unlikely(!ap->ioaddr.bmdma_addr)) return false; host_stat = ap->ops->bmdma_status(ap); trace_ata_bmdma_status(ap, host_stat); return host_stat & ATA_DMA_INTR; } #ifdef CONFIG_PM_SLEEP
[ 0, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static void piix_iocfg_bit18_quirk(struct ata_host *host) { static const struct dmi_system_id sysids[] = { { .ident = "M570U", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."), DMI_MATCH(DMI_PRODUCT_NAME, "M570U"), }, ...
[ 0, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static bool piix_broken_system_poweroff(struct pci_dev *pdev) { static const struct dmi_system_id broken_systems[] = { { .ident = "HP Compaq 2510p", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), DMI_MATCH(DMI_PRODUCT_NAME, "HP Co...
[ 0, 0 ]
Linux Kernel
drivers/ata/ata_piix.c
static void piix_ignore_devices_quirk(struct ata_host *host) { #if IS_ENABLED(CONFIG_HYPERV_STORAGE) static const struct dmi_system_id ignore_hyperv[] = { { .ident = "Hyper-V Virtual Machine", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), ...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static ssize_t ahci_show_host_caps(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); struct ahci_host_priv *hpriv = ap->host->private_data; return sprintf(buf, "%x\n"...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static ssize_t ahci_show_host_cap2(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); struct ahci_host_priv *hpriv = ap->host->private_data; return sprintf(buf, "%x\n"...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static ssize_t ahci_store_em_buffer(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); struct ahci_host_priv *hpriv...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
void ahci_start_engine(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); u32 tmp; tmp = readl(port_mmio + PORT_CMD); tmp |= PORT_CMD_START; writel(tmp, port_mmio + PORT_CMD); readl(port_mmio + PORT_CMD); /* flush */ }
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_start_port(struct ata_port *ap) { struct ahci_host_priv *hpriv = ap->host->private_data; struct ahci_port_priv *pp = ap->private_data; struct ata_link *link; struct ahci_em_priv *emp; ssize_t rc; int i; ahci_start_fis_rx(ap); /* enable DMA */ if (!(hpriv->flags & AHCI_HFLAG_DELAY_EN...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_sw_activity(struct ata_link *link) { struct ata_port *ap = link->ap; struct ahci_port_priv *pp = ap->private_data; struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; if (!(link->flags & ATA_LFLAG_SW_ACTIVITY)) return; emp->activity++; if (!timer_pending(&emp->timer)) mod_timer(&...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, size_t size) { unsigned int state; int pmp; struct ahci_port_priv *pp = ap->private_data; struct ahci_em_priv *emp; if (kstrtouint(buf, 0, &state) < 0) return -EINVAL; pmp = (state & EM_MSG_LED_PMP_SLOT) ...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static ssize_t ahci_activity_show(struct ata_device *dev, char *buf) { struct ata_link *link = dev->link; struct ata_port *ap = link->ap; struct ahci_port_priv *pp = ap->private_data; struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; return sprintf(buf, "%d\n", emp->blink_policy); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_dev_config(struct ata_device *dev) { struct ahci_host_priv *hpriv = dev->link->ap->host->private_data; if (hpriv->flags & AHCI_HFLAG_SECT255) { dev->max_sectors = 255; ata_dev_info(dev, "SB600 AHCI: limiting to 255 sectors per cmd\n"); } }
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, u32 opts) { dma_addr_t cmd_tbl_dma; cmd_tbl_dma = pp->cmd_tbl_dma + tag * AHCI_CMD_TBL_SZ; pp->cmd_slot[tag].opts = cpu_to_le32(opts); pp->cmd_slot[tag].status = 0; pp->cmd_slot[tag].tbl_addr = cpu_to_le32(cmd_tbl_dma & 0xffffffff); pp-...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, struct ata_taskfile *tf, int is_cmd, u16 flags, unsigned long timeout_msec) { const u32 cmd_fis_len = 5; struct ahci_port_priv *pp = ap->private_data; void __iomem *port_mmio = ahci_port_b...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
int ahci_check_ready(struct ata_link *link) { void __iomem *port_mmio = ahci_port_base(link->ap); u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; return ata_check_ready(status); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
int ahci_do_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline, bool *online) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); struct ata_port *ap = link->ap; struct ahci_port_priv *pp = ap->private_data; struct ahci_host_priv *hpriv = ap->h...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static int ahci_pmp_qc_defer(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct ahci_port_priv *pp = ap->private_data; if (!sata_pmp_attached(ap) || pp->fbs_enabled) return ata_std_qc_defer(qc); else return sata_pmp_qc_defer_cmd_switch(qc); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_fbs_dec_intr(struct ata_port *ap) { struct ahci_port_priv *pp = ap->private_data; void __iomem *port_mmio = ahci_port_base(ap); u32 fbs = readl(port_mmio + PORT_FBS); int retries = 3; BUG_ON(!pp->fbs_enabled); writel(fbs | PORT_FBS_DEC, port_mmio + PORT_FBS); fbs = readl(port_mmio + POR...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
unsigned int ahci_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; void __iomem *port_mmio = ahci_port_base(ap); struct ahci_port_priv *pp = ap->private_data; pp->active_link = qc->dev->link; if (ata_is_ncq(qc->tf.protocol)) writel(1 << qc->hw_tag, port_mmio + PORT_SCR_ACT); if (pp...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_thaw(struct ata_port *ap) { struct ahci_host_priv *hpriv = ap->host->private_data; void __iomem *mmio = hpriv->mmio; void __iomem *port_mmio = ahci_port_base(ap); u32 tmp; struct ahci_port_priv *pp = ap->private_data; tmp = readl(port_mmio + PORT_IRQ_STAT); writel(tmp, port_mmio + PORT_I...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; if (qc->flags & ATA_QCFLAG_FAILED) ahci_kick_engine(ap); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
static void ahci_disable_fbs(struct ata_port *ap) { struct ahci_host_priv *hpriv = ap->host->private_data; struct ahci_port_priv *pp = ap->private_data; void __iomem *port_mmio = ahci_port_base(ap); u32 fbs; int rc; if (!pp->fbs_supported) return; fbs = readl(port_mmio + PORT_FBS); if ((fbs & POR...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
int ahci_port_resume(struct ata_port *ap) { ahci_rpm_get_port(ap); ahci_power_up(ap); ahci_start_port(ap); if (sata_pmp_attached(ap)) ahci_pmp_attach(ap); else ahci_pmp_detach(ap); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci.c
void ahci_set_em_messages(struct ahci_host_priv *hpriv, struct ata_port_info *pi) { u8 messages; void __iomem *mmio = hpriv->mmio; u32 em_loc = readl(mmio + HOST_EM_LOC); u32 em_ctl = readl(mmio + HOST_EM_CTL); if (!ahci_em_messages || !(hpriv->cap & HOST_CAP_EMS)) return; me...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci.c
int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht) { struct ahci_host_priv *hpriv = host->private_data; int irq = hpriv->irq; int rc; if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) { if (hpriv->irq_handler && hpriv->irq_handler != ahci_single_level_irq_intr) dev_warn(host->dev, "...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
int ahci_platform_enable_clks(struct ahci_host_priv *hpriv) { return clk_bulk_prepare_enable(hpriv->n_clks, hpriv->clks); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv) { int rc, i; rc = regulator_enable(hpriv->ahci_regulator); if (rc) return rc; rc = regulator_enable(hpriv->phy_regulator); if (rc) goto disable_ahci_pwrs; for (i = 0; i < hpriv->nports; i++) { if (!hpriv->target_pwrs[i]) ...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
int ahci_platform_enable_resources(struct ahci_host_priv *hpriv) { int rc; rc = ahci_platform_enable_regulators(hpriv); if (rc) return rc; rc = ahci_platform_enable_clks(hpriv); if (rc) goto disable_regulator; rc = ahci_platform_deassert_rsts(hpriv); if (rc) goto disable_clks; rc = ahci_...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
static void ahci_platform_put_resources(struct device *dev, void *res) { struct ahci_host_priv *hpriv = res; int c; if (hpriv->got_runtime_pm) { pm_runtime_put_sync(dev); pm_runtime_disable(dev); } for (c = 0; c < hpriv->nports; c++) if (hpriv->target_pwrs && hpriv->target_pwrs[c]) regulat...
[ 1, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port, struct device *dev) { struct regulator *target_pwr; int rc = 0; target_pwr = regulator_get(dev, "target"); if (!IS_ERR(target_pwr)) hpriv->target_pwrs[port] = target_pwr; else rc = ...
[ 0, 0 ]
Linux Kernel
drivers/ata/libahci_platform.c
void ahci_platform_shutdown(struct platform_device *pdev) { struct ata_host *host = platform_get_drvdata(pdev); struct ahci_host_priv *hpriv = host->private_data; void __iomem *mmio = hpriv->mmio; int i; for (i = 0; i < host->n_ports; i++) { struct ata_port *ap = host->ports[i]; if (ap->ops->freeze)...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
static void ata_acpi_clear_gtf(struct ata_device *dev) { kfree(dev->gtf_cache); dev->gtf_cache = NULL; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
static int ata_acpi_dev_notify_dock(struct acpi_device *adev, u32 event) { struct ata_device *dev = ata_hotplug_data(adev->hp).dev; ata_acpi_handle_hotplug(dev->link->ap, dev, event); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
static void ata_acpi_uevent(struct ata_port *ap, struct ata_device *dev, u32 event) { struct kobject *kobj = NULL; char event_string[20]; char *envp[] = {event_string, NULL}; if (dev) { if (dev->sdev) kobj = &dev->sdev->sdev_gendev.kobj; } else kobj = &ap->dev->kobj...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
void ata_acpi_bind_dev(struct ata_device *dev) { struct ata_port *ap = dev->link->ap; struct acpi_device *port_companion = ACPI_COMPANION(&ap->tdev); struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev); struct acpi_device *parent, *adev; struct ata_acpi_hotplug_context *context; u64 adr; i...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
static int ata_acpi_exec_tfs(struct ata_device *dev, int *nr_executed) { struct ata_acpi_gtf *gtf = NULL, *pgtf = NULL; int gtf_count, i, rc; rc = ata_dev_get_GTF(dev, &gtf); if (rc < 0) return rc; gtf_count = rc; /* execute them */ for (i = 0; i < gtf_count; i++, gtf++) { rc = ata_acpi_run_tf(d...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
static int ata_acpi_push_id(struct ata_device *dev) { struct ata_port *ap = dev->link->ap; acpi_status status; struct acpi_object_list input; union acpi_object in_params[1]; ata_dev_dbg(dev, "%s: ix = %d, port#: %d\n", __func__, dev->devno, ap->port_no); /* _SDD: set up input parameters */ ...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-acpi.c
void ata_acpi_set_state(struct ata_port *ap, pm_message_t state) { if (ap->flags & ATA_FLAG_ACPI_SATA) sata_acpi_set_state(ap, state); else pata_acpi_set_state(ap, state); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_force_xfermask(struct ata_device *dev) { int devno = dev->link->pmp + dev->devno; int alt_devno = devno; int i; if (ata_is_host_link(dev->link)) alt_devno += 15; for (i = ata_force_tbl_size - 1; i >= 0; i--) { const struct ata_force_ent *fe = &ata_force_tbl[i]; unsigned int pio_m...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_force_horkage(struct ata_device *dev) { int devno = dev->link->pmp + dev->devno; int alt_devno = devno; int i; if (ata_is_host_link(dev->link)) alt_devno += 15; for (i = 0; i < ata_force_tbl_size; i++) { const struct ata_force_ent *fe = &ata_force_tbl[i]; if (fe->port != -1 && f...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static inline void ata_force_xfermask(struct ata_device *dev) {}
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
const char *sata_spd_string(unsigned int spd) { static const char *const spd_str[] = { "1.5 Gbps", "3.0 Gbps", "6.0 Gbps", }; if (spd == 0 || (spd - 1) >= ARRAY_SIZE(spd_str)) return "<unknown>"; return spd_str[spd - 1]; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
unsigned int ata_dev_classify(const struct ata_taskfile *tf) { if (tf->lbam == 0 && tf->lbah == 0) return ATA_DEV_ATA; if (tf->lbam == 0x14 && tf->lbah == 0xeb) return ATA_DEV_ATAPI; if (tf->lbam == 0x69 && tf->lbah == 0x96) return ATA_DEV_PMP; if (tf->lbam == 0x3c && tf->lbah == 0xc3) retur...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_id_c_string(const u16 *id, unsigned char *s, unsigned int ofs, unsigned int len) { unsigned char *p; ata_id_string(id, s, ofs, len - 1); p = s + strnlen(s, len - 1); while (p > s && p[-1] == ' ') p--; *p = '\0'; }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
u64 ata_tf_to_lba48(const struct ata_taskfile *tf) { u64 sectors = 0; sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40; sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32; sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24; sectors |= (tf->lbah & 0xff) << 16; sectors |= (tf->lbam & 0xff) << 8; sectors |= (tf->lbal &...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static inline void ata_dump_id(struct ata_device *dev, const u16 *id) { ata_dev_dbg(dev, "49==0x%04x 53==0x%04x 63==0x%04x 64==0x%04x 75==0x%04x\n" "80==0x%04x 81==0x%04x 82==0x%04x 83==0x%04x 84==0x%04x\n" "88==0x%04x 93==0x%04x\n", id[49], id[53], id[...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
unsigned int ata_id_xfermask(const u16 *id) { unsigned int pio_mask, mwdma_mask, udma_mask; if (id[ATA_ID_FIELD_VALID] & (1 << 1)) { pio_mask = id[ATA_ID_PIO_MODES] & 0x03; pio_mask <<= 3; pio_mask |= 0x7; } else { /* If word 64 isn't valid then Word 51 high byte holds * the PIO timing numbe...
[ 1, 1 ]
Linux Kernel
drivers/ata/libata-core.c
static int ata_log_supported(struct ata_device *dev, u8 log) { struct ata_port *ap = dev->link->ap; if (dev->horkage & ATA_HORKAGE_NO_LOG_DIR) return 0; if (ata_read_log_page(dev, ATA_LOG_DIRECTORY, 0, ap->sector_buf, 1)) return 0; return get_unaligned_le16(&ap->sector_buf[log * 2]); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_dev_config_sense_reporting(struct ata_device *dev) { unsigned int err_mask; if (!ata_id_has_sense_reporting(dev->id)) return; if (ata_id_sense_reporting_enabled(dev->id)) return; err_mask = ata_dev_set_feature(dev, SETFEATURE_SENSE_DATA, 0x1); if (err_mask) { ata_dev_dbg(dev, "...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_dev_config_zac(struct ata_device *dev) { struct ata_port *ap = dev->link->ap; unsigned int err_mask; u8 *identify_buf = ap->sector_buf; dev->zac_zones_optimal_open = U32_MAX; dev->zac_zones_optimal_nonseq = U32_MAX; dev->zac_zones_max_open = U32_MAX; if (dev->class == ATA_DEV_ZAC) de...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_dev_config_trusted(struct ata_device *dev) { struct ata_port *ap = dev->link->ap; u64 trusted_cap; unsigned int err; if (!ata_id_has_trusted(dev->id)) return; if (!ata_identify_page_supported(dev, ATA_LOG_SECURITY)) { ata_dev_warn(dev, "Security Log not supported\n"); return; ...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static int ata_dev_config_lba(struct ata_device *dev) { const u16 *id = dev->id; const char *lba_desc; char ncq_desc[24]; int ret; dev->flags |= ATA_DFLAG_LBA; if (ata_id_has_lba48(id)) { lba_desc = "LBA48"; dev->flags |= ATA_DFLAG_LBA48; if (dev->n_sectors >= (1UL << 28) && ata_id_has_flush_e...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_dev_config_cpr(struct ata_device *dev) { unsigned int err_mask; size_t buf_len; int i, nr_cpr = 0; struct ata_cpr_log *cpr_log = NULL; u8 *desc, *buf = NULL; if (ata_id_major_version(dev->id) < 11) goto out; buf_len = ata_log_supported(dev, ATA_LOG_CONCURRENT_POSITIONING_RANGES); i...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void sata_print_link_status(struct ata_link *link) { u32 sstatus, scontrol, tmp; if (sata_scr_read(link, SCR_STATUS, &sstatus)) return; if (sata_scr_read(link, SCR_CONTROL, &scontrol)) return; if (ata_phys_link_online(link)) { tmp = (sstatus >> 4) & 0xf; ata_link_info(link, "SATA link u...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int sata_down_spd_limit(struct ata_link *link, u32 spd_limit) { u32 sstatus, spd, mask; int rc, bit; if (!sata_scr_valid(link)) return -EOPNOTSUPP; rc = sata_scr_read(link, SCR_STATUS, &sstatus); if (rc == 0 && ata_sstatus_online(sstatus)) spd = (sstatus >> 4) & 0xf; else spd = link->sata_spd;...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
u8 ata_timing_cycle2mode(unsigned int xfer_shift, int cycle) { u8 base_mode = 0xff, last_mode = 0xff; const struct ata_xfer_ent *ent; const struct ata_timing *t; for (ent = ata_xfer_tbl; ent->shift >= 0; ent++) if (ent->shift == xfer_shift) base_mode = ent->base; for (t = ata_timing_find_mode(base...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int sata_std_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); bool online; int rc; rc = sata_link_hardreset(link, timing, deadline, &online, NULL); return online ? -EAGAIN : rc; }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_std_postreset(struct ata_link *link, unsigned int *classes) { u32 serror; if (!sata_scr_read(link, SCR_ERROR, &serror)) sata_scr_write(link, SCR_ERROR, serror); /* print link status */ sata_print_link_status(link); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static int ata_dma_blacklisted(const struct ata_device *dev) { if ((dev->link->ap->flags & ATA_FLAG_PIO_POLLING) && (dev->flags & ATA_DFLAG_CDB_INTR)) return 1; return (dev->horkage & ATA_HORKAGE_NODMA) ? 1 : 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static int ata_is_40wire(struct ata_device *dev) { if (dev->horkage & ATA_HORKAGE_IVB) return ata_drive_40wire_relaxed(dev->id); return ata_drive_40wire(dev->id); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int atapi_check_dma(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; if (!(qc->dev->horkage & ATA_HORKAGE_ATAPI_MOD16_DMA) && unlikely(qc->nbytes & 15)) return 1; if (ap->ops->check_atapi_dma) return ap->ops->check_atapi_dma(qc); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int ata_std_qc_defer(struct ata_queued_cmd *qc) { struct ata_link *link = qc->dev->link; if (ata_is_ncq(qc->tf.protocol)) { if (!ata_tag_valid(link->active_tag)) return 0; } else { if (!ata_tag_valid(link->active_tag) && !link->sactive) return 0; } return ATA_DEFER_LINK; }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
enum ata_completion_errors ata_noop_qc_prep(struct ata_queued_cmd *qc) { return AC_ERR_OK; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
bool ata_link_online(struct ata_link *link) { struct ata_link *slave = link->ap->slave_link; WARN_ON(link == slave); return ata_phys_link_online(link) || (slave && ata_phys_link_online(slave)); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static int ata_port_pm_poweroff(struct device *dev) { ata_port_suspend(to_ata_port(dev), PMSG_HIBERNATE); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void ata_port_resume(struct ata_port *ap, pm_message_t mesg) { ata_port_request_pm(ap, mesg, ATA_EH_RESET, ata_port_resume_ehi, false); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_host_suspend(struct ata_host *host, pm_message_t mesg) { host->dev->power.power_state = mesg; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp) { int i; memset((void *)link + ATA_LINK_CLEAR_BEGIN, 0, ATA_LINK_CLEAR_END - ATA_LINK_CLEAR_BEGIN); link->ap = ap; link->pmp = pmp; link->active_tag = ATA_TAG_POISON; link->hw_sata_spd_limit = UINT_MAX; /* can't use iterat...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
struct ata_port *ata_port_alloc(struct ata_host *host) { struct ata_port *ap; ap = kzalloc(sizeof(*ap), GFP_KERNEL); if (!ap) return NULL; ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN; ap->lock = &host->lock; ap->print_id = -1; ap->local_port_no = -1; ap->host = host; ap->dev = host->...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
struct ata_host *ata_host_alloc(struct device *dev, int max_ports) { struct ata_host *host; size_t sz; int i; void *dr; sz = sizeof(struct ata_host) + (max_ports + 1) * sizeof(void *); host = kzalloc(sz, GFP_KERNEL); if (!host) return NULL; if (!devres_open_group(dev, NULL, GFP_KERNEL)) goto e...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
struct ata_host *ata_host_alloc_pinfo(struct device *dev, const struct ata_port_info *const *ppi, int n_ports) { const struct ata_port_info *pi = &ata_dummy_port_info; struct ata_host *host; int i, j; host = ata_host_alloc(dev, n_ports...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int ata_host_start(struct ata_host *host) { int have_stop = 0; void *start_dr = NULL; int i, rc; if (host->flags & ATA_HOST_STARTED) return 0; ata_finalize_port_ops(host->ops); for (i = 0; i < host->n_ports; i++) { struct ata_port *ap = host->ports[i]; ata_finalize_port_ops(ap->ops); if...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_host_detach(struct ata_host *host) { int i; for (i = 0; i < host->n_ports; i++) { async_synchronize_cookie(host->ports[i]->cookie + 1); ata_port_detach(host->ports[i]); } /* the host is dead now, dissociate ACPI */ ata_acpi_dissociate(host); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_pci_remove_one(struct pci_dev *pdev) { struct ata_host *host = pci_get_drvdata(pdev); ata_host_detach(host); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int ata_pci_device_resume(struct pci_dev *pdev) { struct ata_host *host = pci_get_drvdata(pdev); int rc; rc = ata_pci_device_do_resume(pdev); if (rc == 0) ata_host_resume(host); return rc; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static inline void ata_parse_force_param(void) {}
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static void __exit ata_exit(void) { ata_release_transport(ata_scsi_transport_template); libata_transport_exit(); ata_sff_exit(); ata_free_force_param(); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
int ata_ratelimit(void) { return __ratelimit(&ratelimit); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
static unsigned int ata_dummy_qc_issue(struct ata_queued_cmd *qc) { return AC_ERR_SYSTEM; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-core.c
void ata_print_version(const struct device *dev, const char *version) { dev_printk(KERN_DEBUG, dev, "version %s\n", version); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, const char *name) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); char *type = ""; unsigned long long start, len; if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) type = "m"; else if (pci_resource_flags(p...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static void ata_ering_clear(struct ata_ering *ering) { ata_ering_map(ering, ata_ering_clear_cb, NULL); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static unsigned int ata_eh_dev_action(struct ata_device *dev) { struct ata_eh_context *ehc = &dev->link->eh_context; return ehc->i.action | ehc->i.dev_action[dev->devno]; }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_scsi_error(struct Scsi_Host *host) { struct ata_port *ap = ata_shost_to_port(host); unsigned long flags; LIST_HEAD(eh_work_q); spin_lock_irqsave(host->host_lock, flags); list_splice_init(&host->eh_cmd_q, &eh_work_q); spin_unlock_irqrestore(host->host_lock, flags); ata_scsi_cmd_error_handler(hos...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_port_wait_eh(struct ata_port *ap) { unsigned long flags; DEFINE_WAIT(wait); retry: spin_lock_irqsave(ap->lock, flags); while (ap->pflags & (ATA_PFLAG_EH_PENDING | ATA_PFLAG_EH_IN_PROGRESS)) { prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE); spin_unlock_irqrestore(ap->lock, flags)...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static void ata_eh_set_pending(struct ata_port *ap, int fastdrain) { unsigned int cnt; if (ap->pflags & ATA_PFLAG_EH_PENDING) return; ap->pflags |= ATA_PFLAG_EH_PENDING; if (!fastdrain) return; /* do we have in-flight qcs? */ cnt = ata_eh_nr_in_flight(ap); if (!cnt) return; /* activate ...
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_std_end_eh(struct ata_port *ap) { struct Scsi_Host *host = ap->scsi_host; host->host_eh_scheduled = 0; }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_port_schedule_eh(struct ata_port *ap) { ap->ops->sched_eh(ap); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static int ata_do_link_abort(struct ata_port *ap, struct ata_link *link) { struct ata_queued_cmd *qc; int tag, nr_aborted = 0; WARN_ON(!ap->ops->error_handler); ata_eh_set_pending(ap, 0); /* include internal tag in iteration */ ata_qc_for_each_with_internal(ap, qc, tag) { if (qc && (!link || qc->dev-...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
int ata_link_abort(struct ata_link *link) { return ata_do_link_abort(link->ap, link); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
int ata_port_abort(struct ata_port *ap) { return ata_do_link_abort(ap, NULL); }
[ 0, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static void __ata_port_freeze(struct ata_port *ap) { WARN_ON(!ap->ops->error_handler); if (ap->ops->freeze) ap->ops->freeze(ap); ap->pflags |= ATA_PFLAG_FROZEN; trace_ata_port_freeze(ap); }
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev, unsigned int action) { struct ata_port *ap = link->ap; struct ata_eh_info *ehi = &link->eh_info; struct ata_eh_context *ehc = &link->eh_context; unsigned long flags; trace_ata_eh_about_to_do(link, dev ? dev->devno ...
[ 0, 1 ]
Linux Kernel
drivers/ata/libata-eh.c
unsigned int atapi_eh_request_sense(struct ata_device *dev, u8 *sense_buf, u8 dfl_sense_key) { u8 cdb[ATAPI_CDB_LEN] = {REQUEST_SENSE, 0, 0, 0, SCSI_SENSE_BUFFERSIZE, 0}; struct ata_port *ap = dev->link->ap; struct ata_taskfile tf; memset(sense_buf, 0, SCSI_SENSE_BUFFERSIZE)...
[ 1, 0 ]
Linux Kernel
drivers/ata/libata-eh.c
static int ata_eh_categorize_error(unsigned int eflags, unsigned int err_mask, int *xfer_ok) { int base = 0; if (!(eflags & ATA_EFLAG_DUBIOUS_XFER)) *xfer_ok = 1; if (!*xfer_ok) base = ATA_ECAT_DUBIOUS_NONE; if (err_mask & AC_ERR_ATA_BUS) return base + ATA_ECAT...
[ 1, 0 ]