adap 48 arch/arm/mach-omap1/board-sx1.c struct i2c_adapter *adap; adap 53 arch/arm/mach-omap1/board-sx1.c adap = i2c_get_adapter(0); adap 54 arch/arm/mach-omap1/board-sx1.c if (!adap) adap 62 arch/arm/mach-omap1/board-sx1.c err = i2c_transfer(adap, msg, 1); adap 63 arch/arm/mach-omap1/board-sx1.c i2c_put_adapter(adap); adap 72 arch/arm/mach-omap1/board-sx1.c struct i2c_adapter *adap; adap 77 arch/arm/mach-omap1/board-sx1.c adap = i2c_get_adapter(0); adap 78 arch/arm/mach-omap1/board-sx1.c if (!adap) adap 86 arch/arm/mach-omap1/board-sx1.c err = i2c_transfer(adap, msg, 1); adap 92 arch/arm/mach-omap1/board-sx1.c err = i2c_transfer(adap, msg, 1); adap 94 arch/arm/mach-omap1/board-sx1.c i2c_put_adapter(adap); adap 17 drivers/base/regmap/regmap-sccb.c static bool sccb_is_available(struct i2c_adapter *adap) adap 27 drivers/base/regmap/regmap-sccb.c return (i2c_get_functionality(adap) & needed_funcs) == needed_funcs; adap 582 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = netdev2adap(dev); adap 584 drivers/crypto/chelsio/chcr_algo.c adap->sge.uld_txq_info[CXGB4_TX_CRYPTO]; adap 774 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(c_ctx(tfm)->dev); adap 835 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.cipher_rqst); adap 1505 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(h_ctx(tfm)->dev); adap 1572 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.digest_rqst); adap 2052 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(ctx->dev); adap 2066 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.complete); adap 2343 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(a_ctx(tfm)->dev); adap 2375 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.fallback); adap 2446 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.cipher_rqst); adap 2902 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(a_ctx(tfm)->dev); adap 2935 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.fallback); adap 2964 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.aead_rqst); adap 2998 drivers/crypto/chelsio/chcr_algo.c struct adapter *adap = padap(a_ctx(tfm)->dev); adap 3025 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.fallback); adap 3080 drivers/crypto/chelsio/chcr_algo.c atomic_inc(&adap->chcr_stats.aead_rqst); adap 133 drivers/crypto/chelsio/chcr_core.c struct adapter *adap; adap 147 drivers/crypto/chelsio/chcr_core.c adap = padap(&u_ctx->dev); adap 148 drivers/crypto/chelsio/chcr_core.c memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); adap 162 drivers/crypto/chelsio/chcr_core.c struct adapter *adap = padap(dev); adap 180 drivers/crypto/chelsio/chcr_core.c atomic_inc(&adap->chcr_stats.error); adap 384 drivers/crypto/chelsio/chcr_ipsec.c struct adapter *adap; adap 394 drivers/crypto/chelsio/chcr_ipsec.c adap = pi->adapter; adap 396 drivers/crypto/chelsio/chcr_ipsec.c q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 435 drivers/crypto/chelsio/chcr_ipsec.c struct adapter *adap; adap 442 drivers/crypto/chelsio/chcr_ipsec.c adap = pi->adapter; adap 444 drivers/crypto/chelsio/chcr_ipsec.c q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 454 drivers/crypto/chelsio/chcr_ipsec.c TXPKT_PF_V(adap->pf); adap 480 drivers/crypto/chelsio/chcr_ipsec.c struct adapter *adap; adap 485 drivers/crypto/chelsio/chcr_ipsec.c adap = pi->adapter; adap 487 drivers/crypto/chelsio/chcr_ipsec.c q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 527 drivers/crypto/chelsio/chcr_ipsec.c struct adapter *adap = pi->adapter; adap 543 drivers/crypto/chelsio/chcr_ipsec.c struct sge_eth_txq *q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 547 drivers/crypto/chelsio/chcr_ipsec.c atomic_inc(&adap->chcr_stats.ipsec_cnt); adap 680 drivers/crypto/chelsio/chcr_ipsec.c struct adapter *adap; adap 699 drivers/crypto/chelsio/chcr_ipsec.c adap = pi->adapter; adap 701 drivers/crypto/chelsio/chcr_ipsec.c q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 703 drivers/crypto/chelsio/chcr_ipsec.c cxgb4_reclaim_completed_tx(adap, &q->q, true); adap 711 drivers/crypto/chelsio/chcr_ipsec.c dev_err(adap->pdev_dev, adap 719 drivers/crypto/chelsio/chcr_ipsec.c unlikely(cxgb4_map_skb(adap->pdev_dev, skb, addr) < 0)) { adap 759 drivers/crypto/chelsio/chcr_ipsec.c cxgb4_ring_tx_db(adap, &q->q, ndesc); adap 600 drivers/crypto/chelsio/chtls/chtls_cm.c struct adapter *adap; adap 615 drivers/crypto/chelsio/chtls/chtls_cm.c adap = pi->adapter; adap 616 drivers/crypto/chelsio/chtls/chtls_cm.c if (!(adap->flags & CXGB4_FULL_INIT_DONE)) adap 142 drivers/crypto/chelsio/chtls/chtls_hw.c struct adapter *adap; adap 145 drivers/crypto/chelsio/chtls/chtls_hw.c adap = netdev2adap(dev); adap 156 drivers/crypto/chelsio/chtls/chtls_hw.c atomic_inc(&adap->chcr_stats.tls_key); adap 170 drivers/crypto/chelsio/chtls/chtls_hw.c struct adapter *adap; adap 175 drivers/crypto/chelsio/chtls/chtls_hw.c adap = netdev2adap(dev); adap 181 drivers/crypto/chelsio/chtls/chtls_hw.c atomic_dec(&adap->chcr_stats.tls_key); adap 186 drivers/crypto/chelsio/chtls/chtls_hw.c atomic_dec(&adap->chcr_stats.tls_key); adap 353 drivers/crypto/chelsio/chtls/chtls_io.c struct adapter *adap; adap 362 drivers/crypto/chelsio/chtls/chtls_io.c adap = netdev2adap(dev); adap 368 drivers/crypto/chelsio/chtls/chtls_io.c atomic_inc(&adap->chcr_stats.tls_pdu_tx); adap 162 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c u32 amdgpu_atombios_i2c_func(struct i2c_adapter *adap) adap 29 drivers/gpu/drm/amd/amdgpu/atombios_i2c.h u32 amdgpu_atombios_i2c_func(struct i2c_adapter *adap); adap 662 drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c static u32 smu_v11_0_i2c_eeprom_i2c_func(struct i2c_adapter *adap) adap 5148 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static u32 amdgpu_dm_i2c_func(struct i2c_adapter *adap) adap 131 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c static int adv7511_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 133 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c struct adv7511 *adv7511 = cec_get_drvdata(adap); adap 178 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c static int adv7511_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 180 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c struct adv7511 *adv7511 = cec_get_drvdata(adap); adap 247 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c static int adv7511_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 250 drivers/gpu/drm/bridge/adv7511/adv7511_cec.c struct adv7511 *adv7511 = cec_get_drvdata(adap); adap 75 drivers/gpu/drm/bridge/parade-ps8622.c struct i2c_adapter *adap = client->adapter; adap 84 drivers/gpu/drm/bridge/parade-ps8622.c ret = i2c_transfer(adap, &msg, 1); adap 58 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct cec_adapter *adap; adap 77 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c static int dw_hdmi_cec_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 79 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct dw_hdmi_cec *cec = cec_get_drvdata(adap); adap 92 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c static int dw_hdmi_cec_transmit(struct cec_adapter *adap, u8 attempts, adap 95 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct dw_hdmi_cec *cec = cec_get_drvdata(adap); adap 122 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct cec_adapter *adap = data; adap 123 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct dw_hdmi_cec *cec = cec_get_drvdata(adap); adap 171 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct cec_adapter *adap = data; adap 172 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct dw_hdmi_cec *cec = cec_get_drvdata(adap); adap 176 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec_transmit_attempt_done(adap, cec->tx_status); adap 181 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec_received_msg(adap, &cec->rx_msg); adap 186 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c static int dw_hdmi_cec_enable(struct cec_adapter *adap, bool enable) adap 188 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c struct dw_hdmi_cec *cec = cec_get_drvdata(adap); adap 203 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c dw_hdmi_cec_log_addr(cec->adap, CEC_LOG_ADDR_INVALID); adap 226 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec_delete_adapter(cec->adap); adap 258 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec->adap = cec_allocate_adapter(&dw_hdmi_cec_ops, cec, "dw_hdmi", adap 262 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c if (IS_ERR(cec->adap)) adap 263 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c return PTR_ERR(cec->adap); adap 266 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec->adap->owner = THIS_MODULE; adap 270 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec_delete_adapter(cec->adap); adap 277 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c "dw-hdmi-cec", cec->adap); adap 282 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c NULL, cec->adap); adap 286 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c ret = cec_register_adapter(cec->adap, pdev->dev.parent); adap 306 drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c cec_unregister_adapter(cec->adap); adap 113 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c struct i2c_adapter adap; adap 394 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c static int dw_hdmi_i2c_xfer(struct i2c_adapter *adap, adap 397 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c struct dw_hdmi *hdmi = i2c_get_adapdata(adap); adap 479 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c struct i2c_adapter *adap; adap 490 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c adap = &i2c->adap; adap 491 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c adap->class = I2C_CLASS_DDC; adap 492 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c adap->owner = THIS_MODULE; adap 493 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c adap->dev.parent = hdmi->dev; adap 494 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c adap->algo = &dw_hdmi_algorithm; adap 495 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c strlcpy(adap->name, "DesignWare HDMI", sizeof(adap->name)); adap 496 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c i2c_set_adapdata(adap, hdmi); adap 498 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c ret = i2c_add_adapter(adap); adap 500 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c dev_warn(hdmi->dev, "cannot add %s I2C adapter\n", adap->name); adap 507 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c dev_info(hdmi->dev, "registered %s I2C bus driver\n", adap->name); adap 509 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c return adap; adap 2868 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c i2c_del_adapter(&hdmi->i2c->adap); adap 2899 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c i2c_del_adapter(&hdmi->i2c->adap); adap 88 drivers/gpu/drm/drm_dp_cec.c static int drm_dp_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 90 drivers/gpu/drm/drm_dp_cec.c struct drm_dp_aux *aux = cec_get_drvdata(adap); adap 98 drivers/gpu/drm/drm_dp_cec.c static int drm_dp_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 100 drivers/gpu/drm/drm_dp_cec.c struct drm_dp_aux *aux = cec_get_drvdata(adap); adap 107 drivers/gpu/drm/drm_dp_cec.c la_mask |= adap->log_addrs.log_addr_mask | (1 << addr); adap 114 drivers/gpu/drm/drm_dp_cec.c static int drm_dp_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 117 drivers/gpu/drm/drm_dp_cec.c struct drm_dp_aux *aux = cec_get_drvdata(adap); adap 132 drivers/gpu/drm/drm_dp_cec.c static int drm_dp_cec_adap_monitor_all_enable(struct cec_adapter *adap, adap 135 drivers/gpu/drm/drm_dp_cec.c struct drm_dp_aux *aux = cec_get_drvdata(adap); adap 139 drivers/gpu/drm/drm_dp_cec.c if (!(adap->capabilities & CEC_CAP_MONITOR_ALL)) adap 153 drivers/gpu/drm/drm_dp_cec.c static void drm_dp_cec_adap_status(struct cec_adapter *adap, adap 156 drivers/gpu/drm/drm_dp_cec.c struct drm_dp_aux *aux = cec_get_drvdata(adap); adap 187 drivers/gpu/drm/drm_dp_cec.c struct cec_adapter *adap = aux->cec.adap; adap 204 drivers/gpu/drm/drm_dp_cec.c cec_received_msg(adap, &msg); adap 210 drivers/gpu/drm/drm_dp_cec.c struct cec_adapter *adap = aux->cec.adap; adap 220 drivers/gpu/drm/drm_dp_cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_OK); adap 222 drivers/gpu/drm/drm_dp_cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_ERROR | adap 226 drivers/gpu/drm/drm_dp_cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_NACK | adap 248 drivers/gpu/drm/drm_dp_cec.c if (!aux->cec.adap) adap 285 drivers/gpu/drm/drm_dp_cec.c cec_unregister_adapter(aux->cec.adap); adap 286 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = NULL; adap 321 drivers/gpu/drm/drm_dp_cec.c cec_unregister_adapter(aux->cec.adap); adap 322 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = NULL; adap 331 drivers/gpu/drm/drm_dp_cec.c if (aux->cec.adap) { adap 332 drivers/gpu/drm/drm_dp_cec.c if (aux->cec.adap->capabilities == cec_caps && adap 333 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap->available_log_addrs == num_las) { adap 335 drivers/gpu/drm/drm_dp_cec.c cec_s_phys_addr_from_edid(aux->cec.adap, edid); adap 342 drivers/gpu/drm/drm_dp_cec.c cec_unregister_adapter(aux->cec.adap); adap 346 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = cec_allocate_adapter(&drm_dp_cec_adap_ops, adap 349 drivers/gpu/drm/drm_dp_cec.c if (IS_ERR(aux->cec.adap)) { adap 350 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = NULL; adap 353 drivers/gpu/drm/drm_dp_cec.c if (cec_register_adapter(aux->cec.adap, aux->cec.parent)) { adap 354 drivers/gpu/drm/drm_dp_cec.c cec_delete_adapter(aux->cec.adap); adap 355 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = NULL; adap 362 drivers/gpu/drm/drm_dp_cec.c cec_s_phys_addr_from_edid(aux->cec.adap, edid); adap 381 drivers/gpu/drm/drm_dp_cec.c if (!aux->cec.adap) adap 384 drivers/gpu/drm/drm_dp_cec.c cec_phys_addr_invalidate(aux->cec.adap); adap 420 drivers/gpu/drm/drm_dp_cec.c WARN_ON(aux->cec.adap); adap 436 drivers/gpu/drm/drm_dp_cec.c if (!aux->cec.adap) adap 439 drivers/gpu/drm/drm_dp_cec.c cec_unregister_adapter(aux->cec.adap); adap 440 drivers/gpu/drm/drm_dp_cec.c aux->cec.adap = NULL; adap 54 drivers/gpu/drm/drm_encoder_slave.c struct i2c_adapter *adap, adap 64 drivers/gpu/drm/drm_encoder_slave.c client = i2c_new_device(adap, info); adap 69 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c struct i2c_adapter *adap; adap 93 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c static int xfer_read(struct i2c_adapter *adap, struct i2c_msg *pmsg) adap 95 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c struct oaktrail_hdmi_dev *hdmi_dev = i2c_get_adapdata(adap); adap 116 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c static int xfer_write(struct i2c_adapter *adap, struct i2c_msg *pmsg) adap 124 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c static int oaktrail_hdmi_i2c_access(struct i2c_adapter *adap, adap 128 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c struct oaktrail_hdmi_dev *hdmi_dev = i2c_get_adapdata(adap); adap 142 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c xfer_read(adap, pmsg); adap 144 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c xfer_write(adap, pmsg); adap 288 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c i2c_dev->adap = &oaktrail_hdmi_i2c_adapter; adap 382 drivers/gpu/drm/i2c/sil164_drv.c struct i2c_adapter *adap = client->adapter; adap 391 drivers/gpu/drm/i2c/sil164_drv.c if (i2c_transfer(adap, &msg, 1) != 1) { adap 392 drivers/gpu/drm/i2c/sil164_drv.c sil164_dbg(adap, "No dual-link slave found."); adap 396 drivers/gpu/drm/i2c/sil164_drv.c return i2c_new_device(adap, &info); adap 65 drivers/gpu/drm/i2c/tda9950.c struct cec_adapter *adap; adap 193 drivers/gpu/drm/i2c/tda9950.c cec_transmit_done(priv->adap, tx_status, arb_lost_cnt, adap 203 drivers/gpu/drm/i2c/tda9950.c cec_received_msg(priv->adap, &priv->rx_msg); adap 215 drivers/gpu/drm/i2c/tda9950.c static int tda9950_cec_transmit(struct cec_adapter *adap, u8 attempts, adap 218 drivers/gpu/drm/i2c/tda9950.c struct tda9950_priv *priv = adap->priv; adap 233 drivers/gpu/drm/i2c/tda9950.c static int tda9950_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 235 drivers/gpu/drm/i2c/tda9950.c struct tda9950_priv *priv = adap->priv; adap 291 drivers/gpu/drm/i2c/tda9950.c tda9950_cec_adap_log_addr(priv->adap, CEC_LOG_ADDR_INVALID); adap 324 drivers/gpu/drm/i2c/tda9950.c static int tda9950_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 326 drivers/gpu/drm/i2c/tda9950.c struct tda9950_priv *priv = adap->priv; adap 375 drivers/gpu/drm/i2c/tda9950.c cec_delete_adapter(priv->adap); adap 422 drivers/gpu/drm/i2c/tda9950.c priv->adap = cec_allocate_adapter(&tda9950_cec_ops, priv, "tda9950", adap 425 drivers/gpu/drm/i2c/tda9950.c if (IS_ERR(priv->adap)) adap 426 drivers/gpu/drm/i2c/tda9950.c return PTR_ERR(priv->adap); adap 430 drivers/gpu/drm/i2c/tda9950.c cec_delete_adapter(priv->adap); adap 464 drivers/gpu/drm/i2c/tda9950.c ret = cec_register_adapter(priv->adap, priv->hdmi); adap 476 drivers/gpu/drm/i2c/tda9950.c cec_register_cec_notifier(priv->adap, priv->notify); adap 485 drivers/gpu/drm/i2c/tda9950.c cec_unregister_adapter(priv->adap); adap 57 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c struct i2c_adapter adap; adap 112 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c struct device *dev = ddc->adap.dev.parent; adap 187 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c struct device *dev = ddc->adap.dev.parent; adap 295 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c strlcpy(ddc->adap.name, "mediatek-hdmi-ddc", sizeof(ddc->adap.name)); adap 296 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.owner = THIS_MODULE; adap 297 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.class = I2C_CLASS_DDC; adap 298 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.algo = &mtk_hdmi_ddc_algorithm; adap 299 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.retries = 3; adap 300 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.dev.of_node = dev->of_node; adap 301 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.algo_data = ddc; adap 302 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ddc->adap.dev.parent = &pdev->dev; adap 304 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c ret = i2c_add_adapter(&ddc->adap); adap 312 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c dev_dbg(dev, "ddc->adap: %p\n", &ddc->adap); adap 328 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c i2c_del_adapter(&ddc->adap); adap 98 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h nvkm_rdi2cr(struct i2c_adapter *adap, u8 addr, u8 reg) adap 106 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h int ret = i2c_transfer(adap, msgs, ARRAY_SIZE(msgs)); adap 114 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h nv_rd16i2cr(struct i2c_adapter *adap, u8 addr, u8 reg) adap 122 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h int ret = i2c_transfer(adap, msgs, ARRAY_SIZE(msgs)); adap 130 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h nvkm_wri2cr(struct i2c_adapter *adap, u8 addr, u8 reg, u8 val) adap 137 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h int ret = i2c_transfer(adap, msgs, ARRAY_SIZE(msgs)); adap 145 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h nv_wr16i2cr(struct i2c_adapter *adap, u8 addr, u8 reg, u16 val) adap 152 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h int ret = i2c_transfer(adap, msgs, ARRAY_SIZE(msgs)); adap 160 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h nvkm_probe_i2c(struct i2c_adapter *adap, u8 addr) adap 162 drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h return nvkm_rdi2cr(adap, addr, 0) >= 0; adap 287 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c struct i2c_adapter *adap = init_i2c(init, index); adap 288 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c if (adap && init_exec(init)) adap 289 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c return nvkm_rdi2cr(adap, addr, reg); adap 296 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c struct i2c_adapter *adap = init_i2c(init, index); adap 297 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c if (adap && init_exec(init)) adap 298 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c return nvkm_wri2cr(adap, addr, reg, val); adap 1077 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c struct i2c_adapter *adap = init_i2c(init, index); adap 1083 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c if (adap && (ret = i2c_transfer(adap, &msg, 1)) != 1) adap 2161 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c struct i2c_adapter *adap; adap 2168 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c adap = init_i2c(init, index); adap 2169 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c if (adap) { adap 2178 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c ret = i2c_transfer(adap, msg, 2); adap 47 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c struct i2c_adapter *adap = &pad->bus->i2c; adap 53 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c tmp = nvkm_rdi2cr(adap, pad->addr, 0x07) & ~0x10; adap 54 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0x07, tmp | 0x10); adap 55 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0x07, tmp); adap 56 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x43, 0x05); adap 61 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x40, msg->addr << 1); adap 62 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x41, seg); adap 63 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x42, off); adap 64 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x44, msg->len); adap 65 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x45, 0x00); adap 66 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x43, 0x01); adap 69 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c while (nvkm_rdi2cr(adap, bus->addr, 0x46) & 0x10) { adap 74 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c msg->buf[i] = nvkm_rdi2cr(adap, bus->addr, 0x47); adap 93 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, bus->addr, 0x43, 0x00); adap 141 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c struct i2c_adapter *adap = &pad->bus->i2c; adap 148 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c tmp = nvkm_rdi2cr(adap, pad->addr, 0x07) & ~0x04; adap 149 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0x07, tmp | 0x04); adap 150 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0x07, tmp); adap 151 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0xf7, 0x01); adap 153 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe4, 0x80); adap 158 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xf0 + i, buf[i]); adap 160 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe5, ((*size - 1) << 4) | type); adap 161 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe6, (addr & 0x000ff) >> 0); adap 162 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe7, (addr & 0x0ff00) >> 8); adap 163 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe8, (addr & 0xf0000) >> 16); adap 164 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xe9, 0x01); adap 167 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c while ((tmp = nvkm_rdi2cr(adap, aux->addr, 0xe9)) & 0x01) { adap 173 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c if ((tmp = nvkm_rdi2cr(adap, pad->addr, 0xf7)) & 0x01) { adap 180 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c buf[i] = nvkm_rdi2cr(adap, aux->addr, 0xf0 + i); adap 187 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, pad->addr, 0xf7, 0x01); adap 197 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c struct i2c_adapter *adap = &pad->bus->i2c; adap 203 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xa0, link_bw); adap 204 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xa1, link_nr | (enh ? 0x80 : 0x00)); adap 205 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xa2, 0x01); adap 206 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c nvkm_wri2cr(adap, aux->addr, 0xa8, 0x01); adap 209 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c while ((tmp = nvkm_rdi2cr(adap, aux->addr, 0xa8)) & 0x01) { adap 28 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c nvkm_i2c_aux_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 30 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c struct nvkm_i2c_aux *aux = container_of(adap, typeof(*aux), i2c); adap 82 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c nvkm_i2c_aux_i2c_func(struct i2c_adapter *adap) adap 33 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c nvkm_i2c_bus_pre_xfer(struct i2c_adapter *adap) adap 35 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); adap 40 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c nvkm_i2c_bus_post_xfer(struct i2c_adapter *adap) adap 42 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); adap 78 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c nvkm_i2c_bus_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 80 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); adap 93 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c nvkm_i2c_bus_func(struct i2c_adapter *adap) adap 262 drivers/gpu/drm/omapdrm/dss/hdmi.h struct cec_adapter *adap; adap 94 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_received_msg(core->adap, &msg); adap 118 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_transmit_done(core->adap, CEC_TX_STATUS_OK, adap 124 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_transmit_done(core->adap, adap 134 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c static bool hdmi_cec_clear_tx_fifo(struct cec_adapter *adap) adap 136 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c struct hdmi_core_data *core = cec_get_drvdata(adap); adap 150 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c static bool hdmi_cec_clear_rx_fifo(struct cec_adapter *adap) adap 152 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c struct hdmi_core_data *core = cec_get_drvdata(adap); adap 167 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c static int hdmi_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 169 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c struct hdmi_core_data *core = cec_get_drvdata(adap); adap 193 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c if (!hdmi_cec_clear_tx_fifo(adap)) { adap 194 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c pr_err("cec-%s: could not clear TX FIFO\n", adap->name); adap 200 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c if (!hdmi_cec_clear_rx_fifo(adap)) { adap 201 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c pr_err("cec-%s: could not clear RX FIFO\n", adap->name); adap 256 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c static int hdmi_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 258 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c struct hdmi_core_data *core = cec_get_drvdata(adap); adap 278 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c static int hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 281 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c struct hdmi_core_data *core = cec_get_drvdata(adap); adap 286 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c if (!hdmi_cec_clear_tx_fifo(adap)) { adap 288 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c adap->name); adap 334 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_s_phys_addr(core->adap, pa, false); adap 344 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core, adap 346 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c ret = PTR_ERR_OR_ZERO(core->adap); adap 354 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c ret = cec_register_adapter(core->adap, &pdev->dev); adap 356 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_delete_adapter(core->adap); adap 364 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c cec_unregister_adapter(core->adap); adap 155 drivers/gpu/drm/radeon/atombios_i2c.c u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap) adap 39 drivers/gpu/drm/radeon/radeon_i2c.c extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap); adap 896 drivers/gpu/drm/radeon/radeon_i2c.c static u32 radeon_hw_i2c_func(struct i2c_adapter *adap) adap 40 drivers/gpu/drm/rockchip/inno_hdmi.c struct i2c_adapter adap; adap 725 drivers/gpu/drm/rockchip/inno_hdmi.c static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap, adap 728 drivers/gpu/drm/rockchip/inno_hdmi.c struct inno_hdmi *hdmi = i2c_get_adapdata(adap); adap 775 drivers/gpu/drm/rockchip/inno_hdmi.c struct i2c_adapter *adap; adap 786 drivers/gpu/drm/rockchip/inno_hdmi.c adap = &i2c->adap; adap 787 drivers/gpu/drm/rockchip/inno_hdmi.c adap->class = I2C_CLASS_DDC; adap 788 drivers/gpu/drm/rockchip/inno_hdmi.c adap->owner = THIS_MODULE; adap 789 drivers/gpu/drm/rockchip/inno_hdmi.c adap->dev.parent = hdmi->dev; adap 790 drivers/gpu/drm/rockchip/inno_hdmi.c adap->dev.of_node = hdmi->dev->of_node; adap 791 drivers/gpu/drm/rockchip/inno_hdmi.c adap->algo = &inno_hdmi_algorithm; adap 792 drivers/gpu/drm/rockchip/inno_hdmi.c strlcpy(adap->name, "Inno HDMI", sizeof(adap->name)); adap 793 drivers/gpu/drm/rockchip/inno_hdmi.c i2c_set_adapdata(adap, hdmi); adap 795 drivers/gpu/drm/rockchip/inno_hdmi.c ret = i2c_add_adapter(adap); adap 797 drivers/gpu/drm/rockchip/inno_hdmi.c dev_warn(hdmi->dev, "cannot add %s I2C adapter\n", adap->name); adap 804 drivers/gpu/drm/rockchip/inno_hdmi.c DRM_DEV_INFO(hdmi->dev, "registered %s I2C bus driver\n", adap->name); adap 806 drivers/gpu/drm/rockchip/inno_hdmi.c return adap; adap 30 drivers/gpu/drm/rockchip/rk3066_hdmi.c struct i2c_adapter adap; adap 652 drivers/gpu/drm/rockchip/rk3066_hdmi.c static int rk3066_hdmi_i2c_xfer(struct i2c_adapter *adap, adap 655 drivers/gpu/drm/rockchip/rk3066_hdmi.c struct rk3066_hdmi *hdmi = i2c_get_adapdata(adap); adap 705 drivers/gpu/drm/rockchip/rk3066_hdmi.c struct i2c_adapter *adap; adap 716 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap = &i2c->adap; adap 717 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->class = I2C_CLASS_DDC; adap 718 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->owner = THIS_MODULE; adap 719 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->dev.parent = hdmi->dev; adap 720 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->dev.of_node = hdmi->dev->of_node; adap 721 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->algo = &rk3066_hdmi_algorithm; adap 722 drivers/gpu/drm/rockchip/rk3066_hdmi.c strlcpy(adap->name, "RK3066 HDMI", sizeof(adap->name)); adap 723 drivers/gpu/drm/rockchip/rk3066_hdmi.c i2c_set_adapdata(adap, hdmi); adap 725 drivers/gpu/drm/rockchip/rk3066_hdmi.c ret = i2c_add_adapter(adap); adap 728 drivers/gpu/drm/rockchip/rk3066_hdmi.c adap->name); adap 735 drivers/gpu/drm/rockchip/rk3066_hdmi.c DRM_DEV_DEBUG(hdmi->dev, "registered %s I2C bus driver\n", adap->name); adap 737 drivers/gpu/drm/rockchip/rk3066_hdmi.c return adap; adap 285 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c static bool sun4i_hdmi_cec_pin_read(struct cec_adapter *adap) adap 287 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c struct sun4i_hdmi *hdmi = cec_get_drvdata(adap); adap 292 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c static void sun4i_hdmi_cec_pin_low(struct cec_adapter *adap) adap 294 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c struct sun4i_hdmi *hdmi = cec_get_drvdata(adap); adap 300 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c static void sun4i_hdmi_cec_pin_high(struct cec_adapter *adap) adap 302 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c struct sun4i_hdmi *hdmi = cec_get_drvdata(adap); adap 146 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c static int sun4i_hdmi_i2c_xfer(struct i2c_adapter *adap, adap 149 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c struct sun4i_hdmi *hdmi = i2c_get_adapdata(adap); adap 188 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c static u32 sun4i_hdmi_i2c_func(struct i2c_adapter *adap) adap 289 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c struct i2c_adapter *adap; adap 300 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c adap = devm_kzalloc(dev, sizeof(*adap), GFP_KERNEL); adap 301 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c if (!adap) adap 304 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c adap->owner = THIS_MODULE; adap 305 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c adap->class = I2C_CLASS_DDC; adap 306 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c adap->algo = &sun4i_hdmi_i2c_algorithm; adap 307 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c strlcpy(adap->name, "sun4i_hdmi_i2c adapter", sizeof(adap->name)); adap 308 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c i2c_set_adapdata(adap, hdmi); adap 310 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c ret = i2c_add_adapter(adap); adap 314 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c hdmi->i2c = adap; adap 1213 drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 1215 drivers/gpu/drm/vc4/vc4_hdmi.c struct vc4_dev *vc4 = cec_get_drvdata(adap); adap 1256 drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 1258 drivers/gpu/drm/vc4/vc4_hdmi.c struct vc4_dev *vc4 = cec_get_drvdata(adap); adap 1266 drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 1269 drivers/gpu/drm/vc4/vc4_hdmi.c struct vc4_dev *vc4 = cec_get_drvdata(adap); adap 33 drivers/gpu/drm/zte/zx_hdmi.c struct i2c_adapter adap; adap 267 drivers/gpu/drm/zte/zx_hdmi.c edid = drm_get_edid(connector, &hdmi->ddc->adap); adap 561 drivers/gpu/drm/zte/zx_hdmi.c static int zx_hdmi_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 564 drivers/gpu/drm/zte/zx_hdmi.c struct zx_hdmi *hdmi = i2c_get_adapdata(adap); adap 610 drivers/gpu/drm/zte/zx_hdmi.c struct i2c_adapter *adap; adap 621 drivers/gpu/drm/zte/zx_hdmi.c adap = &ddc->adap; adap 622 drivers/gpu/drm/zte/zx_hdmi.c adap->owner = THIS_MODULE; adap 623 drivers/gpu/drm/zte/zx_hdmi.c adap->class = I2C_CLASS_DDC; adap 624 drivers/gpu/drm/zte/zx_hdmi.c adap->dev.parent = hdmi->dev; adap 625 drivers/gpu/drm/zte/zx_hdmi.c adap->algo = &zx_hdmi_algorithm; adap 626 drivers/gpu/drm/zte/zx_hdmi.c snprintf(adap->name, sizeof(adap->name), "zx hdmi i2c"); adap 628 drivers/gpu/drm/zte/zx_hdmi.c ret = i2c_add_adapter(adap); adap 635 drivers/gpu/drm/zte/zx_hdmi.c i2c_set_adapdata(adap, hdmi); adap 29 drivers/gpu/drm/zte/zx_vga.c struct i2c_adapter adap; adap 91 drivers/gpu/drm/zte/zx_vga.c edid = drm_get_edid(connector, &vga->ddc->adap); adap 283 drivers/gpu/drm/zte/zx_vga.c static int zx_vga_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 286 drivers/gpu/drm/zte/zx_vga.c struct zx_vga *vga = i2c_get_adapdata(adap); adap 324 drivers/gpu/drm/zte/zx_vga.c struct i2c_adapter *adap; adap 335 drivers/gpu/drm/zte/zx_vga.c adap = &ddc->adap; adap 336 drivers/gpu/drm/zte/zx_vga.c adap->owner = THIS_MODULE; adap 337 drivers/gpu/drm/zte/zx_vga.c adap->class = I2C_CLASS_DDC; adap 338 drivers/gpu/drm/zte/zx_vga.c adap->dev.parent = dev; adap 339 drivers/gpu/drm/zte/zx_vga.c adap->algo = &zx_vga_algorithm; adap 340 drivers/gpu/drm/zte/zx_vga.c snprintf(adap->name, sizeof(adap->name), "zx vga i2c"); adap 342 drivers/gpu/drm/zte/zx_vga.c ret = i2c_add_adapter(adap); adap 348 drivers/gpu/drm/zte/zx_vga.c i2c_set_adapdata(adap, vga); adap 154 drivers/hid/hid-cp2112.c struct i2c_adapter adap; adap 517 drivers/hid/hid-cp2112.c static int cp2112_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 520 drivers/hid/hid-cp2112.c struct cp2112_device *dev = (struct cp2112_device *)adap->algo_data; adap 634 drivers/hid/hid-cp2112.c static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, adap 638 drivers/hid/hid-cp2112.c struct cp2112_device *dev = (struct cp2112_device *)adap->algo_data; adap 809 drivers/hid/hid-cp2112.c static u32 cp2112_functionality(struct i2c_adapter *adap) adap 1309 drivers/hid/hid-cp2112.c dev->adap.owner = THIS_MODULE; adap 1310 drivers/hid/hid-cp2112.c dev->adap.class = I2C_CLASS_HWMON; adap 1311 drivers/hid/hid-cp2112.c dev->adap.algo = &smbus_algorithm; adap 1312 drivers/hid/hid-cp2112.c dev->adap.algo_data = dev; adap 1313 drivers/hid/hid-cp2112.c dev->adap.dev.parent = &hdev->dev; adap 1314 drivers/hid/hid-cp2112.c snprintf(dev->adap.name, sizeof(dev->adap.name), adap 1321 drivers/hid/hid-cp2112.c ret = i2c_add_adapter(&dev->adap); adap 1370 drivers/hid/hid-cp2112.c i2c_del_adapter(&dev->adap); adap 1386 drivers/hid/hid-cp2112.c i2c_del_adapter(&dev->adap); adap 671 drivers/hwmon/sht3x.c struct i2c_adapter *adap = client->adapter; adap 680 drivers/hwmon/sht3x.c if (!i2c_check_functionality(adap, I2C_FUNC_I2C)) adap 197 drivers/hwmon/shtc1.c struct i2c_adapter *adap = client->adapter; adap 200 drivers/hwmon/shtc1.c if (!i2c_check_functionality(adap, I2C_FUNC_I2C)) { adap 48 drivers/i2c/algos/i2c-algo-bit.c #define setsda(adap, val) adap->setsda(adap->data, val) adap 49 drivers/i2c/algos/i2c-algo-bit.c #define setscl(adap, val) adap->setscl(adap->data, val) adap 50 drivers/i2c/algos/i2c-algo-bit.c #define getsda(adap) adap->getsda(adap->data) adap 51 drivers/i2c/algos/i2c-algo-bit.c #define getscl(adap) adap->getscl(adap->data) adap 53 drivers/i2c/algos/i2c-algo-bit.c static inline void sdalo(struct i2c_algo_bit_data *adap) adap 55 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 0); adap 56 drivers/i2c/algos/i2c-algo-bit.c udelay((adap->udelay + 1) / 2); adap 59 drivers/i2c/algos/i2c-algo-bit.c static inline void sdahi(struct i2c_algo_bit_data *adap) adap 61 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 1); adap 62 drivers/i2c/algos/i2c-algo-bit.c udelay((adap->udelay + 1) / 2); adap 65 drivers/i2c/algos/i2c-algo-bit.c static inline void scllo(struct i2c_algo_bit_data *adap) adap 67 drivers/i2c/algos/i2c-algo-bit.c setscl(adap, 0); adap 68 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay / 2); adap 75 drivers/i2c/algos/i2c-algo-bit.c static int sclhi(struct i2c_algo_bit_data *adap) adap 79 drivers/i2c/algos/i2c-algo-bit.c setscl(adap, 1); adap 82 drivers/i2c/algos/i2c-algo-bit.c if (!adap->getscl) adap 86 drivers/i2c/algos/i2c-algo-bit.c while (!getscl(adap)) { adap 92 drivers/i2c/algos/i2c-algo-bit.c if (time_after(jiffies, start + adap->timeout)) { adap 96 drivers/i2c/algos/i2c-algo-bit.c if (getscl(adap)) adap 109 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay); adap 115 drivers/i2c/algos/i2c-algo-bit.c static void i2c_start(struct i2c_algo_bit_data *adap) adap 118 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 0); adap 119 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay); adap 120 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 123 drivers/i2c/algos/i2c-algo-bit.c static void i2c_repstart(struct i2c_algo_bit_data *adap) adap 126 drivers/i2c/algos/i2c-algo-bit.c sdahi(adap); adap 127 drivers/i2c/algos/i2c-algo-bit.c sclhi(adap); adap 128 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 0); adap 129 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay); adap 130 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 134 drivers/i2c/algos/i2c-algo-bit.c static void i2c_stop(struct i2c_algo_bit_data *adap) adap 137 drivers/i2c/algos/i2c-algo-bit.c sdalo(adap); adap 138 drivers/i2c/algos/i2c-algo-bit.c sclhi(adap); adap 139 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 1); adap 140 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay); adap 157 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 162 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, sb); adap 163 drivers/i2c/algos/i2c-algo-bit.c udelay((adap->udelay + 1) / 2); adap 164 drivers/i2c/algos/i2c-algo-bit.c if (sclhi(adap) < 0) { /* timed out */ adap 176 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 178 drivers/i2c/algos/i2c-algo-bit.c sdahi(adap); adap 179 drivers/i2c/algos/i2c-algo-bit.c if (sclhi(adap) < 0) { /* timeout */ adap 188 drivers/i2c/algos/i2c-algo-bit.c ack = !getsda(adap); /* ack: sda is pulled low -> success */ adap 192 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 204 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 207 drivers/i2c/algos/i2c-algo-bit.c sdahi(adap); adap 209 drivers/i2c/algos/i2c-algo-bit.c if (sclhi(adap) < 0) { /* timeout */ adap 216 drivers/i2c/algos/i2c-algo-bit.c if (getsda(adap)) adap 218 drivers/i2c/algos/i2c-algo-bit.c setscl(adap, 0); adap 219 drivers/i2c/algos/i2c-algo-bit.c udelay(i == 7 ? adap->udelay / 2 : adap->udelay); adap 231 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 235 drivers/i2c/algos/i2c-algo-bit.c if (adap->pre_xfer) { adap 236 drivers/i2c/algos/i2c-algo-bit.c ret = adap->pre_xfer(i2c_adap); adap 241 drivers/i2c/algos/i2c-algo-bit.c if (adap->getscl == NULL) adap 244 drivers/i2c/algos/i2c-algo-bit.c sda = getsda(adap); adap 245 drivers/i2c/algos/i2c-algo-bit.c scl = (adap->getscl == NULL) ? 1 : getscl(adap); adap 253 drivers/i2c/algos/i2c-algo-bit.c sdalo(adap); adap 254 drivers/i2c/algos/i2c-algo-bit.c sda = getsda(adap); adap 255 drivers/i2c/algos/i2c-algo-bit.c scl = (adap->getscl == NULL) ? 1 : getscl(adap); adap 267 drivers/i2c/algos/i2c-algo-bit.c sdahi(adap); adap 268 drivers/i2c/algos/i2c-algo-bit.c sda = getsda(adap); adap 269 drivers/i2c/algos/i2c-algo-bit.c scl = (adap->getscl == NULL) ? 1 : getscl(adap); adap 281 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 282 drivers/i2c/algos/i2c-algo-bit.c sda = getsda(adap); adap 283 drivers/i2c/algos/i2c-algo-bit.c scl = (adap->getscl == NULL) ? 0 : getscl(adap); adap 295 drivers/i2c/algos/i2c-algo-bit.c sclhi(adap); adap 296 drivers/i2c/algos/i2c-algo-bit.c sda = getsda(adap); adap 297 drivers/i2c/algos/i2c-algo-bit.c scl = (adap->getscl == NULL) ? 1 : getscl(adap); adap 309 drivers/i2c/algos/i2c-algo-bit.c if (adap->post_xfer) adap 310 drivers/i2c/algos/i2c-algo-bit.c adap->post_xfer(i2c_adap); adap 315 drivers/i2c/algos/i2c-algo-bit.c sdahi(adap); adap 316 drivers/i2c/algos/i2c-algo-bit.c sclhi(adap); adap 318 drivers/i2c/algos/i2c-algo-bit.c if (adap->post_xfer) adap 319 drivers/i2c/algos/i2c-algo-bit.c adap->post_xfer(i2c_adap); adap 337 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 345 drivers/i2c/algos/i2c-algo-bit.c i2c_stop(adap); adap 346 drivers/i2c/algos/i2c-algo-bit.c udelay(adap->udelay); adap 349 drivers/i2c/algos/i2c-algo-bit.c i2c_start(adap); adap 402 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 406 drivers/i2c/algos/i2c-algo-bit.c setsda(adap, 0); adap 407 drivers/i2c/algos/i2c-algo-bit.c udelay((adap->udelay + 1) / 2); adap 408 drivers/i2c/algos/i2c-algo-bit.c if (sclhi(adap) < 0) { /* timeout */ adap 412 drivers/i2c/algos/i2c-algo-bit.c scllo(adap); adap 481 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 509 drivers/i2c/algos/i2c-algo-bit.c i2c_repstart(adap); adap 535 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 539 drivers/i2c/algos/i2c-algo-bit.c if (adap->pre_xfer) { adap 540 drivers/i2c/algos/i2c-algo-bit.c ret = adap->pre_xfer(i2c_adap); adap 546 drivers/i2c/algos/i2c-algo-bit.c i2c_start(adap); adap 555 drivers/i2c/algos/i2c-algo-bit.c i2c_stop(adap); adap 556 drivers/i2c/algos/i2c-algo-bit.c i2c_start(adap); adap 560 drivers/i2c/algos/i2c-algo-bit.c i2c_repstart(adap); adap 599 drivers/i2c/algos/i2c-algo-bit.c i2c_stop(adap); adap 601 drivers/i2c/algos/i2c-algo-bit.c if (adap->post_xfer) adap 602 drivers/i2c/algos/i2c-algo-bit.c adap->post_xfer(i2c_adap); adap 615 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *adap = i2c_adap->algo_data; adap 617 drivers/i2c/algos/i2c-algo-bit.c if (!adap->can_do_atomic) adap 623 drivers/i2c/algos/i2c-algo-bit.c static u32 bit_func(struct i2c_adapter *adap) adap 648 drivers/i2c/algos/i2c-algo-bit.c static int __i2c_bit_add_bus(struct i2c_adapter *adap, adap 651 drivers/i2c/algos/i2c-algo-bit.c struct i2c_algo_bit_data *bit_adap = adap->algo_data; adap 655 drivers/i2c/algos/i2c-algo-bit.c ret = test_bus(adap); adap 661 drivers/i2c/algos/i2c-algo-bit.c adap->algo = &i2c_bit_algo; adap 662 drivers/i2c/algos/i2c-algo-bit.c adap->retries = 3; adap 664 drivers/i2c/algos/i2c-algo-bit.c adap->quirks = &i2c_bit_quirk_no_clk_stretch; adap 671 drivers/i2c/algos/i2c-algo-bit.c ret = add_adapter(adap); adap 677 drivers/i2c/algos/i2c-algo-bit.c dev_warn(&adap->dev, "Not I2C compliant: can't read SCL\n"); adap 678 drivers/i2c/algos/i2c-algo-bit.c dev_warn(&adap->dev, "Bus may be unreliable\n"); adap 683 drivers/i2c/algos/i2c-algo-bit.c int i2c_bit_add_bus(struct i2c_adapter *adap) adap 685 drivers/i2c/algos/i2c-algo-bit.c return __i2c_bit_add_bus(adap, i2c_add_adapter); adap 689 drivers/i2c/algos/i2c-algo-bit.c int i2c_bit_add_numbered_bus(struct i2c_adapter *adap) adap 691 drivers/i2c/algos/i2c-algo-bit.c return __i2c_bit_add_bus(adap, i2c_add_numbered_adapter); adap 26 drivers/i2c/algos/i2c-algo-pca.c #define pca_outw(adap, reg, val) adap->write_byte(adap->data, reg, val) adap 27 drivers/i2c/algos/i2c-algo-pca.c #define pca_inw(adap, reg) adap->read_byte(adap->data, reg) adap 29 drivers/i2c/algos/i2c-algo-pca.c #define pca_status(adap) pca_inw(adap, I2C_PCA_STA) adap 30 drivers/i2c/algos/i2c-algo-pca.c #define pca_clock(adap) adap->i2c_clock adap 31 drivers/i2c/algos/i2c-algo-pca.c #define pca_set_con(adap, val) pca_outw(adap, I2C_PCA_CON, val) adap 32 drivers/i2c/algos/i2c-algo-pca.c #define pca_get_con(adap) pca_inw(adap, I2C_PCA_CON) adap 33 drivers/i2c/algos/i2c-algo-pca.c #define pca_wait(adap) adap->wait_for_completion(adap->data) adap 35 drivers/i2c/algos/i2c-algo-pca.c static void pca_reset(struct i2c_algo_pca_data *adap) adap 37 drivers/i2c/algos/i2c-algo-pca.c if (adap->chip == I2C_PCA_CHIP_9665) { adap 41 drivers/i2c/algos/i2c-algo-pca.c pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IPRESET); adap 42 drivers/i2c/algos/i2c-algo-pca.c pca_outw(adap, I2C_PCA_IND, 0xA5); adap 43 drivers/i2c/algos/i2c-algo-pca.c pca_outw(adap, I2C_PCA_IND, 0x5A); adap 45 drivers/i2c/algos/i2c-algo-pca.c adap->reset_chip(adap->data); adap 54 drivers/i2c/algos/i2c-algo-pca.c static int pca_start(struct i2c_algo_pca_data *adap) adap 56 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 60 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 61 drivers/i2c/algos/i2c-algo-pca.c return pca_wait(adap); adap 69 drivers/i2c/algos/i2c-algo-pca.c static int pca_repeated_start(struct i2c_algo_pca_data *adap) adap 71 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 75 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 76 drivers/i2c/algos/i2c-algo-pca.c return pca_wait(adap); adap 88 drivers/i2c/algos/i2c-algo-pca.c static void pca_stop(struct i2c_algo_pca_data *adap) adap 90 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 94 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 102 drivers/i2c/algos/i2c-algo-pca.c static int pca_address(struct i2c_algo_pca_data *adap, adap 105 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 111 drivers/i2c/algos/i2c-algo-pca.c pca_outw(adap, I2C_PCA_DAT, addr); adap 114 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 116 drivers/i2c/algos/i2c-algo-pca.c return pca_wait(adap); adap 124 drivers/i2c/algos/i2c-algo-pca.c static int pca_tx_byte(struct i2c_algo_pca_data *adap, adap 127 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 129 drivers/i2c/algos/i2c-algo-pca.c pca_outw(adap, I2C_PCA_DAT, b); adap 132 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 134 drivers/i2c/algos/i2c-algo-pca.c return pca_wait(adap); adap 142 drivers/i2c/algos/i2c-algo-pca.c static void pca_rx_byte(struct i2c_algo_pca_data *adap, adap 145 drivers/i2c/algos/i2c-algo-pca.c *b = pca_inw(adap, I2C_PCA_DAT); adap 154 drivers/i2c/algos/i2c-algo-pca.c static int pca_rx_ack(struct i2c_algo_pca_data *adap, adap 157 drivers/i2c/algos/i2c-algo-pca.c int sta = pca_get_con(adap); adap 164 drivers/i2c/algos/i2c-algo-pca.c pca_set_con(adap, sta); adap 165 drivers/i2c/algos/i2c-algo-pca.c return pca_wait(adap); adap 172 drivers/i2c/algos/i2c-algo-pca.c struct i2c_algo_pca_data *adap = i2c_adap->algo_data; adap 181 drivers/i2c/algos/i2c-algo-pca.c while ((state = pca_status(adap)) != 0xf8) { adap 217 drivers/i2c/algos/i2c-algo-pca.c state = pca_status(adap); adap 224 drivers/i2c/algos/i2c-algo-pca.c completed = pca_start(adap); adap 229 drivers/i2c/algos/i2c-algo-pca.c completed = pca_address(adap, msg); adap 235 drivers/i2c/algos/i2c-algo-pca.c completed = pca_tx_byte(adap, adap 242 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 244 drivers/i2c/algos/i2c-algo-pca.c completed = pca_repeated_start(adap); adap 249 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 254 drivers/i2c/algos/i2c-algo-pca.c completed = pca_rx_ack(adap, msg->len > 1); adap 259 drivers/i2c/algos/i2c-algo-pca.c pca_rx_byte(adap, &msg->buf[numbytes], 1); adap 261 drivers/i2c/algos/i2c-algo-pca.c completed = pca_rx_ack(adap, adap 267 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 269 drivers/i2c/algos/i2c-algo-pca.c completed = pca_repeated_start(adap); adap 274 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 280 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 294 drivers/i2c/algos/i2c-algo-pca.c pca_start(adap); adap 299 drivers/i2c/algos/i2c-algo-pca.c pca_rx_byte(adap, &msg->buf[numbytes], 0); adap 302 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 304 drivers/i2c/algos/i2c-algo-pca.c completed = pca_repeated_start(adap); adap 309 drivers/i2c/algos/i2c-algo-pca.c pca_stop(adap); adap 315 drivers/i2c/algos/i2c-algo-pca.c pca_reset(adap); adap 319 drivers/i2c/algos/i2c-algo-pca.c pca_reset(adap); adap 323 drivers/i2c/algos/i2c-algo-pca.c pca_reset(adap); adap 338 drivers/i2c/algos/i2c-algo-pca.c curmsg, num, pca_status(adap), adap 339 drivers/i2c/algos/i2c-algo-pca.c pca_get_con(adap)); adap 343 drivers/i2c/algos/i2c-algo-pca.c static u32 pca_func(struct i2c_adapter *adap) adap 353 drivers/i2c/algos/i2c-algo-pca.c static unsigned int pca_probe_chip(struct i2c_adapter *adap) adap 355 drivers/i2c/algos/i2c-algo-pca.c struct i2c_algo_pca_data *pca_data = adap->algo_data; adap 367 drivers/i2c/algos/i2c-algo-pca.c printk(KERN_INFO "%s: PCA9665 detected.\n", adap->name); adap 370 drivers/i2c/algos/i2c-algo-pca.c printk(KERN_INFO "%s: PCA9564 detected.\n", adap->name); adap 376 drivers/i2c/algos/i2c-algo-pca.c static int pca_init(struct i2c_adapter *adap) adap 378 drivers/i2c/algos/i2c-algo-pca.c struct i2c_algo_pca_data *pca_data = adap->algo_data; adap 380 drivers/i2c/algos/i2c-algo-pca.c adap->algo = &pca_algo; adap 382 drivers/i2c/algos/i2c-algo-pca.c if (pca_probe_chip(adap) == I2C_PCA_CHIP_9564) { adap 415 drivers/i2c/algos/i2c-algo-pca.c " Using default 59kHz.\n", adap->name); adap 422 drivers/i2c/algos/i2c-algo-pca.c " Use the nominal frequency.\n", adap->name); adap 429 drivers/i2c/algos/i2c-algo-pca.c adap->name, freqs[clock]); adap 449 drivers/i2c/algos/i2c-algo-pca.c " Using 1265.8kHz.\n", adap->name); adap 455 drivers/i2c/algos/i2c-algo-pca.c " Using 60.3kHz.\n", adap->name); adap 501 drivers/i2c/algos/i2c-algo-pca.c "%s: Clock frequency is %dHz\n", adap->name, clock * 100); adap 520 drivers/i2c/algos/i2c-algo-pca.c int i2c_pca_add_bus(struct i2c_adapter *adap) adap 524 drivers/i2c/algos/i2c-algo-pca.c rval = pca_init(adap); adap 528 drivers/i2c/algos/i2c-algo-pca.c return i2c_add_adapter(adap); adap 532 drivers/i2c/algos/i2c-algo-pca.c int i2c_pca_add_numbered_bus(struct i2c_adapter *adap) adap 536 drivers/i2c/algos/i2c-algo-pca.c rval = pca_init(adap); adap 540 drivers/i2c/algos/i2c-algo-pca.c return i2c_add_numbered_adapter(adap); adap 38 drivers/i2c/algos/i2c-algo-pcf.c #define set_pcf(adap, ctl, val) adap->setpcf(adap->data, ctl, val) adap 39 drivers/i2c/algos/i2c-algo-pcf.c #define get_pcf(adap, ctl) adap->getpcf(adap->data, ctl) adap 40 drivers/i2c/algos/i2c-algo-pcf.c #define get_own(adap) adap->getown(adap->data) adap 41 drivers/i2c/algos/i2c-algo-pcf.c #define get_clock(adap) adap->getclock(adap->data) adap 42 drivers/i2c/algos/i2c-algo-pcf.c #define i2c_outb(adap, val) adap->setpcf(adap->data, 0, val) adap 43 drivers/i2c/algos/i2c-algo-pcf.c #define i2c_inb(adap) adap->getpcf(adap->data, 0) adap 47 drivers/i2c/algos/i2c-algo-pcf.c static void i2c_start(struct i2c_algo_pcf_data *adap) adap 50 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_START); adap 53 drivers/i2c/algos/i2c-algo-pcf.c static void i2c_repstart(struct i2c_algo_pcf_data *adap) adap 56 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_REPSTART); adap 59 drivers/i2c/algos/i2c-algo-pcf.c static void i2c_stop(struct i2c_algo_pcf_data *adap) adap 62 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_STOP); adap 65 drivers/i2c/algos/i2c-algo-pcf.c static void handle_lab(struct i2c_algo_pcf_data *adap, const int *status) adap 76 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_PIN); adap 77 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_ESO); adap 87 drivers/i2c/algos/i2c-algo-pcf.c if (adap->lab_mdelay) adap 88 drivers/i2c/algos/i2c-algo-pcf.c mdelay(adap->lab_mdelay); adap 92 drivers/i2c/algos/i2c-algo-pcf.c get_pcf(adap, 1))); adap 95 drivers/i2c/algos/i2c-algo-pcf.c static int wait_for_bb(struct i2c_algo_pcf_data *adap) adap 101 drivers/i2c/algos/i2c-algo-pcf.c status = get_pcf(adap, 1); adap 105 drivers/i2c/algos/i2c-algo-pcf.c status = get_pcf(adap, 1); adap 116 drivers/i2c/algos/i2c-algo-pcf.c static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) adap 121 drivers/i2c/algos/i2c-algo-pcf.c *status = get_pcf(adap, 1); adap 124 drivers/i2c/algos/i2c-algo-pcf.c adap->waitforpin(adap->data); adap 125 drivers/i2c/algos/i2c-algo-pcf.c *status = get_pcf(adap, 1); adap 128 drivers/i2c/algos/i2c-algo-pcf.c handle_lab(adap, status); adap 149 drivers/i2c/algos/i2c-algo-pcf.c static int pcf_init_8584 (struct i2c_algo_pcf_data *adap) adap 154 drivers/i2c/algos/i2c-algo-pcf.c get_pcf(adap, 1))); adap 157 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_PIN); adap 162 drivers/i2c/algos/i2c-algo-pcf.c if (((temp = get_pcf(adap, 1)) & 0x7f) != (0)) { adap 168 drivers/i2c/algos/i2c-algo-pcf.c i2c_outb(adap, get_own(adap)); adap 170 drivers/i2c/algos/i2c-algo-pcf.c if ((temp = i2c_inb(adap)) != get_own(adap)) { adap 176 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_PIN | I2C_PCF_ES1); adap 178 drivers/i2c/algos/i2c-algo-pcf.c if (((temp = get_pcf(adap, 1)) & 0x7f) != I2C_PCF_ES1) { adap 184 drivers/i2c/algos/i2c-algo-pcf.c i2c_outb(adap, get_clock(adap)); adap 186 drivers/i2c/algos/i2c-algo-pcf.c if (((temp = i2c_inb(adap)) & 0x1f) != get_clock(adap)) { adap 192 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_IDLE); adap 195 drivers/i2c/algos/i2c-algo-pcf.c if ((temp = get_pcf(adap, 1)) != (I2C_PCF_PIN | I2C_PCF_BB)) { adap 208 drivers/i2c/algos/i2c-algo-pcf.c struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; adap 214 drivers/i2c/algos/i2c-algo-pcf.c i2c_outb(adap, buf[wrcount]); adap 215 drivers/i2c/algos/i2c-algo-pcf.c timeout = wait_for_pin(adap, &status); adap 220 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 225 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 231 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 233 drivers/i2c/algos/i2c-algo-pcf.c i2c_repstart(adap); adap 242 drivers/i2c/algos/i2c-algo-pcf.c struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; adap 248 drivers/i2c/algos/i2c-algo-pcf.c if ((wfp = wait_for_pin(adap, &status))) { adap 252 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 258 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 264 drivers/i2c/algos/i2c-algo-pcf.c set_pcf(adap, 1, I2C_PCF_ESO); adap 267 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 269 drivers/i2c/algos/i2c-algo-pcf.c i2c_repstart(adap); adap 273 drivers/i2c/algos/i2c-algo-pcf.c buf[i - 1] = i2c_inb(adap); adap 275 drivers/i2c/algos/i2c-algo-pcf.c i2c_inb(adap); /* dummy read */ adap 282 drivers/i2c/algos/i2c-algo-pcf.c static int pcf_doAddress(struct i2c_algo_pcf_data *adap, adap 289 drivers/i2c/algos/i2c-algo-pcf.c i2c_outb(adap, addr); adap 298 drivers/i2c/algos/i2c-algo-pcf.c struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; adap 303 drivers/i2c/algos/i2c-algo-pcf.c if (adap->xfer_begin) adap 304 drivers/i2c/algos/i2c-algo-pcf.c adap->xfer_begin(adap->data); adap 307 drivers/i2c/algos/i2c-algo-pcf.c timeout = wait_for_bb(adap); adap 322 drivers/i2c/algos/i2c-algo-pcf.c ret = pcf_doAddress(adap, pmsg); adap 326 drivers/i2c/algos/i2c-algo-pcf.c i2c_start(adap); adap 329 drivers/i2c/algos/i2c-algo-pcf.c timeout = wait_for_pin(adap, &status); adap 336 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 345 drivers/i2c/algos/i2c-algo-pcf.c i2c_stop(adap); adap 378 drivers/i2c/algos/i2c-algo-pcf.c if (adap->xfer_end) adap 379 drivers/i2c/algos/i2c-algo-pcf.c adap->xfer_end(adap->data); adap 383 drivers/i2c/algos/i2c-algo-pcf.c static u32 pcf_func(struct i2c_adapter *adap) adap 398 drivers/i2c/algos/i2c-algo-pcf.c int i2c_pcf_add_bus(struct i2c_adapter *adap) adap 400 drivers/i2c/algos/i2c-algo-pcf.c struct i2c_algo_pcf_data *pcf_adap = adap->algo_data; adap 403 drivers/i2c/algos/i2c-algo-pcf.c DEB2(dev_dbg(&adap->dev, "hw routines registered.\n")); adap 406 drivers/i2c/algos/i2c-algo-pcf.c adap->algo = &pcf_algo; adap 411 drivers/i2c/algos/i2c-algo-pcf.c rval = i2c_add_adapter(adap); adap 212 drivers/i2c/busses/i2c-ali1535.c static int ali1535_transaction(struct i2c_adapter *adap) adap 218 drivers/i2c/busses/i2c-ali1535.c dev_dbg(&adap->dev, "Transaction (pre): STS=%02x, TYP=%02x, " adap 248 drivers/i2c/busses/i2c-ali1535.c dev_info(&adap->dev, adap 265 drivers/i2c/busses/i2c-ali1535.c dev_err(&adap->dev, adap 290 drivers/i2c/busses/i2c-ali1535.c dev_err(&adap->dev, "SMBus Timeout!\n"); adap 295 drivers/i2c/busses/i2c-ali1535.c dev_dbg(&adap->dev, "Error: Failed bus transaction\n"); adap 304 drivers/i2c/busses/i2c-ali1535.c dev_dbg(&adap->dev, adap 312 drivers/i2c/busses/i2c-ali1535.c dev_err(&adap->dev, "Error: device error\n"); adap 318 drivers/i2c/busses/i2c-ali1535.c dev_err(&adap->dev, "Error: command never completed\n"); adap 321 drivers/i2c/busses/i2c-ali1535.c dev_dbg(&adap->dev, "Transaction (post): STS=%02x, TYP=%02x, " adap 341 drivers/i2c/busses/i2c-ali1535.c static s32 ali1535_access(struct i2c_adapter *adap, u16 addr, adap 359 drivers/i2c/busses/i2c-ali1535.c dev_warn(&adap->dev, "Idle wait Timeout! STS=0x%02x\n", temp); adap 423 drivers/i2c/busses/i2c-ali1535.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 428 drivers/i2c/busses/i2c-ali1535.c result = ali1535_transaction(adap); adap 456 drivers/i2c/busses/i2c-ali1535.c dev_dbg(&adap->dev, "Blk: len=%d, i=%d, data=%02x\n", adap 219 drivers/i2c/busses/i2c-ali15x3.c static int ali15x3_transaction(struct i2c_adapter *adap) adap 225 drivers/i2c/busses/i2c-ali15x3.c dev_dbg(&adap->dev, "Transaction (pre): STS=%02x, CNT=%02x, CMD=%02x, " adap 257 drivers/i2c/busses/i2c-ali15x3.c dev_info(&adap->dev, "Resetting entire SMB Bus to " adap 272 drivers/i2c/busses/i2c-ali15x3.c dev_err(&adap->dev, "SMBus reset failed! (0x%02x) - " adap 298 drivers/i2c/busses/i2c-ali15x3.c dev_err(&adap->dev, "SMBus Timeout!\n"); adap 303 drivers/i2c/busses/i2c-ali15x3.c dev_dbg(&adap->dev, "Error: Failed bus transaction\n"); adap 314 drivers/i2c/busses/i2c-ali15x3.c dev_dbg(&adap->dev, adap 322 drivers/i2c/busses/i2c-ali15x3.c dev_err(&adap->dev, "Error: device error\n"); adap 324 drivers/i2c/busses/i2c-ali15x3.c dev_dbg(&adap->dev, "Transaction (post): STS=%02x, CNT=%02x, CMD=%02x, " adap 332 drivers/i2c/busses/i2c-ali15x3.c static s32 ali15x3_access(struct i2c_adapter * adap, u16 addr, adap 351 drivers/i2c/busses/i2c-ali15x3.c dev_err(&adap->dev, "Idle wait Timeout! STS=0x%02x\n", temp); adap 408 drivers/i2c/busses/i2c-ali15x3.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 414 drivers/i2c/busses/i2c-ali15x3.c temp = ali15x3_transaction(adap); adap 441 drivers/i2c/busses/i2c-ali15x3.c dev_dbg(&adap->dev, "Blk: len=%d, i=%d, data=%02x\n", adap 366 drivers/i2c/busses/i2c-altera.c altr_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 368 drivers/i2c/busses/i2c-altera.c struct altr_i2c_dev *idev = i2c_get_adapdata(adap); adap 379 drivers/i2c/busses/i2c-altera.c static u32 altr_i2c_func(struct i2c_adapter *adap) adap 34 drivers/i2c/busses/i2c-amd-mp2-plat.c struct i2c_adapter adap; adap 104 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.timeout); adap 153 drivers/i2c/busses/i2c-amd-mp2-plat.c static int i2c_amd_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 155 drivers/i2c/busses/i2c-amd-mp2-plat.c struct amd_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 302 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.owner = THIS_MODULE; adap 303 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.algo = &i2c_amd_algorithm; adap 304 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.quirks = &amd_i2c_dev_quirks; adap 305 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.dev.parent = &pdev->dev; adap 306 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.algo_data = i2c_dev; adap 307 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.timeout = AMD_I2C_TIMEOUT; adap 308 drivers/i2c/busses/i2c-amd-mp2-plat.c ACPI_COMPANION_SET(&i2c_dev->adap.dev, ACPI_COMPANION(&pdev->dev)); adap 309 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_dev->adap.dev.of_node = pdev->dev.of_node; adap 310 drivers/i2c/busses/i2c-amd-mp2-plat.c snprintf(i2c_dev->adap.name, sizeof(i2c_dev->adap.name), adap 312 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_set_adapdata(&i2c_dev->adap, i2c_dev); adap 321 drivers/i2c/busses/i2c-amd-mp2-plat.c ret = i2c_add_adapter(&i2c_dev->adap); adap 336 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_lock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); adap 342 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); adap 344 drivers/i2c/busses/i2c-amd-mp2-plat.c i2c_del_adapter(&i2c_dev->adap); adap 38 drivers/i2c/busses/i2c-amd756-s4882.c static s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr, adap 52 drivers/i2c/busses/i2c-amd756-s4882.c error = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write, adap 66 drivers/i2c/busses/i2c-amd756-s4882.c static inline s32 amd756_access_channel(struct i2c_adapter * adap, u16 addr, adap 84 drivers/i2c/busses/i2c-amd756-s4882.c error = amd756_smbus.algo->smbus_xfer(adap, 0x18, 0, adap 92 drivers/i2c/busses/i2c-amd756-s4882.c error = amd756_smbus.algo->smbus_xfer(adap, addr, flags, read_write, adap 100 drivers/i2c/busses/i2c-amd756-s4882.c static s32 amd756_access_virt1(struct i2c_adapter * adap, u16 addr, adap 106 drivers/i2c/busses/i2c-amd756-s4882.c return amd756_access_channel(adap, addr, flags, read_write, command, adap 110 drivers/i2c/busses/i2c-amd756-s4882.c static s32 amd756_access_virt2(struct i2c_adapter * adap, u16 addr, adap 116 drivers/i2c/busses/i2c-amd756-s4882.c return amd756_access_channel(adap, addr, flags, read_write, command, adap 120 drivers/i2c/busses/i2c-amd756-s4882.c static s32 amd756_access_virt3(struct i2c_adapter * adap, u16 addr, adap 126 drivers/i2c/busses/i2c-amd756-s4882.c return amd756_access_channel(adap, addr, flags, read_write, command, adap 130 drivers/i2c/busses/i2c-amd756-s4882.c static s32 amd756_access_virt4(struct i2c_adapter * adap, u16 addr, adap 136 drivers/i2c/busses/i2c-amd756-s4882.c return amd756_access_channel(adap, addr, flags, read_write, command, adap 96 drivers/i2c/busses/i2c-amd756.c static int amd756_transaction(struct i2c_adapter *adap) adap 102 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "Transaction (pre): GS=%04x, GE=%04x, ADD=%04x, " adap 109 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "SMBus busy (%04x). Waiting...\n", temp); adap 117 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "Busy wait timeout (%04x)\n", temp); adap 134 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "Completion timeout!\n"); adap 140 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "SMBus Protocol error (no response)!\n"); adap 145 drivers/i2c/busses/i2c-amd756.c dev_warn(&adap->dev, "SMBus collision!\n"); adap 150 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "SMBus protocol timeout!\n"); adap 154 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, "SMBus protocol success!\n"); adap 160 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, adap 165 drivers/i2c/busses/i2c-amd756.c dev_dbg(&adap->dev, adap 173 drivers/i2c/busses/i2c-amd756.c dev_warn(&adap->dev, "Sending abort\n"); adap 181 drivers/i2c/busses/i2c-amd756.c static s32 amd756_access(struct i2c_adapter * adap, u16 addr, adap 236 drivers/i2c/busses/i2c-amd756.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 243 drivers/i2c/busses/i2c-amd756.c status = amd756_transaction(adap); adap 189 drivers/i2c/busses/i2c-amd8111.c static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, adap 193 drivers/i2c/busses/i2c-amd8111.c struct amd_smbus *smbus = adap->algo_data; adap 324 drivers/i2c/busses/i2c-amd8111.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 143 drivers/i2c/busses/i2c-aspeed.c struct i2c_adapter adap; adap 195 drivers/i2c/busses/i2c-aspeed.c &bus->cmd_complete, bus->adap.timeout); adap 218 drivers/i2c/busses/i2c-aspeed.c &bus->cmd_complete, bus->adap.timeout); adap 658 drivers/i2c/busses/i2c-aspeed.c static int aspeed_i2c_master_xfer(struct i2c_adapter *adap, adap 661 drivers/i2c/busses/i2c-aspeed.c struct aspeed_i2c_bus *bus = i2c_get_adapdata(adap); adap 690 drivers/i2c/busses/i2c-aspeed.c bus->adap.timeout); adap 717 drivers/i2c/busses/i2c-aspeed.c static u32 aspeed_i2c_functionality(struct i2c_adapter *adap) adap 1012 drivers/i2c/busses/i2c-aspeed.c bus->adap.owner = THIS_MODULE; adap 1013 drivers/i2c/busses/i2c-aspeed.c bus->adap.retries = 0; adap 1014 drivers/i2c/busses/i2c-aspeed.c bus->adap.algo = &aspeed_i2c_algo; adap 1015 drivers/i2c/busses/i2c-aspeed.c bus->adap.dev.parent = &pdev->dev; adap 1016 drivers/i2c/busses/i2c-aspeed.c bus->adap.dev.of_node = pdev->dev.of_node; adap 1017 drivers/i2c/busses/i2c-aspeed.c strlcpy(bus->adap.name, pdev->name, sizeof(bus->adap.name)); adap 1018 drivers/i2c/busses/i2c-aspeed.c i2c_set_adapdata(&bus->adap, bus); adap 1039 drivers/i2c/busses/i2c-aspeed.c ret = i2c_add_adapter(&bus->adap); adap 1046 drivers/i2c/busses/i2c-aspeed.c bus->adap.nr, irq); adap 1066 drivers/i2c/busses/i2c-aspeed.c i2c_del_adapter(&bus->adap); adap 605 drivers/i2c/busses/i2c-at91-master.c static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) adap 607 drivers/i2c/busses/i2c-at91-master.c struct at91_twi_dev *dev = i2c_get_adapdata(adap); adap 613 drivers/i2c/busses/i2c-at91-master.c dev_dbg(&adap->dev, "at91_xfer: processing %d messages:\n", num); adap 41 drivers/i2c/busses/i2c-au1550.c struct i2c_adapter adap; adap 55 drivers/i2c/busses/i2c-au1550.c static int wait_xfer_done(struct i2c_au1550_data *adap) adap 60 drivers/i2c/busses/i2c-au1550.c for (i = 0; i < adap->xfer_timeout; i++) { adap 61 drivers/i2c/busses/i2c-au1550.c if (RD(adap, PSC_SMBSTAT) & PSC_SMBSTAT_TE) adap 70 drivers/i2c/busses/i2c-au1550.c static int wait_ack(struct i2c_au1550_data *adap) adap 74 drivers/i2c/busses/i2c-au1550.c if (wait_xfer_done(adap)) adap 77 drivers/i2c/busses/i2c-au1550.c stat = RD(adap, PSC_SMBEVNT); adap 84 drivers/i2c/busses/i2c-au1550.c static int wait_master_done(struct i2c_au1550_data *adap) adap 89 drivers/i2c/busses/i2c-au1550.c for (i = 0; i < 2 * adap->xfer_timeout; i++) { adap 90 drivers/i2c/busses/i2c-au1550.c if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0) adap 99 drivers/i2c/busses/i2c-au1550.c do_address(struct i2c_au1550_data *adap, unsigned int addr, int rd, int q) adap 104 drivers/i2c/busses/i2c-au1550.c stat = RD(adap, PSC_SMBSTAT); adap 105 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBEVNT, PSC_SMBEVNT_ALLCLR); adap 108 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBPCR, PSC_SMBPCR_DC); adap 109 drivers/i2c/busses/i2c-au1550.c while ((RD(adap, PSC_SMBPCR) & PSC_SMBPCR_DC) != 0) adap 124 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBTXRX, addr); adap 125 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBPCR, PSC_SMBPCR_MS); adap 126 drivers/i2c/busses/i2c-au1550.c if (wait_ack(adap)) adap 128 drivers/i2c/busses/i2c-au1550.c return (q) ? wait_master_done(adap) : 0; adap 131 drivers/i2c/busses/i2c-au1550.c static int wait_for_rx_byte(struct i2c_au1550_data *adap, unsigned char *out) adap 135 drivers/i2c/busses/i2c-au1550.c if (wait_xfer_done(adap)) adap 138 drivers/i2c/busses/i2c-au1550.c j = adap->xfer_timeout * 100; adap 144 drivers/i2c/busses/i2c-au1550.c if ((RD(adap, PSC_SMBSTAT) & PSC_SMBSTAT_RE) == 0) adap 150 drivers/i2c/busses/i2c-au1550.c *out = RD(adap, PSC_SMBTXRX); adap 155 drivers/i2c/busses/i2c-au1550.c static int i2c_read(struct i2c_au1550_data *adap, unsigned char *buf, adap 169 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBTXRX, 0); adap 170 drivers/i2c/busses/i2c-au1550.c if (wait_for_rx_byte(adap, &buf[i])) adap 177 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBTXRX, PSC_SMBTXRX_STP); adap 178 drivers/i2c/busses/i2c-au1550.c if (wait_master_done(adap)) adap 181 drivers/i2c/busses/i2c-au1550.c buf[i] = (unsigned char)(RD(adap, PSC_SMBTXRX) & 0xff); adap 185 drivers/i2c/busses/i2c-au1550.c static int i2c_write(struct i2c_au1550_data *adap, unsigned char *buf, adap 197 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBTXRX, data); adap 198 drivers/i2c/busses/i2c-au1550.c if (wait_ack(adap)) adap 206 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_SMBTXRX, data); adap 207 drivers/i2c/busses/i2c-au1550.c if (wait_master_done(adap)) adap 215 drivers/i2c/busses/i2c-au1550.c struct i2c_au1550_data *adap = i2c_adap->algo_data; adap 219 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_CTRL, PSC_CTRL_ENABLE); adap 223 drivers/i2c/busses/i2c-au1550.c err = do_address(adap, p->addr, p->flags & I2C_M_RD, adap 228 drivers/i2c/busses/i2c-au1550.c err = i2c_read(adap, p->buf, p->len); adap 230 drivers/i2c/busses/i2c-au1550.c err = i2c_write(adap, p->buf, p->len); adap 238 drivers/i2c/busses/i2c-au1550.c WR(adap, PSC_CTRL, PSC_CTRL_SUSPEND); adap 243 drivers/i2c/busses/i2c-au1550.c static u32 au1550_func(struct i2c_adapter *adap) adap 320 drivers/i2c/busses/i2c-au1550.c priv->adap.nr = pdev->id; adap 321 drivers/i2c/busses/i2c-au1550.c priv->adap.algo = &au1550_algo; adap 322 drivers/i2c/busses/i2c-au1550.c priv->adap.algo_data = priv; adap 323 drivers/i2c/busses/i2c-au1550.c priv->adap.dev.parent = &pdev->dev; adap 324 drivers/i2c/busses/i2c-au1550.c strlcpy(priv->adap.name, "Au1xxx PSC I2C", sizeof(priv->adap.name)); adap 329 drivers/i2c/busses/i2c-au1550.c ret = i2c_add_numbered_adapter(&priv->adap); adap 343 drivers/i2c/busses/i2c-au1550.c i2c_del_adapter(&priv->adap); adap 613 drivers/i2c/busses/i2c-axxia.c axxia_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 615 drivers/i2c/busses/i2c-axxia.c struct axxia_i2c_dev *idev = i2c_get_adapdata(adap); adap 634 drivers/i2c/busses/i2c-axxia.c static int axxia_i2c_get_scl(struct i2c_adapter *adap) adap 636 drivers/i2c/busses/i2c-axxia.c struct axxia_i2c_dev *idev = i2c_get_adapdata(adap); adap 641 drivers/i2c/busses/i2c-axxia.c static void axxia_i2c_set_scl(struct i2c_adapter *adap, int val) adap 643 drivers/i2c/busses/i2c-axxia.c struct axxia_i2c_dev *idev = i2c_get_adapdata(adap); adap 653 drivers/i2c/busses/i2c-axxia.c static int axxia_i2c_get_sda(struct i2c_adapter *adap) adap 655 drivers/i2c/busses/i2c-axxia.c struct axxia_i2c_dev *idev = i2c_get_adapdata(adap); adap 667 drivers/i2c/busses/i2c-axxia.c static u32 axxia_i2c_func(struct i2c_adapter *adap) adap 794 drivers/i2c/busses/i2c-bcm-iproc.c static uint32_t bcm_iproc_i2c_functionality(struct i2c_adapter *adap) adap 801 drivers/i2c/busses/i2c-bcm-iproc.c if (adap->algo->reg_slave) adap 857 drivers/i2c/busses/i2c-bcm-iproc.c struct i2c_adapter *adap; adap 926 drivers/i2c/busses/i2c-bcm-iproc.c adap = &iproc_i2c->adapter; adap 927 drivers/i2c/busses/i2c-bcm-iproc.c i2c_set_adapdata(adap, iproc_i2c); adap 928 drivers/i2c/busses/i2c-bcm-iproc.c snprintf(adap->name, sizeof(adap->name), adap 931 drivers/i2c/busses/i2c-bcm-iproc.c adap->algo = &bcm_iproc_algo; adap 932 drivers/i2c/busses/i2c-bcm-iproc.c adap->quirks = &bcm_iproc_i2c_quirks; adap 933 drivers/i2c/busses/i2c-bcm-iproc.c adap->dev.parent = &pdev->dev; adap 934 drivers/i2c/busses/i2c-bcm-iproc.c adap->dev.of_node = pdev->dev.of_node; adap 936 drivers/i2c/busses/i2c-bcm-iproc.c return i2c_add_adapter(adap); adap 703 drivers/i2c/busses/i2c-bcm-kona.c static uint32_t bcm_kona_i2c_functionality(struct i2c_adapter *adap) adap 752 drivers/i2c/busses/i2c-bcm-kona.c struct i2c_adapter *adap; adap 852 drivers/i2c/busses/i2c-bcm-kona.c adap = &dev->adapter; adap 853 drivers/i2c/busses/i2c-bcm-kona.c i2c_set_adapdata(adap, dev); adap 854 drivers/i2c/busses/i2c-bcm-kona.c adap->owner = THIS_MODULE; adap 855 drivers/i2c/busses/i2c-bcm-kona.c strlcpy(adap->name, "Broadcom I2C adapter", sizeof(adap->name)); adap 856 drivers/i2c/busses/i2c-bcm-kona.c adap->algo = &bcm_algo; adap 857 drivers/i2c/busses/i2c-bcm-kona.c adap->dev.parent = &pdev->dev; adap 858 drivers/i2c/busses/i2c-bcm-kona.c adap->dev.of_node = pdev->dev.of_node; adap 860 drivers/i2c/busses/i2c-bcm-kona.c rc = i2c_add_adapter(adap); adap 340 drivers/i2c/busses/i2c-bcm2835.c static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], adap 343 drivers/i2c/busses/i2c-bcm2835.c struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 361 drivers/i2c/busses/i2c-bcm2835.c adap->timeout); adap 383 drivers/i2c/busses/i2c-bcm2835.c static u32 bcm2835_i2c_func(struct i2c_adapter *adap) adap 407 drivers/i2c/busses/i2c-bcm2835.c struct i2c_adapter *adap; adap 471 drivers/i2c/busses/i2c-bcm2835.c adap = &i2c_dev->adapter; adap 472 drivers/i2c/busses/i2c-bcm2835.c i2c_set_adapdata(adap, i2c_dev); adap 473 drivers/i2c/busses/i2c-bcm2835.c adap->owner = THIS_MODULE; adap 474 drivers/i2c/busses/i2c-bcm2835.c adap->class = I2C_CLASS_DEPRECATED; adap 475 drivers/i2c/busses/i2c-bcm2835.c snprintf(adap->name, sizeof(adap->name), "bcm2835 (%s)", adap 477 drivers/i2c/busses/i2c-bcm2835.c adap->algo = &bcm2835_i2c_algo; adap 478 drivers/i2c/busses/i2c-bcm2835.c adap->dev.parent = &pdev->dev; adap 479 drivers/i2c/busses/i2c-bcm2835.c adap->dev.of_node = pdev->dev.of_node; adap 480 drivers/i2c/busses/i2c-bcm2835.c adap->quirks = of_device_get_match_data(&pdev->dev); adap 484 drivers/i2c/busses/i2c-bcm2835.c ret = i2c_add_adapter(adap); adap 534 drivers/i2c/busses/i2c-brcmstb.c static u32 brcmstb_i2c_functionality(struct i2c_adapter *adap) adap 587 drivers/i2c/busses/i2c-brcmstb.c struct i2c_adapter *adap; adap 651 drivers/i2c/busses/i2c-brcmstb.c adap = &dev->adapter; adap 652 drivers/i2c/busses/i2c-brcmstb.c i2c_set_adapdata(adap, dev); adap 653 drivers/i2c/busses/i2c-brcmstb.c adap->owner = THIS_MODULE; adap 654 drivers/i2c/busses/i2c-brcmstb.c strlcpy(adap->name, "Broadcom STB : ", sizeof(adap->name)); adap 656 drivers/i2c/busses/i2c-brcmstb.c strlcat(adap->name, int_name, sizeof(adap->name)); adap 657 drivers/i2c/busses/i2c-brcmstb.c adap->algo = &brcmstb_i2c_algo; adap 658 drivers/i2c/busses/i2c-brcmstb.c adap->dev.parent = &pdev->dev; adap 659 drivers/i2c/busses/i2c-brcmstb.c adap->dev.of_node = pdev->dev.of_node; adap 660 drivers/i2c/busses/i2c-brcmstb.c rc = i2c_add_adapter(adap); adap 145 drivers/i2c/busses/i2c-cadence.c struct i2c_adapter adap; adap 489 drivers/i2c/busses/i2c-cadence.c static void cdns_i2c_master_reset(struct i2c_adapter *adap) adap 491 drivers/i2c/busses/i2c-cadence.c struct cdns_i2c *id = adap->algo_data; adap 512 drivers/i2c/busses/i2c-cadence.c struct i2c_adapter *adap) adap 540 drivers/i2c/busses/i2c-cadence.c time_left = wait_for_completion_timeout(&id->xfer_done, adap->timeout); adap 542 drivers/i2c/busses/i2c-cadence.c cdns_i2c_master_reset(adap); adap 543 drivers/i2c/busses/i2c-cadence.c dev_err(id->adap.dev.parent, adap 568 drivers/i2c/busses/i2c-cadence.c static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 573 drivers/i2c/busses/i2c-cadence.c struct cdns_i2c *id = adap->algo_data; adap 600 drivers/i2c/busses/i2c-cadence.c dev_warn(adap->dev.parent, adap 619 drivers/i2c/busses/i2c-cadence.c ret = cdns_i2c_process_msg(id, msgs, adap); adap 625 drivers/i2c/busses/i2c-cadence.c cdns_i2c_master_reset(adap); adap 649 drivers/i2c/busses/i2c-cadence.c static u32 cdns_i2c_func(struct i2c_adapter *adap) adap 792 drivers/i2c/busses/i2c-cadence.c dev_warn(id->adap.dev.parent, adap 911 drivers/i2c/busses/i2c-cadence.c id->adap.owner = THIS_MODULE; adap 912 drivers/i2c/busses/i2c-cadence.c id->adap.dev.of_node = pdev->dev.of_node; adap 913 drivers/i2c/busses/i2c-cadence.c id->adap.algo = &cdns_i2c_algo; adap 914 drivers/i2c/busses/i2c-cadence.c id->adap.timeout = CDNS_I2C_TIMEOUT; adap 915 drivers/i2c/busses/i2c-cadence.c id->adap.retries = 3; /* Default retry value. */ adap 916 drivers/i2c/busses/i2c-cadence.c id->adap.algo_data = id; adap 917 drivers/i2c/busses/i2c-cadence.c id->adap.dev.parent = &pdev->dev; adap 919 drivers/i2c/busses/i2c-cadence.c snprintf(id->adap.name, sizeof(id->adap.name), adap 972 drivers/i2c/busses/i2c-cadence.c ret = i2c_add_adapter(&id->adap); adap 1000 drivers/i2c/busses/i2c-cadence.c i2c_del_adapter(&id->adap); adap 58 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = data; adap 61 drivers/i2c/busses/i2c-cht-wc.c mutex_lock(&adap->adap_lock); adap 64 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_read(adap->regmap, CHT_WC_EXTCHGRIRQ, ®); adap 66 drivers/i2c/busses/i2c-cht-wc.c dev_err(&adap->adapter.dev, "Error reading extchgrirq reg\n"); adap 67 drivers/i2c/busses/i2c-cht-wc.c mutex_unlock(&adap->adap_lock); adap 71 drivers/i2c/busses/i2c-cht-wc.c reg &= ~adap->irq_mask; adap 74 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_read(adap->regmap, CHT_WC_I2C_RDDATA, &adap->read_data); adap 76 drivers/i2c/busses/i2c-cht-wc.c adap->io_error = true; adap 82 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ, reg); adap 84 drivers/i2c/busses/i2c-cht-wc.c dev_err(&adap->adapter.dev, "Error writing extchgrirq reg\n"); adap 87 drivers/i2c/busses/i2c-cht-wc.c adap->io_error |= !!(reg & CHT_WC_EXTCHGRIRQ_NACK_IRQ); adap 88 drivers/i2c/busses/i2c-cht-wc.c adap->done = true; adap 91 drivers/i2c/busses/i2c-cht-wc.c mutex_unlock(&adap->adap_lock); adap 94 drivers/i2c/busses/i2c-cht-wc.c wake_up(&adap->wait); adap 108 drivers/i2c/busses/i2c-cht-wc.c generic_handle_irq(adap->client_irq); adap 115 drivers/i2c/busses/i2c-cht-wc.c static u32 cht_wc_i2c_adap_master_func(struct i2c_adapter *adap) adap 126 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = i2c_get_adapdata(_adap); adap 129 drivers/i2c/busses/i2c-cht-wc.c mutex_lock(&adap->adap_lock); adap 130 drivers/i2c/busses/i2c-cht-wc.c adap->io_error = false; adap 131 drivers/i2c/busses/i2c-cht-wc.c adap->done = false; adap 132 drivers/i2c/busses/i2c-cht-wc.c mutex_unlock(&adap->adap_lock); adap 134 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_I2C_CLIENT_ADDR, addr); adap 139 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_I2C_WRDATA, data->byte); adap 144 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_I2C_REG_OFFSET, command); adap 148 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_I2C_CTRL, adap 154 drivers/i2c/busses/i2c-cht-wc.c ret = wait_event_timeout(adap->wait, adap->done, msecs_to_jiffies(30)); adap 160 drivers/i2c/busses/i2c-cht-wc.c cht_wc_i2c_adap_thread_handler(0, adap); adap 161 drivers/i2c/busses/i2c-cht-wc.c if (!adap->done) adap 166 drivers/i2c/busses/i2c-cht-wc.c mutex_lock(&adap->adap_lock); adap 167 drivers/i2c/busses/i2c-cht-wc.c if (adap->io_error) adap 170 drivers/i2c/busses/i2c-cht-wc.c data->byte = adap->read_data; adap 171 drivers/i2c/busses/i2c-cht-wc.c mutex_unlock(&adap->adap_lock); adap 229 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); adap 231 drivers/i2c/busses/i2c-cht-wc.c mutex_lock(&adap->irqchip_lock); adap 236 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); adap 239 drivers/i2c/busses/i2c-cht-wc.c if (adap->irq_mask != adap->old_irq_mask) { adap 240 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ_MSK, adap 241 drivers/i2c/busses/i2c-cht-wc.c adap->irq_mask); adap 243 drivers/i2c/busses/i2c-cht-wc.c adap->old_irq_mask = adap->irq_mask; adap 245 drivers/i2c/busses/i2c-cht-wc.c dev_err(&adap->adapter.dev, "Error writing EXTCHGRIRQ_MSK\n"); adap 248 drivers/i2c/busses/i2c-cht-wc.c mutex_unlock(&adap->irqchip_lock); adap 253 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); adap 255 drivers/i2c/busses/i2c-cht-wc.c adap->irq_mask &= ~CHT_WC_EXTCHGRIRQ_CLIENT_IRQ; adap 260 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); adap 262 drivers/i2c/busses/i2c-cht-wc.c adap->irq_mask |= CHT_WC_EXTCHGRIRQ_CLIENT_IRQ; adap 306 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap; adap 322 drivers/i2c/busses/i2c-cht-wc.c adap = devm_kzalloc(&pdev->dev, sizeof(*adap), GFP_KERNEL); adap 323 drivers/i2c/busses/i2c-cht-wc.c if (!adap) adap 326 drivers/i2c/busses/i2c-cht-wc.c init_waitqueue_head(&adap->wait); adap 327 drivers/i2c/busses/i2c-cht-wc.c mutex_init(&adap->adap_lock); adap 328 drivers/i2c/busses/i2c-cht-wc.c mutex_init(&adap->irqchip_lock); adap 329 drivers/i2c/busses/i2c-cht-wc.c adap->irqchip = cht_wc_i2c_irq_chip; adap 330 drivers/i2c/busses/i2c-cht-wc.c adap->regmap = pmic->regmap; adap 331 drivers/i2c/busses/i2c-cht-wc.c adap->adapter.owner = THIS_MODULE; adap 332 drivers/i2c/busses/i2c-cht-wc.c adap->adapter.class = I2C_CLASS_HWMON; adap 333 drivers/i2c/busses/i2c-cht-wc.c adap->adapter.algo = &cht_wc_i2c_adap_algo; adap 334 drivers/i2c/busses/i2c-cht-wc.c adap->adapter.lock_ops = &cht_wc_i2c_adap_lock_ops; adap 335 drivers/i2c/busses/i2c-cht-wc.c strlcpy(adap->adapter.name, "PMIC I2C Adapter", adap 336 drivers/i2c/busses/i2c-cht-wc.c sizeof(adap->adapter.name)); adap 337 drivers/i2c/busses/i2c-cht-wc.c adap->adapter.dev.parent = &pdev->dev; adap 340 drivers/i2c/busses/i2c-cht-wc.c adap->old_irq_mask = adap->irq_mask = ~CHT_WC_EXTCHGRIRQ_ADAP_IRQMASK; adap 342 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_read(adap->regmap, CHT_WC_I2C_RDDATA, ®); adap 346 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ, ~adap->irq_mask); adap 350 drivers/i2c/busses/i2c-cht-wc.c ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ_MSK, adap->irq_mask); adap 355 drivers/i2c/busses/i2c-cht-wc.c adap->irq_domain = irq_domain_add_linear(pdev->dev.of_node, 1, adap 357 drivers/i2c/busses/i2c-cht-wc.c if (!adap->irq_domain) adap 360 drivers/i2c/busses/i2c-cht-wc.c adap->client_irq = irq_create_mapping(adap->irq_domain, 0); adap 361 drivers/i2c/busses/i2c-cht-wc.c if (!adap->client_irq) { adap 366 drivers/i2c/busses/i2c-cht-wc.c irq_set_chip_data(adap->client_irq, adap); adap 367 drivers/i2c/busses/i2c-cht-wc.c irq_set_chip_and_handler(adap->client_irq, &adap->irqchip, adap 372 drivers/i2c/busses/i2c-cht-wc.c IRQF_ONESHOT, "PMIC I2C Adapter", adap); adap 376 drivers/i2c/busses/i2c-cht-wc.c i2c_set_adapdata(&adap->adapter, adap); adap 377 drivers/i2c/busses/i2c-cht-wc.c ret = i2c_add_adapter(&adap->adapter); adap 390 drivers/i2c/busses/i2c-cht-wc.c board_info.irq = adap->client_irq; adap 391 drivers/i2c/busses/i2c-cht-wc.c adap->client = i2c_new_device(&adap->adapter, &board_info); adap 392 drivers/i2c/busses/i2c-cht-wc.c if (!adap->client) { adap 398 drivers/i2c/busses/i2c-cht-wc.c platform_set_drvdata(pdev, adap); adap 402 drivers/i2c/busses/i2c-cht-wc.c i2c_del_adapter(&adap->adapter); adap 404 drivers/i2c/busses/i2c-cht-wc.c irq_domain_remove(adap->irq_domain); adap 410 drivers/i2c/busses/i2c-cht-wc.c struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev); adap 412 drivers/i2c/busses/i2c-cht-wc.c i2c_unregister_device(adap->client); adap 413 drivers/i2c/busses/i2c-cht-wc.c i2c_del_adapter(&adap->adapter); adap 414 drivers/i2c/busses/i2c-cht-wc.c irq_domain_remove(adap->irq_domain); adap 96 drivers/i2c/busses/i2c-cpm.c struct i2c_adapter adap; adap 118 drivers/i2c/busses/i2c-cpm.c struct i2c_adapter *adap = dev_id; adap 128 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "Interrupt: %x\n", i); adap 165 drivers/i2c/busses/i2c-cpm.c static void cpm_i2c_force_close(struct i2c_adapter *adap) adap 167 drivers/i2c/busses/i2c-cpm.c struct cpm_i2c *cpm = i2c_get_adapdata(adap); adap 170 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "cpm_i2c_force_close()\n"); adap 178 drivers/i2c/busses/i2c-cpm.c static void cpm_i2c_parse_message(struct i2c_adapter *adap, adap 186 drivers/i2c/busses/i2c-cpm.c struct cpm_i2c *cpm = i2c_get_adapdata(adap); adap 217 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "cpm_i2c_read(abyte=0x%x)\n", addr); adap 228 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "cpm_i2c_write(abyte=0x%x)\n", addr); adap 237 drivers/i2c/busses/i2c-cpm.c static int cpm_i2c_check_message(struct i2c_adapter *adap, adap 244 drivers/i2c/busses/i2c-cpm.c struct cpm_i2c *cpm = i2c_get_adapdata(adap); adap 257 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "tx sc 0x%04x, rx sc 0x%04x\n", adap 261 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "I2C read; No ack\n"); adap 265 drivers/i2c/busses/i2c-cpm.c dev_err(&adap->dev, adap 270 drivers/i2c/busses/i2c-cpm.c dev_err(&adap->dev, "I2C read; Overrun\n"); adap 275 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "tx sc %d 0x%04x\n", tx, adap 279 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "I2C write; No ack\n"); adap 283 drivers/i2c/busses/i2c-cpm.c dev_err(&adap->dev, "I2C write; Underrun\n"); adap 287 drivers/i2c/busses/i2c-cpm.c dev_err(&adap->dev, "I2C write; Collision\n"); adap 294 drivers/i2c/busses/i2c-cpm.c static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 296 drivers/i2c/busses/i2c-cpm.c struct cpm_i2c *cpm = i2c_get_adapdata(adap); adap 326 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "R: %d T: %d\n", rptr, tptr); adap 328 drivers/i2c/busses/i2c-cpm.c cpm_i2c_parse_message(adap, pmsg, num, tptr, rptr); adap 347 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "test ready.\n"); adap 360 drivers/i2c/busses/i2c-cpm.c dev_err(&adap->dev, "I2C transfer: timeout\n"); adap 364 drivers/i2c/busses/i2c-cpm.c dev_dbg(&adap->dev, "ready.\n"); adap 365 drivers/i2c/busses/i2c-cpm.c ret = cpm_i2c_check_message(adap, pmsg, tptr, rptr); adap 384 drivers/i2c/busses/i2c-cpm.c cpm_i2c_force_close(adap); adap 394 drivers/i2c/busses/i2c-cpm.c static u32 cpm_i2c_func(struct i2c_adapter *adap) adap 440 drivers/i2c/busses/i2c-cpm.c &cpm->adap); adap 498 drivers/i2c/busses/i2c-cpm.c cpm->adap.class = *data; adap 596 drivers/i2c/busses/i2c-cpm.c free_irq(cpm->irq, &cpm->adap); adap 611 drivers/i2c/busses/i2c-cpm.c free_irq(cpm->irq, &cpm->adap); adap 644 drivers/i2c/busses/i2c-cpm.c cpm->adap = cpm_ops; adap 645 drivers/i2c/busses/i2c-cpm.c i2c_set_adapdata(&cpm->adap, cpm); adap 646 drivers/i2c/busses/i2c-cpm.c cpm->adap.dev.parent = &ofdev->dev; adap 647 drivers/i2c/busses/i2c-cpm.c cpm->adap.dev.of_node = of_node_get(ofdev->dev.of_node); adap 658 drivers/i2c/busses/i2c-cpm.c cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1; adap 659 drivers/i2c/busses/i2c-cpm.c result = i2c_add_numbered_adapter(&cpm->adap); adap 665 drivers/i2c/busses/i2c-cpm.c cpm->adap.name); adap 680 drivers/i2c/busses/i2c-cpm.c i2c_del_adapter(&cpm->adap); adap 28 drivers/i2c/busses/i2c-cros-ec-tunnel.c struct i2c_adapter adap; adap 173 drivers/i2c/busses/i2c-cros-ec-tunnel.c static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], adap 176 drivers/i2c/busses/i2c-cros-ec-tunnel.c struct ec_i2c_device *bus = adap->algo_data; adap 231 drivers/i2c/busses/i2c-cros-ec-tunnel.c static u32 ec_i2c_functionality(struct i2c_adapter *adap) adap 269 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.owner = THIS_MODULE; adap 270 drivers/i2c/busses/i2c-cros-ec-tunnel.c strlcpy(bus->adap.name, "cros-ec-i2c-tunnel", sizeof(bus->adap.name)); adap 271 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.algo = &ec_i2c_algorithm; adap 272 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.algo_data = bus; adap 273 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.dev.parent = &pdev->dev; adap 274 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.dev.of_node = np; adap 275 drivers/i2c/busses/i2c-cros-ec-tunnel.c bus->adap.retries = I2C_MAX_RETRIES; adap 277 drivers/i2c/busses/i2c-cros-ec-tunnel.c err = i2c_add_adapter(&bus->adap); adap 289 drivers/i2c/busses/i2c-cros-ec-tunnel.c i2c_del_adapter(&bus->adap); adap 294 drivers/i2c/busses/i2c-davinci.c static void davinci_i2c_prepare_recovery(struct i2c_adapter *adap) adap 296 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 305 drivers/i2c/busses/i2c-davinci.c static void davinci_i2c_unprepare_recovery(struct i2c_adapter *adap) adap 307 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 318 drivers/i2c/busses/i2c-davinci.c static void davinci_i2c_set_scl(struct i2c_adapter *adap, int val) adap 320 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 330 drivers/i2c/busses/i2c-davinci.c static int davinci_i2c_get_scl(struct i2c_adapter *adap) adap 332 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 340 drivers/i2c/busses/i2c-davinci.c static int davinci_i2c_get_sda(struct i2c_adapter *adap) adap 342 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 350 drivers/i2c/busses/i2c-davinci.c static void davinci_i2c_scl_prepare_recovery(struct i2c_adapter *adap) adap 352 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 354 drivers/i2c/busses/i2c-davinci.c davinci_i2c_prepare_recovery(adap); adap 364 drivers/i2c/busses/i2c-davinci.c static void davinci_i2c_scl_unprepare_recovery(struct i2c_adapter *adap) adap 366 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 371 drivers/i2c/busses/i2c-davinci.c davinci_i2c_unprepare_recovery(adap); adap 414 drivers/i2c/busses/i2c-davinci.c i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) adap 416 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 493 drivers/i2c/busses/i2c-davinci.c i2c_recover_bus(adap); adap 534 drivers/i2c/busses/i2c-davinci.c i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 536 drivers/i2c/busses/i2c-davinci.c struct davinci_i2c_dev *dev = i2c_get_adapdata(adap); adap 556 drivers/i2c/busses/i2c-davinci.c ret = i2c_davinci_xfer_msg(adap, &msgs[i], (i == (num - 1))); adap 572 drivers/i2c/busses/i2c-davinci.c static u32 i2c_davinci_func(struct i2c_adapter *adap) adap 763 drivers/i2c/busses/i2c-davinci.c struct i2c_adapter *adap; adap 851 drivers/i2c/busses/i2c-davinci.c adap = &dev->adapter; adap 852 drivers/i2c/busses/i2c-davinci.c i2c_set_adapdata(adap, dev); adap 853 drivers/i2c/busses/i2c-davinci.c adap->owner = THIS_MODULE; adap 854 drivers/i2c/busses/i2c-davinci.c adap->class = I2C_CLASS_DEPRECATED; adap 855 drivers/i2c/busses/i2c-davinci.c strlcpy(adap->name, "DaVinci I2C adapter", sizeof(adap->name)); adap 856 drivers/i2c/busses/i2c-davinci.c adap->algo = &i2c_davinci_algo; adap 857 drivers/i2c/busses/i2c-davinci.c adap->dev.parent = &pdev->dev; adap 858 drivers/i2c/busses/i2c-davinci.c adap->timeout = DAVINCI_I2C_TIMEOUT; adap 859 drivers/i2c/busses/i2c-davinci.c adap->dev.of_node = pdev->dev.of_node; adap 862 drivers/i2c/busses/i2c-davinci.c adap->bus_recovery_info = &davinci_i2c_scl_recovery_info; adap 865 drivers/i2c/busses/i2c-davinci.c adap->bus_recovery_info = rinfo; adap 879 drivers/i2c/busses/i2c-davinci.c adap->nr = pdev->id; adap 880 drivers/i2c/busses/i2c-davinci.c r = i2c_add_numbered_adapter(adap); adap 347 drivers/i2c/busses/i2c-designware-common.c u32 i2c_dw_func(struct i2c_adapter *adap) adap 349 drivers/i2c/busses/i2c-designware-common.c struct dw_i2c_dev *dev = i2c_get_adapdata(adap); adap 300 drivers/i2c/busses/i2c-designware-core.h u32 i2c_dw_func(struct i2c_adapter *adap); adap 420 drivers/i2c/busses/i2c-designware-master.c i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 422 drivers/i2c/busses/i2c-designware-master.c struct dw_i2c_dev *dev = i2c_get_adapdata(adap); adap 457 drivers/i2c/busses/i2c-designware-master.c if (!wait_for_completion_timeout(&dev->cmd_complete, adap->timeout)) { adap 635 drivers/i2c/busses/i2c-designware-master.c static void i2c_dw_prepare_recovery(struct i2c_adapter *adap) adap 637 drivers/i2c/busses/i2c-designware-master.c struct dw_i2c_dev *dev = i2c_get_adapdata(adap); adap 644 drivers/i2c/busses/i2c-designware-master.c static void i2c_dw_unprepare_recovery(struct i2c_adapter *adap) adap 646 drivers/i2c/busses/i2c-designware-master.c struct dw_i2c_dev *dev = i2c_get_adapdata(adap); adap 656 drivers/i2c/busses/i2c-designware-master.c struct i2c_adapter *adap = &dev->adapter; adap 673 drivers/i2c/busses/i2c-designware-master.c adap->bus_recovery_info = rinfo; adap 683 drivers/i2c/busses/i2c-designware-master.c struct i2c_adapter *adap = &dev->adapter; adap 705 drivers/i2c/busses/i2c-designware-master.c snprintf(adap->name, sizeof(adap->name), adap 707 drivers/i2c/busses/i2c-designware-master.c adap->retries = 3; adap 708 drivers/i2c/busses/i2c-designware-master.c adap->algo = &i2c_dw_algo; adap 709 drivers/i2c/busses/i2c-designware-master.c adap->quirks = &i2c_dw_quirks; adap 710 drivers/i2c/busses/i2c-designware-master.c adap->dev.parent = dev->dev; adap 711 drivers/i2c/busses/i2c-designware-master.c i2c_set_adapdata(adap, dev); adap 739 drivers/i2c/busses/i2c-designware-master.c ret = i2c_add_numbered_adapter(adap); adap 217 drivers/i2c/busses/i2c-designware-pcidrv.c struct i2c_adapter *adap; adap 287 drivers/i2c/busses/i2c-designware-pcidrv.c adap = &dev->adapter; adap 288 drivers/i2c/busses/i2c-designware-pcidrv.c adap->owner = THIS_MODULE; adap 289 drivers/i2c/busses/i2c-designware-pcidrv.c adap->class = 0; adap 290 drivers/i2c/busses/i2c-designware-pcidrv.c ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); adap 291 drivers/i2c/busses/i2c-designware-pcidrv.c adap->nr = controller->bus_num; adap 254 drivers/i2c/busses/i2c-designware-platdrv.c struct i2c_adapter *adap; adap 366 drivers/i2c/busses/i2c-designware-platdrv.c adap = &dev->adapter; adap 367 drivers/i2c/busses/i2c-designware-platdrv.c adap->owner = THIS_MODULE; adap 368 drivers/i2c/busses/i2c-designware-platdrv.c adap->class = I2C_CLASS_DEPRECATED; adap 369 drivers/i2c/busses/i2c-designware-platdrv.c ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); adap 370 drivers/i2c/busses/i2c-designware-platdrv.c adap->dev.of_node = pdev->dev.of_node; adap 371 drivers/i2c/busses/i2c-designware-platdrv.c adap->nr = -1; adap 246 drivers/i2c/busses/i2c-designware-slave.c struct i2c_adapter *adap = &dev->adapter; adap 267 drivers/i2c/busses/i2c-designware-slave.c snprintf(adap->name, sizeof(adap->name), adap 269 drivers/i2c/busses/i2c-designware-slave.c adap->retries = 3; adap 270 drivers/i2c/busses/i2c-designware-slave.c adap->algo = &i2c_dw_algo; adap 271 drivers/i2c/busses/i2c-designware-slave.c adap->dev.parent = dev->dev; adap 272 drivers/i2c/busses/i2c-designware-slave.c i2c_set_adapdata(adap, dev); adap 282 drivers/i2c/busses/i2c-designware-slave.c ret = i2c_add_numbered_adapter(adap); adap 48 drivers/i2c/busses/i2c-digicolor.c struct i2c_adapter adap; adap 245 drivers/i2c/busses/i2c-digicolor.c static int dc_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 247 drivers/i2c/busses/i2c-digicolor.c struct dc_i2c *i2c = adap->algo_data; adap 280 drivers/i2c/busses/i2c-digicolor.c static u32 dc_i2c_func(struct i2c_adapter *adap) adap 329 drivers/i2c/busses/i2c-digicolor.c strlcpy(i2c->adap.name, "Conexant Digicolor I2C adapter", adap 330 drivers/i2c/busses/i2c-digicolor.c sizeof(i2c->adap.name)); adap 331 drivers/i2c/busses/i2c-digicolor.c i2c->adap.owner = THIS_MODULE; adap 332 drivers/i2c/busses/i2c-digicolor.c i2c->adap.algo = &dc_i2c_algorithm; adap 333 drivers/i2c/busses/i2c-digicolor.c i2c->adap.dev.parent = &pdev->dev; adap 334 drivers/i2c/busses/i2c-digicolor.c i2c->adap.dev.of_node = np; adap 335 drivers/i2c/busses/i2c-digicolor.c i2c->adap.algo_data = i2c; adap 345 drivers/i2c/busses/i2c-digicolor.c ret = i2c_add_adapter(&i2c->adap); adap 358 drivers/i2c/busses/i2c-digicolor.c i2c_del_adapter(&i2c->adap); adap 254 drivers/i2c/busses/i2c-efm32.c static int efm32_i2c_master_xfer(struct i2c_adapter *adap, adap 257 drivers/i2c/busses/i2c-efm32.c struct efm32_i2c_ddata *ddata = i2c_get_adapdata(adap); adap 287 drivers/i2c/busses/i2c-efm32.c static u32 efm32_i2c_functionality(struct i2c_adapter *adap) adap 111 drivers/i2c/busses/i2c-eg20t.c #define pch_dbg(adap, fmt, arg...) \ adap 112 drivers/i2c/busses/i2c-eg20t.c dev_dbg(adap->pch_adapter.dev.parent, "%s :" fmt, __func__, ##arg) adap 114 drivers/i2c/busses/i2c-eg20t.c #define pch_err(adap, fmt, arg...) \ adap 115 drivers/i2c/busses/i2c-eg20t.c dev_err(adap->pch_adapter.dev.parent, "%s :" fmt, __func__, ##arg) adap 206 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_init(struct i2c_algo_pch_data *adap) adap 208 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 221 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, PCH_I2CCTL_I2CMEN); adap 229 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "Fast mode enabled\n"); adap 245 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, adap 257 drivers/i2c/busses/i2c-eg20t.c static s32 pch_i2c_wait_for_bus_idle(struct i2c_algo_pch_data *adap, adap 260 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 266 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CSR = %x\n", ioread32(p + PCH_I2CSR)); adap 267 drivers/i2c/busses/i2c-eg20t.c pch_err(adap, "%s: Timeout Error.return%d\n", adap 269 drivers/i2c/busses/i2c-eg20t.c pch_i2c_init(adap); adap 293 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_start(struct i2c_algo_pch_data *adap) adap 295 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 296 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 297 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, PCH_START); adap 304 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_stop(struct i2c_algo_pch_data *adap) adap 306 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 307 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 309 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CCTL, PCH_START); adap 312 drivers/i2c/busses/i2c-eg20t.c static int pch_i2c_wait_for_check_xfer(struct i2c_algo_pch_data *adap) adap 315 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 318 drivers/i2c/busses/i2c-eg20t.c (adap->pch_event_flag != 0), msecs_to_jiffies(1000)); adap 320 drivers/i2c/busses/i2c-eg20t.c pch_err(adap, "%s:wait-event timeout\n", __func__); adap 321 drivers/i2c/busses/i2c-eg20t.c adap->pch_event_flag = 0; adap 322 drivers/i2c/busses/i2c-eg20t.c pch_i2c_stop(adap); adap 323 drivers/i2c/busses/i2c-eg20t.c pch_i2c_init(adap); adap 327 drivers/i2c/busses/i2c-eg20t.c if (adap->pch_event_flag & I2C_ERROR_MASK) { adap 328 drivers/i2c/busses/i2c-eg20t.c pch_err(adap, "Lost Arbitration\n"); adap 329 drivers/i2c/busses/i2c-eg20t.c adap->pch_event_flag = 0; adap 330 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMAL_BIT); adap 331 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMIF_BIT); adap 332 drivers/i2c/busses/i2c-eg20t.c pch_i2c_init(adap); adap 336 drivers/i2c/busses/i2c-eg20t.c adap->pch_event_flag = 0; adap 339 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "Receive NACK for slave address setting\n"); adap 350 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_repstart(struct i2c_algo_pch_data *adap) adap 352 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 353 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 354 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, PCH_REPSTART); adap 369 drivers/i2c/busses/i2c-eg20t.c struct i2c_algo_pch_data *adap = i2c_adap->algo_data; adap 377 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 384 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, I2C_TX_MODE); adap 386 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x msgs->len = %d\n", ioread32(p + PCH_I2CCTL), adap 390 drivers/i2c/busses/i2c-eg20t.c if (pch_i2c_wait_for_bus_idle(adap, BUS_IDLE_TIMEOUT) == -ETIME) adap 398 drivers/i2c/busses/i2c-eg20t.c pch_i2c_start(adap); adap 400 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 410 drivers/i2c/busses/i2c-eg20t.c pch_i2c_start(adap); adap 413 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 420 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "writing %x to Data register\n", buf[wrcount]); adap 422 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 426 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMCF_BIT); adap 427 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMIF_BIT); adap 432 drivers/i2c/busses/i2c-eg20t.c pch_i2c_stop(adap); adap 434 drivers/i2c/busses/i2c-eg20t.c pch_i2c_repstart(adap); adap 436 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "return=%d\n", wrcount); adap 445 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_sendack(struct i2c_algo_pch_data *adap) adap 447 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 448 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 449 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CCTL, PCH_ACK); adap 456 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_sendnack(struct i2c_algo_pch_data *adap) adap 458 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 459 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 460 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, PCH_ACK); adap 469 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_restart(struct i2c_algo_pch_data *adap) adap 471 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 472 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "I2CCTL = %x\n", ioread32(p + PCH_I2CCTL)); adap 473 drivers/i2c/busses/i2c-eg20t.c pch_setbit(adap->pch_base_address, PCH_I2CCTL, PCH_RESTART); adap 486 drivers/i2c/busses/i2c-eg20t.c struct i2c_algo_pch_data *adap = i2c_adap->algo_data; adap 494 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 502 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CCTL, I2C_TX_MODE); adap 505 drivers/i2c/busses/i2c-eg20t.c if (pch_i2c_wait_for_bus_idle(adap, BUS_IDLE_TIMEOUT) == -ETIME) adap 513 drivers/i2c/busses/i2c-eg20t.c pch_i2c_start(adap); adap 515 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 522 drivers/i2c/busses/i2c-eg20t.c pch_i2c_restart(adap); adap 524 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 537 drivers/i2c/busses/i2c-eg20t.c pch_i2c_start(adap); adap 539 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 544 drivers/i2c/busses/i2c-eg20t.c pch_i2c_stop(adap); adap 551 drivers/i2c/busses/i2c-eg20t.c pch_i2c_sendack(adap); adap 560 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 565 drivers/i2c/busses/i2c-eg20t.c pch_i2c_sendnack(adap); adap 572 drivers/i2c/busses/i2c-eg20t.c rtn = pch_i2c_wait_for_check_xfer(adap); adap 577 drivers/i2c/busses/i2c-eg20t.c pch_i2c_stop(adap); adap 579 drivers/i2c/busses/i2c-eg20t.c pch_i2c_repstart(adap); adap 592 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_cb(struct i2c_algo_pch_data *adap) adap 595 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 600 drivers/i2c/busses/i2c-eg20t.c adap->pch_event_flag |= I2CMAL_EVENT; adap 603 drivers/i2c/busses/i2c-eg20t.c adap->pch_event_flag |= I2CMCF_EVENT; adap 606 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CSR, sts); adap 608 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "PCH_I2CSR = %x\n", ioread32(p + PCH_I2CSR)); adap 660 drivers/i2c/busses/i2c-eg20t.c struct i2c_algo_pch_data *adap = i2c_adap->algo_data; adap 666 drivers/i2c/busses/i2c-eg20t.c if (adap->p_adapter_info->pch_i2c_suspended) { adap 671 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n", adap 672 drivers/i2c/busses/i2c-eg20t.c adap->p_adapter_info->pch_i2c_suspended); adap 674 drivers/i2c/busses/i2c-eg20t.c adap->pch_i2c_xfer_in_progress = true; adap 678 drivers/i2c/busses/i2c-eg20t.c pmsg->flags |= adap->pch_buff_mode_en; adap 680 drivers/i2c/busses/i2c-eg20t.c pch_dbg(adap, adap 692 drivers/i2c/busses/i2c-eg20t.c adap->pch_i2c_xfer_in_progress = false; /* transfer completed */ adap 703 drivers/i2c/busses/i2c-eg20t.c static u32 pch_i2c_func(struct i2c_adapter *adap) adap 717 drivers/i2c/busses/i2c-eg20t.c static void pch_i2c_disbl_int(struct i2c_algo_pch_data *adap) adap 719 drivers/i2c/busses/i2c-eg20t.c void __iomem *p = adap->pch_base_address; adap 721 drivers/i2c/busses/i2c-eg20t.c pch_clrbit(adap->pch_base_address, PCH_I2CCTL, NORMAL_INTR_ENBL); adap 68 drivers/i2c/busses/i2c-emev2.c struct i2c_adapter adap; adap 87 drivers/i2c/busses/i2c-emev2.c time_left = wait_for_completion_timeout(&priv->msg_done, priv->adap.timeout); adap 105 drivers/i2c/busses/i2c-emev2.c static void em_i2c_reset(struct i2c_adapter *adap) adap 107 drivers/i2c/busses/i2c-emev2.c struct em_i2c_device *priv = i2c_get_adapdata(adap); adap 139 drivers/i2c/busses/i2c-emev2.c static int __em_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 142 drivers/i2c/busses/i2c-emev2.c struct em_i2c_device *priv = i2c_get_adapdata(adap); adap 204 drivers/i2c/busses/i2c-emev2.c em_i2c_reset(adap); adap 209 drivers/i2c/busses/i2c-emev2.c static int em_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 212 drivers/i2c/busses/i2c-emev2.c struct em_i2c_device *priv = i2c_get_adapdata(adap); adap 219 drivers/i2c/busses/i2c-emev2.c ret = __em_i2c_xfer(adap, &msgs[i], (i == (num - 1))); adap 312 drivers/i2c/busses/i2c-emev2.c static u32 em_i2c_func(struct i2c_adapter *adap) adap 376 drivers/i2c/busses/i2c-emev2.c strlcpy(priv->adap.name, "EMEV2 I2C", sizeof(priv->adap.name)); adap 386 drivers/i2c/busses/i2c-emev2.c priv->adap.timeout = msecs_to_jiffies(100); adap 387 drivers/i2c/busses/i2c-emev2.c priv->adap.retries = 5; adap 388 drivers/i2c/busses/i2c-emev2.c priv->adap.dev.parent = &pdev->dev; adap 389 drivers/i2c/busses/i2c-emev2.c priv->adap.algo = &em_i2c_algo; adap 390 drivers/i2c/busses/i2c-emev2.c priv->adap.owner = THIS_MODULE; adap 391 drivers/i2c/busses/i2c-emev2.c priv->adap.dev.of_node = pdev->dev.of_node; adap 396 drivers/i2c/busses/i2c-emev2.c i2c_set_adapdata(&priv->adap, priv); adap 398 drivers/i2c/busses/i2c-emev2.c em_i2c_reset(&priv->adap); adap 406 drivers/i2c/busses/i2c-emev2.c ret = i2c_add_adapter(&priv->adap); adap 411 drivers/i2c/busses/i2c-emev2.c dev_info(&pdev->dev, "Added i2c controller %d, irq %d\n", priv->adap.nr, adap 425 drivers/i2c/busses/i2c-emev2.c i2c_del_adapter(&priv->adap); adap 182 drivers/i2c/busses/i2c-exynos5.c struct i2c_adapter adap; adap 380 drivers/i2c/busses/i2c-exynos5.c writel(HSI2C_MASTER_ID(MASTER_ID(i2c->adap.nr)), adap 708 drivers/i2c/busses/i2c-exynos5.c static int exynos5_i2c_xfer(struct i2c_adapter *adap, adap 711 drivers/i2c/busses/i2c-exynos5.c struct exynos5_i2c *i2c = adap->algo_data; adap 729 drivers/i2c/busses/i2c-exynos5.c static u32 exynos5_i2c_func(struct i2c_adapter *adap) adap 753 drivers/i2c/busses/i2c-exynos5.c strlcpy(i2c->adap.name, "exynos5-i2c", sizeof(i2c->adap.name)); adap 754 drivers/i2c/busses/i2c-exynos5.c i2c->adap.owner = THIS_MODULE; adap 755 drivers/i2c/busses/i2c-exynos5.c i2c->adap.algo = &exynos5_i2c_algorithm; adap 756 drivers/i2c/busses/i2c-exynos5.c i2c->adap.retries = 3; adap 776 drivers/i2c/busses/i2c-exynos5.c i2c->adap.dev.of_node = np; adap 777 drivers/i2c/busses/i2c-exynos5.c i2c->adap.algo_data = i2c; adap 778 drivers/i2c/busses/i2c-exynos5.c i2c->adap.dev.parent = &pdev->dev; adap 808 drivers/i2c/busses/i2c-exynos5.c ret = i2c_add_adapter(&i2c->adap); adap 827 drivers/i2c/busses/i2c-exynos5.c i2c_del_adapter(&i2c->adap); adap 839 drivers/i2c/busses/i2c-exynos5.c i2c_mark_adapter_suspended(&i2c->adap); adap 862 drivers/i2c/busses/i2c-exynos5.c i2c_mark_adapter_resumed(&i2c->adap); adap 329 drivers/i2c/busses/i2c-fsi.c static int fsi_i2c_get_scl(struct i2c_adapter *adap) adap 332 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 340 drivers/i2c/busses/i2c-fsi.c static void fsi_i2c_set_scl(struct i2c_adapter *adap, int val) adap 343 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 352 drivers/i2c/busses/i2c-fsi.c static int fsi_i2c_get_sda(struct i2c_adapter *adap) adap 355 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 363 drivers/i2c/busses/i2c-fsi.c static void fsi_i2c_set_sda(struct i2c_adapter *adap, int val) adap 366 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 375 drivers/i2c/busses/i2c-fsi.c static void fsi_i2c_prepare_recovery(struct i2c_adapter *adap) adap 379 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 390 drivers/i2c/busses/i2c-fsi.c static void fsi_i2c_unprepare_recovery(struct i2c_adapter *adap) adap 394 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 606 drivers/i2c/busses/i2c-fsi.c static int fsi_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 611 drivers/i2c/busses/i2c-fsi.c struct fsi_i2c_port *port = adap->algo_data; adap 630 drivers/i2c/busses/i2c-fsi.c adap->timeout - (jiffies - start_time)); adap 640 drivers/i2c/busses/i2c-fsi.c static u32 fsi_i2c_functionality(struct i2c_adapter *adap) adap 24 drivers/i2c/busses/i2c-gpio.c struct i2c_adapter adap; adap 87 drivers/i2c/busses/i2c-gpio.c i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ adap 89 drivers/i2c/busses/i2c-gpio.c i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ adap 96 drivers/i2c/busses/i2c-gpio.c i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ adap 98 drivers/i2c/busses/i2c-gpio.c i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ adap 112 drivers/i2c/busses/i2c-gpio.c i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); adap 128 drivers/i2c/busses/i2c-gpio.c i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); adap 175 drivers/i2c/busses/i2c-gpio.c i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); adap 194 drivers/i2c/busses/i2c-gpio.c i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); adap 362 drivers/i2c/busses/i2c-gpio.c struct i2c_adapter *adap; adap 372 drivers/i2c/busses/i2c-gpio.c adap = &priv->adap; adap 437 drivers/i2c/busses/i2c-gpio.c adap->owner = THIS_MODULE; adap 439 drivers/i2c/busses/i2c-gpio.c strlcpy(adap->name, dev_name(dev), sizeof(adap->name)); adap 441 drivers/i2c/busses/i2c-gpio.c snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id); adap 443 drivers/i2c/busses/i2c-gpio.c adap->algo_data = bit_data; adap 444 drivers/i2c/busses/i2c-gpio.c adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; adap 445 drivers/i2c/busses/i2c-gpio.c adap->dev.parent = dev; adap 446 drivers/i2c/busses/i2c-gpio.c adap->dev.of_node = np; adap 448 drivers/i2c/busses/i2c-gpio.c adap->nr = pdev->id; adap 449 drivers/i2c/busses/i2c-gpio.c ret = i2c_bit_add_numbered_bus(adap); adap 473 drivers/i2c/busses/i2c-gpio.c struct i2c_adapter *adap; adap 478 drivers/i2c/busses/i2c-gpio.c adap = &priv->adap; adap 480 drivers/i2c/busses/i2c-gpio.c i2c_del_adapter(adap); adap 275 drivers/i2c/busses/i2c-highlander.c static int highlander_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, adap 280 drivers/i2c/busses/i2c-highlander.c struct highlander_i2c_dev *dev = i2c_get_adapdata(adap); adap 358 drivers/i2c/busses/i2c-highlander.c struct i2c_adapter *adap; adap 401 drivers/i2c/busses/i2c-highlander.c adap = &dev->adapter; adap 402 drivers/i2c/busses/i2c-highlander.c i2c_set_adapdata(adap, dev); adap 403 drivers/i2c/busses/i2c-highlander.c adap->owner = THIS_MODULE; adap 404 drivers/i2c/busses/i2c-highlander.c adap->class = I2C_CLASS_HWMON; adap 405 drivers/i2c/busses/i2c-highlander.c strlcpy(adap->name, "HL FPGA I2C adapter", sizeof(adap->name)); adap 406 drivers/i2c/busses/i2c-highlander.c adap->algo = &highlander_i2c_algo; adap 407 drivers/i2c/busses/i2c-highlander.c adap->dev.parent = &pdev->dev; adap 408 drivers/i2c/busses/i2c-highlander.c adap->nr = pdev->id; adap 419 drivers/i2c/busses/i2c-highlander.c ret = i2c_add_numbered_adapter(adap); adap 82 drivers/i2c/busses/i2c-hix5hd2.c struct i2c_adapter adap; adap 333 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.timeout); adap 339 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.timeout); adap 356 drivers/i2c/busses/i2c-hix5hd2.c static int hix5hd2_i2c_xfer(struct i2c_adapter *adap, adap 359 drivers/i2c/busses/i2c-hix5hd2.c struct hix5hd2_i2c_priv *priv = i2c_get_adapdata(adap); adap 379 drivers/i2c/busses/i2c-hix5hd2.c static u32 hix5hd2_i2c_func(struct i2c_adapter *adap) adap 432 drivers/i2c/busses/i2c-hix5hd2.c strlcpy(priv->adap.name, "hix5hd2-i2c", sizeof(priv->adap.name)); adap 434 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.owner = THIS_MODULE; adap 435 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.algo = &hix5hd2_i2c_algorithm; adap 436 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.retries = 3; adap 437 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.dev.of_node = np; adap 438 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.algo_data = priv; adap 439 drivers/i2c/busses/i2c-hix5hd2.c priv->adap.dev.parent = &pdev->dev; adap 440 drivers/i2c/busses/i2c-hix5hd2.c i2c_set_adapdata(&priv->adap, priv); adap 459 drivers/i2c/busses/i2c-hix5hd2.c ret = i2c_add_adapter(&priv->adap); adap 477 drivers/i2c/busses/i2c-hix5hd2.c i2c_del_adapter(&priv->adap); adap 484 drivers/i2c/busses/i2c-i801.c const struct i2c_adapter *adap = &priv->adapter; adap 495 drivers/i2c/busses/i2c-i801.c adap->timeout); adap 684 drivers/i2c/busses/i2c-i801.c const struct i2c_adapter *adap = &priv->adapter; adap 718 drivers/i2c/busses/i2c-i801.c adap->timeout); adap 836 drivers/i2c/busses/i2c-i801.c static s32 i801_access(struct i2c_adapter *adap, u16 addr, adap 843 drivers/i2c/busses/i2c-i801.c struct i801_priv *priv = i2c_get_adapdata(adap); adap 1119 drivers/i2c/busses/i2c-i801.c struct i2c_adapter *adap) adap 1134 drivers/i2c/busses/i2c-i801.c i2c_new_device(adap, &info); adap 1142 drivers/i2c/busses/i2c-i801.c static void dmi_check_onboard_devices(const struct dmi_header *dm, void *adap) adap 1166 drivers/i2c/busses/i2c-i801.c dmi_check_onboard_device(type, name, adap); adap 415 drivers/i2c/busses/i2c-ibm_iic.c !(in_8(&iic->sts) & STS_PT), dev->adap.timeout); adap 426 drivers/i2c/busses/i2c-ibm_iic.c unsigned long x = jiffies + dev->adap.timeout; adap 551 drivers/i2c/busses/i2c-ibm_iic.c static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 553 drivers/i2c/busses/i2c-ibm_iic.c struct ibm_iic_private* dev = (struct ibm_iic_private*)(i2c_get_adapdata(adap)); adap 620 drivers/i2c/busses/i2c-ibm_iic.c static u32 iic_func(struct i2c_adapter *adap) adap 692 drivers/i2c/busses/i2c-ibm_iic.c struct i2c_adapter *adap; adap 738 drivers/i2c/busses/i2c-ibm_iic.c adap = &dev->adap; adap 739 drivers/i2c/busses/i2c-ibm_iic.c adap->dev.parent = &ofdev->dev; adap 740 drivers/i2c/busses/i2c-ibm_iic.c adap->dev.of_node = of_node_get(np); adap 741 drivers/i2c/busses/i2c-ibm_iic.c strlcpy(adap->name, "IBM IIC", sizeof(adap->name)); adap 742 drivers/i2c/busses/i2c-ibm_iic.c i2c_set_adapdata(adap, dev); adap 743 drivers/i2c/busses/i2c-ibm_iic.c adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; adap 744 drivers/i2c/busses/i2c-ibm_iic.c adap->algo = &iic_algo; adap 745 drivers/i2c/busses/i2c-ibm_iic.c adap->timeout = HZ; adap 747 drivers/i2c/busses/i2c-ibm_iic.c ret = i2c_add_adapter(adap); adap 776 drivers/i2c/busses/i2c-ibm_iic.c i2c_del_adapter(&dev->adap); adap 41 drivers/i2c/busses/i2c-ibm_iic.h struct i2c_adapter adap; adap 366 drivers/i2c/busses/i2c-img-scb.c struct i2c_adapter adap; adap 489 drivers/i2c/busses/i2c-img-scb.c dev_dbg(i2c->adap.dev.parent, adap 747 drivers/i2c/busses/i2c-img-scb.c dev_dbg(i2c->adap.dev.parent, "abort condition detected\n"); adap 810 drivers/i2c/busses/i2c-img-scb.c dev_err(i2c->adap.dev.parent, "bad atomic command %d\n", adap 843 drivers/i2c/busses/i2c-img-scb.c dev_dbg(i2c->adap.dev.parent, adap 861 drivers/i2c/busses/i2c-img-scb.c dev_dbg(i2c->adap.dev.parent, "abort condition detected\n"); adap 952 drivers/i2c/busses/i2c-img-scb.c dev_crit(i2c->adap.dev.parent, adap 1024 drivers/i2c/busses/i2c-img-scb.c static int img_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 1027 drivers/i2c/busses/i2c-img-scb.c struct img_i2c *i2c = i2c_get_adapdata(adap); adap 1060 drivers/i2c/busses/i2c-img-scb.c ret = pm_runtime_get_sync(adap->dev.parent); adap 1128 drivers/i2c/busses/i2c-img-scb.c dev_err(adap->dev.parent, "i2c transfer timed out\n"); adap 1137 drivers/i2c/busses/i2c-img-scb.c pm_runtime_mark_last_busy(adap->dev.parent); adap 1138 drivers/i2c/busses/i2c-img-scb.c pm_runtime_put_autosuspend(adap->dev.parent); adap 1143 drivers/i2c/busses/i2c-img-scb.c static u32 img_i2c_func(struct i2c_adapter *adap) adap 1161 drivers/i2c/busses/i2c-img-scb.c ret = pm_runtime_get_sync(i2c->adap.dev.parent); adap 1167 drivers/i2c/busses/i2c-img-scb.c dev_info(i2c->adap.dev.parent, adap 1171 drivers/i2c/busses/i2c-img-scb.c pm_runtime_mark_last_busy(i2c->adap.dev.parent); adap 1172 drivers/i2c/busses/i2c-img-scb.c pm_runtime_put_autosuspend(i2c->adap.dev.parent); adap 1188 drivers/i2c/busses/i2c-img-scb.c dev_warn(i2c->adap.dev.parent, adap 1323 drivers/i2c/busses/i2c-img-scb.c pm_runtime_mark_last_busy(i2c->adap.dev.parent); adap 1324 drivers/i2c/busses/i2c-img-scb.c pm_runtime_put_autosuspend(i2c->adap.dev.parent); adap 1378 drivers/i2c/busses/i2c-img-scb.c i2c_set_adapdata(&i2c->adap, i2c); adap 1379 drivers/i2c/busses/i2c-img-scb.c i2c->adap.dev.parent = &pdev->dev; adap 1380 drivers/i2c/busses/i2c-img-scb.c i2c->adap.dev.of_node = node; adap 1381 drivers/i2c/busses/i2c-img-scb.c i2c->adap.owner = THIS_MODULE; adap 1382 drivers/i2c/busses/i2c-img-scb.c i2c->adap.algo = &img_i2c_algo; adap 1383 drivers/i2c/busses/i2c-img-scb.c i2c->adap.retries = 5; adap 1384 drivers/i2c/busses/i2c-img-scb.c i2c->adap.nr = pdev->id; adap 1385 drivers/i2c/busses/i2c-img-scb.c snprintf(i2c->adap.name, sizeof(i2c->adap.name), "IMG SCB I2C"); adap 1406 drivers/i2c/busses/i2c-img-scb.c ret = i2c_add_numbered_adapter(&i2c->adap); adap 1424 drivers/i2c/busses/i2c-img-scb.c i2c_del_adapter(&i2c->adap); adap 980 drivers/i2c/busses/i2c-imx.c static void i2c_imx_prepare_recovery(struct i2c_adapter *adap) adap 984 drivers/i2c/busses/i2c-imx.c i2c_imx = container_of(adap, struct imx_i2c_struct, adapter); adap 989 drivers/i2c/busses/i2c-imx.c static void i2c_imx_unprepare_recovery(struct i2c_adapter *adap) adap 993 drivers/i2c/busses/i2c-imx.c i2c_imx = container_of(adap, struct imx_i2c_struct, adapter); adap 379 drivers/i2c/busses/i2c-iop3xx.c iop3xx_i2c_func(struct i2c_adapter *adap) adap 138 drivers/i2c/busses/i2c-isch.c static s32 sch_access(struct i2c_adapter *adap, u16 addr, adap 206 drivers/i2c/busses/i2c-isch.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 388 drivers/i2c/busses/i2c-ismt.c static int ismt_access(struct i2c_adapter *adap, u16 addr, adap 398 drivers/i2c/busses/i2c-ismt.c struct ismt_priv *priv = i2c_get_adapdata(adap); adap 619 drivers/i2c/busses/i2c-ismt.c static u32 ismt_func(struct i2c_adapter *adap) adap 125 drivers/i2c/busses/i2c-jz4780.c struct i2c_adapter adap; adap 178 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, "disable failed: ENSTA=0x%04x\n", regval); adap 197 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, "enable failed: ENSTA=0x%04x\n", regval); adap 220 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, adap 239 drivers/i2c/busses/i2c-jz4780.c dev_dbg(&i2c->adap.dev, "i2c not disabled\n"); adap 366 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, adap 371 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, adap 417 drivers/i2c/busses/i2c-jz4780.c dev_dbg(&i2c->adap.dev, "received fifo overflow!\n"); adap 513 drivers/i2c/busses/i2c-jz4780.c dev_dbg(&i2c->adap.dev, "txabrt: 0x%08x, cmd: %d, send: %d, recv: %d\n", adap 559 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, "irq read timeout\n"); adap 560 drivers/i2c/busses/i2c-jz4780.c dev_dbg(&i2c->adap.dev, "send cmd count:%d %d\n", adap 562 drivers/i2c/busses/i2c-jz4780.c dev_dbg(&i2c->adap.dev, "receive data count:%d %d\n", adap 627 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, "write wait timeout\n"); adap 640 drivers/i2c/busses/i2c-jz4780.c static int jz4780_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 645 drivers/i2c/busses/i2c-jz4780.c struct jz4780_i2c *i2c = adap->algo_data; adap 649 drivers/i2c/busses/i2c-jz4780.c dev_err(&i2c->adap.dev, "I2C prepare failed\n"); adap 677 drivers/i2c/busses/i2c-jz4780.c static u32 jz4780_i2c_functionality(struct i2c_adapter *adap) adap 705 drivers/i2c/busses/i2c-jz4780.c i2c->adap.owner = THIS_MODULE; adap 706 drivers/i2c/busses/i2c-jz4780.c i2c->adap.algo = &jz4780_i2c_algorithm; adap 707 drivers/i2c/busses/i2c-jz4780.c i2c->adap.algo_data = i2c; adap 708 drivers/i2c/busses/i2c-jz4780.c i2c->adap.retries = 5; adap 709 drivers/i2c/busses/i2c-jz4780.c i2c->adap.dev.parent = &pdev->dev; adap 710 drivers/i2c/busses/i2c-jz4780.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 711 drivers/i2c/busses/i2c-jz4780.c sprintf(i2c->adap.name, "%s", pdev->name); adap 760 drivers/i2c/busses/i2c-jz4780.c ret = i2c_add_adapter(&i2c->adap); adap 776 drivers/i2c/busses/i2c-jz4780.c i2c_del_adapter(&i2c->adap); adap 58 drivers/i2c/busses/i2c-kempld.c struct i2c_adapter adap; adap 186 drivers/i2c/busses/i2c-kempld.c static int kempld_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 189 drivers/i2c/busses/i2c-kempld.c struct kempld_i2c_data *i2c = i2c_get_adapdata(adap); adap 273 drivers/i2c/busses/i2c-kempld.c static u32 kempld_i2c_func(struct i2c_adapter *adap) adap 303 drivers/i2c/busses/i2c-kempld.c i2c->adap = kempld_i2c_adapter; adap 304 drivers/i2c/busses/i2c-kempld.c i2c->adap.dev.parent = i2c->dev; adap 305 drivers/i2c/busses/i2c-kempld.c i2c_set_adapdata(&i2c->adap, i2c); adap 319 drivers/i2c/busses/i2c-kempld.c i2c->adap.nr = i2c_bus; adap 320 drivers/i2c/busses/i2c-kempld.c ret = i2c_add_numbered_adapter(&i2c->adap); adap 348 drivers/i2c/busses/i2c-kempld.c i2c_del_adapter(&i2c->adap); adap 77 drivers/i2c/busses/i2c-lpc2k.c struct i2c_adapter adap; adap 293 drivers/i2c/busses/i2c-lpc2k.c static int i2c_lpc2k_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 296 drivers/i2c/busses/i2c-lpc2k.c struct lpc2k_i2c *i2c = i2c_get_adapdata(adap); adap 335 drivers/i2c/busses/i2c-lpc2k.c static u32 i2c_lpc2k_functionality(struct i2c_adapter *adap) adap 422 drivers/i2c/busses/i2c-lpc2k.c i2c_set_adapdata(&i2c->adap, i2c); adap 423 drivers/i2c/busses/i2c-lpc2k.c i2c->adap.owner = THIS_MODULE; adap 424 drivers/i2c/busses/i2c-lpc2k.c strlcpy(i2c->adap.name, "LPC2K I2C adapter", sizeof(i2c->adap.name)); adap 425 drivers/i2c/busses/i2c-lpc2k.c i2c->adap.algo = &i2c_lpc2k_algorithm; adap 426 drivers/i2c/busses/i2c-lpc2k.c i2c->adap.dev.parent = &pdev->dev; adap 427 drivers/i2c/busses/i2c-lpc2k.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 429 drivers/i2c/busses/i2c-lpc2k.c ret = i2c_add_adapter(&i2c->adap); adap 446 drivers/i2c/busses/i2c-lpc2k.c i2c_del_adapter(&i2c->adap); adap 82 drivers/i2c/busses/i2c-meson.c struct i2c_adapter adap; adap 334 drivers/i2c/busses/i2c-meson.c static int meson_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 337 drivers/i2c/busses/i2c-meson.c struct meson_i2c *i2c = adap->algo_data; adap 353 drivers/i2c/busses/i2c-meson.c static u32 meson_i2c_func(struct i2c_adapter *adap) adap 415 drivers/i2c/busses/i2c-meson.c strlcpy(i2c->adap.name, "Meson I2C adapter", adap 416 drivers/i2c/busses/i2c-meson.c sizeof(i2c->adap.name)); adap 417 drivers/i2c/busses/i2c-meson.c i2c->adap.owner = THIS_MODULE; adap 418 drivers/i2c/busses/i2c-meson.c i2c->adap.algo = &meson_i2c_algorithm; adap 419 drivers/i2c/busses/i2c-meson.c i2c->adap.dev.parent = &pdev->dev; adap 420 drivers/i2c/busses/i2c-meson.c i2c->adap.dev.of_node = np; adap 421 drivers/i2c/busses/i2c-meson.c i2c->adap.algo_data = i2c; adap 429 drivers/i2c/busses/i2c-meson.c ret = i2c_add_adapter(&i2c->adap); adap 444 drivers/i2c/busses/i2c-meson.c i2c_del_adapter(&i2c->adap); adap 84 drivers/i2c/busses/i2c-mlxcpld.c struct i2c_adapter adap; adap 401 drivers/i2c/busses/i2c-mlxcpld.c static int mlxcpld_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 404 drivers/i2c/busses/i2c-mlxcpld.c struct mlxcpld_i2c_priv *priv = i2c_get_adapdata(adap); adap 451 drivers/i2c/busses/i2c-mlxcpld.c static u32 mlxcpld_i2c_func(struct i2c_adapter *adap) adap 453 drivers/i2c/busses/i2c-mlxcpld.c struct mlxcpld_i2c_priv *priv = i2c_get_adapdata(adap); adap 520 drivers/i2c/busses/i2c-mlxcpld.c priv->adap = mlxcpld_i2c_adapter; adap 521 drivers/i2c/busses/i2c-mlxcpld.c priv->adap.dev.parent = &pdev->dev; adap 522 drivers/i2c/busses/i2c-mlxcpld.c i2c_set_adapdata(&priv->adap, priv); adap 524 drivers/i2c/busses/i2c-mlxcpld.c err = i2c_add_numbered_adapter(&priv->adap); adap 535 drivers/i2c/busses/i2c-mlxcpld.c i2c_del_adapter(&priv->adap); adap 66 drivers/i2c/busses/i2c-mpc.c struct i2c_adapter adap; adap 470 drivers/i2c/busses/i2c-mpc.c unsigned timeout = i2c->adap.timeout; adap 497 drivers/i2c/busses/i2c-mpc.c unsigned timeout = i2c->adap.timeout; adap 565 drivers/i2c/busses/i2c-mpc.c static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 571 drivers/i2c/busses/i2c-mpc.c struct mpc_i2c *i2c = i2c_get_adapdata(adap); adap 634 drivers/i2c/busses/i2c-mpc.c static u32 mpc_functionality(struct i2c_adapter *adap) adap 736 drivers/i2c/busses/i2c-mpc.c i2c->adap = mpc_ops; adap 738 drivers/i2c/busses/i2c-mpc.c scnprintf(i2c->adap.name, sizeof(i2c->adap.name), adap 740 drivers/i2c/busses/i2c-mpc.c i2c_set_adapdata(&i2c->adap, i2c); adap 741 drivers/i2c/busses/i2c-mpc.c i2c->adap.dev.parent = &op->dev; adap 742 drivers/i2c/busses/i2c-mpc.c i2c->adap.dev.of_node = of_node_get(op->dev.of_node); adap 744 drivers/i2c/busses/i2c-mpc.c result = i2c_add_adapter(&i2c->adap); adap 766 drivers/i2c/busses/i2c-mpc.c i2c_del_adapter(&i2c->adap); adap 198 drivers/i2c/busses/i2c-mt65xx.c struct i2c_adapter adap; /* i2c host adapter */ adap 739 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.timeout); adap 780 drivers/i2c/busses/i2c-mt65xx.c static int mtk_i2c_transfer(struct i2c_adapter *adap, adap 785 drivers/i2c/busses/i2c-mt65xx.c struct mtk_i2c *i2c = i2c_get_adapdata(adap); adap 876 drivers/i2c/busses/i2c-mt65xx.c static u32 mtk_i2c_functionality(struct i2c_adapter *adap) adap 878 drivers/i2c/busses/i2c-mt65xx.c if (i2c_check_quirks(adap, I2C_AQ_NO_ZERO_LEN)) adap 941 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 943 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.dev.parent = &pdev->dev; adap 944 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.owner = THIS_MODULE; adap 945 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.algo = &mtk_i2c_algorithm; adap 946 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.quirks = i2c->dev_comp->quirks; adap 947 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.timeout = 2 * HZ; adap 948 drivers/i2c/busses/i2c-mt65xx.c i2c->adap.retries = 1; adap 986 drivers/i2c/busses/i2c-mt65xx.c strlcpy(i2c->adap.name, I2C_DRV_NAME, sizeof(i2c->adap.name)); adap 1018 drivers/i2c/busses/i2c-mt65xx.c i2c_set_adapdata(&i2c->adap, i2c); adap 1019 drivers/i2c/busses/i2c-mt65xx.c ret = i2c_add_adapter(&i2c->adap); adap 1032 drivers/i2c/busses/i2c-mt65xx.c i2c_del_adapter(&i2c->adap); adap 62 drivers/i2c/busses/i2c-mt7621.c struct i2c_adapter adap; adap 87 drivers/i2c/busses/i2c-mt7621.c ret = device_reset(i2c->adap.dev.parent); adap 138 drivers/i2c/busses/i2c-mt7621.c static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 148 drivers/i2c/busses/i2c-mt7621.c i2c = i2c_get_adapdata(adap); adap 275 drivers/i2c/busses/i2c-mt7621.c struct i2c_adapter *adap; adap 310 drivers/i2c/busses/i2c-mt7621.c adap = &i2c->adap; adap 311 drivers/i2c/busses/i2c-mt7621.c adap->owner = THIS_MODULE; adap 312 drivers/i2c/busses/i2c-mt7621.c adap->algo = &mtk_i2c_algo; adap 313 drivers/i2c/busses/i2c-mt7621.c adap->retries = 3; adap 314 drivers/i2c/busses/i2c-mt7621.c adap->dev.parent = &pdev->dev; adap 315 drivers/i2c/busses/i2c-mt7621.c i2c_set_adapdata(adap, i2c); adap 316 drivers/i2c/busses/i2c-mt7621.c adap->dev.of_node = pdev->dev.of_node; adap 317 drivers/i2c/busses/i2c-mt7621.c strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name)); adap 323 drivers/i2c/busses/i2c-mt7621.c ret = i2c_add_adapter(adap); adap 337 drivers/i2c/busses/i2c-mt7621.c i2c_del_adapter(&i2c->adap); adap 707 drivers/i2c/busses/i2c-mv64xxx.c mv64xxx_i2c_functionality(struct i2c_adapter *adap) adap 713 drivers/i2c/busses/i2c-mv64xxx.c mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 715 drivers/i2c/busses/i2c-mv64xxx.c struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap); adap 172 drivers/i2c/busses/i2c-mxs.c static int mxs_i2c_dma_setup_xfer(struct i2c_adapter *adap, adap 176 drivers/i2c/busses/i2c-mxs.c struct mxs_i2c_dev *i2c = i2c_get_adapdata(adap); adap 365 drivers/i2c/busses/i2c-mxs.c static int mxs_i2c_pio_setup_xfer(struct i2c_adapter *adap, adap 368 drivers/i2c/busses/i2c-mxs.c struct mxs_i2c_dev *i2c = i2c_get_adapdata(adap); adap 556 drivers/i2c/busses/i2c-mxs.c static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, adap 559 drivers/i2c/busses/i2c-mxs.c struct mxs_i2c_dev *i2c = i2c_get_adapdata(adap); adap 582 drivers/i2c/busses/i2c-mxs.c ret = mxs_i2c_pio_setup_xfer(adap, msg, flags); adap 588 drivers/i2c/busses/i2c-mxs.c ret = mxs_i2c_dma_setup_xfer(adap, msg, flags); adap 637 drivers/i2c/busses/i2c-mxs.c static int mxs_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], adap 644 drivers/i2c/busses/i2c-mxs.c err = mxs_i2c_xfer_msg(adap, &msgs[i], i == (num - 1)); adap 652 drivers/i2c/busses/i2c-mxs.c static u32 mxs_i2c_func(struct i2c_adapter *adap) adap 804 drivers/i2c/busses/i2c-mxs.c struct i2c_adapter *adap; adap 852 drivers/i2c/busses/i2c-mxs.c adap = &i2c->adapter; adap 853 drivers/i2c/busses/i2c-mxs.c strlcpy(adap->name, "MXS I2C adapter", sizeof(adap->name)); adap 854 drivers/i2c/busses/i2c-mxs.c adap->owner = THIS_MODULE; adap 855 drivers/i2c/busses/i2c-mxs.c adap->algo = &mxs_i2c_algo; adap 856 drivers/i2c/busses/i2c-mxs.c adap->quirks = &mxs_i2c_quirks; adap 857 drivers/i2c/busses/i2c-mxs.c adap->dev.parent = dev; adap 858 drivers/i2c/busses/i2c-mxs.c adap->nr = pdev->id; adap 859 drivers/i2c/busses/i2c-mxs.c adap->dev.of_node = pdev->dev.of_node; adap 860 drivers/i2c/busses/i2c-mxs.c i2c_set_adapdata(adap, i2c); adap 861 drivers/i2c/busses/i2c-mxs.c err = i2c_add_numbered_adapter(adap); adap 36 drivers/i2c/busses/i2c-nforce2-s4985.c static s32 nforce2_access_virt0(struct i2c_adapter *adap, u16 addr, adap 49 drivers/i2c/busses/i2c-nforce2-s4985.c error = nforce2_smbus->algo->smbus_xfer(adap, addr, flags, read_write, adap 62 drivers/i2c/busses/i2c-nforce2-s4985.c static inline s32 nforce2_access_channel(struct i2c_adapter *adap, u16 addr, adap 79 drivers/i2c/busses/i2c-nforce2-s4985.c error = nforce2_smbus->algo->smbus_xfer(adap, 0x18, 0, adap 87 drivers/i2c/busses/i2c-nforce2-s4985.c error = nforce2_smbus->algo->smbus_xfer(adap, addr, flags, read_write, adap 95 drivers/i2c/busses/i2c-nforce2-s4985.c static s32 nforce2_access_virt1(struct i2c_adapter *adap, u16 addr, adap 101 drivers/i2c/busses/i2c-nforce2-s4985.c return nforce2_access_channel(adap, addr, flags, read_write, command, adap 105 drivers/i2c/busses/i2c-nforce2-s4985.c static s32 nforce2_access_virt2(struct i2c_adapter *adap, u16 addr, adap 111 drivers/i2c/busses/i2c-nforce2-s4985.c return nforce2_access_channel(adap, addr, flags, read_write, command, adap 115 drivers/i2c/busses/i2c-nforce2-s4985.c static s32 nforce2_access_virt3(struct i2c_adapter *adap, u16 addr, adap 121 drivers/i2c/busses/i2c-nforce2-s4985.c return nforce2_access_channel(adap, addr, flags, read_write, command, adap 125 drivers/i2c/busses/i2c-nforce2-s4985.c static s32 nforce2_access_virt4(struct i2c_adapter *adap, u16 addr, adap 131 drivers/i2c/busses/i2c-nforce2-s4985.c return nforce2_access_channel(adap, addr, flags, read_write, command, adap 126 drivers/i2c/busses/i2c-nforce2.c static void nforce2_set_reference(struct i2c_adapter *adap) adap 128 drivers/i2c/busses/i2c-nforce2.c nforce2_smbus = adap; adap 131 drivers/i2c/busses/i2c-nforce2.c static inline void nforce2_set_reference(struct i2c_adapter *adap) { } adap 134 drivers/i2c/busses/i2c-nforce2.c static void nforce2_abort(struct i2c_adapter *adap) adap 136 drivers/i2c/busses/i2c-nforce2.c struct nforce2_smbus *smbus = adap->algo_data; adap 140 drivers/i2c/busses/i2c-nforce2.c dev_dbg(&adap->dev, "Aborting current transaction\n"); adap 149 drivers/i2c/busses/i2c-nforce2.c dev_err(&adap->dev, "Can't reset the smbus\n"); adap 153 drivers/i2c/busses/i2c-nforce2.c static int nforce2_check_status(struct i2c_adapter *adap) adap 155 drivers/i2c/busses/i2c-nforce2.c struct nforce2_smbus *smbus = adap->algo_data; adap 165 drivers/i2c/busses/i2c-nforce2.c dev_dbg(&adap->dev, "SMBus Timeout!\n"); adap 167 drivers/i2c/busses/i2c-nforce2.c nforce2_abort(adap); adap 171 drivers/i2c/busses/i2c-nforce2.c dev_dbg(&adap->dev, "Transaction failed (0x%02x)!\n", temp); adap 178 drivers/i2c/busses/i2c-nforce2.c static s32 nforce2_access(struct i2c_adapter *adap, u16 addr, adap 182 drivers/i2c/busses/i2c-nforce2.c struct nforce2_smbus *smbus = adap->algo_data; adap 224 drivers/i2c/busses/i2c-nforce2.c dev_err(&adap->dev, adap 238 drivers/i2c/busses/i2c-nforce2.c dev_err(&adap->dev, "Unsupported transaction %d\n", size); adap 245 drivers/i2c/busses/i2c-nforce2.c status = nforce2_check_status(adap); adap 266 drivers/i2c/busses/i2c-nforce2.c dev_err(&adap->dev, adap 171 drivers/i2c/busses/i2c-nomadik.c struct i2c_adapter adap; adap 230 drivers/i2c/busses/i2c-nomadik.c timeout = jiffies + dev->adap.timeout; adap 477 drivers/i2c/busses/i2c-nomadik.c &dev->xfer_complete, dev->adap.timeout); adap 557 drivers/i2c/busses/i2c-nomadik.c &dev->xfer_complete, dev->adap.timeout); adap 937 drivers/i2c/busses/i2c-nomadik.c static unsigned int nmk_i2c_functionality(struct i2c_adapter *adap) adap 969 drivers/i2c/busses/i2c-nomadik.c struct i2c_adapter *adap; adap 1027 drivers/i2c/busses/i2c-nomadik.c adap = &dev->adap; adap 1028 drivers/i2c/busses/i2c-nomadik.c adap->dev.of_node = np; adap 1029 drivers/i2c/busses/i2c-nomadik.c adap->dev.parent = &adev->dev; adap 1030 drivers/i2c/busses/i2c-nomadik.c adap->owner = THIS_MODULE; adap 1031 drivers/i2c/busses/i2c-nomadik.c adap->class = I2C_CLASS_DEPRECATED; adap 1032 drivers/i2c/busses/i2c-nomadik.c adap->algo = &nmk_i2c_algo; adap 1033 drivers/i2c/busses/i2c-nomadik.c adap->timeout = msecs_to_jiffies(dev->timeout); adap 1034 drivers/i2c/busses/i2c-nomadik.c snprintf(adap->name, sizeof(adap->name), adap 1037 drivers/i2c/busses/i2c-nomadik.c i2c_set_adapdata(adap, dev); adap 1041 drivers/i2c/busses/i2c-nomadik.c adap->name, dev->virtbase); adap 1043 drivers/i2c/busses/i2c-nomadik.c ret = i2c_add_adapter(adap); adap 1063 drivers/i2c/busses/i2c-nomadik.c i2c_del_adapter(&dev->adap); adap 164 drivers/i2c/busses/i2c-nvidia-gpu.c static int gpu_i2c_master_xfer(struct i2c_adapter *adap, adap 167 drivers/i2c/busses/i2c-nvidia-gpu.c struct gpu_i2c_dev *i2cd = i2c_get_adapdata(adap); adap 229 drivers/i2c/busses/i2c-nvidia-gpu.c static u32 gpu_i2c_functionality(struct i2c_adapter *adap) adap 40 drivers/i2c/busses/i2c-ocores.c struct i2c_adapter adap; adap 331 drivers/i2c/busses/i2c-ocores.c dev_warn(i2c->adap.dev.parent, adap 406 drivers/i2c/busses/i2c-ocores.c static int ocores_xfer_polling(struct i2c_adapter *adap, adap 409 drivers/i2c/busses/i2c-ocores.c return ocores_xfer_core(i2c_get_adapdata(adap), msgs, num, true); adap 412 drivers/i2c/busses/i2c-ocores.c static int ocores_xfer(struct i2c_adapter *adap, adap 415 drivers/i2c/busses/i2c-ocores.c return ocores_xfer_core(i2c_get_adapdata(adap), msgs, num, false); adap 450 drivers/i2c/busses/i2c-ocores.c static u32 ocores_func(struct i2c_adapter *adap) adap 721 drivers/i2c/busses/i2c-ocores.c i2c->adap = ocores_adapter; adap 722 drivers/i2c/busses/i2c-ocores.c i2c_set_adapdata(&i2c->adap, i2c); adap 723 drivers/i2c/busses/i2c-ocores.c i2c->adap.dev.parent = &pdev->dev; adap 724 drivers/i2c/busses/i2c-ocores.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 727 drivers/i2c/busses/i2c-ocores.c ret = i2c_add_adapter(&i2c->adap); adap 734 drivers/i2c/busses/i2c-ocores.c i2c_new_device(&i2c->adap, pdata->devices + i); adap 754 drivers/i2c/busses/i2c-ocores.c i2c_del_adapter(&i2c->adap); adap 54 drivers/i2c/busses/i2c-octeon-core.c u64 end = get_jiffies_64() + i2c->adap.timeout; adap 65 drivers/i2c/busses/i2c-octeon-core.c i2c->adap.timeout); adap 148 drivers/i2c/busses/i2c-octeon-core.c u64 end = get_jiffies_64() + i2c->adap.timeout; adap 160 drivers/i2c/busses/i2c-octeon-core.c i2c->adap.timeout); adap 252 drivers/i2c/busses/i2c-octeon-core.c ret = i2c_recover_bus(&i2c->adap); adap 605 drivers/i2c/busses/i2c-octeon-core.c int octeon_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 607 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 726 drivers/i2c/busses/i2c-octeon-core.c static int octeon_i2c_get_scl(struct i2c_adapter *adap) adap 728 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 735 drivers/i2c/busses/i2c-octeon-core.c static void octeon_i2c_set_scl(struct i2c_adapter *adap, int val) adap 737 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 742 drivers/i2c/busses/i2c-octeon-core.c static int octeon_i2c_get_sda(struct i2c_adapter *adap) adap 744 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 751 drivers/i2c/busses/i2c-octeon-core.c static void octeon_i2c_prepare_recovery(struct i2c_adapter *adap) adap 753 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 769 drivers/i2c/busses/i2c-octeon-core.c static void octeon_i2c_unprepare_recovery(struct i2c_adapter *adap) adap 771 drivers/i2c/busses/i2c-octeon-core.c struct octeon_i2c *i2c = i2c_get_adapdata(adap); adap 103 drivers/i2c/busses/i2c-octeon-core.h struct i2c_adapter adap; adap 216 drivers/i2c/busses/i2c-octeon-core.h int octeon_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); adap 118 drivers/i2c/busses/i2c-octeon-platdrv.c static u32 octeon_i2c_functionality(struct i2c_adapter *adap) adap 239 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap = octeon_i2c_ops; adap 240 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap.timeout = msecs_to_jiffies(2); adap 241 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap.retries = 5; adap 242 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info; adap 243 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap.dev.parent = &pdev->dev; adap 244 drivers/i2c/busses/i2c-octeon-platdrv.c i2c->adap.dev.of_node = node; adap 245 drivers/i2c/busses/i2c-octeon-platdrv.c i2c_set_adapdata(&i2c->adap, i2c); adap 248 drivers/i2c/busses/i2c-octeon-platdrv.c result = i2c_add_adapter(&i2c->adap); adap 262 drivers/i2c/busses/i2c-octeon-platdrv.c i2c_del_adapter(&i2c->adap); adap 659 drivers/i2c/busses/i2c-omap.c static int omap_i2c_xfer_msg(struct i2c_adapter *adap, adap 662 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *omap = i2c_get_adapdata(adap); adap 792 drivers/i2c/busses/i2c-omap.c omap_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg msgs[], int num, adap 795 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *omap = i2c_get_adapdata(adap); adap 815 drivers/i2c/busses/i2c-omap.c r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1)), adap 836 drivers/i2c/busses/i2c-omap.c omap_i2c_xfer_irq(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 838 drivers/i2c/busses/i2c-omap.c return omap_i2c_xfer_common(adap, msgs, num, false); adap 842 drivers/i2c/busses/i2c-omap.c omap_i2c_xfer_polling(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 844 drivers/i2c/busses/i2c-omap.c return omap_i2c_xfer_common(adap, msgs, num, true); adap 848 drivers/i2c/busses/i2c-omap.c omap_i2c_func(struct i2c_adapter *adap) adap 1280 drivers/i2c/busses/i2c-omap.c static int omap_i2c_get_scl(struct i2c_adapter *adap) adap 1282 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *dev = i2c_get_adapdata(adap); adap 1290 drivers/i2c/busses/i2c-omap.c static int omap_i2c_get_sda(struct i2c_adapter *adap) adap 1292 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *dev = i2c_get_adapdata(adap); adap 1300 drivers/i2c/busses/i2c-omap.c static void omap_i2c_set_scl(struct i2c_adapter *adap, int val) adap 1302 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *dev = i2c_get_adapdata(adap); adap 1313 drivers/i2c/busses/i2c-omap.c static void omap_i2c_prepare_recovery(struct i2c_adapter *adap) adap 1315 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *dev = i2c_get_adapdata(adap); adap 1330 drivers/i2c/busses/i2c-omap.c static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap) adap 1332 drivers/i2c/busses/i2c-omap.c struct omap_i2c_dev *dev = i2c_get_adapdata(adap); adap 1357 drivers/i2c/busses/i2c-omap.c struct i2c_adapter *adap; adap 1492 drivers/i2c/busses/i2c-omap.c adap = &omap->adapter; adap 1493 drivers/i2c/busses/i2c-omap.c i2c_set_adapdata(adap, omap); adap 1494 drivers/i2c/busses/i2c-omap.c adap->owner = THIS_MODULE; adap 1495 drivers/i2c/busses/i2c-omap.c adap->class = I2C_CLASS_DEPRECATED; adap 1496 drivers/i2c/busses/i2c-omap.c strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name)); adap 1497 drivers/i2c/busses/i2c-omap.c adap->algo = &omap_i2c_algo; adap 1498 drivers/i2c/busses/i2c-omap.c adap->quirks = &omap_i2c_quirks; adap 1499 drivers/i2c/busses/i2c-omap.c adap->dev.parent = &pdev->dev; adap 1500 drivers/i2c/busses/i2c-omap.c adap->dev.of_node = pdev->dev.of_node; adap 1501 drivers/i2c/busses/i2c-omap.c adap->bus_recovery_info = &omap_i2c_bus_recovery_info; adap 1504 drivers/i2c/busses/i2c-omap.c adap->nr = pdev->id; adap 1505 drivers/i2c/busses/i2c-omap.c r = i2c_add_numbered_adapter(adap); adap 1509 drivers/i2c/busses/i2c-omap.c dev_info(omap->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr, adap 73 drivers/i2c/busses/i2c-opal.c static int i2c_opal_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 76 drivers/i2c/busses/i2c-opal.c unsigned long opal_id = (unsigned long)adap->algo_data; adap 112 drivers/i2c/busses/i2c-opal.c static int i2c_opal_smbus_xfer(struct i2c_adapter *adap, u16 addr, adap 116 drivers/i2c/busses/i2c-opal.c unsigned long opal_id = (unsigned long)adap->algo_data; adap 94 drivers/i2c/busses/i2c-owl.c struct i2c_adapter adap; adap 150 drivers/i2c/busses/i2c-owl.c dev_err(&i2c_dev->adap.dev, "FIFO reset timeout\n"); adap 219 drivers/i2c/busses/i2c-owl.c static u32 owl_i2c_func(struct i2c_adapter *adap) adap 224 drivers/i2c/busses/i2c-owl.c static int owl_i2c_check_bus_busy(struct i2c_adapter *adap) adap 226 drivers/i2c/busses/i2c-owl.c struct owl_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 233 drivers/i2c/busses/i2c-owl.c dev_err(&adap->dev, "Bus busy timeout\n"); adap 241 drivers/i2c/busses/i2c-owl.c static int owl_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 244 drivers/i2c/busses/i2c-owl.c struct owl_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 271 drivers/i2c/busses/i2c-owl.c ret = owl_i2c_check_bus_busy(adap); adap 359 drivers/i2c/busses/i2c-owl.c adap->timeout); adap 363 drivers/i2c/busses/i2c-owl.c dev_err(&adap->dev, "Transaction timed out\n"); adap 450 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.owner = THIS_MODULE; adap 451 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.algo = &owl_i2c_algorithm; adap 452 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.timeout = OWL_I2C_TIMEOUT; adap 453 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.quirks = &owl_i2c_quirks; adap 454 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.dev.parent = dev; adap 455 drivers/i2c/busses/i2c-owl.c i2c_dev->adap.dev.of_node = dev->of_node; adap 456 drivers/i2c/busses/i2c-owl.c snprintf(i2c_dev->adap.name, sizeof(i2c_dev->adap.name), adap 458 drivers/i2c/busses/i2c-owl.c i2c_set_adapdata(&i2c_dev->adap, i2c_dev); adap 469 drivers/i2c/busses/i2c-owl.c return i2c_add_adapter(&i2c_dev->adap); adap 34 drivers/i2c/busses/i2c-pca-platform.c struct i2c_adapter adap; adap 88 drivers/i2c/busses/i2c-pca-platform.c & I2C_PCA_CON_SI, i2c->adap.timeout); adap 91 drivers/i2c/busses/i2c-pca-platform.c timeout = jiffies + i2c->adap.timeout; adap 108 drivers/i2c/busses/i2c-pca-platform.c dev_warn(&i2c->adap.dev, "No reset-pin found. Chip may get stuck!\n"); adap 164 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.nr = pdev->id; adap 165 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.owner = THIS_MODULE; adap 166 drivers/i2c/busses/i2c-pca-platform.c snprintf(i2c->adap.name, sizeof(i2c->adap.name), adap 169 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.algo_data = &i2c->algo_data; adap 170 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.dev.parent = &pdev->dev; adap 171 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.dev.of_node = np; adap 177 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.timeout = HZ; adap 184 drivers/i2c/busses/i2c-pca-platform.c i2c->adap.timeout = platform_data->timeout; adap 218 drivers/i2c/busses/i2c-pca-platform.c ret = i2c_pca_add_numbered_bus(&i2c->adap); adap 233 drivers/i2c/busses/i2c-pca-platform.c i2c_del_adapter(&i2c->adap); adap 514 drivers/i2c/busses/i2c-piix4.c static s32 piix4_access(struct i2c_adapter * adap, u16 addr, adap 518 drivers/i2c/busses/i2c-piix4.c struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap); adap 570 drivers/i2c/busses/i2c-piix4.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 576 drivers/i2c/busses/i2c-piix4.c status = piix4_transaction(adap); adap 673 drivers/i2c/busses/i2c-piix4.c static s32 piix4_access_sb800(struct i2c_adapter *adap, u16 addr, adap 677 drivers/i2c/busses/i2c-piix4.c struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap); adap 721 drivers/i2c/busses/i2c-piix4.c dev_warn(&adap->dev, adap 726 drivers/i2c/busses/i2c-piix4.c dev_warn(&adap->dev, adap 735 drivers/i2c/busses/i2c-piix4.c dev_warn(&adap->dev, adap 749 drivers/i2c/busses/i2c-piix4.c retval = piix4_access(adap, addr, flags, read_write, adap 817 drivers/i2c/busses/i2c-piix4.c struct i2c_adapter *adap; adap 821 drivers/i2c/busses/i2c-piix4.c adap = kzalloc(sizeof(*adap), GFP_KERNEL); adap 822 drivers/i2c/busses/i2c-piix4.c if (adap == NULL) { adap 827 drivers/i2c/busses/i2c-piix4.c adap->owner = THIS_MODULE; adap 828 drivers/i2c/busses/i2c-piix4.c adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; adap 829 drivers/i2c/busses/i2c-piix4.c adap->algo = sb800_main ? &piix4_smbus_algorithm_sb800 adap 834 drivers/i2c/busses/i2c-piix4.c kfree(adap); adap 845 drivers/i2c/busses/i2c-piix4.c adap->dev.parent = &dev->dev; adap 848 drivers/i2c/busses/i2c-piix4.c acpi_preset_companion(&adap->dev, adap 853 drivers/i2c/busses/i2c-piix4.c snprintf(adap->name, sizeof(adap->name), adap 856 drivers/i2c/busses/i2c-piix4.c i2c_set_adapdata(adap, adapdata); adap 858 drivers/i2c/busses/i2c-piix4.c retval = i2c_add_adapter(adap); adap 861 drivers/i2c/busses/i2c-piix4.c kfree(adap); adap 866 drivers/i2c/busses/i2c-piix4.c *padap = adap; adap 995 drivers/i2c/busses/i2c-piix4.c static void piix4_adap_remove(struct i2c_adapter *adap) adap 997 drivers/i2c/busses/i2c-piix4.c struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(adap); adap 1000 drivers/i2c/busses/i2c-piix4.c i2c_del_adapter(adap); adap 1004 drivers/i2c/busses/i2c-piix4.c kfree(adap); adap 495 drivers/i2c/busses/i2c-pmcmsp.c static int pmcmsptwi_master_xfer(struct i2c_adapter *adap, adap 498 drivers/i2c/busses/i2c-pmcmsp.c struct pmcmsptwi_data *data = i2c_get_adapdata(adap); adap 543 drivers/i2c/busses/i2c-pmcmsp.c dev_dbg(&adap->dev, "I2C %s of %d bytes %s\n", adap 512 drivers/i2c/busses/i2c-pnx.c i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 516 drivers/i2c/busses/i2c-pnx.c struct i2c_pnx_algo_data *alg_data = adap->algo_data; adap 28 drivers/i2c/busses/i2c-powermac.c static s32 i2c_powermac_smbus_xfer( struct i2c_adapter* adap, adap 36 drivers/i2c/busses/i2c-powermac.c struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); adap 100 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "Failed to open I2C, err %d\n", rc); adap 106 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "Failed to set I2C mode %d, err %d\n", adap 114 drivers/i2c/busses/i2c-powermac.c dev_dbg(&adap->dev, adap 118 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, adap 139 drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_master_xfer( struct i2c_adapter *adap, adap 143 drivers/i2c/busses/i2c-powermac.c struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); adap 153 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "Failed to open I2C, err %d\n", rc); adap 158 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "Failed to set I2C mode %d, err %d\n", adap 165 drivers/i2c/busses/i2c-powermac.c dev_dbg(&adap->dev, "I2C %s 0x%02x failed, err %d\n", adap 169 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "I2C %s 0x%02x failed, err %d\n", adap 206 drivers/i2c/busses/i2c-powermac.c static u32 i2c_powermac_get_addr(struct i2c_adapter *adap, adap 229 drivers/i2c/busses/i2c-powermac.c dev_warn(&adap->dev, "No i2c address for %pOF\n", node); adap 234 drivers/i2c/busses/i2c-powermac.c static void i2c_powermac_create_one(struct i2c_adapter *adap, adap 243 drivers/i2c/busses/i2c-powermac.c newdev = i2c_new_device(adap, &info); adap 245 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, adap 250 drivers/i2c/busses/i2c-powermac.c static void i2c_powermac_add_missing(struct i2c_adapter *adap, adap 262 drivers/i2c/busses/i2c-powermac.c rc = i2c_smbus_xfer(adap, 0x46, 0, I2C_SMBUS_READ, adap 266 drivers/i2c/busses/i2c-powermac.c i2c_powermac_create_one(adap, "MAC,pcm3052", 0x46); adap 268 drivers/i2c/busses/i2c-powermac.c rc = i2c_smbus_xfer(adap, 0x47, 0, I2C_SMBUS_READ, adap 272 drivers/i2c/busses/i2c-powermac.c i2c_powermac_create_one(adap, "MAC,pcm3052", 0x47); adap 276 drivers/i2c/busses/i2c-powermac.c static bool i2c_powermac_get_type(struct i2c_adapter *adap, adap 310 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "i2c-powermac: modalias failure on %pOF\n", node); adap 314 drivers/i2c/busses/i2c-powermac.c static void i2c_powermac_register_devices(struct i2c_adapter *adap, adap 326 drivers/i2c/busses/i2c-powermac.c if (of_node_name_eq(adap->dev.of_node, "via-pmu")) adap 329 drivers/i2c/busses/i2c-powermac.c for_each_child_of_node(adap->dev.of_node, node) { adap 334 drivers/i2c/busses/i2c-powermac.c addr = i2c_powermac_get_addr(adap, bus, node); adap 339 drivers/i2c/busses/i2c-powermac.c if (!pmac_i2c_match_adapter(node, adap)) adap 342 drivers/i2c/busses/i2c-powermac.c dev_dbg(&adap->dev, "i2c-powermac: register %pOF\n", node); adap 352 drivers/i2c/busses/i2c-powermac.c if (!i2c_powermac_get_type(adap, node, addr, adap 362 drivers/i2c/busses/i2c-powermac.c newdev = i2c_new_device(adap, &info); adap 364 drivers/i2c/busses/i2c-powermac.c dev_err(&adap->dev, "i2c-powermac: Failure to register" adap 377 drivers/i2c/busses/i2c-powermac.c i2c_powermac_add_missing(adap, bus, found_onyx); adap 47 drivers/i2c/busses/i2c-puv3.c static int xfer_read(struct i2c_adapter *adap, unsigned char *buf, int length) adap 54 drivers/i2c/busses/i2c-puv3.c dev_dbg(&adap->dev, "Tx FIFO Not Full timeout\n"); adap 69 drivers/i2c/busses/i2c-puv3.c dev_dbg(&adap->dev, "RXRDY timeout\n"); adap 81 drivers/i2c/busses/i2c-puv3.c static int xfer_write(struct i2c_adapter *adap, unsigned char *buf, int length) adap 118 drivers/i2c/busses/i2c-puv3.c static int puv3_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *pmsg, adap 135 drivers/i2c/busses/i2c-puv3.c dev_dbg(&adap->dev, "puv3_i2c_xfer: processing %d messages:\n", num); adap 138 drivers/i2c/busses/i2c-puv3.c dev_dbg(&adap->dev, " #%d: %sing %d byte%s %s 0x%02x\n", i, adap 145 drivers/i2c/busses/i2c-puv3.c ret = xfer_read(adap, pmsg->buf, pmsg->len); adap 147 drivers/i2c/busses/i2c-puv3.c ret = xfer_write(adap, pmsg->buf, pmsg->len); adap 153 drivers/i2c/busses/i2c-puv3.c dev_dbg(&adap->dev, "transfer complete\n"); adap 180 drivers/i2c/busses/i2c-pxa.c struct i2c_adapter adap; adap 297 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "state:%s:%d: ISR=%08x, ICR=%08x, IBMR=%02x\n", fname, lno, adap 306 drivers/i2c/busses/i2c-pxa.c struct device *dev = &i2c->adap.dev; adap 346 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: called in slave mode\n", __func__); adap 392 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", adap 397 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: Slave detected\n", __func__); adap 407 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); adap 415 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: did not free\n", __func__); adap 423 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "setting to bus master\n"); adap 426 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: unit is busy\n", __func__); adap 428 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: error: unit busy\n", __func__); adap 448 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", adap 455 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); adap 463 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: did not free\n", __func__); adap 487 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "%s: wait timedout\n", adap 497 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "ICR now %08x, ISR %08x\n", readl(_ICR(i2c)), readl(_ISR(i2c))); adap 525 drivers/i2c/busses/i2c-pxa.c dev_info(&i2c->adap.dev, "Enabling slave mode\n"); adap 572 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "SAD, mode is slave-%cx\n", adap 596 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "timeout waiting for SCL high\n"); adap 607 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "ISR: SSD (Slave Stop)\n"); adap 613 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "ISR: SSD (Slave Stop) acked\n"); adap 659 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "timeout waiting for SCL high\n"); adap 732 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, adap 825 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "i2c_pxa: timeout waiting for bus free\n"); adap 834 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "i2c_pxa_set_master: error %d\n", ret); adap 841 drivers/i2c/busses/i2c-pxa.c dev_err(&i2c->adap.dev, "i2c_pxa_send_mastercode timeout\n"); adap 878 drivers/i2c/busses/i2c-pxa.c static int i2c_pxa_pio_xfer(struct i2c_adapter *adap, adap 881 drivers/i2c/busses/i2c-pxa.c struct pxa_i2c *i2c = adap->algo_data; adap 891 drivers/i2c/busses/i2c-pxa.c for (i = adap->retries; i >= 0; i--) { adap 897 drivers/i2c/busses/i2c-pxa.c dev_dbg(&adap->dev, "Retrying transmission\n"); adap 1073 drivers/i2c/busses/i2c-pxa.c dev_dbg(&i2c->adap.dev, "%s: ISR=%08x, ICR=%08x, IBMR=%02x\n", adap 1114 drivers/i2c/busses/i2c-pxa.c static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 1116 drivers/i2c/busses/i2c-pxa.c struct pxa_i2c *i2c = adap->algo_data; adap 1119 drivers/i2c/busses/i2c-pxa.c for (i = adap->retries; i >= 0; i--) { adap 1125 drivers/i2c/busses/i2c-pxa.c dev_dbg(&adap->dev, "Retrying transmission\n"); adap 1135 drivers/i2c/busses/i2c-pxa.c static u32 i2c_pxa_functionality(struct i2c_adapter *adap) adap 1171 drivers/i2c/busses/i2c-pxa.c i2c->adap.nr = -1; adap 1227 drivers/i2c/busses/i2c-pxa.c i2c->adap.nr = dev->id; adap 1235 drivers/i2c/busses/i2c-pxa.c i2c->adap.owner = THIS_MODULE; adap 1236 drivers/i2c/busses/i2c-pxa.c i2c->adap.retries = 5; adap 1241 drivers/i2c/busses/i2c-pxa.c strlcpy(i2c->adap.name, "pxa_i2c-i2c", sizeof(i2c->adap.name)); adap 1277 drivers/i2c/busses/i2c-pxa.c i2c->adap.class = plat->class; adap 1284 drivers/i2c/busses/i2c-pxa.c i2c->adap.name, clk_get_rate(i2c->clk)); adap 1287 drivers/i2c/busses/i2c-pxa.c i2c->adap.name); adap 1293 drivers/i2c/busses/i2c-pxa.c i2c->adap.algo = &i2c_pxa_pio_algorithm; adap 1295 drivers/i2c/busses/i2c-pxa.c i2c->adap.algo = &i2c_pxa_algorithm; adap 1307 drivers/i2c/busses/i2c-pxa.c i2c->adap.algo_data = i2c; adap 1308 drivers/i2c/busses/i2c-pxa.c i2c->adap.dev.parent = &dev->dev; adap 1310 drivers/i2c/busses/i2c-pxa.c i2c->adap.dev.of_node = dev->dev.of_node; adap 1313 drivers/i2c/busses/i2c-pxa.c ret = i2c_add_numbered_adapter(&i2c->adap); adap 1320 drivers/i2c/busses/i2c-pxa.c dev_info(&i2c->adap.dev, " PXA I2C adapter, slave address %d\n", adap 1323 drivers/i2c/busses/i2c-pxa.c dev_info(&i2c->adap.dev, " PXA I2C adapter\n"); adap 1336 drivers/i2c/busses/i2c-pxa.c i2c_del_adapter(&i2c->adap); adap 81 drivers/i2c/busses/i2c-qcom-geni.c struct i2c_adapter adap; adap 438 drivers/i2c/busses/i2c-qcom-geni.c static int geni_i2c_xfer(struct i2c_adapter *adap, adap 442 drivers/i2c/busses/i2c-qcom-geni.c struct geni_i2c_dev *gi2c = i2c_get_adapdata(adap); adap 481 drivers/i2c/busses/i2c-qcom-geni.c static u32 geni_i2c_func(struct i2c_adapter *adap) adap 533 drivers/i2c/busses/i2c-qcom-geni.c ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(&pdev->dev)); adap 548 drivers/i2c/busses/i2c-qcom-geni.c gi2c->adap.algo = &geni_i2c_algo; adap 561 drivers/i2c/busses/i2c-qcom-geni.c i2c_set_adapdata(&gi2c->adap, gi2c); adap 562 drivers/i2c/busses/i2c-qcom-geni.c gi2c->adap.dev.parent = &pdev->dev; adap 563 drivers/i2c/busses/i2c-qcom-geni.c gi2c->adap.dev.of_node = pdev->dev.of_node; adap 564 drivers/i2c/busses/i2c-qcom-geni.c strlcpy(gi2c->adap.name, "Geni-I2C", sizeof(gi2c->adap.name)); adap 596 drivers/i2c/busses/i2c-qcom-geni.c ret = i2c_add_adapter(&gi2c->adap); adap 612 drivers/i2c/busses/i2c-qcom-geni.c i2c_del_adapter(&gi2c->adap); adap 235 drivers/i2c/busses/i2c-qup.c struct i2c_adapter adap; adap 840 drivers/i2c/busses/i2c-qup.c static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 843 drivers/i2c/busses/i2c-qup.c struct qup_i2c_dev *qup = i2c_get_adapdata(adap); adap 1068 drivers/i2c/busses/i2c-qup.c static int qup_i2c_xfer(struct i2c_adapter *adap, adap 1072 drivers/i2c/busses/i2c-qup.c struct qup_i2c_dev *qup = i2c_get_adapdata(adap); adap 1544 drivers/i2c/busses/i2c-qup.c static int qup_i2c_xfer_v2(struct i2c_adapter *adap, adap 1548 drivers/i2c/busses/i2c-qup.c struct qup_i2c_dev *qup = i2c_get_adapdata(adap); adap 1578 drivers/i2c/busses/i2c-qup.c ret = qup_i2c_bam_xfer(adap, &msgs[0], num); adap 1610 drivers/i2c/busses/i2c-qup.c static u32 qup_i2c_func(struct i2c_adapter *adap) adap 1696 drivers/i2c/busses/i2c-qup.c qup->adap.algo = &qup_i2c_algo; adap 1697 drivers/i2c/busses/i2c-qup.c qup->adap.quirks = &qup_i2c_quirks; adap 1700 drivers/i2c/busses/i2c-qup.c qup->adap.algo = &qup_i2c_algo_v2; adap 1701 drivers/i2c/busses/i2c-qup.c qup->adap.quirks = &qup_i2c_quirks_v2; adap 1783 drivers/i2c/busses/i2c-qup.c ACPI_COMPANION_SET(&qup->adap.dev, ACPI_COMPANION(qup->dev)); adap 1886 drivers/i2c/busses/i2c-qup.c i2c_set_adapdata(&qup->adap, qup); adap 1887 drivers/i2c/busses/i2c-qup.c qup->adap.dev.parent = qup->dev; adap 1888 drivers/i2c/busses/i2c-qup.c qup->adap.dev.of_node = pdev->dev.of_node; adap 1891 drivers/i2c/busses/i2c-qup.c strlcpy(qup->adap.name, "QUP I2C adapter", sizeof(qup->adap.name)); adap 1898 drivers/i2c/busses/i2c-qup.c ret = i2c_add_adapter(&qup->adap); adap 1928 drivers/i2c/busses/i2c-qup.c i2c_del_adapter(&qup->adap); adap 121 drivers/i2c/busses/i2c-rcar.c struct i2c_adapter adap; adap 145 drivers/i2c/busses/i2c-rcar.c #define rcar_i2c_priv_to_dev(p) ((p)->adap.dev.parent) adap 161 drivers/i2c/busses/i2c-rcar.c static int rcar_i2c_get_scl(struct i2c_adapter *adap) adap 163 drivers/i2c/busses/i2c-rcar.c struct rcar_i2c_priv *priv = i2c_get_adapdata(adap); adap 169 drivers/i2c/busses/i2c-rcar.c static void rcar_i2c_set_scl(struct i2c_adapter *adap, int val) adap 171 drivers/i2c/busses/i2c-rcar.c struct rcar_i2c_priv *priv = i2c_get_adapdata(adap); adap 181 drivers/i2c/busses/i2c-rcar.c static void rcar_i2c_set_sda(struct i2c_adapter *adap, int val) adap 183 drivers/i2c/busses/i2c-rcar.c struct rcar_i2c_priv *priv = i2c_get_adapdata(adap); adap 193 drivers/i2c/busses/i2c-rcar.c static int rcar_i2c_get_bus_free(struct i2c_adapter *adap) adap 195 drivers/i2c/busses/i2c-rcar.c struct rcar_i2c_priv *priv = i2c_get_adapdata(adap); adap 235 drivers/i2c/busses/i2c-rcar.c return i2c_recover_bus(&priv->adap); adap 774 drivers/i2c/busses/i2c-rcar.c static int rcar_i2c_master_xfer(struct i2c_adapter *adap, adap 778 drivers/i2c/busses/i2c-rcar.c struct rcar_i2c_priv *priv = i2c_get_adapdata(adap); adap 812 drivers/i2c/busses/i2c-rcar.c num * adap->timeout); adap 877 drivers/i2c/busses/i2c-rcar.c static u32 rcar_i2c_func(struct i2c_adapter *adap) adap 921 drivers/i2c/busses/i2c-rcar.c struct i2c_adapter *adap; adap 948 drivers/i2c/busses/i2c-rcar.c adap = &priv->adap; adap 949 drivers/i2c/busses/i2c-rcar.c adap->nr = pdev->id; adap 950 drivers/i2c/busses/i2c-rcar.c adap->algo = &rcar_i2c_algo; adap 951 drivers/i2c/busses/i2c-rcar.c adap->class = I2C_CLASS_DEPRECATED; adap 952 drivers/i2c/busses/i2c-rcar.c adap->retries = 3; adap 953 drivers/i2c/busses/i2c-rcar.c adap->dev.parent = dev; adap 954 drivers/i2c/busses/i2c-rcar.c adap->dev.of_node = dev->of_node; adap 955 drivers/i2c/busses/i2c-rcar.c adap->bus_recovery_info = &rcar_i2c_bri; adap 956 drivers/i2c/busses/i2c-rcar.c adap->quirks = &rcar_i2c_quirks; adap 957 drivers/i2c/busses/i2c-rcar.c i2c_set_adapdata(adap, priv); adap 958 drivers/i2c/busses/i2c-rcar.c strlcpy(adap->name, pdev->name, sizeof(adap->name)); adap 999 drivers/i2c/busses/i2c-rcar.c ret = i2c_add_numbered_adapter(adap); adap 1019 drivers/i2c/busses/i2c-rcar.c i2c_del_adapter(&priv->adap); adap 1033 drivers/i2c/busses/i2c-rcar.c i2c_mark_adapter_suspended(&priv->adap); adap 1041 drivers/i2c/busses/i2c-rcar.c i2c_mark_adapter_resumed(&priv->adap); adap 112 drivers/i2c/busses/i2c-riic.c static int riic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 114 drivers/i2c/busses/i2c-riic.c struct riic_dev *riic = i2c_get_adapdata(adap); adap 119 drivers/i2c/busses/i2c-riic.c pm_runtime_get_sync(adap->dev.parent); adap 152 drivers/i2c/busses/i2c-riic.c pm_runtime_put(adap->dev.parent); adap 272 drivers/i2c/busses/i2c-riic.c static u32 riic_func(struct i2c_adapter *adap) adap 395 drivers/i2c/busses/i2c-riic.c struct i2c_adapter *adap; adap 428 drivers/i2c/busses/i2c-riic.c adap = &riic->adapter; adap 429 drivers/i2c/busses/i2c-riic.c i2c_set_adapdata(adap, riic); adap 430 drivers/i2c/busses/i2c-riic.c strlcpy(adap->name, "Renesas RIIC adapter", sizeof(adap->name)); adap 431 drivers/i2c/busses/i2c-riic.c adap->owner = THIS_MODULE; adap 432 drivers/i2c/busses/i2c-riic.c adap->algo = &riic_algo; adap 433 drivers/i2c/busses/i2c-riic.c adap->dev.parent = &pdev->dev; adap 434 drivers/i2c/busses/i2c-riic.c adap->dev.of_node = pdev->dev.of_node; adap 446 drivers/i2c/busses/i2c-riic.c ret = i2c_add_adapter(adap); adap 193 drivers/i2c/busses/i2c-rk3x.c struct i2c_adapter adap; adap 1043 drivers/i2c/busses/i2c-rk3x.c static int rk3x_i2c_xfer(struct i2c_adapter *adap, adap 1046 drivers/i2c/busses/i2c-rk3x.c struct rk3x_i2c *i2c = (struct rk3x_i2c *)adap->algo_data; adap 1122 drivers/i2c/busses/i2c-rk3x.c static u32 rk3x_i2c_func(struct i2c_adapter *adap) adap 1213 drivers/i2c/busses/i2c-rk3x.c strlcpy(i2c->adap.name, "rk3x-i2c", sizeof(i2c->adap.name)); adap 1214 drivers/i2c/busses/i2c-rk3x.c i2c->adap.owner = THIS_MODULE; adap 1215 drivers/i2c/busses/i2c-rk3x.c i2c->adap.algo = &rk3x_i2c_algorithm; adap 1216 drivers/i2c/busses/i2c-rk3x.c i2c->adap.retries = 3; adap 1217 drivers/i2c/busses/i2c-rk3x.c i2c->adap.dev.of_node = np; adap 1218 drivers/i2c/busses/i2c-rk3x.c i2c->adap.algo_data = i2c; adap 1219 drivers/i2c/busses/i2c-rk3x.c i2c->adap.dev.parent = &pdev->dev; adap 1322 drivers/i2c/busses/i2c-rk3x.c ret = i2c_add_adapter(&i2c->adap); adap 1341 drivers/i2c/busses/i2c-rk3x.c i2c_del_adapter(&i2c->adap); adap 113 drivers/i2c/busses/i2c-s3c2410.c struct i2c_adapter adap; adap 753 drivers/i2c/busses/i2c-s3c2410.c static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, adap 756 drivers/i2c/busses/i2c-s3c2410.c struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data; adap 764 drivers/i2c/busses/i2c-s3c2410.c for (retry = 0; retry < adap->retries; retry++) { adap 783 drivers/i2c/busses/i2c-s3c2410.c static u32 s3c24xx_i2c_func(struct i2c_adapter *adap) adap 910 drivers/i2c/busses/i2c-s3c2410.c i2c_lock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); adap 912 drivers/i2c/busses/i2c-s3c2410.c i2c_unlock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); adap 1080 drivers/i2c/busses/i2c-s3c2410.c strlcpy(i2c->adap.name, "s3c2410-i2c", sizeof(i2c->adap.name)); adap 1081 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.owner = THIS_MODULE; adap 1082 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.algo = &s3c24xx_i2c_algorithm; adap 1083 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.retries = 2; adap 1084 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.class = I2C_CLASS_DEPRECATED; adap 1110 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.algo_data = i2c; adap 1111 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.dev.parent = &pdev->dev; adap 1169 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.nr = i2c->pdata->bus_num; adap 1170 drivers/i2c/busses/i2c-s3c2410.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 1176 drivers/i2c/busses/i2c-s3c2410.c ret = i2c_add_numbered_adapter(&i2c->adap); adap 1184 drivers/i2c/busses/i2c-s3c2410.c dev_info(&pdev->dev, "%s: S3C I2C adapter\n", dev_name(&i2c->adap.dev)); adap 1198 drivers/i2c/busses/i2c-s3c2410.c i2c_del_adapter(&i2c->adap); adap 1208 drivers/i2c/busses/i2c-s3c2410.c i2c_mark_adapter_suspended(&i2c->adap); adap 1229 drivers/i2c/busses/i2c-s3c2410.c i2c_mark_adapter_resumed(&i2c->adap); adap 81 drivers/i2c/busses/i2c-scmi.c acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, adap 86 drivers/i2c/busses/i2c-scmi.c struct acpi_smbus_cmi *smbus_cmi = adap->algo_data; adap 97 drivers/i2c/busses/i2c-scmi.c dev_dbg(&adap->dev, "access size: %d %s\n", size, adap 158 drivers/i2c/busses/i2c-scmi.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 267 drivers/i2c/busses/i2c-scmi.c dev_dbg(&adap->dev, "Transaction status: %i\n", result); adap 83 drivers/i2c/busses/i2c-sh7760.c struct i2c_adapter adap; adap 303 drivers/i2c/busses/i2c-sh7760.c static int sh7760_i2c_master_xfer(struct i2c_adapter *adap, adap 307 drivers/i2c/busses/i2c-sh7760.c struct cami2c *id = adap->algo_data; adap 311 drivers/i2c/busses/i2c-sh7760.c dev_err(&adap->dev, "sh7760-i2c%d: bus busy!\n", adap->nr); adap 317 drivers/i2c/busses/i2c-sh7760.c retr = adap->retries; adap 376 drivers/i2c/busses/i2c-sh7760.c static u32 sh7760_i2c_func(struct i2c_adapter *adap) adap 476 drivers/i2c/busses/i2c-sh7760.c id->adap.nr = pdev->id; adap 477 drivers/i2c/busses/i2c-sh7760.c id->adap.algo = &sh7760_i2c_algo; adap 478 drivers/i2c/busses/i2c-sh7760.c id->adap.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; adap 479 drivers/i2c/busses/i2c-sh7760.c id->adap.retries = 3; adap 480 drivers/i2c/busses/i2c-sh7760.c id->adap.algo_data = id; adap 481 drivers/i2c/busses/i2c-sh7760.c id->adap.dev.parent = &pdev->dev; adap 482 drivers/i2c/busses/i2c-sh7760.c snprintf(id->adap.name, sizeof(id->adap.name), adap 512 drivers/i2c/busses/i2c-sh7760.c ret = i2c_add_numbered_adapter(&id->adap); adap 540 drivers/i2c/busses/i2c-sh7760.c i2c_del_adapter(&id->adap); adap 116 drivers/i2c/busses/i2c-sh_mobile.c struct i2c_adapter adap; adap 823 drivers/i2c/busses/i2c-sh_mobile.c struct i2c_adapter *adap; adap 882 drivers/i2c/busses/i2c-sh_mobile.c adap = &pd->adap; adap 883 drivers/i2c/busses/i2c-sh_mobile.c i2c_set_adapdata(adap, pd); adap 885 drivers/i2c/busses/i2c-sh_mobile.c adap->owner = THIS_MODULE; adap 886 drivers/i2c/busses/i2c-sh_mobile.c adap->algo = &sh_mobile_i2c_algorithm; adap 887 drivers/i2c/busses/i2c-sh_mobile.c adap->quirks = &sh_mobile_i2c_quirks; adap 888 drivers/i2c/busses/i2c-sh_mobile.c adap->dev.parent = &dev->dev; adap 889 drivers/i2c/busses/i2c-sh_mobile.c adap->retries = 5; adap 890 drivers/i2c/busses/i2c-sh_mobile.c adap->nr = dev->id; adap 891 drivers/i2c/busses/i2c-sh_mobile.c adap->dev.of_node = dev->dev.of_node; adap 893 drivers/i2c/busses/i2c-sh_mobile.c strlcpy(adap->name, dev->name, sizeof(adap->name)); adap 898 drivers/i2c/busses/i2c-sh_mobile.c ret = i2c_add_numbered_adapter(adap); adap 904 drivers/i2c/busses/i2c-sh_mobile.c dev_info(&dev->dev, "I2C adapter %d, bus speed %lu Hz\n", adap->nr, pd->bus_speed); adap 913 drivers/i2c/busses/i2c-sh_mobile.c i2c_del_adapter(&pd->adap); adap 31 drivers/i2c/busses/i2c-sibyte.c struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; adap 35 drivers/i2c/busses/i2c-sibyte.c while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY) adap 42 drivers/i2c/busses/i2c-sibyte.c V_SMB_TT_QUICKCMD), SMB_CSR(adap, R_SMB_START)); adap 47 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 50 drivers/i2c/busses/i2c-sibyte.c csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); adap 52 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 56 drivers/i2c/busses/i2c-sibyte.c csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); adap 59 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 63 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_DATA)); adap 65 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 69 drivers/i2c/busses/i2c-sibyte.c csr_out32(V_SMB_CMD(command), SMB_CSR(adap, R_SMB_CMD)); adap 72 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 76 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_DATA)); adap 78 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_DATA)); adap 80 drivers/i2c/busses/i2c-sibyte.c SMB_CSR(adap, R_SMB_START)); adap 87 drivers/i2c/busses/i2c-sibyte.c while (csr_in32(SMB_CSR(adap, R_SMB_STATUS)) & M_SMB_BUSY) adap 90 drivers/i2c/busses/i2c-sibyte.c error = csr_in32(SMB_CSR(adap, R_SMB_STATUS)); adap 93 drivers/i2c/busses/i2c-sibyte.c csr_out32(M_SMB_ERROR, SMB_CSR(adap, R_SMB_STATUS)); adap 98 drivers/i2c/busses/i2c-sibyte.c data->byte = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xff; adap 100 drivers/i2c/busses/i2c-sibyte.c data->word = csr_in32(SMB_CSR(adap, R_SMB_DATA)) & 0xffff; adap 105 drivers/i2c/busses/i2c-sibyte.c static u32 bit_func(struct i2c_adapter *adap) adap 124 drivers/i2c/busses/i2c-sibyte.c struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; adap 130 drivers/i2c/busses/i2c-sibyte.c csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ)); adap 131 drivers/i2c/busses/i2c-sibyte.c csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL)); adap 22 drivers/i2c/busses/i2c-simtec.c struct i2c_adapter adap; adap 98 drivers/i2c/busses/i2c-simtec.c pd->adap.owner = THIS_MODULE; adap 99 drivers/i2c/busses/i2c-simtec.c pd->adap.algo_data = &pd->bit; adap 100 drivers/i2c/busses/i2c-simtec.c pd->adap.dev.parent = &dev->dev; adap 102 drivers/i2c/busses/i2c-simtec.c strlcpy(pd->adap.name, "Simtec I2C", sizeof(pd->adap.name)); adap 112 drivers/i2c/busses/i2c-simtec.c ret = i2c_bit_add_bus(&pd->adap); adap 133 drivers/i2c/busses/i2c-simtec.c i2c_del_adapter(&pd->adap); adap 232 drivers/i2c/busses/i2c-sirf.c static u32 i2c_sirfsoc_func(struct i2c_adapter *adap) adap 237 drivers/i2c/busses/i2c-sirf.c static int i2c_sirfsoc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 240 drivers/i2c/busses/i2c-sirf.c struct sirfsoc_i2c *siic = adap->algo_data; adap 274 drivers/i2c/busses/i2c-sirf.c struct i2c_adapter *adap; adap 310 drivers/i2c/busses/i2c-sirf.c adap = &siic->adapter; adap 311 drivers/i2c/busses/i2c-sirf.c adap->class = I2C_CLASS_DEPRECATED; adap 330 drivers/i2c/busses/i2c-sirf.c adap->algo = &i2c_sirfsoc_algo; adap 331 drivers/i2c/busses/i2c-sirf.c adap->algo_data = siic; adap 332 drivers/i2c/busses/i2c-sirf.c adap->retries = 3; adap 334 drivers/i2c/busses/i2c-sirf.c adap->dev.of_node = pdev->dev.of_node; adap 335 drivers/i2c/busses/i2c-sirf.c adap->dev.parent = &pdev->dev; adap 336 drivers/i2c/busses/i2c-sirf.c adap->nr = pdev->id; adap 338 drivers/i2c/busses/i2c-sirf.c strlcpy(adap->name, "sirfsoc-i2c", sizeof(adap->name)); adap 340 drivers/i2c/busses/i2c-sirf.c platform_set_drvdata(pdev, adap); adap 388 drivers/i2c/busses/i2c-sirf.c err = i2c_add_numbered_adapter(adap); adap 217 drivers/i2c/busses/i2c-sis5595.c static int sis5595_transaction(struct i2c_adapter *adap) adap 226 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "SMBus busy (%04x). Resetting...\n", temp); adap 230 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "Failed! (%02x)\n", temp); adap 233 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "Successful!\n"); adap 248 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "SMBus Timeout!\n"); adap 253 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "Error: Failed bus transaction\n"); adap 258 drivers/i2c/busses/i2c-sis5595.c dev_err(&adap->dev, "Bus collision! SMBus may be locked until " adap 272 drivers/i2c/busses/i2c-sis5595.c dev_dbg(&adap->dev, "Failed reset at end of transaction (%02x)\n", temp); adap 278 drivers/i2c/busses/i2c-sis5595.c static s32 sis5595_access(struct i2c_adapter *adap, u16 addr, adap 314 drivers/i2c/busses/i2c-sis5595.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 320 drivers/i2c/busses/i2c-sis5595.c status = sis5595_transaction(adap); adap 121 drivers/i2c/busses/i2c-sis630.c static int sis630_transaction_start(struct i2c_adapter *adap, int size, adap 129 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "SMBus busy (%02x). Resetting...\n", temp); adap 135 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "Failed! (%02x)\n", temp); adap 138 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "Successful!\n"); adap 145 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "saved clock 0x%02x\n", *oldclock); adap 164 drivers/i2c/busses/i2c-sis630.c static int sis630_transaction_wait(struct i2c_adapter *adap, int size) adap 179 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "SMBus Timeout!\n"); adap 184 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "Error: Failed bus transaction\n"); adap 189 drivers/i2c/busses/i2c-sis630.c dev_err(&adap->dev, "Bus collision!\n"); adap 196 drivers/i2c/busses/i2c-sis630.c static void sis630_transaction_end(struct i2c_adapter *adap, u8 oldclock) adap 201 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 211 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 215 drivers/i2c/busses/i2c-sis630.c static int sis630_transaction(struct i2c_adapter *adap, int size) adap 220 drivers/i2c/busses/i2c-sis630.c result = sis630_transaction_start(adap, size, &oldclock); adap 222 drivers/i2c/busses/i2c-sis630.c result = sis630_transaction_wait(adap, size); adap 223 drivers/i2c/busses/i2c-sis630.c sis630_transaction_end(adap, oldclock); adap 229 drivers/i2c/busses/i2c-sis630.c static int sis630_block_data(struct i2c_adapter *adap, adap 243 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 248 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 251 drivers/i2c/busses/i2c-sis630.c rc = sis630_transaction_start(adap, adap 256 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 259 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 269 drivers/i2c/busses/i2c-sis630.c rc = sis630_transaction_wait(adap, adap 272 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 281 drivers/i2c/busses/i2c-sis630.c rc = sis630_transaction_start(adap, adap 286 drivers/i2c/busses/i2c-sis630.c rc = sis630_transaction_wait(adap, SIS630_BLOCK_DATA); adap 288 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, "trans_wait failed\n"); adap 299 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 303 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 309 drivers/i2c/busses/i2c-sis630.c dev_dbg(&adap->dev, adap 317 drivers/i2c/busses/i2c-sis630.c sis630_transaction_end(adap, oldclock); adap 323 drivers/i2c/busses/i2c-sis630.c static s32 sis630_access(struct i2c_adapter *adap, u16 addr, adap 367 drivers/i2c/busses/i2c-sis630.c return sis630_block_data(adap, data, read_write); adap 369 drivers/i2c/busses/i2c-sis630.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 373 drivers/i2c/busses/i2c-sis630.c status = sis630_transaction(adap, size); adap 150 drivers/i2c/busses/i2c-sis96x.c static s32 sis96x_access(struct i2c_adapter * adap, u16 addr, adap 190 drivers/i2c/busses/i2c-sis96x.c dev_warn(&adap->dev, "Unsupported transaction %d\n", size); adap 78 drivers/i2c/busses/i2c-sprd.c struct i2c_adapter adap; adap 306 drivers/i2c/busses/i2c-sprd.c static u32 sprd_i2c_func(struct i2c_adapter *adap) adap 448 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.nr); adap 455 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.nr); adap 465 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.nr, i2c_dev->src_clk); adap 470 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.nr); adap 500 drivers/i2c/busses/i2c-sprd.c i2c_set_adapdata(&i2c_dev->adap, i2c_dev); adap 502 drivers/i2c/busses/i2c-sprd.c snprintf(i2c_dev->adap.name, sizeof(i2c_dev->adap.name), adap 506 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.owner = THIS_MODULE; adap 508 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.retries = 3; adap 509 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.algo = &sprd_i2c_algo; adap 510 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.algo_data = i2c_dev; adap 511 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.dev.parent = dev; adap 512 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.nr = pdev->id; adap 513 drivers/i2c/busses/i2c-sprd.c i2c_dev->adap.dev.of_node = dev->of_node; adap 552 drivers/i2c/busses/i2c-sprd.c ret = i2c_add_numbered_adapter(&i2c_dev->adap); adap 578 drivers/i2c/busses/i2c-sprd.c i2c_del_adapter(&i2c_dev->adap); adap 591 drivers/i2c/busses/i2c-sprd.c i2c_mark_adapter_suspended(&i2c_dev->adap); adap 599 drivers/i2c/busses/i2c-sprd.c i2c_mark_adapter_resumed(&i2c_dev->adap); adap 184 drivers/i2c/busses/i2c-st.c struct i2c_adapter adap; adap 384 drivers/i2c/busses/i2c-st.c ret = i2c_recover_bus(&i2c_dev->adap); adap 689 drivers/i2c/busses/i2c-st.c i2c_dev->adap.timeout); adap 771 drivers/i2c/busses/i2c-st.c static u32 st_i2c_func(struct i2c_adapter *adap) adap 813 drivers/i2c/busses/i2c-st.c struct i2c_adapter *adap; adap 860 drivers/i2c/busses/i2c-st.c adap = &i2c_dev->adap; adap 861 drivers/i2c/busses/i2c-st.c i2c_set_adapdata(adap, i2c_dev); adap 862 drivers/i2c/busses/i2c-st.c snprintf(adap->name, sizeof(adap->name), "ST I2C(%pa)", &res->start); adap 863 drivers/i2c/busses/i2c-st.c adap->owner = THIS_MODULE; adap 864 drivers/i2c/busses/i2c-st.c adap->timeout = 2 * HZ; adap 865 drivers/i2c/busses/i2c-st.c adap->retries = 0; adap 866 drivers/i2c/busses/i2c-st.c adap->algo = &st_i2c_algo; adap 867 drivers/i2c/busses/i2c-st.c adap->bus_recovery_info = &st_i2c_recovery_info; adap 868 drivers/i2c/busses/i2c-st.c adap->dev.parent = &pdev->dev; adap 869 drivers/i2c/busses/i2c-st.c adap->dev.of_node = pdev->dev.of_node; adap 873 drivers/i2c/busses/i2c-st.c ret = i2c_add_adapter(adap); adap 879 drivers/i2c/busses/i2c-st.c dev_info(i2c_dev->dev, "%s initialized\n", adap->name); adap 888 drivers/i2c/busses/i2c-st.c i2c_del_adapter(&i2c_dev->adap); adap 124 drivers/i2c/busses/i2c-stm32f4.c struct i2c_adapter adap; adap 710 drivers/i2c/busses/i2c-stm32f4.c i2c_dev->adap.timeout); adap 746 drivers/i2c/busses/i2c-stm32f4.c static u32 stm32f4_i2c_func(struct i2c_adapter *adap) adap 762 drivers/i2c/busses/i2c-stm32f4.c struct i2c_adapter *adap; adap 835 drivers/i2c/busses/i2c-stm32f4.c adap = &i2c_dev->adap; adap 836 drivers/i2c/busses/i2c-stm32f4.c i2c_set_adapdata(adap, i2c_dev); adap 837 drivers/i2c/busses/i2c-stm32f4.c snprintf(adap->name, sizeof(adap->name), "STM32 I2C(%pa)", &res->start); adap 838 drivers/i2c/busses/i2c-stm32f4.c adap->owner = THIS_MODULE; adap 839 drivers/i2c/busses/i2c-stm32f4.c adap->timeout = 2 * HZ; adap 840 drivers/i2c/busses/i2c-stm32f4.c adap->retries = 0; adap 841 drivers/i2c/busses/i2c-stm32f4.c adap->algo = &stm32f4_i2c_algo; adap 842 drivers/i2c/busses/i2c-stm32f4.c adap->dev.parent = &pdev->dev; adap 843 drivers/i2c/busses/i2c-stm32f4.c adap->dev.of_node = pdev->dev.of_node; adap 847 drivers/i2c/busses/i2c-stm32f4.c ret = i2c_add_adapter(adap); adap 868 drivers/i2c/busses/i2c-stm32f4.c i2c_del_adapter(&i2c_dev->adap); adap 287 drivers/i2c/busses/i2c-stm32f7.c struct i2c_adapter adap; adap 761 drivers/i2c/busses/i2c-stm32f7.c ret = stm32f7_i2c_release_bus(&i2c_dev->adap); adap 1514 drivers/i2c/busses/i2c-stm32f7.c stm32f7_i2c_release_bus(&i2c_dev->adap); adap 1578 drivers/i2c/busses/i2c-stm32f7.c i2c_dev->adap.timeout); adap 1626 drivers/i2c/busses/i2c-stm32f7.c i2c_dev->adap.timeout); adap 1807 drivers/i2c/busses/i2c-stm32f7.c static u32 stm32f7_i2c_func(struct i2c_adapter *adap) adap 1831 drivers/i2c/busses/i2c-stm32f7.c struct i2c_adapter *adap; adap 1941 drivers/i2c/busses/i2c-stm32f7.c adap = &i2c_dev->adap; adap 1942 drivers/i2c/busses/i2c-stm32f7.c i2c_set_adapdata(adap, i2c_dev); adap 1943 drivers/i2c/busses/i2c-stm32f7.c snprintf(adap->name, sizeof(adap->name), "STM32F7 I2C(%pa)", adap 1945 drivers/i2c/busses/i2c-stm32f7.c adap->owner = THIS_MODULE; adap 1946 drivers/i2c/busses/i2c-stm32f7.c adap->timeout = 2 * HZ; adap 1947 drivers/i2c/busses/i2c-stm32f7.c adap->retries = 3; adap 1948 drivers/i2c/busses/i2c-stm32f7.c adap->algo = &stm32f7_i2c_algo; adap 1949 drivers/i2c/busses/i2c-stm32f7.c adap->dev.parent = &pdev->dev; adap 1950 drivers/i2c/busses/i2c-stm32f7.c adap->dev.of_node = pdev->dev.of_node; adap 1980 drivers/i2c/busses/i2c-stm32f7.c ret = i2c_add_adapter(adap); adap 1984 drivers/i2c/busses/i2c-stm32f7.c dev_info(i2c_dev->dev, "STM32F7 I2C-%d bus adapter\n", adap->nr); adap 2012 drivers/i2c/busses/i2c-stm32f7.c i2c_del_adapter(&i2c_dev->adap); adap 644 drivers/i2c/busses/i2c-stu300.c static int stu300_xfer_msg(struct i2c_adapter *adap, adap 652 drivers/i2c/busses/i2c-stu300.c struct stu300_dev *dev = i2c_get_adapdata(adap); adap 806 drivers/i2c/busses/i2c-stu300.c static int stu300_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 812 drivers/i2c/busses/i2c-stu300.c struct stu300_dev *dev = i2c_get_adapdata(adap); adap 825 drivers/i2c/busses/i2c-stu300.c ret = stu300_xfer_msg(adap, &msgs[i], (i == (num - 1))); adap 836 drivers/i2c/busses/i2c-stu300.c static int stu300_xfer_todo(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 839 drivers/i2c/busses/i2c-stu300.c WARN(1, "%s: atomic transfers not implemented\n", dev_name(&adap->dev)); adap 843 drivers/i2c/busses/i2c-stu300.c static u32 stu300_func(struct i2c_adapter *adap) adap 862 drivers/i2c/busses/i2c-stu300.c struct i2c_adapter *adap; adap 906 drivers/i2c/busses/i2c-stu300.c adap = &dev->adapter; adap 907 drivers/i2c/busses/i2c-stu300.c adap->owner = THIS_MODULE; adap 909 drivers/i2c/busses/i2c-stu300.c adap->class = I2C_CLASS_DEPRECATED; adap 910 drivers/i2c/busses/i2c-stu300.c strlcpy(adap->name, "ST Microelectronics DDC I2C adapter", adap 911 drivers/i2c/busses/i2c-stu300.c sizeof(adap->name)); adap 912 drivers/i2c/busses/i2c-stu300.c adap->nr = bus_nr; adap 913 drivers/i2c/busses/i2c-stu300.c adap->algo = &stu300_algo; adap 914 drivers/i2c/busses/i2c-stu300.c adap->dev.parent = &pdev->dev; adap 915 drivers/i2c/busses/i2c-stu300.c adap->dev.of_node = pdev->dev.of_node; adap 916 drivers/i2c/busses/i2c-stu300.c adap->quirks = &stu300_quirks; adap 918 drivers/i2c/busses/i2c-stu300.c i2c_set_adapdata(adap, dev); adap 921 drivers/i2c/busses/i2c-stu300.c ret = i2c_add_numbered_adapter(adap); adap 112 drivers/i2c/busses/i2c-sun6i-p2wi.c static u32 p2wi_functionality(struct i2c_adapter *adap) adap 117 drivers/i2c/busses/i2c-sun6i-p2wi.c static int p2wi_smbus_xfer(struct i2c_adapter *adap, u16 addr, adap 121 drivers/i2c/busses/i2c-sun6i-p2wi.c struct p2wi *p2wi = i2c_get_adapdata(adap); adap 125 drivers/i2c/busses/i2c-sun6i-p2wi.c dev_err(&adap->dev, "invalid P2WI address\n"); adap 142 drivers/i2c/busses/i2c-sun6i-p2wi.c dev_err(&adap->dev, "P2WI bus busy\n"); adap 157 drivers/i2c/busses/i2c-sun6i-p2wi.c dev_err(&adap->dev, "P2WI bus busy\n"); adap 162 drivers/i2c/busses/i2c-sun6i-p2wi.c dev_err(&adap->dev, "P2WI bus xfer error\n"); adap 495 drivers/i2c/busses/i2c-synquacer.c static int synquacer_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 502 drivers/i2c/busses/i2c-synquacer.c i2c = i2c_get_adapdata(adap); adap 507 drivers/i2c/busses/i2c-synquacer.c for (retry = 0; retry <= adap->retries; retry++) { adap 519 drivers/i2c/busses/i2c-synquacer.c static u32 synquacer_i2c_functionality(struct i2c_adapter *adap) adap 1002 drivers/i2c/busses/i2c-tegra.c static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap) adap 1004 drivers/i2c/busses/i2c-tegra.c struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 1241 drivers/i2c/busses/i2c-tegra.c static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], adap 1244 drivers/i2c/busses/i2c-tegra.c struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 1273 drivers/i2c/busses/i2c-tegra.c static u32 tegra_i2c_func(struct i2c_adapter *adap) adap 1275 drivers/i2c/busses/i2c-tegra.c struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 67 drivers/i2c/busses/i2c-thunderx-pcidrv.c static u32 thunderx_i2c_functionality(struct i2c_adapter *adap) adap 128 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->ara = i2c_setup_smbus_alert(&i2c->adap, &i2c->alert_data); adap 205 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap = thunderx_i2c_ops; adap 206 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap.retries = 5; adap 207 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap.class = I2C_CLASS_HWMON; adap 208 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info; adap 209 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap.dev.parent = dev; adap 210 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 211 drivers/i2c/busses/i2c-thunderx-pcidrv.c snprintf(i2c->adap.name, sizeof(i2c->adap.name), adap 213 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c_set_adapdata(&i2c->adap, i2c); adap 215 drivers/i2c/busses/i2c-thunderx-pcidrv.c ret = i2c_add_adapter(&i2c->adap); adap 238 drivers/i2c/busses/i2c-thunderx-pcidrv.c i2c_del_adapter(&i2c->adap); adap 82 drivers/i2c/busses/i2c-uniphier-f.c struct i2c_adapter adap; adap 312 drivers/i2c/busses/i2c-uniphier-f.c i2c_recover_bus(&priv->adap); adap 315 drivers/i2c/busses/i2c-uniphier-f.c static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap, adap 319 drivers/i2c/busses/i2c-uniphier-f.c struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); adap 355 drivers/i2c/busses/i2c-uniphier-f.c time_left = wait_for_completion_timeout(&priv->comp, adap->timeout); adap 363 drivers/i2c/busses/i2c-uniphier-f.c dev_err(&adap->dev, "transaction timeout.\n"); adap 378 drivers/i2c/busses/i2c-uniphier-f.c dev_err(&adap->dev, adap 388 drivers/i2c/busses/i2c-uniphier-f.c static int uniphier_fi2c_check_bus_busy(struct i2c_adapter *adap) adap 390 drivers/i2c/busses/i2c-uniphier-f.c struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); adap 409 drivers/i2c/busses/i2c-uniphier-f.c static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, adap 416 drivers/i2c/busses/i2c-uniphier-f.c ret = uniphier_fi2c_check_bus_busy(adap); adap 424 drivers/i2c/busses/i2c-uniphier-f.c ret = uniphier_fi2c_master_xfer_one(adap, msg, repeat, stop); adap 434 drivers/i2c/busses/i2c-uniphier-f.c static u32 uniphier_fi2c_functionality(struct i2c_adapter *adap) adap 444 drivers/i2c/busses/i2c-uniphier-f.c static int uniphier_fi2c_get_scl(struct i2c_adapter *adap) adap 446 drivers/i2c/busses/i2c-uniphier-f.c struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); adap 452 drivers/i2c/busses/i2c-uniphier-f.c static void uniphier_fi2c_set_scl(struct i2c_adapter *adap, int val) adap 454 drivers/i2c/busses/i2c-uniphier-f.c struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); adap 460 drivers/i2c/busses/i2c-uniphier-f.c static int uniphier_fi2c_get_sda(struct i2c_adapter *adap) adap 462 drivers/i2c/busses/i2c-uniphier-f.c struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); adap 468 drivers/i2c/busses/i2c-uniphier-f.c static void uniphier_fi2c_unprepare_recovery(struct i2c_adapter *adap) adap 470 drivers/i2c/busses/i2c-uniphier-f.c uniphier_fi2c_prepare_operation(i2c_get_adapdata(adap)); adap 567 drivers/i2c/busses/i2c-uniphier-f.c priv->adap.owner = THIS_MODULE; adap 568 drivers/i2c/busses/i2c-uniphier-f.c priv->adap.algo = &uniphier_fi2c_algo; adap 569 drivers/i2c/busses/i2c-uniphier-f.c priv->adap.dev.parent = dev; adap 570 drivers/i2c/busses/i2c-uniphier-f.c priv->adap.dev.of_node = dev->of_node; adap 571 drivers/i2c/busses/i2c-uniphier-f.c strlcpy(priv->adap.name, "UniPhier FI2C", sizeof(priv->adap.name)); adap 572 drivers/i2c/busses/i2c-uniphier-f.c priv->adap.bus_recovery_info = &uniphier_fi2c_bus_recovery_info; adap 573 drivers/i2c/busses/i2c-uniphier-f.c i2c_set_adapdata(&priv->adap, priv); adap 585 drivers/i2c/busses/i2c-uniphier-f.c ret = i2c_add_adapter(&priv->adap); adap 597 drivers/i2c/busses/i2c-uniphier-f.c i2c_del_adapter(&priv->adap); adap 43 drivers/i2c/busses/i2c-uniphier.c struct i2c_adapter adap; adap 64 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_xfer_byte(struct i2c_adapter *adap, u32 txdata, adap 67 drivers/i2c/busses/i2c-uniphier.c struct uniphier_i2c_priv *priv = i2c_get_adapdata(adap); adap 76 drivers/i2c/busses/i2c-uniphier.c time_left = wait_for_completion_timeout(&priv->comp, adap->timeout); adap 78 drivers/i2c/busses/i2c-uniphier.c dev_err(&adap->dev, "transaction timeout\n"); adap 89 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_send_byte(struct i2c_adapter *adap, u32 txdata) adap 94 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_xfer_byte(adap, txdata, &rxdata); adap 107 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_tx(struct i2c_adapter *adap, u16 addr, u16 len, adap 112 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_send_byte(adap, addr << 1 | adap 119 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_send_byte(adap, adap 128 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_rx(struct i2c_adapter *adap, u16 addr, u16 len, adap 133 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_send_byte(adap, addr << 1 | adap 143 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_xfer_byte(adap, adap 154 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_stop(struct i2c_adapter *adap) adap 156 drivers/i2c/busses/i2c-uniphier.c return uniphier_i2c_send_byte(adap, UNIPHIER_I2C_DTRM_STO | adap 160 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_master_xfer_one(struct i2c_adapter *adap, adap 168 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_rx(adap, msg->addr, msg->len, msg->buf); adap 170 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_tx(adap, msg->addr, msg->len, msg->buf); adap 182 drivers/i2c/busses/i2c-uniphier.c int ret2 = uniphier_i2c_stop(adap); adap 192 drivers/i2c/busses/i2c-uniphier.c i2c_recover_bus(adap); adap 197 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_check_bus_busy(struct i2c_adapter *adap) adap 199 drivers/i2c/busses/i2c-uniphier.c struct uniphier_i2c_priv *priv = i2c_get_adapdata(adap); adap 208 drivers/i2c/busses/i2c-uniphier.c i2c_recover_bus(adap); adap 219 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_master_xfer(struct i2c_adapter *adap, adap 225 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_check_bus_busy(adap); adap 233 drivers/i2c/busses/i2c-uniphier.c ret = uniphier_i2c_master_xfer_one(adap, msg, stop); adap 241 drivers/i2c/busses/i2c-uniphier.c static u32 uniphier_i2c_functionality(struct i2c_adapter *adap) adap 259 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_get_scl(struct i2c_adapter *adap) adap 261 drivers/i2c/busses/i2c-uniphier.c struct uniphier_i2c_priv *priv = i2c_get_adapdata(adap); adap 267 drivers/i2c/busses/i2c-uniphier.c static void uniphier_i2c_set_scl(struct i2c_adapter *adap, int val) adap 269 drivers/i2c/busses/i2c-uniphier.c struct uniphier_i2c_priv *priv = i2c_get_adapdata(adap); adap 275 drivers/i2c/busses/i2c-uniphier.c static int uniphier_i2c_get_sda(struct i2c_adapter *adap) adap 277 drivers/i2c/busses/i2c-uniphier.c struct uniphier_i2c_priv *priv = i2c_get_adapdata(adap); adap 283 drivers/i2c/busses/i2c-uniphier.c static void uniphier_i2c_unprepare_recovery(struct i2c_adapter *adap) adap 285 drivers/i2c/busses/i2c-uniphier.c uniphier_i2c_reset(i2c_get_adapdata(adap), false); adap 362 drivers/i2c/busses/i2c-uniphier.c priv->adap.owner = THIS_MODULE; adap 363 drivers/i2c/busses/i2c-uniphier.c priv->adap.algo = &uniphier_i2c_algo; adap 364 drivers/i2c/busses/i2c-uniphier.c priv->adap.dev.parent = dev; adap 365 drivers/i2c/busses/i2c-uniphier.c priv->adap.dev.of_node = dev->of_node; adap 366 drivers/i2c/busses/i2c-uniphier.c strlcpy(priv->adap.name, "UniPhier I2C", sizeof(priv->adap.name)); adap 367 drivers/i2c/busses/i2c-uniphier.c priv->adap.bus_recovery_info = &uniphier_i2c_bus_recovery_info; adap 368 drivers/i2c/busses/i2c-uniphier.c i2c_set_adapdata(&priv->adap, priv); adap 380 drivers/i2c/busses/i2c-uniphier.c ret = i2c_add_adapter(&priv->adap); adap 392 drivers/i2c/busses/i2c-uniphier.c i2c_del_adapter(&priv->adap); adap 24 drivers/i2c/busses/i2c-versatile.c struct i2c_adapter adap; adap 81 drivers/i2c/busses/i2c-versatile.c i2c->adap.owner = THIS_MODULE; adap 82 drivers/i2c/busses/i2c-versatile.c strlcpy(i2c->adap.name, "Versatile I2C adapter", sizeof(i2c->adap.name)); adap 83 drivers/i2c/busses/i2c-versatile.c i2c->adap.algo_data = &i2c->algo; adap 84 drivers/i2c/busses/i2c-versatile.c i2c->adap.dev.parent = &dev->dev; adap 85 drivers/i2c/busses/i2c-versatile.c i2c->adap.dev.of_node = dev->dev.of_node; adap 89 drivers/i2c/busses/i2c-versatile.c i2c->adap.nr = dev->id; adap 90 drivers/i2c/busses/i2c-versatile.c ret = i2c_bit_add_numbered_bus(&i2c->adap); adap 103 drivers/i2c/busses/i2c-versatile.c i2c_del_adapter(&i2c->adap); adap 190 drivers/i2c/busses/i2c-viapro.c static s32 vt596_access(struct i2c_adapter *adap, u16 addr, adap 122 drivers/i2c/busses/i2c-wmt.c static int wmt_i2c_write(struct i2c_adapter *adap, struct i2c_msg *pmsg, adap 125 drivers/i2c/busses/i2c-wmt.c struct wmt_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 213 drivers/i2c/busses/i2c-wmt.c static int wmt_i2c_read(struct i2c_adapter *adap, struct i2c_msg *pmsg, adap 216 drivers/i2c/busses/i2c-wmt.c struct wmt_i2c_dev *i2c_dev = i2c_get_adapdata(adap); adap 293 drivers/i2c/busses/i2c-wmt.c static int wmt_i2c_xfer(struct i2c_adapter *adap, adap 306 drivers/i2c/busses/i2c-wmt.c ret = wmt_i2c_read(adap, pmsg, is_last); adap 308 drivers/i2c/busses/i2c-wmt.c ret = wmt_i2c_write(adap, pmsg, is_last); adap 314 drivers/i2c/busses/i2c-wmt.c static u32 wmt_i2c_func(struct i2c_adapter *adap) adap 374 drivers/i2c/busses/i2c-wmt.c struct i2c_adapter *adap; adap 414 drivers/i2c/busses/i2c-wmt.c adap = &i2c_dev->adapter; adap 415 drivers/i2c/busses/i2c-wmt.c i2c_set_adapdata(adap, i2c_dev); adap 416 drivers/i2c/busses/i2c-wmt.c strlcpy(adap->name, "WMT I2C adapter", sizeof(adap->name)); adap 417 drivers/i2c/busses/i2c-wmt.c adap->owner = THIS_MODULE; adap 418 drivers/i2c/busses/i2c-wmt.c adap->algo = &wmt_i2c_algo; adap 419 drivers/i2c/busses/i2c-wmt.c adap->dev.parent = &pdev->dev; adap 420 drivers/i2c/busses/i2c-wmt.c adap->dev.of_node = pdev->dev.of_node; adap 430 drivers/i2c/busses/i2c-wmt.c err = i2c_add_adapter(adap); adap 336 drivers/i2c/busses/i2c-xgene-slimpro.c static int xgene_slimpro_i2c_xfer(struct i2c_adapter *adap, u16 addr, adap 341 drivers/i2c/busses/i2c-xgene-slimpro.c struct slimpro_i2c_dev *ctx = i2c_get_adapdata(adap); adap 65 drivers/i2c/busses/i2c-xiic.c struct i2c_adapter adap; adap 297 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 328 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s entry, len: %d, fifo space: %d\n", adap 336 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s TX STOP\n", __func__); adap 367 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s: IER: 0x%x, ISR: 0x%x, pend: 0x%x\n", adap 369 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s: SR: 0x%x, msg: %p, nmsgs: %d\n", adap 384 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s error\n", __func__); adap 402 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 416 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 427 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 457 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 466 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 476 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, adap 487 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s clr: 0x%x\n", __func__, clr); adap 568 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s entry, msg: %p, len: %d", adap 570 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s entry, ISR: 0x%x, CR: 0x%x\n", adap 601 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s entry\n", __func__); adap 616 drivers/i2c/busses/i2c-xiic.c dev_dbg(i2c->adap.dev.parent, "%s entry, msg: %p, fifos space: %d\n", adap 664 drivers/i2c/busses/i2c-xiic.c static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 666 drivers/i2c/busses/i2c-xiic.c struct xiic_i2c *i2c = i2c_get_adapdata(adap); adap 669 drivers/i2c/busses/i2c-xiic.c dev_dbg(adap->dev.parent, "%s entry SR: 0x%x\n", __func__, adap 702 drivers/i2c/busses/i2c-xiic.c static u32 xiic_func(struct i2c_adapter *adap) adap 751 drivers/i2c/busses/i2c-xiic.c i2c->adap = xiic_adapter; adap 752 drivers/i2c/busses/i2c-xiic.c i2c_set_adapdata(&i2c->adap, i2c); adap 753 drivers/i2c/busses/i2c-xiic.c i2c->adap.dev.parent = &pdev->dev; adap 754 drivers/i2c/busses/i2c-xiic.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 798 drivers/i2c/busses/i2c-xiic.c ret = i2c_add_adapter(&i2c->adap); adap 807 drivers/i2c/busses/i2c-xiic.c i2c_new_device(&i2c->adap, pdata->devices + i); adap 825 drivers/i2c/busses/i2c-xiic.c i2c_del_adapter(&i2c->adap); adap 427 drivers/i2c/busses/i2c-xlp9xx.c static int xlp9xx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 431 drivers/i2c/busses/i2c-xlp9xx.c struct xlp9xx_i2c_dev *priv = i2c_get_adapdata(adap); adap 83 drivers/i2c/busses/i2c-xlr.c struct i2c_adapter adap; adap 169 drivers/i2c/busses/i2c-xlr.c struct i2c_adapter *adap = &priv->adap; adap 230 drivers/i2c/busses/i2c-xlr.c dev_err(&adap->dev, "I2C transmit timeout\n"); adap 236 drivers/i2c/busses/i2c-xlr.c struct i2c_adapter *adap = &priv->adap; adap 286 drivers/i2c/busses/i2c-xlr.c dev_err(&adap->dev, "I2C receive timeout\n"); adap 290 drivers/i2c/busses/i2c-xlr.c static int xlr_i2c_xfer(struct i2c_adapter *adap, adap 296 drivers/i2c/busses/i2c-xlr.c struct xlr_i2c_private *priv = i2c_get_adapdata(adap); adap 326 drivers/i2c/busses/i2c-xlr.c static u32 xlr_func(struct i2c_adapter *adap) adap 423 drivers/i2c/busses/i2c-xlr.c priv->adap.dev.parent = &pdev->dev; adap 424 drivers/i2c/busses/i2c-xlr.c priv->adap.dev.of_node = pdev->dev.of_node; adap 425 drivers/i2c/busses/i2c-xlr.c priv->adap.owner = THIS_MODULE; adap 426 drivers/i2c/busses/i2c-xlr.c priv->adap.algo_data = priv; adap 427 drivers/i2c/busses/i2c-xlr.c priv->adap.algo = &xlr_i2c_algo; adap 428 drivers/i2c/busses/i2c-xlr.c priv->adap.quirks = &xlr_i2c_quirks; adap 429 drivers/i2c/busses/i2c-xlr.c priv->adap.nr = pdev->id; adap 430 drivers/i2c/busses/i2c-xlr.c priv->adap.class = I2C_CLASS_HWMON; adap 431 drivers/i2c/busses/i2c-xlr.c snprintf(priv->adap.name, sizeof(priv->adap.name), "xlr-i2c"); adap 433 drivers/i2c/busses/i2c-xlr.c i2c_set_adapdata(&priv->adap, priv); adap 434 drivers/i2c/busses/i2c-xlr.c ret = i2c_add_numbered_adapter(&priv->adap); adap 439 drivers/i2c/busses/i2c-xlr.c dev_info(&priv->adap.dev, "Added I2C Bus.\n"); adap 448 drivers/i2c/busses/i2c-xlr.c i2c_del_adapter(&priv->adap); adap 53 drivers/i2c/busses/i2c-zx2967.c #define DEV(i2c) ((i2c)->adap.dev.parent) adap 56 drivers/i2c/busses/i2c-zx2967.c struct i2c_adapter adap; adap 305 drivers/i2c/busses/i2c-zx2967.c static int zx2967_i2c_xfer(struct i2c_adapter *adap, adap 308 drivers/i2c/busses/i2c-zx2967.c struct zx2967_i2c *i2c = i2c_get_adapdata(adap); adap 423 drivers/i2c/busses/i2c-zx2967.c static int zx2967_smbus_xfer(struct i2c_adapter *adap, u16 addr, adap 427 drivers/i2c/busses/i2c-zx2967.c struct zx2967_i2c *i2c = i2c_get_adapdata(adap); adap 450 drivers/i2c/busses/i2c-zx2967.c static u32 zx2967_i2c_func(struct i2c_adapter *adap) adap 466 drivers/i2c/busses/i2c-zx2967.c i2c_mark_adapter_suspended(&i2c->adap); adap 477 drivers/i2c/busses/i2c-zx2967.c i2c_mark_adapter_resumed(&i2c->adap); adap 561 drivers/i2c/busses/i2c-zx2967.c i2c_set_adapdata(&i2c->adap, i2c); adap 562 drivers/i2c/busses/i2c-zx2967.c strlcpy(i2c->adap.name, "zx2967 i2c adapter", adap 563 drivers/i2c/busses/i2c-zx2967.c sizeof(i2c->adap.name)); adap 564 drivers/i2c/busses/i2c-zx2967.c i2c->adap.algo = &zx2967_i2c_algo; adap 565 drivers/i2c/busses/i2c-zx2967.c i2c->adap.quirks = &zx2967_i2c_quirks; adap 566 drivers/i2c/busses/i2c-zx2967.c i2c->adap.nr = pdev->id; adap 567 drivers/i2c/busses/i2c-zx2967.c i2c->adap.dev.parent = &pdev->dev; adap 568 drivers/i2c/busses/i2c-zx2967.c i2c->adap.dev.of_node = pdev->dev.of_node; adap 570 drivers/i2c/busses/i2c-zx2967.c ret = i2c_add_numbered_adapter(&i2c->adap); adap 585 drivers/i2c/busses/i2c-zx2967.c i2c_del_adapter(&i2c->adap); adap 264 drivers/i2c/i2c-core-acpi.c void i2c_acpi_register_devices(struct i2c_adapter *adap) adap 268 drivers/i2c/i2c-core-acpi.c if (!has_acpi_companion(&adap->dev)) adap 274 drivers/i2c/i2c-core-acpi.c adap, NULL); adap 276 drivers/i2c/i2c-core-acpi.c dev_warn(&adap->dev, "failed to enumerate I2C slaves\n"); adap 133 drivers/i2c/i2c-core-base.c static int get_scl_gpio_value(struct i2c_adapter *adap) adap 135 drivers/i2c/i2c-core-base.c return gpiod_get_value_cansleep(adap->bus_recovery_info->scl_gpiod); adap 138 drivers/i2c/i2c-core-base.c static void set_scl_gpio_value(struct i2c_adapter *adap, int val) adap 140 drivers/i2c/i2c-core-base.c gpiod_set_value_cansleep(adap->bus_recovery_info->scl_gpiod, val); adap 143 drivers/i2c/i2c-core-base.c static int get_sda_gpio_value(struct i2c_adapter *adap) adap 145 drivers/i2c/i2c-core-base.c return gpiod_get_value_cansleep(adap->bus_recovery_info->sda_gpiod); adap 148 drivers/i2c/i2c-core-base.c static void set_sda_gpio_value(struct i2c_adapter *adap, int val) adap 150 drivers/i2c/i2c-core-base.c gpiod_set_value_cansleep(adap->bus_recovery_info->sda_gpiod, val); adap 153 drivers/i2c/i2c-core-base.c static int i2c_generic_bus_free(struct i2c_adapter *adap) adap 155 drivers/i2c/i2c-core-base.c struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; adap 159 drivers/i2c/i2c-core-base.c ret = bri->get_bus_free(adap); adap 161 drivers/i2c/i2c-core-base.c ret = bri->get_sda(adap); adap 177 drivers/i2c/i2c-core-base.c int i2c_generic_scl_recovery(struct i2c_adapter *adap) adap 179 drivers/i2c/i2c-core-base.c struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; adap 183 drivers/i2c/i2c-core-base.c bri->prepare_recovery(adap); adap 192 drivers/i2c/i2c-core-base.c bri->set_scl(adap, scl); adap 195 drivers/i2c/i2c-core-base.c bri->set_sda(adap, scl); adap 204 drivers/i2c/i2c-core-base.c if (!bri->get_scl(adap)) { adap 205 drivers/i2c/i2c-core-base.c dev_err(&adap->dev, adap 213 drivers/i2c/i2c-core-base.c bri->set_scl(adap, scl); adap 223 drivers/i2c/i2c-core-base.c bri->set_sda(adap, scl); adap 227 drivers/i2c/i2c-core-base.c ret = i2c_generic_bus_free(adap); adap 238 drivers/i2c/i2c-core-base.c bri->unprepare_recovery(adap); adap 244 drivers/i2c/i2c-core-base.c int i2c_recover_bus(struct i2c_adapter *adap) adap 246 drivers/i2c/i2c-core-base.c if (!adap->bus_recovery_info) adap 249 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "Trying i2c bus recovery\n"); adap 250 drivers/i2c/i2c-core-base.c return adap->bus_recovery_info->recover_bus(adap); adap 254 drivers/i2c/i2c-core-base.c static void i2c_init_recovery(struct i2c_adapter *adap) adap 256 drivers/i2c/i2c-core-base.c struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; adap 293 drivers/i2c/i2c-core-base.c dev_err(&adap->dev, "Not using recovery: %s\n", err_str); adap 294 drivers/i2c/i2c-core-base.c adap->bus_recovery_info = NULL; adap 299 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap = client->adapter; adap 302 drivers/i2c/i2c-core-base.c if (!adap->host_notify_domain) adap 308 drivers/i2c/i2c-core-base.c irq = irq_create_mapping(adap->host_notify_domain, client->addr); adap 679 drivers/i2c/i2c-core-base.c static void i2c_dev_set_name(struct i2c_adapter *adap, adap 695 drivers/i2c/i2c-core-base.c dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap), adap 742 drivers/i2c/i2c-core-base.c i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info) adap 751 drivers/i2c/i2c-core-base.c client->adapter = adap; adap 766 drivers/i2c/i2c-core-base.c dev_err(&adap->dev, "Invalid %d-bit I2C address 0x%02hx\n", adap 772 drivers/i2c/i2c-core-base.c status = i2c_check_addr_busy(adap, i2c_encode_flags_to_addr(client)); adap 782 drivers/i2c/i2c-core-base.c i2c_dev_set_name(adap, client, info); adap 787 drivers/i2c/i2c-core-base.c dev_err(&adap->dev, adap 798 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "client [%s] registered with bus id %s\n", adap 809 drivers/i2c/i2c-core-base.c dev_err(&adap->dev, adap 833 drivers/i2c/i2c-core-base.c i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) adap 837 drivers/i2c/i2c-core-base.c ret = i2c_new_client_device(adap, info); adap 1030 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap = to_i2c_adapter(dev); adap 1031 drivers/i2c/i2c-core-base.c complete(&adap->dev_released); adap 1062 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap = to_i2c_adapter(dev); adap 1102 drivers/i2c/i2c-core-base.c client = i2c_new_client_device(adap, &info); adap 1107 drivers/i2c/i2c-core-base.c mutex_lock(&adap->userspace_clients_lock); adap 1108 drivers/i2c/i2c-core-base.c list_add_tail(&client->detected, &adap->userspace_clients); adap 1109 drivers/i2c/i2c-core-base.c mutex_unlock(&adap->userspace_clients_lock); adap 1130 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap = to_i2c_adapter(dev); adap 1149 drivers/i2c/i2c-core-base.c mutex_lock_nested(&adap->userspace_clients_lock, adap 1150 drivers/i2c/i2c-core-base.c i2c_adapter_depth(adap)); adap 1151 drivers/i2c/i2c-core-base.c list_for_each_entry_safe(client, next, &adap->userspace_clients, adap 1163 drivers/i2c/i2c-core-base.c mutex_unlock(&adap->userspace_clients_lock); adap 1225 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap) adap 1228 drivers/i2c/i2c-core-base.c i2c_detect(adap, driver); adap 1244 drivers/i2c/i2c-core-base.c static void i2c_host_notify_irq_teardown(struct i2c_adapter *adap) adap 1246 drivers/i2c/i2c-core-base.c struct irq_domain *domain = adap->host_notify_domain; adap 1256 drivers/i2c/i2c-core-base.c adap->host_notify_domain = NULL; adap 1272 drivers/i2c/i2c-core-base.c static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap) adap 1276 drivers/i2c/i2c-core-base.c if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_HOST_NOTIFY)) adap 1279 drivers/i2c/i2c-core-base.c domain = irq_domain_create_linear(adap->dev.fwnode, adap 1281 drivers/i2c/i2c-core-base.c &i2c_host_notify_irq_ops, adap); adap 1285 drivers/i2c/i2c-core-base.c adap->host_notify_domain = domain; adap 1300 drivers/i2c/i2c-core-base.c int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr) adap 1304 drivers/i2c/i2c-core-base.c if (!adap) adap 1307 drivers/i2c/i2c-core-base.c irq = irq_find_mapping(adap->host_notify_domain, addr); adap 1317 drivers/i2c/i2c-core-base.c static int i2c_register_adapter(struct i2c_adapter *adap) adap 1328 drivers/i2c/i2c-core-base.c if (WARN(!adap->name[0], "i2c adapter has no name")) adap 1331 drivers/i2c/i2c-core-base.c if (!adap->algo) { adap 1332 drivers/i2c/i2c-core-base.c pr_err("adapter '%s': no algo supplied!\n", adap->name); adap 1336 drivers/i2c/i2c-core-base.c if (!adap->lock_ops) adap 1337 drivers/i2c/i2c-core-base.c adap->lock_ops = &i2c_adapter_lock_ops; adap 1339 drivers/i2c/i2c-core-base.c adap->locked_flags = 0; adap 1340 drivers/i2c/i2c-core-base.c rt_mutex_init(&adap->bus_lock); adap 1341 drivers/i2c/i2c-core-base.c rt_mutex_init(&adap->mux_lock); adap 1342 drivers/i2c/i2c-core-base.c mutex_init(&adap->userspace_clients_lock); adap 1343 drivers/i2c/i2c-core-base.c INIT_LIST_HEAD(&adap->userspace_clients); adap 1346 drivers/i2c/i2c-core-base.c if (adap->timeout == 0) adap 1347 drivers/i2c/i2c-core-base.c adap->timeout = HZ; adap 1350 drivers/i2c/i2c-core-base.c res = i2c_setup_host_notify_irq_domain(adap); adap 1353 drivers/i2c/i2c-core-base.c adap->name, res); adap 1357 drivers/i2c/i2c-core-base.c dev_set_name(&adap->dev, "i2c-%d", adap->nr); adap 1358 drivers/i2c/i2c-core-base.c adap->dev.bus = &i2c_bus_type; adap 1359 drivers/i2c/i2c-core-base.c adap->dev.type = &i2c_adapter_type; adap 1360 drivers/i2c/i2c-core-base.c res = device_register(&adap->dev); adap 1362 drivers/i2c/i2c-core-base.c pr_err("adapter '%s': can't register device (%d)\n", adap->name, res); adap 1366 drivers/i2c/i2c-core-base.c res = of_i2c_setup_smbus_alert(adap); adap 1370 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name); adap 1372 drivers/i2c/i2c-core-base.c pm_runtime_no_callbacks(&adap->dev); adap 1373 drivers/i2c/i2c-core-base.c pm_suspend_ignore_children(&adap->dev, true); adap 1374 drivers/i2c/i2c-core-base.c pm_runtime_enable(&adap->dev); adap 1377 drivers/i2c/i2c-core-base.c res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev, adap 1378 drivers/i2c/i2c-core-base.c adap->dev.parent); adap 1380 drivers/i2c/i2c-core-base.c dev_warn(&adap->dev, adap 1384 drivers/i2c/i2c-core-base.c i2c_init_recovery(adap); adap 1387 drivers/i2c/i2c-core-base.c of_i2c_register_devices(adap); adap 1388 drivers/i2c/i2c-core-base.c i2c_acpi_register_devices(adap); adap 1389 drivers/i2c/i2c-core-base.c i2c_acpi_install_space_handler(adap); adap 1391 drivers/i2c/i2c-core-base.c if (adap->nr < __i2c_first_dynamic_bus_num) adap 1392 drivers/i2c/i2c-core-base.c i2c_scan_static_board_info(adap); adap 1396 drivers/i2c/i2c-core-base.c bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter); adap 1402 drivers/i2c/i2c-core-base.c init_completion(&adap->dev_released); adap 1403 drivers/i2c/i2c-core-base.c device_unregister(&adap->dev); adap 1404 drivers/i2c/i2c-core-base.c wait_for_completion(&adap->dev_released); adap 1407 drivers/i2c/i2c-core-base.c idr_remove(&i2c_adapter_idr, adap->nr); adap 1419 drivers/i2c/i2c-core-base.c static int __i2c_add_numbered_adapter(struct i2c_adapter *adap) adap 1424 drivers/i2c/i2c-core-base.c id = idr_alloc(&i2c_adapter_idr, adap, adap->nr, adap->nr + 1, GFP_KERNEL); adap 1429 drivers/i2c/i2c-core-base.c return i2c_register_adapter(adap); adap 1495 drivers/i2c/i2c-core-base.c int i2c_add_numbered_adapter(struct i2c_adapter *adap) adap 1497 drivers/i2c/i2c-core-base.c if (adap->nr == -1) /* -1 means dynamically assign bus id */ adap 1498 drivers/i2c/i2c-core-base.c return i2c_add_adapter(adap); adap 1500 drivers/i2c/i2c-core-base.c return __i2c_add_numbered_adapter(adap); adap 1550 drivers/i2c/i2c-core-base.c void i2c_del_adapter(struct i2c_adapter *adap) adap 1557 drivers/i2c/i2c-core-base.c found = idr_find(&i2c_adapter_idr, adap->nr); adap 1559 drivers/i2c/i2c-core-base.c if (found != adap) { adap 1560 drivers/i2c/i2c-core-base.c pr_debug("attempting to delete unregistered adapter [%s]\n", adap->name); adap 1564 drivers/i2c/i2c-core-base.c i2c_acpi_remove_space_handler(adap); adap 1567 drivers/i2c/i2c-core-base.c bus_for_each_drv(&i2c_bus_type, NULL, adap, adap 1572 drivers/i2c/i2c-core-base.c mutex_lock_nested(&adap->userspace_clients_lock, adap 1573 drivers/i2c/i2c-core-base.c i2c_adapter_depth(adap)); adap 1574 drivers/i2c/i2c-core-base.c list_for_each_entry_safe(client, next, &adap->userspace_clients, adap 1576 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "Removing %s at 0x%x\n", client->name, adap 1581 drivers/i2c/i2c-core-base.c mutex_unlock(&adap->userspace_clients_lock); adap 1588 drivers/i2c/i2c-core-base.c device_for_each_child(&adap->dev, NULL, __unregister_client); adap 1589 drivers/i2c/i2c-core-base.c device_for_each_child(&adap->dev, NULL, __unregister_dummy); adap 1592 drivers/i2c/i2c-core-base.c class_compat_remove_link(i2c_adapter_compat_class, &adap->dev, adap 1593 drivers/i2c/i2c-core-base.c adap->dev.parent); adap 1597 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); adap 1599 drivers/i2c/i2c-core-base.c pm_runtime_disable(&adap->dev); adap 1601 drivers/i2c/i2c-core-base.c i2c_host_notify_irq_teardown(adap); adap 1610 drivers/i2c/i2c-core-base.c init_completion(&adap->dev_released); adap 1611 drivers/i2c/i2c-core-base.c device_unregister(&adap->dev); adap 1612 drivers/i2c/i2c-core-base.c wait_for_completion(&adap->dev_released); adap 1616 drivers/i2c/i2c-core-base.c idr_remove(&i2c_adapter_idr, adap->nr); adap 1621 drivers/i2c/i2c-core-base.c memset(&adap->dev, 0, sizeof(adap->dev)); adap 1809 drivers/i2c/i2c-core-base.c void i2c_clients_command(struct i2c_adapter *adap, unsigned int cmd, void *arg) adap 1815 drivers/i2c/i2c-core-base.c device_for_each_child(&adap->dev, &cmd_arg, i2c_cmd); adap 1892 drivers/i2c/i2c-core-base.c static int i2c_quirk_error(struct i2c_adapter *adap, struct i2c_msg *msg, char *err_msg) adap 1894 drivers/i2c/i2c-core-base.c dev_err_ratelimited(&adap->dev, "adapter quirk: %s (addr 0x%04x, size %u, %s)\n", adap 1900 drivers/i2c/i2c-core-base.c static int i2c_check_for_quirks(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 1902 drivers/i2c/i2c-core-base.c const struct i2c_adapter_quirks *q = adap->quirks; adap 1912 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[0], "1st comb msg must be write"); adap 1915 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[1], "2nd comb msg must be read"); adap 1918 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[0], "comb msg only to same addr"); adap 1921 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[0], "msg too long"); adap 1924 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[1], "msg too long"); adap 1931 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[0], "too many messages"); adap 1938 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[i], "msg too long"); adap 1941 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[i], "no zero length"); adap 1944 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[i], "msg too long"); adap 1947 drivers/i2c/i2c-core-base.c return i2c_quirk_error(adap, &msgs[i], "no zero length"); adap 1966 drivers/i2c/i2c-core-base.c int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 1974 drivers/i2c/i2c-core-base.c ret = __i2c_check_suspended(adap); adap 1978 drivers/i2c/i2c-core-base.c if (adap->quirks && i2c_check_for_quirks(adap, msgs, num)) adap 1990 drivers/i2c/i2c-core-base.c trace_i2c_read(adap, &msgs[i], i); adap 1992 drivers/i2c/i2c-core-base.c trace_i2c_write(adap, &msgs[i], i); adap 1997 drivers/i2c/i2c-core-base.c for (ret = 0, try = 0; try <= adap->retries; try++) { adap 1998 drivers/i2c/i2c-core-base.c if (i2c_in_atomic_xfer_mode() && adap->algo->master_xfer_atomic) adap 1999 drivers/i2c/i2c-core-base.c ret = adap->algo->master_xfer_atomic(adap, msgs, num); adap 2001 drivers/i2c/i2c-core-base.c ret = adap->algo->master_xfer(adap, msgs, num); adap 2005 drivers/i2c/i2c-core-base.c if (time_after(jiffies, orig_jiffies + adap->timeout)) adap 2013 drivers/i2c/i2c-core-base.c trace_i2c_reply(adap, &msgs[i], i); adap 2014 drivers/i2c/i2c-core-base.c trace_i2c_result(adap, num, ret); adap 2033 drivers/i2c/i2c-core-base.c int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 2037 drivers/i2c/i2c-core-base.c if (!adap->algo->master_xfer) { adap 2038 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "I2C level transfers not supported\n"); adap 2058 drivers/i2c/i2c-core-base.c ret = __i2c_lock_bus_helper(adap); adap 2062 drivers/i2c/i2c-core-base.c ret = __i2c_transfer(adap, msgs, num); adap 2063 drivers/i2c/i2c-core-base.c i2c_unlock_bus(adap, I2C_LOCK_SEGMENT); adap 2110 drivers/i2c/i2c-core-base.c struct i2c_adapter *adap = client->adapter; adap 2114 drivers/i2c/i2c-core-base.c if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) adap 2118 drivers/i2c/i2c-core-base.c ret = i2c_smbus_xfer(adap, I2C_ADDR_DEVICE_ID, 0, adap 2149 drivers/i2c/i2c-core-base.c static int i2c_default_probe(struct i2c_adapter *adap, unsigned short addr) adap 2155 drivers/i2c/i2c-core-base.c if (addr == 0x73 && (adap->class & I2C_CLASS_HWMON) adap 2156 drivers/i2c/i2c-core-base.c && i2c_check_functionality(adap, I2C_FUNC_SMBUS_READ_BYTE_DATA)) adap 2157 drivers/i2c/i2c-core-base.c err = i2c_smbus_xfer(adap, addr, 0, I2C_SMBUS_READ, 0, adap 2162 drivers/i2c/i2c-core-base.c && i2c_check_functionality(adap, I2C_FUNC_SMBUS_QUICK)) adap 2163 drivers/i2c/i2c-core-base.c err = i2c_smbus_xfer(adap, addr, 0, I2C_SMBUS_WRITE, 0, adap 2165 drivers/i2c/i2c-core-base.c else if (i2c_check_functionality(adap, I2C_FUNC_SMBUS_READ_BYTE)) adap 2166 drivers/i2c/i2c-core-base.c err = i2c_smbus_xfer(adap, addr, 0, I2C_SMBUS_READ, 0, adap 2169 drivers/i2c/i2c-core-base.c dev_warn(&adap->dev, "No suitable probing method supported for address 0x%02X\n", adap 2283 drivers/i2c/i2c-core-base.c int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr) adap 2285 drivers/i2c/i2c-core-base.c return i2c_smbus_xfer(adap, addr, 0, I2C_SMBUS_READ, 0, adap 2291 drivers/i2c/i2c-core-base.c i2c_new_probed_device(struct i2c_adapter *adap, adap 2294 drivers/i2c/i2c-core-base.c int (*probe)(struct i2c_adapter *adap, unsigned short addr)) adap 2304 drivers/i2c/i2c-core-base.c dev_warn(&adap->dev, "Invalid 7-bit address 0x%02x\n", adap 2310 drivers/i2c/i2c-core-base.c if (i2c_check_addr_busy(adap, addr_list[i])) { adap 2311 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, adap 2318 drivers/i2c/i2c-core-base.c if (probe(adap, addr_list[i])) adap 2323 drivers/i2c/i2c-core-base.c dev_dbg(&adap->dev, "Probing failed, no device found\n"); adap 2328 drivers/i2c/i2c-core-base.c return i2c_new_device(adap, info); adap 2352 drivers/i2c/i2c-core-base.c void i2c_put_adapter(struct i2c_adapter *adap) adap 2354 drivers/i2c/i2c-core-base.c if (!adap) adap 2357 drivers/i2c/i2c-core-base.c put_device(&adap->dev); adap 2358 drivers/i2c/i2c-core-base.c module_put(adap->owner); adap 64 drivers/i2c/i2c-core-of.c static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap, adap 71 drivers/i2c/i2c-core-of.c dev_dbg(&adap->dev, "of_i2c: register %pOF\n", node); adap 73 drivers/i2c/i2c-core-of.c ret = of_i2c_get_board_info(&adap->dev, node, &info); adap 77 drivers/i2c/i2c-core-of.c client = i2c_new_device(adap, &info); adap 79 drivers/i2c/i2c-core-of.c dev_err(&adap->dev, "of_i2c: Failure registering %pOF\n", node); adap 85 drivers/i2c/i2c-core-of.c void of_i2c_register_devices(struct i2c_adapter *adap) adap 91 drivers/i2c/i2c-core-of.c if (!adap->dev.of_node) adap 94 drivers/i2c/i2c-core-of.c dev_dbg(&adap->dev, "of_i2c: walking child nodes\n"); adap 96 drivers/i2c/i2c-core-of.c bus = of_get_child_by_name(adap->dev.of_node, "i2c-bus"); adap 98 drivers/i2c/i2c-core-of.c bus = of_node_get(adap->dev.of_node); adap 104 drivers/i2c/i2c-core-of.c client = of_i2c_register_device(adap, node); adap 106 drivers/i2c/i2c-core-of.c dev_err(&adap->dev, adap 233 drivers/i2c/i2c-core-of.c struct i2c_adapter *adap; adap 238 drivers/i2c/i2c-core-of.c adap = of_find_i2c_adapter_by_node(rd->dn->parent); adap 239 drivers/i2c/i2c-core-of.c if (adap == NULL) adap 243 drivers/i2c/i2c-core-of.c put_device(&adap->dev); adap 247 drivers/i2c/i2c-core-of.c client = of_i2c_register_device(adap, rd->dn); adap 249 drivers/i2c/i2c-core-of.c dev_err(&adap->dev, "failed to create client for '%pOF'\n", adap 251 drivers/i2c/i2c-core-of.c put_device(&adap->dev); adap 255 drivers/i2c/i2c-core-of.c put_device(&adap->dev); adap 547 drivers/i2c/i2c-core-smbus.c int (*xfer_func)(struct i2c_adapter *adap, u16 addr, adap 35 drivers/i2c/i2c-core.h static inline int __i2c_lock_bus_helper(struct i2c_adapter *adap) adap 40 drivers/i2c/i2c-core.h WARN(!adap->algo->master_xfer_atomic && !adap->algo->smbus_xfer_atomic, adap 41 drivers/i2c/i2c-core.h "No atomic I2C transfer handler for '%s'\n", dev_name(&adap->dev)); adap 42 drivers/i2c/i2c-core.h ret = i2c_trylock_bus(adap, I2C_LOCK_SEGMENT) ? 0 : -EAGAIN; adap 44 drivers/i2c/i2c-core.h i2c_lock_bus(adap, I2C_LOCK_SEGMENT); adap 50 drivers/i2c/i2c-core.h static inline int __i2c_check_suspended(struct i2c_adapter *adap) adap 52 drivers/i2c/i2c-core.h if (test_bit(I2C_ALF_IS_SUSPENDED, &adap->locked_flags)) { adap 53 drivers/i2c/i2c-core.h if (!test_and_set_bit(I2C_ALF_SUSPEND_REPORTED, &adap->locked_flags)) adap 54 drivers/i2c/i2c-core.h dev_WARN(&adap->dev, "Transfer while suspended\n"); adap 65 drivers/i2c/i2c-core.h void i2c_acpi_register_devices(struct i2c_adapter *adap); adap 69 drivers/i2c/i2c-core.h static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { } adap 93 drivers/i2c/i2c-core.h void of_i2c_register_devices(struct i2c_adapter *adap); adap 95 drivers/i2c/i2c-core.h static inline void of_i2c_register_devices(struct i2c_adapter *adap) { } adap 42 drivers/i2c/i2c-dev.c struct i2c_adapter *adap; adap 57 drivers/i2c/i2c-dev.c if (i2c_dev->adap->nr == index) adap 66 drivers/i2c/i2c-dev.c static struct i2c_dev *get_free_i2c_dev(struct i2c_adapter *adap) adap 70 drivers/i2c/i2c-dev.c if (adap->nr >= I2C_MINORS) { adap 72 drivers/i2c/i2c-dev.c adap->nr); adap 79 drivers/i2c/i2c-dev.c i2c_dev->adap = adap; adap 104 drivers/i2c/i2c-dev.c return sprintf(buf, "%s\n", i2c_dev->adap->name); adap 581 drivers/i2c/i2c-dev.c struct i2c_adapter *adap; adap 583 drivers/i2c/i2c-dev.c adap = i2c_get_adapter(minor); adap 584 drivers/i2c/i2c-dev.c if (!adap) adap 596 drivers/i2c/i2c-dev.c i2c_put_adapter(adap); adap 599 drivers/i2c/i2c-dev.c snprintf(client->name, I2C_NAME_SIZE, "i2c-dev %d", adap->nr); adap 601 drivers/i2c/i2c-dev.c client->adapter = adap; adap 643 drivers/i2c/i2c-dev.c struct i2c_adapter *adap; adap 649 drivers/i2c/i2c-dev.c adap = to_i2c_adapter(dev); adap 651 drivers/i2c/i2c-dev.c i2c_dev = get_free_i2c_dev(adap); adap 659 drivers/i2c/i2c-dev.c i2c_dev->dev.devt = MKDEV(I2C_MAJOR, adap->nr); adap 661 drivers/i2c/i2c-dev.c i2c_dev->dev.parent = &adap->dev; adap 663 drivers/i2c/i2c-dev.c dev_set_name(&i2c_dev->dev, "i2c-%d", adap->nr); adap 672 drivers/i2c/i2c-dev.c adap->name, adap->nr); adap 678 drivers/i2c/i2c-dev.c struct i2c_adapter *adap; adap 683 drivers/i2c/i2c-dev.c adap = to_i2c_adapter(dev); adap 685 drivers/i2c/i2c-dev.c i2c_dev = i2c_dev_get_by_minor(adap->nr); adap 691 drivers/i2c/i2c-dev.c pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name); adap 33 drivers/i2c/i2c-mux.c struct i2c_adapter adap; adap 39 drivers/i2c/i2c-mux.c static int __i2c_mux_master_xfer(struct i2c_adapter *adap, adap 42 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 58 drivers/i2c/i2c-mux.c static int i2c_mux_master_xfer(struct i2c_adapter *adap, adap 61 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 77 drivers/i2c/i2c-mux.c static int __i2c_mux_smbus_xfer(struct i2c_adapter *adap, adap 82 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 99 drivers/i2c/i2c-mux.c static int i2c_mux_smbus_xfer(struct i2c_adapter *adap, adap 104 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 122 drivers/i2c/i2c-mux.c static u32 i2c_mux_functionality(struct i2c_adapter *adap) adap 124 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 328 drivers/i2c/i2c-mux.c snprintf(priv->adap.name, sizeof(priv->adap.name), adap 330 drivers/i2c/i2c-mux.c priv->adap.owner = THIS_MODULE; adap 331 drivers/i2c/i2c-mux.c priv->adap.algo = &priv->algo; adap 332 drivers/i2c/i2c-mux.c priv->adap.algo_data = priv; adap 333 drivers/i2c/i2c-mux.c priv->adap.dev.parent = &parent->dev; adap 334 drivers/i2c/i2c-mux.c priv->adap.retries = parent->retries; adap 335 drivers/i2c/i2c-mux.c priv->adap.timeout = parent->timeout; adap 336 drivers/i2c/i2c-mux.c priv->adap.quirks = parent->quirks; adap 338 drivers/i2c/i2c-mux.c priv->adap.lock_ops = &i2c_mux_lock_ops; adap 340 drivers/i2c/i2c-mux.c priv->adap.lock_ops = &i2c_parent_lock_ops; adap 348 drivers/i2c/i2c-mux.c priv->adap.class = class; adap 389 drivers/i2c/i2c-mux.c priv->adap.dev.of_node = child; adap 397 drivers/i2c/i2c-mux.c acpi_preset_companion(&priv->adap.dev, adap 402 drivers/i2c/i2c-mux.c priv->adap.nr = force_nr; adap 403 drivers/i2c/i2c-mux.c ret = i2c_add_numbered_adapter(&priv->adap); adap 411 drivers/i2c/i2c-mux.c ret = i2c_add_adapter(&priv->adap); adap 420 drivers/i2c/i2c-mux.c WARN(sysfs_create_link(&priv->adap.dev.kobj, &muxc->dev->kobj, adap 425 drivers/i2c/i2c-mux.c WARN(sysfs_create_link(&muxc->dev->kobj, &priv->adap.dev.kobj, adap 429 drivers/i2c/i2c-mux.c i2c_adapter_id(&priv->adap)); adap 431 drivers/i2c/i2c-mux.c muxc->adapter[muxc->num_adapters++] = &priv->adap; adap 445 drivers/i2c/i2c-mux.c struct i2c_adapter *adap = muxc->adapter[--muxc->num_adapters]; adap 446 drivers/i2c/i2c-mux.c struct i2c_mux_priv *priv = adap->algo_data; adap 447 drivers/i2c/i2c-mux.c struct device_node *np = adap->dev.of_node; adap 455 drivers/i2c/i2c-mux.c sysfs_remove_link(&priv->adap.dev.kobj, "mux_device"); adap 456 drivers/i2c/i2c-mux.c i2c_del_adapter(adap); adap 124 drivers/i2c/i2c-stub.c static s32 stub_xfer(struct i2c_adapter *adap, u16 addr, unsigned short flags, adap 146 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, "smbus quick - addr 0x%02x\n", addr); adap 153 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 159 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 172 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 181 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 187 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 200 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 205 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 226 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 234 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 247 drivers/i2c/i2c-stub.c b = stub_find_block(&adap->dev, chip, command, false); adap 255 drivers/i2c/i2c-stub.c b = stub_find_block(&adap->dev, chip, command, adap 269 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 274 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 283 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, adap 292 drivers/i2c/i2c-stub.c dev_dbg(&adap->dev, "Unsupported I2C/SMBus command\n"); adap 38 drivers/i2c/muxes/i2c-demux-pinctrl.c static int i2c_demux_master_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) adap 40 drivers/i2c/muxes/i2c-demux-pinctrl.c struct i2c_demux_pinctrl_priv *priv = adap->algo_data; adap 46 drivers/i2c/muxes/i2c-demux-pinctrl.c static u32 i2c_demux_functionality(struct i2c_adapter *adap) adap 48 drivers/i2c/muxes/i2c-demux-pinctrl.c struct i2c_demux_pinctrl_priv *priv = adap->algo_data; adap 56 drivers/i2c/muxes/i2c-demux-pinctrl.c struct i2c_adapter *adap; adap 64 drivers/i2c/muxes/i2c-demux-pinctrl.c adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np); adap 65 drivers/i2c/muxes/i2c-demux-pinctrl.c if (!adap) { adap 75 drivers/i2c/muxes/i2c-demux-pinctrl.c p = devm_pinctrl_get(adap->dev.parent); adap 94 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->chan[new_chan].parent_adap = adap; adap 99 drivers/i2c/muxes/i2c-demux-pinctrl.c if (adap->algo->master_xfer_atomic) adap 104 drivers/i2c/muxes/i2c-demux-pinctrl.c "i2c-demux (master i2c-%d)", i2c_adapter_id(adap)); adap 108 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->cur_adap.dev.parent = &adap->dev; adap 109 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->cur_adap.class = adap->class; adap 110 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->cur_adap.retries = adap->retries; adap 111 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->cur_adap.timeout = adap->timeout; adap 112 drivers/i2c/muxes/i2c-demux-pinctrl.c priv->cur_adap.quirks = adap->quirks; adap 121 drivers/i2c/muxes/i2c-demux-pinctrl.c i2c_put_adapter(adap); adap 210 drivers/i2c/muxes/i2c-mux-ltc4306.c struct i2c_adapter *adap = client->adapter; adap 227 drivers/i2c/muxes/i2c-mux-ltc4306.c muxc = i2c_mux_alloc(adap, &client->dev, adap 93 drivers/i2c/muxes/i2c-mux-mlxcpld.c static int mlxcpld_mux_reg_write(struct i2c_adapter *adap, adap 99 drivers/i2c/muxes/i2c-mux-mlxcpld.c return __i2c_smbus_xfer(adap, client->addr, client->flags, adap 135 drivers/i2c/muxes/i2c-mux-mlxcpld.c struct i2c_adapter *adap = client->adapter; adap 145 drivers/i2c/muxes/i2c-mux-mlxcpld.c if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) adap 148 drivers/i2c/muxes/i2c-mux-mlxcpld.c muxc = i2c_mux_alloc(adap, &client->dev, CPLD_MUX_MAX_NCHANS, adap 100 drivers/i2c/muxes/i2c-mux-pca9541.c struct i2c_adapter *adap = client->adapter; adap 103 drivers/i2c/muxes/i2c-mux-pca9541.c return __i2c_smbus_xfer(adap, client->addr, client->flags, adap 114 drivers/i2c/muxes/i2c-mux-pca9541.c struct i2c_adapter *adap = client->adapter; adap 118 drivers/i2c/muxes/i2c-mux-pca9541.c ret = __i2c_smbus_xfer(adap, client->addr, client->flags, adap 288 drivers/i2c/muxes/i2c-mux-pca9541.c struct i2c_adapter *adap = client->adapter; adap 293 drivers/i2c/muxes/i2c-mux-pca9541.c if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_BYTE_DATA)) adap 300 drivers/i2c/muxes/i2c-mux-pca9541.c i2c_lock_bus(adap, I2C_LOCK_SEGMENT); adap 302 drivers/i2c/muxes/i2c-mux-pca9541.c i2c_unlock_bus(adap, I2C_LOCK_SEGMENT); adap 306 drivers/i2c/muxes/i2c-mux-pca9541.c muxc = i2c_mux_alloc(adap, &client->dev, 1, sizeof(*data), adap 222 drivers/i2c/muxes/i2c-mux-pca954x.c static int pca954x_reg_write(struct i2c_adapter *adap, adap 227 drivers/i2c/muxes/i2c-mux-pca954x.c return __i2c_smbus_xfer(adap, client->addr, client->flags, adap 411 drivers/i2c/muxes/i2c-mux-pca954x.c struct i2c_adapter *adap = client->adapter; adap 421 drivers/i2c/muxes/i2c-mux-pca954x.c if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_BYTE)) adap 424 drivers/i2c/muxes/i2c-mux-pca954x.c muxc = i2c_mux_alloc(adap, dev, PCA954X_MAX_NCHANS, sizeof(*data), 0, adap 575 drivers/i3c/master.c i2c_adapter_to_i3c_master(struct i2c_adapter *adap) adap 577 drivers/i3c/master.c return container_of(adap, struct i3c_master_controller, i2c); adap 2075 drivers/i3c/master.c static int i3c_master_i2c_adapter_xfer(struct i2c_adapter *adap, adap 2078 drivers/i3c/master.c struct i3c_master_controller *master = i2c_adapter_to_i3c_master(adap); adap 2119 drivers/i3c/master.c struct i2c_adapter *adap = i3c_master_to_i2c_adapter(master); adap 2123 drivers/i3c/master.c adap->dev.parent = master->dev.parent; adap 2124 drivers/i3c/master.c adap->owner = master->dev.parent->driver->owner; adap 2125 drivers/i3c/master.c adap->algo = &i3c_master_i2c_algo; adap 2126 drivers/i3c/master.c strncpy(adap->name, dev_name(master->dev.parent), sizeof(adap->name)); adap 2129 drivers/i3c/master.c adap->timeout = 1000; adap 2130 drivers/i3c/master.c adap->retries = 3; adap 2132 drivers/i3c/master.c ret = i2c_add_adapter(adap); adap 2141 drivers/i3c/master.c i2cdev->dev = i2c_new_device(adap, &i2cdev->boardinfo->base); adap 285 drivers/input/touchscreen/rohm_bu21023.c struct i2c_adapter *adap = client->adapter; adap 299 drivers/input/touchscreen/rohm_bu21023.c i2c_lock_bus(adap, I2C_LOCK_SEGMENT); adap 302 drivers/input/touchscreen/rohm_bu21023.c if (__i2c_transfer(adap, &msg[i], 1) < 0) { adap 308 drivers/input/touchscreen/rohm_bu21023.c i2c_unlock_bus(adap, I2C_LOCK_SEGMENT); adap 457 drivers/macintosh/therm_windtunnel.c struct i2c_adapter *adap; adap 460 drivers/macintosh/therm_windtunnel.c adap = i2c_get_adapter(0); adap 461 drivers/macintosh/therm_windtunnel.c if (!adap) adap 466 drivers/macintosh/therm_windtunnel.c i2c_put_adapter(adap); adap 471 drivers/macintosh/therm_windtunnel.c while (adap) { adap 472 drivers/macintosh/therm_windtunnel.c do_attach(adap); adap 475 drivers/macintosh/therm_windtunnel.c i2c_put_adapter(adap); adap 476 drivers/macintosh/therm_windtunnel.c adap = i2c_get_adapter(++i); adap 26 drivers/media/cec/cec-adap.c static void cec_fill_msg_report_features(struct cec_adapter *adap, adap 42 drivers/media/cec/cec-adap.c #define call_op(adap, op, arg...) \ adap 43 drivers/media/cec/cec-adap.c (adap->ops->op ? adap->ops->op(adap, ## arg) : 0) adap 45 drivers/media/cec/cec-adap.c #define call_void_op(adap, op, arg...) \ adap 47 drivers/media/cec/cec-adap.c if (adap->ops->op) \ adap 48 drivers/media/cec/cec-adap.c adap->ops->op(adap, ## arg); \ adap 51 drivers/media/cec/cec-adap.c static int cec_log_addr2idx(const struct cec_adapter *adap, u8 log_addr) adap 55 drivers/media/cec/cec-adap.c for (i = 0; i < adap->log_addrs.num_log_addrs; i++) adap 56 drivers/media/cec/cec-adap.c if (adap->log_addrs.log_addr[i] == log_addr) adap 61 drivers/media/cec/cec-adap.c static unsigned int cec_log_addr2dev(const struct cec_adapter *adap, u8 log_addr) adap 63 drivers/media/cec/cec-adap.c int i = cec_log_addr2idx(adap, log_addr); adap 65 drivers/media/cec/cec-adap.c return adap->log_addrs.primary_device_type[i < 0 ? 0 : i]; adap 158 drivers/media/cec/cec-adap.c static void cec_queue_event(struct cec_adapter *adap, adap 164 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 165 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) adap 167 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 171 drivers/media/cec/cec-adap.c void cec_queue_pin_cec_event(struct cec_adapter *adap, bool is_high, adap 181 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 182 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) adap 185 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 190 drivers/media/cec/cec-adap.c void cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts) adap 198 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 199 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) adap 201 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 206 drivers/media/cec/cec-adap.c void cec_queue_pin_5v_event(struct cec_adapter *adap, bool is_high, ktime_t ts) adap 214 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 215 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) adap 217 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 281 drivers/media/cec/cec-adap.c static void cec_queue_msg_monitor(struct cec_adapter *adap, adap 289 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 290 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) { adap 294 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 300 drivers/media/cec/cec-adap.c static void cec_queue_msg_followers(struct cec_adapter *adap, adap 305 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 306 drivers/media/cec/cec-adap.c list_for_each_entry(fh, &adap->devnode.fhs, list) { adap 310 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 314 drivers/media/cec/cec-adap.c static void cec_post_state_event(struct cec_adapter *adap) adap 320 drivers/media/cec/cec-adap.c ev.state_change.phys_addr = adap->phys_addr; adap 321 drivers/media/cec/cec-adap.c ev.state_change.log_addr_mask = adap->log_addrs.log_addr_mask; adap 322 drivers/media/cec/cec-adap.c cec_queue_event(adap, &ev); adap 376 drivers/media/cec/cec-adap.c if (data->adap->transmitting == data) { adap 377 drivers/media/cec/cec-adap.c data->adap->transmitting = NULL; adap 381 drivers/media/cec/cec-adap.c if (!WARN_ON(!data->adap->transmit_queue_sz)) adap 382 drivers/media/cec/cec-adap.c data->adap->transmit_queue_sz--; adap 397 drivers/media/cec/cec-adap.c cec_queue_msg_monitor(data->adap, &data->msg, 1); adap 407 drivers/media/cec/cec-adap.c static void cec_flush(struct cec_adapter *adap) adap 415 drivers/media/cec/cec-adap.c while (!list_empty(&adap->transmit_queue)) { adap 416 drivers/media/cec/cec-adap.c data = list_first_entry(&adap->transmit_queue, adap 420 drivers/media/cec/cec-adap.c if (adap->transmitting) adap 421 drivers/media/cec/cec-adap.c cec_data_cancel(adap->transmitting, CEC_TX_STATUS_ABORTED); adap 424 drivers/media/cec/cec-adap.c list_for_each_entry_safe(data, n, &adap->wait_queue, list) { adap 440 drivers/media/cec/cec-adap.c if (WARN_ON(adap->transmit_queue_sz)) adap 441 drivers/media/cec/cec-adap.c adap->transmit_queue_sz = 0; adap 458 drivers/media/cec/cec-adap.c struct cec_adapter *adap = _adap; adap 466 drivers/media/cec/cec-adap.c if (adap->transmit_in_progress) { adap 476 drivers/media/cec/cec-adap.c err = wait_event_interruptible_timeout(adap->kthread_waitq, adap 477 drivers/media/cec/cec-adap.c (adap->needs_hpd && adap 478 drivers/media/cec/cec-adap.c (!adap->is_configured && !adap->is_configuring)) || adap 480 drivers/media/cec/cec-adap.c (!adap->transmit_in_progress && adap 481 drivers/media/cec/cec-adap.c !list_empty(&adap->transmit_queue)), adap 486 drivers/media/cec/cec-adap.c wait_event_interruptible(adap->kthread_waitq, adap 488 drivers/media/cec/cec-adap.c (!adap->transmit_in_progress && adap 489 drivers/media/cec/cec-adap.c !list_empty(&adap->transmit_queue))); adap 492 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 494 drivers/media/cec/cec-adap.c if ((adap->needs_hpd && adap 495 drivers/media/cec/cec-adap.c (!adap->is_configured && !adap->is_configuring)) || adap 497 drivers/media/cec/cec-adap.c cec_flush(adap); adap 501 drivers/media/cec/cec-adap.c if (adap->transmit_in_progress && timeout) { adap 510 drivers/media/cec/cec-adap.c if (adap->transmitting) { adap 511 drivers/media/cec/cec-adap.c pr_warn("cec-%s: message %*ph timed out\n", adap->name, adap 512 drivers/media/cec/cec-adap.c adap->transmitting->msg.len, adap 513 drivers/media/cec/cec-adap.c adap->transmitting->msg.msg); adap 515 drivers/media/cec/cec-adap.c cec_data_cancel(adap->transmitting, adap 518 drivers/media/cec/cec-adap.c pr_warn("cec-%s: transmit timed out\n", adap->name); adap 520 drivers/media/cec/cec-adap.c adap->transmit_in_progress = false; adap 521 drivers/media/cec/cec-adap.c adap->tx_timeouts++; adap 529 drivers/media/cec/cec-adap.c if (adap->transmit_in_progress || list_empty(&adap->transmit_queue)) adap 533 drivers/media/cec/cec-adap.c data = list_first_entry(&adap->transmit_queue, adap 536 drivers/media/cec/cec-adap.c if (!WARN_ON(!data->adap->transmit_queue_sz)) adap 537 drivers/media/cec/cec-adap.c adap->transmit_queue_sz--; adap 540 drivers/media/cec/cec-adap.c adap->transmitting = data; adap 548 drivers/media/cec/cec-adap.c if (data->msg.len == 1 && adap->is_configured) adap 557 drivers/media/cec/cec-adap.c } else if (adap->last_initiator != adap 561 drivers/media/cec/cec-adap.c adap->last_initiator = cec_msg_initiator(&data->msg); adap 573 drivers/media/cec/cec-adap.c if (adap->ops->adap_transmit(adap, data->attempts, adap 577 drivers/media/cec/cec-adap.c adap->transmit_in_progress = true; adap 580 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 591 drivers/media/cec/cec-adap.c void cec_transmit_done_ts(struct cec_adapter *adap, u8 status, adap 604 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 605 drivers/media/cec/cec-adap.c data = adap->transmitting; adap 612 drivers/media/cec/cec-adap.c if (!adap->transmit_in_progress) adap 615 drivers/media/cec/cec-adap.c adap->transmit_in_progress = false; adap 618 drivers/media/cec/cec-adap.c adap->transmit_in_progress = false; adap 632 drivers/media/cec/cec-adap.c adap->transmitting = NULL; adap 650 drivers/media/cec/cec-adap.c list_add(&data->list, &adap->transmit_queue); adap 651 drivers/media/cec/cec-adap.c adap->transmit_queue_sz++; adap 662 drivers/media/cec/cec-adap.c cec_queue_msg_monitor(adap, msg, 1); adap 664 drivers/media/cec/cec-adap.c if ((status & CEC_TX_STATUS_OK) && adap->is_configured && adap 670 drivers/media/cec/cec-adap.c list_add_tail(&data->list, &adap->wait_queue); adap 683 drivers/media/cec/cec-adap.c wake_up_interruptible(&adap->kthread_waitq); adap 684 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 688 drivers/media/cec/cec-adap.c void cec_transmit_attempt_done_ts(struct cec_adapter *adap, adap 693 drivers/media/cec/cec-adap.c cec_transmit_done_ts(adap, status, 0, 0, 0, 0, ts); adap 696 drivers/media/cec/cec-adap.c cec_transmit_done_ts(adap, status, 1, 0, 0, 0, ts); adap 699 drivers/media/cec/cec-adap.c cec_transmit_done_ts(adap, status, 0, 1, 0, 0, ts); adap 702 drivers/media/cec/cec-adap.c cec_transmit_done_ts(adap, status, 0, 0, 1, 0, ts); adap 705 drivers/media/cec/cec-adap.c cec_transmit_done_ts(adap, status, 0, 0, 0, 1, ts); adap 709 drivers/media/cec/cec-adap.c WARN(1, "cec-%s: invalid status 0x%02x\n", adap->name, status); adap 721 drivers/media/cec/cec-adap.c struct cec_adapter *adap = data->adap; adap 723 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 737 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 746 drivers/media/cec/cec-adap.c int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg, adap 797 drivers/media/cec/cec-adap.c if ((adap->log_addrs.flags & CEC_LOG_ADDRS_FL_CDC_ONLY) && adap 804 drivers/media/cec/cec-adap.c msg->msg[2] = adap->phys_addr >> 8; adap 805 drivers/media/cec/cec-adap.c msg->msg[3] = adap->phys_addr & 0xff; adap 814 drivers/media/cec/cec-adap.c if (cec_has_log_addr(adap, cec_msg_destination(msg))) { adap 827 drivers/media/cec/cec-adap.c msg->sequence = ++adap->sequence; adap 829 drivers/media/cec/cec-adap.c msg->sequence = ++adap->sequence; adap 834 drivers/media/cec/cec-adap.c cec_has_log_addr(adap, cec_msg_destination(msg))) { adap 839 drivers/media/cec/cec-adap.c if (msg->len > 1 && adap->is_configured && adap 840 drivers/media/cec/cec-adap.c !cec_has_log_addr(adap, cec_msg_initiator(msg))) { adap 851 drivers/media/cec/cec-adap.c if (!adap->is_configured && !adap->is_configuring && adap 861 drivers/media/cec/cec-adap.c if (!adap->is_configured && !adap->is_configuring) { adap 862 drivers/media/cec/cec-adap.c if (adap->needs_hpd) { adap 873 drivers/media/cec/cec-adap.c if (adap->transmit_queue_sz >= CEC_MAX_MSG_TX_QUEUE_SZ) { adap 882 drivers/media/cec/cec-adap.c msg->sequence = ++adap->sequence; adap 884 drivers/media/cec/cec-adap.c msg->sequence = ++adap->sequence; adap 888 drivers/media/cec/cec-adap.c data->adap = adap; adap 897 drivers/media/cec/cec-adap.c list_add_tail(&data->list, &adap->transmit_queue); adap 898 drivers/media/cec/cec-adap.c adap->transmit_queue_sz++; adap 899 drivers/media/cec/cec-adap.c if (!adap->transmitting) adap 900 drivers/media/cec/cec-adap.c wake_up_interruptible(&adap->kthread_waitq); adap 909 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 913 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 926 drivers/media/cec/cec-adap.c int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, adap 931 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 932 drivers/media/cec/cec-adap.c ret = cec_transmit_msg_fh(adap, msg, NULL, block); adap 933 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 943 drivers/media/cec/cec-adap.c static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, adap 1036 drivers/media/cec/cec-adap.c void cec_received_msg_ts(struct cec_adapter *adap, adap 1062 drivers/media/cec/cec-adap.c cec_has_log_addr(adap, msg_init)) adap 1077 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1080 drivers/media/cec/cec-adap.c adap->last_initiator = 0xff; adap 1084 drivers/media/cec/cec-adap.c valid_la = cec_has_log_addr(adap, msg_dest); adap 1103 drivers/media/cec/cec-adap.c adap->log_addrs.cec_version < CEC_OP_CEC_VERSION_2_0 && adap 1161 drivers/media/cec/cec-adap.c list_for_each_entry(data, &adap->wait_queue, list) { adap 1199 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1201 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1213 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1216 drivers/media/cec/cec-adap.c cec_queue_msg_monitor(adap, msg, valid_la); adap 1222 drivers/media/cec/cec-adap.c if (adap->log_addrs.log_addr_mask == 0) adap 1230 drivers/media/cec/cec-adap.c cec_receive_notify(adap, msg, is_reply); adap 1241 drivers/media/cec/cec-adap.c static int cec_config_log_addr(struct cec_adapter *adap, adap 1245 drivers/media/cec/cec-adap.c struct cec_log_addrs *las = &adap->log_addrs; adap 1251 drivers/media/cec/cec-adap.c if (cec_has_log_addr(adap, log_addr)) adap 1259 drivers/media/cec/cec-adap.c err = cec_transmit_msg_fh(adap, &msg, NULL, true); adap 1265 drivers/media/cec/cec-adap.c if (!adap->is_configuring) adap 1301 drivers/media/cec/cec-adap.c err = adap->ops->adap_log_addr(adap, log_addr); adap 1307 drivers/media/cec/cec-adap.c adap->phys_addrs[log_addr] = adap->phys_addr; adap 1317 drivers/media/cec/cec-adap.c static void cec_adap_unconfigure(struct cec_adapter *adap) adap 1319 drivers/media/cec/cec-adap.c if (!adap->needs_hpd || adap 1320 drivers/media/cec/cec-adap.c adap->phys_addr != CEC_PHYS_ADDR_INVALID) adap 1321 drivers/media/cec/cec-adap.c WARN_ON(adap->ops->adap_log_addr(adap, CEC_LOG_ADDR_INVALID)); adap 1322 drivers/media/cec/cec-adap.c adap->log_addrs.log_addr_mask = 0; adap 1323 drivers/media/cec/cec-adap.c adap->is_configuring = false; adap 1324 drivers/media/cec/cec-adap.c adap->is_configured = false; adap 1325 drivers/media/cec/cec-adap.c memset(adap->phys_addrs, 0xff, sizeof(adap->phys_addrs)); adap 1326 drivers/media/cec/cec-adap.c cec_flush(adap); adap 1327 drivers/media/cec/cec-adap.c wake_up_interruptible(&adap->kthread_waitq); adap 1328 drivers/media/cec/cec-adap.c cec_post_state_event(adap); adap 1384 drivers/media/cec/cec-adap.c struct cec_adapter *adap = arg; adap 1385 drivers/media/cec/cec-adap.c struct cec_log_addrs *las = &adap->log_addrs; adap 1389 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1391 drivers/media/cec/cec-adap.c cec_phys_addr_exp(adap->phys_addr), las->num_log_addrs); adap 1407 drivers/media/cec/cec-adap.c if (adap->phys_addr && type == CEC_LOG_ADDR_TYPE_TV) adap 1418 drivers/media/cec/cec-adap.c err = cec_config_log_addr(adap, i, last_la); adap 1435 drivers/media/cec/cec-adap.c err = cec_config_log_addr(adap, i, la_list[j]); adap 1448 drivers/media/cec/cec-adap.c if (adap->log_addrs.log_addr_mask == 0 && adap 1453 drivers/media/cec/cec-adap.c if (adap->log_addrs.log_addr_mask == 0) { adap 1462 drivers/media/cec/cec-adap.c adap->is_configured = true; adap 1463 drivers/media/cec/cec-adap.c adap->is_configuring = false; adap 1464 drivers/media/cec/cec-adap.c cec_post_state_event(adap); adap 1487 drivers/media/cec/cec-adap.c adap->log_addrs.cec_version >= CEC_OP_CEC_VERSION_2_0) { adap 1488 drivers/media/cec/cec-adap.c cec_fill_msg_report_features(adap, &msg, i); adap 1489 drivers/media/cec/cec-adap.c cec_transmit_msg_fh(adap, &msg, NULL, false); adap 1493 drivers/media/cec/cec-adap.c cec_msg_report_physical_addr(&msg, adap->phys_addr, adap 1497 drivers/media/cec/cec-adap.c cec_phys_addr_exp(adap->phys_addr)); adap 1498 drivers/media/cec/cec-adap.c cec_transmit_msg_fh(adap, &msg, NULL, false); adap 1501 drivers/media/cec/cec-adap.c if (adap->log_addrs.vendor_id != CEC_VENDOR_ID_NONE) { adap 1503 drivers/media/cec/cec-adap.c adap->log_addrs.vendor_id); adap 1504 drivers/media/cec/cec-adap.c cec_transmit_msg_fh(adap, &msg, NULL, false); adap 1507 drivers/media/cec/cec-adap.c adap->kthread_config = NULL; adap 1508 drivers/media/cec/cec-adap.c complete(&adap->config_completion); adap 1509 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1515 drivers/media/cec/cec-adap.c cec_adap_unconfigure(adap); adap 1516 drivers/media/cec/cec-adap.c adap->kthread_config = NULL; adap 1517 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1518 drivers/media/cec/cec-adap.c complete(&adap->config_completion); adap 1528 drivers/media/cec/cec-adap.c static void cec_claim_log_addrs(struct cec_adapter *adap, bool block) adap 1530 drivers/media/cec/cec-adap.c if (WARN_ON(adap->is_configuring || adap->is_configured)) adap 1533 drivers/media/cec/cec-adap.c init_completion(&adap->config_completion); adap 1536 drivers/media/cec/cec-adap.c adap->is_configuring = true; adap 1537 drivers/media/cec/cec-adap.c adap->kthread_config = kthread_run(cec_config_thread_func, adap, adap 1538 drivers/media/cec/cec-adap.c "ceccfg-%s", adap->name); adap 1539 drivers/media/cec/cec-adap.c if (IS_ERR(adap->kthread_config)) { adap 1540 drivers/media/cec/cec-adap.c adap->kthread_config = NULL; adap 1542 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1543 drivers/media/cec/cec-adap.c wait_for_completion(&adap->config_completion); adap 1544 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1552 drivers/media/cec/cec-adap.c void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block) adap 1554 drivers/media/cec/cec-adap.c if (phys_addr == adap->phys_addr) adap 1556 drivers/media/cec/cec-adap.c if (phys_addr != CEC_PHYS_ADDR_INVALID && adap->devnode.unregistered) adap 1562 drivers/media/cec/cec-adap.c adap->phys_addr != CEC_PHYS_ADDR_INVALID) { adap 1563 drivers/media/cec/cec-adap.c adap->phys_addr = CEC_PHYS_ADDR_INVALID; adap 1564 drivers/media/cec/cec-adap.c cec_post_state_event(adap); adap 1565 drivers/media/cec/cec-adap.c cec_adap_unconfigure(adap); adap 1567 drivers/media/cec/cec-adap.c if (adap->monitor_all_cnt) adap 1568 drivers/media/cec/cec-adap.c WARN_ON(call_op(adap, adap_monitor_all_enable, false)); adap 1569 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 1570 drivers/media/cec/cec-adap.c if (adap->needs_hpd || list_empty(&adap->devnode.fhs)) { adap 1571 drivers/media/cec/cec-adap.c WARN_ON(adap->ops->adap_enable(adap, false)); adap 1572 drivers/media/cec/cec-adap.c adap->transmit_in_progress = false; adap 1573 drivers/media/cec/cec-adap.c wake_up_interruptible(&adap->kthread_waitq); adap 1575 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 1580 drivers/media/cec/cec-adap.c mutex_lock(&adap->devnode.lock); adap 1581 drivers/media/cec/cec-adap.c adap->last_initiator = 0xff; adap 1582 drivers/media/cec/cec-adap.c adap->transmit_in_progress = false; adap 1584 drivers/media/cec/cec-adap.c if ((adap->needs_hpd || list_empty(&adap->devnode.fhs)) && adap 1585 drivers/media/cec/cec-adap.c adap->ops->adap_enable(adap, true)) { adap 1586 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 1590 drivers/media/cec/cec-adap.c if (adap->monitor_all_cnt && adap 1591 drivers/media/cec/cec-adap.c call_op(adap, adap_monitor_all_enable, true)) { adap 1592 drivers/media/cec/cec-adap.c if (adap->needs_hpd || list_empty(&adap->devnode.fhs)) adap 1593 drivers/media/cec/cec-adap.c WARN_ON(adap->ops->adap_enable(adap, false)); adap 1594 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 1597 drivers/media/cec/cec-adap.c mutex_unlock(&adap->devnode.lock); adap 1599 drivers/media/cec/cec-adap.c adap->phys_addr = phys_addr; adap 1600 drivers/media/cec/cec-adap.c cec_post_state_event(adap); adap 1601 drivers/media/cec/cec-adap.c if (adap->log_addrs.num_log_addrs) adap 1602 drivers/media/cec/cec-adap.c cec_claim_log_addrs(adap, block); adap 1605 drivers/media/cec/cec-adap.c void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block) adap 1607 drivers/media/cec/cec-adap.c if (IS_ERR_OR_NULL(adap)) adap 1610 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1611 drivers/media/cec/cec-adap.c __cec_s_phys_addr(adap, phys_addr, block); adap 1612 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1616 drivers/media/cec/cec-adap.c void cec_s_phys_addr_from_edid(struct cec_adapter *adap, adap 1624 drivers/media/cec/cec-adap.c cec_s_phys_addr(adap, pa, false); adap 1628 drivers/media/cec/cec-adap.c void cec_s_conn_info(struct cec_adapter *adap, adap 1631 drivers/media/cec/cec-adap.c if (IS_ERR_OR_NULL(adap)) adap 1634 drivers/media/cec/cec-adap.c if (!(adap->capabilities & CEC_CAP_CONNECTOR_INFO)) adap 1637 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1639 drivers/media/cec/cec-adap.c adap->conn_info = *conn_info; adap 1641 drivers/media/cec/cec-adap.c memset(&adap->conn_info, 0, sizeof(adap->conn_info)); adap 1642 drivers/media/cec/cec-adap.c cec_post_state_event(adap); adap 1643 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1652 drivers/media/cec/cec-adap.c int __cec_s_log_addrs(struct cec_adapter *adap, adap 1658 drivers/media/cec/cec-adap.c if (adap->devnode.unregistered) adap 1662 drivers/media/cec/cec-adap.c cec_adap_unconfigure(adap); adap 1663 drivers/media/cec/cec-adap.c adap->log_addrs.num_log_addrs = 0; adap 1665 drivers/media/cec/cec-adap.c adap->log_addrs.log_addr[i] = CEC_LOG_ADDR_INVALID; adap 1666 drivers/media/cec/cec-adap.c adap->log_addrs.osd_name[0] = '\0'; adap 1667 drivers/media/cec/cec-adap.c adap->log_addrs.vendor_id = CEC_VENDOR_ID_NONE; adap 1668 drivers/media/cec/cec-adap.c adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0; adap 1699 drivers/media/cec/cec-adap.c if (log_addrs->num_log_addrs > adap->available_log_addrs) { adap 1700 drivers/media/cec/cec-adap.c dprintk(1, "num_log_addrs > %d\n", adap->available_log_addrs); adap 1802 drivers/media/cec/cec-adap.c log_addrs->log_addr_mask = adap->log_addrs.log_addr_mask; adap 1803 drivers/media/cec/cec-adap.c adap->log_addrs = *log_addrs; adap 1804 drivers/media/cec/cec-adap.c if (adap->phys_addr != CEC_PHYS_ADDR_INVALID) adap 1805 drivers/media/cec/cec-adap.c cec_claim_log_addrs(adap, block); adap 1809 drivers/media/cec/cec-adap.c int cec_s_log_addrs(struct cec_adapter *adap, adap 1814 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 1815 drivers/media/cec/cec-adap.c err = __cec_s_log_addrs(adap, log_addrs, block); adap 1816 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 1824 drivers/media/cec/cec-adap.c static void cec_fill_msg_report_features(struct cec_adapter *adap, adap 1828 drivers/media/cec/cec-adap.c const struct cec_log_addrs *las = &adap->log_addrs; adap 1837 drivers/media/cec/cec-adap.c msg->msg[2] = adap->log_addrs.cec_version; adap 1852 drivers/media/cec/cec-adap.c static int cec_feature_abort_reason(struct cec_adapter *adap, adap 1868 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_msg, false); adap 1871 drivers/media/cec/cec-adap.c static int cec_feature_abort(struct cec_adapter *adap, struct cec_msg *msg) adap 1873 drivers/media/cec/cec-adap.c return cec_feature_abort_reason(adap, msg, adap 1877 drivers/media/cec/cec-adap.c static int cec_feature_refused(struct cec_adapter *adap, struct cec_msg *msg) adap 1879 drivers/media/cec/cec-adap.c return cec_feature_abort_reason(adap, msg, adap 1890 drivers/media/cec/cec-adap.c static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg, adap 1896 drivers/media/cec/cec-adap.c u8 devtype = cec_log_addr2dev(adap, dest_laddr); adap 1897 drivers/media/cec/cec-adap.c int la_idx = cec_log_addr2idx(adap, dest_laddr); adap 1904 drivers/media/cec/cec-adap.c if (cec_is_cdc_only(&adap->log_addrs) && adap 1908 drivers/media/cec/cec-adap.c if (adap->ops->received) { adap 1910 drivers/media/cec/cec-adap.c if (adap->ops->received(adap, msg) != -ENOMSG) adap 1929 drivers/media/cec/cec-adap.c if (!adap->passthrough && from_unregistered) adap 1939 drivers/media/cec/cec-adap.c if (adap->passthrough) adap 1976 drivers/media/cec/cec-adap.c adap->phys_addrs[init_laddr] = pa; adap 1983 drivers/media/cec/cec-adap.c if (!(adap->capabilities & CEC_CAP_RC) || adap 1984 drivers/media/cec/cec-adap.c !(adap->log_addrs.flags & CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU)) adap 1995 drivers/media/cec/cec-adap.c rc_keydown(adap->rc, RC_PROTO_CEC, adap 1998 drivers/media/cec/cec-adap.c rc_keydown(adap->rc, RC_PROTO_CEC, adap 2014 drivers/media/cec/cec-adap.c rc_keydown(adap->rc, RC_PROTO_CEC, msg->msg[2], 0); adap 2021 drivers/media/cec/cec-adap.c if (!(adap->capabilities & CEC_CAP_RC) || adap 2022 drivers/media/cec/cec-adap.c !(adap->log_addrs.flags & CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU)) adap 2025 drivers/media/cec/cec-adap.c rc_keyup(adap->rc); adap 2034 drivers/media/cec/cec-adap.c cec_msg_cec_version(&tx_cec_msg, adap->log_addrs.cec_version); adap 2035 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_cec_msg, false); adap 2041 drivers/media/cec/cec-adap.c cec_msg_report_physical_addr(&tx_cec_msg, adap->phys_addr, devtype); adap 2042 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_cec_msg, false); adap 2045 drivers/media/cec/cec-adap.c if (adap->log_addrs.vendor_id == CEC_VENDOR_ID_NONE) adap 2046 drivers/media/cec/cec-adap.c return cec_feature_abort(adap, msg); adap 2047 drivers/media/cec/cec-adap.c cec_msg_device_vendor_id(&tx_cec_msg, adap->log_addrs.vendor_id); adap 2048 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_cec_msg, false); adap 2054 drivers/media/cec/cec-adap.c return cec_feature_refused(adap, msg); adap 2057 drivers/media/cec/cec-adap.c if (adap->log_addrs.osd_name[0] == 0) adap 2058 drivers/media/cec/cec-adap.c return cec_feature_abort(adap, msg); adap 2059 drivers/media/cec/cec-adap.c cec_msg_set_osd_name(&tx_cec_msg, adap->log_addrs.osd_name); adap 2060 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_cec_msg, false); adap 2064 drivers/media/cec/cec-adap.c if (adap->log_addrs.cec_version < CEC_OP_CEC_VERSION_2_0) adap 2065 drivers/media/cec/cec-adap.c return cec_feature_abort(adap, msg); adap 2066 drivers/media/cec/cec-adap.c cec_fill_msg_report_features(adap, &tx_cec_msg, la_idx); adap 2067 drivers/media/cec/cec-adap.c return cec_transmit_msg(adap, &tx_cec_msg, false); adap 2074 drivers/media/cec/cec-adap.c if (!is_broadcast && !is_reply && !adap->follower_cnt && adap 2075 drivers/media/cec/cec-adap.c !adap->cec_follower && msg->msg[1] != CEC_MSG_FEATURE_ABORT) adap 2076 drivers/media/cec/cec-adap.c return cec_feature_abort(adap, msg); adap 2089 drivers/media/cec/cec-adap.c if (adap->cec_follower) adap 2090 drivers/media/cec/cec-adap.c cec_queue_msg_fh(adap->cec_follower, msg); adap 2092 drivers/media/cec/cec-adap.c cec_queue_msg_followers(adap, msg); adap 2101 drivers/media/cec/cec-adap.c int cec_monitor_all_cnt_inc(struct cec_adapter *adap) adap 2105 drivers/media/cec/cec-adap.c if (adap->monitor_all_cnt == 0) adap 2106 drivers/media/cec/cec-adap.c ret = call_op(adap, adap_monitor_all_enable, 1); adap 2108 drivers/media/cec/cec-adap.c adap->monitor_all_cnt++; adap 2112 drivers/media/cec/cec-adap.c void cec_monitor_all_cnt_dec(struct cec_adapter *adap) adap 2114 drivers/media/cec/cec-adap.c adap->monitor_all_cnt--; adap 2115 drivers/media/cec/cec-adap.c if (adap->monitor_all_cnt == 0) adap 2116 drivers/media/cec/cec-adap.c WARN_ON(call_op(adap, adap_monitor_all_enable, 0)); adap 2124 drivers/media/cec/cec-adap.c int cec_monitor_pin_cnt_inc(struct cec_adapter *adap) adap 2128 drivers/media/cec/cec-adap.c if (adap->monitor_pin_cnt == 0) adap 2129 drivers/media/cec/cec-adap.c ret = call_op(adap, adap_monitor_pin_enable, 1); adap 2131 drivers/media/cec/cec-adap.c adap->monitor_pin_cnt++; adap 2135 drivers/media/cec/cec-adap.c void cec_monitor_pin_cnt_dec(struct cec_adapter *adap) adap 2137 drivers/media/cec/cec-adap.c adap->monitor_pin_cnt--; adap 2138 drivers/media/cec/cec-adap.c if (adap->monitor_pin_cnt == 0) adap 2139 drivers/media/cec/cec-adap.c WARN_ON(call_op(adap, adap_monitor_pin_enable, 0)); adap 2149 drivers/media/cec/cec-adap.c struct cec_adapter *adap = dev_get_drvdata(file->private); adap 2152 drivers/media/cec/cec-adap.c mutex_lock(&adap->lock); adap 2153 drivers/media/cec/cec-adap.c seq_printf(file, "configured: %d\n", adap->is_configured); adap 2154 drivers/media/cec/cec-adap.c seq_printf(file, "configuring: %d\n", adap->is_configuring); adap 2156 drivers/media/cec/cec-adap.c cec_phys_addr_exp(adap->phys_addr)); adap 2157 drivers/media/cec/cec-adap.c seq_printf(file, "number of LAs: %d\n", adap->log_addrs.num_log_addrs); adap 2158 drivers/media/cec/cec-adap.c seq_printf(file, "LA mask: 0x%04x\n", adap->log_addrs.log_addr_mask); adap 2159 drivers/media/cec/cec-adap.c if (adap->cec_follower) adap 2161 drivers/media/cec/cec-adap.c adap->passthrough ? " (in passthrough mode)" : ""); adap 2162 drivers/media/cec/cec-adap.c if (adap->cec_initiator) adap 2164 drivers/media/cec/cec-adap.c if (adap->monitor_all_cnt) adap 2166 drivers/media/cec/cec-adap.c adap->monitor_all_cnt); adap 2167 drivers/media/cec/cec-adap.c if (adap->tx_timeouts) { adap 2169 drivers/media/cec/cec-adap.c adap->tx_timeouts); adap 2170 drivers/media/cec/cec-adap.c adap->tx_timeouts = 0; adap 2172 drivers/media/cec/cec-adap.c data = adap->transmitting; adap 2177 drivers/media/cec/cec-adap.c seq_printf(file, "pending transmits: %u\n", adap->transmit_queue_sz); adap 2178 drivers/media/cec/cec-adap.c list_for_each_entry(data, &adap->transmit_queue, list) { adap 2183 drivers/media/cec/cec-adap.c list_for_each_entry(data, &adap->wait_queue, list) { adap 2189 drivers/media/cec/cec-adap.c call_void_op(adap, adap_status, file); adap 2190 drivers/media/cec/cec-adap.c mutex_unlock(&adap->lock); adap 29 drivers/media/cec/cec-api.c return &fh->adap->devnode; adap 38 drivers/media/cec/cec-api.c struct cec_adapter *adap = fh->adap; adap 42 drivers/media/cec/cec-api.c if (!cec_is_registered(adap)) adap 44 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 45 drivers/media/cec/cec-api.c if (adap->is_configured && adap 46 drivers/media/cec/cec-api.c adap->transmit_queue_sz < CEC_MAX_MSG_TX_QUEUE_SZ) adap 52 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 56 drivers/media/cec/cec-api.c static bool cec_is_busy(const struct cec_adapter *adap, adap 59 drivers/media/cec/cec-api.c bool valid_initiator = adap->cec_initiator && adap->cec_initiator == fh; adap 60 drivers/media/cec/cec-api.c bool valid_follower = adap->cec_follower && adap->cec_follower == fh; adap 71 drivers/media/cec/cec-api.c return adap->cec_initiator || adap 75 drivers/media/cec/cec-api.c static long cec_adap_g_caps(struct cec_adapter *adap, adap 80 drivers/media/cec/cec-api.c strscpy(caps.driver, adap->devnode.dev.parent->driver->name, adap 82 drivers/media/cec/cec-api.c strscpy(caps.name, adap->name, sizeof(caps.name)); adap 83 drivers/media/cec/cec-api.c caps.available_log_addrs = adap->available_log_addrs; adap 84 drivers/media/cec/cec-api.c caps.capabilities = adap->capabilities; adap 91 drivers/media/cec/cec-api.c static long cec_adap_g_phys_addr(struct cec_adapter *adap, adap 96 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 97 drivers/media/cec/cec-api.c phys_addr = adap->phys_addr; adap 98 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 121 drivers/media/cec/cec-api.c static long cec_adap_s_phys_addr(struct cec_adapter *adap, struct cec_fh *fh, adap 127 drivers/media/cec/cec-api.c if (!(adap->capabilities & CEC_CAP_PHYS_ADDR)) adap 135 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 136 drivers/media/cec/cec-api.c if (cec_is_busy(adap, fh)) adap 139 drivers/media/cec/cec-api.c __cec_s_phys_addr(adap, phys_addr, block); adap 140 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 144 drivers/media/cec/cec-api.c static long cec_adap_g_log_addrs(struct cec_adapter *adap, adap 149 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 150 drivers/media/cec/cec-api.c log_addrs = adap->log_addrs; adap 151 drivers/media/cec/cec-api.c if (!adap->is_configured) adap 154 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 161 drivers/media/cec/cec-api.c static long cec_adap_s_log_addrs(struct cec_adapter *adap, struct cec_fh *fh, adap 167 drivers/media/cec/cec-api.c if (!(adap->capabilities & CEC_CAP_LOG_ADDRS)) adap 174 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 175 drivers/media/cec/cec-api.c if (!adap->is_configuring && adap 176 drivers/media/cec/cec-api.c (!log_addrs.num_log_addrs || !adap->is_configured) && adap 177 drivers/media/cec/cec-api.c !cec_is_busy(adap, fh)) { adap 178 drivers/media/cec/cec-api.c err = __cec_s_log_addrs(adap, &log_addrs, block); adap 180 drivers/media/cec/cec-api.c log_addrs = adap->log_addrs; adap 182 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 190 drivers/media/cec/cec-api.c static long cec_transmit(struct cec_adapter *adap, struct cec_fh *fh, adap 196 drivers/media/cec/cec-api.c if (!(adap->capabilities & CEC_CAP_TRANSMIT)) adap 201 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 202 drivers/media/cec/cec-api.c if (adap->log_addrs.num_log_addrs == 0) adap 204 drivers/media/cec/cec-api.c else if (adap->is_configuring) adap 206 drivers/media/cec/cec-api.c else if (cec_is_busy(adap, fh)) adap 209 drivers/media/cec/cec-api.c err = cec_transmit_msg_fh(adap, &msg, fh, block); adap 210 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 269 drivers/media/cec/cec-api.c static long cec_receive(struct cec_adapter *adap, struct cec_fh *fh, adap 287 drivers/media/cec/cec-api.c static long cec_dqevent(struct cec_adapter *adap, struct cec_fh *fh, adap 337 drivers/media/cec/cec-api.c static long cec_g_mode(struct cec_adapter *adap, struct cec_fh *fh, adap 347 drivers/media/cec/cec-api.c static long cec_s_mode(struct cec_adapter *adap, struct cec_fh *fh, adap 373 drivers/media/cec/cec-api.c !(adap->capabilities & CEC_CAP_MONITOR_ALL)) { adap 379 drivers/media/cec/cec-api.c !(adap->capabilities & CEC_CAP_MONITOR_PIN)) { adap 386 drivers/media/cec/cec-api.c !(adap->capabilities & CEC_CAP_TRANSMIT)) && adap 404 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 411 drivers/media/cec/cec-api.c adap->cec_follower && adap->cec_follower != fh) adap 418 drivers/media/cec/cec-api.c adap->cec_initiator && adap->cec_initiator != fh) adap 427 drivers/media/cec/cec-api.c err = cec_monitor_all_cnt_inc(adap); adap 429 drivers/media/cec/cec-api.c cec_monitor_all_cnt_dec(adap); adap 440 drivers/media/cec/cec-api.c err = cec_monitor_pin_cnt_inc(adap); adap 442 drivers/media/cec/cec-api.c cec_monitor_pin_cnt_dec(adap); adap 447 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 452 drivers/media/cec/cec-api.c adap->follower_cnt--; adap 454 drivers/media/cec/cec-api.c adap->follower_cnt++; adap 460 drivers/media/cec/cec-api.c ev.event = adap->cec_pin_is_high ? CEC_EVENT_PIN_CEC_HIGH : adap 466 drivers/media/cec/cec-api.c adap->passthrough = adap 468 drivers/media/cec/cec-api.c adap->cec_follower = fh; adap 469 drivers/media/cec/cec-api.c } else if (adap->cec_follower == fh) { adap 470 drivers/media/cec/cec-api.c adap->passthrough = false; adap 471 drivers/media/cec/cec-api.c adap->cec_follower = NULL; adap 474 drivers/media/cec/cec-api.c adap->cec_initiator = fh; adap 475 drivers/media/cec/cec-api.c else if (adap->cec_initiator == fh) adap 476 drivers/media/cec/cec-api.c adap->cec_initiator = NULL; adap 479 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 486 drivers/media/cec/cec-api.c struct cec_adapter *adap = fh->adap; adap 490 drivers/media/cec/cec-api.c if (!cec_is_registered(adap)) adap 495 drivers/media/cec/cec-api.c return cec_adap_g_caps(adap, parg); adap 498 drivers/media/cec/cec-api.c return cec_adap_g_phys_addr(adap, parg); adap 501 drivers/media/cec/cec-api.c return cec_adap_s_phys_addr(adap, fh, block, parg); adap 504 drivers/media/cec/cec-api.c return cec_adap_g_log_addrs(adap, parg); adap 507 drivers/media/cec/cec-api.c return cec_adap_s_log_addrs(adap, fh, block, parg); adap 510 drivers/media/cec/cec-api.c return cec_transmit(adap, fh, block, parg); adap 513 drivers/media/cec/cec-api.c return cec_receive(adap, fh, block, parg); adap 516 drivers/media/cec/cec-api.c return cec_dqevent(adap, fh, block, parg); adap 519 drivers/media/cec/cec-api.c return cec_g_mode(adap, fh, parg); adap 522 drivers/media/cec/cec-api.c return cec_s_mode(adap, fh, parg); adap 533 drivers/media/cec/cec-api.c struct cec_adapter *adap = to_cec_adapter(devnode); adap 557 drivers/media/cec/cec-api.c fh->adap = adap; adap 567 drivers/media/cec/cec-api.c !adap->needs_hpd && adap 568 drivers/media/cec/cec-api.c adap->phys_addr == CEC_PHYS_ADDR_INVALID) { adap 569 drivers/media/cec/cec-api.c err = adap->ops->adap_enable(adap, true); adap 579 drivers/media/cec/cec-api.c ev.state_change.phys_addr = adap->phys_addr; adap 580 drivers/media/cec/cec-api.c ev.state_change.log_addr_mask = adap->log_addrs.log_addr_mask; adap 583 drivers/media/cec/cec-api.c if (adap->pin && adap->pin->ops->read_hpd) { adap 584 drivers/media/cec/cec-api.c err = adap->pin->ops->read_hpd(adap); adap 591 drivers/media/cec/cec-api.c if (adap->pin && adap->pin->ops->read_5v) { adap 592 drivers/media/cec/cec-api.c err = adap->pin->ops->read_5v(adap); adap 611 drivers/media/cec/cec-api.c struct cec_adapter *adap = to_cec_adapter(devnode); adap 615 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 616 drivers/media/cec/cec-api.c if (adap->cec_initiator == fh) adap 617 drivers/media/cec/cec-api.c adap->cec_initiator = NULL; adap 618 drivers/media/cec/cec-api.c if (adap->cec_follower == fh) { adap 619 drivers/media/cec/cec-api.c adap->cec_follower = NULL; adap 620 drivers/media/cec/cec-api.c adap->passthrough = false; adap 623 drivers/media/cec/cec-api.c adap->follower_cnt--; adap 625 drivers/media/cec/cec-api.c cec_monitor_pin_cnt_dec(adap); adap 627 drivers/media/cec/cec-api.c cec_monitor_all_cnt_dec(adap); adap 628 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 632 drivers/media/cec/cec-api.c if (cec_is_registered(adap) && list_empty(&devnode->fhs) && adap 633 drivers/media/cec/cec-api.c !adap->needs_hpd && adap->phys_addr == CEC_PHYS_ADDR_INVALID) { adap 634 drivers/media/cec/cec-api.c WARN_ON(adap->ops->adap_enable(adap, false)); adap 639 drivers/media/cec/cec-api.c mutex_lock(&adap->lock); adap 648 drivers/media/cec/cec-api.c mutex_unlock(&adap->lock); adap 157 drivers/media/cec/cec-core.c static void cec_devnode_unregister(struct cec_adapter *adap) adap 159 drivers/media/cec/cec-core.c struct cec_devnode *devnode = &adap->devnode; adap 177 drivers/media/cec/cec-core.c mutex_lock(&adap->lock); adap 178 drivers/media/cec/cec-core.c __cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false); adap 179 drivers/media/cec/cec-core.c __cec_s_log_addrs(adap, NULL, false); adap 180 drivers/media/cec/cec-core.c mutex_unlock(&adap->lock); adap 187 drivers/media/cec/cec-core.c static void cec_cec_notify(struct cec_adapter *adap, u16 pa) adap 189 drivers/media/cec/cec-core.c cec_s_phys_addr(adap, pa, false); adap 192 drivers/media/cec/cec-core.c void cec_register_cec_notifier(struct cec_adapter *adap, adap 195 drivers/media/cec/cec-core.c if (WARN_ON(!cec_is_registered(adap))) adap 198 drivers/media/cec/cec-core.c adap->notifier = notifier; adap 199 drivers/media/cec/cec-core.c cec_notifier_register(adap->notifier, adap, cec_cec_notify); adap 209 drivers/media/cec/cec-core.c struct cec_adapter *adap = sf->private; adap 223 drivers/media/cec/cec-core.c if (!adap->ops->error_inj_parse_line(adap, line)) { adap 234 drivers/media/cec/cec-core.c struct cec_adapter *adap = sf->private; adap 236 drivers/media/cec/cec-core.c return adap->ops->error_inj_show(adap, sf); adap 257 drivers/media/cec/cec-core.c struct cec_adapter *adap; adap 275 drivers/media/cec/cec-core.c adap = kzalloc(sizeof(*adap), GFP_KERNEL); adap 276 drivers/media/cec/cec-core.c if (!adap) adap 278 drivers/media/cec/cec-core.c strscpy(adap->name, name, sizeof(adap->name)); adap 279 drivers/media/cec/cec-core.c adap->phys_addr = CEC_PHYS_ADDR_INVALID; adap 280 drivers/media/cec/cec-core.c adap->cec_pin_is_high = true; adap 281 drivers/media/cec/cec-core.c adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0; adap 282 drivers/media/cec/cec-core.c adap->log_addrs.vendor_id = CEC_VENDOR_ID_NONE; adap 283 drivers/media/cec/cec-core.c adap->capabilities = caps; adap 285 drivers/media/cec/cec-core.c adap->capabilities |= CEC_CAP_PHYS_ADDR; adap 286 drivers/media/cec/cec-core.c adap->needs_hpd = caps & CEC_CAP_NEEDS_HPD; adap 287 drivers/media/cec/cec-core.c adap->available_log_addrs = available_las; adap 288 drivers/media/cec/cec-core.c adap->sequence = 0; adap 289 drivers/media/cec/cec-core.c adap->ops = ops; adap 290 drivers/media/cec/cec-core.c adap->priv = priv; adap 291 drivers/media/cec/cec-core.c memset(adap->phys_addrs, 0xff, sizeof(adap->phys_addrs)); adap 292 drivers/media/cec/cec-core.c mutex_init(&adap->lock); adap 293 drivers/media/cec/cec-core.c INIT_LIST_HEAD(&adap->transmit_queue); adap 294 drivers/media/cec/cec-core.c INIT_LIST_HEAD(&adap->wait_queue); adap 295 drivers/media/cec/cec-core.c init_waitqueue_head(&adap->kthread_waitq); adap 298 drivers/media/cec/cec-core.c INIT_LIST_HEAD(&adap->devnode.fhs); adap 299 drivers/media/cec/cec-core.c mutex_init(&adap->devnode.lock); adap 301 drivers/media/cec/cec-core.c adap->kthread = kthread_run(cec_thread_func, adap, "cec-%s", name); adap 302 drivers/media/cec/cec-core.c if (IS_ERR(adap->kthread)) { adap 304 drivers/media/cec/cec-core.c res = PTR_ERR(adap->kthread); adap 305 drivers/media/cec/cec-core.c kfree(adap); adap 311 drivers/media/cec/cec-core.c return adap; adap 314 drivers/media/cec/cec-core.c adap->rc = rc_allocate_device(RC_DRIVER_SCANCODE); adap 315 drivers/media/cec/cec-core.c if (!adap->rc) { adap 318 drivers/media/cec/cec-core.c kthread_stop(adap->kthread); adap 319 drivers/media/cec/cec-core.c kfree(adap); adap 323 drivers/media/cec/cec-core.c snprintf(adap->input_phys, sizeof(adap->input_phys), adap 324 drivers/media/cec/cec-core.c "%s/input0", adap->name); adap 326 drivers/media/cec/cec-core.c adap->rc->device_name = adap->name; adap 327 drivers/media/cec/cec-core.c adap->rc->input_phys = adap->input_phys; adap 328 drivers/media/cec/cec-core.c adap->rc->input_id.bustype = BUS_CEC; adap 329 drivers/media/cec/cec-core.c adap->rc->input_id.vendor = 0; adap 330 drivers/media/cec/cec-core.c adap->rc->input_id.product = 0; adap 331 drivers/media/cec/cec-core.c adap->rc->input_id.version = 1; adap 332 drivers/media/cec/cec-core.c adap->rc->driver_name = CEC_NAME; adap 333 drivers/media/cec/cec-core.c adap->rc->allowed_protocols = RC_PROTO_BIT_CEC; adap 334 drivers/media/cec/cec-core.c adap->rc->priv = adap; adap 335 drivers/media/cec/cec-core.c adap->rc->map_name = RC_MAP_CEC; adap 336 drivers/media/cec/cec-core.c adap->rc->timeout = MS_TO_NS(550); adap 338 drivers/media/cec/cec-core.c return adap; adap 342 drivers/media/cec/cec-core.c int cec_register_adapter(struct cec_adapter *adap, adap 347 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap)) adap 353 drivers/media/cec/cec-core.c adap->owner = parent->driver->owner; adap 354 drivers/media/cec/cec-core.c adap->devnode.dev.parent = parent; adap 357 drivers/media/cec/cec-core.c if (adap->capabilities & CEC_CAP_RC) { adap 358 drivers/media/cec/cec-core.c adap->rc->dev.parent = parent; adap 359 drivers/media/cec/cec-core.c res = rc_register_device(adap->rc); adap 363 drivers/media/cec/cec-core.c adap->name); adap 364 drivers/media/cec/cec-core.c rc_free_device(adap->rc); adap 365 drivers/media/cec/cec-core.c adap->rc = NULL; adap 371 drivers/media/cec/cec-core.c res = cec_devnode_register(&adap->devnode, adap->owner); adap 375 drivers/media/cec/cec-core.c rc_unregister_device(adap->rc); adap 376 drivers/media/cec/cec-core.c adap->rc = NULL; adap 381 drivers/media/cec/cec-core.c dev_set_drvdata(&adap->devnode.dev, adap); adap 386 drivers/media/cec/cec-core.c adap->cec_dir = debugfs_create_dir(dev_name(&adap->devnode.dev), top_cec_dir); adap 387 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap->cec_dir)) { adap 388 drivers/media/cec/cec-core.c pr_warn("cec-%s: Failed to create debugfs dir\n", adap->name); adap 391 drivers/media/cec/cec-core.c adap->status_file = debugfs_create_devm_seqfile(&adap->devnode.dev, adap 392 drivers/media/cec/cec-core.c "status", adap->cec_dir, cec_adap_status); adap 393 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap->status_file)) { adap 394 drivers/media/cec/cec-core.c pr_warn("cec-%s: Failed to create status file\n", adap->name); adap 395 drivers/media/cec/cec-core.c debugfs_remove_recursive(adap->cec_dir); adap 396 drivers/media/cec/cec-core.c adap->cec_dir = NULL; adap 399 drivers/media/cec/cec-core.c if (!adap->ops->error_inj_show || !adap->ops->error_inj_parse_line) adap 401 drivers/media/cec/cec-core.c adap->error_inj_file = debugfs_create_file("error-inj", 0644, adap 402 drivers/media/cec/cec-core.c adap->cec_dir, adap, adap 404 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap->error_inj_file)) adap 406 drivers/media/cec/cec-core.c adap->name); adap 412 drivers/media/cec/cec-core.c void cec_unregister_adapter(struct cec_adapter *adap) adap 414 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap)) adap 419 drivers/media/cec/cec-core.c rc_unregister_device(adap->rc); adap 420 drivers/media/cec/cec-core.c adap->rc = NULL; adap 422 drivers/media/cec/cec-core.c debugfs_remove_recursive(adap->cec_dir); adap 424 drivers/media/cec/cec-core.c if (adap->notifier) adap 425 drivers/media/cec/cec-core.c cec_notifier_unregister(adap->notifier); adap 427 drivers/media/cec/cec-core.c cec_devnode_unregister(adap); adap 431 drivers/media/cec/cec-core.c void cec_delete_adapter(struct cec_adapter *adap) adap 433 drivers/media/cec/cec-core.c if (IS_ERR_OR_NULL(adap)) adap 435 drivers/media/cec/cec-core.c kthread_stop(adap->kthread); adap 436 drivers/media/cec/cec-core.c if (adap->kthread_config) adap 437 drivers/media/cec/cec-core.c kthread_stop(adap->kthread_config); adap 438 drivers/media/cec/cec-core.c if (adap->ops->adap_free) adap 439 drivers/media/cec/cec-core.c adap->ops->adap_free(adap); adap 441 drivers/media/cec/cec-core.c rc_free_device(adap->rc); adap 443 drivers/media/cec/cec-core.c kfree(adap); adap 28 drivers/media/cec/cec-notifier.c void (*callback)(struct cec_adapter *adap, u16 pa); adap 135 drivers/media/cec/cec-notifier.c struct cec_adapter *adap) adap 139 drivers/media/cec/cec-notifier.c if (WARN_ON(!adap)) adap 147 drivers/media/cec/cec-notifier.c n->cec_adap = adap; adap 148 drivers/media/cec/cec-notifier.c adap->conn_info = n->conn_info; adap 149 drivers/media/cec/cec-notifier.c adap->notifier = n; adap 150 drivers/media/cec/cec-notifier.c cec_s_phys_addr(adap, n->phys_addr, false); adap 201 drivers/media/cec/cec-notifier.c struct cec_adapter *adap, adap 202 drivers/media/cec/cec-notifier.c void (*callback)(struct cec_adapter *adap, u16 pa)) adap 206 drivers/media/cec/cec-notifier.c n->cec_adap = adap; adap 208 drivers/media/cec/cec-notifier.c n->callback(adap, n->phys_addr); adap 72 drivers/media/cec/cec-pin-error-inj.c bool cec_pin_error_inj_parse_line(struct cec_adapter *adap, char *line) adap 75 drivers/media/cec/cec-pin-error-inj.c struct cec_pin *pin = adap->pin; adap 262 drivers/media/cec/cec-pin-error-inj.c int cec_pin_error_inj_show(struct cec_adapter *adap, struct seq_file *sf) adap 264 drivers/media/cec/cec-pin-error-inj.c struct cec_pin *pin = adap->pin; adap 165 drivers/media/cec/cec-pin-priv.h struct cec_adapter *adap; adap 234 drivers/media/cec/cec-pin-priv.h bool cec_pin_error_inj_parse_line(struct cec_adapter *adap, char *line); adap 235 drivers/media/cec/cec-pin-priv.h int cec_pin_error_inj_show(struct cec_adapter *adap, struct seq_file *sf); adap 113 drivers/media/cec/cec-pin.c if (!force && v == pin->adap->cec_pin_is_high) adap 116 drivers/media/cec/cec-pin.c pin->adap->cec_pin_is_high = v; adap 138 drivers/media/cec/cec-pin.c bool v = pin->ops->read(pin->adap); adap 146 drivers/media/cec/cec-pin.c pin->ops->low(pin->adap); adap 152 drivers/media/cec/cec-pin.c pin->ops->high(pin->adap); adap 845 drivers/media/cec/cec-pin.c struct cec_adapter *adap = pin->adap; adap 864 drivers/media/cec/cec-pin.c if (adap->monitor_pin_cnt) adap 984 drivers/media/cec/cec-pin.c pin->enable_irq_failed || adap->is_configuring || adap 985 drivers/media/cec/cec-pin.c adap->is_configured || adap->monitor_all_cnt) adap 1019 drivers/media/cec/cec-pin.c if (!adap->monitor_pin_cnt || usecs <= 150) { adap 1034 drivers/media/cec/cec-pin.c struct cec_adapter *adap = _adap; adap 1035 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1059 drivers/media/cec/cec-pin.c cec_received_msg_ts(adap, msg, adap 1067 drivers/media/cec/cec-pin.c cec_transmit_attempt_done_ts(adap, tx_status, adap 1075 drivers/media/cec/cec-pin.c cec_queue_pin_cec_event(adap, adap 1086 drivers/media/cec/cec-pin.c pin->ops->disable_irq(adap); adap 1093 drivers/media/cec/cec-pin.c pin->enable_irq_failed = !pin->ops->enable_irq(adap); adap 1110 drivers/media/cec/cec-pin.c static int cec_pin_adap_enable(struct cec_adapter *adap, bool enable) adap 1112 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1124 drivers/media/cec/cec-pin.c pin->kthread = kthread_run(cec_pin_thread_func, adap, adap 1134 drivers/media/cec/cec-pin.c pin->ops->disable_irq(adap); adap 1144 drivers/media/cec/cec-pin.c static int cec_pin_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 1146 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1161 drivers/media/cec/cec-pin.c pin->ops->disable_irq(pin->adap); adap 1167 drivers/media/cec/cec-pin.c static int cec_pin_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 1170 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1198 drivers/media/cec/cec-pin.c static void cec_pin_adap_status(struct cec_adapter *adap, adap 1201 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1206 drivers/media/cec/cec-pin.c seq_printf(file, "cec pin: %d\n", pin->ops->read(adap)); adap 1260 drivers/media/cec/cec-pin.c pin->ops->status(adap, file); adap 1263 drivers/media/cec/cec-pin.c static int cec_pin_adap_monitor_all_enable(struct cec_adapter *adap, adap 1266 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1272 drivers/media/cec/cec-pin.c static void cec_pin_adap_free(struct cec_adapter *adap) adap 1274 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1277 drivers/media/cec/cec-pin.c pin->ops->free(adap); adap 1278 drivers/media/cec/cec-pin.c adap->pin = NULL; adap 1282 drivers/media/cec/cec-pin.c void cec_pin_changed(struct cec_adapter *adap, bool value) adap 1284 drivers/media/cec/cec-pin.c struct cec_pin *pin = adap->pin; adap 1287 drivers/media/cec/cec-pin.c if (!value && (adap->is_configuring || adap->is_configured || adap 1288 drivers/media/cec/cec-pin.c adap->monitor_all_cnt)) adap 1309 drivers/media/cec/cec-pin.c struct cec_adapter *adap; adap 1321 drivers/media/cec/cec-pin.c adap = cec_allocate_adapter(&cec_pin_adap_ops, priv, name, adap 1325 drivers/media/cec/cec-pin.c if (IS_ERR(adap)) { adap 1327 drivers/media/cec/cec-pin.c return adap; adap 1330 drivers/media/cec/cec-pin.c adap->pin = pin; adap 1331 drivers/media/cec/cec-pin.c pin->adap = adap; adap 1333 drivers/media/cec/cec-pin.c return adap; adap 17 drivers/media/cec/cec-priv.h pr_info("cec-%s: " fmt, adap->name, ## arg); \ adap 34 drivers/media/cec/cec-priv.h int cec_monitor_all_cnt_inc(struct cec_adapter *adap); adap 35 drivers/media/cec/cec-priv.h void cec_monitor_all_cnt_dec(struct cec_adapter *adap); adap 36 drivers/media/cec/cec-priv.h int cec_monitor_pin_cnt_inc(struct cec_adapter *adap); adap 37 drivers/media/cec/cec-priv.h void cec_monitor_pin_cnt_dec(struct cec_adapter *adap); adap 40 drivers/media/cec/cec-priv.h void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block); adap 41 drivers/media/cec/cec-priv.h int __cec_s_log_addrs(struct cec_adapter *adap, adap 43 drivers/media/cec/cec-priv.h int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg, adap 1605 drivers/media/dvb-core/dvb_net.c int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet, adap 1616 drivers/media/dvb-core/dvb_net.c return dvb_register_device(adap, &dvbnet->dvbdev, &dvbdev_net, adap 195 drivers/media/dvb-core/dvbdev.c static int dvbdev_get_free_id (struct dvb_adapter *adap, int type) adap 201 drivers/media/dvb-core/dvbdev.c list_for_each_entry(dev, &adap->device_list, list_head) adap 455 drivers/media/dvb-core/dvbdev.c int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, adap 467 drivers/media/dvb-core/dvbdev.c if ((id = dvbdev_get_free_id (adap, type)) < 0){ adap 492 drivers/media/dvb-core/dvbdev.c dvbdev->adapter = adap; adap 497 drivers/media/dvb-core/dvbdev.c dvbdevfops->owner = adap->module; adap 499 drivers/media/dvb-core/dvbdev.c list_add_tail (&dvbdev->list_head, &adap->device_list); adap 515 drivers/media/dvb-core/dvbdev.c minor = nums2minor(adap->num, type, id); adap 536 drivers/media/dvb-core/dvbdev.c clsdev = device_create(dvb_class, adap->device, adap 538 drivers/media/dvb-core/dvbdev.c dvbdev, "dvb%d.%s%d", adap->num, dnames[type], id); adap 541 drivers/media/dvb-core/dvbdev.c __func__, adap->num, dnames[type], id, PTR_ERR(clsdev)); adap 545 drivers/media/dvb-core/dvbdev.c adap->num, dnames[type], id, minor, minor); adap 591 drivers/media/dvb-core/dvbdev.c static int dvb_create_io_intf_links(struct dvb_adapter *adap, adap 595 drivers/media/dvb-core/dvbdev.c struct media_device *mdev = adap->mdev; adap 613 drivers/media/dvb-core/dvbdev.c int dvb_create_media_graph(struct dvb_adapter *adap, adap 616 drivers/media/dvb-core/dvbdev.c struct media_device *mdev = adap->mdev; adap 665 drivers/media/dvb-core/dvbdev.c adap->conn = conn; adap 667 drivers/media/dvb-core/dvbdev.c adap->conn_pads = kzalloc(sizeof(*adap->conn_pads), GFP_KERNEL); adap 668 drivers/media/dvb-core/dvbdev.c if (!adap->conn_pads) adap 674 drivers/media/dvb-core/dvbdev.c adap->conn_pads->flags = MEDIA_PAD_FL_SOURCE; adap 676 drivers/media/dvb-core/dvbdev.c ret = media_entity_pads_init(conn, 1, adap->conn_pads); adap 797 drivers/media/dvb-core/dvbdev.c ret = dvb_create_io_intf_links(adap, intf, DVR_TSOUT); adap 802 drivers/media/dvb-core/dvbdev.c ret = dvb_create_io_intf_links(adap, intf, DEMUX_TSOUT); adap 816 drivers/media/dvb-core/dvbdev.c struct dvb_adapter *adap; adap 817 drivers/media/dvb-core/dvbdev.c adap = list_entry(entry, struct dvb_adapter, list_head); adap 818 drivers/media/dvb-core/dvbdev.c if (adap->num == num) adap 838 drivers/media/dvb-core/dvbdev.c int dvb_register_adapter(struct dvb_adapter *adap, const char *name, adap 864 drivers/media/dvb-core/dvbdev.c memset (adap, 0, sizeof(struct dvb_adapter)); adap 865 drivers/media/dvb-core/dvbdev.c INIT_LIST_HEAD (&adap->device_list); adap 869 drivers/media/dvb-core/dvbdev.c adap->num = num; adap 870 drivers/media/dvb-core/dvbdev.c adap->name = name; adap 871 drivers/media/dvb-core/dvbdev.c adap->module = module; adap 872 drivers/media/dvb-core/dvbdev.c adap->device = device; adap 873 drivers/media/dvb-core/dvbdev.c adap->mfe_shared = 0; adap 874 drivers/media/dvb-core/dvbdev.c adap->mfe_dvbdev = NULL; adap 875 drivers/media/dvb-core/dvbdev.c mutex_init (&adap->mfe_lock); adap 878 drivers/media/dvb-core/dvbdev.c mutex_init(&adap->mdev_lock); adap 881 drivers/media/dvb-core/dvbdev.c list_add_tail (&adap->list_head, &dvb_adapter_list); adap 890 drivers/media/dvb-core/dvbdev.c int dvb_unregister_adapter(struct dvb_adapter *adap) adap 893 drivers/media/dvb-core/dvbdev.c list_del (&adap->list_head); adap 967 drivers/media/dvb-core/dvbdev.c struct i2c_adapter *adap, adap 986 drivers/media/dvb-core/dvbdev.c client = i2c_new_device(adap, board_info); adap 41 drivers/media/dvb-frontends/dib8000.c struct i2c_adapter *adap; adap 163 drivers/media/dvb-frontends/dib8000.c if (i2c_transfer(i2c->adap, msg, 2) != 2) adap 188 drivers/media/dvb-frontends/dib8000.c if (i2c_transfer(state->i2c.adap, state->msg, 2) != 2) adap 245 drivers/media/dvb-frontends/dib8000.c ret = i2c_transfer(i2c->adap, &msg, 1) != 1 ? -EREMOTEIO : 0; adap 271 drivers/media/dvb-frontends/dib8000.c ret = (i2c_transfer(state->i2c.adap, state->msg, 1) != 1 ? adap 4269 drivers/media/dvb-frontends/dib8000.c struct i2c_device client = {.adap = host }; adap 4431 drivers/media/dvb-frontends/dib8000.c state->i2c.adap = i2c_adap; adap 4455 drivers/media/dvb-frontends/dib8000.c dibx000_init_i2c_master(&state->i2c_master, DIB8000, state->i2c.adap, state->i2c.addr); adap 4462 drivers/media/dvb-frontends/dib8000.c state->dib8096p_tuner_adap.dev.parent = state->i2c.adap->dev.parent; adap 189 drivers/media/dvb-frontends/drxd_hard.c static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 * data, int len) adap 193 drivers/media/dvb-frontends/drxd_hard.c if (i2c_transfer(adap, &msg, 1) != 1) adap 198 drivers/media/dvb-frontends/drxd_hard.c static int i2c_read(struct i2c_adapter *adap, adap 210 drivers/media/dvb-frontends/drxd_hard.c if (i2c_transfer(adap, msgs, 2) != 2) adap 130 drivers/media/dvb-frontends/mxl5xx.c static int i2c_write(struct i2c_adapter *adap, u8 adr, adap 136 drivers/media/dvb-frontends/mxl5xx.c return (i2c_transfer(adap, &msg, 1) == 1) ? 0 : -1; adap 139 drivers/media/dvb-frontends/mxl5xx.c static int i2c_read(struct i2c_adapter *adap, u8 adr, adap 145 drivers/media/dvb-frontends/mxl5xx.c return (i2c_transfer(adap, &msg, 1) == 1) ? 0 : -1; adap 21 drivers/media/dvb-frontends/sp2.c struct i2c_adapter *adap = client->adapter; adap 36 drivers/media/dvb-frontends/sp2.c ret = i2c_transfer(adap, msg, 2); adap 58 drivers/media/dvb-frontends/sp2.c struct i2c_adapter *adap = client->adapter; adap 75 drivers/media/dvb-frontends/sp2.c ret = i2c_transfer(adap, &msg, 1); adap 143 drivers/media/dvb-frontends/stv0910.c struct i2c_adapter *adap = state->base->i2c; adap 148 drivers/media/dvb-frontends/stv0910.c if (i2c_transfer(adap, &msg, 1) != 1) { adap 149 drivers/media/dvb-frontends/stv0910.c dev_warn(&adap->dev, "i2c write error ([%02x] %04x: %02x)\n", adap 304 drivers/media/dvb-frontends/stv6111.c static int i2c_read(struct i2c_adapter *adap, adap 311 drivers/media/dvb-frontends/stv6111.c if (i2c_transfer(adap, msgs, 2) != 2) { adap 312 drivers/media/dvb-frontends/stv6111.c dev_err(&adap->dev, "i2c read error\n"); adap 318 drivers/media/dvb-frontends/stv6111.c static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len) adap 323 drivers/media/dvb-frontends/stv6111.c if (i2c_transfer(adap, &msg, 1) != 1) { adap 324 drivers/media/dvb-frontends/stv6111.c dev_err(&adap->dev, "i2c write error\n"); adap 634 drivers/media/dvb-frontends/tc90522.c tc90522_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 654 drivers/media/dvb-frontends/tc90522.c state = i2c_get_adapdata(adap); adap 698 drivers/media/dvb-frontends/tc90522.c static u32 tc90522_functionality(struct i2c_adapter *adap) adap 765 drivers/media/dvb-frontends/tc90522.c struct i2c_adapter *adap; adap 780 drivers/media/dvb-frontends/tc90522.c adap = &state->tuner_i2c; adap 781 drivers/media/dvb-frontends/tc90522.c adap->owner = THIS_MODULE; adap 782 drivers/media/dvb-frontends/tc90522.c adap->algo = &tc90522_tuner_i2c_algo; adap 783 drivers/media/dvb-frontends/tc90522.c adap->dev.parent = &client->dev; adap 784 drivers/media/dvb-frontends/tc90522.c strscpy(adap->name, "tc90522_sub", sizeof(adap->name)); adap 785 drivers/media/dvb-frontends/tc90522.c i2c_set_adapdata(adap, state); adap 786 drivers/media/dvb-frontends/tc90522.c ret = i2c_add_adapter(adap); adap 789 drivers/media/dvb-frontends/tc90522.c cfg->tuner_i2c = state->cfg.tuner_i2c = adap; adap 112 drivers/media/dvb-frontends/tda18271c2dd.c static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len) adap 117 drivers/media/dvb-frontends/tda18271c2dd.c if (i2c_transfer(adap, &msg, 1) != 1) { adap 728 drivers/media/i2c/adv7511-v4l2.c static int adv7511_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 730 drivers/media/i2c/adv7511-v4l2.c struct adv7511_state *state = cec_get_drvdata(adap); adap 763 drivers/media/i2c/adv7511-v4l2.c static int adv7511_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 765 drivers/media/i2c/adv7511-v4l2.c struct adv7511_state *state = cec_get_drvdata(adap); adap 817 drivers/media/i2c/adv7511-v4l2.c static int adv7511_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 820 drivers/media/i2c/adv7511-v4l2.c struct adv7511_state *state = cec_get_drvdata(adap); adap 2054 drivers/media/i2c/adv7604.c static int adv76xx_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 2056 drivers/media/i2c/adv7604.c struct adv76xx_state *state = cec_get_drvdata(adap); adap 2085 drivers/media/i2c/adv7604.c static int adv76xx_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 2087 drivers/media/i2c/adv7604.c struct adv76xx_state *state = cec_get_drvdata(adap); adap 2139 drivers/media/i2c/adv7604.c static int adv76xx_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 2142 drivers/media/i2c/adv7604.c struct adv76xx_state *state = cec_get_drvdata(adap); adap 2249 drivers/media/i2c/adv7842.c static int adv7842_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 2251 drivers/media/i2c/adv7842.c struct adv7842_state *state = cec_get_drvdata(adap); adap 2278 drivers/media/i2c/adv7842.c static int adv7842_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 2280 drivers/media/i2c/adv7842.c struct adv7842_state *state = cec_get_drvdata(adap); adap 2332 drivers/media/i2c/adv7842.c static int adv7842_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 2335 drivers/media/i2c/adv7842.c struct adv7842_state *state = cec_get_drvdata(adap); adap 730 drivers/media/i2c/ir-kbd-i2c.c struct i2c_adapter *adap = client->adapter; adap 860 drivers/media/i2c/ir-kbd-i2c.c snprintf(ir->phys, sizeof(ir->phys), "%s/%s", dev_name(&adap->dev), adap 89 drivers/media/i2c/saa717x.c struct i2c_adapter *adap = client->adapter; adap 109 drivers/media/i2c/saa717x.c return i2c_transfer(adap, &msg, 1) == 1; adap 123 drivers/media/i2c/saa717x.c struct i2c_adapter *adap = client->adapter; adap 139 drivers/media/i2c/saa717x.c i2c_transfer(adap, msgs, 2); adap 855 drivers/media/i2c/tc358743.c static int tc358743_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 857 drivers/media/i2c/tc358743.c struct tc358743_state *state = adap->priv; adap 868 drivers/media/i2c/tc358743.c static int tc358743_cec_adap_monitor_all_enable(struct cec_adapter *adap, adap 871 drivers/media/i2c/tc358743.c struct tc358743_state *state = adap->priv; adap 884 drivers/media/i2c/tc358743.c static int tc358743_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 886 drivers/media/i2c/tc358743.c struct tc358743_state *state = adap->priv; adap 898 drivers/media/i2c/tc358743.c static int tc358743_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 901 drivers/media/i2c/tc358743.c struct tc358743_state *state = adap->priv; adap 100 drivers/media/pci/bt8xx/bttv-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 108 drivers/media/pci/cobalt/cobalt-i2c.c struct i2c_adapter *adap, bool start, bool stop, adap 141 drivers/media/pci/cobalt/cobalt-i2c.c if (time_after(jiffies, start_time + adap->timeout)) adap 166 drivers/media/pci/cobalt/cobalt-i2c.c struct i2c_adapter *adap, bool start, bool stop, adap 200 drivers/media/pci/cobalt/cobalt-i2c.c if (time_after(jiffies, start_time + adap->timeout)) adap 223 drivers/media/pci/cobalt/cobalt-i2c.c struct i2c_adapter *adap) adap 227 drivers/media/pci/cobalt/cobalt-i2c.c return cobalt_tx_bytes(regs, adap, true, true, &data, 1); adap 230 drivers/media/pci/cobalt/cobalt-i2c.c static int cobalt_xfer(struct i2c_adapter *adap, adap 233 drivers/media/pci/cobalt/cobalt-i2c.c struct cobalt_i2c_data *data = adap->algo_data; adap 253 drivers/media/pci/cobalt/cobalt-i2c.c for (j = 0; j < adap->retries; j++) { adap 254 drivers/media/pci/cobalt/cobalt-i2c.c ret = cobalt_tx_bytes(regs, adap, true, false, adap 258 drivers/media/pci/cobalt/cobalt-i2c.c cobalt_stop(regs, adap); adap 266 drivers/media/pci/cobalt/cobalt-i2c.c ret = cobalt_rx_bytes(regs, adap, false, stop, adap 272 drivers/media/pci/cobalt/cobalt-i2c.c ret = cobalt_tx_bytes(regs, adap, false, stop, adap 282 drivers/media/pci/cobalt/cobalt-i2c.c cobalt_stop(regs, adap); adap 286 drivers/media/pci/cobalt/cobalt-i2c.c static u32 cobalt_func(struct i2c_adapter *adap) adap 320 drivers/media/pci/cobalt/cobalt-i2c.c struct i2c_adapter *adap = &cobalt->i2c_adap[i]; adap 331 drivers/media/pci/cobalt/cobalt-i2c.c adap->dev.parent = NULL; adap 351 drivers/media/pci/cobalt/cobalt-i2c.c *adap = cobalt_i2c_adap_template; adap 352 drivers/media/pci/cobalt/cobalt-i2c.c adap->algo = &cobalt_algo; adap 353 drivers/media/pci/cobalt/cobalt-i2c.c adap->algo_data = &cobalt->i2c_data[i]; adap 354 drivers/media/pci/cobalt/cobalt-i2c.c adap->retries = 3; adap 355 drivers/media/pci/cobalt/cobalt-i2c.c sprintf(adap->name + strlen(adap->name), adap 357 drivers/media/pci/cobalt/cobalt-i2c.c i2c_set_adapdata(adap, &cobalt->v4l2_dev); adap 358 drivers/media/pci/cobalt/cobalt-i2c.c adap->dev.parent = &cobalt->pci_dev->dev; adap 359 drivers/media/pci/cobalt/cobalt-i2c.c err = i2c_add_adapter(adap); adap 362 drivers/media/pci/cobalt/cobalt-i2c.c adap->dev.parent = NULL; adap 369 drivers/media/pci/cobalt/cobalt-i2c.c cobalt_info("registered bus %s\n", adap->name); adap 69 drivers/media/pci/cx18/cx18-i2c.c static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw, adap 91 drivers/media/pci/cx18/cx18-i2c.c return i2c_new_probed_device(adap, &info, addr_list, NULL) == NULL ? adap 99 drivers/media/pci/cx18/cx18-i2c.c struct i2c_adapter *adap = &cx->i2c_adap[bus]; adap 106 drivers/media/pci/cx18/cx18-i2c.c adap, type, 0, cx->card_i2c->radio); adap 110 drivers/media/pci/cx18/cx18-i2c.c adap, type, 0, cx->card_i2c->demod); adap 114 drivers/media/pci/cx18/cx18-i2c.c adap, type, 0, cx->card_i2c->tv); adap 121 drivers/media/pci/cx18/cx18-i2c.c return cx18_i2c_new_ir(cx, adap, hw, type, hw_addrs[idx]); adap 128 drivers/media/pci/cx18/cx18-i2c.c sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx], adap 244 drivers/media/pci/cx23885/cx23885-i2c.c static u32 cx23885_functionality(struct i2c_adapter *adap) adap 264 drivers/media/pci/cx25821/cx25821-i2c.c static u32 cx25821_functionality(struct i2c_adapter *adap) adap 1165 drivers/media/pci/cx88/cx88-dvb.c &dev->vp3054->adap); adap 107 drivers/media/pci/cx88/cx88-vp3054-i2c.c vp3054_i2c->adap.dev.parent = &dev->pci->dev; adap 108 drivers/media/pci/cx88/cx88-vp3054-i2c.c strscpy(vp3054_i2c->adap.name, core->name, adap 109 drivers/media/pci/cx88/cx88-vp3054-i2c.c sizeof(vp3054_i2c->adap.name)); adap 110 drivers/media/pci/cx88/cx88-vp3054-i2c.c vp3054_i2c->adap.owner = THIS_MODULE; adap 112 drivers/media/pci/cx88/cx88-vp3054-i2c.c i2c_set_adapdata(&vp3054_i2c->adap, dev); adap 113 drivers/media/pci/cx88/cx88-vp3054-i2c.c vp3054_i2c->adap.algo_data = &vp3054_i2c->algo; adap 118 drivers/media/pci/cx88/cx88-vp3054-i2c.c rc = i2c_bit_add_bus(&vp3054_i2c->adap); adap 138 drivers/media/pci/cx88/cx88-vp3054-i2c.c i2c_del_adapter(&vp3054_i2c->adap); adap 12 drivers/media/pci/cx88/cx88-vp3054-i2c.h struct i2c_adapter adap; adap 182 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 193 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 206 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 216 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 229 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 271 drivers/media/pci/ddbridge/ddbridge-ci.c struct i2c_adapter *i2c = &ci->port->i2c->adap; adap 329 drivers/media/pci/ddbridge/ddbridge-ci.c client = dvb_module_probe("cxd2099", NULL, &port->i2c->adap, adap 366 drivers/media/pci/ddbridge/ddbridge-ci.c dvb_ca_en50221_init(port->dvb[0].adap, port->en, 0, 1); adap 888 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 910 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 951 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 971 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *adapter = &input->port->i2c->adap; adap 994 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 1025 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *adapter = &input->port->i2c->adap; adap 1122 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 1146 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 1199 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 1246 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 1350 drivers/media/pci/ddbridge/ddbridge-core.c struct dvb_adapter *adap; adap 1354 drivers/media/pci/ddbridge/ddbridge-core.c adap = port->dvb[0].adap; adap 1355 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_adapter(adap, "DDBridge", THIS_MODULE, adap 1363 drivers/media/pci/ddbridge/ddbridge-core.c port->dvb[0].adap = adap; adap 1364 drivers/media/pci/ddbridge/ddbridge-core.c port->dvb[1].adap = adap; adap 1373 drivers/media/pci/ddbridge/ddbridge-core.c adap = port->dvb[0].adap; adap 1374 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_adapter(adap, "DDBridge", adap 1383 drivers/media/pci/ddbridge/ddbridge-core.c port->dvb[1].adap = port->dvb[0].adap; adap 1386 drivers/media/pci/ddbridge/ddbridge-core.c adap = port->dvb[1].adap; adap 1387 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_adapter(adap, "DDBridge", adap 1398 drivers/media/pci/ddbridge/ddbridge-core.c adap = port->dvb[0].adap; adap 1399 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_adapter(adap, "DDBridge", adap 1410 drivers/media/pci/ddbridge/ddbridge-core.c adap = port->dvb[0].adap; adap 1411 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_adapter(adap, "DDBridge", adap 1435 drivers/media/pci/ddbridge/ddbridge-core.c dvb_unregister_adapter(dvb->adap); adap 1440 drivers/media/pci/ddbridge/ddbridge-core.c dvb_unregister_adapter(dvb->adap); adap 1450 drivers/media/pci/ddbridge/ddbridge-core.c struct dvb_adapter *adap = dvb->adap; adap 1488 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_dmxdev_init(&dvb->dmxdev, adap); adap 1502 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_net_init(adap, &dvb->dvbnet, dvb->dmxdev.demux); adap 1601 drivers/media/pci/ddbridge/ddbridge-core.c if (dvb_register_frontend(adap, dvb->fe) < 0) adap 1605 drivers/media/pci/ddbridge/ddbridge-core.c if (dvb_register_frontend(adap, dvb->fe2) < 0) { adap 1640 drivers/media/pci/ddbridge/ddbridge-core.c int ret = i2c_read_reg(&port->i2c->adap, 0x20, 0, &val); adap 1655 drivers/media/pci/ddbridge/ddbridge-core.c val = i2c_transfer(&port->i2c->adap, msgs, 2); adap 1670 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_io(&port->i2c->adap, 0x10, probe, 1, data, 4)) adap 1689 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_reg16(&port->i2c->adap, 0x69, 0xf100, &val) < 0) adap 1696 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_reg16(&port->i2c->adap, 0x68, 0xf100, id) < 0) adap 1705 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read(&port->i2c->adap, 0x29, &val) < 0) adap 1707 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read(&port->i2c->adap, 0x2a, &val) < 0) adap 1716 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_reg16(&port->i2c->adap, 0x1e, 0xf000, &val) < 0) adap 1720 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_reg16(&port->i2c->adap, 0x1f, 0xf000, &val) < 0) adap 1729 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &port->i2c->adap; adap 1775 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &port->i2c->adap; adap 1820 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *i2c = &port->i2c->adap; adap 1823 drivers/media/pci/ddbridge/ddbridge-core.c status = i2c_write_reg(&port->i2c->adap, 0x6e, 0, 0); adap 2041 drivers/media/pci/ddbridge/ddbridge-core.c ret = dvb_register_device(port->dvb[0].adap, adap 2396 drivers/media/pci/ddbridge/ddbridge-core.c port->dvb[0].adap = &dev->adap[2 * p]; adap 2397 drivers/media/pci/ddbridge/ddbridge-core.c port->dvb[1].adap = &dev->adap[2 * p + 1]; adap 2808 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *adap; adap 2814 drivers/media/pci/ddbridge/ddbridge-core.c adap = &dev->i2c[link->info->temp_bus].adap; adap 2815 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs(adap, 0x48, 0, tmp, 2) < 0) adap 2820 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs(adap, 0x49, 0, tmp, 2) < 0) adap 2833 drivers/media/pci/ddbridge/ddbridge-core.c struct i2c_adapter *adap; adap 2838 drivers/media/pci/ddbridge/ddbridge-core.c adap = &dev->i2c[num].adap; adap 2839 drivers/media/pci/ddbridge/ddbridge-core.c if (!adap) adap 2841 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs(adap, 0x49, 0, tmp, 2) < 0) adap 2842 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs(adap, 0x4d, 0, tmp, 2) < 0) adap 2865 drivers/media/pci/ddbridge/ddbridge-core.c i2c_write_reg16(&dev->i2c[num].adap, adap 2869 drivers/media/pci/ddbridge/ddbridge-core.c i2c_write_reg16(&dev->i2c[num].adap, adap 2871 drivers/media/pci/ddbridge/ddbridge-core.c i2c_write_reg16(&dev->i2c[num].adap, adap 2878 drivers/media/pci/ddbridge/ddbridge-core.c i2c_read_reg(&dev->i2c[num].adap, 0x10, 0x08, &v); adap 2880 drivers/media/pci/ddbridge/ddbridge-core.c i2c_write_reg(&dev->i2c[num].adap, 0x10, 0x08, v); adap 2916 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs(&dev->i2c[num].adap, 0x10, 0x10, snr, 16) < 0) adap 2921 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs16(&dev->i2c[num].adap, adap 2923 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs16(&dev->i2c[num].adap, adap 2951 drivers/media/pci/ddbridge/ddbridge-core.c if (i2c_read_regs16(&dev->i2c[0].adap, adap 132 drivers/media/pci/ddbridge/ddbridge-i2c.c static u32 ddb_i2c_functionality(struct i2c_adapter *adap) adap 149 drivers/media/pci/ddbridge/ddbridge-i2c.c i2c_del_adapter(&i2c->adap); adap 164 drivers/media/pci/ddbridge/ddbridge-i2c.c struct i2c_adapter *adap; adap 180 drivers/media/pci/ddbridge/ddbridge-i2c.c adap = &i2c->adap; adap 181 drivers/media/pci/ddbridge/ddbridge-i2c.c i2c_set_adapdata(adap, i2c); adap 183 drivers/media/pci/ddbridge/ddbridge-i2c.c adap->class = I2C_ADAP_CLASS_TV_DIGITAL | I2C_CLASS_TV_ANALOG; adap 186 drivers/media/pci/ddbridge/ddbridge-i2c.c adap->class = I2C_CLASS_TV_ANALOG; adap 189 drivers/media/pci/ddbridge/ddbridge-i2c.c snprintf(adap->name, I2C_NAME_SIZE, "ddbridge_%02x.%x.%x", adap 191 drivers/media/pci/ddbridge/ddbridge-i2c.c adap->algo = &ddb_i2c_algo; adap 192 drivers/media/pci/ddbridge/ddbridge-i2c.c adap->algo_data = (void *)i2c; adap 193 drivers/media/pci/ddbridge/ddbridge-i2c.c adap->dev.parent = dev->dev; adap 194 drivers/media/pci/ddbridge/ddbridge-i2c.c return i2c_add_adapter(adap); adap 202 drivers/media/pci/ddbridge/ddbridge-i2c.c struct i2c_adapter *adap; adap 226 drivers/media/pci/ddbridge/ddbridge-i2c.c adap = &i2c->adap; adap 227 drivers/media/pci/ddbridge/ddbridge-i2c.c i2c_del_adapter(adap); adap 44 drivers/media/pci/ddbridge/ddbridge-i2c.h static int __maybe_unused i2c_write(struct i2c_adapter *adap, u8 adr, adap 50 drivers/media/pci/ddbridge/ddbridge-i2c.h return (i2c_transfer(adap, &msg, 1) == 1) ? 0 : -1; adap 84 drivers/media/pci/ddbridge/ddbridge-i2c.h static int __maybe_unused i2c_write_reg16(struct i2c_adapter *adap, adap 89 drivers/media/pci/ddbridge/ddbridge-i2c.h return i2c_write(adap, adr, msg, 3); adap 92 drivers/media/pci/ddbridge/ddbridge-i2c.h static int __maybe_unused i2c_write_reg(struct i2c_adapter *adap, adap 97 drivers/media/pci/ddbridge/ddbridge-i2c.h return i2c_write(adap, adr, msg, 2); adap 411 drivers/media/pci/ddbridge/ddbridge-max.c struct i2c_adapter *i2c = &input->port->i2c->adap; adap 164 drivers/media/pci/ddbridge/ddbridge.h struct dvb_adapter *adap; adap 213 drivers/media/pci/ddbridge/ddbridge.h struct i2c_adapter adap; adap 337 drivers/media/pci/ddbridge/ddbridge.h struct dvb_adapter adap[DDB_MAX_INPUT]; adap 559 drivers/media/pci/dm1105/dm1105.c static u32 functionality(struct i2c_adapter *adap) adap 166 drivers/media/pci/ivtv/ivtv-i2c.c struct i2c_adapter *adap = &itv->i2c_adap; adap 211 drivers/media/pci/ivtv/ivtv-i2c.c return i2c_new_probed_device(adap, &info, addr_list, NULL) == NULL ? adap 244 drivers/media/pci/ivtv/ivtv-i2c.c struct i2c_adapter *adap = &itv->i2c_adap; adap 250 drivers/media/pci/ivtv/ivtv-i2c.c sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, adap 254 drivers/media/pci/ivtv/ivtv-i2c.c sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, adap 258 drivers/media/pci/ivtv/ivtv-i2c.c sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0, adap 275 drivers/media/pci/ivtv/ivtv-i2c.c adap, type, 0, I2C_ADDRS(hw_addrs[idx])); adap 286 drivers/media/pci/ivtv/ivtv-i2c.c sd = v4l2_i2c_new_subdev_board(&itv->v4l2_dev, adap, adap 290 drivers/media/pci/ivtv/ivtv-i2c.c adap, type, hw_addrs[idx], NULL); adap 601 drivers/media/pci/ivtv/ivtv-i2c.c static u32 ivtv_functionality(struct i2c_adapter *adap) adap 83 drivers/media/pci/netup_unidvb/netup_unidvb.h struct i2c_adapter adap; adap 425 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &demod_config, &ndev->i2c[num].adap); adap 436 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &horus3a_conf, &ndev->i2c[num].adap)) { adap 445 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &helene_conf, &ndev->i2c[num].adap)) { adap 454 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &lnbh25_conf, &ndev->i2c[num].adap)) { adap 462 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &demod_config, &ndev->i2c[num].adap); adap 472 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &ascot2e_conf, &ndev->i2c[num].adap)) { adap 481 drivers/media/pci/netup_unidvb/netup_unidvb_core.c &helene_conf, &ndev->i2c[num].adap)) { adap 74 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 77 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 83 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 89 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 98 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 106 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 110 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_warn(&i2c->adap.dev, "%s(): not mine interrupt\n", __func__); adap 121 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, "%s()\n", __func__); adap 142 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 146 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 158 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 165 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 170 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 186 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 200 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c static int netup_i2c_xfer(struct i2c_adapter *adap, adap 205 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c struct netup_i2c *i2c = i2c_get_adapdata(adap); adap 210 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 215 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, "%s() num %d\n", __func__, num); adap 237 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 244 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 249 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 265 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, adap 275 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c dev_dbg(i2c->adap.dev.parent, "%s(): result %d\n", __func__, res); adap 279 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c static u32 netup_i2c_func(struct i2c_adapter *adap) adap 312 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c i2c->adap = netup_i2c_adapter; adap 313 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c i2c->adap.dev.parent = &ndev->pci_dev->dev; adap 314 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c i2c_set_adapdata(&i2c->adap, i2c); adap 315 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c ret = i2c_add_adapter(&i2c->adap); adap 339 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c i2c_del_adapter(&i2c->adap); adap 54 drivers/media/pci/ngene/ngene-cards.c static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len) adap 59 drivers/media/pci/ngene/ngene-cards.c return (i2c_transfer(adap, &msg, 1) == 1) ? 0 : -1; adap 62 drivers/media/pci/ngene/ngene-cards.c static int i2c_write_reg(struct i2c_adapter *adap, u8 adr, adap 67 drivers/media/pci/ngene/ngene-cards.c return i2c_write(adap, adr, msg, 2); adap 952 drivers/media/pci/ngene/ngene-cards.c struct i2c_adapter *adap = &chan->i2c_adapter; adap 959 drivers/media/pci/ngene/ngene-cards.c eeprom_write_ushort(adap, 0x1000 + chan->number, data); adap 961 drivers/media/pci/ngene/ngene-cards.c if (eeprom_read_ushort(adap, 0x1000 + chan->number, &data)) adap 135 drivers/media/pci/ngene/ngene-i2c.c static u32 ngene_i2c_functionality(struct i2c_adapter *adap) adap 147 drivers/media/pci/ngene/ngene-i2c.c struct i2c_adapter *adap = &(dev->channel[dev_nr].i2c_adapter); adap 149 drivers/media/pci/ngene/ngene-i2c.c i2c_set_adapdata(adap, &(dev->channel[dev_nr])); adap 151 drivers/media/pci/ngene/ngene-i2c.c strscpy(adap->name, "nGene", sizeof(adap->name)); adap 153 drivers/media/pci/ngene/ngene-i2c.c adap->algo = &ngene_i2c_algo; adap 154 drivers/media/pci/ngene/ngene-i2c.c adap->algo_data = (void *)&(dev->channel[dev_nr]); adap 155 drivers/media/pci/ngene/ngene-i2c.c adap->dev.parent = &dev->pci_dev->dev; adap 157 drivers/media/pci/ngene/ngene-i2c.c return i2c_add_adapter(adap); adap 99 drivers/media/pci/pt1/pt1.c struct dvb_adapter adap; adap 440 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 454 drivers/media/pci/pt1/pt1.c adap = pt1->adaps[index]; adap 456 drivers/media/pci/pt1/pt1.c adap->upacket_count = 0; adap 457 drivers/media/pci/pt1/pt1.c else if (!adap->upacket_count) adap 464 drivers/media/pci/pt1/pt1.c if (adap->st_count != -1 && sc != ((adap->st_count + 1) & 0x7)) adap 467 drivers/media/pci/pt1/pt1.c adap->st_count = sc; adap 469 drivers/media/pci/pt1/pt1.c buf = adap->buf; adap 470 drivers/media/pci/pt1/pt1.c offset = adap->packet_count * 188 + adap->upacket_count * 3; adap 473 drivers/media/pci/pt1/pt1.c if (adap->upacket_count != 62) adap 476 drivers/media/pci/pt1/pt1.c if (++adap->upacket_count >= 63) { adap 477 drivers/media/pci/pt1/pt1.c adap->upacket_count = 0; adap 478 drivers/media/pci/pt1/pt1.c if (++adap->packet_count >= 21) { adap 479 drivers/media/pci/pt1/pt1.c dvb_dmx_swfilter_packets(&adap->demux, buf, 21); adap 480 drivers/media/pci/pt1/pt1.c adap->packet_count = 0; adap 695 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 696 drivers/media/pci/pt1/pt1.c adap = container_of(feed->demux, struct pt1_adapter, demux); adap 697 drivers/media/pci/pt1/pt1.c if (!adap->users++) { adap 700 drivers/media/pci/pt1/pt1.c ret = pt1_start_polling(adap->pt1); adap 703 drivers/media/pci/pt1/pt1.c pt1_set_stream(adap->pt1, adap->index, 1); adap 725 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 726 drivers/media/pci/pt1/pt1.c adap = container_of(feed->demux, struct pt1_adapter, demux); adap 727 drivers/media/pci/pt1/pt1.c if (!--adap->users) { adap 728 drivers/media/pci/pt1/pt1.c pt1_set_stream(adap->pt1, adap->index, 0); adap 729 drivers/media/pci/pt1/pt1.c pt1_stop_polling(adap->pt1); adap 739 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 750 drivers/media/pci/pt1/pt1.c adap = pt1->adaps[i]; adap 751 drivers/media/pci/pt1/pt1.c switch (adap->voltage) { adap 771 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 773 drivers/media/pci/pt1/pt1.c adap = container_of(fe->dvb, struct pt1_adapter, adap); adap 774 drivers/media/pci/pt1/pt1.c adap->voltage = voltage; adap 775 drivers/media/pci/pt1/pt1.c pt1_update_power(adap->pt1); adap 777 drivers/media/pci/pt1/pt1.c if (adap->orig_set_voltage) adap 778 drivers/media/pci/pt1/pt1.c return adap->orig_set_voltage(fe, voltage); adap 785 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 788 drivers/media/pci/pt1/pt1.c adap = container_of(fe->dvb, struct pt1_adapter, adap); adap 791 drivers/media/pci/pt1/pt1.c if (adap->orig_sleep) adap 792 drivers/media/pci/pt1/pt1.c ret = adap->orig_sleep(fe); adap 794 drivers/media/pci/pt1/pt1.c adap->sleep = 1; adap 795 drivers/media/pci/pt1/pt1.c pt1_update_power(adap->pt1); adap 801 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 804 drivers/media/pci/pt1/pt1.c adap = container_of(fe->dvb, struct pt1_adapter, adap); adap 805 drivers/media/pci/pt1/pt1.c adap->sleep = 0; adap 806 drivers/media/pci/pt1/pt1.c pt1_update_power(adap->pt1); adap 809 drivers/media/pci/pt1/pt1.c ret = config_demod(adap->demod_i2c_client, adap->pt1->fe_clk); adap 810 drivers/media/pci/pt1/pt1.c if (ret == 0 && adap->orig_init) adap 811 drivers/media/pci/pt1/pt1.c ret = adap->orig_init(fe); adap 815 drivers/media/pci/pt1/pt1.c static void pt1_free_adapter(struct pt1_adapter *adap) adap 817 drivers/media/pci/pt1/pt1.c adap->demux.dmx.close(&adap->demux.dmx); adap 818 drivers/media/pci/pt1/pt1.c dvb_dmxdev_release(&adap->dmxdev); adap 819 drivers/media/pci/pt1/pt1.c dvb_dmx_release(&adap->demux); adap 820 drivers/media/pci/pt1/pt1.c dvb_unregister_adapter(&adap->adap); adap 821 drivers/media/pci/pt1/pt1.c free_page((unsigned long)adap->buf); adap 822 drivers/media/pci/pt1/pt1.c kfree(adap); adap 830 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 837 drivers/media/pci/pt1/pt1.c adap = kzalloc(sizeof(struct pt1_adapter), GFP_KERNEL); adap 838 drivers/media/pci/pt1/pt1.c if (!adap) { adap 843 drivers/media/pci/pt1/pt1.c adap->pt1 = pt1; adap 845 drivers/media/pci/pt1/pt1.c adap->voltage = SEC_VOLTAGE_OFF; adap 846 drivers/media/pci/pt1/pt1.c adap->sleep = 1; adap 854 drivers/media/pci/pt1/pt1.c adap->buf = buf; adap 855 drivers/media/pci/pt1/pt1.c adap->upacket_count = 0; adap 856 drivers/media/pci/pt1/pt1.c adap->packet_count = 0; adap 857 drivers/media/pci/pt1/pt1.c adap->st_count = -1; adap 859 drivers/media/pci/pt1/pt1.c dvb_adap = &adap->adap; adap 860 drivers/media/pci/pt1/pt1.c dvb_adap->priv = adap; adap 866 drivers/media/pci/pt1/pt1.c demux = &adap->demux; adap 868 drivers/media/pci/pt1/pt1.c demux->priv = adap; adap 878 drivers/media/pci/pt1/pt1.c dmxdev = &adap->dmxdev; adap 886 drivers/media/pci/pt1/pt1.c return adap; adap 895 drivers/media/pci/pt1/pt1.c kfree(adap); adap 910 drivers/media/pci/pt1/pt1.c struct pt1_adapter *adap; adap 914 drivers/media/pci/pt1/pt1.c adap = pt1_alloc_adapter(pt1); adap 915 drivers/media/pci/pt1/pt1.c if (IS_ERR(adap)) { adap 916 drivers/media/pci/pt1/pt1.c ret = PTR_ERR(adap); adap 920 drivers/media/pci/pt1/pt1.c adap->index = i; adap 921 drivers/media/pci/pt1/pt1.c pt1->adaps[i] = adap; adap 932 drivers/media/pci/pt1/pt1.c static void pt1_cleanup_frontend(struct pt1_adapter *adap) adap 934 drivers/media/pci/pt1/pt1.c dvb_unregister_frontend(adap->fe); adap 935 drivers/media/pci/pt1/pt1.c dvb_module_release(adap->tuner_i2c_client); adap 936 drivers/media/pci/pt1/pt1.c dvb_module_release(adap->demod_i2c_client); adap 939 drivers/media/pci/pt1/pt1.c static int pt1_init_frontend(struct pt1_adapter *adap, struct dvb_frontend *fe) adap 943 drivers/media/pci/pt1/pt1.c adap->orig_set_voltage = fe->ops.set_voltage; adap 944 drivers/media/pci/pt1/pt1.c adap->orig_sleep = fe->ops.sleep; adap 945 drivers/media/pci/pt1/pt1.c adap->orig_init = fe->ops.init; adap 950 drivers/media/pci/pt1/pt1.c ret = dvb_register_frontend(&adap->adap, fe); adap 954 drivers/media/pci/pt1/pt1.c adap->fe = fe; adap 1140 drivers/media/pci/pt1/pt1.c static int pt1_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 1149 drivers/media/pci/pt1/pt1.c pt1 = i2c_get_adapdata(adap); adap 1192 drivers/media/pci/pt1/pt1.c static u32 pt1_i2c_func(struct i2c_adapter *adap) adap 92 drivers/media/pci/pt3/pt3.c pt3_demod_write(struct pt3_adapter *adap, const struct reg_val *data, int num) adap 98 drivers/media/pci/pt3/pt3.c msg.addr = adap->i2c_demod->addr; adap 103 drivers/media/pci/pt3/pt3.c ret = i2c_transfer(adap->i2c_demod->adapter, &msg, 1); adap 150 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 157 drivers/media/pci/pt3/pt3.c adap = pt3_find_adapter(fe); adap 159 drivers/media/pci/pt3/pt3.c if (val == LNA_AUTO || val == adap->cur_lna) adap 162 drivers/media/pci/pt3/pt3.c pt3 = adap->dvb_adap.priv; adap 179 drivers/media/pci/pt3/pt3.c adap->cur_lna = (val != 0); adap 185 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 191 drivers/media/pci/pt3/pt3.c adap = pt3_find_adapter(fe); adap 193 drivers/media/pci/pt3/pt3.c if (on == adap->cur_lnb) adap 195 drivers/media/pci/pt3/pt3.c adap->cur_lnb = on; adap 196 drivers/media/pci/pt3/pt3.c pt3 = adap->dvb_adap.priv; adap 427 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap = data; adap 435 drivers/media/pci/pt3/pt3.c pt3_init_dmabuf(adap); adap 436 drivers/media/pci/pt3/pt3.c adap->num_discard = PT3_INITIAL_BUF_DROPS; adap 438 drivers/media/pci/pt3/pt3.c dev_dbg(adap->dvb_adap.device, "PT3: [%s] started\n", adap 439 drivers/media/pci/pt3/pt3.c adap->thread->comm); adap 443 drivers/media/pci/pt3/pt3.c adap->num_discard = PT3_INITIAL_BUF_DROPS; adap 445 drivers/media/pci/pt3/pt3.c pt3_proc_dma(adap); adap 453 drivers/media/pci/pt3/pt3.c dev_dbg(adap->dvb_adap.device, "PT3: [%s] exited\n", adap 454 drivers/media/pci/pt3/pt3.c adap->thread->comm); adap 458 drivers/media/pci/pt3/pt3.c static int pt3_start_streaming(struct pt3_adapter *adap) adap 463 drivers/media/pci/pt3/pt3.c thread = kthread_run(pt3_fetch_thread, adap, "pt3-ad%i-dmx%i", adap 464 drivers/media/pci/pt3/pt3.c adap->dvb_adap.num, adap->dmxdev.dvbdev->id); adap 468 drivers/media/pci/pt3/pt3.c adap->thread = NULL; adap 469 drivers/media/pci/pt3/pt3.c dev_warn(adap->dvb_adap.device, adap 471 drivers/media/pci/pt3/pt3.c adap->dvb_adap.num, adap->dmxdev.dvbdev->id); adap 474 drivers/media/pci/pt3/pt3.c adap->thread = thread; adap 476 drivers/media/pci/pt3/pt3.c return pt3_start_dma(adap); adap 479 drivers/media/pci/pt3/pt3.c static int pt3_stop_streaming(struct pt3_adapter *adap) adap 483 drivers/media/pci/pt3/pt3.c ret = pt3_stop_dma(adap); adap 485 drivers/media/pci/pt3/pt3.c dev_warn(adap->dvb_adap.device, adap 487 drivers/media/pci/pt3/pt3.c adap->dvb_adap.num, adap->fe->id); adap 490 drivers/media/pci/pt3/pt3.c ret = kthread_stop(adap->thread); adap 491 drivers/media/pci/pt3/pt3.c adap->thread = NULL; adap 497 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 502 drivers/media/pci/pt3/pt3.c adap = container_of(feed->demux, struct pt3_adapter, demux); adap 503 drivers/media/pci/pt3/pt3.c adap->num_feeds++; adap 504 drivers/media/pci/pt3/pt3.c if (adap->num_feeds > 1) adap 507 drivers/media/pci/pt3/pt3.c return pt3_start_streaming(adap); adap 513 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 515 drivers/media/pci/pt3/pt3.c adap = container_of(feed->demux, struct pt3_adapter, demux); adap 517 drivers/media/pci/pt3/pt3.c adap->num_feeds--; adap 518 drivers/media/pci/pt3/pt3.c if (adap->num_feeds > 0 || !adap->thread) adap 520 drivers/media/pci/pt3/pt3.c adap->num_feeds = 0; adap 522 drivers/media/pci/pt3/pt3.c return pt3_stop_streaming(adap); adap 529 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 532 drivers/media/pci/pt3/pt3.c adap = kzalloc(sizeof(*adap), GFP_KERNEL); adap 533 drivers/media/pci/pt3/pt3.c if (!adap) adap 536 drivers/media/pci/pt3/pt3.c pt3->adaps[index] = adap; adap 537 drivers/media/pci/pt3/pt3.c adap->adap_idx = index; adap 540 drivers/media/pci/pt3/pt3.c ret = dvb_register_adapter(&adap->dvb_adap, "PT3 DVB", adap 547 drivers/media/pci/pt3/pt3.c da = &adap->dvb_adap; adap 551 drivers/media/pci/pt3/pt3.c adap->dvb_adap.priv = pt3; adap 552 drivers/media/pci/pt3/pt3.c adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING; adap 553 drivers/media/pci/pt3/pt3.c adap->demux.priv = adap; adap 554 drivers/media/pci/pt3/pt3.c adap->demux.feednum = 256; adap 555 drivers/media/pci/pt3/pt3.c adap->demux.filternum = 256; adap 556 drivers/media/pci/pt3/pt3.c adap->demux.start_feed = pt3_start_feed; adap 557 drivers/media/pci/pt3/pt3.c adap->demux.stop_feed = pt3_stop_feed; adap 558 drivers/media/pci/pt3/pt3.c ret = dvb_dmx_init(&adap->demux); adap 564 drivers/media/pci/pt3/pt3.c adap->dmxdev.filternum = 256; adap 565 drivers/media/pci/pt3/pt3.c adap->dmxdev.demux = &adap->demux.dmx; adap 566 drivers/media/pci/pt3/pt3.c ret = dvb_dmxdev_init(&adap->dmxdev, da); adap 572 drivers/media/pci/pt3/pt3.c ret = pt3_alloc_dmabuf(adap); adap 581 drivers/media/pci/pt3/pt3.c pt3_free_dmabuf(adap); adap 582 drivers/media/pci/pt3/pt3.c dvb_dmxdev_release(&adap->dmxdev); adap 584 drivers/media/pci/pt3/pt3.c dvb_dmx_release(&adap->demux); adap 589 drivers/media/pci/pt3/pt3.c kfree(adap); adap 596 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 599 drivers/media/pci/pt3/pt3.c adap = pt3->adaps[index]; adap 600 drivers/media/pci/pt3/pt3.c if (adap == NULL) adap 604 drivers/media/pci/pt3/pt3.c if (adap->thread) adap 605 drivers/media/pci/pt3/pt3.c pt3_stop_streaming(adap); adap 607 drivers/media/pci/pt3/pt3.c dmx = &adap->demux.dmx; adap 609 drivers/media/pci/pt3/pt3.c if (adap->fe) { adap 610 drivers/media/pci/pt3/pt3.c adap->fe->callback = NULL; adap 611 drivers/media/pci/pt3/pt3.c if (adap->fe->frontend_priv) adap 612 drivers/media/pci/pt3/pt3.c dvb_unregister_frontend(adap->fe); adap 613 drivers/media/pci/pt3/pt3.c dvb_module_release(adap->i2c_tuner); adap 614 drivers/media/pci/pt3/pt3.c dvb_module_release(adap->i2c_demod); adap 616 drivers/media/pci/pt3/pt3.c pt3_free_dmabuf(adap); adap 617 drivers/media/pci/pt3/pt3.c dvb_dmxdev_release(&adap->dmxdev); adap 618 drivers/media/pci/pt3/pt3.c dvb_dmx_release(&adap->demux); adap 620 drivers/media/pci/pt3/pt3.c dvb_unregister_adapter(&adap->dvb_adap); adap 621 drivers/media/pci/pt3/pt3.c kfree(adap); adap 631 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 634 drivers/media/pci/pt3/pt3.c adap = pt3->adaps[i]; adap 635 drivers/media/pci/pt3/pt3.c if (adap->num_feeds > 0) adap 636 drivers/media/pci/pt3/pt3.c pt3_stop_dma(adap); adap 637 drivers/media/pci/pt3/pt3.c dvb_frontend_suspend(adap->fe); adap 638 drivers/media/pci/pt3/pt3.c pt3_free_dmabuf(adap); adap 650 drivers/media/pci/pt3/pt3.c struct pt3_adapter *adap; adap 662 drivers/media/pci/pt3/pt3.c adap = pt3->adaps[i]; adap 663 drivers/media/pci/pt3/pt3.c dvb_frontend_resume(adap->fe); adap 664 drivers/media/pci/pt3/pt3.c ret = pt3_alloc_dmabuf(adap); adap 669 drivers/media/pci/pt3/pt3.c if (adap->num_feeds > 0) adap 670 drivers/media/pci/pt3/pt3.c pt3_start_dma(adap); adap 164 drivers/media/pci/pt3/pt3.h extern int pt3_alloc_dmabuf(struct pt3_adapter *adap); adap 165 drivers/media/pci/pt3/pt3.h extern void pt3_init_dmabuf(struct pt3_adapter *adap); adap 166 drivers/media/pci/pt3/pt3.h extern void pt3_free_dmabuf(struct pt3_adapter *adap); adap 167 drivers/media/pci/pt3/pt3.h extern int pt3_start_dma(struct pt3_adapter *adap); adap 168 drivers/media/pci/pt3/pt3.h extern int pt3_stop_dma(struct pt3_adapter *adap); adap 169 drivers/media/pci/pt3/pt3.h extern int pt3_proc_dma(struct pt3_adapter *adap); adap 171 drivers/media/pci/pt3/pt3.h extern int pt3_i2c_master_xfer(struct i2c_adapter *adap, adap 173 drivers/media/pci/pt3/pt3.h extern u32 pt3_i2c_functionality(struct i2c_adapter *adap); adap 24 drivers/media/pci/pt3/pt3_dma.c int pt3_stop_dma(struct pt3_adapter *adap) adap 26 drivers/media/pci/pt3/pt3_dma.c struct pt3_board *pt3 = adap->dvb_adap.priv; adap 31 drivers/media/pci/pt3/pt3_dma.c base = get_dma_base(adap->adap_idx); adap 46 drivers/media/pci/pt3/pt3_dma.c int pt3_start_dma(struct pt3_adapter *adap) adap 48 drivers/media/pci/pt3/pt3_dma.c struct pt3_board *pt3 = adap->dvb_adap.priv; adap 49 drivers/media/pci/pt3/pt3_dma.c u32 base = get_dma_base(adap->adap_idx); adap 52 drivers/media/pci/pt3/pt3_dma.c iowrite32(lower_32_bits(adap->desc_buf[0].b_addr), adap 54 drivers/media/pci/pt3/pt3_dma.c iowrite32(upper_32_bits(adap->desc_buf[0].b_addr), adap 61 drivers/media/pci/pt3/pt3_dma.c static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) adap 67 drivers/media/pci/pt3/pt3_dma.c if (*idx == adap->num_bufs) adap 70 drivers/media/pci/pt3/pt3_dma.c return &adap->buffer[*idx].data[*ofs]; adap 73 drivers/media/pci/pt3/pt3_dma.c int pt3_proc_dma(struct pt3_adapter *adap) adap 77 drivers/media/pci/pt3/pt3_dma.c idx = adap->buf_idx; adap 78 drivers/media/pci/pt3/pt3_dma.c ofs = adap->buf_ofs; adap 80 drivers/media/pci/pt3/pt3_dma.c if (adap->buffer[idx].data[ofs] == PT3_BUF_CANARY) adap 83 drivers/media/pci/pt3/pt3_dma.c while (*next_unit(adap, &idx, &ofs) != PT3_BUF_CANARY) { adap 86 drivers/media/pci/pt3/pt3_dma.c p = &adap->buffer[adap->buf_idx].data[adap->buf_ofs]; adap 87 drivers/media/pci/pt3/pt3_dma.c if (adap->num_discard > 0) adap 88 drivers/media/pci/pt3/pt3_dma.c adap->num_discard--; adap 89 drivers/media/pci/pt3/pt3_dma.c else if (adap->buf_ofs + PT3_ACCESS_UNIT > DATA_BUF_SZ) { adap 90 drivers/media/pci/pt3/pt3_dma.c dvb_dmx_swfilter_packets(&adap->demux, p, adap 91 drivers/media/pci/pt3/pt3_dma.c (DATA_BUF_SZ - adap->buf_ofs) / TS_PACKET_SZ); adap 92 drivers/media/pci/pt3/pt3_dma.c dvb_dmx_swfilter_packets(&adap->demux, adap 93 drivers/media/pci/pt3/pt3_dma.c adap->buffer[idx].data, ofs / TS_PACKET_SZ); adap 95 drivers/media/pci/pt3/pt3_dma.c dvb_dmx_swfilter_packets(&adap->demux, p, adap 99 drivers/media/pci/pt3/pt3_dma.c adap->buf_idx = idx; adap 100 drivers/media/pci/pt3/pt3_dma.c adap->buf_ofs = ofs; adap 105 drivers/media/pci/pt3/pt3_dma.c void pt3_init_dmabuf(struct pt3_adapter *adap) adap 112 drivers/media/pci/pt3/pt3_dma.c p = adap->buffer[0].data; adap 114 drivers/media/pci/pt3/pt3_dma.c while (idx < adap->num_bufs) { adap 120 drivers/media/pci/pt3/pt3_dma.c p = adap->buffer[idx].data; adap 123 drivers/media/pci/pt3/pt3_dma.c adap->buf_idx = 0; adap 124 drivers/media/pci/pt3/pt3_dma.c adap->buf_ofs = 0; adap 127 drivers/media/pci/pt3/pt3_dma.c void pt3_free_dmabuf(struct pt3_adapter *adap) adap 132 drivers/media/pci/pt3/pt3_dma.c pt3 = adap->dvb_adap.priv; adap 133 drivers/media/pci/pt3/pt3_dma.c for (i = 0; i < adap->num_bufs; i++) adap 135 drivers/media/pci/pt3/pt3_dma.c adap->buffer[i].data, adap->buffer[i].b_addr); adap 136 drivers/media/pci/pt3/pt3_dma.c adap->num_bufs = 0; adap 138 drivers/media/pci/pt3/pt3_dma.c for (i = 0; i < adap->num_desc_bufs; i++) adap 140 drivers/media/pci/pt3/pt3_dma.c adap->desc_buf[i].descs, adap->desc_buf[i].b_addr); adap 141 drivers/media/pci/pt3/pt3_dma.c adap->num_desc_bufs = 0; adap 145 drivers/media/pci/pt3/pt3_dma.c int pt3_alloc_dmabuf(struct pt3_adapter *adap) adap 155 drivers/media/pci/pt3/pt3_dma.c pt3 = adap->dvb_adap.priv; adap 156 drivers/media/pci/pt3/pt3_dma.c adap->num_bufs = 0; adap 157 drivers/media/pci/pt3/pt3_dma.c adap->num_desc_bufs = 0; adap 160 drivers/media/pci/pt3/pt3_dma.c &adap->buffer[i].b_addr, GFP_KERNEL); adap 163 drivers/media/pci/pt3/pt3_dma.c adap->buffer[i].data = p; adap 164 drivers/media/pci/pt3/pt3_dma.c adap->num_bufs++; adap 166 drivers/media/pci/pt3/pt3_dma.c pt3_init_dmabuf(adap); adap 172 drivers/media/pci/pt3/pt3_dma.c DIV_ROUND_UP(adap->num_bufs * DATA_BUF_XFERS, DESCS_IN_PAGE); adap 178 drivers/media/pci/pt3/pt3_dma.c adap->num_desc_bufs++; adap 179 drivers/media/pci/pt3/pt3_dma.c adap->desc_buf[i].descs = p; adap 180 drivers/media/pci/pt3/pt3_dma.c adap->desc_buf[i].b_addr = desc_addr; adap 183 drivers/media/pci/pt3/pt3_dma.c d = &adap->desc_buf[i - 1].descs[DESCS_IN_PAGE - 1]; adap 188 drivers/media/pci/pt3/pt3_dma.c data_addr = adap->buffer[idx].b_addr + ofs; adap 189 drivers/media/pci/pt3/pt3_dma.c d = &adap->desc_buf[i].descs[j]; adap 202 drivers/media/pci/pt3/pt3_dma.c if (idx >= adap->num_bufs) { adap 203 drivers/media/pci/pt3/pt3_dma.c desc_addr = adap->desc_buf[0].b_addr; adap 214 drivers/media/pci/pt3/pt3_dma.c pt3_free_dmabuf(adap); adap 192 drivers/media/pci/pt3/pt3_i2c.c pt3_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) adap 199 drivers/media/pci/pt3/pt3_i2c.c pt3 = i2c_get_adapdata(adap); adap 227 drivers/media/pci/pt3/pt3_i2c.c u32 pt3_i2c_functionality(struct i2c_adapter *adap) adap 323 drivers/media/pci/saa7134/saa7134-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 59 drivers/media/pci/saa7164/saa7164-i2c.c static u32 saa7164_functionality(struct i2c_adapter *adap) adap 677 drivers/media/pci/smipcie/smipcie-main.c struct dvb_adapter *adap = &port->dvb_adapter; adap 698 drivers/media/pci/smipcie/smipcie-main.c ret = dvb_register_frontend(adap, port->fe); adap 712 drivers/media/pci/smipcie/smipcie-main.c memcpy(adap->proposed_mac, mac_ee + (port->idx)*8, 6); adap 845 drivers/media/pci/smipcie/smipcie-main.c struct dvb_adapter *adap = &port->dvb_adapter; adap 851 drivers/media/pci/smipcie/smipcie-main.c ret = dvb_register_adapter(adap, "SMI_DVB", THIS_MODULE, adap 866 drivers/media/pci/smipcie/smipcie-main.c &port->mem_frontend, adap); adap 870 drivers/media/pci/smipcie/smipcie-main.c ret = dvb_net_init(adap, &port->dvbnet, port->dmxdev.demux); adap 206 drivers/media/pci/solo6x10/solo6x10-i2c.c static int solo_i2c_master_xfer(struct i2c_adapter *adap, adap 209 drivers/media/pci/solo6x10/solo6x10-i2c.c struct solo_dev *solo_dev = adap->algo_data; adap 216 drivers/media/pci/solo6x10/solo6x10-i2c.c if (&solo_dev->i2c_adap[i] == adap) adap 260 drivers/media/pci/solo6x10/solo6x10-i2c.c static u32 solo_i2c_functionality(struct i2c_adapter *adap) adap 284 drivers/media/pci/solo6x10/solo6x10-i2c.c struct i2c_adapter *adap = &solo_dev->i2c_adap[i]; adap 286 drivers/media/pci/solo6x10/solo6x10-i2c.c snprintf(adap->name, I2C_NAME_SIZE, "%s I2C %d", adap 288 drivers/media/pci/solo6x10/solo6x10-i2c.c adap->algo = &solo_i2c_algo; adap 289 drivers/media/pci/solo6x10/solo6x10-i2c.c adap->algo_data = solo_dev; adap 290 drivers/media/pci/solo6x10/solo6x10-i2c.c adap->retries = 1; adap 291 drivers/media/pci/solo6x10/solo6x10-i2c.c adap->dev.parent = &solo_dev->pdev->dev; adap 293 drivers/media/pci/solo6x10/solo6x10-i2c.c ret = i2c_add_adapter(adap); adap 295 drivers/media/pci/solo6x10/solo6x10-i2c.c adap->algo_data = NULL; adap 14 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_adapter *adap; adap 32 drivers/media/platform/cec-gpio/cec-gpio.c static bool cec_gpio_read(struct cec_adapter *adap) adap 34 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 41 drivers/media/platform/cec-gpio/cec-gpio.c static void cec_gpio_high(struct cec_adapter *adap) adap 43 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 51 drivers/media/platform/cec-gpio/cec-gpio.c static void cec_gpio_low(struct cec_adapter *adap) adap 53 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 65 drivers/media/platform/cec-gpio/cec-gpio.c cec_queue_pin_hpd_event(cec->adap, cec->hpd_is_high, cec->hpd_ts); adap 85 drivers/media/platform/cec-gpio/cec-gpio.c cec_queue_pin_5v_event(cec->adap, cec->v5_is_high, cec->v5_ts); adap 105 drivers/media/platform/cec-gpio/cec-gpio.c cec_pin_changed(cec->adap, gpiod_get_value(cec->cec_gpio)); adap 109 drivers/media/platform/cec-gpio/cec-gpio.c static bool cec_gpio_enable_irq(struct cec_adapter *adap) adap 111 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 117 drivers/media/platform/cec-gpio/cec-gpio.c static void cec_gpio_disable_irq(struct cec_adapter *adap) adap 119 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 124 drivers/media/platform/cec-gpio/cec-gpio.c static void cec_gpio_status(struct cec_adapter *adap, struct seq_file *file) adap 126 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 138 drivers/media/platform/cec-gpio/cec-gpio.c static int cec_gpio_read_hpd(struct cec_adapter *adap) adap 140 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 147 drivers/media/platform/cec-gpio/cec-gpio.c static int cec_gpio_read_5v(struct cec_adapter *adap) adap 149 drivers/media/platform/cec-gpio/cec-gpio.c struct cec_gpio *cec = cec_get_drvdata(adap); adap 156 drivers/media/platform/cec-gpio/cec-gpio.c static void cec_gpio_free(struct cec_adapter *adap) adap 158 drivers/media/platform/cec-gpio/cec-gpio.c cec_gpio_disable_irq(adap); adap 198 drivers/media/platform/cec-gpio/cec-gpio.c cec->adap = cec_pin_allocate_adapter(&cec_gpio_pin_ops, adap 201 drivers/media/platform/cec-gpio/cec-gpio.c if (IS_ERR(cec->adap)) adap 202 drivers/media/platform/cec-gpio/cec-gpio.c return PTR_ERR(cec->adap); adap 206 drivers/media/platform/cec-gpio/cec-gpio.c cec->adap->name, cec); adap 210 drivers/media/platform/cec-gpio/cec-gpio.c cec_gpio_disable_irq(cec->adap); adap 236 drivers/media/platform/cec-gpio/cec-gpio.c ret = cec_register_adapter(cec->adap, &pdev->dev); adap 238 drivers/media/platform/cec-gpio/cec-gpio.c cec_delete_adapter(cec->adap); adap 250 drivers/media/platform/cec-gpio/cec-gpio.c cec_unregister_adapter(cec->adap); adap 37 drivers/media/platform/cros-ec-cec/cros-ec-cec.c struct cec_adapter *adap; adap 51 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cec_received_msg(cros_ec_cec->adap, &cros_ec_cec->rx_msg); adap 60 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cec_transmit_attempt_done(cros_ec_cec->adap, adap 65 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cec_transmit_attempt_done(cros_ec_cec->adap, adap 93 drivers/media/platform/cros-ec-cec/cros-ec-cec.c static int cros_ec_cec_set_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 95 drivers/media/platform/cros-ec-cec/cros-ec-cec.c struct cros_ec_cec *cros_ec_cec = adap->priv; adap 118 drivers/media/platform/cros-ec-cec/cros-ec-cec.c static int cros_ec_cec_transmit(struct cec_adapter *adap, u8 attempts, adap 121 drivers/media/platform/cros-ec-cec/cros-ec-cec.c struct cros_ec_cec *cros_ec_cec = adap->priv; adap 143 drivers/media/platform/cros-ec-cec/cros-ec-cec.c static int cros_ec_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 145 drivers/media/platform/cros-ec-cec/cros-ec-cec.c struct cros_ec_cec *cros_ec_cec = adap->priv; adap 287 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec, adap 291 drivers/media/platform/cros-ec-cec/cros-ec-cec.c if (IS_ERR(cros_ec_cec->adap)) adap 292 drivers/media/platform/cros-ec-cec/cros-ec-cec.c return PTR_ERR(cros_ec_cec->adap); adap 295 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cros_ec_cec->adap); adap 310 drivers/media/platform/cros-ec-cec/cros-ec-cec.c ret = cec_register_adapter(cros_ec_cec->adap, &pdev->dev); adap 319 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cec_delete_adapter(cros_ec_cec->adap); adap 339 drivers/media/platform/cros-ec-cec/cros-ec-cec.c cec_unregister_adapter(cros_ec_cec->adap); adap 28 drivers/media/platform/exynos4-is/fimc-is-i2c.c static u32 is_i2c_func(struct i2c_adapter *adap) adap 338 drivers/media/platform/marvell-ccic/cafe-driver.c struct i2c_adapter *adap; adap 341 drivers/media/platform/marvell-ccic/cafe-driver.c adap = kzalloc(sizeof(*adap), GFP_KERNEL); adap 342 drivers/media/platform/marvell-ccic/cafe-driver.c if (adap == NULL) adap 344 drivers/media/platform/marvell-ccic/cafe-driver.c adap->owner = THIS_MODULE; adap 345 drivers/media/platform/marvell-ccic/cafe-driver.c adap->algo = &cafe_smbus_algo; adap 346 drivers/media/platform/marvell-ccic/cafe-driver.c strscpy(adap->name, "cafe_ccic", sizeof(adap->name)); adap 347 drivers/media/platform/marvell-ccic/cafe-driver.c adap->dev.parent = &cam->pdev->dev; adap 348 drivers/media/platform/marvell-ccic/cafe-driver.c i2c_set_adapdata(adap, cam); adap 349 drivers/media/platform/marvell-ccic/cafe-driver.c ret = i2c_add_adapter(adap); adap 352 drivers/media/platform/marvell-ccic/cafe-driver.c kfree(adap); adap 356 drivers/media/platform/marvell-ccic/cafe-driver.c cam->i2c_adapter = adap; adap 182 drivers/media/platform/meson/ao-cec-g12a.c struct cec_adapter *adap; adap 449 drivers/media/platform/meson/ao-cec-g12a.c cec_received_msg(ao_cec->adap, &ao_cec->rx_msg); adap 473 drivers/media/platform/meson/ao-cec-g12a.c cec_transmit_attempt_done(ao_cec->adap, CEC_TX_STATUS_OK); adap 479 drivers/media/platform/meson/ao-cec-g12a.c cec_transmit_attempt_done(ao_cec->adap, CEC_TX_STATUS_NACK); adap 485 drivers/media/platform/meson/ao-cec-g12a.c cec_transmit_attempt_done(ao_cec->adap, CEC_TX_STATUS_ARB_LOST); adap 490 drivers/media/platform/meson/ao-cec-g12a.c cec_transmit_attempt_done(ao_cec->adap, CEC_TX_STATUS_ERROR); adap 500 drivers/media/platform/meson/ao-cec-g12a.c meson_ao_cec_g12a_set_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 502 drivers/media/platform/meson/ao-cec-g12a.c struct meson_ao_cec_g12a_device *ao_cec = adap->priv; adap 529 drivers/media/platform/meson/ao-cec-g12a.c static int meson_ao_cec_g12a_transmit(struct cec_adapter *adap, u8 attempts, adap 532 drivers/media/platform/meson/ao-cec-g12a.c struct meson_ao_cec_g12a_device *ao_cec = adap->priv; adap 582 drivers/media/platform/meson/ao-cec-g12a.c static int meson_ao_cec_g12a_adap_enable(struct cec_adapter *adap, bool enable) adap 584 drivers/media/platform/meson/ao-cec-g12a.c struct meson_ao_cec_g12a_device *ao_cec = adap->priv; adap 657 drivers/media/platform/meson/ao-cec-g12a.c ao_cec->adap = cec_allocate_adapter(&meson_ao_cec_g12a_ops, ao_cec, adap 662 drivers/media/platform/meson/ao-cec-g12a.c if (IS_ERR(ao_cec->adap)) adap 663 drivers/media/platform/meson/ao-cec-g12a.c return PTR_ERR(ao_cec->adap); adap 665 drivers/media/platform/meson/ao-cec-g12a.c ao_cec->adap->owner = THIS_MODULE; adap 720 drivers/media/platform/meson/ao-cec-g12a.c ao_cec->adap); adap 726 drivers/media/platform/meson/ao-cec-g12a.c ret = cec_register_adapter(ao_cec->adap, &pdev->dev); adap 742 drivers/media/platform/meson/ao-cec-g12a.c cec_delete_adapter(ao_cec->adap); adap 757 drivers/media/platform/meson/ao-cec-g12a.c cec_unregister_adapter(ao_cec->adap); adap 224 drivers/media/platform/meson/ao-cec.c struct cec_adapter *adap; adap 419 drivers/media/platform/meson/ao-cec.c cec_transmit_attempt_done(ao_cec->adap, tx_status); adap 423 drivers/media/platform/meson/ao-cec.c cec_transmit_attempt_done(ao_cec->adap, CEC_TX_STATUS_ERROR); adap 456 drivers/media/platform/meson/ao-cec.c cec_received_msg(ao_cec->adap, &ao_cec->rx_msg); adap 484 drivers/media/platform/meson/ao-cec.c static int meson_ao_cec_set_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 486 drivers/media/platform/meson/ao-cec.c struct meson_ao_cec_device *ao_cec = adap->priv; adap 515 drivers/media/platform/meson/ao-cec.c static int meson_ao_cec_transmit(struct cec_adapter *adap, u8 attempts, adap 518 drivers/media/platform/meson/ao-cec.c struct meson_ao_cec_device *ao_cec = adap->priv; adap 543 drivers/media/platform/meson/ao-cec.c static int meson_ao_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 545 drivers/media/platform/meson/ao-cec.c struct meson_ao_cec_device *ao_cec = adap->priv; adap 619 drivers/media/platform/meson/ao-cec.c ao_cec->adap = cec_allocate_adapter(&meson_ao_cec_ops, ao_cec, adap 624 drivers/media/platform/meson/ao-cec.c if (IS_ERR(ao_cec->adap)) adap 625 drivers/media/platform/meson/ao-cec.c return PTR_ERR(ao_cec->adap); adap 627 drivers/media/platform/meson/ao-cec.c ao_cec->adap->owner = THIS_MODULE; adap 671 drivers/media/platform/meson/ao-cec.c ao_cec->adap); adap 677 drivers/media/platform/meson/ao-cec.c ret = cec_register_adapter(ao_cec->adap, &pdev->dev); adap 694 drivers/media/platform/meson/ao-cec.c cec_delete_adapter(ao_cec->adap); adap 708 drivers/media/platform/meson/ao-cec.c cec_unregister_adapter(ao_cec->adap); adap 36 drivers/media/platform/s5p-cec/s5p_cec.c static int s5p_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 38 drivers/media/platform/s5p-cec/s5p_cec.c struct s5p_cec_dev *cec = cec_get_drvdata(adap); adap 60 drivers/media/platform/s5p-cec/s5p_cec.c static int s5p_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) adap 62 drivers/media/platform/s5p-cec/s5p_cec.c struct s5p_cec_dev *cec = cec_get_drvdata(adap); adap 68 drivers/media/platform/s5p-cec/s5p_cec.c static int s5p_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 71 drivers/media/platform/s5p-cec/s5p_cec.c struct s5p_cec_dev *cec = cec_get_drvdata(adap); adap 134 drivers/media/platform/s5p-cec/s5p_cec.c cec_transmit_done(cec->adap, CEC_TX_STATUS_OK, 0, 0, 0, 0); adap 138 drivers/media/platform/s5p-cec/s5p_cec.c cec_transmit_done(cec->adap, adap 144 drivers/media/platform/s5p-cec/s5p_cec.c cec_transmit_done(cec->adap, adap 158 drivers/media/platform/s5p-cec/s5p_cec.c cec_received_msg(cec->adap, &cec->msg); adap 217 drivers/media/platform/s5p-cec/s5p_cec.c cec->adap = cec_allocate_adapter(&s5p_cec_adap_ops, cec, CEC_NAME, adap 220 drivers/media/platform/s5p-cec/s5p_cec.c ret = PTR_ERR_OR_ZERO(cec->adap); adap 225 drivers/media/platform/s5p-cec/s5p_cec.c cec->adap); adap 231 drivers/media/platform/s5p-cec/s5p_cec.c ret = cec_register_adapter(cec->adap, &pdev->dev); adap 245 drivers/media/platform/s5p-cec/s5p_cec.c cec_delete_adapter(cec->adap); adap 254 drivers/media/platform/s5p-cec/s5p_cec.c cec_unregister_adapter(cec->adap); adap 62 drivers/media/platform/s5p-cec/s5p_cec.h struct cec_adapter *adap; adap 105 drivers/media/platform/seco-cec/seco-cec.c static int secocec_adap_enable(struct cec_adapter *adap, bool enable) adap 107 drivers/media/platform/seco-cec/seco-cec.c struct secocec_data *cec = cec_get_drvdata(adap); adap 152 drivers/media/platform/seco-cec/seco-cec.c static int secocec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 183 drivers/media/platform/seco-cec/seco-cec.c static int secocec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 236 drivers/media/platform/seco-cec/seco-cec.c static void secocec_tx_done(struct cec_adapter *adap, u16 status_val) adap 240 drivers/media/platform/seco-cec/seco-cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_NACK); adap 242 drivers/media/platform/seco-cec/seco-cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_ERROR); adap 244 drivers/media/platform/seco-cec/seco-cec.c cec_transmit_attempt_done(adap, CEC_TX_STATUS_OK); adap 254 drivers/media/platform/seco-cec/seco-cec.c static void secocec_rx_done(struct cec_adapter *adap, u16 status_val) adap 256 drivers/media/platform/seco-cec/seco-cec.c struct secocec_data *cec = cec_get_drvdata(adap); adap 34 drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c static int register_dvb(struct stdemux *demux, struct dvb_adapter *adap, adap 63 drivers/media/platform/sti/c8sectpfe/c8sectpfe-common.c result = dvb_dmxdev_init(&demux->dmxdev, adap); adap 123 drivers/media/platform/sti/cec/stih-cec.c struct cec_adapter *adap; adap 132 drivers/media/platform/sti/cec/stih-cec.c static int stih_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 134 drivers/media/platform/sti/cec/stih-cec.c struct stih_cec *cec = cec_get_drvdata(adap); adap 188 drivers/media/platform/sti/cec/stih-cec.c static int stih_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 190 drivers/media/platform/sti/cec/stih-cec.c struct stih_cec *cec = cec_get_drvdata(adap); adap 203 drivers/media/platform/sti/cec/stih-cec.c static int stih_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 206 drivers/media/platform/sti/cec/stih-cec.c struct stih_cec *cec = cec_get_drvdata(adap); adap 226 drivers/media/platform/sti/cec/stih-cec.c cec_transmit_attempt_done(cec->adap, CEC_TX_STATUS_ERROR); adap 231 drivers/media/platform/sti/cec/stih-cec.c cec_transmit_attempt_done(cec->adap, CEC_TX_STATUS_ARB_LOST); adap 236 drivers/media/platform/sti/cec/stih-cec.c cec_transmit_attempt_done(cec->adap, CEC_TX_STATUS_NACK); adap 240 drivers/media/platform/sti/cec/stih-cec.c cec_transmit_attempt_done(cec->adap, CEC_TX_STATUS_OK); adap 265 drivers/media/platform/sti/cec/stih-cec.c cec_received_msg(cec->adap, &msg); adap 339 drivers/media/platform/sti/cec/stih-cec.c cec->adap = cec_allocate_adapter(&sti_cec_adap_ops, cec, CEC_NAME, adap 343 drivers/media/platform/sti/cec/stih-cec.c ret = PTR_ERR_OR_ZERO(cec->adap); adap 348 drivers/media/platform/sti/cec/stih-cec.c cec->adap); adap 354 drivers/media/platform/sti/cec/stih-cec.c ret = cec_register_adapter(cec->adap, &pdev->dev); adap 365 drivers/media/platform/sti/cec/stih-cec.c cec_delete_adapter(cec->adap); adap 374 drivers/media/platform/sti/cec/stih-cec.c cec_unregister_adapter(cec->adap); adap 67 drivers/media/platform/stm32/stm32-cec.c struct cec_adapter *adap; adap 93 drivers/media/platform/stm32/stm32-cec.c cec_transmit_done(cec->adap, CEC_TX_STATUS_ERROR, adap 99 drivers/media/platform/stm32/stm32-cec.c cec_transmit_done(cec->adap, CEC_TX_STATUS_ARB_LOST, adap 105 drivers/media/platform/stm32/stm32-cec.c cec_transmit_done(cec->adap, CEC_TX_STATUS_NACK, adap 122 drivers/media/platform/stm32/stm32-cec.c cec_transmit_done(cec->adap, CEC_TX_STATUS_OK, 0, 0, 0, 0); adap 140 drivers/media/platform/stm32/stm32-cec.c cec_received_msg(cec->adap, &cec->rx_msg); adap 173 drivers/media/platform/stm32/stm32-cec.c static int stm32_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 175 drivers/media/platform/stm32/stm32-cec.c struct stm32_cec *cec = adap->priv; adap 194 drivers/media/platform/stm32/stm32-cec.c static int stm32_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 196 drivers/media/platform/stm32/stm32-cec.c struct stm32_cec *cec = adap->priv; adap 215 drivers/media/platform/stm32/stm32-cec.c static int stm32_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 218 drivers/media/platform/stm32/stm32-cec.c struct stm32_cec *cec = adap->priv; adap 317 drivers/media/platform/stm32/stm32-cec.c cec->adap = cec_allocate_adapter(&stm32_cec_adap_ops, cec, adap 319 drivers/media/platform/stm32/stm32-cec.c ret = PTR_ERR_OR_ZERO(cec->adap); adap 323 drivers/media/platform/stm32/stm32-cec.c ret = cec_register_adapter(cec->adap, &pdev->dev); adap 325 drivers/media/platform/stm32/stm32-cec.c cec_delete_adapter(cec->adap); adap 343 drivers/media/platform/stm32/stm32-cec.c cec_unregister_adapter(cec->adap); adap 36 drivers/media/platform/tegra-cec/tegra_cec.c struct cec_adapter *adap; adap 78 drivers/media/platform/tegra-cec/tegra_cec.c cec_transmit_attempt_done(cec->adap, cec->tx_status); adap 86 drivers/media/platform/tegra-cec/tegra_cec.c cec_received_msg(cec->adap, &msg); adap 187 drivers/media/platform/tegra-cec/tegra_cec.c static int tegra_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 189 drivers/media/platform/tegra-cec/tegra_cec.c struct tegra_cec *cec = adap->priv; adap 250 drivers/media/platform/tegra-cec/tegra_cec.c static int tegra_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) adap 252 drivers/media/platform/tegra-cec/tegra_cec.c struct tegra_cec *cec = adap->priv; adap 264 drivers/media/platform/tegra-cec/tegra_cec.c static int tegra_cec_adap_monitor_all_enable(struct cec_adapter *adap, adap 267 drivers/media/platform/tegra-cec/tegra_cec.c struct tegra_cec *cec = adap->priv; adap 278 drivers/media/platform/tegra-cec/tegra_cec.c static int tegra_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 282 drivers/media/platform/tegra-cec/tegra_cec.c struct tegra_cec *cec = adap->priv; adap 386 drivers/media/platform/tegra-cec/tegra_cec.c cec->adap = cec_allocate_adapter(&tegra_cec_ops, cec, TEGRA_CEC_NAME, adap 390 drivers/media/platform/tegra-cec/tegra_cec.c if (IS_ERR(cec->adap)) { adap 397 drivers/media/platform/tegra-cec/tegra_cec.c cec->adap); adap 403 drivers/media/platform/tegra-cec/tegra_cec.c ret = cec_register_adapter(cec->adap, &pdev->dev); adap 414 drivers/media/platform/tegra-cec/tegra_cec.c cec_delete_adapter(cec->adap); adap 427 drivers/media/platform/tegra-cec/tegra_cec.c cec_unregister_adapter(cec->adap); adap 34 drivers/media/platform/vivid/vivid-cec.c cec_transmit_attempt_done(cw->adap, CEC_TX_STATUS_LOW_DRIVE); adap 41 drivers/media/platform/vivid/vivid-cec.c struct cec_adapter *adap, u8 dest) adap 48 drivers/media/platform/vivid/vivid-cec.c if (adap != dev->cec_rx_adap && dev->cec_rx_adap && adap 54 drivers/media/platform/vivid/vivid-cec.c if (adap == dev->cec_tx_adap[i]) adap 64 drivers/media/platform/vivid/vivid-cec.c static void vivid_cec_pin_adap_events(struct cec_adapter *adap, ktime_t ts, adap 71 drivers/media/platform/vivid/vivid-cec.c if (adap == NULL) adap 82 drivers/media/platform/vivid/vivid-cec.c cec_queue_pin_cec_event(adap, false, false, ts); adap 84 drivers/media/platform/vivid/vivid-cec.c cec_queue_pin_cec_event(adap, true, false, ts); adap 99 drivers/media/platform/vivid/vivid-cec.c cec_queue_pin_cec_event(adap, false, false, ts); adap 104 drivers/media/platform/vivid/vivid-cec.c cec_queue_pin_cec_event(adap, true, false, ts); adap 128 drivers/media/platform/vivid/vivid-cec.c struct cec_adapter *adap = cw->adap; adap 135 drivers/media/platform/vivid/vivid-cec.c valid_dest = vivid_cec_find_dest_adap(dev, adap, dest); adap 144 drivers/media/platform/vivid/vivid-cec.c cec_transmit_attempt_done(cw->adap, cw->tx_status); adap 147 drivers/media/platform/vivid/vivid-cec.c if (adap != dev->cec_rx_adap) adap 150 drivers/media/platform/vivid/vivid-cec.c if (adap != dev->cec_tx_adap[i]) adap 165 drivers/media/platform/vivid/vivid-cec.c cec_transmit_attempt_done(cw->adap, CEC_TX_STATUS_ARB_LOST); adap 176 drivers/media/platform/vivid/vivid-cec.c static int vivid_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 178 drivers/media/platform/vivid/vivid-cec.c adap->cec_pin_is_high = true; adap 182 drivers/media/platform/vivid/vivid-cec.c static int vivid_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 193 drivers/media/platform/vivid/vivid-cec.c static int vivid_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 196 drivers/media/platform/vivid/vivid-cec.c struct vivid_dev *dev = cec_get_drvdata(adap); adap 203 drivers/media/platform/vivid/vivid-cec.c cw->adap = adap; adap 225 drivers/media/platform/vivid/vivid-cec.c static int vivid_received(struct cec_adapter *adap, struct cec_msg *msg) adap 227 drivers/media/platform/vivid/vivid-cec.c struct vivid_dev *dev = cec_get_drvdata(adap); adap 234 drivers/media/platform/vivid/vivid-cec.c dest = adap->log_addrs.log_addr[0]; adap 239 drivers/media/platform/vivid/vivid-cec.c if (!cec_is_sink(adap)) adap 258 drivers/media/platform/vivid/vivid-cec.c cec_transmit_msg(adap, &reply, false); adap 1233 drivers/media/platform/vivid/vivid-core.c struct cec_adapter *adap; adap 1235 drivers/media/platform/vivid/vivid-core.c adap = vivid_cec_alloc_adap(dev, 0, false); adap 1236 drivers/media/platform/vivid/vivid-core.c ret = PTR_ERR_OR_ZERO(adap); adap 1239 drivers/media/platform/vivid/vivid-core.c dev->cec_rx_adap = adap; adap 1244 drivers/media/platform/vivid/vivid-core.c struct cec_adapter *adap; adap 1250 drivers/media/platform/vivid/vivid-core.c adap = vivid_cec_alloc_adap(dev, cec_tx_bus_cnt, true); adap 1251 drivers/media/platform/vivid/vivid-core.c ret = PTR_ERR_OR_ZERO(adap); adap 1258 drivers/media/platform/vivid/vivid-core.c dev->cec_tx_adap[cec_tx_bus_cnt] = adap; adap 116 drivers/media/platform/vivid/vivid-core.h struct cec_adapter *adap; adap 1000 drivers/media/platform/vivid/vivid-vid-common.c struct cec_adapter *adap; adap 1008 drivers/media/platform/vivid/vivid-vid-common.c adap = dev->cec_rx_adap; adap 1019 drivers/media/platform/vivid/vivid-vid-common.c adap = dev->cec_tx_adap[bus_idx]; adap 1031 drivers/media/platform/vivid/vivid-vid-common.c if (adap) adap 1032 drivers/media/platform/vivid/vivid-vid-common.c v4l2_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr); adap 605 drivers/media/tuners/mt20xx.c priv->i2c_props.adap = i2c_adap; adap 455 drivers/media/tuners/mxl5007t.c ret = i2c_transfer(state->i2c_props.adap, &msg, 1); adap 488 drivers/media/tuners/mxl5007t.c ret = i2c_transfer(state->i2c_props.adap, msg, 2); adap 503 drivers/media/tuners/mxl5007t.c int ret = i2c_transfer(state->i2c_props.adap, &msg, 1); adap 833 drivers/media/tuners/mxl5007t.c i2c_adapter_id(state->i2c_props.adap), adap 838 drivers/media/tuners/mxl5007t.c i2c_adapter_id(state->i2c_props.adap), adap 125 drivers/media/tuners/tda18271-common.c ret = i2c_transfer(priv->i2c_props.adap, msg, 2); adap 155 drivers/media/tuners/tda18271-common.c ret = i2c_transfer(priv->i2c_props.adap, msg, 2); adap 216 drivers/media/tuners/tda18271-common.c i2c_lock_bus(priv->i2c_props.adap, I2C_LOCK_SEGMENT); adap 229 drivers/media/tuners/tda18271-common.c ret = __i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 237 drivers/media/tuners/tda18271-common.c i2c_unlock_bus(priv->i2c_props.adap, I2C_LOCK_SEGMENT); adap 283 drivers/media/tuners/tda18271-common.c i2c_adapter_id(priv->i2c_props.adap), adap 291 drivers/media/tuners/tda18271-common.c i2c_lock_bus(priv->i2c_props.adap, I2C_LOCK_SEGMENT); adap 507 drivers/media/tuners/tda18271-common.c i2c_unlock_bus(priv->i2c_props.adap, I2C_LOCK_SEGMENT); adap 718 drivers/media/tuners/tda18271-common.c level, func, i2c_adapter_id(state->i2c_props.adap), adap 868 drivers/media/tuners/tda18271-fe.c ret = fe->callback(priv->i2c_props.adap->algo_data, adap 1159 drivers/media/tuners/tda18271-fe.c i2c_adapter_id(priv->i2c_props.adap), adap 1175 drivers/media/tuners/tda18271-fe.c regs[R_ID], i2c_adapter_id(priv->i2c_props.adap), adap 1181 drivers/media/tuners/tda18271-fe.c i2c_adapter_id(priv->i2c_props.adap), priv->i2c_props.addr); adap 468 drivers/media/tuners/tda8290.c i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 543 drivers/media/tuners/tda8290.c i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 584 drivers/media/tuners/tda8290.c ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 601 drivers/media/tuners/tda8290.c ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 621 drivers/media/tuners/tda8290.c ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); adap 635 drivers/media/tuners/tda8290.c priv->i2c_props.adap, &tda829x_tda18271_config); adap 643 drivers/media/tuners/tda8290.c priv->i2c_props.adap, &priv->cfg); adap 668 drivers/media/tuners/tda8290.c if (i2c_transfer(i2c_props->adap, msg_read, 2) != 2) { adap 677 drivers/media/tuners/tda8290.c __func__, i2c_adapter_id(i2c_props->adap), adap 695 drivers/media/tuners/tda8290.c if (i2c_transfer(i2c_props->adap, msg_read, 2) != 2) { adap 706 drivers/media/tuners/tda8290.c i2c_adapter_id(i2c_props->adap), adap 743 drivers/media/tuners/tda8290.c priv->i2c_props.adap = i2c_adap; adap 823 drivers/media/tuners/tda8290.c .adap = i2c_adap, adap 266 drivers/media/tuners/tea5761.c struct tuner_i2c_props i2c = { .adap = i2c_adap, .addr = i2c_addr }; adap 324 drivers/media/tuners/tea5761.c priv->i2c_props.adap = i2c_adap; adap 370 drivers/media/tuners/tea5767.c struct tuner_i2c_props i2c = { .adap = i2c_adap, .addr = i2c_addr }; adap 450 drivers/media/tuners/tea5767.c priv->i2c_props.adap = i2c_adap; adap 17 drivers/media/tuners/tuner-i2c.h struct i2c_adapter *adap; adap 29 drivers/media/tuners/tuner-i2c.h int ret = i2c_transfer(props->adap, &msg, 1); adap 39 drivers/media/tuners/tuner-i2c.h int ret = i2c_transfer(props->adap, &msg, 1); adap 52 drivers/media/tuners/tuner-i2c.h int ret = i2c_transfer(props->adap, msg, 2); adap 77 drivers/media/tuners/tuner-i2c.h i2cprops.adap ? \ adap 78 drivers/media/tuners/tuner-i2c.h i2c_adapter_id(i2cprops.adap) : -1, \ adap 123 drivers/media/tuners/tuner-i2c.h if (((i2cadap) && (state->i2c_props.adap)) && \ adap 124 drivers/media/tuners/tuner-i2c.h ((i2c_adapter_id(state->i2c_props.adap) == \ adap 139 drivers/media/tuners/tuner-i2c.h state->i2c_props.adap = i2cadap; \ adap 172 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL) adap 194 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL || !priv->radio_mode) adap 649 drivers/media/tuners/tuner-simple.c i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, adap 747 drivers/media/tuners/tuner-simple.c i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, adap 774 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL) adap 923 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL) adap 964 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL) adap 987 drivers/media/tuners/tuner-simple.c if (priv->i2c_props.adap == NULL) adap 538 drivers/media/tuners/tuner-xc2028.c fe->dvb->priv : priv->i2c_props.adap->algo_data, adap 1422 drivers/media/tuners/tuner-xc2028.c priv->i2c_props.adap->dev.parent, adap 245 drivers/media/tuners/xc4000.c if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) { adap 268 drivers/media/tuners/xc4000.c priv->i2c_props.adap->algo_data, adap 542 drivers/media/tuners/xc4000.c if (i2c_transfer(priv->i2c_props.adap, msg, 2) != 2) { adap 720 drivers/media/tuners/xc4000.c priv->i2c_props.adap->dev.parent); adap 725 drivers/media/tuners/xc4000.c priv->i2c_props.adap->dev.parent); adap 730 drivers/media/tuners/xc4000.c priv->i2c_props.adap->dev.parent); adap 249 drivers/media/tuners/xc5000.c if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) { adap 265 drivers/media/tuners/xc5000.c if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) { adap 284 drivers/media/tuners/xc5000.c if (i2c_transfer(priv->i2c_props.adap, msg, 2) != 2) { adap 303 drivers/media/tuners/xc5000.c priv->i2c_props.adap->algo_data, adap 1040 drivers/media/tuners/xc5000.c if (priv->i2c_props.adap == NULL) adap 1115 drivers/media/tuners/xc5000.c priv->i2c_props.adap->dev.parent); adap 18 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_turn_on(struct as10x_bus_adapter_t *adap) adap 23 drivers/media/usb/as102/as10x_cmd.c pcmd = adap->cmd; adap 24 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 27 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 34 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 35 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 59 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_turn_off(struct as10x_bus_adapter_t *adap) adap 64 drivers/media/usb/as102/as10x_cmd.c pcmd = adap->cmd; adap 65 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 68 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 75 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 76 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd( adap 77 drivers/media/usb/as102/as10x_cmd.c adap, (uint8_t *) pcmd, adap 100 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_set_tune(struct as10x_bus_adapter_t *adap, adap 106 drivers/media/usb/as102/as10x_cmd.c preq = adap->cmd; adap 107 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 110 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(preq, (++adap->cmd_xid), adap 128 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 129 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd(adap, adap 155 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_get_tune_status(struct as10x_bus_adapter_t *adap, adap 161 drivers/media/usb/as102/as10x_cmd.c preq = adap->cmd; adap 162 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 165 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(preq, (++adap->cmd_xid), adap 173 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 174 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd( adap 175 drivers/media/usb/as102/as10x_cmd.c adap, adap 208 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_get_tps(struct as10x_bus_adapter_t *adap, struct as10x_tps *ptps) adap 213 drivers/media/usb/as102/as10x_cmd.c pcmd = adap->cmd; adap 214 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 217 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 225 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 226 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd(adap, adap 266 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_get_demod_stats(struct as10x_bus_adapter_t *adap, adap 272 drivers/media/usb/as102/as10x_cmd.c pcmd = adap->cmd; adap 273 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 276 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 284 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 285 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd(adap, adap 326 drivers/media/usb/as102/as10x_cmd.c int as10x_cmd_get_impulse_resp(struct as10x_bus_adapter_t *adap, adap 332 drivers/media/usb/as102/as10x_cmd.c pcmd = adap->cmd; adap 333 drivers/media/usb/as102/as10x_cmd.c prsp = adap->rsp; adap 336 drivers/media/usb/as102/as10x_cmd.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 344 drivers/media/usb/as102/as10x_cmd.c if (adap->ops->xfer_cmd) { adap 345 drivers/media/usb/as102/as10x_cmd.c error = adap->ops->xfer_cmd(adap, adap 477 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_turn_on(struct as10x_bus_adapter_t *adap); adap 478 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_turn_off(struct as10x_bus_adapter_t *adap); adap 480 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_set_tune(struct as10x_bus_adapter_t *adap, adap 483 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_get_tune_status(struct as10x_bus_adapter_t *adap, adap 486 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_get_tps(struct as10x_bus_adapter_t *adap, adap 489 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_get_demod_stats(struct as10x_bus_adapter_t *adap, adap 492 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_get_impulse_resp(struct as10x_bus_adapter_t *adap, adap 496 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_add_PID_filter(struct as10x_bus_adapter_t *adap, adap 498 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_del_PID_filter(struct as10x_bus_adapter_t *adap, adap 501 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_start_streaming(struct as10x_bus_adapter_t *adap); adap 502 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_stop_streaming(struct as10x_bus_adapter_t *adap); adap 505 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_set_context(struct as10x_bus_adapter_t *adap, adap 508 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_get_context(struct as10x_bus_adapter_t *adap, adap 512 drivers/media/usb/as102/as10x_cmd.h int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode); adap 23 drivers/media/usb/as102/as10x_cmd_cfg.c int as10x_cmd_get_context(struct as10x_bus_adapter_t *adap, uint16_t tag, adap 29 drivers/media/usb/as102/as10x_cmd_cfg.c pcmd = adap->cmd; adap 30 drivers/media/usb/as102/as10x_cmd_cfg.c prsp = adap->rsp; adap 33 drivers/media/usb/as102/as10x_cmd_cfg.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 42 drivers/media/usb/as102/as10x_cmd_cfg.c if (adap->ops->xfer_cmd) { adap 43 drivers/media/usb/as102/as10x_cmd_cfg.c error = adap->ops->xfer_cmd(adap, adap 79 drivers/media/usb/as102/as10x_cmd_cfg.c int as10x_cmd_set_context(struct as10x_bus_adapter_t *adap, uint16_t tag, adap 85 drivers/media/usb/as102/as10x_cmd_cfg.c pcmd = adap->cmd; adap 86 drivers/media/usb/as102/as10x_cmd_cfg.c prsp = adap->rsp; adap 89 drivers/media/usb/as102/as10x_cmd_cfg.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 100 drivers/media/usb/as102/as10x_cmd_cfg.c if (adap->ops->xfer_cmd) { adap 101 drivers/media/usb/as102/as10x_cmd_cfg.c error = adap->ops->xfer_cmd(adap, adap 134 drivers/media/usb/as102/as10x_cmd_cfg.c int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode) adap 139 drivers/media/usb/as102/as10x_cmd_cfg.c pcmd = adap->cmd; adap 140 drivers/media/usb/as102/as10x_cmd_cfg.c prsp = adap->rsp; adap 143 drivers/media/usb/as102/as10x_cmd_cfg.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 152 drivers/media/usb/as102/as10x_cmd_cfg.c if (adap->ops->xfer_cmd) { adap 153 drivers/media/usb/as102/as10x_cmd_cfg.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 18 drivers/media/usb/as102/as10x_cmd_stream.c int as10x_cmd_add_PID_filter(struct as10x_bus_adapter_t *adap, adap 24 drivers/media/usb/as102/as10x_cmd_stream.c pcmd = adap->cmd; adap 25 drivers/media/usb/as102/as10x_cmd_stream.c prsp = adap->rsp; adap 28 drivers/media/usb/as102/as10x_cmd_stream.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 43 drivers/media/usb/as102/as10x_cmd_stream.c if (adap->ops->xfer_cmd) { adap 44 drivers/media/usb/as102/as10x_cmd_stream.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 75 drivers/media/usb/as102/as10x_cmd_stream.c int as10x_cmd_del_PID_filter(struct as10x_bus_adapter_t *adap, adap 81 drivers/media/usb/as102/as10x_cmd_stream.c pcmd = adap->cmd; adap 82 drivers/media/usb/as102/as10x_cmd_stream.c prsp = adap->rsp; adap 85 drivers/media/usb/as102/as10x_cmd_stream.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 94 drivers/media/usb/as102/as10x_cmd_stream.c if (adap->ops->xfer_cmd) { adap 95 drivers/media/usb/as102/as10x_cmd_stream.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 120 drivers/media/usb/as102/as10x_cmd_stream.c int as10x_cmd_start_streaming(struct as10x_bus_adapter_t *adap) adap 125 drivers/media/usb/as102/as10x_cmd_stream.c pcmd = adap->cmd; adap 126 drivers/media/usb/as102/as10x_cmd_stream.c prsp = adap->rsp; adap 129 drivers/media/usb/as102/as10x_cmd_stream.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 137 drivers/media/usb/as102/as10x_cmd_stream.c if (adap->ops->xfer_cmd) { adap 138 drivers/media/usb/as102/as10x_cmd_stream.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 163 drivers/media/usb/as102/as10x_cmd_stream.c int as10x_cmd_stop_streaming(struct as10x_bus_adapter_t *adap) adap 168 drivers/media/usb/as102/as10x_cmd_stream.c pcmd = adap->cmd; adap 169 drivers/media/usb/as102/as10x_cmd_stream.c prsp = adap->rsp; adap 172 drivers/media/usb/as102/as10x_cmd_stream.c as10x_cmd_build(pcmd, (++adap->cmd_xid), adap 180 drivers/media/usb/as102/as10x_cmd_stream.c if (adap->ops->xfer_cmd) { adap 181 drivers/media/usb/as102/as10x_cmd_stream.c error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, adap 317 drivers/media/usb/au0828/au0828-i2c.c static u32 au0828_functionality(struct i2c_adapter *adap) adap 438 drivers/media/usb/cx231xx/cx231xx-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 480 drivers/media/usb/cx231xx/cx231xx-i2c.c struct i2c_adapter *adap; adap 492 drivers/media/usb/cx231xx/cx231xx-i2c.c adap = cx231xx_get_i2c_adap(dev, i2c_port); adap 496 drivers/media/usb/cx231xx/cx231xx-i2c.c rc = i2c_transfer(adap, &msg, 1); adap 138 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 141 drivers/media/usb/dvb-usb-v2/af9015.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 843 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) adap 845 drivers/media/usb/dvb-usb-v2/af9015.c struct af9015_state *state = adap_to_priv(adap); adap 846 drivers/media/usb/dvb-usb-v2/af9015.c struct dvb_usb_device *d = adap_to_d(adap); adap 851 drivers/media/usb/dvb-usb-v2/af9015.c dev_dbg(&intf->dev, "adap id %u\n", adap->id); adap 853 drivers/media/usb/dvb-usb-v2/af9015.c if (adap->id == 0) { adap 858 drivers/media/usb/dvb-usb-v2/af9015.c } else if (adap->id == 1) { adap 870 drivers/media/usb/dvb-usb-v2/af9015.c ret = af9015_copy_firmware(adap_to_d(adap)); adap 885 drivers/media/usb/dvb-usb-v2/af9015.c state->af9013_i2c_addr[adap->id], adap 886 drivers/media/usb/dvb-usb-v2/af9015.c &state->af9013_pdata[adap->id]); adap 891 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0] = state->af9013_pdata[adap->id].get_dvb_frontend(client); adap 892 drivers/media/usb/dvb-usb-v2/af9015.c state->demod_i2c_client[adap->id] = client; adap 901 drivers/media/usb/dvb-usb-v2/af9015.c if (adap->fe[0]) { adap 902 drivers/media/usb/dvb-usb-v2/af9015.c state->set_frontend[adap->id] = adap->fe[0]->ops.set_frontend; adap 903 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.set_frontend = af9015_af9013_set_frontend; adap 904 drivers/media/usb/dvb-usb-v2/af9015.c state->read_status[adap->id] = adap->fe[0]->ops.read_status; adap 905 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.read_status = af9015_af9013_read_status; adap 906 drivers/media/usb/dvb-usb-v2/af9015.c state->init[adap->id] = adap->fe[0]->ops.init; adap 907 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.init = af9015_af9013_init; adap 908 drivers/media/usb/dvb-usb-v2/af9015.c state->sleep[adap->id] = adap->fe[0]->ops.sleep; adap 909 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.sleep = af9015_af9013_sleep; adap 918 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_frontend_detach(struct dvb_usb_adapter *adap) adap 920 drivers/media/usb/dvb-usb-v2/af9015.c struct af9015_state *state = adap_to_priv(adap); adap 921 drivers/media/usb/dvb-usb-v2/af9015.c struct dvb_usb_device *d = adap_to_d(adap); adap 925 drivers/media/usb/dvb-usb-v2/af9015.c dev_dbg(&intf->dev, "adap id %u\n", adap->id); adap 928 drivers/media/usb/dvb-usb-v2/af9015.c client = state->demod_i2c_client[adap->id]; adap 997 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_tuner_attach(struct dvb_usb_adapter *adap) adap 999 drivers/media/usb/dvb-usb-v2/af9015.c struct dvb_usb_device *d = adap_to_d(adap); adap 1006 drivers/media/usb/dvb-usb-v2/af9015.c dev_dbg(&intf->dev, "adap id %u\n", adap->id); adap 1008 drivers/media/usb/dvb-usb-v2/af9015.c client = state->demod_i2c_client[adap->id]; adap 1009 drivers/media/usb/dvb-usb-v2/af9015.c adapter = state->af9013_pdata[adap->id].get_i2c_adapter(client); adap 1011 drivers/media/usb/dvb-usb-v2/af9015.c switch (state->af9013_pdata[adap->id].tuner) { adap 1014 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(mt2060_attach, adap->fe[0], adapter, adap 1016 drivers/media/usb/dvb-usb-v2/af9015.c state->mt2060_if1[adap->id]) == NULL ? -ENODEV : 0; adap 1020 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(qt1010_attach, adap->fe[0], adapter, adap 1024 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(tda18271_attach, adap->fe[0], 0x60, adapter, adap 1028 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(tda18218_attach, adap->fe[0], adapter, adap 1032 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(mxl5005s_attach, adap->fe[0], adapter, adap 1037 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(mxl5005s_attach, adap->fe[0], adapter, adap 1041 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, adapter, adap 1045 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(mc44s803_attach, adap->fe[0], adapter, adap 1049 drivers/media/usb/dvb-usb-v2/af9015.c ret = dvb_attach(mxl5007t_attach, adap->fe[0], adapter, adap 1055 drivers/media/usb/dvb-usb-v2/af9015.c state->af9013_pdata[adap->id].tuner); adap 1059 drivers/media/usb/dvb-usb-v2/af9015.c if (adap->fe[0]->ops.tuner_ops.init) { adap 1060 drivers/media/usb/dvb-usb-v2/af9015.c state->tuner_init[adap->id] = adap 1061 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.tuner_ops.init; adap 1062 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.tuner_ops.init = af9015_tuner_init; adap 1065 drivers/media/usb/dvb-usb-v2/af9015.c if (adap->fe[0]->ops.tuner_ops.sleep) { adap 1066 drivers/media/usb/dvb-usb-v2/af9015.c state->tuner_sleep[adap->id] = adap 1067 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.tuner_ops.sleep; adap 1068 drivers/media/usb/dvb-usb-v2/af9015.c adap->fe[0]->ops.tuner_ops.sleep = af9015_tuner_sleep; adap 1074 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 1076 drivers/media/usb/dvb-usb-v2/af9015.c struct af9015_state *state = adap_to_priv(adap); adap 1077 drivers/media/usb/dvb-usb-v2/af9015.c struct af9013_platform_data *pdata = &state->af9013_pdata[adap->id]; adap 1081 drivers/media/usb/dvb-usb-v2/af9015.c ret = pdata->pid_filter_ctrl(adap->fe[0], onoff); adap 1087 drivers/media/usb/dvb-usb-v2/af9015.c static int af9015_pid_filter(struct dvb_usb_adapter *adap, int index, adap 1090 drivers/media/usb/dvb-usb-v2/af9015.c struct af9015_state *state = adap_to_priv(adap); adap 1091 drivers/media/usb/dvb-usb-v2/af9015.c struct af9013_platform_data *pdata = &state->af9013_pdata[adap->id]; adap 1095 drivers/media/usb/dvb-usb-v2/af9015.c ret = pdata->pid_filter(adap->fe[0], index, pid, onoff); adap 266 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_i2c_master_xfer(struct i2c_adapter *adap, adap 269 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 1137 drivers/media/usb/dvb-usb-v2/af9035.c struct i2c_adapter *adap = adapter_priv; adap 1138 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 1161 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_frontend_attach(struct dvb_usb_adapter *adap) adap 1163 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1164 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1168 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1170 drivers/media/usb/dvb-usb-v2/af9035.c if (!state->af9033_config[adap->id].tuner) { adap 1176 drivers/media/usb/dvb-usb-v2/af9035.c state->af9033_config[adap->id].fe = &adap->fe[0]; adap 1177 drivers/media/usb/dvb-usb-v2/af9035.c state->af9033_config[adap->id].ops = &state->ops; adap 1178 drivers/media/usb/dvb-usb-v2/af9035.c ret = af9035_add_i2c_dev(d, "af9033", state->af9033_i2c_addr[adap->id], adap 1179 drivers/media/usb/dvb-usb-v2/af9035.c &state->af9033_config[adap->id], &d->i2c_adap); adap 1183 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->fe[0] == NULL) { adap 1189 drivers/media/usb/dvb-usb-v2/af9035.c adap->fe[0]->ops.i2c_gate_ctrl = NULL; adap 1190 drivers/media/usb/dvb-usb-v2/af9035.c adap->fe[0]->callback = af9035_frontend_callback; adap 1200 drivers/media/usb/dvb-usb-v2/af9035.c static int it930x_frontend_attach(struct dvb_usb_adapter *adap) adap 1202 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1203 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1209 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1255 drivers/media/usb/dvb-usb-v2/af9035.c si2168_config.fe = &adap->fe[0]; adap 1258 drivers/media/usb/dvb-usb-v2/af9035.c state->af9033_config[adap->id].fe = &adap->fe[0]; adap 1259 drivers/media/usb/dvb-usb-v2/af9035.c state->af9033_config[adap->id].ops = &state->ops; adap 1266 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->fe[0] == NULL) { adap 1280 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_frontend_detach(struct dvb_usb_adapter *adap) adap 1282 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1283 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1286 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1288 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 1) { adap 1291 drivers/media/usb/dvb-usb-v2/af9035.c } else if (adap->id == 0) { adap 1340 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_tuner_attach(struct dvb_usb_adapter *adap) adap 1342 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1343 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1350 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1357 drivers/media/usb/dvb-usb-v2/af9035.c switch (state->af9033_config[adap->id].tuner) { adap 1360 drivers/media/usb/dvb-usb-v2/af9035.c .dvb_frontend = adap->fe[0], adap 1391 drivers/media/usb/dvb-usb-v2/af9035.c fe = adap->fe[0]; adap 1395 drivers/media/usb/dvb-usb-v2/af9035.c fe = dvb_attach(fc0011_attach, adap->fe[0], adap 1399 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 0) { adap 1450 drivers/media/usb/dvb-usb-v2/af9035.c fe = dvb_attach(mxl5007t_attach, adap->fe[0], &d->i2c_adap, adap 1451 drivers/media/usb/dvb-usb-v2/af9035.c tuner_addr, &af9035_mxl5007t_config[adap->id]); adap 1455 drivers/media/usb/dvb-usb-v2/af9035.c fe = dvb_attach(tda18218_attach, adap->fe[0], adap 1460 drivers/media/usb/dvb-usb-v2/af9035.c .dvb_frontend = adap->fe[0], adap 1483 drivers/media/usb/dvb-usb-v2/af9035.c fe = adap->fe[0]; adap 1493 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 0) { adap 1523 drivers/media/usb/dvb-usb-v2/af9035.c fe = dvb_attach(fc0012_attach, adap->fe[0], &d->i2c_adap, adap 1524 drivers/media/usb/dvb-usb-v2/af9035.c &af9035_fc0012_config[adap->id]); adap 1536 drivers/media/usb/dvb-usb-v2/af9035.c .regmap = state->af9033_config[adap->id].regmap, adap 1537 drivers/media/usb/dvb-usb-v2/af9035.c .fe = adap->fe[0], adap 1540 drivers/media/usb/dvb-usb-v2/af9035.c switch (state->af9033_config[adap->id].tuner) { adap 1557 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 0) adap 1580 drivers/media/usb/dvb-usb-v2/af9035.c state->platform_device_tuner[adap->id] = pdev; adap 1581 drivers/media/usb/dvb-usb-v2/af9035.c fe = adap->fe[0]; adap 1601 drivers/media/usb/dvb-usb-v2/af9035.c static int it930x_tuner_attach(struct dvb_usb_adapter *adap) adap 1603 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1604 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1609 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1612 drivers/media/usb/dvb-usb-v2/af9035.c si2157_config.fe = adap->fe[0]; adap 1629 drivers/media/usb/dvb-usb-v2/af9035.c static int it930x_tuner_detach(struct dvb_usb_adapter *adap) adap 1631 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1632 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1635 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1637 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 1) { adap 1640 drivers/media/usb/dvb-usb-v2/af9035.c } else if (adap->id == 0) { adap 1649 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_tuner_detach(struct dvb_usb_adapter *adap) adap 1651 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1652 drivers/media/usb/dvb-usb-v2/af9035.c struct dvb_usb_device *d = adap_to_d(adap); adap 1655 drivers/media/usb/dvb-usb-v2/af9035.c dev_dbg(&intf->dev, "adap->id=%d\n", adap->id); adap 1657 drivers/media/usb/dvb-usb-v2/af9035.c switch (state->af9033_config[adap->id].tuner) { adap 1660 drivers/media/usb/dvb-usb-v2/af9035.c if (adap->id == 1) { adap 1663 drivers/media/usb/dvb-usb-v2/af9035.c } else if (adap->id == 0) { adap 1677 drivers/media/usb/dvb-usb-v2/af9035.c pdev = state->platform_device_tuner[adap->id]; adap 1913 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 1915 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1917 drivers/media/usb/dvb-usb-v2/af9035.c return state->ops.pid_filter_ctrl(adap->fe[0], onoff); adap 1920 drivers/media/usb/dvb-usb-v2/af9035.c static int af9035_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, adap 1923 drivers/media/usb/dvb-usb-v2/af9035.c struct state *state = adap_to_priv(adap); adap 1925 drivers/media/usb/dvb-usb-v2/af9035.c return state->ops.pid_filter(adap->fe[0], index, pid, onoff); adap 193 drivers/media/usb/dvb-usb-v2/anysee.c static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 196 drivers/media/usb/dvb-usb-v2/anysee.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 706 drivers/media/usb/dvb-usb-v2/anysee.c static int anysee_frontend_attach(struct dvb_usb_adapter *adap) adap 708 drivers/media/usb/dvb-usb-v2/anysee.c struct anysee_state *state = adap_to_priv(adap); adap 709 drivers/media/usb/dvb-usb-v2/anysee.c struct dvb_usb_device *d = adap_to_d(adap); adap 731 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(mt352_attach, &anysee_mt352_config, adap 733 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[0]) adap 737 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(zl10353_attach, &anysee_zl10353_config, adap 755 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(zl10353_attach, &anysee_zl10353_config, adap 768 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(tda10023_attach, adap 781 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(cx24116_attach, &anysee_cx24116_config, adap 823 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(tda10023_attach, adap 828 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[0]) adap 829 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0]->ops.i2c_gate_ctrl = adap 833 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(tda10023_attach, adap 839 drivers/media/usb/dvb-usb-v2/anysee.c if (!adap->fe[0]) adap 855 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1] = dvb_attach(zl10353_attach, adap 860 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[1]) adap 861 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1]->ops.i2c_gate_ctrl = adap 865 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1] = dvb_attach(zl10353_attach, adap 887 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(tda10023_attach, adap 892 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[0]) adap 893 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0]->ops.i2c_gate_ctrl = anysee_i2c_gate_ctrl; adap 896 drivers/media/usb/dvb-usb-v2/anysee.c if (!adap->fe[0]) adap 910 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1] = dvb_attach(zl10353_attach, adap 915 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[1]) adap 916 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1]->ops.i2c_gate_ctrl = anysee_i2c_gate_ctrl; adap 932 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(stv0900_attach, adap 947 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0] = dvb_attach(cxd2820r_attach, adap 955 drivers/media/usb/dvb-usb-v2/anysee.c if (!adap->fe[0]) { adap 966 drivers/media/usb/dvb-usb-v2/anysee.c static int anysee_tuner_attach(struct dvb_usb_adapter *adap) adap 968 drivers/media/usb/dvb-usb-v2/anysee.c struct anysee_state *state = adap_to_priv(adap); adap 969 drivers/media/usb/dvb-usb-v2/anysee.c struct dvb_usb_device *d = adap_to_d(adap); adap 979 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), NULL, adap 987 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), adap 995 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc0 >> 1), adap 1003 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(isl6423_attach, adap->fe[0], &d->i2c_adap, adap 1019 drivers/media/usb/dvb-usb-v2/anysee.c tda18212_config.fe = adap->fe[0]; adap 1026 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[1]) { adap 1027 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1]->tuner_priv = adap 1028 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[0]->tuner_priv; adap 1029 drivers/media/usb/dvb-usb-v2/anysee.c memcpy(&adap->fe[1]->ops.tuner_ops, adap 1030 drivers/media/usb/dvb-usb-v2/anysee.c &adap->fe[0]->ops.tuner_ops, adap 1037 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(dvb_pll_attach, adap->fe[0], adap 1041 drivers/media/usb/dvb-usb-v2/anysee.c if (fe && adap->fe[1]) { adap 1043 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(dvb_pll_attach, adap->fe[1], adap 1057 drivers/media/usb/dvb-usb-v2/anysee.c tda18212_config.fe = adap->fe[0]; adap 1063 drivers/media/usb/dvb-usb-v2/anysee.c if (adap->fe[1]) { adap 1064 drivers/media/usb/dvb-usb-v2/anysee.c adap->fe[1]->tuner_priv = adap->fe[0]->tuner_priv; adap 1065 drivers/media/usb/dvb-usb-v2/anysee.c memcpy(&adap->fe[1]->ops.tuner_ops, adap 1066 drivers/media/usb/dvb-usb-v2/anysee.c &adap->fe[0]->ops.tuner_ops, adap 1078 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(stv6110_attach, adap->fe[0], adap 1083 drivers/media/usb/dvb-usb-v2/anysee.c fe = dvb_attach(isl6423_attach, adap->fe[0], adap 1095 drivers/media/usb/dvb-usb-v2/anysee.c tda18212_config.fe = adap->fe[0]; adap 83 drivers/media/usb/dvb-usb-v2/au6610.c static int au6610_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 86 drivers/media/usb/dvb-usb-v2/au6610.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 130 drivers/media/usb/dvb-usb-v2/au6610.c static int au6610_zl10353_frontend_attach(struct dvb_usb_adapter *adap) adap 132 drivers/media/usb/dvb-usb-v2/au6610.c adap->fe[0] = dvb_attach(zl10353_attach, &au6610_zl10353_config, adap 133 drivers/media/usb/dvb-usb-v2/au6610.c &adap_to_d(adap)->i2c_adap); adap 134 drivers/media/usb/dvb-usb-v2/au6610.c if (adap->fe[0] == NULL) adap 144 drivers/media/usb/dvb-usb-v2/au6610.c static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) adap 146 drivers/media/usb/dvb-usb-v2/au6610.c return dvb_attach(qt1010_attach, adap->fe[0], adap 147 drivers/media/usb/dvb-usb-v2/au6610.c &adap_to_d(adap)->i2c_adap, adap 79 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_adapter *adap = fe->sec_priv; adap 84 drivers/media/usb/dvb-usb-v2/az6007.c if (!adap || !st) adap 576 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_ci_init(struct dvb_usb_adapter *adap) adap 578 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = adap_to_d(adap); adap 579 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *state = adap_to_priv(adap); adap 596 drivers/media/usb/dvb-usb-v2/az6007.c ret = dvb_ca_en50221_init(&adap->dvb_adap, adap 611 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_read_mac_addr(struct dvb_usb_adapter *adap, u8 mac[6]) adap 613 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = adap_to_d(adap); adap 614 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); adap 626 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_frontend_attach(struct dvb_usb_adapter *adap) adap 628 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); adap 629 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = adap_to_d(adap); adap 633 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0] = dvb_attach(drxk_attach, &terratec_h7_drxk, adap 635 drivers/media/usb/dvb-usb-v2/az6007.c if (!adap->fe[0]) adap 638 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->sec_priv = adap; adap 639 drivers/media/usb/dvb-usb-v2/az6007.c st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl; adap 640 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; adap 642 drivers/media/usb/dvb-usb-v2/az6007.c az6007_ci_init(adap); adap 647 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_cablestar_hdci_frontend_attach(struct dvb_usb_adapter *adap) adap 649 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); adap 650 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = adap_to_d(adap); adap 654 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0] = dvb_attach(drxk_attach, &cablestar_hdci_drxk, adap 656 drivers/media/usb/dvb-usb-v2/az6007.c if (!adap->fe[0]) adap 659 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->sec_priv = adap; adap 660 drivers/media/usb/dvb-usb-v2/az6007.c st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl; adap 661 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; adap 663 drivers/media/usb/dvb-usb-v2/az6007.c az6007_ci_init(adap); adap 668 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_tuner_attach(struct dvb_usb_adapter *adap) adap 670 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = adap_to_d(adap); adap 675 drivers/media/usb/dvb-usb-v2/az6007.c if (adap->fe[0]->ops.i2c_gate_ctrl) adap 676 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0], 1); adap 677 drivers/media/usb/dvb-usb-v2/az6007.c if (!dvb_attach(mt2063_attach, adap->fe[0], adap 682 drivers/media/usb/dvb-usb-v2/az6007.c if (adap->fe[0]->ops.i2c_gate_ctrl) adap 683 drivers/media/usb/dvb-usb-v2/az6007.c adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0], 0); adap 742 drivers/media/usb/dvb-usb-v2/az6007.c static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], adap 745 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 954 drivers/media/usb/dvb-usb-v2/az6007.c struct dvb_usb_adapter *adap = &d->adapter[0]; adap 956 drivers/media/usb/dvb-usb-v2/az6007.c az6007_ci_init(adap); adap 85 drivers/media/usb/dvb-usb-v2/ce6230.c static int ce6230_i2c_master_xfer(struct i2c_adapter *adap, adap 88 drivers/media/usb/dvb-usb-v2/ce6230.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 165 drivers/media/usb/dvb-usb-v2/ce6230.c static int ce6230_zl10353_frontend_attach(struct dvb_usb_adapter *adap) adap 167 drivers/media/usb/dvb-usb-v2/ce6230.c struct dvb_usb_device *d = adap_to_d(adap); adap 171 drivers/media/usb/dvb-usb-v2/ce6230.c adap->fe[0] = dvb_attach(zl10353_attach, &ce6230_zl10353_config, adap 173 drivers/media/usb/dvb-usb-v2/ce6230.c if (adap->fe[0] == NULL) adap 196 drivers/media/usb/dvb-usb-v2/ce6230.c static int ce6230_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) adap 198 drivers/media/usb/dvb-usb-v2/ce6230.c struct dvb_usb_device *d = adap_to_d(adap); adap 203 drivers/media/usb/dvb-usb-v2/ce6230.c ret = dvb_attach(mxl5005s_attach, adap->fe[0], &d->i2c_adap, adap 46 drivers/media/usb/dvb-usb-v2/dvb_usb.h #define adap_to_d(adap) (container_of(adap, struct dvb_usb_device, \ adap 47 drivers/media/usb/dvb-usb-v2/dvb_usb.h adapter[adap->id])) adap 48 drivers/media/usb/dvb-usb-v2/dvb_usb.h #define adap_to_priv(adap) (adap_to_d(adap)->priv) adap 202 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = stream->user_priv; adap 203 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmx_swfilter(&adap->demux, buf, len); adap 209 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = stream->user_priv; adap 210 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmx_swfilter_204(&adap->demux, buf, len); adap 216 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = stream->user_priv; adap 217 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmx_swfilter_raw(&adap->demux, buf, len); adap 220 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_stream_init(struct dvb_usb_adapter *adap) adap 222 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&adap_to_d(adap)->udev->dev, "%s: adap=%d\n", __func__, adap 223 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->id); adap 225 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.udev = adap_to_d(adap)->udev; adap 226 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.user_priv = adap; adap 227 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.complete = dvb_usb_data_complete; adap 229 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c return usb_urb_initv2(&adap->stream, &adap->props->stream); adap 232 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_stream_exit(struct dvb_usb_adapter *adap) adap 234 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&adap_to_d(adap)->udev->dev, "%s: adap=%d\n", __func__, adap 235 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->id); adap 237 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c return usb_urb_exitv2(&adap->stream); adap 242 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = dvbdmxfeed->demux->priv; adap 243 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 248 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c __func__, adap->id, adap->active_fe, dvbdmxfeed->type, adap 249 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->pid_filtering ? "yes" : "no", dvbdmxfeed->pid, adap 253 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c wait_on_bit(&adap->state_bits, ADAP_INIT, TASK_UNINTERRUPTIBLE); adap 255 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->active_fe == -1) adap 259 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->feed_count++ > 0) adap 263 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c set_bit(ADAP_STREAMING, &adap->state_bits); adap 267 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c memcpy(&stream_props, &adap->props->stream, adap 269 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->get_stream_config(adap->fe[adap->active_fe], adap 270 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c &adap->ts_type, &stream_props); adap 276 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c stream_props = adap->props->stream; adap 279 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c switch (adap->ts_type) { adap 281 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.complete = dvb_usb_data_complete_204; adap 284 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.complete = dvb_usb_data_complete_raw; adap 288 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->stream.complete = dvb_usb_data_complete; adap 293 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c usb_urb_submitv2(&adap->stream, &stream_props); adap 296 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->pid_filtering && adap->props->pid_filter_ctrl) { adap 297 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->props->pid_filter_ctrl(adap, 1); adap 306 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->streaming_ctrl(adap->fe[adap->active_fe], 1); adap 315 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->pid_filtering && adap->props->pid_filter) { adap 316 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->props->pid_filter(adap, dvbdmxfeed->index, adap 330 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = dvbdmxfeed->demux->priv; adap 331 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 335 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c __func__, adap->id, adap->active_fe, dvbdmxfeed->type, adap 336 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->pid_filtering ? "yes" : "no", dvbdmxfeed->pid, adap 339 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->active_fe == -1) adap 343 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->pid_filtering && adap->props->pid_filter) { adap 344 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->props->pid_filter(adap, dvbdmxfeed->index, adap 352 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (--adap->feed_count > 0) adap 357 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->streaming_ctrl(adap->fe[adap->active_fe], 0); adap 365 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->pid_filtering && adap->props->pid_filter_ctrl) { adap 366 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->props->pid_filter_ctrl(adap, 0); adap 374 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c usb_urb_killv2(&adap->stream); adap 377 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c clear_bit(ADAP_STREAMING, &adap->state_bits); adap 379 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c wake_up_bit(&adap->state_bits, ADAP_STREAMING); adap 387 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_media_device_init(struct dvb_usb_adapter *adap) adap 391 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 400 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_register_media_controller(&adap->dvb_adap, mdev); adap 407 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_media_device_register(struct dvb_usb_adapter *adap) adap 410 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c return media_device_register(adap->dvb_adap.mdev); adap 416 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static void dvb_usbv2_media_device_unregister(struct dvb_usb_adapter *adap) adap 420 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->dvb_adap.mdev) adap 423 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c media_device_unregister(adap->dvb_adap.mdev); adap 424 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c media_device_cleanup(adap->dvb_adap.mdev); adap 425 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c kfree(adap->dvb_adap.mdev); adap 426 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dvb_adap.mdev = NULL; adap 431 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_dvb_init(struct dvb_usb_adapter *adap) adap 434 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 436 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id); adap 438 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_register_adapter(&adap->dvb_adap, d->name, d->props->owner, adap 446 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dvb_adap.priv = adap; adap 448 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_usbv2_media_device_init(adap); adap 456 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->read_mac_address(adap, adap 457 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dvb_adap.proposed_mac); adap 462 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c KBUILD_MODNAME, adap->dvb_adap.proposed_mac); adap 465 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING; adap 466 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.priv = adap; adap 467 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.filternum = 0; adap 468 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.filternum = adap->max_feed_count; adap 469 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.feednum = adap->demux.filternum; adap 470 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.start_feed = dvb_usb_start_feed; adap 471 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.stop_feed = dvb_usb_stop_feed; adap 472 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.write_to_decoder = NULL; adap 473 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_dmx_init(&adap->demux); adap 480 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dmxdev.filternum = adap->demux.filternum; adap 481 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dmxdev.demux = &adap->demux.dmx; adap 482 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dmxdev.capabilities = 0; adap 483 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap); adap 490 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx); adap 499 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmxdev_release(&adap->dmxdev); adap 501 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmx_release(&adap->demux); adap 503 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_usbv2_media_device_unregister(adap); adap 505 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_unregister_adapter(&adap->dvb_adap); adap 507 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dvb_adap.priv = NULL; adap 511 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_dvb_exit(struct dvb_usb_adapter *adap) adap 513 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&adap_to_d(adap)->udev->dev, "%s: adap=%d\n", __func__, adap 514 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->id); adap 516 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->dvb_adap.priv) { adap 517 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_net_release(&adap->dvb_net); adap 518 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->demux.dmx.close(&adap->demux.dmx); adap 519 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmxdev_release(&adap->dmxdev); adap 520 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_dmx_release(&adap->demux); adap 521 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_unregister_adapter(&adap->dvb_adap); adap 555 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 556 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 557 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&d->udev->dev, "%s: adap=%d fe=%d\n", __func__, adap->id, adap 560 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->suspend_resume_active) { adap 561 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->active_fe = fe->id; adap 562 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c set_bit(ADAP_INIT, &adap->state_bits); adap 575 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->fe_init[fe->id]) { adap 576 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->fe_init[fe->id](fe); adap 581 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->suspend_resume_active) { adap 582 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c clear_bit(ADAP_INIT, &adap->state_bits); adap 584 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c wake_up_bit(&adap->state_bits, ADAP_INIT); adap 594 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 595 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 596 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&d->udev->dev, "%s: adap=%d fe=%d\n", __func__, adap->id, adap 599 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->suspend_resume_active) { adap 600 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c set_bit(ADAP_SLEEP, &adap->state_bits); adap 601 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c wait_on_bit(&adap->state_bits, ADAP_STREAMING, adap 605 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->fe_sleep[fe->id]) { adap 606 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = adap->fe_sleep[fe->id](fe); adap 620 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->suspend_resume_active) { adap 621 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->active_fe = -1; adap 622 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c clear_bit(ADAP_SLEEP, &adap->state_bits); adap 624 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c wake_up_bit(&adap->state_bits, ADAP_SLEEP); adap 631 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap) adap 634 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 635 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id); adap 637 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c memset(adap->fe, 0, sizeof(adap->fe)); adap 638 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->active_fe = -1; adap 641 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->frontend_attach(adap); adap 655 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c for (i = 0; i < MAX_NO_OF_FE_PER_ADAP && adap->fe[i]; i++) { adap 656 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe[i]->id = i; adap 658 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe_init[i] = adap->fe[i]->ops.init; adap 659 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe[i]->ops.init = dvb_usb_fe_init; adap 660 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe_sleep[i] = adap->fe[i]->ops.sleep; adap 661 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe[i]->ops.sleep = dvb_usb_fe_sleep; adap 663 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_register_frontend(&adap->dvb_adap, adap->fe[i]); adap 675 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->tuner_attach(adap); adap 683 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_create_media_graph(&adap->dvb_adap, true); adap 687 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_usbv2_media_device_register(adap); adap 693 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_unregister_frontend(adap->fe[i]); adap 697 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->fe[i]) { adap 698 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_frontend_detach(adap->fe[i]); adap 699 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->fe[i] = NULL; adap 708 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) adap 711 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_device *d = adap_to_d(adap); adap 713 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id); adap 716 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->fe[i]) { adap 717 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_unregister_frontend(adap->fe[i]); adap 718 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c dvb_frontend_detach(adap->fe[i]); adap 723 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->tuner_detach(adap); adap 731 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = d->props->frontend_detach(adap); adap 744 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c struct dvb_usb_adapter *adap; adap 758 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap = &d->adapter[i]; adap 759 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->id = i; adap 760 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->props = &d->props->adapter[i]; adap 764 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c !(adap->props->caps & DVB_USB_ADAP_HAS_PID_FILTER)) { adap 771 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->props->caps & DVB_USB_ADAP_HAS_PID_FILTER) || adap 772 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c (adap->props->caps & DVB_USB_ADAP_NEED_PID_FILTERING)) { adap 776 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->props->pid_filter_count); adap 777 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->pid_filtering = 1; adap 778 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->max_feed_count = adap->props->pid_filter_count; adap 783 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->pid_filtering = 0; adap 784 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->max_feed_count = 255; adap 787 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (!adap->pid_filtering && dvb_usb_force_pid_filter_usage && adap 788 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->props->caps & DVB_USB_ADAP_HAS_PID_FILTER) { adap 792 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->pid_filtering = 1; adap 793 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->max_feed_count = adap->props->pid_filter_count; adap 796 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_usbv2_adapter_stream_init(adap); adap 800 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_usbv2_adapter_dvb_init(adap); adap 804 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c ret = dvb_usbv2_adapter_frontend_init(adap); adap 809 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c if (adap->fe[1]) adap 810 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c adap->dvb_adap.mfe_shared = 1; adap 98 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 101 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 231 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_read_mac_addr(struct dvb_usb_adapter *adap, u8 mac[6]) adap 233 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 273 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_s960_attach(struct dvb_usb_adapter *adap) adap 275 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvbsky_state *state = adap_to_priv(adap); adap 276 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 298 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0] = m88ds3103_pdata.get_dvb_frontend(state->i2c_client_demod); adap 302 drivers/media/usb/dvb-usb-v2/dvbsky.c ts2020_config.fe = adap->fe[0]; adap 314 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.read_signal_strength = adap 315 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 318 drivers/media/usb/dvb-usb-v2/dvbsky.c state->fe_read_status = adap->fe[0]->ops.read_status; adap 319 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.read_status = dvbsky_usb_read_status; adap 322 drivers/media/usb/dvb-usb-v2/dvbsky.c state->fe_set_voltage = adap->fe[0]->ops.set_voltage; adap 323 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.set_voltage = dvbsky_usb_set_voltage; adap 375 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap) adap 377 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvbsky_state *state = adap_to_priv(adap); adap 378 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 401 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0] = m88ds3103_pdata.get_dvb_frontend(state->i2c_client_demod); adap 405 drivers/media/usb/dvb-usb-v2/dvbsky.c ts2020_config.fe = adap->fe[0]; adap 417 drivers/media/usb/dvb-usb-v2/dvbsky.c sp2_config.dvb_adap = &adap->dvb_adap; adap 432 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.read_signal_strength = adap 433 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 436 drivers/media/usb/dvb-usb-v2/dvbsky.c state->fe_read_status = adap->fe[0]->ops.read_status; adap 437 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.read_status = dvbsky_usb_read_status; adap 440 drivers/media/usb/dvb-usb-v2/dvbsky.c state->fe_set_voltage = adap->fe[0]->ops.set_voltage; adap 441 drivers/media/usb/dvb-usb-v2/dvbsky.c adap->fe[0]->ops.set_voltage = dvbsky_usb_ci_set_voltage; adap 446 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_t680c_attach(struct dvb_usb_adapter *adap) adap 448 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvbsky_state *state = adap_to_priv(adap); adap 449 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 457 drivers/media/usb/dvb-usb-v2/dvbsky.c si2168_config.fe = &adap->fe[0]; adap 467 drivers/media/usb/dvb-usb-v2/dvbsky.c si2157_config.fe = adap->fe[0]; adap 479 drivers/media/usb/dvb-usb-v2/dvbsky.c sp2_config.dvb_adap = &adap->dvb_adap; adap 496 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_t330_attach(struct dvb_usb_adapter *adap) adap 498 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvbsky_state *state = adap_to_priv(adap); adap 499 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 506 drivers/media/usb/dvb-usb-v2/dvbsky.c si2168_config.fe = &adap->fe[0]; adap 517 drivers/media/usb/dvb-usb-v2/dvbsky.c si2157_config.fe = adap->fe[0]; adap 531 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_mygica_t230c_attach(struct dvb_usb_adapter *adap) adap 533 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvbsky_state *state = adap_to_priv(adap); adap 534 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 541 drivers/media/usb/dvb-usb-v2/dvbsky.c si2168_config.fe = &adap->fe[0]; adap 554 drivers/media/usb/dvb-usb-v2/dvbsky.c si2157_config.fe = adap->fe[0]; adap 608 drivers/media/usb/dvb-usb-v2/dvbsky.c static int dvbsky_frontend_detach(struct dvb_usb_adapter *adap) adap 610 drivers/media/usb/dvb-usb-v2/dvbsky.c struct dvb_usb_device *d = adap_to_d(adap); adap 613 drivers/media/usb/dvb-usb-v2/dvbsky.c dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id); adap 101 drivers/media/usb/dvb-usb-v2/ec168.c static int ec168_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 104 drivers/media/usb/dvb-usb-v2/ec168.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 259 drivers/media/usb/dvb-usb-v2/ec168.c static int ec168_ec100_frontend_attach(struct dvb_usb_adapter *adap) adap 261 drivers/media/usb/dvb-usb-v2/ec168.c struct dvb_usb_device *d = adap_to_d(adap); adap 264 drivers/media/usb/dvb-usb-v2/ec168.c adap->fe[0] = dvb_attach(ec100_attach, &ec168_ec100_config, adap 266 drivers/media/usb/dvb-usb-v2/ec168.c if (adap->fe[0] == NULL) adap 289 drivers/media/usb/dvb-usb-v2/ec168.c static int ec168_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) adap 291 drivers/media/usb/dvb-usb-v2/ec168.c struct dvb_usb_device *d = adap_to_d(adap); adap 294 drivers/media/usb/dvb-usb-v2/ec168.c return dvb_attach(mxl5005s_attach, adap->fe[0], &d->i2c_adap, adap 67 drivers/media/usb/dvb-usb-v2/gl861.c static int gl861_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 70 drivers/media/usb/dvb-usb-v2/gl861.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 113 drivers/media/usb/dvb-usb-v2/gl861.c static int gl861_frontend_attach(struct dvb_usb_adapter *adap) adap 116 drivers/media/usb/dvb-usb-v2/gl861.c adap->fe[0] = dvb_attach(zl10353_attach, &gl861_zl10353_config, adap 117 drivers/media/usb/dvb-usb-v2/gl861.c &adap_to_d(adap)->i2c_adap); adap 118 drivers/media/usb/dvb-usb-v2/gl861.c if (adap->fe[0] == NULL) adap 128 drivers/media/usb/dvb-usb-v2/gl861.c static int gl861_tuner_attach(struct dvb_usb_adapter *adap) adap 131 drivers/media/usb/dvb-usb-v2/gl861.c adap->fe[0], &adap_to_d(adap)->i2c_adap, adap 279 drivers/media/usb/dvb-usb-v2/gl861.c static int friio_tuner_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 282 drivers/media/usb/dvb-usb-v2/gl861.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 485 drivers/media/usb/dvb-usb-v2/gl861.c static int friio_frontend_attach(struct dvb_usb_adapter *adap) adap 494 drivers/media/usb/dvb-usb-v2/gl861.c d = adap_to_d(adap); adap 499 drivers/media/usb/dvb-usb-v2/gl861.c adap->fe[0] = cfg.fe; adap 502 drivers/media/usb/dvb-usb-v2/gl861.c priv = adap_to_priv(adap); adap 514 drivers/media/usb/dvb-usb-v2/gl861.c static int friio_frontend_detach(struct dvb_usb_adapter *adap) adap 518 drivers/media/usb/dvb-usb-v2/gl861.c priv = adap_to_priv(adap); adap 524 drivers/media/usb/dvb-usb-v2/gl861.c static int friio_tuner_attach(struct dvb_usb_adapter *adap) adap 531 drivers/media/usb/dvb-usb-v2/gl861.c priv = adap_to_priv(adap); adap 534 drivers/media/usb/dvb-usb-v2/gl861.c cfg.fe = adap->fe[0]; adap 544 drivers/media/usb/dvb-usb-v2/gl861.c static int friio_tuner_detach(struct dvb_usb_adapter *adap) adap 548 drivers/media/usb/dvb-usb-v2/gl861.c priv = adap_to_priv(adap); adap 214 drivers/media/usb/dvb-usb-v2/lmedm04.c static void lme2510_update_stats(struct dvb_usb_adapter *adap) adap 216 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 217 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_frontend *fe = adap->fe[0]; adap 269 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_adapter *adap = lme_urb->context; adap 270 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 302 drivers/media/usb/dvb-usb-v2/lmedm04.c if (!adap_to_d(adap)->rc_dev) adap 311 drivers/media/usb/dvb-usb-v2/lmedm04.c rc_keydown(adap_to_d(adap)->rc_dev, RC_PROTO_NEC32, key, adap 349 drivers/media/usb/dvb-usb-v2/lmedm04.c lme2510_update_stats(adap); adap 370 drivers/media/usb/dvb-usb-v2/lmedm04.c static int lme2510_int_read(struct dvb_usb_adapter *adap) adap 372 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 373 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *lme_int = adap_to_priv(adap); adap 387 drivers/media/usb/dvb-usb-v2/lmedm04.c adap, adap 402 drivers/media/usb/dvb-usb-v2/lmedm04.c static int lme2510_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 404 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 405 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 428 drivers/media/usb/dvb-usb-v2/lmedm04.c static int lme2510_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, adap 431 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 481 drivers/media/usb/dvb-usb-v2/lmedm04.c static int lme2510_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 484 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 558 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_adapter *adap = fe_to_adap(fe); adap 559 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 560 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 884 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_adapter *adap = fe_to_adap(fe); adap 888 drivers/media/usb/dvb-usb-v2/lmedm04.c lme2510_update_stats(adap); adap 950 drivers/media/usb/dvb-usb-v2/lmedm04.c static int lme_name(struct dvb_usb_adapter *adap) adap 952 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 953 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 958 drivers/media/usb/dvb-usb-v2/lmedm04.c char *name = adap->fe[0]->ops.info.name; adap 966 drivers/media/usb/dvb-usb-v2/lmedm04.c static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap) adap 968 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 977 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0] = dvb_attach(tda10086_attach, adap 979 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0]) { adap 993 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0] = dvb_attach(stv0299_attach, adap 995 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0]) { adap 1009 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0] = dvb_attach(stv0288_attach, &lme_config, adap 1012 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0]) { adap 1027 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0] = dvb_attach(m88rs2000_attach, adap 1030 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0]) { adap 1037 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.set_voltage; adap 1042 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0] == NULL) { adap 1048 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap->fe[0]) { adap 1049 drivers/media/usb/dvb-usb-v2/lmedm04.c dvb_frontend_detach(adap->fe[0]); adap 1050 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0] = NULL; adap 1056 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_status = adap->fe[0]->ops.read_status; adap 1057 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_signal_strength = adap->fe[0]->ops.read_signal_strength; adap 1058 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_snr = adap->fe[0]->ops.read_snr; adap 1059 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_ber = adap->fe[0]->ops.read_ber; adap 1060 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_ucblocks = adap->fe[0]->ops.read_ucblocks; adap 1062 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.read_status = dm04_read_status; adap 1063 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.read_signal_strength = dm04_read_signal_strength; adap 1064 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.read_snr = dm04_read_snr; adap 1065 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.read_ber = dm04_read_ber; adap 1066 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.read_ucblocks = dm04_read_ucblocks; adap 1067 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->fe[0]->ops.set_voltage = dm04_lme2510_set_voltage; adap 1069 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = lme_name(adap); adap 1073 drivers/media/usb/dvb-usb-v2/lmedm04.c static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap) adap 1075 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_device *d = adap_to_d(adap); adap 1076 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); adap 1082 drivers/media/usb/dvb-usb-v2/lmedm04.c if (dvb_attach(tda826x_attach, adap->fe[0], 0x60, adap 1087 drivers/media/usb/dvb-usb-v2/lmedm04.c if (dvb_attach(ix2505v_attach , adap->fe[0], &lme_tuner, adap 1092 drivers/media/usb/dvb-usb-v2/lmedm04.c if (dvb_attach(dvb_pll_attach , adap->fe[0], 0x60, adap 1097 drivers/media/usb/dvb-usb-v2/lmedm04.c if (dvb_attach(ts2020_attach, adap->fe[0], adap 1113 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = lme2510_int_read(adap); adap 1173 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_adapter *adap = fe_to_adap(fe); adap 1176 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap == NULL) adap 1179 drivers/media/usb/dvb-usb-v2/lmedm04.c d = adap_to_d(adap); adap 1183 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->pid_filtering = true; adap 1184 drivers/media/usb/dvb-usb-v2/lmedm04.c adap->max_feed_count = 15; adap 1204 drivers/media/usb/dvb-usb-v2/lmedm04.c struct dvb_usb_adapter *adap = &d->adapter[0]; adap 1206 drivers/media/usb/dvb-usb-v2/lmedm04.c if (adap != NULL) { adap 1207 drivers/media/usb/dvb-usb-v2/lmedm04.c lme2510_kill_urb(&adap->stream); adap 799 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c int mxl111sf_i2c_xfer(struct i2c_adapter *adap, adap 802 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 13 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.h int mxl111sf_i2c_xfer(struct i2c_adapter *adap, adap 425 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_lgdt3305_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_id) adap 427 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct dvb_usb_device *d = adap_to_d(adap); adap 472 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id] = dvb_attach(lgdt3305_attach, adap 475 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (adap->fe[fe_id]) { adap 477 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_init = adap->fe[fe_id]->ops.init; adap 478 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; adap 479 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; adap 480 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; adap 496 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_lg2160_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_id) adap 498 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct dvb_usb_device *d = adap_to_d(adap); adap 547 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id] = dvb_attach(lg2160_attach, adap 550 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (adap->fe[fe_id]) { adap 552 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_init = adap->fe[fe_id]->ops.init; adap 553 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; adap 554 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; adap 555 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; adap 581 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_lg2161_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_id) adap 583 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct dvb_usb_device *d = adap_to_d(adap); adap 632 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id] = dvb_attach(lg2160_attach, adap 637 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (adap->fe[fe_id]) { adap 639 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_init = adap->fe[fe_id]->ops.init; adap 640 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; adap 641 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; adap 642 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; adap 668 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_lg2161_ep6_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_id) adap 670 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct dvb_usb_device *d = adap_to_d(adap); adap 719 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id] = dvb_attach(lg2160_attach, adap 724 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (adap->fe[fe_id]) { adap 726 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_init = adap->fe[fe_id]->ops.init; adap 727 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; adap 728 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; adap 729 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; adap 743 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_attach_demod(struct dvb_usb_adapter *adap, u8 fe_id) adap 745 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct dvb_usb_device *d = adap_to_d(adap); adap 786 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id] = dvb_attach(mxl111sf_demod_attach, state, adap 788 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (adap->fe[fe_id]) { adap 790 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_init = adap->fe[fe_id]->ops.init; adap 791 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.init = mxl111sf_adap_fe_init; adap 792 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap_state->fe_sleep = adap->fe[fe_id]->ops.sleep; adap 793 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[fe_id]->ops.sleep = mxl111sf_adap_fe_sleep; adap 871 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_attach_tuner(struct dvb_usb_adapter *adap) adap 873 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct mxl111sf_state *state = adap_to_priv(adap); adap 875 drivers/media/usb/dvb-usb-v2/mxl111sf.c struct media_device *mdev = dvb_get_media_controller(&adap->dvb_adap); adap 883 drivers/media/usb/dvb-usb-v2/mxl111sf.c if (dvb_attach(mxl111sf_tuner_attach, adap->fe[i], state, adap 886 drivers/media/usb/dvb-usb-v2/mxl111sf.c adap->fe[i]->ops.read_signal_strength = adap->fe[i]->ops.tuner_ops.get_rf_strength; adap 964 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_dvbt(struct dvb_usb_adapter *adap) adap 966 drivers/media/usb/dvb-usb-v2/mxl111sf.c return mxl111sf_attach_demod(adap, 0); adap 969 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_atsc(struct dvb_usb_adapter *adap) adap 971 drivers/media/usb/dvb-usb-v2/mxl111sf.c return mxl111sf_lgdt3305_frontend_attach(adap, 0); adap 974 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_mh(struct dvb_usb_adapter *adap) adap 976 drivers/media/usb/dvb-usb-v2/mxl111sf.c return mxl111sf_lg2160_frontend_attach(adap, 0); adap 979 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_atsc_mh(struct dvb_usb_adapter *adap) adap 984 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lgdt3305_frontend_attach(adap, 0); adap 988 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_attach_demod(adap, 1); adap 992 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lg2160_frontend_attach(adap, 2); adap 999 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_mercury(struct dvb_usb_adapter *adap) adap 1004 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lgdt3305_frontend_attach(adap, 0); adap 1008 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_attach_demod(adap, 1); adap 1012 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lg2161_ep6_frontend_attach(adap, 2); adap 1019 drivers/media/usb/dvb-usb-v2/mxl111sf.c static int mxl111sf_frontend_attach_mercury_mh(struct dvb_usb_adapter *adap) adap 1024 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_attach_demod(adap, 0); adap 1029 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lg2161_frontend_attach(adap, 1); adap 1031 drivers/media/usb/dvb-usb-v2/mxl111sf.c ret = mxl111sf_lg2161_ep6_frontend_attach(adap, 1); adap 130 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 134 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 667 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl2831u_frontend_attach(struct dvb_usb_adapter *adap) adap 669 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 712 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0] = pdata->get_dvb_frontend(client); adap 875 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) adap 877 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 933 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0] = pdata->get_dvb_frontend(client); adap 939 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->callback = rtl2832u_frontend_callback; adap 954 drivers/media/usb/dvb-usb-v2/rtl28xxu.c mn88472_config.fe = &adap->fe[1]; adap 979 drivers/media/usb/dvb-usb-v2/rtl28xxu.c mn88473_config.fe = &adap->fe[1]; adap 1006 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[1] = dvb_attach(cxd2841er_attach_t_c, adap 1009 drivers/media/usb/dvb-usb-v2/rtl28xxu.c if (!adap->fe[1]) { adap 1013 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[1]->id = 1; adap 1020 drivers/media/usb/dvb-usb-v2/rtl28xxu.c si2168_config.fe = &adap->fe[1]; adap 1053 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_frontend_attach(struct dvb_usb_adapter *adap) adap 1055 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct rtl28xxu_dev *dev = adap_to_priv(adap); adap 1058 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return rtl2831u_frontend_attach(adap); adap 1060 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return rtl2832u_frontend_attach(adap); adap 1063 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_frontend_detach(struct dvb_usb_adapter *adap) adap 1065 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 1114 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl2831u_tuner_attach(struct dvb_usb_adapter *adap) adap 1117 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 1125 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(qt1010_attach, adap->fe[0], adap 1130 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(mt2060_attach, adap->fe[0], adap 1135 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(mxl5005s_attach, adap->fe[0], adap 1174 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) adap 1177 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 1193 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(fc0012_attach, adap->fe[0], adap 1198 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.read_signal_strength = adap 1199 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 1202 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(fc0013_attach, adap->fe[0], adap 1206 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.read_signal_strength = adap 1207 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 1211 drivers/media/usb/dvb-usb-v2/rtl28xxu.c .fe = adap->fe[0], adap 1235 drivers/media/usb/dvb-usb-v2/rtl28xxu.c .dvb_frontend = adap->fe[0], adap 1257 drivers/media/usb/dvb-usb-v2/rtl28xxu.c .dvb_frontend = adap->fe[0], adap 1285 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(r820t_attach, adap->fe[0], adap 1290 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.read_signal_strength = adap 1291 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 1294 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(r820t_attach, adap->fe[0], adap 1297 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.read_signal_strength = adap 1298 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->ops.tuner_ops.get_rf_strength; adap 1300 drivers/media/usb/dvb-usb-v2/rtl28xxu.c if (adap->fe[1]) { adap 1301 drivers/media/usb/dvb-usb-v2/rtl28xxu.c fe = dvb_attach(r820t_attach, adap->fe[1], adap 1304 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[1]->ops.read_signal_strength = adap 1305 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[1]->ops.tuner_ops.get_rf_strength; adap 1310 drivers/media/usb/dvb-usb-v2/rtl28xxu.c .fe = adap->fe[0], adap 1332 drivers/media/usb/dvb-usb-v2/rtl28xxu.c if (adap->fe[1]) { adap 1333 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[1]->tuner_priv = adap 1334 drivers/media/usb/dvb-usb-v2/rtl28xxu.c adap->fe[0]->tuner_priv; adap 1335 drivers/media/usb/dvb-usb-v2/rtl28xxu.c memcpy(&adap->fe[1]->ops.tuner_ops, adap 1336 drivers/media/usb/dvb-usb-v2/rtl28xxu.c &adap->fe[0]->ops.tuner_ops, adap 1360 drivers/media/usb/dvb-usb-v2/rtl28xxu.c pdata.dvb_frontend = adap->fe[0]; adap 1383 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_tuner_attach(struct dvb_usb_adapter *adap) adap 1385 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct rtl28xxu_dev *dev = adap_to_priv(adap); adap 1388 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return rtl2831u_tuner_attach(adap); adap 1390 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return rtl2832u_tuner_attach(adap); adap 1393 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_tuner_detach(struct dvb_usb_adapter *adap) adap 1395 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct dvb_usb_device *d = adap_to_d(adap); adap 1825 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 1827 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct rtl28xxu_dev *dev = adap_to_priv(adap); adap 1832 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return pdata->pid_filter_ctrl(adap->fe[0], onoff); adap 1836 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return pdata->pid_filter_ctrl(adap->fe[0], onoff); adap 1840 drivers/media/usb/dvb-usb-v2/rtl28xxu.c static int rtl28xxu_pid_filter(struct dvb_usb_adapter *adap, int index, adap 1843 drivers/media/usb/dvb-usb-v2/rtl28xxu.c struct rtl28xxu_dev *dev = adap_to_priv(adap); adap 1848 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return pdata->pid_filter(adap->fe[0], index, pid, onoff); adap 1852 drivers/media/usb/dvb-usb-v2/rtl28xxu.c return pdata->pid_filter(adap->fe[0], index, pid, onoff); adap 123 drivers/media/usb/dvb-usb-v2/zd1301.c static int zd1301_frontend_attach(struct dvb_usb_adapter *adap) adap 125 drivers/media/usb/dvb-usb-v2/zd1301.c struct dvb_usb_device *d = adap_to_d(adap); adap 126 drivers/media/usb/dvb-usb-v2/zd1301.c struct zd1301_dev *dev = adap_to_priv(adap); adap 187 drivers/media/usb/dvb-usb-v2/zd1301.c adap->fe[0] = frontend; adap 201 drivers/media/usb/dvb-usb-v2/zd1301.c static int zd1301_frontend_detach(struct dvb_usb_adapter *adap) adap 203 drivers/media/usb/dvb-usb-v2/zd1301.c struct dvb_usb_device *d = adap_to_d(adap); adap 806 drivers/media/usb/dvb-usb/af9005-fe.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1029 drivers/media/usb/dvb-usb/af9005-fe.c ret = af9005_read_eeprom(adap->dev, 0xc6, buf, 2); adap 1038 drivers/media/usb/dvb-usb/af9005-fe.c ret = af9005_read_eeprom(adap->dev, 0xc8, buf, 2); adap 1044 drivers/media/usb/dvb-usb/af9005-fe.c if (dvb_attach(mt2060_attach, fe, &adap->dev->i2c_adap, adap 1052 drivers/media/usb/dvb-usb/af9005-fe.c if (dvb_attach(qt1010_attach, fe, &adap->dev->i2c_adap, adap 400 drivers/media/usb/dvb-usb/af9005.c static int af9005_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 405 drivers/media/usb/dvb-usb/af9005.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 800 drivers/media/usb/dvb-usb/af9005.c static int af9005_frontend_attach(struct dvb_usb_adapter *adap) adap 809 drivers/media/usb/dvb-usb/af9005.c struct usb_device *udev = adap->dev->udev; adap 815 drivers/media/usb/dvb-usb/af9005.c af9005_read_eeprom(adap->dev, i, buf, 8); adap 819 drivers/media/usb/dvb-usb/af9005.c adap->fe_adap[0].fe = af9005_fe_attach(adap->dev); adap 888 drivers/media/usb/dvb-usb/af9005.c static int af9005_pid_filter_control(struct dvb_usb_adapter *adap, int onoff) adap 894 drivers/media/usb/dvb-usb/af9005.c af9005_write_ofdm_register(adap->dev, XD_MP2IF_DMX_CTRL, 1); adap 898 drivers/media/usb/dvb-usb/af9005.c af9005_write_register_bits(adap->dev, adap 903 drivers/media/usb/dvb-usb/af9005.c af9005_write_ofdm_register(adap->dev, XD_MP2IF_DMX_CTRL, 1); adap 906 drivers/media/usb/dvb-usb/af9005.c af9005_write_ofdm_register(adap->dev, XD_MP2IF_DMX_CTRL, 0); adap 913 drivers/media/usb/dvb-usb/af9005.c static int af9005_pid_filter(struct dvb_usb_adapter *adap, int index, adap 923 drivers/media/usb/dvb-usb/af9005.c if (adap->feedcount == 1) { adap 925 drivers/media/usb/dvb-usb/af9005.c ret = af9005_pid_filter_control(adap, onoff); adap 930 drivers/media/usb/dvb-usb/af9005.c af9005_write_ofdm_register(adap->dev, adap 936 drivers/media/usb/dvb-usb/af9005.c af9005_write_ofdm_register(adap->dev, adap 943 drivers/media/usb/dvb-usb/af9005.c if (adap->feedcount == 0) { adap 945 drivers/media/usb/dvb-usb/af9005.c ret = af9005_pid_filter_control(adap, onoff); adap 950 drivers/media/usb/dvb-usb/af9005.c ret = af9005_write_ofdm_register(adap->dev, XD_MP2IF_PID_IDX, cmd); adap 3472 drivers/media/usb/dvb-usb/af9005.h extern int af9005_tuner_attach(struct dvb_usb_adapter *adap); adap 363 drivers/media/usb/dvb-usb/az6027.c static int az6027_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 378 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 783 drivers/media/usb/dvb-usb/az6027.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 800 drivers/media/usb/dvb-usb/az6027.c i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); adap 805 drivers/media/usb/dvb-usb/az6027.c i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); adap 810 drivers/media/usb/dvb-usb/az6027.c i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); adap 820 drivers/media/usb/dvb-usb/az6027.c static int az6027_frontend_poweron(struct dvb_usb_adapter *adap) adap 833 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 839 drivers/media/usb/dvb-usb/az6027.c static int az6027_frontend_reset(struct dvb_usb_adapter *adap) adap 853 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 863 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 874 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 882 drivers/media/usb/dvb-usb/az6027.c static int az6027_frontend_tsbypass(struct dvb_usb_adapter *adap, int onoff) adap 896 drivers/media/usb/dvb-usb/az6027.c ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); adap 903 drivers/media/usb/dvb-usb/az6027.c static int az6027_frontend_attach(struct dvb_usb_adapter *adap) adap 906 drivers/media/usb/dvb-usb/az6027.c az6027_frontend_poweron(adap); adap 907 drivers/media/usb/dvb-usb/az6027.c az6027_frontend_reset(adap); adap 909 drivers/media/usb/dvb-usb/az6027.c deb_info("adap = %p, dev = %p\n", adap, adap->dev); adap 910 drivers/media/usb/dvb-usb/az6027.c adap->fe_adap[0].fe = stb0899_attach(&az6027_stb0899_config, &adap->dev->i2c_adap); adap 912 drivers/media/usb/dvb-usb/az6027.c if (adap->fe_adap[0].fe) { adap 914 drivers/media/usb/dvb-usb/az6027.c if (stb6100_attach(adap->fe_adap[0].fe, &az6027_stb6100_config, &adap->dev->i2c_adap)) { adap 916 drivers/media/usb/dvb-usb/az6027.c adap->fe_adap[0].fe->ops.set_voltage = az6027_set_voltage; adap 917 drivers/media/usb/dvb-usb/az6027.c az6027_ci_init(adap); adap 919 drivers/media/usb/dvb-usb/az6027.c adap->fe_adap[0].fe = NULL; adap 924 drivers/media/usb/dvb-usb/az6027.c az6027_frontend_tsbypass(adap, 0); adap 950 drivers/media/usb/dvb-usb/az6027.c static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) adap 952 drivers/media/usb/dvb-usb/az6027.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 37 drivers/media/usb/dvb-usb/cinergyT2-core.c static int cinergyt2_streaming_ctrl(struct dvb_usb_adapter *adap, int enable) adap 39 drivers/media/usb/dvb-usb/cinergyT2-core.c struct dvb_usb_device *d = adap->dev; adap 68 drivers/media/usb/dvb-usb/cinergyT2-core.c static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) adap 70 drivers/media/usb/dvb-usb/cinergyT2-core.c struct dvb_usb_device *d = adap->dev; adap 74 drivers/media/usb/dvb-usb/cinergyT2-core.c adap->fe_adap[0].fe = cinergyt2_fe_attach(adap->dev); adap 86 drivers/media/usb/dvb-usb/cinergyT2-core.c cinergyt2_usb_device = adap->dev; adap 182 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 185 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 422 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 424 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *dvbdev = adap->dev; adap 448 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_aver_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 451 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_ON, NULL, 0, NULL, 0); adap 453 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_OFF, adap 504 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_d680_dmb_streaming_ctrl(struct dvb_usb_adapter *adap, adap 510 drivers/media/usb/dvb-usb/cxusb.c cxusb_d680_dmb_drain_video(adap->dev); adap 511 drivers/media/usb/dvb-usb/cxusb.c return cxusb_ctrl_msg(adap->dev, CMD_STREAMING_ON, adap 514 drivers/media/usb/dvb-usb/cxusb.c int ret = cxusb_ctrl_msg(adap->dev, adap 701 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) adap 703 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *dvbdev = adap->dev; adap 707 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, adap 711 drivers/media/usb/dvb-usb/cxusb.c if (is_medion && adap->fe_adap[0].fe) adap 716 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe->ops.tuner_ops.sleep = NULL; adap 721 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) adap 723 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, adap 728 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) adap 730 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, adap 735 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) adap 737 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, adap 742 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap) adap 744 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, adap 745 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap, 0x61, TUNER_LG_TDVS_H06XF); adap 752 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_adapter *adap = ptr; adap 753 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *d = adap->dev; adap 774 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap) adap 778 drivers/media/usb/dvb-usb/cxusb.c .i2c_adap = &adap->dev->i2c_adap, adap 788 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe->callback = dvico_bluebird_xc2028_callback; adap 790 drivers/media/usb/dvb-usb/cxusb.c fe = dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &cfg); adap 799 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) adap 801 drivers/media/usb/dvb-usb/cxusb.c dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, adap 802 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap, &aver_a868r_tuner); adap 806 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_d680_dmb_tuner_attach(struct dvb_usb_adapter *adap) adap 810 drivers/media/usb/dvb-usb/cxusb.c fe = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, adap 811 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap, &d680_dmb_tuner); adap 815 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_mygica_d689_tuner_attach(struct dvb_usb_adapter *adap) adap 819 drivers/media/usb/dvb-usb/cxusb.c fe = dvb_attach(max2165_attach, adap->fe_adap[0].fe, adap 820 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap, &mygica_d689_max2165_cfg); adap 826 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 827 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *dvbdev = adap->dev; adap 899 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) adap 901 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *dvbdev = adap->dev; adap 913 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, adap 915 drivers/media/usb/dvb-usb/cxusb.c if (!adap->fe_adap[0].fe) adap 919 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe->ops.ts_bus_ctrl = adap 925 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) adap 927 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 7) < 0) adap 930 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 932 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, adap 935 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 936 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 942 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_aver_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) adap 944 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, adap 947 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 948 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 954 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) adap 957 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 0) < 0) adap 960 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 962 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, adap 963 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 964 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 970 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) adap 972 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 0) < 0) adap 975 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 977 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, adap 978 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 979 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 982 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(zl10353_attach, adap 984 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 985 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 991 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) adap 1002 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 1) < 0) adap 1005 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 1008 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0); adap 1009 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); adap 1010 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); adap 1012 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = adap 1015 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 1016 drivers/media/usb/dvb-usb/cxusb.c if (!adap->fe_adap[0].fe) adap 1020 drivers/media/usb/dvb-usb/cxusb.c for (i = 0; adap->dev->props.rc.core.rc_codes && i < 5; i++) { adap 1022 drivers/media/usb/dvb-usb/cxusb.c if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) adap 1028 drivers/media/usb/dvb-usb/cxusb.c adap->dev->props.rc.core.rc_codes = NULL; adap 1118 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dualdig4_rev2_frontend_attach(struct dvb_usb_adapter *adap) adap 1120 drivers/media/usb/dvb-usb/cxusb.c struct dib0700_adapter_state *state = adap->priv; adap 1122 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 1) < 0) adap 1125 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 1127 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); adap 1132 drivers/media/usb/dvb-usb/cxusb.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 1138 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, adap 1141 drivers/media/usb/dvb-usb/cxusb.c if (!adap->fe_adap[0].fe) adap 1149 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1150 drivers/media/usb/dvb-usb/cxusb.c struct dib0700_adapter_state *state = adap->priv; adap 1170 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1171 drivers/media/usb/dvb-usb/cxusb.c struct dib0700_adapter_state *state = adap->priv; adap 1191 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_dualdig4_rev2_tuner_attach(struct dvb_usb_adapter *adap) adap 1193 drivers/media/usb/dvb-usb/cxusb.c struct dib0700_adapter_state *st = adap->priv; adap 1201 drivers/media/usb/dvb-usb/cxusb.c tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, adap 1204 drivers/media/usb/dvb-usb/cxusb.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, adap 1208 drivers/media/usb/dvb-usb/cxusb.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 1209 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; adap 1213 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap) adap 1215 drivers/media/usb/dvb-usb/cxusb.c if (usb_set_interface(adap->dev->udev, 0, 1) < 0) adap 1218 drivers/media/usb/dvb-usb/cxusb.c cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap 1221 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0); adap 1222 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); adap 1223 drivers/media/usb/dvb-usb/cxusb.c cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); adap 1225 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(zl10353_attach, adap 1227 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 1228 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 1231 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, adap 1233 drivers/media/usb/dvb-usb/cxusb.c &adap->dev->i2c_adap); adap 1234 drivers/media/usb/dvb-usb/cxusb.c if (adap->fe_adap[0].fe) adap 1254 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_d680_dmb_frontend_attach(struct dvb_usb_adapter *adap) adap 1256 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *d = adap->dev; adap 1294 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(lgs8gxx_attach, adap 1296 drivers/media/usb/dvb-usb/cxusb.c if (!adap->fe_adap[0].fe) adap 1316 drivers/media/usb/dvb-usb/cxusb.c static int cxusb_mygica_d689_frontend_attach(struct dvb_usb_adapter *adap) adap 1318 drivers/media/usb/dvb-usb/cxusb.c struct dvb_usb_device *d = adap->dev; adap 1348 drivers/media/usb/dvb-usb/cxusb.c adap->fe_adap[0].fe = dvb_attach(atbm8830_attach, adap 1351 drivers/media/usb/dvb-usb/cxusb.c if (!adap->fe_adap[0].fe) adap 62 drivers/media/usb/dvb-usb/dib0700.h extern int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff); adap 158 drivers/media/usb/dvb-usb/dib0700_core.c static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg, adap 164 drivers/media/usb/dvb-usb/dib0700_core.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 282 drivers/media/usb/dvb-usb/dib0700_core.c static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap, adap 285 drivers/media/usb/dvb-usb/dib0700_core.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 350 drivers/media/usb/dvb-usb/dib0700_core.c static int dib0700_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 353 drivers/media/usb/dvb-usb/dib0700_core.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 358 drivers/media/usb/dvb-usb/dib0700_core.c return dib0700_i2c_xfer_new(adap, msg, num); adap 361 drivers/media/usb/dvb-usb/dib0700_core.c return dib0700_i2c_xfer_legacy(adap, msg, num); adap 581 drivers/media/usb/dvb-usb/dib0700_core.c int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 583 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = adap->dev->priv; adap 589 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_set_usb_xfer_len(adap->dev, adap 597 drivers/media/usb/dvb-usb/dib0700_core.c mutex_lock(&adap->dev->usb_mutex); adap 611 drivers/media/usb/dvb-usb/dib0700_core.c deb_info("modifying (%d) streaming state for %d\n", onoff, adap->id); adap 614 drivers/media/usb/dvb-usb/dib0700_core.c if ((adap->fe_adap[0].stream.props.endpoint != 2) adap 615 drivers/media/usb/dvb-usb/dib0700_core.c && (adap->fe_adap[0].stream.props.endpoint != 3)) { adap 616 drivers/media/usb/dvb-usb/dib0700_core.c deb_info("the endpoint number (%i) is not correct, use the adapter id instead", adap->fe_adap[0].stream.props.endpoint); adap 618 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (adap->id); adap 620 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << ~(adap->id); adap 623 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (adap->fe_adap[0].stream.props.endpoint-2); adap 625 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (3-adap->fe_adap[0].stream.props.endpoint); adap 632 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(adap->dev, st->buf, 4); adap 633 drivers/media/usb/dvb-usb/dib0700_core.c mutex_unlock(&adap->dev->usb_mutex); adap 85 drivers/media/usb/dvb-usb/dib0700_devices.c static int bristol_frontend_attach(struct dvb_usb_adapter *adap) adap 87 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 88 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 89 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); adap 90 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); adap 91 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); adap 92 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(10); adap 95 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 97 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); adap 99 drivers/media/usb/dvb-usb/dib0700_devices.c if (dib3000mc_i2c_enumeration(&adap->dev->i2c_adap, 2, DEFAULT_DIB3000P_I2C_ADDRESS, bristol_dib3000mc_config) != 0) { adap 100 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); adap 104 drivers/media/usb/dvb-usb/dib0700_devices.c st->mt2060_if1[adap->id] = 1220; adap 105 drivers/media/usb/dvb-usb/dib0700_devices.c return (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, adap 106 drivers/media/usb/dvb-usb/dib0700_devices.c (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; adap 109 drivers/media/usb/dvb-usb/dib0700_devices.c static int eeprom_read(struct i2c_adapter *adap,u8 adrs,u8 *pval) adap 115 drivers/media/usb/dvb-usb/dib0700_devices.c if (i2c_transfer(adap, msg, 2) != 2) return -EREMOTEIO; adap 119 drivers/media/usb/dvb-usb/dib0700_devices.c static int bristol_tuner_attach(struct dvb_usb_adapter *adap) adap 121 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; adap 122 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); adap 125 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && adap 126 drivers/media/usb/dvb-usb/dib0700_devices.c adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { adap 127 drivers/media/usb/dvb-usb/dib0700_devices.c if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; adap 129 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, adap 130 drivers/media/usb/dvb-usb/dib0700_devices.c &bristol_mt2060_config[adap->id], if1) == NULL ? adap 273 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap) adap 275 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 280 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 281 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 283 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 284 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 285 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 286 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 288 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 290 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 299 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, adap 300 drivers/media/usb/dvb-usb/dib0700_devices.c 0x80 + (adap->id << 1), adap 301 drivers/media/usb/dvb-usb/dib0700_devices.c &stk7700d_dib7000p_mt2266_config[adap->id]); adap 303 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 306 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) adap 308 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 313 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 314 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 316 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 317 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 318 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 319 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 321 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 323 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 324 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, adap 333 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, adap 334 drivers/media/usb/dvb-usb/dib0700_devices.c 0x80 + (adap->id << 1), adap 335 drivers/media/usb/dvb-usb/dib0700_devices.c &stk7700d_dib7000p_mt2266_config[adap->id]); adap 337 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 340 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) adap 343 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 345 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, adap 347 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(mt2266_attach, adap->fe_adap[0].fe, tun_i2c, adap 348 drivers/media/usb/dvb-usb/dib0700_devices.c &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; adap 422 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = ptr; adap 423 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 428 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); adap 430 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 454 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) adap 456 drivers/media/usb/dvb-usb/dib0700_devices.c struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; adap 457 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 464 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 466 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 468 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 469 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 470 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 471 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 473 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 475 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 478 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 486 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, adap 489 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 492 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) adap 495 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 497 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, adap 503 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->callback = stk7700ph_xc3028_callback; adap 505 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &stk7700ph_xc3028_config) adap 701 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap) adap 703 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 704 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 711 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 712 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(50); adap 714 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); adap 715 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 717 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); adap 718 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 719 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(100); adap 721 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 725 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap)) { adap 726 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config); adap 730 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config); adap 733 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 740 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) adap 742 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; adap 743 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 745 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 749 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && adap 750 drivers/media/usb/dvb-usb/dib0700_devices.c adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { adap 754 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); adap 756 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = dib7000m_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); adap 758 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk7700p_mt2060_config, adap 798 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 799 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 807 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 808 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 844 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 845 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 862 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 863 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 883 drivers/media/usb/dvb-usb/dib0700_devices.c static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap) adap 885 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 886 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, adap 889 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, adap 893 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 894 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7770_set_param_override; adap 898 drivers/media/usb/dvb-usb/dib0700_devices.c static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) adap 900 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 901 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); adap 903 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 904 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) adap 907 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) adap 911 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 912 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; adap 984 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) adap 986 drivers/media/usb/dvb-usb/dib0700_devices.c struct usb_device_descriptor *p = &adap->dev->udev->descriptor; adap 987 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 994 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 996 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 998 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 999 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1000 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1001 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1003 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1006 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1008 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1010 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 1018 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, adap 1020 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1042 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) adap 1044 drivers/media/usb/dvb-usb/dib0700_devices.c struct usb_device_descriptor *p = &adap->dev->udev->descriptor; adap 1045 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1052 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 1054 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 1056 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 1057 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1058 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1059 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1061 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1064 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1066 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1068 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 1076 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, adap 1078 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1232 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1233 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1240 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1241 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1286 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1287 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1305 drivers/media/usb/dvb-usb/dib0700_devices.c static int dib807x_tuner_attach(struct dvb_usb_adapter *adap) adap 1307 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 1308 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, adap 1311 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 1312 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, adap 1316 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, adap 1321 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 1322 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib807x_set_param_override; adap 1343 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk807x_frontend_attach(struct dvb_usb_adapter *adap) adap 1345 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1350 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 1352 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 1353 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1354 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1356 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1358 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1361 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1363 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1365 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, adap 1368 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, adap 1371 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1375 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap) adap 1377 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1382 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 1384 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 1386 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 1387 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1388 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1390 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1392 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1395 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1397 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1400 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80, 0); adap 1402 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, adap 1405 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1408 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) adap 1410 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1416 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82, 0); adap 1418 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, adap 1421 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1538 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1539 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1652 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 1653 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1736 drivers/media/usb/dvb-usb/dib0700_devices.c static int dib809x_tuner_attach(struct dvb_usb_adapter *adap) adap 1738 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 1739 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); adap 1741 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 1742 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) adap 1746 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) adap 1750 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 1751 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; adap 1755 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk809x_frontend_attach(struct dvb_usb_adapter *adap) adap 1757 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1762 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 1764 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 1765 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1766 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1768 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1770 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1773 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1775 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1777 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80, 0); adap 1779 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); adap 1781 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1784 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk809x_frontend1_attach(struct dvb_usb_adapter *adap) adap 1786 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1791 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x82, 0); adap 1793 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); adap 1795 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 1798 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim8096md_tuner_attach(struct dvb_usb_adapter *adap) adap 1800 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 1802 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_frontend *fe_slave = st->dib8000_ops.get_slave_frontend(adap->fe_adap[0].fe, 1); adap 1808 drivers/media/usb/dvb-usb/dib0700_devices.c fe_slave->dvb = adap->fe_adap[0].fe->dvb; adap 1811 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); adap 1812 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) adap 1815 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 1816 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; adap 1821 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim8096md_frontend_attach(struct dvb_usb_adapter *adap) adap 1824 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 1829 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 1831 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 1833 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 1834 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 1835 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 1837 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 1839 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 1842 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 1844 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 1846 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 0x80, 0); adap 1848 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); adap 1849 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->fe_adap[0].fe == NULL) adap 1856 drivers/media/usb/dvb-usb/dib0700_devices.c fe_slave = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); adap 1857 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.set_slave_frontend(adap->fe_adap[0].fe, fe_slave); adap 2119 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 2120 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2141 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 200); adap 2144 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 1000); adap 2149 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe8096p_frontend_attach(struct dvb_usb_adapter *adap) adap 2151 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 2153 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2158 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); adap 2162 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 2164 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 2165 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 2166 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 2168 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 2170 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 2173 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 2175 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 2177 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80, 1); adap 2179 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, adap 2182 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 2185 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe8096p_tuner_attach(struct dvb_usb_adapter *adap) adap 2187 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 2188 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_tuner(adap->fe_adap[0].fe); adap 2194 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, adap 2198 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib8000_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 2200 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 2201 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096p_agc_startup; adap 2388 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap) adap 2390 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2391 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 2395 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); adap 2398 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 340); adap 2400 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 2402 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 2403 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 2404 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 2405 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 2407 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 2410 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 2412 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 2414 drivers/media/usb/dvb-usb/dib0700_devices.c dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80); adap 2416 drivers/media/usb/dvb-usb/dib0700_devices.c if (request_firmware(&state->frontend_firmware, "dib9090.fw", &adap->dev->udev->dev)) { adap 2425 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); adap 2427 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 2430 drivers/media/usb/dvb-usb/dib0700_devices.c static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) adap 2432 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2433 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); adap 2444 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) adap 2446 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); adap 2451 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 1500); adap 2452 drivers/media/usb/dvb-usb/dib0700_devices.c if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) adap 2458 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap) adap 2460 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2461 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 2467 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); adap 2470 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 340); adap 2472 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 2474 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 2475 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 2476 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 2477 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 2479 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 2482 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 2484 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 2486 drivers/media/usb/dvb-usb/dib0700_devices.c if (request_firmware(&state->frontend_firmware, "dib9090.fw", &adap->dev->udev->dev)) { adap 2497 drivers/media/usb/dvb-usb/dib0700_devices.c dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); adap 2498 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); adap 2500 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->fe_adap[0].fe == NULL) adap 2503 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); adap 2507 drivers/media/usb/dvb-usb/dib0700_devices.c dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); adap 2512 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap) adap 2514 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2526 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); adap 2527 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NULL) adap 2529 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); adap 2535 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 1500); adap 2536 drivers/media/usb/dvb-usb/dib0700_devices.c if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) adap 2539 drivers/media/usb/dvb-usb/dib0700_devices.c fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); adap 2541 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); adap 2547 drivers/media/usb/dvb-usb/dib0700_devices.c fe_slave->dvb = adap->fe_adap[0].fe->dvb; adap 2548 drivers/media/usb/dvb-usb/dib0700_devices.c dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500); adap 2633 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 2634 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2669 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 2670 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 2824 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 2825 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3048 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim7090_frontend_attach(struct dvb_usb_adapter *adap) adap 3050 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3055 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3057 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 3058 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 3059 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 3060 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3063 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3065 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 3067 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) { adap 3072 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); adap 3074 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3077 drivers/media/usb/dvb-usb/dib0700_devices.c static int nim7090_tuner_attach(struct dvb_usb_adapter *adap) adap 3079 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 3080 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); adap 3086 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) adap 3089 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 3091 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 3092 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; adap 3096 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap) adap 3098 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3099 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3107 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3109 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 3110 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 3111 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 3112 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3115 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3117 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 3120 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) { adap 3126 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 340); adap 3127 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); adap 3128 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->fe_adap[0].fe == NULL) adap 3131 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib7000p_ops.slave_reset(adap->fe_adap[0].fe); adap 3136 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap) adap 3139 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3141 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { adap 3149 drivers/media/usb/dvb-usb/dib0700_devices.c i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1); adap 3156 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); adap 3157 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_i2c_speed(adap->dev, 200); adap 3159 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3162 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7090pvr_tuner0_attach(struct dvb_usb_adapter *adap) adap 3164 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 3165 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); adap 3171 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == NULL) adap 3174 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 3176 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 3177 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; adap 3181 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap) adap 3183 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 3184 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); adap 3190 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == NULL) adap 3193 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 3195 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 3196 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; adap 3200 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap) adap 3202 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3203 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3211 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3213 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 3214 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 3215 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 3216 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3218 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 3219 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3221 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 3223 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, adap 3230 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, adap 3233 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3236 drivers/media/usb/dvb-usb/dib0700_devices.c static int tfe7790p_tuner_attach(struct dvb_usb_adapter *adap) adap 3238 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; adap 3240 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); adap 3247 drivers/media/usb/dvb-usb/dib0700_devices.c if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, adap 3251 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 3253 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; adap 3254 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; adap 3306 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap) adap 3308 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3313 drivers/media/usb/dvb-usb/dib0700_devices.c stk7070pd_init(adap->dev); adap 3316 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 3318 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, adap 3326 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); adap 3327 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3330 drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap) adap 3332 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3337 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_config[1]); adap 3338 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3344 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 3345 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_device *dev = adap->dev; adap 3352 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, adap 3360 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 3361 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_device *dev = adap->dev; adap 3365 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, 0); adap 3376 drivers/media/usb/dvb-usb/dib0700_devices.c static int novatd_frontend_attach(struct dvb_usb_adapter *adap) adap 3378 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_device *dev = adap->dev; adap 3380 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3385 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->id == 0) { adap 3402 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&dev->i2c_adap, adap 3403 drivers/media/usb/dvb-usb/dib0700_devices.c adap->id == 0 ? 0x80 : 0x82, adap 3404 drivers/media/usb/dvb-usb/dib0700_devices.c &stk7070pd_dib7000p_config[adap->id]); adap 3406 drivers/media/usb/dvb-usb/dib0700_devices.c if (adap->fe_adap[0].fe == NULL) adap 3409 drivers/media/usb/dvb-usb/dib0700_devices.c st->read_status = adap->fe_adap[0].fe->ops.read_status; adap 3410 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.read_status = novatd_read_status_override; adap 3411 drivers/media/usb/dvb-usb/dib0700_devices.c st->sleep = adap->fe_adap[0].fe->ops.sleep; adap 3412 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->ops.sleep = novatd_sleep_override; adap 3439 drivers/media/usb/dvb-usb/dib0700_devices.c static int s5h1411_frontend_attach(struct dvb_usb_adapter *adap) adap 3441 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3450 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); adap 3451 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO3, GPIO_OUT, 0); adap 3452 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3454 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3456 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3458 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); adap 3459 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); adap 3460 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); adap 3461 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); adap 3462 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 0); adap 3466 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); adap 3469 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, adap 3470 drivers/media/usb/dvb-usb/dib0700_devices.c &adap->dev->i2c_adap); adap 3471 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3477 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = priv; adap 3481 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); adap 3483 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1); adap 3498 drivers/media/usb/dvb-usb/dib0700_devices.c static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) adap 3501 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; adap 3503 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, adap 3511 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_adapter *adap = priv; adap 3512 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3516 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); adap 3518 drivers/media/usb/dvb-usb/dib0700_devices.c state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); adap 3601 drivers/media/usb/dvb-usb/dib0700_devices.c static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap) adap 3603 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3604 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3610 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 3612 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3616 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3618 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3621 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO8, GPIO_OUT, 1); adap 3624 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); adap 3627 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_ctrl_clock(adap->dev, 72, 1); adap 3631 drivers/media/usb/dvb-usb/dib0700_devices.c if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { adap 3637 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x12, adap 3641 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3652 drivers/media/usb/dvb-usb/dib0700_devices.c static int xc4000_tuner_attach(struct dvb_usb_adapter *adap) adap 3655 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *state = adap->priv; adap 3658 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, adap 3666 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; adap 3668 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, adap 3701 drivers/media/usb/dvb-usb/dib0700_devices.c static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) adap 3703 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3711 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 3713 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3717 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3719 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3721 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3724 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, adap 3726 drivers/media/usb/dvb-usb/dib0700_devices.c &adap->dev->i2c_adap); adap 3728 drivers/media/usb/dvb-usb/dib0700_devices.c return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; adap 3731 drivers/media/usb/dvb-usb/dib0700_devices.c static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) adap 3733 drivers/media/usb/dvb-usb/dib0700_devices.c return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, adap 3734 drivers/media/usb/dvb-usb/dib0700_devices.c &adap->dev->i2c_adap, 0x60, adap 3738 drivers/media/usb/dvb-usb/dib0700_devices.c static int xbox_one_attach(struct dvb_usb_adapter *adap) adap 3740 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; adap 3742 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_usb_device *d = adap->dev; adap 3751 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); adap 3753 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); adap 3757 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3759 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); adap 3761 drivers/media/usb/dvb-usb/dib0700_devices.c dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); adap 3765 drivers/media/usb/dvb-usb/dib0700_devices.c mn88472_config.fe = &adap->fe_adap[0].fe; adap 3783 drivers/media/usb/dvb-usb/dib0700_devices.c adap->fe_adap[0].fe = mn88472_config.get_dvb_frontend(client_demod); adap 3795 drivers/media/usb/dvb-usb/dib0700_devices.c tda18250_config.fe = adap->fe_adap[0].fe; adap 3803 drivers/media/usb/dvb-usb/dib0700_devices.c client_tuner = i2c_new_device(&adap->dev->i2c_adap, &info); adap 22 drivers/media/usb/dvb-usb/dibusb-common.c int dibusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 24 drivers/media/usb/dvb-usb/dibusb-common.c if (adap->priv != NULL) { adap 25 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; adap 27 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.fifo_ctrl(adap->fe_adap[0].fe, onoff)) { adap 36 drivers/media/usb/dvb-usb/dibusb-common.c int dibusb_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) adap 38 drivers/media/usb/dvb-usb/dibusb-common.c if (adap->priv != NULL) { adap 39 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; adap 41 drivers/media/usb/dvb-usb/dibusb-common.c st->ops.pid_ctrl(adap->fe_adap[0].fe, adap 48 drivers/media/usb/dvb-usb/dibusb-common.c int dibusb_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 50 drivers/media/usb/dvb-usb/dibusb-common.c if (adap->priv != NULL) { adap 51 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; adap 53 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.pid_parse(adap->fe_adap[0].fe, onoff) < 0) adap 83 drivers/media/usb/dvb-usb/dibusb-common.c int dibusb2_0_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 92 drivers/media/usb/dvb-usb/dibusb-common.c if ((ret = dibusb_streaming_ctrl(adap,onoff)) < 0) adap 98 drivers/media/usb/dvb-usb/dibusb-common.c ret = dvb_usb_generic_write(adap->dev, b, 2); adap 105 drivers/media/usb/dvb-usb/dibusb-common.c ret = dvb_usb_generic_write(adap->dev, b, 3); adap 178 drivers/media/usb/dvb-usb/dibusb-common.c static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) adap 180 drivers/media/usb/dvb-usb/dibusb-common.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 18 drivers/media/usb/dvb-usb/dibusb-mb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 19 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; adap 24 drivers/media/usb/dvb-usb/dibusb-mb.c static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap) adap 27 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; adap 31 drivers/media/usb/dvb-usb/dibusb-mb.c adap->fe_adap[0].fe = dvb_attach(dib3000mb_attach, &demod_cfg, adap 32 drivers/media/usb/dvb-usb/dibusb-mb.c &adap->dev->i2c_adap, &st->ops); adap 33 drivers/media/usb/dvb-usb/dibusb-mb.c if ((adap->fe_adap[0].fe) == NULL) adap 36 drivers/media/usb/dvb-usb/dibusb-mb.c adap->fe_adap[0].fe->ops.i2c_gate_ctrl = dib3000mb_i2c_gate_ctrl; adap 41 drivers/media/usb/dvb-usb/dibusb-mb.c static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap) adap 43 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; adap 47 drivers/media/usb/dvb-usb/dibusb-mb.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, adap 52 drivers/media/usb/dvb-usb/dibusb-mb.c static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap) adap 54 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; adap 58 drivers/media/usb/dvb-usb/dibusb-mb.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, adap 66 drivers/media/usb/dvb-usb/dibusb-mb.c static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap) adap 74 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; adap 79 drivers/media/usb/dvb-usb/dibusb-mb.c if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) adap 80 drivers/media/usb/dvb-usb/dibusb-mb.c adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 1); adap 82 drivers/media/usb/dvb-usb/dibusb-mb.c if (i2c_transfer(&adap->dev->i2c_adap, msg, 2) != 2) { adap 87 drivers/media/usb/dvb-usb/dibusb-mb.c if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) adap 88 drivers/media/usb/dvb-usb/dibusb-mb.c adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 0); adap 92 drivers/media/usb/dvb-usb/dibusb-mb.c ret = dibusb_thomson_tuner_attach(adap); adap 95 drivers/media/usb/dvb-usb/dibusb-mb.c ret = dibusb_panasonic_tuner_attach(adap); adap 83 drivers/media/usb/dvb-usb/dibusb-mc-common.c int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) adap 85 drivers/media/usb/dvb-usb/dibusb-mc-common.c if (le16_to_cpu(adap->dev->udev->descriptor.idVendor) == USB_VID_LITEON && adap 86 drivers/media/usb/dvb-usb/dibusb-mc-common.c le16_to_cpu(adap->dev->udev->descriptor.idProduct) == adap 91 drivers/media/usb/dvb-usb/dibusb-mc-common.c adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, adap 92 drivers/media/usb/dvb-usb/dibusb-mc-common.c &adap->dev->i2c_adap, adap 95 drivers/media/usb/dvb-usb/dibusb-mc-common.c if ((adap->fe_adap[0].fe) == NULL) adap 96 drivers/media/usb/dvb-usb/dibusb-mc-common.c adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, adap 97 drivers/media/usb/dvb-usb/dibusb-mc-common.c &adap->dev->i2c_adap, adap 100 drivers/media/usb/dvb-usb/dibusb-mc-common.c if ((adap->fe_adap[0].fe) != NULL) { adap 101 drivers/media/usb/dvb-usb/dibusb-mc-common.c if (adap->priv != NULL) { adap 102 drivers/media/usb/dvb-usb/dibusb-mc-common.c struct dibusb_state *st = adap->priv; adap 116 drivers/media/usb/dvb-usb/dibusb-mc-common.c int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap) adap 118 drivers/media/usb/dvb-usb/dibusb-mc-common.c struct dibusb_state *st = adap->priv; adap 124 drivers/media/usb/dvb-usb/dibusb-mc-common.c if (le16_to_cpu(adap->dev->udev->descriptor.idVendor) == USB_VID_LITEON && adap 125 drivers/media/usb/dvb-usb/dibusb-mc-common.c le16_to_cpu(adap->dev->udev->descriptor.idProduct) == USB_PID_LITEON_DVB_T_WARM) { adap 127 drivers/media/usb/dvb-usb/dibusb-mc-common.c dibusb_read_eeprom_byte(adap->dev,0x7E,&a); adap 128 drivers/media/usb/dvb-usb/dibusb-mc-common.c dibusb_read_eeprom_byte(adap->dev,0x7F,&b); adap 137 drivers/media/usb/dvb-usb/dibusb-mc-common.c } else if (le16_to_cpu(adap->dev->udev->descriptor.idVendor) == USB_VID_DIBCOM && adap 138 drivers/media/usb/dvb-usb/dibusb-mc-common.c le16_to_cpu(adap->dev->udev->descriptor.idProduct) == USB_PID_DIBCOM_MOD3001_WARM) { adap 140 drivers/media/usb/dvb-usb/dibusb-mc-common.c dibusb_read_eeprom_byte(adap->dev, 7, &desc); adap 144 drivers/media/usb/dvb-usb/dibusb-mc-common.c dibusb_read_eeprom_byte(adap->dev, a, &desc); adap 154 drivers/media/usb/dvb-usb/dibusb-mc-common.c tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); adap 155 drivers/media/usb/dvb-usb/dibusb-mc-common.c if (dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk3000p_mt2060_config, if1) == NULL) { adap 157 drivers/media/usb/dvb-usb/dibusb-mc-common.c if (dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, tun_i2c, DVB_PLL_ENV57H1XD5) == NULL) adap 162 drivers/media/usb/dvb-usb/dibusb-mc-common.c dib3000mc_set_config(adap->fe_adap[0].fe, &stk3000p_dib3000p_config); adap 54 drivers/media/usb/dvb-usb/digitv.c static int digitv_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) adap 56 drivers/media/usb/dvb-usb/digitv.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 127 drivers/media/usb/dvb-usb/digitv.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 133 drivers/media/usb/dvb-usb/digitv.c return digitv_ctrl_msg(adap->dev, USB_WRITE_TUNER, 0, &b[1], 4, NULL, 0); adap 140 drivers/media/usb/dvb-usb/digitv.c static int digitv_frontend_attach(struct dvb_usb_adapter *adap) adap 142 drivers/media/usb/dvb-usb/digitv.c struct digitv_state *st = adap->dev->priv; adap 144 drivers/media/usb/dvb-usb/digitv.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, &digitv_mt352_config, adap 145 drivers/media/usb/dvb-usb/digitv.c &adap->dev->i2c_adap); adap 146 drivers/media/usb/dvb-usb/digitv.c if ((adap->fe_adap[0].fe) != NULL) { adap 150 drivers/media/usb/dvb-usb/digitv.c adap->fe_adap[0].fe = dvb_attach(nxt6000_attach, adap 152 drivers/media/usb/dvb-usb/digitv.c &adap->dev->i2c_adap); adap 153 drivers/media/usb/dvb-usb/digitv.c if ((adap->fe_adap[0].fe) != NULL) { adap 160 drivers/media/usb/dvb-usb/digitv.c static int digitv_tuner_attach(struct dvb_usb_adapter *adap) adap 162 drivers/media/usb/dvb-usb/digitv.c struct digitv_state *st = adap->dev->priv; adap 164 drivers/media/usb/dvb-usb/digitv.c if (!dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, NULL, DVB_PLL_TDED4)) adap 168 drivers/media/usb/dvb-usb/digitv.c adap->fe_adap[0].fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; adap 40 drivers/media/usb/dvb-usb/dtt200u.c static int dtt200u_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 42 drivers/media/usb/dvb-usb/dtt200u.c struct dvb_usb_device *d = adap->dev; adap 50 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 2); adap 58 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 1); adap 66 drivers/media/usb/dvb-usb/dtt200u.c static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) adap 68 drivers/media/usb/dvb-usb/dtt200u.c struct dvb_usb_device *d = adap->dev; adap 80 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 4); adap 131 drivers/media/usb/dvb-usb/dtt200u.c static int dtt200u_frontend_attach(struct dvb_usb_adapter *adap) adap 133 drivers/media/usb/dvb-usb/dtt200u.c adap->fe_adap[0].fe = dtt200u_fe_attach(adap->dev); adap 63 drivers/media/usb/dvb-usb/dtv5100.c static int dtv5100_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 66 drivers/media/usb/dvb-usb/dtv5100.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 109 drivers/media/usb/dvb-usb/dtv5100.c static int dtv5100_frontend_attach(struct dvb_usb_adapter *adap) adap 111 drivers/media/usb/dvb-usb/dtv5100.c adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &dtv5100_zl10353_config, adap 112 drivers/media/usb/dvb-usb/dtv5100.c &adap->dev->i2c_adap); adap 113 drivers/media/usb/dvb-usb/dtv5100.c if (adap->fe_adap[0].fe == NULL) adap 117 drivers/media/usb/dvb-usb/dtv5100.c adap->fe_adap[0].fe->ops.i2c_gate_ctrl = NULL; adap 126 drivers/media/usb/dvb-usb/dtv5100.c static int dtv5100_tuner_attach(struct dvb_usb_adapter *adap) adap 129 drivers/media/usb/dvb-usb/dtv5100.c adap->fe_adap[0].fe, &adap->dev->i2c_adap, adap 38 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap); adap 39 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap); adap 44 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, adap 46 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap); adap 47 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap); adap 48 drivers/media/usb/dvb-usb/dvb-usb-common.h extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap); adap 16 drivers/media/usb/dvb-usb/dvb-usb-dvb.c struct dvb_usb_adapter *adap = dvbdmxfeed->demux->priv; adap 19 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap == NULL) adap 22 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if ((adap->active_fe < 0) || adap 23 drivers/media/usb/dvb-usb/dvb-usb-dvb.c (adap->active_fe >= adap->num_frontends_initialized)) { adap 27 drivers/media/usb/dvb-usb/dvb-usb-dvb.c newfeedcount = adap->feedcount + (onoff ? 1 : -1); adap 32 drivers/media/usb/dvb-usb/dvb-usb-dvb.c usb_urb_kill(&adap->fe_adap[adap->active_fe].stream); adap 34 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { adap 35 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 0); adap 43 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->feedcount = newfeedcount; adap 47 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[adap->active_fe].pid_filtering ? adap 50 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && adap 51 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[adap->active_fe].pid_filtering && adap 52 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.fe[adap->active_fe].pid_filter != NULL) adap 53 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.fe[adap->active_fe].pid_filter(adap, dvbdmxfeed->index, dvbdmxfeed->pid, onoff); adap 58 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->feedcount == onoff && adap->feedcount > 0) { adap 60 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && adap 61 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.fe[adap->active_fe].caps & adap 63 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.fe[adap->active_fe].pid_filter_ctrl != NULL) { adap 64 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = adap->props.fe[adap->active_fe].pid_filter_ctrl(adap, adap 65 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[adap->active_fe].pid_filtering); adap 72 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { adap 73 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 1); adap 81 drivers/media/usb/dvb-usb/dvb-usb-dvb.c usb_urb_submit(&adap->fe_adap[adap->active_fe].stream); adap 99 drivers/media/usb/dvb-usb/dvb-usb-dvb.c static int dvb_usb_media_device_init(struct dvb_usb_adapter *adap) adap 103 drivers/media/usb/dvb-usb/dvb-usb-dvb.c struct dvb_usb_device *d = adap->dev; adap 112 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_register_media_controller(&adap->dvb_adap, mdev); adap 119 drivers/media/usb/dvb-usb/dvb-usb-dvb.c static int dvb_usb_media_device_register(struct dvb_usb_adapter *adap) adap 122 drivers/media/usb/dvb-usb/dvb-usb-dvb.c return media_device_register(adap->dvb_adap.mdev); adap 128 drivers/media/usb/dvb-usb/dvb-usb-dvb.c static void dvb_usb_media_device_unregister(struct dvb_usb_adapter *adap) adap 131 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (!adap->dvb_adap.mdev) adap 134 drivers/media/usb/dvb-usb/dvb-usb-dvb.c mutex_lock(&adap->dvb_adap.mdev_lock); adap 136 drivers/media/usb/dvb-usb/dvb-usb-dvb.c media_device_unregister(adap->dvb_adap.mdev); adap 137 drivers/media/usb/dvb-usb/dvb-usb-dvb.c media_device_cleanup(adap->dvb_adap.mdev); adap 138 drivers/media/usb/dvb-usb/dvb-usb-dvb.c kfree(adap->dvb_adap.mdev); adap 139 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dvb_adap.mdev = NULL; adap 141 drivers/media/usb/dvb-usb/dvb-usb-dvb.c mutex_unlock(&adap->dvb_adap.mdev_lock); adap 145 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) adap 148 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, adap 149 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dev->owner, &adap->dev->udev->dev, adap 156 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dvb_adap.priv = adap; adap 158 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = dvb_usb_media_device_init(adap); adap 164 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->dev->props.read_mac_address) { adap 165 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->dev->props.read_mac_address(adap->dev, adap->dvb_adap.proposed_mac) == 0) adap 166 drivers/media/usb/dvb-usb/dvb-usb-dvb.c info("MAC address: %pM", adap->dvb_adap.proposed_mac); adap 172 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING; adap 173 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.priv = adap; adap 175 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.filternum = 0; adap 176 drivers/media/usb/dvb-usb/dvb-usb-dvb.c for (i = 0; i < adap->props.num_frontends; i++) { adap 177 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->demux.filternum < adap->fe_adap[i].max_feed_count) adap 178 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.filternum = adap->fe_adap[i].max_feed_count; adap 180 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.feednum = adap->demux.filternum; adap 181 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.start_feed = dvb_usb_start_feed; adap 182 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.stop_feed = dvb_usb_stop_feed; adap 183 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.write_to_decoder = NULL; adap 184 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if ((ret = dvb_dmx_init(&adap->demux)) < 0) { adap 189 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dmxdev.filternum = adap->demux.filternum; adap 190 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dmxdev.demux = &adap->demux.dmx; adap 191 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dmxdev.capabilities = 0; adap 192 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if ((ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap)) < 0) { adap 197 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if ((ret = dvb_net_init(&adap->dvb_adap, &adap->dvb_net, adap 198 drivers/media/usb/dvb-usb/dvb-usb-dvb.c &adap->demux.dmx)) < 0) { adap 203 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->state |= DVB_USB_ADAP_STATE_DVB; adap 207 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_dmxdev_release(&adap->dmxdev); adap 209 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_dmx_release(&adap->demux); adap 211 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_usb_media_device_unregister(adap); adap 213 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_unregister_adapter(&adap->dvb_adap); adap 218 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap) adap 220 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->state & DVB_USB_ADAP_STATE_DVB) { adap 222 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_net_release(&adap->dvb_net); adap 223 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->demux.dmx.close(&adap->demux.dmx); adap 224 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_dmxdev_release(&adap->dmxdev); adap 225 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_dmx_release(&adap->demux); adap 226 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_usb_media_device_unregister(adap); adap 227 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_unregister_adapter(&adap->dvb_adap); adap 228 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->state &= ~DVB_USB_ADAP_STATE_DVB; adap 235 drivers/media/usb/dvb-usb/dvb-usb-dvb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 237 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int ret = (adap->props.frontend_ctrl) ? adap 238 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.frontend_ctrl(fe, onoff) : 0; adap 245 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->active_fe = fe->id; adap 252 drivers/media/usb/dvb-usb/dvb-usb-dvb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 254 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_usb_device_power_ctrl(adap->dev, 1); adap 258 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->fe_adap[fe->id].fe_init) adap 259 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[fe->id].fe_init(fe); adap 266 drivers/media/usb/dvb-usb/dvb-usb-dvb.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 268 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->fe_adap[fe->id].fe_sleep) adap 269 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[fe->id].fe_sleep(fe); adap 273 drivers/media/usb/dvb-usb/dvb-usb-dvb.c return dvb_usb_device_power_ctrl(adap->dev, 0); adap 276 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) adap 281 drivers/media/usb/dvb-usb/dvb-usb-dvb.c for (i = 0; i < adap->props.num_frontends; i++) { adap 283 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[i].frontend_attach == NULL) { adap 285 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dev->desc->name, adap->id, i); adap 290 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = adap->props.fe[i].frontend_attach(adap); adap 291 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (ret || adap->fe_adap[i].fe == NULL) { adap 295 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->dev->desc->name); adap 300 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe->id = i; adap 303 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe_init = adap->fe_adap[i].fe->ops.init; adap 304 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe->ops.init = dvb_usb_fe_wakeup; adap 305 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe_sleep = adap->fe_adap[i].fe->ops.sleep; adap 306 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe->ops.sleep = dvb_usb_fe_sleep; adap 308 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (dvb_register_frontend(&adap->dvb_adap, adap->fe_adap[i].fe)) { adap 310 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_frontend_detach(adap->fe_adap[i].fe); adap 311 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->fe_adap[i].fe = NULL; adap 321 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->props.fe[i].tuner_attach != NULL) adap 322 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->props.fe[i].tuner_attach(adap); adap 324 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->num_frontends_initialized++; adap 327 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = dvb_create_media_graph(&adap->dvb_adap, true); adap 331 drivers/media/usb/dvb-usb/dvb-usb-dvb.c ret = dvb_usb_media_device_register(adap); adap 336 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap) adap 338 drivers/media/usb/dvb-usb/dvb-usb-dvb.c int i = adap->num_frontends_initialized - 1; adap 342 drivers/media/usb/dvb-usb/dvb-usb-dvb.c if (adap->fe_adap[i].fe != NULL) { adap 343 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_unregister_frontend(adap->fe_adap[i].fe); adap 344 drivers/media/usb/dvb-usb/dvb-usb-dvb.c dvb_frontend_detach(adap->fe_adap[i].fe); adap 347 drivers/media/usb/dvb-usb/dvb-usb-dvb.c adap->num_frontends_initialized = 0; adap 28 drivers/media/usb/dvb-usb/dvb-usb-init.c struct dvb_usb_adapter *adap; adap 32 drivers/media/usb/dvb-usb/dvb-usb-init.c adap = &d->adapter[n]; adap 33 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->dev = d; adap 34 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->id = n; adap 36 drivers/media/usb/dvb-usb/dvb-usb-init.c memcpy(&adap->props, &d->props.adapter[n], sizeof(struct dvb_usb_adapter_properties)); adap 38 drivers/media/usb/dvb-usb/dvb-usb-init.c for (o = 0; o < adap->props.num_frontends; o++) { adap 39 drivers/media/usb/dvb-usb/dvb-usb-init.c struct dvb_usb_adapter_fe_properties *props = &adap->props.fe[o]; adap 49 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].pid_filtering = 1; adap 50 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].max_feed_count = props->pid_filter_count; adap 53 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].pid_filtering = 0; adap 54 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].max_feed_count = 255; adap 57 drivers/media/usb/dvb-usb/dvb-usb-init.c if (!adap->fe_adap[o].pid_filtering && adap 61 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].pid_filtering = 1; adap 62 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].max_feed_count = props->pid_filter_count; adap 66 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->fe_adap[o].priv = kzalloc(props->size_of_priv, GFP_KERNEL); adap 67 drivers/media/usb/dvb-usb/dvb-usb-init.c if (adap->fe_adap[o].priv == NULL) { adap 74 drivers/media/usb/dvb-usb/dvb-usb-init.c if (adap->props.size_of_priv > 0) { adap 75 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->priv = kzalloc(adap->props.size_of_priv, GFP_KERNEL); adap 76 drivers/media/usb/dvb-usb/dvb-usb-init.c if (adap->priv == NULL) { adap 82 drivers/media/usb/dvb-usb/dvb-usb-init.c if ((ret = dvb_usb_adapter_stream_init(adap)) || adap 83 drivers/media/usb/dvb-usb/dvb-usb-init.c (ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) || adap 84 drivers/media/usb/dvb-usb/dvb-usb-init.c (ret = dvb_usb_adapter_frontend_init(adap))) { adap 89 drivers/media/usb/dvb-usb/dvb-usb-init.c if (adap->fe_adap[1].fe) adap 90 drivers/media/usb/dvb-usb/dvb-usb-init.c adap->dvb_adap.mfe_shared = 1; adap 72 drivers/media/usb/dvb-usb/dvb-usb-urb.c struct dvb_usb_adapter *adap = stream->user_priv; adap 73 drivers/media/usb/dvb-usb/dvb-usb-urb.c if (adap->feedcount > 0 && adap->state & DVB_USB_ADAP_STATE_DVB) adap 74 drivers/media/usb/dvb-usb/dvb-usb-urb.c dvb_dmx_swfilter(&adap->demux, buffer, length); adap 79 drivers/media/usb/dvb-usb/dvb-usb-urb.c struct dvb_usb_adapter *adap = stream->user_priv; adap 80 drivers/media/usb/dvb-usb/dvb-usb-urb.c if (adap->feedcount > 0 && adap->state & DVB_USB_ADAP_STATE_DVB) adap 81 drivers/media/usb/dvb-usb/dvb-usb-urb.c dvb_dmx_swfilter_204(&adap->demux, buffer, length); adap 87 drivers/media/usb/dvb-usb/dvb-usb-urb.c struct dvb_usb_adapter *adap = stream->user_priv; adap 88 drivers/media/usb/dvb-usb/dvb-usb-urb.c if (adap->feedcount > 0 && adap->state & DVB_USB_ADAP_STATE_DVB) adap 89 drivers/media/usb/dvb-usb/dvb-usb-urb.c dvb_dmx_swfilter_raw(&adap->demux, buffer, length); adap 92 drivers/media/usb/dvb-usb/dvb-usb-urb.c int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap) adap 95 drivers/media/usb/dvb-usb/dvb-usb-urb.c for (i = 0; i < adap->props.num_frontends; i++) { adap 97 drivers/media/usb/dvb-usb/dvb-usb-urb.c adap->fe_adap[i].stream.udev = adap->dev->udev; adap 98 drivers/media/usb/dvb-usb/dvb-usb-urb.c if (adap->props.fe[i].caps & DVB_USB_ADAP_RECEIVES_204_BYTE_TS) adap 99 drivers/media/usb/dvb-usb/dvb-usb-urb.c adap->fe_adap[i].stream.complete = adap 102 drivers/media/usb/dvb-usb/dvb-usb-urb.c if (adap->props.fe[i].caps & DVB_USB_ADAP_RECEIVES_RAW_PAYLOAD) adap 103 drivers/media/usb/dvb-usb/dvb-usb-urb.c adap->fe_adap[i].stream.complete = adap 106 drivers/media/usb/dvb-usb/dvb-usb-urb.c adap->fe_adap[i].stream.complete = dvb_usb_data_complete; adap 107 drivers/media/usb/dvb-usb/dvb-usb-urb.c adap->fe_adap[i].stream.user_priv = adap; adap 108 drivers/media/usb/dvb-usb/dvb-usb-urb.c ret = usb_urb_init(&adap->fe_adap[i].stream, adap 109 drivers/media/usb/dvb-usb/dvb-usb-urb.c &adap->props.fe[i].stream); adap 116 drivers/media/usb/dvb-usb/dvb-usb-urb.c int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap) adap 119 drivers/media/usb/dvb-usb/dvb-usb-urb.c for (i = 0; i < adap->props.num_frontends; i++) adap 120 drivers/media/usb/dvb-usb/dvb-usb-urb.c usb_urb_exit(&adap->fe_adap[i].stream); adap 116 drivers/media/usb/dvb-usb/dw2102.c static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 119 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 189 drivers/media/usb/dvb-usb/dw2102.c static int dw2102_serit_i2c_transfer(struct i2c_adapter *adap, adap 192 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 265 drivers/media/usb/dvb-usb/dw2102.c static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) adap 267 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 371 drivers/media/usb/dvb-usb/dw2102.c static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) adap 373 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 470 drivers/media/usb/dvb-usb/dw2102.c static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 473 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 556 drivers/media/usb/dvb-usb/dw2102.c static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 559 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 690 drivers/media/usb/dvb-usb/dw2102.c static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 693 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 888 drivers/media/usb/dvb-usb/dw2102.c static int su3000_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 899 drivers/media/usb/dvb-usb/dw2102.c i2c_transfer(&adap->dev->i2c_adap, &msg, 1); adap 1378 drivers/media/usb/dvb-usb/dw2102.c static int su3000_frontend_attach(struct dvb_usb_adapter *adap) adap 1380 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = adap->dev; adap 1421 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe = dvb_attach(ds3000_attach, &su3000_ds3000_config, adap 1423 drivers/media/usb/dvb-usb/dw2102.c if (adap->fe_adap[0].fe == NULL) adap 1426 drivers/media/usb/dvb-usb/dw2102.c if (dvb_attach(ts2020_attach, adap->fe_adap[0].fe, adap 1437 drivers/media/usb/dvb-usb/dw2102.c static int t220_frontend_attach(struct dvb_usb_adapter *adap) adap 1439 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = adap->dev; adap 1481 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe = dvb_attach(cxd2820r_attach, &cxd2820r_config, adap 1483 drivers/media/usb/dvb-usb/dw2102.c if (adap->fe_adap[0].fe != NULL) { adap 1484 drivers/media/usb/dvb-usb/dw2102.c if (dvb_attach(tda18271_attach, adap->fe_adap[0].fe, 0x60, adap 1495 drivers/media/usb/dvb-usb/dw2102.c static int m88rs2000_frontend_attach(struct dvb_usb_adapter *adap) adap 1497 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = adap->dev; adap 1509 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe = dvb_attach(m88rs2000_attach, adap 1513 drivers/media/usb/dvb-usb/dw2102.c if (adap->fe_adap[0].fe == NULL) adap 1516 drivers/media/usb/dvb-usb/dw2102.c if (dvb_attach(ts2020_attach, adap->fe_adap[0].fe, adap 1527 drivers/media/usb/dvb-usb/dw2102.c static int tt_s2_4600_frontend_attach(struct dvb_usb_adapter *adap) adap 1529 drivers/media/usb/dvb-usb/dw2102.c struct dvb_usb_device *d = adap->dev; adap 1600 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe = m88ds3103_pdata.get_dvb_frontend(client); adap 1606 drivers/media/usb/dvb-usb/dw2102.c ts2020_config.fe = adap->fe_adap[0].fe; adap 1615 drivers/media/usb/dvb-usb/dw2102.c dvb_frontend_detach(adap->fe_adap[0].fe); adap 1621 drivers/media/usb/dvb-usb/dw2102.c dvb_frontend_detach(adap->fe_adap[0].fe); adap 1626 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe->ops.read_signal_strength = adap 1627 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe->ops.tuner_ops.get_rf_strength; adap 1632 drivers/media/usb/dvb-usb/dw2102.c state->fe_read_status = adap->fe_adap[0].fe->ops.read_status; adap 1633 drivers/media/usb/dvb-usb/dw2102.c adap->fe_adap[0].fe->ops.read_status = tt_s2_4600_read_status; adap 1640 drivers/media/usb/dvb-usb/dw2102.c static int dw2102_tuner_attach(struct dvb_usb_adapter *adap) adap 1642 drivers/media/usb/dvb-usb/dw2102.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, adap 1643 drivers/media/usb/dvb-usb/dw2102.c &adap->dev->i2c_adap, DVB_PLL_OPERA1); adap 1647 drivers/media/usb/dvb-usb/dw2102.c static int dw3101_tuner_attach(struct dvb_usb_adapter *adap) adap 1649 drivers/media/usb/dvb-usb/dw2102.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, adap 1650 drivers/media/usb/dvb-usb/dw2102.c &adap->dev->i2c_adap, DVB_PLL_TUA6034); adap 248 drivers/media/usb/dvb-usb/gp8psk.c static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 250 drivers/media/usb/dvb-usb/gp8psk.c return gp8psk_usb_out_op(adap->dev, ARM_TRANSFER, onoff, 0 , NULL, 0); adap 284 drivers/media/usb/dvb-usb/gp8psk.c static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap) adap 286 drivers/media/usb/dvb-usb/gp8psk.c struct dvb_usb_device *d = adap->dev; adap 292 drivers/media/usb/dvb-usb/gp8psk.c adap->fe_adap[0].fe = dvb_attach(gp8psk_fe_attach, adap 249 drivers/media/usb/dvb-usb/m920x.c static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) adap 251 drivers/media/usb/dvb-usb/m920x.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 335 drivers/media/usb/dvb-usb/m920x.c static int m920x_update_filters(struct dvb_usb_adapter *adap) adap 337 drivers/media/usb/dvb-usb/m920x.c struct m920x_state *m = adap->dev->priv; adap 338 drivers/media/usb/dvb-usb/m920x.c int enabled = m->filtering_enabled[adap->id]; adap 340 drivers/media/usb/dvb-usb/m920x.c int ep = adap->props.fe[0].stream.endpoint; adap 343 drivers/media/usb/dvb-usb/m920x.c if (m->filters[adap->id][i] == 8192) adap 347 drivers/media/usb/dvb-usb/m920x.c if ((ret = m920x_set_filter(adap->dev, ep, 1, enabled)) != 0) adap 351 drivers/media/usb/dvb-usb/m920x.c if ((ret = m920x_set_filter(adap->dev, ep, i + 2, 0)) != 0) adap 357 drivers/media/usb/dvb-usb/m920x.c if (m->filters[adap->id][i] == 0) adap 360 drivers/media/usb/dvb-usb/m920x.c if ((ret = m920x_set_filter(adap->dev, ep, filter + 2, m->filters[adap->id][i])) != 0) adap 370 drivers/media/usb/dvb-usb/m920x.c static int m920x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 372 drivers/media/usb/dvb-usb/m920x.c struct m920x_state *m = adap->dev->priv; adap 374 drivers/media/usb/dvb-usb/m920x.c m->filtering_enabled[adap->id] = onoff ? 1 : 0; adap 376 drivers/media/usb/dvb-usb/m920x.c return m920x_update_filters(adap); adap 379 drivers/media/usb/dvb-usb/m920x.c static int m920x_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) adap 381 drivers/media/usb/dvb-usb/m920x.c struct m920x_state *m = adap->dev->priv; adap 383 drivers/media/usb/dvb-usb/m920x.c m->filters[adap->id][index] = onoff ? pid : 0; adap 385 drivers/media/usb/dvb-usb/m920x.c return m920x_update_filters(adap); adap 551 drivers/media/usb/dvb-usb/m920x.c static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap) adap 555 drivers/media/usb/dvb-usb/m920x.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, adap 557 drivers/media/usb/dvb-usb/m920x.c &adap->dev->i2c_adap); adap 558 drivers/media/usb/dvb-usb/m920x.c if ((adap->fe_adap[0].fe) == NULL) adap 564 drivers/media/usb/dvb-usb/m920x.c static int m920x_mt352_frontend_attach_vp7049(struct dvb_usb_adapter *adap) adap 586 drivers/media/usb/dvb-usb/m920x.c ret = m920x_write_seq(adap->dev->udev, M9206_CORE, vp7049_fe_init_seq); adap 592 drivers/media/usb/dvb-usb/m920x.c return m920x_mt352_frontend_attach(adap); adap 595 drivers/media/usb/dvb-usb/m920x.c static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap) adap 599 drivers/media/usb/dvb-usb/m920x.c adap->fe_adap[0].fe = dvb_attach(tda10046_attach, adap 601 drivers/media/usb/dvb-usb/m920x.c &adap->dev->i2c_adap); adap 602 drivers/media/usb/dvb-usb/m920x.c if ((adap->fe_adap[0].fe) == NULL) adap 608 drivers/media/usb/dvb-usb/m920x.c static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap) adap 612 drivers/media/usb/dvb-usb/m920x.c adap->fe_adap[0].fe = dvb_attach(tda10046_attach, adap 614 drivers/media/usb/dvb-usb/m920x.c &adap->dev->i2c_adap); adap 615 drivers/media/usb/dvb-usb/m920x.c if ((adap->fe_adap[0].fe) == NULL) adap 621 drivers/media/usb/dvb-usb/m920x.c static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap) adap 625 drivers/media/usb/dvb-usb/m920x.c if (dvb_attach(qt1010_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) adap 631 drivers/media/usb/dvb-usb/m920x.c static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap) adap 635 drivers/media/usb/dvb-usb/m920x.c if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL) adap 641 drivers/media/usb/dvb-usb/m920x.c static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) adap 645 drivers/media/usb/dvb-usb/m920x.c if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) adap 651 drivers/media/usb/dvb-usb/m920x.c static int m920x_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) adap 653 drivers/media/usb/dvb-usb/m920x.c dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, adap 654 drivers/media/usb/dvb-usb/m920x.c &adap->dev->i2c_adap, 0x61, adap 659 drivers/media/usb/dvb-usb/m920x.c static int m920x_mt2060_tuner_attach(struct dvb_usb_adapter *adap) adap 663 drivers/media/usb/dvb-usb/m920x.c if (dvb_attach(mt2060_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, adap 131 drivers/media/usb/dvb-usb/opera1.c static int opera1_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], adap 134 drivers/media/usb/dvb-usb/opera1.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 274 drivers/media/usb/dvb-usb/opera1.c static int opera1_tuner_attach(struct dvb_usb_adapter *adap) adap 277 drivers/media/usb/dvb-usb/opera1.c dvb_pll_attach, adap->fe_adap[0].fe, 0xc0>>1, adap 278 drivers/media/usb/dvb-usb/opera1.c &adap->dev->i2c_adap, DVB_PLL_OPERA1 adap 293 drivers/media/usb/dvb-usb/opera1.c static int opera1_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 302 drivers/media/usb/dvb-usb/opera1.c i2c_transfer(&adap->dev->i2c_adap, start_tuner, 1); adap 306 drivers/media/usb/dvb-usb/opera1.c static int opera1_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, adap 319 drivers/media/usb/dvb-usb/opera1.c i2c_transfer(&adap->dev->i2c_adap, msg, 1); adap 323 drivers/media/usb/dvb-usb/opera1.c static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff) adap 336 drivers/media/usb/dvb-usb/opera1.c i2c_transfer(&adap->dev->i2c_adap, msg, 1); adap 161 drivers/media/usb/dvb-usb/technisat-usb2.c static int technisat_usb2_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, adap 165 drivers/media/usb/dvb-usb/technisat-usb2.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 368 drivers/media/usb/dvb-usb/ttusb2.c static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) adap 370 drivers/media/usb/dvb-usb/ttusb2.c struct dvb_usb_device *d = i2c_get_adapdata(adap); adap 522 drivers/media/usb/dvb-usb/ttusb2.c static int ttusb2_frontend_tda10086_attach(struct dvb_usb_adapter *adap) adap 524 drivers/media/usb/dvb-usb/ttusb2.c if (usb_set_interface(adap->dev->udev,0,3) < 0) adap 527 drivers/media/usb/dvb-usb/ttusb2.c if ((adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) { adap 537 drivers/media/usb/dvb-usb/ttusb2.c struct dvb_usb_adapter *adap = fe->dvb->priv; adap 539 drivers/media/usb/dvb-usb/ttusb2.c return adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, enable); adap 542 drivers/media/usb/dvb-usb/ttusb2.c static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap) adap 544 drivers/media/usb/dvb-usb/ttusb2.c if (usb_set_interface(adap->dev->udev, 0, 3) < 0) adap 547 drivers/media/usb/dvb-usb/ttusb2.c if (adap->fe_adap[0].fe == NULL) { adap 549 drivers/media/usb/dvb-usb/ttusb2.c adap->fe_adap[0].fe = dvb_attach(tda10023_attach, adap 550 drivers/media/usb/dvb-usb/ttusb2.c &tda10023_config, &adap->dev->i2c_adap, 0x48); adap 552 drivers/media/usb/dvb-usb/ttusb2.c if (adap->fe_adap[0].fe == NULL) { adap 556 drivers/media/usb/dvb-usb/ttusb2.c tt3650_ci_init(adap); adap 558 drivers/media/usb/dvb-usb/ttusb2.c adap->fe_adap[1].fe = dvb_attach(tda10048_attach, adap 559 drivers/media/usb/dvb-usb/ttusb2.c &tda10048_config, &adap->dev->i2c_adap); adap 561 drivers/media/usb/dvb-usb/ttusb2.c if (adap->fe_adap[1].fe == NULL) { adap 567 drivers/media/usb/dvb-usb/ttusb2.c adap->fe_adap[1].fe->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl; adap 574 drivers/media/usb/dvb-usb/ttusb2.c static int ttusb2_tuner_tda827x_attach(struct dvb_usb_adapter *adap) adap 579 drivers/media/usb/dvb-usb/ttusb2.c if (adap->fe_adap[1].fe == NULL) adap 580 drivers/media/usb/dvb-usb/ttusb2.c fe = adap->fe_adap[0].fe; adap 582 drivers/media/usb/dvb-usb/ttusb2.c fe = adap->fe_adap[1].fe; adap 585 drivers/media/usb/dvb-usb/ttusb2.c if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) { adap 592 drivers/media/usb/dvb-usb/ttusb2.c static int ttusb2_tuner_tda826x_attach(struct dvb_usb_adapter *adap) adap 594 drivers/media/usb/dvb-usb/ttusb2.c if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) { adap 599 drivers/media/usb/dvb-usb/ttusb2.c if (dvb_attach(lnbp21_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, 0, 0) == NULL) { adap 52 drivers/media/usb/dvb-usb/umt-010.c static int umt_mt352_frontend_attach(struct dvb_usb_adapter *adap) adap 60 drivers/media/usb/dvb-usb/umt-010.c adap->fe_adap[0].fe = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap); adap 65 drivers/media/usb/dvb-usb/umt-010.c static int umt_tuner_attach (struct dvb_usb_adapter *adap) adap 67 drivers/media/usb/dvb-usb/umt-010.c dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_TUA6034); adap 152 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_set_pld_mode(struct dvb_usb_adapter *adap, u8 bypass) adap 155 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = adap->dev->priv; adap 163 drivers/media/usb/dvb-usb/vp702x.c ret = vp702x_usb_in_op(adap->dev, 0xe0, (bypass << 8) | 0x0e, adap 169 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_set_pld_state(struct dvb_usb_adapter *adap, u8 state) adap 172 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = adap->dev->priv; adap 179 drivers/media/usb/dvb-usb/vp702x.c ret = vp702x_usb_in_op(adap->dev, 0xe0, (state << 8) | 0x0f, adap 187 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_set_pid(struct dvb_usb_adapter *adap, u16 pid, u8 id, int onoff) adap 189 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_adapter_state *st = adap->priv; adap 190 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *dst = adap->dev->priv; adap 202 drivers/media/usb/dvb-usb/vp702x.c vp702x_set_pld_state(adap, st->pid_filter_state); adap 208 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_in_op(adap->dev, 0xe0, (((pid >> 8) & 0xff) << 8) | (id), 0, buf, 16); adap 209 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_in_op(adap->dev, 0xe0, (((pid ) & 0xff) << 8) | (id+1), 0, buf, 16); adap 217 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_init_pid_filter(struct dvb_usb_adapter *adap) adap 219 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_adapter_state *st = adap->priv; adap 220 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *dst = adap->dev->priv; adap 228 drivers/media/usb/dvb-usb/vp702x.c vp702x_set_pld_mode(adap, 1); /* bypass */ adap 231 drivers/media/usb/dvb-usb/vp702x.c vp702x_set_pid(adap, 0xffff, i, 1); adap 236 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_in_op(adap->dev, 0xb5, 3, 0, b, 10); adap 237 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_in_op(adap->dev, 0xb5, 0, 0, b, 10); adap 238 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_in_op(adap->dev, 0xb5, 1, 0, b, 10); adap 245 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) adap 306 drivers/media/usb/dvb-usb/vp702x.c static int vp702x_frontend_attach(struct dvb_usb_adapter *adap) adap 310 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_out_op(adap->dev, SET_TUNER_POWER_REQ, 0, 7, NULL, 0); adap 312 drivers/media/usb/dvb-usb/vp702x.c if (vp702x_usb_inout_cmd(adap->dev, GET_SYSTEM_STRING, NULL, 0, adap 319 drivers/media/usb/dvb-usb/vp702x.c vp702x_init_pid_filter(adap); adap 321 drivers/media/usb/dvb-usb/vp702x.c adap->fe_adap[0].fe = vp702x_fe_attach(adap->dev); adap 322 drivers/media/usb/dvb-usb/vp702x.c vp702x_usb_out_op(adap->dev, SET_TUNER_POWER_REQ, 1, 7, NULL, 0); adap 142 drivers/media/usb/dvb-usb/vp7045.c static int vp7045_frontend_attach(struct dvb_usb_adapter *adap) adap 146 drivers/media/usb/dvb-usb/vp7045.c vp7045_usb_op(adap->dev,VENDOR_STRING_READ,NULL,0,buf,20,0); adap 150 drivers/media/usb/dvb-usb/vp7045.c vp7045_usb_op(adap->dev,PRODUCT_STRING_READ,NULL,0,buf,20,0); adap 154 drivers/media/usb/dvb-usb/vp7045.c vp7045_usb_op(adap->dev,FW_VERSION_READ,NULL,0,buf,20,0); adap 161 drivers/media/usb/dvb-usb/vp7045.c adap->fe_adap[0].fe = vp7045_fe_attach(adap->dev); adap 313 drivers/media/usb/em28xx/em28xx-camera.c struct i2c_adapter *adap = &dev->i2c_adap[dev->def_i2c_bus]; adap 343 drivers/media/usb/em28xx/em28xx-camera.c v4l2_i2c_new_subdev_board(&v4l2->v4l2_dev, adap, adap 397 drivers/media/usb/em28xx/em28xx-camera.c v4l2_i2c_new_subdev_board(&v4l2->v4l2_dev, adap, adap 115 drivers/media/usb/pulse8-cec/pulse8-cec.c struct cec_adapter *adap; adap 146 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_received_msg(pulse8->adap, &pulse8->rx_msg); adap 149 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_transmit_attempt_done(pulse8->adap, CEC_TX_STATUS_OK); adap 152 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_transmit_attempt_done(pulse8->adap, CEC_TX_STATUS_NACK); adap 157 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_transmit_attempt_done(pulse8->adap, CEC_TX_STATUS_ERROR); adap 245 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_unregister_adapter(pulse8->adap); adap 454 drivers/media/usb/pulse8-cec/pulse8-cec.c err = cec_s_log_addrs(pulse8->adap, log_addrs, false); adap 458 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_s_phys_addr(pulse8->adap, pa, false); adap 463 drivers/media/usb/pulse8-cec/pulse8-cec.c static int pulse8_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 465 drivers/media/usb/pulse8-cec/pulse8-cec.c struct pulse8 *pulse8 = cec_get_drvdata(adap); adap 476 drivers/media/usb/pulse8-cec/pulse8-cec.c static int pulse8_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 478 drivers/media/usb/pulse8-cec/pulse8-cec.c struct pulse8 *pulse8 = cec_get_drvdata(adap); adap 480 drivers/media/usb/pulse8-cec/pulse8-cec.c u16 pa = adap->phys_addr; adap 506 drivers/media/usb/pulse8-cec/pulse8-cec.c cmd[1] = adap->log_addrs.primary_device_type[0]; adap 512 drivers/media/usb/pulse8-cec/pulse8-cec.c switch (adap->log_addrs.primary_device_type[0]) { adap 562 drivers/media/usb/pulse8-cec/pulse8-cec.c cmd[1] = adap->log_addrs.cec_version; adap 568 drivers/media/usb/pulse8-cec/pulse8-cec.c if (adap->log_addrs.osd_name[0]) { adap 569 drivers/media/usb/pulse8-cec/pulse8-cec.c size_t osd_len = strlen(adap->log_addrs.osd_name); adap 573 drivers/media/usb/pulse8-cec/pulse8-cec.c strscpy(cmd + 1, adap->log_addrs.osd_name, sizeof(cmd) - 1); adap 578 drivers/media/usb/pulse8-cec/pulse8-cec.c strscpy(adap->log_addrs.osd_name, osd_str, adap 579 drivers/media/usb/pulse8-cec/pulse8-cec.c sizeof(adap->log_addrs.osd_name)); adap 596 drivers/media/usb/pulse8-cec/pulse8-cec.c static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 599 drivers/media/usb/pulse8-cec/pulse8-cec.c struct pulse8 *pulse8 = cec_get_drvdata(adap); adap 636 drivers/media/usb/pulse8-cec/pulse8-cec.c static int pulse8_received(struct cec_adapter *adap, struct cec_msg *msg) adap 662 drivers/media/usb/pulse8-cec/pulse8-cec.c pulse8->adap = cec_allocate_adapter(&pulse8_cec_adap_ops, pulse8, adap 664 drivers/media/usb/pulse8-cec/pulse8-cec.c err = PTR_ERR_OR_ZERO(pulse8->adap); adap 683 drivers/media/usb/pulse8-cec/pulse8-cec.c err = cec_register_adapter(pulse8->adap, &serio->dev); adap 687 drivers/media/usb/pulse8-cec/pulse8-cec.c pulse8->dev = &pulse8->adap->devnode.dev; adap 705 drivers/media/usb/pulse8-cec/pulse8-cec.c cec_delete_adapter(pulse8->adap); adap 182 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap) adap 184 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config, adap 186 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap); adap 187 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (adap->fe[0]) adap 193 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap) adap 195 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(simple_tuner_attach, adap->fe[0], adap 196 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, 0x61, adap 242 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap) adap 244 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config, adap 246 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap); adap 247 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (adap->fe[0]) adap 253 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap) adap 255 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(simple_tuner_attach, adap->fe[0], adap 256 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, 0x61, adap 329 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap) adap 331 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->fe[0] = dvb_attach(tda10048_attach, &hauppauge_tda10048_config, adap 332 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap); adap 333 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (adap->fe[0]) adap 339 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) adap 341 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(tda829x_attach, adap->fe[0], adap 342 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, 0x42, adap 344 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(tda18271_attach, adap->fe[0], 0x60, adap 345 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, adap 427 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap) adap 429 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->fe[0] = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config, adap 430 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap); adap 431 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (adap->fe[0]) adap 437 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap) adap 439 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->fe[0] = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config, adap 440 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap); adap 441 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (adap->fe[0]) adap 447 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) adap 449 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(tda829x_attach, adap->fe[0], adap 450 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, 0x42, adap 452 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_attach(tda18271_attach, adap->fe[0], 0x60, adap 453 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, adap 525 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); adap 526 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap); adap 527 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); adap 528 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); adap 540 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) adap 545 drivers/media/usb/pvrusb2/pvrusb2-devattr.c si2157_config.fe = adap->fe[0]; adap 547 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->i2c_client_tuner = dvb_module_probe("si2157", "si2177", adap 548 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, adap 551 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (!adap->i2c_client_tuner) adap 557 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) adap 564 drivers/media/usb/pvrusb2/pvrusb2-devattr.c si2168_config.fe = &adap->fe[1]; adap 571 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->i2c_client_demod[1] = dvb_module_probe("si2168", NULL, adap 572 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, adap 575 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (!adap->i2c_client_demod[1]) adap 581 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) adap 588 drivers/media/usb/pvrusb2/pvrusb2-devattr.c lgdt3306a_config.fe = &adap->fe[0]; adap 599 drivers/media/usb/pvrusb2/pvrusb2-devattr.c adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL, adap 600 drivers/media/usb/pvrusb2/pvrusb2-devattr.c &adap->channel.hdw->i2c_adap, adap 603 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (!adap->i2c_client_demod[0]) adap 609 drivers/media/usb/pvrusb2/pvrusb2-devattr.c static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) adap 613 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (pvr2_lgdt3306a_attach(adap) != 0) adap 616 drivers/media/usb/pvrusb2/pvrusb2-devattr.c if (pvr2_si2168_attach(adap) != 0) { adap 617 drivers/media/usb/pvrusb2/pvrusb2-devattr.c dvb_module_release(adap->i2c_client_demod[0]); adap 21 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_feed_func(struct pvr2_dvb_adapter *adap) adap 31 drivers/media/usb/pvrusb2/pvrusb2-dvb.c stream = adap->channel.stream->stream; adap 44 drivers/media/usb/pvrusb2/pvrusb2-dvb.c &adap->demux, adap 45 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->buffer_storage[ adap 66 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->buffer_wait_data, adap 91 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap) adap 93 drivers/media/usb/pvrusb2/pvrusb2-dvb.c wake_up(&adap->buffer_wait_data); adap 96 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static void pvr2_dvb_stream_end(struct pvr2_dvb_adapter *adap) adap 101 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->thread) { adap 102 drivers/media/usb/pvrusb2/pvrusb2-dvb.c kthread_stop(adap->thread); adap 103 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->thread = NULL; adap 106 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->channel.stream) { adap 107 drivers/media/usb/pvrusb2/pvrusb2-dvb.c stream = adap->channel.stream->stream; adap 112 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_hdw_set_streaming(adap->channel.hdw, 0); adap 116 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_channel_claim_stream(&adap->channel, NULL); adap 119 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->stream_run) { adap 121 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!(adap->buffer_storage[idx])) continue; adap 122 drivers/media/usb/pvrusb2/pvrusb2-dvb.c kfree(adap->buffer_storage[idx]); adap 123 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->buffer_storage[idx] = NULL; adap 125 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->stream_run = 0; adap 129 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap) adap 131 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_context *pvr = adap->channel.mc_head; adap 137 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->stream_run) return -EIO; adap 139 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_channel_claim_stream(&adap->channel, &pvr->video_stream); adap 143 drivers/media/usb/pvrusb2/pvrusb2-dvb.c stream = adap->channel.stream->stream; adap 146 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->buffer_storage[idx] = kmalloc(PVR2_DVB_BUFFER_SIZE, adap 148 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!(adap->buffer_storage[idx])) return -ENOMEM; adap 152 drivers/media/usb/pvrusb2/pvrusb2-dvb.c (pvr2_stream_callback) pvr2_dvb_notify, adap); adap 160 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->buffer_storage[idx], adap 164 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_hdw_set_streaming(adap->channel.hdw, 1); adap 172 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->thread = kthread_run(pvr2_dvb_feed_thread, adap, "pvrusb2-dvb"); adap 174 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (IS_ERR(adap->thread)) { adap 175 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = PTR_ERR(adap->thread); adap 176 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->thread = NULL; adap 180 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->stream_run = !0; adap 185 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_stream_start(struct pvr2_dvb_adapter *adap) adap 187 drivers/media/usb/pvrusb2/pvrusb2-dvb.c int ret = pvr2_dvb_stream_do_start(adap); adap 188 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (ret < 0) pvr2_dvb_stream_end(adap); adap 194 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_dvb_adapter *adap = dvbdmxfeed->demux->priv; adap 197 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap == NULL) return -ENODEV; adap 199 drivers/media/usb/pvrusb2/pvrusb2-dvb.c mutex_lock(&adap->lock); adap 202 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!adap->feedcount) { adap 205 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_dvb_stream_start(adap); adap 208 drivers/media/usb/pvrusb2/pvrusb2-dvb.c (adap->feedcount)++; adap 209 drivers/media/usb/pvrusb2/pvrusb2-dvb.c } else if (adap->feedcount > 0) { adap 210 drivers/media/usb/pvrusb2/pvrusb2-dvb.c (adap->feedcount)--; adap 211 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!adap->feedcount) { adap 214 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_stream_end(adap); adap 218 drivers/media/usb/pvrusb2/pvrusb2-dvb.c mutex_unlock(&adap->lock); adap 237 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_dvb_adapter *adap = fe->dvb->priv; adap 239 drivers/media/usb/pvrusb2/pvrusb2-dvb.c &adap->channel, adap 243 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_adapter_init(struct pvr2_dvb_adapter *adap) adap 247 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = dvb_register_adapter(&adap->dvb_adap, "pvrusb2-dvb", adap 249 drivers/media/usb/pvrusb2/pvrusb2-dvb.c &adap->channel.hdw->usb_dev->dev, adap 256 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->dvb_adap.priv = adap; adap 258 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.dmx.capabilities = DMX_TS_FILTERING | adap 261 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.priv = adap; adap 262 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.filternum = 256; adap 263 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.feednum = 256; adap 264 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.start_feed = pvr2_dvb_start_feed; adap 265 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.stop_feed = pvr2_dvb_stop_feed; adap 266 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.write_to_decoder = NULL; adap 268 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = dvb_dmx_init(&adap->demux); adap 275 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->dmxdev.filternum = adap->demux.filternum; adap 276 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->dmxdev.demux = &adap->demux.dmx; adap 277 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->dmxdev.capabilities = 0; adap 279 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap); adap 286 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx); adap 291 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_dmx_release(&adap->demux); adap 293 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_unregister_adapter(&adap->dvb_adap); adap 298 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_adapter_exit(struct pvr2_dvb_adapter *adap) adap 301 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_net_release(&adap->dvb_net); adap 302 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->demux.dmx.close(&adap->demux.dmx); adap 303 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_dmxdev_release(&adap->dmxdev); adap 304 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_dmx_release(&adap->demux); adap 305 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_unregister_adapter(&adap->dvb_adap); adap 309 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap) adap 311 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_hdw *hdw = adap->channel.hdw; adap 321 drivers/media/usb/pvrusb2/pvrusb2-dvb.c &adap->channel, adap 337 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (dvb_props->frontend_attach(adap) == 0 && adap->fe[0]) { adap 338 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (dvb_register_frontend(&adap->dvb_adap, adap->fe[0])) { adap 344 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->fe[0]->ops.analog_ops.standby) adap 345 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[0]->ops.analog_ops.standby(adap->fe[0]); adap 348 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[0]->id); adap 349 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[0]->ops.ts_bus_ctrl = pvr2_dvb_bus_ctrl; adap 357 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (dvb_props->tuner_attach && dvb_props->tuner_attach(adap)) { adap 363 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->fe[1]) { adap 364 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1]->id = 1; adap 365 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1]->tuner_priv = adap->fe[0]->tuner_priv; adap 366 drivers/media/usb/pvrusb2/pvrusb2-dvb.c memcpy(&adap->fe[1]->ops.tuner_ops, adap 367 drivers/media/usb/pvrusb2/pvrusb2-dvb.c &adap->fe[0]->ops.tuner_ops, adap 370 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (dvb_register_frontend(&adap->dvb_adap, adap->fe[1])) { adap 377 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->dvb_adap.mfe_shared = 1; adap 379 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->fe[1]->ops.analog_ops.standby) adap 380 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1]->ops.analog_ops.standby(adap->fe[1]); adap 383 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1]->id); adap 384 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1]->ops.ts_bus_ctrl = pvr2_dvb_bus_ctrl; adap 387 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_channel_limit_inputs(&adap->channel, 0); adap 391 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_frontend_detach(adap->fe[1]); adap 392 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1] = NULL; adap 394 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_unregister_frontend(adap->fe[0]); adap 396 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_frontend_detach(adap->fe[0]); adap 397 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[0] = NULL; adap 398 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_tuner); adap 399 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_demod[1]); adap 400 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_demod[0]); adap 405 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static int pvr2_dvb_frontend_exit(struct pvr2_dvb_adapter *adap) adap 407 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->fe[1]) { adap 408 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_unregister_frontend(adap->fe[1]); adap 409 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_frontend_detach(adap->fe[1]); adap 410 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[1] = NULL; adap 412 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (adap->fe[0]) { adap 413 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_unregister_frontend(adap->fe[0]); adap 414 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_frontend_detach(adap->fe[0]); adap 415 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->fe[0] = NULL; adap 418 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_tuner); adap 419 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->i2c_client_tuner = NULL; adap 420 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_demod[1]); adap 421 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->i2c_client_demod[1] = NULL; adap 422 drivers/media/usb/pvrusb2/pvrusb2-dvb.c dvb_module_release(adap->i2c_client_demod[0]); adap 423 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->i2c_client_demod[0] = NULL; adap 428 drivers/media/usb/pvrusb2/pvrusb2-dvb.c static void pvr2_dvb_destroy(struct pvr2_dvb_adapter *adap) adap 430 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_stream_end(adap); adap 431 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_frontend_exit(adap); adap 432 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_adapter_exit(adap); adap 433 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_channel_done(&adap->channel); adap 434 drivers/media/usb/pvrusb2/pvrusb2-dvb.c kfree(adap); adap 439 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_dvb_adapter *adap; adap 440 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap = container_of(chp, struct pvr2_dvb_adapter, channel); adap 441 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!adap->channel.mc_head->disconnect_flag) return; adap 442 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_destroy(adap); adap 448 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_dvb_adapter *adap; adap 454 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap = kzalloc(sizeof(*adap), GFP_KERNEL); adap 455 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (!adap) return adap; adap 456 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_channel_init(&adap->channel, pvr); adap 457 drivers/media/usb/pvrusb2/pvrusb2-dvb.c adap->channel.check_func = pvr2_dvb_internal_check; adap 458 drivers/media/usb/pvrusb2/pvrusb2-dvb.c init_waitqueue_head(&adap->buffer_wait_data); adap 459 drivers/media/usb/pvrusb2/pvrusb2-dvb.c mutex_init(&adap->lock); adap 460 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_dvb_adapter_init(adap); adap 462 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_dvb_frontend_init(adap); adap 464 drivers/media/usb/pvrusb2/pvrusb2-dvb.c return adap; adap 467 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_dvb_adapter_exit(adap); adap 469 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_channel_done(&adap->channel); adap 500 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c static u32 pvr2_i2c_functionality(struct i2c_adapter *adap) adap 43 drivers/media/usb/rainshadow-cec/rainshadow-cec.c struct cec_adapter *adap; adap 90 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_received_msg(rain->adap, &msg); adap 96 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_transmit_attempt_done(rain->adap, CEC_TX_STATUS_OK); adap 99 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_transmit_attempt_done(rain->adap, CEC_TX_STATUS_NACK); adap 102 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_transmit_attempt_done(rain->adap, CEC_TX_STATUS_LOW_DRIVE); adap 192 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_unregister_adapter(rain->adap); adap 258 drivers/media/usb/rainshadow-cec/rainshadow-cec.c static int rain_cec_adap_enable(struct cec_adapter *adap, bool enable) adap 263 drivers/media/usb/rainshadow-cec/rainshadow-cec.c static int rain_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) adap 265 drivers/media/usb/rainshadow-cec/rainshadow-cec.c struct rain *rain = cec_get_drvdata(adap); adap 274 drivers/media/usb/rainshadow-cec/rainshadow-cec.c static int rain_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, adap 277 drivers/media/usb/rainshadow-cec/rainshadow-cec.c struct rain *rain = cec_get_drvdata(adap); adap 320 drivers/media/usb/rainshadow-cec/rainshadow-cec.c rain->adap = cec_allocate_adapter(&rain_cec_adap_ops, rain, adap 322 drivers/media/usb/rainshadow-cec/rainshadow-cec.c err = PTR_ERR_OR_ZERO(rain->adap); adap 340 drivers/media/usb/rainshadow-cec/rainshadow-cec.c err = cec_register_adapter(rain->adap, &serio->dev); adap 344 drivers/media/usb/rainshadow-cec/rainshadow-cec.c rain->dev = &rain->adap->devnode.dev; adap 350 drivers/media/usb/rainshadow-cec/rainshadow-cec.c cec_delete_adapter(rain->adap); adap 223 drivers/media/usb/stk1160/stk1160-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 272 drivers/media/usb/tm6000/tm6000-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 150 drivers/media/usb/usbvision/usbvision-i2c.c static u32 functionality(struct i2c_adapter *adap) adap 586 drivers/media/v4l2-core/tuner-core.c static void tuner_lookup(struct i2c_adapter *adap, adap 597 drivers/media/v4l2-core/tuner-core.c if (pos->i2c->adapter != adap || adap 88 drivers/mfd/88pm860x-i2c.c struct i2c_adapter *adap = i2c->adapter; adap 112 drivers/mfd/88pm860x-i2c.c ret = adap->algo->master_xfer(adap, msg, num); adap 123 drivers/mfd/88pm860x-i2c.c struct i2c_adapter *adap = i2c->adapter; adap 134 drivers/mfd/88pm860x-i2c.c ret = adap->algo->master_xfer(adap, &msg, 1); adap 309 drivers/net/ethernet/chelsio/cxgb/common.h #define t1_is_T1B(adap) adapter_matches_type(adap, CHBT_TERM_T1, TERM_T1B) adap 310 drivers/net/ethernet/chelsio/cxgb/common.h #define is_T2(adap) adapter_matches_type(adap, CHBT_TERM_T2, TERM_T2) adap 324 drivers/net/ethernet/chelsio/cxgb/common.h static inline unsigned int core_ticks_per_usec(const adapter_t *adap) adap 326 drivers/net/ethernet/chelsio/cxgb/common.h return board_info(adap)->clock_core / 1000000; adap 1409 drivers/net/ethernet/chelsio/cxgb/sge.c struct adapter *adap = sge->adapter; adap 1415 drivers/net/ethernet/chelsio/cxgb/sge.c for_each_port(adap, i) { adap 1416 drivers/net/ethernet/chelsio/cxgb/sge.c struct net_device *nd = adap->port[i].dev; adap 68 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_get_mib_statistics(adapter_t *adap, struct tp_mib_statistics *tps); adap 200 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct adapter *adap; adap 284 drivers/net/ethernet/chelsio/cxgb3/adapter.h static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) adap 286 drivers/net/ethernet/chelsio/cxgb3/adapter.h return netdev_priv(adap->port[idx]); adap 291 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct adapter *adap = phy->adapter; adap 292 drivers/net/ethernet/chelsio/cxgb3/adapter.h struct port_info *port0 = adap2pinfo(adap, 0); adap 311 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_os_phymod_changed(struct adapter *adap, int port_id); adap 315 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_sge_start(struct adapter *adap); adap 316 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_sge_stop(struct adapter *adap); adap 317 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_start_sge_timers(struct adapter *adap); adap 318 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_stop_sge_timers(struct adapter *adap); adap 319 drivers/net/ethernet/chelsio/cxgb3/adapter.h void t3_free_sge_resources(struct adapter *adap); adap 321 drivers/net/ethernet/chelsio/cxgb3/adapter.h irq_handler_t t3_intr_handler(struct adapter *adap, int polling); adap 323 drivers/net/ethernet/chelsio/cxgb3/adapter.h int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb); adap 44 drivers/net/ethernet/chelsio/cxgb3/common.h #define CH_ERR(adap, fmt, ...) dev_err(&adap->pdev->dev, fmt, ##__VA_ARGS__) adap 45 drivers/net/ethernet/chelsio/cxgb3/common.h #define CH_WARN(adap, fmt, ...) dev_warn(&adap->pdev->dev, fmt, ##__VA_ARGS__) adap 46 drivers/net/ethernet/chelsio/cxgb3/common.h #define CH_ALERT(adap, fmt, ...) dev_alert(&adap->pdev->dev, fmt, ##__VA_ARGS__) adap 615 drivers/net/ethernet/chelsio/cxgb3/common.h #define adapter_info(adap) ((adap)->params.info) adap 617 drivers/net/ethernet/chelsio/cxgb3/common.h static inline int uses_xaui(const struct adapter *adap) adap 619 drivers/net/ethernet/chelsio/cxgb3/common.h return adapter_info(adap)->caps & SUPPORTED_AUI; adap 622 drivers/net/ethernet/chelsio/cxgb3/common.h static inline int is_10G(const struct adapter *adap) adap 624 drivers/net/ethernet/chelsio/cxgb3/common.h return adapter_info(adap)->caps & SUPPORTED_10000baseT_Full; adap 627 drivers/net/ethernet/chelsio/cxgb3/common.h static inline int is_offload(const struct adapter *adap) adap 629 drivers/net/ethernet/chelsio/cxgb3/common.h return adap->params.offload; adap 632 drivers/net/ethernet/chelsio/cxgb3/common.h static inline unsigned int core_ticks_per_usec(const struct adapter *adap) adap 634 drivers/net/ethernet/chelsio/cxgb3/common.h return adap->params.vpd.cclk / 1000; adap 637 drivers/net/ethernet/chelsio/cxgb3/common.h static inline unsigned int is_pcie(const struct adapter *adap) adap 639 drivers/net/ethernet/chelsio/cxgb3/common.h return adap->params.pci.variant == PCI_VARIANT_PCIE; adap 642 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, adap 686 drivers/net/ethernet/chelsio/cxgb3/common.h int t3_set_proto_sram(struct adapter *adap, const u8 *data); adap 700 drivers/net/ethernet/chelsio/cxgb3/common.h int t3_cim_ctl_blk_read(struct adapter *adap, unsigned int addr, adap 724 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_tp_set_offload_mode(struct adapter *adap, int enable); adap 725 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_tp_get_mib_stats(struct adapter *adap, struct tp_mib_stats *tps); adap 726 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_load_mtus(struct adapter *adap, unsigned short mtus[NMTUS], adap 732 drivers/net/ethernet/chelsio/cxgb3/common.h int t3_config_sched(struct adapter *adap, unsigned int kbps, int sched); adap 734 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_sge_prep(struct adapter *adap, struct sge_params *p); adap 735 drivers/net/ethernet/chelsio/cxgb3/common.h void t3_sge_init(struct adapter *adap, struct sge_params *p); adap 199 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c void t3_os_link_fault(struct adapter *adap, int port_id, int state) adap 201 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct net_device *dev = adap->port[port_id]; adap 212 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c disable_tx_fifo_drain(adap, pi); adap 215 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_xgm_intr_disable(adap, pi->port_id); adap 216 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_read_reg(adap, A_XGM_INT_STATUS + adap 218 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, adap 222 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_set_reg_field(adap, adap 226 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_xgm_intr_enable(adap, pi->port_id); adap 233 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c enable_tx_fifo_drain(adap, pi); adap 315 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c void t3_os_phymod_changed(struct adapter *adap, int port_id) adap 321 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c const struct net_device *dev = adap->port[port_id]; adap 382 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void name_msix_vecs(struct adapter *adap) adap 384 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int i, j, msi_idx = 1, n = sizeof(adap->msix_info[0].desc) - 1; adap 386 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c snprintf(adap->msix_info[0].desc, n, "%s", adap->name); adap 387 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_info[0].desc[n] = 0; adap 389 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, j) { adap 390 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct net_device *d = adap->port[j]; adap 394 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c snprintf(adap->msix_info[msi_idx].desc, n, adap 396 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_info[msi_idx].desc[n] = 0; adap 401 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int request_msix_data_irqs(struct adapter *adap) adap 405 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) { adap 406 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int nqsets = adap2pinfo(adap, i)->nqsets; adap 409 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = request_irq(adap->msix_info[qidx + 1].vec, adap 410 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_handler(adap, adap 411 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->sge.qs[qidx]. adap 413 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_info[qidx + 1].desc, adap 414 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c &adap->sge.qs[qidx]); adap 417 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c free_irq(adap->msix_info[qidx + 1].vec, adap 418 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c &adap->sge.qs[qidx]); adap 443 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int await_mgmt_replies(struct adapter *adap, unsigned long init_cnt, adap 448 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c while (adap->sge.qs[0].rspq.offload_pkts < init_cnt + n) { adap 456 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int init_tp_parity(struct adapter *adap) adap 461 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c unsigned long cnt = adap->sge.qs[0].rspq.offload_pkts; adap 463 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_tp_set_offload_mode(adap, 1); adap 470 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c skb = adap->nofail_skb; adap 479 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mgmt_tx(adap, skb); adap 480 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (skb == adap->nofail_skb) { adap 481 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c await_mgmt_replies(adap, cnt, i + 1); adap 482 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->nofail_skb = alloc_skb(sizeof(*greq), GFP_KERNEL); adap 483 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!adap->nofail_skb) adap 493 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c skb = adap->nofail_skb; adap 501 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mgmt_tx(adap, skb); adap 502 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (skb == adap->nofail_skb) { adap 503 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c await_mgmt_replies(adap, cnt, 16 + i + 1); adap 504 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->nofail_skb = alloc_skb(sizeof(*greq), GFP_KERNEL); adap 505 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!adap->nofail_skb) adap 515 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c skb = adap->nofail_skb; adap 523 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mgmt_tx(adap, skb); adap 524 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (skb == adap->nofail_skb) { adap 525 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c await_mgmt_replies(adap, cnt, 16 + 2048 + i + 1); adap 526 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->nofail_skb = alloc_skb(sizeof(*greq), GFP_KERNEL); adap 527 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!adap->nofail_skb) adap 534 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c skb = adap->nofail_skb; adap 542 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mgmt_tx(adap, skb); adap 544 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c i = await_mgmt_replies(adap, cnt, 16 + 2048 + 2048 + 1); adap 545 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (skb == adap->nofail_skb) { adap 546 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c i = await_mgmt_replies(adap, cnt, 16 + 2048 + 2048 + 1); adap 547 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->nofail_skb = alloc_skb(sizeof(*greq), GFP_KERNEL); adap 550 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_tp_set_offload_mode(adap, 0); adap 554 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_tp_set_offload_mode(adap, 0); adap 569 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void setup_rss(struct adapter *adap) adap 572 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c unsigned int nq0 = adap2pinfo(adap, 0)->nqsets; adap 573 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c unsigned int nq1 = adap->port[1] ? adap2pinfo(adap, 1)->nqsets : 1; adap 587 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_config_rss(adap, F_RQFEEDBACKENABLE | F_TNLLKPEN | F_TNLMAPEN | adap 592 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void ring_dbs(struct adapter *adap) adap 597 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct sge_qset *qs = &adap->sge.qs[i]; adap 599 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (qs->adap) adap 601 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, A_SG_KDOORBELL, F_SELEGRCNTX | V_EGRCNTX(qs->txq[j].cntxt_id)); adap 605 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void init_napi(struct adapter *adap) adap 610 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct sge_qset *qs = &adap->sge.qs[i]; adap 612 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (qs->adap) adap 622 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->flags |= NAPI_INIT; adap 630 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void quiesce_rx(struct adapter *adap) adap 635 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->sge.qs[i].adap) adap 636 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c napi_disable(&adap->sge.qs[i].napi); adap 639 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void enable_all_napi(struct adapter *adap) adap 643 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->sge.qs[i].adap) adap 644 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c napi_enable(&adap->sge.qs[i].napi); adap 655 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int setup_sge_qsets(struct adapter *adap) adap 660 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->params.rev > 0 && !(adap->flags & USING_MSI)) adap 663 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) { adap 664 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct net_device *dev = adap->port[i]; adap 667 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c pi->qs = &adap->sge.qs[pi->first_qset]; adap 669 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = t3_sge_alloc_qset(adap, qset_idx, 1, adap 670 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c (adap->flags & USING_MSIX) ? qset_idx + 1 : adap 672 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c &adap->params.sge.qset[qset_idx], ntxq, dev, adap 675 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_free_sge_resources(adap); adap 725 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct adapter *adap = pi->adapter; \ adap 737 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct adapter *adap = pi->adapter; adap 738 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0; adap 740 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->flags & FULL_INIT_DONE) adap 742 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (val && adap->params.rev == 0) adap 744 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nservers - adap 747 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.mc5.nfilters = val; adap 760 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct adapter *adap = pi->adapter; adap 762 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->flags & FULL_INIT_DONE) adap 764 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nfilters - adap 767 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.mc5.nservers = val; adap 785 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CXGB3_ATTR_R(cam_size, t3_mc5_size(&adap->mc5)); adap 786 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CXGB3_ATTR_RW(nfilters, adap->params.mc5.nfilters, store_nfilters); adap 787 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CXGB3_ATTR_RW(nservers, adap->params.mc5.nservers, store_nservers); adap 804 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct adapter *adap = pi->adapter; adap 810 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, A_TP_TM_PIO_ADDR, addr); adap 811 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c v = t3_read_reg(adap, A_TP_TM_PIO_DATA); adap 819 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c v = (adap->params.vpd.cclk * 1000) / cpt; adap 830 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct adapter *adap = pi->adapter; adap 844 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ret = t3_config_sched(adap, val, sched); adap 942 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int send_pktsched_cmd(struct adapter *adap, int sched, int qidx, int lo, adap 951 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c skb = adap->nofail_skb; adap 963 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ret = t3_mgmt_tx(adap, skb); adap 964 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (skb == adap->nofail_skb) { adap 965 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->nofail_skb = alloc_skb(sizeof(struct cpl_set_tcb_field), adap 967 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!adap->nofail_skb) adap 974 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int bind_qsets(struct adapter *adap) adap 978 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) { adap 979 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c const struct port_info *pi = adap2pinfo(adap, i); adap 982 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int ret = send_pktsched_cmd(adap, 1, adap 1075 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int upgrade_fw(struct adapter *adap) adap 1079 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct device *dev = &adap->pdev->dev; adap 1087 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ret = t3_load_fw(adap, fw->data, fw->size); adap 1116 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int update_tpsram(struct adapter *adap) adap 1120 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct device *dev = &adap->pdev->dev; adap 1124 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c rev = t3rev2char(adap); adap 1137 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ret = t3_check_tpsram(adap, tpsram->data, tpsram->size); adap 1141 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c ret = t3_set_proto_sram(adap, tpsram->data); adap 1168 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void t3_synchronize_rx(struct adapter *adap, const struct port_info *p) adap 1173 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct sge_rspq *q = &adap->sge.qs[i].rspq; adap 1212 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int cxgb_up(struct adapter *adap) adap 1216 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!(adap->flags & FULL_INIT_DONE)) { adap 1217 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = t3_check_fw_version(adap); adap 1219 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = upgrade_fw(adap); adap 1220 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CH_WARN(adap, "FW upgrade to %d.%d.%d %s\n", adap 1225 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = t3_check_tpsram_version(adap); adap 1227 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = update_tpsram(adap); adap 1228 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CH_WARN(adap, "TP upgrade to %d.%d.%d %s\n", adap 1238 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_clear(adap); adap 1240 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = t3_init_hw(adap, 0); adap 1244 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_set_reg_field(adap, A_TP_PARA_REG5, 0, F_RXDDPOFFINIT); adap 1245 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, A_ULPRX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12)); adap 1247 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = setup_sge_qsets(adap); adap 1251 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) adap 1252 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c cxgb_vlan_mode(adap->port[i], adap->port[i]->features); adap 1254 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c setup_rss(adap); adap 1255 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!(adap->flags & NAPI_INIT)) adap 1256 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c init_napi(adap); adap 1258 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_start_sge_timers(adap); adap 1259 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->flags |= FULL_INIT_DONE; adap 1262 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_clear(adap); adap 1264 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->flags & USING_MSIX) { adap 1265 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c name_msix_vecs(adap); adap 1266 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = request_irq(adap->msix_info[0].vec, adap 1268 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_info[0].desc, adap); adap 1272 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c err = request_msix_data_irqs(adap); adap 1274 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c free_irq(adap->msix_info[0].vec, adap); adap 1277 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c } else if ((err = request_irq(adap->pdev->irq, adap 1278 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_handler(adap, adap 1279 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->sge.qs[0].rspq. adap 1281 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c (adap->flags & USING_MSI) ? adap 1283 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->name, adap))) adap 1286 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c enable_all_napi(adap); adap 1287 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_sge_start(adap); adap 1288 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_enable(adap); adap 1290 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->params.rev >= T3_REV_C && !(adap->flags & TP_PARITY_INIT) && adap 1291 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c is_offload(adap) && init_tp_parity(adap) == 0) adap 1292 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->flags |= TP_PARITY_INIT; adap 1294 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->flags & TP_PARITY_INIT) { adap 1295 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, A_TP_INT_CAUSE, adap 1297 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_write_reg(adap, A_TP_INT_ENABLE, 0x7fbfffff); adap 1300 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!(adap->flags & QUEUES_BOUND)) { adap 1301 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int ret = bind_qsets(adap); adap 1304 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CH_ERR(adap, "failed to bind qsets, err %d\n", ret); adap 1305 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_intr_disable(adap); adap 1306 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c free_irq_resources(adap); adap 1310 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->flags |= QUEUES_BOUND; adap 1316 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c CH_ERR(adap, "request_irq failed, err %d\n", err); adap 1337 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void schedule_chk_task(struct adapter *adap) adap 1341 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c timeo = adap->params.linkpoll_period ? adap 1342 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c (HZ * adap->params.linkpoll_period) / 10 : adap 1343 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.stats_update_period * HZ; adap 1345 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c queue_delayed_work(cxgb3_wq, &adap->adap_check_task, timeo); adap 3086 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void set_nqsets(struct adapter *adap) adap 3090 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int hwports = adap->params.nports; adap 3091 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c int nqsets = adap->msix_nvectors - 1; adap 3093 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->params.rev > 0 && adap->flags & USING_MSIX) { adap 3105 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) { adap 3106 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct port_info *pi = adap2pinfo(adap, i); adap 3112 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c dev_info(&adap->pdev->dev, adap 3117 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static int cxgb_enable_msix(struct adapter *adap) adap 3127 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c vectors = pci_enable_msix_range(adap->pdev, entries, adap 3128 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.nports + 1, vectors); adap 3133 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_info[i].vec = entries[i].vector; adap 3134 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->msix_nvectors = vectors; adap 3139 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c static void print_port_info(struct adapter *adap, const struct adapter_info *ai) adap 3148 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (is_pcie(adap)) adap 3150 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c pci_variant[adap->params.pci.variant], adap 3151 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.pci.width); adap 3154 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c pci_variant[adap->params.pci.variant], adap 3155 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.pci.speed, adap->params.pci.width); adap 3157 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c for_each_port(adap, i) { adap 3158 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct net_device *dev = adap->port[i]; adap 3161 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (!test_bit(i, &adap->registered_device_map)) adap 3165 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c is_offload(adap) ? "R" : "", adap->params.rev, buf, adap 3166 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c (adap->flags & USING_MSIX) ? " MSI-X" : adap 3167 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c (adap->flags & USING_MSI) ? " MSI" : ""); adap 3168 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c if (adap->name == dev->name && adap->params.vpd.mclk) adap 3170 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->name, t3_mc7_size(&adap->cm) >> 20, adap 3171 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mc7_size(&adap->pmtx) >> 20, adap 3172 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_mc7_size(&adap->pmrx) >> 20, adap 3173 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c adap->params.vpd.sn); adap 1203 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c static inline void add_adapter(struct adapter *adap) adap 1206 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c list_add_tail(&adap->adapter_list, &adapter_list); adap 1210 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c static inline void remove_adapter(struct adapter *adap) adap 1213 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c list_del(&adap->adapter_list); adap 128 drivers/net/ethernet/chelsio/cxgb3/mc5.c struct adapter *adap = mc5->adapter; adap 135 drivers/net/ethernet/chelsio/cxgb3/mc5.c unsigned int server_base = t3_read_reg(adap, A_MC5_DB_SERVER_INDEX); adap 143 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0, 0, 0); adap 145 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, data_array_base + (i << addr_shift), adap 150 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xffffffff, 0xffffffff, 0xff); adap 153 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DBGI_REQ_DATA0, adap 156 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, mask_array_base + (i << addr_shift), adap 166 drivers/net/ethernet/chelsio/cxgb3/mc5.c struct adapter *adap = mc5->adapter; adap 168 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_RSP_LATENCY, adap 170 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_PART_ID_INDEX, 2); adap 176 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_POPEN_DATA_WR_CMD, IDT_CMD_WRITE); adap 177 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_POPEN_MASK_WR_CMD, IDT_CMD_WRITE); adap 178 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_AOPEN_SRCH_CMD, IDT_CMD_SEARCH); adap 179 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_AOPEN_LRN_CMD, IDT_CMD_LEARN); adap 180 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_SYN_SRCH_CMD, IDT_CMD_SEARCH | 0x6000); adap 181 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_SYN_LRN_CMD, IDT_CMD_LEARN); adap 182 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ACK_SRCH_CMD, IDT_CMD_SEARCH); adap 183 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ACK_LRN_CMD, IDT_CMD_LEARN); adap 184 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ILOOKUP_CMD, IDT_CMD_SEARCH); adap 185 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ELOOKUP_CMD, IDT_CMD_SEARCH | 0x7000); adap 186 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DATA_WRITE_CMD, IDT_CMD_WRITE); adap 187 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DATA_READ_CMD, IDT_CMD_READ); adap 190 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DBGI_CONFIG, DBGI_MODE_IDT52100); adap 193 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, IDT_LAR_MODE144, 0, 0); adap 194 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT_LAR_ADR0, IDT_CMD_WRITE)) adap 198 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xffffffff, 0xffffffff, 0); adap 199 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT_SSR0_ADR0, IDT_CMD_WRITE) || adap 200 drivers/net/ethernet/chelsio/cxgb3/mc5.c mc5_write(adap, IDT_SSR1_ADR0, IDT_CMD_WRITE)) adap 206 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xfffffff9, 0xffffffff, 0xff); adap 208 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xfffffff9, 0xffff8007, 0xff); adap 210 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xffffffff, 0xffffffff, 0xff); adap 212 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT_GMR_BASE_ADR0 + i, IDT_CMD_WRITE)) adap 217 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 1, 0, 0); adap 218 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT_SCR_ADR0, IDT_CMD_WRITE)) adap 230 drivers/net/ethernet/chelsio/cxgb3/mc5.c struct adapter *adap = mc5->adapter; adap 232 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_RSP_LATENCY, adap 233 drivers/net/ethernet/chelsio/cxgb3/mc5.c adap->params.rev == 0 ? V_RDLAT(0xd) | V_SRCHLAT(0x11) : adap 240 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_POPEN_DATA_WR_CMD, IDT4_CMD_WRITE); adap 241 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_POPEN_MASK_WR_CMD, IDT4_CMD_WRITE); adap 242 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_AOPEN_SRCH_CMD, adap 244 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_SYN_SRCH_CMD, IDT4_CMD_SEARCH144); adap 245 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ACK_SRCH_CMD, IDT4_CMD_SEARCH144 | 0x3800); adap 246 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ILOOKUP_CMD, IDT4_CMD_SEARCH144 | 0x3800); adap 247 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ELOOKUP_CMD, IDT4_CMD_SEARCH144 | 0x800); adap 248 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DATA_WRITE_CMD, IDT4_CMD_WRITE); adap 249 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DATA_READ_CMD, IDT4_CMD_READ); adap 251 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_PART_ID_INDEX, 3); adap 254 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DBGI_CONFIG, DBGI_MODE_IDT52100); adap 257 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xffffffff, 0xffffffff, 0xff); adap 259 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT4_GMR_BASE0 + i, IDT4_CMD_WRITE)) adap 263 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT4_GMR_BASE2 + i, IDT4_CMD_WRITE)) adap 266 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xfffffff9, 0xffffffff, 0xff); adap 267 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT4_GMR_BASE1, IDT4_CMD_WRITE) || adap 268 drivers/net/ethernet/chelsio/cxgb3/mc5.c mc5_write(adap, IDT4_GMR_BASE1 + 1, IDT4_CMD_WRITE) || adap 269 drivers/net/ethernet/chelsio/cxgb3/mc5.c mc5_write(adap, IDT4_GMR_BASE1 + 4, IDT4_CMD_WRITE)) adap 272 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xfffffff9, 0xffff8007, 0xff); adap 273 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT4_GMR_BASE1 + 5, IDT4_CMD_WRITE)) adap 277 drivers/net/ethernet/chelsio/cxgb3/mc5.c dbgi_wr_data3(adap, 0xf0000000, 0, 0); adap 278 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (mc5_write(adap, IDT4_SCR_ADR0, IDT4_CMD_WRITE)) adap 313 drivers/net/ethernet/chelsio/cxgb3/mc5.c struct adapter *adap = mc5->adapter; adap 322 drivers/net/ethernet/chelsio/cxgb3/mc5.c cfg = t3_read_reg(adap, A_MC5_DB_CONFIG) & ~F_TMMODE; adap 324 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_CONFIG, cfg); adap 325 drivers/net/ethernet/chelsio/cxgb3/mc5.c if (t3_wait_op_done(adap, A_MC5_DB_CONFIG, F_TMRDY, 1, 500, 0)) { adap 326 drivers/net/ethernet/chelsio/cxgb3/mc5.c CH_ERR(adap, "TCAM reset timed out\n"); adap 330 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_ROUTING_TABLE_INDEX, tcam_size - nroutes); adap 331 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_FILTER_TABLE, adap 333 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_SERVER_INDEX, adap 339 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DBGI_REQ_ADDR1, 0); adap 340 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_DBGI_REQ_ADDR2, 0); adap 352 drivers/net/ethernet/chelsio/cxgb3/mc5.c CH_ERR(adap, "Unsupported TCAM type %d\n", mc5->part_type); adap 369 drivers/net/ethernet/chelsio/cxgb3/mc5.c struct adapter *adap = mc5->adapter; adap 370 drivers/net/ethernet/chelsio/cxgb3/mc5.c u32 cause = t3_read_reg(adap, A_MC5_DB_INT_CAUSE); adap 373 drivers/net/ethernet/chelsio/cxgb3/mc5.c CH_ALERT(adap, "MC5 parity error\n"); adap 378 drivers/net/ethernet/chelsio/cxgb3/mc5.c CH_ALERT(adap, "MC5 request queue parity error\n"); adap 383 drivers/net/ethernet/chelsio/cxgb3/mc5.c CH_ALERT(adap, "MC5 dispatch queue parity error\n"); adap 396 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_fatal_err(adap); adap 398 drivers/net/ethernet/chelsio/cxgb3/mc5.c t3_write_reg(adap, A_MC5_DB_INT_CAUSE, cause); adap 485 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline void ring_fl_db(struct adapter *adap, struct sge_fl *q) adap 490 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, V_EGRCNTX(q->cntxt_id)); adap 505 drivers/net/ethernet/chelsio/cxgb3/sge.c static int refill_fl(struct adapter *adap, struct sge_fl *q, int n, gfp_t gfp) adap 516 drivers/net/ethernet/chelsio/cxgb3/sge.c if (unlikely(alloc_pg_chunk(adap, q, sd, gfp, adap 525 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_device(adap->pdev, mapping, adap 538 drivers/net/ethernet/chelsio/cxgb3/sge.c q->gen, adap->pdev); adap 540 drivers/net/ethernet/chelsio/cxgb3/sge.c clear_rx_desc(adap->pdev, q, sd); adap 558 drivers/net/ethernet/chelsio/cxgb3/sge.c ring_fl_db(adap, q); adap 563 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) adap 565 drivers/net/ethernet/chelsio/cxgb3/sge.c refill_fl(adap, fl, min(MAX_RX_REFILL, fl->size - fl->credits), adap 578 drivers/net/ethernet/chelsio/cxgb3/sge.c static void recycle_rx_buf(struct adapter *adap, struct sge_fl *q, adap 598 drivers/net/ethernet/chelsio/cxgb3/sge.c ring_fl_db(adap, q); adap 649 drivers/net/ethernet/chelsio/cxgb3/sge.c if (q->adap && adap 650 drivers/net/ethernet/chelsio/cxgb3/sge.c !(q->adap->flags & NAPI_INIT)) { adap 655 drivers/net/ethernet/chelsio/cxgb3/sge.c q->adap = NULL; adap 783 drivers/net/ethernet/chelsio/cxgb3/sge.c static struct sk_buff *get_packet(struct adapter *adap, struct sge_fl *fl, adap 796 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_cpu(adap->pdev, adap 800 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_device(adap->pdev, adap 806 drivers/net/ethernet/chelsio/cxgb3/sge.c recycle_rx_buf(adap, fl, fl->cidx); adap 811 drivers/net/ethernet/chelsio/cxgb3/sge.c refill_fl(adap, fl, min(MAX_RX_REFILL, fl->size - fl->credits - 1), adap 816 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_unmap_single(adap->pdev, dma_unmap_addr(sd, dma_addr), adap 820 drivers/net/ethernet/chelsio/cxgb3/sge.c __refill_fl(adap, fl); adap 842 drivers/net/ethernet/chelsio/cxgb3/sge.c static struct sk_buff *get_packet_pg(struct adapter *adap, struct sge_fl *fl, adap 856 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_cpu(adap->pdev, dma_addr, len, adap 859 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_device(adap->pdev, dma_addr, adap 866 drivers/net/ethernet/chelsio/cxgb3/sge.c recycle_rx_buf(adap, fl, fl->cidx); adap 885 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_cpu(adap->pdev, dma_addr, len, adap 889 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_unmap_page(adap->pdev, adap 1049 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline void check_ring_tx_db(struct adapter *adap, struct sge_txq *q) adap 1055 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, adap 1060 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, adap 1179 drivers/net/ethernet/chelsio/cxgb3/sge.c static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb, adap 1268 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = pi->adapter; adap 1288 drivers/net/ethernet/chelsio/cxgb3/sge.c reclaim_completed_tx(adap, q, TX_RECLAIM_CHUNK); adap 1295 drivers/net/ethernet/chelsio/cxgb3/sge.c dev_err(&adap->pdev->dev, adap 1303 drivers/net/ethernet/chelsio/cxgb3/sge.c if (unlikely(map_skb(adap->pdev, skb, addr) < 0)) { adap 1366 drivers/net/ethernet/chelsio/cxgb3/sge.c write_tx_pkt_wr(adap, skb, pi, pidx, gen, q, ndesc, compl, addr); adap 1367 drivers/net/ethernet/chelsio/cxgb3/sge.c check_ring_tx_db(adap, q); adap 1421 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline int check_desc_avail(struct adapter *adap, struct sge_txq *q, adap 1476 drivers/net/ethernet/chelsio/cxgb3/sge.c static int ctrl_xmit(struct adapter *adap, struct sge_txq *q, adap 1494 drivers/net/ethernet/chelsio/cxgb3/sge.c ret = check_desc_avail(adap, q, skb, 1, TXQ_CTRL); adap 1512 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, adap 1556 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(qs->adap, A_SG_KDOORBELL, adap 1563 drivers/net/ethernet/chelsio/cxgb3/sge.c int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb) adap 1567 drivers/net/ethernet/chelsio/cxgb3/sge.c ret = ctrl_xmit(adap, &adap->sge.qs[0].txq[TXQ_CTRL], skb); adap 1629 drivers/net/ethernet/chelsio/cxgb3/sge.c static void write_ofld_wr(struct adapter *adap, struct sk_buff *skb, adap 1657 drivers/net/ethernet/chelsio/cxgb3/sge.c setup_deferred_unmapping(skb, adap->pdev, sgp, sgl_flits); adap 1694 drivers/net/ethernet/chelsio/cxgb3/sge.c static int ofld_xmit(struct adapter *adap, struct sge_txq *q, adap 1701 drivers/net/ethernet/chelsio/cxgb3/sge.c again: reclaim_completed_tx(adap, q, TX_RECLAIM_CHUNK); adap 1703 drivers/net/ethernet/chelsio/cxgb3/sge.c ret = check_desc_avail(adap, q, skb, ndesc, TXQ_OFLD); adap 1714 drivers/net/ethernet/chelsio/cxgb3/sge.c map_skb(adap->pdev, skb, (dma_addr_t *)skb->head)) { adap 1729 drivers/net/ethernet/chelsio/cxgb3/sge.c write_ofld_wr(adap, skb, q, pidx, gen, ndesc, (dma_addr_t *)skb->head); adap 1730 drivers/net/ethernet/chelsio/cxgb3/sge.c check_ring_tx_db(adap, q); adap 1746 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = pi->adapter; adap 1750 drivers/net/ethernet/chelsio/cxgb3/sge.c again: reclaim_completed_tx(adap, q, TX_RECLAIM_CHUNK); adap 1768 drivers/net/ethernet/chelsio/cxgb3/sge.c map_skb(adap->pdev, skb, (dma_addr_t *)skb->head)) adap 1783 drivers/net/ethernet/chelsio/cxgb3/sge.c write_ofld_wr(adap, skb, q, pidx, gen, ndesc, adap 1795 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, adap 1834 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = tdev2adap(tdev); adap 1835 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_qset *qs = &adap->sge.qs[queue_set(skb)]; adap 1838 drivers/net/ethernet/chelsio/cxgb3/sge.c return ctrl_xmit(adap, &qs->txq[TXQ_CTRL], skb); adap 1840 drivers/net/ethernet/chelsio/cxgb3/sge.c return ofld_xmit(adap, &qs->txq[TXQ_OFLD], skb); adap 1899 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adapter = qs->adap; adap 2078 drivers/net/ethernet/chelsio/cxgb3/sge.c static void rx_eth(struct adapter *adap, struct sge_rspq *rq, adap 2086 drivers/net/ethernet/chelsio/cxgb3/sge.c skb->protocol = eth_type_trans(skb, adap->port[p->iff]); adap 2094 drivers/net/ethernet/chelsio/cxgb3/sge.c skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); adap 2128 drivers/net/ethernet/chelsio/cxgb3/sge.c static void lro_add_page(struct adapter *adap, struct sge_qset *qs, adap 2146 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_dma_sync_single_for_cpu(adap->pdev, adap 2153 drivers/net/ethernet/chelsio/cxgb3/sge.c pci_unmap_page(adap->pdev, adap 2196 drivers/net/ethernet/chelsio/cxgb3/sge.c skb_record_rx_queue(skb, qs - &adap->sge.qs[pi->first_qset]); adap 2250 drivers/net/ethernet/chelsio/cxgb3/sge.c static void check_ring_db(struct adapter *adap, struct sge_qset *qs, adap 2259 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, F_SELEGRCNTX | adap 2270 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_KDOORBELL, F_SELEGRCNTX | adap 2320 drivers/net/ethernet/chelsio/cxgb3/sge.c static int process_responses(struct adapter *adap, struct sge_qset *qs, adap 2379 drivers/net/ethernet/chelsio/cxgb3/sge.c __refill_fl(adap, fl); adap 2381 drivers/net/ethernet/chelsio/cxgb3/sge.c lro_add_page(adap, qs, fl, adap 2387 drivers/net/ethernet/chelsio/cxgb3/sge.c skb = get_packet_pg(adap, fl, q, adap 2393 drivers/net/ethernet/chelsio/cxgb3/sge.c skb = get_packet(adap, fl, G_RSPD_LEN(len), adap 2421 drivers/net/ethernet/chelsio/cxgb3/sge.c refill_rspq(adap, q, q->credits); adap 2431 drivers/net/ethernet/chelsio/cxgb3/sge.c rx_eth(adap, q, skb, ethpad, lro); adap 2437 drivers/net/ethernet/chelsio/cxgb3/sge.c ngathered = rx_offload(&adap->tdev, q, skb, adap 2448 drivers/net/ethernet/chelsio/cxgb3/sge.c deliver_partial_bundle(&adap->tdev, q, offload_skbs, ngathered); adap 2451 drivers/net/ethernet/chelsio/cxgb3/sge.c check_ring_db(adap, qs, sleeping); adap 2478 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = qs->adap; adap 2479 drivers/net/ethernet/chelsio/cxgb3/sge.c int work_done = process_responses(adap, qs, budget); adap 2498 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(qs->rspq.cntxt_id) | adap 2527 drivers/net/ethernet/chelsio/cxgb3/sge.c static int process_pure_responses(struct adapter *adap, struct sge_qset *qs, adap 2551 drivers/net/ethernet/chelsio/cxgb3/sge.c refill_rspq(adap, q, q->credits); adap 2560 drivers/net/ethernet/chelsio/cxgb3/sge.c check_ring_db(adap, qs, sleeping); adap 2584 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline int handle_responses(struct adapter *adap, struct sge_rspq *q) adap 2592 drivers/net/ethernet/chelsio/cxgb3/sge.c if (is_pure_response(r) && process_pure_responses(adap, qs, r) == 0) { adap 2593 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(q->cntxt_id) | adap 2608 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = qs->adap; adap 2612 drivers/net/ethernet/chelsio/cxgb3/sge.c if (process_responses(adap, qs, -1) == 0) adap 2614 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(q->cntxt_id) | adap 2631 drivers/net/ethernet/chelsio/cxgb3/sge.c if (handle_responses(qs->adap, q) < 0) adap 2646 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = cookie; adap 2647 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q = &adap->sge.qs[0].rspq; adap 2651 drivers/net/ethernet/chelsio/cxgb3/sge.c if (process_responses(adap, &adap->sge.qs[0], -1)) { adap 2652 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(q->cntxt_id) | adap 2657 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->params.nports == 2 && adap 2658 drivers/net/ethernet/chelsio/cxgb3/sge.c process_responses(adap, &adap->sge.qs[1], -1)) { adap 2659 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q1 = &adap->sge.qs[1].rspq; adap 2661 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(q1->cntxt_id) | adap 2667 drivers/net/ethernet/chelsio/cxgb3/sge.c if (!new_packets && t3_slow_intr_handler(adap) == 0) adap 2696 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = cookie; adap 2697 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q = &adap->sge.qs[0].rspq; adap 2701 drivers/net/ethernet/chelsio/cxgb3/sge.c new_packets = rspq_check_napi(&adap->sge.qs[0]); adap 2702 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->params.nports == 2) adap 2703 drivers/net/ethernet/chelsio/cxgb3/sge.c new_packets += rspq_check_napi(&adap->sge.qs[1]); adap 2704 drivers/net/ethernet/chelsio/cxgb3/sge.c if (!new_packets && t3_slow_intr_handler(adap) == 0) adap 2714 drivers/net/ethernet/chelsio/cxgb3/sge.c static inline int process_responses_gts(struct adapter *adap, adap 2719 drivers/net/ethernet/chelsio/cxgb3/sge.c work = process_responses(adap, rspq_to_qset(rq), -1); adap 2720 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_GTS, V_RSPQ(rq->cntxt_id) | adap 2734 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = cookie; adap 2735 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q0 = &adap->sge.qs[0].rspq; adap 2736 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q1 = &adap->sge.qs[1].rspq; adap 2741 drivers/net/ethernet/chelsio/cxgb3/sge.c w1 = adap->params.nports == 2 && adap 2745 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_PL_CLI, 0); adap 2746 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_read_reg(adap, A_PL_CLI); /* flush */ adap 2749 drivers/net/ethernet/chelsio/cxgb3/sge.c process_responses_gts(adap, q0); adap 2752 drivers/net/ethernet/chelsio/cxgb3/sge.c process_responses_gts(adap, q1); adap 2756 drivers/net/ethernet/chelsio/cxgb3/sge.c work_done = t3_slow_intr_handler(adap); adap 2772 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = cookie; adap 2773 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_rspq *q0 = &adap->sge.qs[0].rspq; adap 2775 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_PL_CLI, 0); adap 2776 drivers/net/ethernet/chelsio/cxgb3/sge.c map = t3_read_reg(adap, A_SG_DATA_INTR); adap 2784 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_slow_intr_handler(adap); adap 2787 drivers/net/ethernet/chelsio/cxgb3/sge.c process_responses_gts(adap, q0); adap 2790 drivers/net/ethernet/chelsio/cxgb3/sge.c process_responses_gts(adap, &adap->sge.qs[1].rspq); adap 2806 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = cookie; adap 2807 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_qset *qs0 = &adap->sge.qs[0]; adap 2810 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_PL_CLI, 0); adap 2811 drivers/net/ethernet/chelsio/cxgb3/sge.c map = t3_read_reg(adap, A_SG_DATA_INTR); adap 2819 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_slow_intr_handler(adap); adap 2825 drivers/net/ethernet/chelsio/cxgb3/sge.c napi_schedule(&adap->sge.qs[1].napi); adap 2840 drivers/net/ethernet/chelsio/cxgb3/sge.c irq_handler_t t3_intr_handler(struct adapter *adap, int polling) adap 2842 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->flags & USING_MSIX) adap 2844 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->flags & USING_MSI) adap 2846 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->params.rev > 0) adap 2925 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = pi->adapter; adap 2930 drivers/net/ethernet/chelsio/cxgb3/sge.c tbd[TXQ_ETH] = reclaim_completed_tx(adap, &qs->txq[TXQ_ETH], adap 2936 drivers/net/ethernet/chelsio/cxgb3/sge.c tbd[TXQ_OFLD] = reclaim_completed_tx(adap, &qs->txq[TXQ_OFLD], adap 2966 drivers/net/ethernet/chelsio/cxgb3/sge.c struct adapter *adap = pi->adapter; adap 2969 drivers/net/ethernet/chelsio/cxgb3/sge.c lock = adap->params.rev > 0 ? adap 2970 drivers/net/ethernet/chelsio/cxgb3/sge.c &qs->rspq.lock : &adap->sge.qs[0].rspq.lock; adap 2978 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->params.rev < 4) { adap 2979 drivers/net/ethernet/chelsio/cxgb3/sge.c status = t3_read_reg(adap, A_SG_RSPQ_FL_STATUS); adap 2985 drivers/net/ethernet/chelsio/cxgb3/sge.c refill_rspq(adap, &qs->rspq, 1); adap 2987 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_RSPQ_FL_STATUS, adap 2994 drivers/net/ethernet/chelsio/cxgb3/sge.c __refill_fl(adap, &qs->fl[0]); adap 2996 drivers/net/ethernet/chelsio/cxgb3/sge.c __refill_fl(adap, &qs->fl[1]); adap 3170 drivers/net/ethernet/chelsio/cxgb3/sge.c q->adap = adapter; adap 3210 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_start_sge_timers(struct adapter *adap) adap 3215 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_qset *q = &adap->sge.qs[i]; adap 3233 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_stop_sge_timers(struct adapter *adap) adap 3238 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_qset *q = &adap->sge.qs[i]; adap 3253 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_free_sge_resources(struct adapter *adap) adap 3258 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_free_qset(adap, &adap->sge.qs[i]); adap 3268 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_sge_start(struct adapter *adap) adap 3270 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_set_reg_field(adap, A_SG_CONTROL, F_GLOBALENABLE, F_GLOBALENABLE); adap 3286 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_sge_stop(struct adapter *adap) adap 3288 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_set_reg_field(adap, A_SG_CONTROL, F_GLOBALENABLE, 0); adap 3293 drivers/net/ethernet/chelsio/cxgb3/sge.c struct sge_qset *qs = &adap->sge.qs[i]; adap 3311 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_sge_init(struct adapter *adap, struct sge_params *p) adap 3313 drivers/net/ethernet/chelsio/cxgb3/sge.c unsigned int ctrl, ups = ffs(pci_resource_len(adap->pdev, 2) >> 12); adap 3322 drivers/net/ethernet/chelsio/cxgb3/sge.c if (adap->params.rev > 0) { adap 3323 drivers/net/ethernet/chelsio/cxgb3/sge.c if (!(adap->flags & (USING_MSIX | USING_MSI))) adap 3326 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_CONTROL, ctrl); adap 3327 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_EGR_RCQ_DRB_THRSH, V_HIRCQDRBTHRSH(512) | adap 3329 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_TIMER_TICK, core_ticks_per_usec(adap) / 10); adap 3330 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_CMDQ_CREDIT_TH, V_THRESHOLD(32) | adap 3331 drivers/net/ethernet/chelsio/cxgb3/sge.c V_TIMEOUT(200 * core_ticks_per_usec(adap))); adap 3332 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_HI_DRB_HI_THRSH, adap 3333 drivers/net/ethernet/chelsio/cxgb3/sge.c adap->params.rev < T3_REV_C ? 1000 : 500); adap 3334 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_HI_DRB_LO_THRSH, 256); adap 3335 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_LO_DRB_HI_THRSH, 1000); adap 3336 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_LO_DRB_LO_THRSH, 256); adap 3337 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_OCO_BASE, V_BASE1(0xfff)); adap 3338 drivers/net/ethernet/chelsio/cxgb3/sge.c t3_write_reg(adap, A_SG_DRB_PRI_THRESH, 63 * 1024); adap 3350 drivers/net/ethernet/chelsio/cxgb3/sge.c void t3_sge_prep(struct adapter *adap, struct sge_params *p) adap 3360 drivers/net/ethernet/chelsio/cxgb3/sge.c q->polling = adap->params.rev > 0; adap 3371 drivers/net/ethernet/chelsio/cxgb3/sge.c spin_lock_init(&adap->sge.reg_lock); adap 124 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void t3_read_indirect(struct adapter *adap, unsigned int addr_reg, adap 129 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, addr_reg, start_idx); adap 130 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c *vals++ = t3_read_reg(adap, data_reg); adap 152 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct adapter *adap = mc7->adapter; adap 166 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, mc7->offset + A_MC7_BD_ADDR, start); adap 167 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, mc7->offset + A_MC7_BD_OP, 0); adap 168 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, mc7->offset + A_MC7_BD_OP); adap 170 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, adap 175 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, mc7->offset + A_MC7_BD_DATA1); adap 177 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val64 = t3_read_reg(adap, adap 196 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void mi1_init(struct adapter *adap, const struct adapter_info *ai) adap 198 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1; adap 201 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_MI1_CFG, val); adap 1180 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c int t3_cim_ctl_blk_read(struct adapter *adap, unsigned int addr, adap 1185 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (t3_read_reg(adap, A_CIM_HOST_ACC_CTRL) & F_HOSTBUSY) adap 1189 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_CIM_HOST_ACC_CTRL, CIM_CTL_BASE + addr); adap 1190 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ret = t3_wait_op_done(adap, A_CIM_HOST_ACC_CTRL, F_HOSTBUSY, adap 1193 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c *valp++ = t3_read_reg(adap, A_CIM_HOST_ACC_DATA); adap 1844 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int mac_intr_handler(struct adapter *adap, unsigned int idx) adap 1846 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct cmac *mac = &adap2pinfo(adap, idx)->mac; adap 1853 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c u32 cause = t3_read_reg(adap, A_XGM_INT_CAUSE + mac->offset) & adap 1858 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c CH_ALERT(adap, "port%d: MAC TX FIFO parity error\n", idx); adap 1862 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c CH_ALERT(adap, "port%d: MAC RX FIFO parity error\n", idx); adap 1875 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, adap 1880 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_os_link_fault_handler(adap, idx); adap 1884 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_fatal_err(adap); adap 1886 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); adap 1974 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static unsigned int calc_gpio_intr(struct adapter *adap) adap 1978 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c for_each_port(adap, i) adap 1979 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if ((adap2pinfo(adap, i)->phy.caps & SUPPORTED_IRQ) && adap 1980 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adapter_info(adap)->gpio_intr[i]) adap 1981 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c gpi_intr |= 1 << adapter_info(adap)->gpio_intr[i]; adap 2207 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int clear_sge_ctxt(struct adapter *adap, unsigned int id, adap 2210 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_DATA0, 0); adap 2211 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_DATA1, 0); adap 2212 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_DATA2, 0); adap 2213 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_DATA3, 0); adap 2214 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_MASK0, 0xffffffff); adap 2215 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_MASK1, 0xffffffff); adap 2216 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_MASK2, 0xffffffff); adap 2217 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_MASK3, 0xffffffff); adap 2218 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_SG_CONTEXT_CMD, adap 2220 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c return t3_wait_op_done(adap, A_SG_CONTEXT_CMD, F_CONTEXT_CMD_BUSY, adap 2569 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c void t3_tp_set_offload_mode(struct adapter *adap, int enable) adap 2571 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (is_offload(adap) || !enable) adap 2572 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_IN_CONFIG, F_NICMODE, adap 2593 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c #define mem_region(adap, start, size, reg) \ adap 2594 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg((adap), A_ ## reg, (start)); \ adap 2605 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void partition_mem(struct adapter *adap, const struct tp_params *p) adap 2607 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c unsigned int m, pstructs, tids = t3_mc5_size(&adap->mc5); adap 2610 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (adap->params.rev > 0) { adap 2623 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_SIZE, adap 2626 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_TX_BASE, 0); adap 2627 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_TX_PAGE_SIZE, p->tx_pg_size); adap 2628 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_TX_MAX_PAGE, p->tx_num_pgs); adap 2629 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PARA_REG3, V_TXDATAACKIDX(M_TXDATAACKIDX), adap 2632 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_RX_BASE, 0); adap 2633 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_RX_PAGE_SIZE, p->rx_pg_size); adap 2634 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PMM_RX_MAX_PAGE, p->rx_num_pgs); adap 2640 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_CMM_MM_MAX_PSTRUCT, pstructs); adap 2643 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, (64 << 10) * 64, SG_EGR_CNTX_BADDR); adap 2644 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, (64 << 10) * 64, SG_CQ_CONTEXT_BADDR); adap 2645 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_CMM_TIMER_BASE, V_CMTIMERMAXNUM(timers) | m); adap 2647 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, pstructs * 64, TP_CMM_MM_BASE); adap 2648 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, 64 * (pstructs / 24), TP_CMM_MM_PS_FLST_BASE); adap 2649 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, 64 * (p->rx_num_pgs / 24), TP_CMM_MM_RX_FLST_BASE); adap 2650 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mem_region(adap, m, 64 * (p->tx_num_pgs / 24), TP_CMM_MM_TX_FLST_BASE); adap 2653 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_CIM_SDRAM_BASE_ADDR, m); adap 2654 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_CIM_SDRAM_ADDR_SIZE, p->cm_size - m); adap 2657 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c m = t3_mc5_size(&adap->mc5) - adap->params.mc5.nservers - adap 2658 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adap->params.mc5.nfilters - adap->params.mc5.nroutes; adap 2660 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adap->params.mc5.nservers += m - tids; adap 2663 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static inline void tp_wr_indirect(struct adapter *adap, unsigned int addr, adap 2666 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PIO_ADDR, addr); adap 2667 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PIO_DATA, val); adap 2670 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void tp_config(struct adapter *adap, const struct tp_params *p) adap 2672 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_GLOBAL_CONFIG, F_TXPACINGENABLE | F_PATHMTU | adap 2675 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TCP_OPTIONS, V_MTUDEFAULT(576) | adap 2678 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_DACK_CONFIG, V_AUTOSTATE3(1) | adap 2682 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_IN_CONFIG, F_RXFBARBPRIO | F_TXFBARBPRIO, adap 2684 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TX_RESOURCE_LIMIT, 0x18141814); adap 2685 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PARA_REG4, 0x5050105); adap 2686 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PARA_REG6, 0, adap 2687 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c adap->params.rev > 0 ? F_ENABLEESND : adap 2690 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PC_CONFIG, adap 2694 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PC_CONFIG2, F_CHDRAFULL, adap 2697 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PROXY_FLOW_CNTL, 1080); adap 2698 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PROXY_FLOW_CNTL, 1000); adap 2700 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (adap->params.rev > 0) { adap 2701 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c tp_wr_indirect(adap, A_TP_EGRESS_CONFIG, F_REWRITEFORCETOSIZE); adap 2702 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PARA_REG3, F_TXPACEAUTO, adap 2704 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PC_CONFIG, F_LOCKTID, F_LOCKTID); adap 2705 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PARA_REG3, 0, F_TXPACEAUTOSTRICT); adap 2707 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PARA_REG3, 0, F_TXPACEFIXED); adap 2709 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (adap->params.rev == T3_REV_C) adap 2710 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PC_CONFIG, adap 2714 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT1, 0); adap 2715 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TX_MOD_QUEUE_WEIGHT0, 0); adap 2716 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_MOD_CHANNEL_WEIGHT, 0); adap 2717 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_MOD_RATE_LIMIT, 0xf2200000); adap 2735 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void tp_set_timers(struct adapter *adap, unsigned int core_clk) adap 2742 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TIMER_RESOLUTION, V_TIMERRESOLUTION(tre) | adap 2745 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_DACK_TIMER, adap 2747 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TCP_BACKOFF_REG0, 0x3020100); adap 2748 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TCP_BACKOFF_REG1, 0x7060504); adap 2749 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TCP_BACKOFF_REG2, 0xb0a0908); adap 2750 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TCP_BACKOFF_REG3, 0xf0e0d0c); adap 2751 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_SHIFT_CNT, V_SYNSHIFTMAX(6) | adap 2758 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_MSL, adap->params.rev > 0 ? 0 : 2 SECONDS); adap 2759 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_RXT_MIN, tps / (1000 / TP_RTO_MIN)); adap 2760 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_RXT_MAX, 64 SECONDS); adap 2761 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PERS_MIN, 5 SECONDS); adap 2762 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PERS_MAX, 64 SECONDS); adap 2763 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_KEEP_IDLE, 7200 SECONDS); adap 2764 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_KEEP_INTVL, 75 SECONDS); adap 2765 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_INIT_SRTT, 3 SECONDS); adap 2766 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_FINWAIT2_TIMER, 600 SECONDS); adap 2779 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int t3_tp_set_coalescing_size(struct adapter *adap, adap 2787 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c val = t3_read_reg(adap, A_TP_PARA_REG3); adap 2795 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PARA_REG2, V_RXCOALESCESIZE(size) | adap 2798 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PARA_REG3, val); adap 2810 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size) adap 2812 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_PARA_REG7, adap 2896 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c void t3_load_mtus(struct adapter *adap, unsigned short mtus[NMTUS], adap 2914 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_MTU_TABLE, adap 2923 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_CCTRL_TABLE, (i << 21) | adap 2936 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c void t3_tp_get_mib_stats(struct adapter *adap, struct tp_mib_stats *tps) adap 2938 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_RDATA, (u32 *) tps, adap 2942 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c #define ulp_region(adap, name, start, len) \ adap 2943 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg((adap), A_ULPRX_ ## name ## _LLIMIT, (start)); \ adap 2944 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg((adap), A_ULPRX_ ## name ## _ULIMIT, \ adap 2948 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c #define ulptx_region(adap, name, start, len) \ adap 2949 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg((adap), A_ULPTX_ ## name ## _LLIMIT, (start)); \ adap 2950 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg((adap), A_ULPTX_ ## name ## _ULIMIT, \ adap 2953 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void ulp_config(struct adapter *adap, const struct tp_params *p) adap 2957 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_region(adap, ISCSI, m, p->chan_rx_size / 8); adap 2958 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_region(adap, TDDP, m, p->chan_rx_size / 8); adap 2959 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulptx_region(adap, TPT, m, p->chan_rx_size / 4); adap 2960 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_region(adap, STAG, m, p->chan_rx_size / 4); adap 2961 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_region(adap, RQ, m, p->chan_rx_size / 4); adap 2962 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulptx_region(adap, PBL, m, p->chan_rx_size / 4); adap 2963 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_region(adap, PBL, m, p->chan_rx_size / 4); adap 2964 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_ULPRX_TDDP_TAGMASK, 0xffffffff); adap 2974 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c int t3_set_proto_sram(struct adapter *adap, const u8 *data) adap 2980 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD5, be32_to_cpu(*buf++)); adap 2981 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD4, be32_to_cpu(*buf++)); adap 2982 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD3, be32_to_cpu(*buf++)); adap 2983 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD2, be32_to_cpu(*buf++)); adap 2984 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD1, be32_to_cpu(*buf++)); adap 2986 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD0, i << 1 | 1 << 31); adap 2987 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (t3_wait_op_done(adap, A_TP_EMBED_OP_FIELD0, 1, 1, 5, 1)) adap 2990 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_EMBED_OP_FIELD0, 0); adap 3036 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c int t3_config_sched(struct adapter *adap, unsigned int kbps, int sched) adap 3039 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c unsigned int clk = adap->params.vpd.cclk * 1000; adap 3061 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TM_PIO_ADDR, adap 3063 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c v = t3_read_reg(adap, A_TP_TM_PIO_DATA); adap 3068 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TM_PIO_DATA, v); adap 3072 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int tp_init(struct adapter *adap, const struct tp_params *p) adap 3076 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c tp_config(adap, p); adap 3077 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_vlan_accel(adap, 3, 0); adap 3079 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (is_offload(adap)) { adap 3080 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c tp_set_timers(adap, adap->params.vpd.cclk * 1000); adap 3081 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_RESET, F_FLSTINITENABLE); adap 3082 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c busy = t3_wait_op_done(adap, A_TP_RESET, F_FLSTINITENABLE, adap 3085 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c CH_ERR(adap, "TP initialization timed out\n"); adap 3089 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_RESET, F_TPRESET); adap 3097 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void chan_init_hw(struct adapter *adap, unsigned int chan_map) adap 3102 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_ULPRX_CTL, F_ROUND_ROBIN, 0); adap 3103 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_ULPTX_CONFIG, F_CFG_RR_ARB, 0); adap 3104 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_MPS_CFG, F_TPRXPORTEN | F_ENFORCEPKT | adap 3107 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_PM1_TX_CFG, adap 3110 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_ULPRX_CTL, 0, F_ROUND_ROBIN); adap 3111 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_ULPTX_CONFIG, 0, F_CFG_RR_ARB); adap 3112 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_ULPTX_DMA_WEIGHT, adap 3114 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_MPS_CFG, F_TPTXPORT0EN | F_TPTXPORT1EN | adap 3117 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_PM1_TX_CFG, 0x80008000); adap 3118 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_TP_PC_CONFIG, 0, F_TXTOSQUEUEMAPMODE); adap 3119 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TX_MOD_QUEUE_REQ_MAP, adap 3122 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_TP_TX_MOD_QUE_TABLE, adap 3307 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static void config_pcie(struct adapter *adap) adap 3326 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c pcie_capability_read_word(adap->pdev, PCI_EXP_DEVCTL, &val); adap 3329 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c pci_read_config_word(adap->pdev, 0x2, &devid); adap 3331 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c pcie_capability_write_word(adap->pdev, PCI_EXP_DEVCTL, adap 3337 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c pcie_capability_read_word(adap->pdev, PCI_EXP_LNKCTL, &val); adap 3339 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c fst_trn_tx = G_NUMFSTTRNSEQ(t3_read_reg(adap, A_PCIE_PEX_CTRL0)); adap 3340 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c fst_trn_rx = adap->params.rev == 0 ? fst_trn_tx : adap 3341 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c G_NUMFSTTRNSEQRX(t3_read_reg(adap, A_PCIE_MODE)); adap 3342 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c log2_width = fls(adap->params.pci.width) - 1; adap 3348 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (adap->params.rev == 0) adap 3349 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_PCIE_PEX_CTRL1, adap 3353 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_PCIE_PEX_CTRL1, V_ACKLAT(M_ACKLAT), adap 3356 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_PCIE_PEX_CTRL0, V_REPLAYLMT(M_REPLAYLMT), adap 3359 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_PCIE_PEX_ERR, 0xffffffff); adap 3360 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_set_reg_field(adap, A_PCIE_CFG, 0, adap 3620 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c static int init_parity(struct adapter *adap) adap 3624 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (t3_read_reg(adap, A_SG_CONTEXT_CMD) & F_CONTEXT_CMD_BUSY) adap 3628 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c err = clear_sge_ctxt(adap, i, F_EGRESS); adap 3630 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c err = clear_sge_ctxt(adap, i, F_EGRESS); adap 3632 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c err = clear_sge_ctxt(adap, i, F_RESPONSEQ); adap 3636 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_CIM_IBQ_DBG_DATA, 0); adap 3639 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c t3_write_reg(adap, A_CIM_IBQ_DBG_CFG, F_IBQDBGEN | adap 3642 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c err = t3_wait_op_done(adap, A_CIM_IBQ_DBG_CFG, adap 54 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 57 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, ctrl, adap->params.vpd.xauicfg[macidx(mac)] | adap 61 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, ctrl); adap 65 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, ctrl, clear[i], 0); adap 99 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 102 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RESET_CTRL + oft, F_MAC_RESET_); adap 103 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_RESET_CTRL + oft); /* flush */ adap 105 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_regs(adap, mac_reset_avp, ARRAY_SIZE(mac_reset_avp), oft); adap 106 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_RXFIFO_CFG + oft, adap 108 drivers/net/ethernet/chelsio/cxgb3/xgmac.c uses_xaui(adap) ? 0 : F_RXSTRFRWRD); adap 109 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_TXFIFO_CFG + oft, 0, F_UNDERUNFIX); adap 111 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (uses_xaui(adap)) { adap 112 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (adap->params.rev == 0) { adap 113 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_SERDES_CTRL + oft, 0, adap 115 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (t3_wait_op_done(adap, A_XGM_SERDES_STATUS1 + oft, adap 117 drivers/net/ethernet/chelsio/cxgb3/xgmac.c CH_ERR(adap, adap 122 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_SERDES_CTRL + oft, 0, adap 128 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_RX_MAX_PKT_SIZE + oft, adap 133 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (is_10G(adap)) adap 135 drivers/net/ethernet/chelsio/cxgb3/xgmac.c else if (uses_xaui(adap)) adap 139 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RESET_CTRL + oft, val); adap 140 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_RESET_CTRL + oft); /* flush */ adap 141 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if ((val & F_PCS_RESET_) && adap->params.rev) { adap 152 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 158 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, F_PORT0ACTIVE, 0); adap 160 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, F_PORT1ACTIVE, 0); adap 163 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, F_ENFORCEPKT, 0); adap 165 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_TX_CFG + oft, F_TXPAUSEEN, 0); adap 167 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RESET_CTRL + oft, F_MAC_RESET_); adap 168 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_RESET_CTRL + oft); /* flush */ adap 171 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CFG_CH0 + idx); adap 172 drivers/net/ethernet/chelsio/cxgb3/xgmac.c store = t3_read_reg(adap, A_TP_TX_DROP_CFG_CH0 + idx); adap 177 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CFG_CH0 + idx); adap 178 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_DATA, 0xc0000011); adap 182 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (t3_wait_op_done(adap, A_XGM_RX_MAX_PKT_SIZE_ERR_CNT + oft, adap 184 drivers/net/ethernet/chelsio/cxgb3/xgmac.c CH_ERR(adap, "MAC %d Rx fifo drain failed\n", adap 189 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RESET_CTRL + oft, 0); adap 190 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_RESET_CTRL + oft); /* flush */ adap 193 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (is_10G(adap)) adap 195 drivers/net/ethernet/chelsio/cxgb3/xgmac.c else if (uses_xaui(adap)) adap 199 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RESET_CTRL + oft, val); adap 200 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_RESET_CTRL + oft); /* flush */ adap 201 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if ((val & F_PCS_RESET_) && adap->params.rev) { adap 205 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CFG + oft, adap 210 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CFG_CH0 + idx); adap 211 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_DATA, store); adap 214 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, 0, F_PORT0ACTIVE); adap 216 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, 0, F_PORT1ACTIVE); adap 219 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, F_ENFORCEPKT, 1); adap 222 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_MPS_CFG, F_ENFORCEPKT, 1); adap 303 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 306 drivers/net/ethernet/chelsio/cxgb3/xgmac.c val = t3_read_reg(adap, A_XGM_RX_CFG + oft) & ~F_COPYALLFRAMES; adap 309 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CFG + oft, val); adap 332 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_HASH_LOW + oft, hash_lo); adap 333 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_HASH_HIGH + oft, hash_hi); adap 350 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 362 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); adap 364 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (adap->params.rev >= T3_REV_B2 && adap 365 drivers/net/ethernet/chelsio/cxgb3/xgmac.c (t3_read_reg(adap, A_XGM_RX_CTRL + mac->offset) & F_RXEN)) { adap 367 drivers/net/ethernet/chelsio/cxgb3/xgmac.c v = t3_read_reg(adap, A_XGM_RX_CFG + mac->offset); adap 368 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_RX_CFG + mac->offset, adap 371 drivers/net/ethernet/chelsio/cxgb3/xgmac.c reg = adap->params.rev == T3_REV_B2 ? adap 375 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (t3_wait_op_done(adap, reg + mac->offset, adap 377 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v); adap 381 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, adap 384 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v); adap 387 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, adap 397 drivers/net/ethernet/chelsio/cxgb3/xgmac.c v = t3_read_reg(adap, A_XGM_RXFIFO_CFG + mac->offset); adap 404 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RXFIFO_CFG + mac->offset, v); adap 407 drivers/net/ethernet/chelsio/cxgb3/xgmac.c thres = (adap->params.vpd.cclk * 1000) / 15625; adap 409 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (is_10G(adap)) adap 413 drivers/net/ethernet/chelsio/cxgb3/xgmac.c ipg = (adap->params.rev == T3_REV_C) ? 0 : 1; adap 414 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_TXFIFO_CFG + mac->offset, adap 418 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (adap->params.rev > 0) { adap 419 drivers/net/ethernet/chelsio/cxgb3/xgmac.c divisor = (adap->params.rev == T3_REV_C) ? 64 : 8; adap 420 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_PAUSE_TIMER + mac->offset, adap 423 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_TX_PAUSE_QUANTA + mac->offset, adap 431 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 448 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_PORT_CFG + oft, adap 452 drivers/net/ethernet/chelsio/cxgb3/xgmac.c val = t3_read_reg(adap, A_XGM_RXFIFO_CFG + oft); adap 456 drivers/net/ethernet/chelsio/cxgb3/xgmac.c G_RXMAXPKTSIZE(t3_read_reg(adap, adap 460 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RXFIFO_CFG + oft, val); adap 462 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_XGM_TX_CFG + oft, F_TXPAUSEEN, adap 470 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 475 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CFG_CH0 + idx); adap 476 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_DATA, adap 477 drivers/net/ethernet/chelsio/cxgb3/xgmac.c adap->params.rev == T3_REV_C ? adap 479 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_MODE); adap 480 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_set_reg_field(adap, A_TP_PIO_DATA, 1 << idx, adap 481 drivers/net/ethernet/chelsio/cxgb3/xgmac.c adap->params.rev == T3_REV_C ? 0 : 1 << idx); adap 483 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_TX_CTRL + oft, F_TXEN); adap 485 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, A_TP_TX_DROP_CNT_CH0 + idx); adap 487 drivers/net/ethernet/chelsio/cxgb3/xgmac.c mac->tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap, adap 489 drivers/net/ethernet/chelsio/cxgb3/xgmac.c mac->tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, adap 494 drivers/net/ethernet/chelsio/cxgb3/xgmac.c mac->rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, adap 502 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CTRL + oft, F_RXEN); adap 508 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 511 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0); adap 520 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_RX_CTRL + mac->offset, 0); adap 521 drivers/net/ethernet/chelsio/cxgb3/xgmac.c if (is_10G(adap)) adap 523 drivers/net/ethernet/chelsio/cxgb3/xgmac.c else if (uses_xaui(adap)) adap 534 drivers/net/ethernet/chelsio/cxgb3/xgmac.c struct adapter *adap = mac->adapter; adap 544 drivers/net/ethernet/chelsio/cxgb3/xgmac.c tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, adap 548 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_TP_PIO_ADDR, adap 550 drivers/net/ethernet/chelsio/cxgb3/xgmac.c tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap, adap 579 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0); adap 580 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset); /* flush */ adap 581 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, mac->txen); adap 582 drivers/net/ethernet/chelsio/cxgb3/xgmac.c t3_read_reg(adap, A_XGM_TX_CTRL + mac->offset); /* flush */ adap 47 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct adapter *adap = netdev2adap(dev); adap 56 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false); adap 62 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct adapter *adap = netdev2adap(dev); adap 71 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, false); adap 76 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct adapter *adap = netdev2adap(dev); adap 77 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct clip_tbl *ctbl = adap->clipt; adap 122 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c dev_err(adap->pdev_dev, adap 136 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c dev_info(adap->pdev_dev, "CLIP table overflow, " adap 149 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct adapter *adap = netdev2adap(dev); adap 150 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct clip_tbl *ctbl = adap->clipt; adap 321 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c void t4_cleanup_clip_tbl(struct adapter *adap) adap 323 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c struct clip_tbl *ctbl = adap->clipt; adap 45 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h void t4_cleanup_clip_tbl(struct adapter *adap); adap 77 drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h struct adapter *adap; /* Pointer to adapter structure */ adap 70 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 410 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 431 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 469 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 510 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 530 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 568 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 652 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 886 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *adap = pdbg_init->adap; adap 903 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c ret = t4_memory_rw_init(adap, win, mtype, &memoffset, &mem_base, adap 909 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c win_pf = is_t4(adap->params.chip) ? 0 : PFNUM_V(adap->pf); adap 917 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_memory_update_win(adap, win, pos | win_pf); adap 922 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_read_reg64(adap, mem_base + offset)); adap 932 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_memory_update_win(adap, win, pos | win_pf); adap 940 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_read_reg(adap, mem_base + offset)); adap 950 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_memory_update_win(adap, win, pos | win_pf); adap 956 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c t4_memory_rw_residual(adap, resid, mem_base + offset, adap 972 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1046 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1061 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1147 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1170 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1193 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1210 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1230 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1258 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1392 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1450 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1470 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1490 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1525 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1547 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1595 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1651 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1707 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1799 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1929 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 1978 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2123 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2246 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2283 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2349 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2493 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2548 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2566 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2620 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2682 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2763 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2831 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2875 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 2962 drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c struct adapter *padap = pdbg_init->adap; adap 60 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h #define CH_WARN(adap, fmt, ...) dev_warn(adap->pdev_dev, fmt, ## __VA_ARGS__) adap 694 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h struct adapter *adap; adap 773 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h struct adapter *adap; adap 783 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h struct adapter *adap; adap 1277 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int is_offload(const struct adapter *adap) adap 1279 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return adap->params.offload; adap 1282 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int is_hashfilter(const struct adapter *adap) adap 1284 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return adap->params.hash_filter; adap 1287 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int is_pci_uld(const struct adapter *adap) adap 1289 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return adap->params.crypto; adap 1292 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int is_uld(const struct adapter *adap) adap 1294 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return (adap->params.offload || adap->params.crypto); adap 1297 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline u32 t4_read_reg(struct adapter *adap, u32 reg_addr) adap 1299 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return readl(adap->regs + reg_addr); adap 1302 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline void t4_write_reg(struct adapter *adap, u32 reg_addr, u32 val) adap 1304 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h writel(val, adap->regs + reg_addr); adap 1320 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline u64 t4_read_reg64(struct adapter *adap, u32 reg_addr) adap 1322 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return readq(adap->regs + reg_addr); adap 1325 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline void t4_write_reg64(struct adapter *adap, u32 reg_addr, u64 val) adap 1327 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h writeq(val, adap->regs + reg_addr); adap 1364 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) adap 1366 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return netdev_priv(adap->port[idx]); adap 1392 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline unsigned int qtimer_val(const struct adapter *adap, adap 1397 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return idx < SGE_NTIMERS ? adap->sge.timer_val[idx] : 0; adap 1404 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_os_portmod_changed(struct adapter *adap, int port_id); adap 1405 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_os_link_changed(struct adapter *adap, int port_id, int link_stat); adap 1407 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_free_sge_resources(struct adapter *adap); adap 1408 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q); adap 1409 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h irq_handler_t t4_intr_handler(struct adapter *adap); adap 1413 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb); adap 1414 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_ofld_send(struct adapter *adap, struct sk_buff *skb); adap 1415 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, adap 1419 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq, adap 1422 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq, adap 1425 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_mod_ctrl_txq(struct adapter *adap, unsigned int eqid, adap 1427 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_alloc_uld_txq(struct adapter *adap, struct sge_uld_txq *txq, adap 1431 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_init(struct adapter *adap); adap 1432 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_sge_start(struct adapter *adap); adap 1433 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_sge_stop(struct adapter *adap); adap 1434 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_eth_txq_egress_update(struct adapter *adap, struct sge_eth_txq *q, adap 1444 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int is_bypass(struct adapter *adap) adap 1446 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return adap->params.bypass; adap 1474 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline unsigned int core_ticks_per_usec(const struct adapter *adap) adap 1476 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return adap->params.vpd.cclk / 1000; adap 1479 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline unsigned int us_to_core_ticks(const struct adapter *adap, adap 1482 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return (us * adap->params.vpd.cclk) / 1000; adap 1493 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline unsigned int dack_ticks_to_usec(const struct adapter *adap, adap 1496 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap); adap 1499 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, adap 1502 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, adap 1504 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, adap 1507 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, adap 1511 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true, adap 1515 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, adap 1518 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); adap 1521 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, adap 1524 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); adap 1547 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline void init_rspq(struct adapter *adap, struct sge_rspq *q, adap 1551 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h q->adap = adap; adap 1572 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_write_indirect(struct adapter *adap, unsigned int addr_reg, adap 1575 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_read_indirect(struct adapter *adap, unsigned int addr_reg, adap 1590 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_link_l1cfg_core(struct adapter *adap, unsigned int mbox, adap 1608 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port); adap 1610 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h u32 t4_read_pcie_cfg4(struct adapter *adap, int reg); adap 1611 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h u32 t4_get_util_window(struct adapter *adap); adap 1612 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_setup_memwin(struct adapter *adap, u32 memwin_base, u32 window); adap 1614 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_memory_rw_init(struct adapter *adap, int win, int mtype, u32 *mem_off, adap 1616 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_memory_update_win(struct adapter *adap, int win, u32 addr); adap 1617 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_memory_rw_residual(struct adapter *adap, u32 off, u32 addr, u8 *buf, adap 1621 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, u32 len, adap 1623 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h static inline int t4_memory_write(struct adapter *adap, int mtype, u32 addr, adap 1626 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return t4_memory_rw(adap, 0, mtype, addr, len, buf, 0); adap 1630 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size); adap 1640 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_load_phy_fw(struct adapter *adap, adap 1644 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver); adap 1645 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op); adap 1646 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, adap 1648 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fl_pkt_align(struct adapter *adap); adap 1650 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_check_fw_version(struct adapter *adap); adap 1660 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info, adap 1674 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h unsigned int qtimer_val(const struct adapter *adap, adap 1679 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_init_tp_params(struct adapter *adap, bool sleep_ok); adap 1680 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_filter_field_shift(const struct adapter *adap, int filter_sel); adap 1681 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_init_rss_mode(struct adapter *adap, int mbox); adap 1684 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_port_init(struct adapter *adap, int mbox, int pf, int vf); adap 1695 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx, adap 1706 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]); adap 1707 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]); adap 1708 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, adap 1710 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, adap 1712 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n, adap 1714 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n, adap 1716 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr); adap 1717 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp, adap 1720 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp); adap 1721 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres); adap 1723 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p); adap 1724 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_port_stats_offset(struct adapter *adap, int idx, adap 1727 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p); adap 1728 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log); adap 1729 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]); adap 1730 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr, adap 1732 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr); adap 1733 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st, adap 1735 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st, adap 1737 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st, adap 1739 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st, adap 1741 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, adap 1743 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx, adap 1745 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, adap 1748 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf); adap 1750 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate); adap 1753 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_wol_magic_enable(struct adapter *adap, unsigned int port, adap 1755 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map, adap 1758 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, adap 1760 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fw_bye(struct adapter *adap, unsigned int mbox); adap 1761 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_early_init(struct adapter *adap, unsigned int mbox); adap 1762 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); adap 1763 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fixup_host_params(struct adapter *adap, unsigned int page_size, adap 1765 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fw_initialize(struct adapter *adap, unsigned int mbox); adap 1766 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1769 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1772 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1775 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_params_timeout(struct adapter *adap, unsigned int mbox, adap 1779 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1782 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1787 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, adap 1790 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_free_vi(struct adapter *adap, unsigned int mbox, adap 1793 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 1796 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid, adap 1799 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, int idx, adap 1801 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 1805 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid, adap 1808 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, adap 1811 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_free_mac_filt(struct adapter *adap, unsigned int mbox, adap 1814 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 1816 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 1818 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, adap 1820 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_enable_pi_params(struct adapter *adap, unsigned int mbox, adap 1823 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 1825 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 1827 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, adap 1829 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, adap 1831 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1834 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1837 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1839 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1841 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 1843 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type); adap 1844 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_read_sge_dbqtimers(struct adapter *adap, unsigned int ndbqtimers, adap 1850 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); adap 1857 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, adap 1859 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]); adap 1860 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_tx_sched(struct adapter *adap, unsigned int sched, adap 1862 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid, adap 1864 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, adap 1877 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs, adap 1879 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs, adap 1881 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs, adap 1884 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_uld_mem_free(struct adapter *adap); adap 1885 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_uld_mem_alloc(struct adapter *adap); adap 1886 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_uld_clean_up(struct adapter *adap); adap 1888 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port, adap 1891 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, struct sge_fl *fl); adap 1892 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void free_tx_desc(struct adapter *adap, struct sge_txq *q, adap 1894 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void free_txq(struct adapter *adap, struct sge_txq *q); adap 1895 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void cxgb4_reclaim_completed_tx(struct adapter *adap, adap 1904 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n); adap 1905 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, adap 1909 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_thermal_init(struct adapter *adap); adap 1910 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_thermal_remove(struct adapter *adap); adap 1911 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_set_msix_aff(struct adapter *adap, unsigned short vec, adap 1919 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_alloc_mac_filt(struct adapter *adap, unsigned int viid, adap 1923 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_free_mac_filt(struct adapter *adap, unsigned int viid, adap 1925 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_init_mps_ref_entries(struct adapter *adap); adap 1926 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void cxgb4_free_mps_ref_entries(struct adapter *adap); adap 1927 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 1931 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 1933 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_free_raw_mac_filt(struct adapter *adap, adap 1941 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int cxgb4_alloc_raw_mac_filt(struct adapter *adap, adap 69 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c static u32 cxgb4_get_entity_length(struct adapter *adap, u32 entity) adap 76 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c switch (CHELSIO_CHIP_VERSION(adap->params.chip)) { adap 89 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = adap->params.devlog.size; adap 92 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c if (is_t6(adap->params.chip)) { adap 93 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = adap->params.cim_la_size / 10 + 1; adap 96 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = adap->params.cim_la_size / 8; adap 116 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 0); adap 119 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 1); adap 122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 2); adap 125 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 3); adap 128 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 4); adap 131 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 5); adap 134 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 6); adap 137 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_cim_obq_size(adap, 7); adap 140 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 142 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_EDRAM0_BAR_A); adap 148 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 150 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_EDRAM1_BAR_A); adap 156 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 158 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_EXT_MEMORY0_BAR_A); adap 164 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 166 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 172 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = t4_chip_rss_size(adap) * sizeof(u16); adap 175 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = adap->params.arch.vfcount * adap 188 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c switch (CHELSIO_CHIP_VERSION(adap->params.chip)) { adap 241 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = cudbg_dump_context_size(adap); adap 245 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c adap->params.arch.mps_tcam_size; adap 251 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c cudbg_fill_le_tcam_info(adap, &tcam_region); adap 259 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { adap 271 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c if (is_t5(adap->params.chip)) adap 274 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c else if (is_t6(adap->params.chip)) adap 283 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len = sizeof(struct cudbg_mbox_log) * adap->mbox_log->size; adap 286 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { adap 293 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 298 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c value = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 304 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c cudbg_fill_qdesc_num_and_size(adap, NULL, &len); adap 313 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c u32 cxgb4_get_dump_length(struct adapter *adap, u32 flag) adap 322 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len += cxgb4_get_entity_length(adap, entity); adap 329 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c len += cxgb4_get_entity_length(adap, entity); adap 401 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c int cxgb4_cudbg_collect(struct adapter *adap, void *buf, u32 *buf_size, adap 413 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c cudbg_init.adap = adap; adap 427 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c cudbg_hdr->chip_ver = adap->params.chip; adap 443 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c dev_warn(adap->pdev_dev, adap 489 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c struct adapter *adap = container_of(data, struct adapter, vmcoredd); adap 492 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c return cxgb4_cudbg_collect(adap, buf, &len, CXGB4_ETH_DUMP_ALL); adap 495 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c int cxgb4_cudbg_vmcore_add_dump(struct adapter *adap) adap 497 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c struct vmcoredd_data *data = &adap->vmcoredd; adap 506 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c cxgb4_driver_name, adap->name); adap 34 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h u32 cxgb4_get_dump_length(struct adapter *adap, u32 flag); adap 35 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h int cxgb4_cudbg_collect(struct adapter *adap, void *buf, u32 *buf_size, adap 38 drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h int cxgb4_cudbg_vmcore_add_dump(struct adapter *adap); adap 62 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 87 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, adap 130 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 262 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "cxgb4_dcb_state_fsm: illegal input symbol %d\n", adap 267 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "cxgb4_dcb_state_fsm: bad state transition, state = %d, input = %d\n", adap 273 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c void cxgb4_dcb_handle_fw_update(struct adapter *adap, adap 278 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct net_device *dev = adap->port[adap->chan_map[port]]; adap 301 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_warn(adap->pdev_dev, "Interface %s is running %s\n", adap 305 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_warn(adap->pdev_dev, adap 324 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "Receiving Firmware DCB messages in State %d\n", adap 387 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, adap 399 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "Unknown DCB update type received %x\n", adap 444 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 455 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 457 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGID failed with %d\n", -err); adap 467 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 469 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 507 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 520 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 522 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGID failed with %d\n", -err); adap 533 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 535 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB write PGID failed with %d\n", adap 545 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 558 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 560 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB write PGRATE failed with %d\n", adap 569 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 578 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 580 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 603 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 609 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 611 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 625 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB write PGRATE failed with %d\n", adap 651 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 670 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 672 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB PFC write failed with %d\n", -err); adap 787 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 805 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 807 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB APP read failed with %d\n", adap 840 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 855 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 858 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB app table read failed with %d\n", adap 874 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB app table full\n"); adap 889 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 891 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB app table write failed with %d\n", adap 945 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 963 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 965 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGID failed with %d\n", -err); adap 977 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 979 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 1114 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 1128 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 1131 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB app table read failed with %d\n", adap 1148 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 1158 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 1161 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB app table read failed with %d\n", adap 1185 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c struct adapter *adap = pi->adapter; adap 1196 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 1198 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGID failed with %d\n", -err); adap 1208 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); adap 1210 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c dev_err(adap->pdev_dev, "DCB read PGRATE failed with %d\n", adap 201 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 203 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_cim_read(adap, UP_UP_DBG_LA_CFG_A, 1, &cfg); adap 207 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (is_t6(adap->params.chip)) { adap 209 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c p = seq_open_tab(file, (adap->params.cim_la_size / 10) + 1, adap 214 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c p = seq_open_tab(file, adap->params.cim_la_size / 8, adap 222 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_cim_read_la(adap, (u32 *)p->data, NULL); adap 259 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 266 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_cim_read_pif_la(adap, (u32 *)p->data, adap 305 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 312 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_cim_read_ma_la(adap, (u32 *)p->data, adap 334 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 342 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c int cim_num_obq = is_t4(adap->params.chip) ? adap 345 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_cim_read(adap, is_t4(adap->params.chip) ? UP_IBQ_0_RDADDR_A : adap 349 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (is_t4(adap->params.chip)) { adap 350 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_cim_read(adap, UP_OBQ_0_REALADDR_A, adap 354 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_cim_read(adap, UP_OBQ_0_SHADOW_REALADDR_A, adap 362 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_read_cimq_cfg(adap, base, size, thres); adap 396 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private - qid; adap 402 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_read_cim_ibq(adap, qid, (u32 *)p->data, CIM_IBQ_SIZE * 4); adap 423 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private - qid; adap 429 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_read_cim_obq(adap, qid, (u32 *)p->data, 6 * CIM_OBQ_SIZE * 4); adap 641 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 643 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c switch (DBGLAMODE_G(t4_read_reg(adap, TP_DBG_LA_CONFIG_A))) { adap 658 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_read_la(adap, (u64 *)p->data, NULL); adap 669 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = file_inode(file)->i_private; adap 679 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->params.tp.la_mask = val << 16; adap 680 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_set_reg_field(adap, TP_DBG_LA_CONFIG_A, 0xffff0000U, adap 681 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->params.tp.la_mask); adap 710 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 717 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_ulprx_read_la(adap, (u32 *)p->data); adap 753 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 755 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_pmtx_get_stats(adap, tx_cnt, tx_cyc); adap 756 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_pmrx_get_stats(adap, rx_cnt, rx_cyc); adap 768 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { adap 804 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = file_inode(file)->i_private; adap 806 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, PM_RX_STAT_CONFIG_A, 0); adap 807 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, PM_TX_STAT_CONFIG_A, 0); adap 823 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 825 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_get_chan_txrate(adap, nrate, orate); adap 826 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.nchan == NCHAN) { adap 860 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 866 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_read_cong_tbl(adap, incr); adap 875 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->params.a_wnd[i], adap 876 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c dec_fac[adap->params.b_wnd[i]]); adap 905 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 906 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c unsigned int cclk_ps = 1000000000 / adap->params.vpd.cclk; /* in ps */ adap 907 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c u32 res = t4_read_reg(adap, TP_TIMER_RESOLUTION_A); adap 923 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_read_reg(adap, TP_DACK_TIMER_A)); adap 925 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_RXT_MIN_A)); adap 927 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_RXT_MAX_A)); adap 929 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_PERS_MIN_A)); adap 931 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_PERS_MAX_A)); adap 933 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_KEEP_IDLE_A)); adap 935 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_KEEP_INTVL_A)); adap 937 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * INITSRTT_G(t4_read_reg(adap, TP_INIT_SRTT_A))); adap 939 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp_tick_us * t4_read_reg(adap, TP_FINWAIT2_TIMER_A)); adap 1082 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 1083 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct devlog_params *dparams = &adap->params.devlog; adap 1106 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->win0_lock); adap 1107 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_memory_rw(adap, adap->params.drv_memwin, dparams->memtype, adap 1110 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->win0_lock); adap 1248 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private - mbox; adap 1249 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c void __iomem *addr = adap->regs + PF_REG(mbox, CIM_PF_MAILBOX_DATA_A); adap 1255 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (is_t4(adap->params.chip)) { adap 1259 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c void __iomem *ctrl = adap->regs + PF_REG(mbox, ctrl_reg); adap 1285 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap; adap 1302 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap = ino->i_private - mbox; adap 1303 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c addr = adap->regs + PF_REG(mbox, CIM_PF_MAILBOX_DATA_A); adap 1330 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private - trcidx; adap 1332 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_get_trace_filter(adap, &tp, trcidx, &enabled); adap 1339 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c dev_err(adap->pdev_dev, "illegal trace pattern skip offset\n"); adap 1343 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = adap->chan_map[tp.port & 3]; adap 1345 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c dev_err(adap->pdev_dev, "tracer %u is assigned " adap 1350 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->port[i]->name, tp.port < 4 ? "Rx" : "Tx"); adap 1419 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap; adap 1424 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap = ino->i_private - trcidx; adap 1447 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->trace_rss) adap 1448 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_TRC_CFG_A, TRC_RSS_ENABLE); adap 1450 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_TRC_CFG_A, TRC_RSS_DISABLE); adap 1468 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!adap->trace_rss) { adap 1469 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_T5_TRC_RSS_CONTROL_A, j); adap 1475 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_TRC_RSS_CONTROL_A, j); adap 1478 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, adap 1482 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, adap 1486 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, adap 1524 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->chan_map[tp.port & 3] >= MAX_NPORTS) adap 1532 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->chan_map[tp.port] >= MAX_NPORTS) adap 1601 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_set_trace_filter(adap, &tp, trcidx, enable); adap 1623 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = file->private_data; adap 1639 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_read_flash(adap, pos - ofst, (len + 3) / 4, adap 1673 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 1674 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c unsigned int chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); adap 1684 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.mps_rplc_size > 128) adap 1718 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl); adap 1719 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c val = t4_read_reg(adap, MPS_CLS_TCAM_DATA1_A); adap 1721 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tcamy |= t4_read_reg(adap, MPS_CLS_TCAM_DATA0_A); adap 1722 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A); adap 1742 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A, ctl); adap 1743 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c val = t4_read_reg(adap, MPS_CLS_TCAM_DATA1_A); adap 1745 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tcamx |= t4_read_reg(adap, MPS_CLS_TCAM_DATA0_A); adap 1746 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c data2 = t4_read_reg(adap, MPS_CLS_TCAM_DATA2_CTL_A); adap 1753 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tcamy = t4_read_reg64(adap, MPS_CLS_TCAM_Y_L(idx)); adap 1754 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tcamx = t4_read_reg64(adap, MPS_CLS_TCAM_X_L(idx)); adap 1757 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c cls_lo = t4_read_reg(adap, MPS_CLS_SRAM_L(idx)); adap 1758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c cls_hi = t4_read_reg(adap, MPS_CLS_SRAM_H(idx)); adap 1789 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_wr_mbox(adap, adap->mbox, &ldst_cmd, adap 1792 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c dev_warn(adap->pdev_dev, "Can't read MPS " adap 1801 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.mps_rplc_size > 128) { adap 1863 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.mps_rplc_size > 128) adap 1872 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.mps_rplc_size > 128) adap 1896 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 1897 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c int max_mac_addr = is_t4(adap->params.chip) ? adap 1949 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 1962 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, adap 1998 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = inode->i_private; adap 2002 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c nentries = t4_chip_rss_size(adap); adap 2007 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_read_rss(adap, (u16 *)p->data); adap 2210 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = file_inode(file)->i_private; adap 2229 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_write_rss_key(adap, key, -1, true); adap 2395 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 2401 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct net_device *dev = adap->port[port]; adap 2522 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static inline void *dcb_info_get_idx(struct adapter *adap, loff_t pos) adap 2524 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c return (pos <= adap->params.nports adap 2531 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 2534 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ? dcb_info_get_idx(adap, *pos) adap 2544 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 2547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c return dcb_info_get_idx(adap, *pos); adap 2609 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset) adap 2613 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for_each_port(adap, pidx) { adap 2614 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct port_info *pi = adap2pinfo(adap, pidx); adap 2626 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static int sge_qinfo_uld_txq_entries(const struct adapter *adap, int uld) adap 2628 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c const struct sge_uld_txq_info *utxq_info = adap->sge.uld_txq_info[uld]; adap 2636 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static int sge_qinfo_uld_rspq_entries(const struct adapter *adap, int uld, adap 2639 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c const struct sge_uld_rxq_info *urxq_info = adap->sge.uld_rxq_info[uld]; adap 2648 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static int sge_qinfo_uld_rxq_entries(const struct adapter *adap, int uld) adap 2650 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c return sge_qinfo_uld_rspq_entries(adap, uld, false); adap 2653 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static int sge_qinfo_uld_ciq_entries(const struct adapter *adap, int uld) adap 2655 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c return sge_qinfo_uld_rspq_entries(adap, uld, true); adap 2665 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 2668 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct sge *s = &adap->sge; adap 2670 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c eth_entries = DIV_ROUND_UP(adap->sge.ethqsets, 4); adap 2676 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c uld_txq_entries[i] = sge_qinfo_uld_txq_entries(adap, i); adap 2680 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c uld_rxq_entries[i] = sge_qinfo_uld_rxq_entries(adap, i); adap 2681 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c uld_ciq_entries[i] = sge_qinfo_uld_ciq_entries(adap, i); adap 2721 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c (ethqset2pinfo(adap, base_qset + i)->dcb.pgid >> adap 2724 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c (ethqset2pinfo(adap, base_qset + i)->dcb.pfcen >> adap 2732 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2796 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2826 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2846 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2872 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2898 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2932 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c S3("u", "Intr delay:", qtimer_val(adap, &rx[i].rspq)); adap 2948 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c n = min(4, adap->params.nports - 4 * r); adap 2973 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c qtimer_val(adap, evtq)); adap 2993 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static int sge_queue_entries(const struct adapter *adap) adap 2998 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!is_uld(adap)) adap 3003 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tot_uld_entries += sge_qinfo_uld_txq_entries(adap, i); adap 3006 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tot_uld_entries += sge_qinfo_uld_rxq_entries(adap, i); adap 3007 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tot_uld_entries += sge_qinfo_uld_ciq_entries(adap, i); adap 3012 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c return DIV_ROUND_UP(adap->sge.ethqsets, 4) + adap 3066 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap; adap 3071 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap = file->private_data - mem; adap 3073 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c (void)t4_fwcache(adap, FW_PARAM_DEV_FWCACHE_FLUSH); adap 3084 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = file->private_data - mem; adap 3099 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->win0_lock); adap 3100 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ret = t4_memory_rw(adap, 0, mem, pos, count, data, T4_MEMORY_READ); adap 3101 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->win0_lock); adap 3125 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3126 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c const struct tid_info *t = &adap->tids; adap 3127 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip); adap 3130 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tid_start = t4_read_reg(adap, LE_DB_ACTIVE_TABLE_START_INDEX_A); adap 3132 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (t4_read_reg(adap, LE_DB_CONFIG_A) & HASHEN_F) { adap 3138 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c sb = t4_read_reg(adap, LE_DB_SERVER_INDEX_A) / 4; adap 3140 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c sb = t4_read_reg(adap, LE_DB_SRVR_START_INDEX_A); adap 3144 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c sb - 1, adap->tids.hash_base, adap 3149 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c } else if (adap->flags & CXGB4_FW_OFLD_CONN) { adap 3153 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->tids.hash_base, adap 3160 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->tids.hash_base, adap 3195 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_read_reg(adap, LE_DB_ACT_CNT_IPV4_A), adap 3196 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_read_reg(adap, LE_DB_ACT_CNT_IPV6_A)); adap 3201 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c static void add_debugfs_mem(struct adapter *adap, const char *name, adap 3204 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c debugfs_create_file_size(name, 0400, adap->debugfs_root, adap 3205 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c (void *)adap + idx, &mem_debugfs_fops, adap 3213 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c const struct adapter *adap = filp->private_data; adap 3215 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c ssize_t size = (adap->sge.egr_sz + 3) / 4 + adap 3216 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->sge.egr_sz / 32 + 2; /* includes ,/\n/\0 */ adap 3223 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->sge.egr_sz, adap->sge.blocked_fl); adap 3235 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = filp->private_data; adap 3237 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz), sizeof(long), GFP_KERNEL); adap 3241 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c err = bitmap_parse_user(ubuf, count, t, adap->sge.egr_sz); adap 3247 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c bitmap_copy(adap->sge.blocked_fl, t, adap->sge.egr_sz); adap 3274 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3279 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c rc = cudbg_fill_meminfo(adap, &meminfo); adap 3322 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < adap->params.arch.nchan; i++) adap 3335 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3339 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.cipher_rqst)); adap 3341 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.digest_rqst)); adap 3343 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.aead_rqst)); adap 3345 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.complete)); adap 3347 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.error)); adap 3349 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.fallback)); adap 3351 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c atomic_read(&adap->chcr_stats.ipsec_cnt)); adap 3363 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < adap->params.arch.nchan; i++) \ adap 3372 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < adap->params.arch.nchan; i++) \ adap 3380 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3383 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3384 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_get_tcp_stats(adap, &v4, &v6, false); adap 3385 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3399 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3402 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3403 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_get_usm_stats(adap, &stats, false); adap 3404 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3413 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3416 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3417 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_get_rdma_stats(adap, &stats, false); adap 3418 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3426 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3429 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3430 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_get_err_stats(adap, &stats, false); adap 3431 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3439 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3443 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3444 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_get_cpl_stats(adap, &stats, false); adap 3445 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3453 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3457 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3458 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_tp_get_err_stats(adap, &stats, false); adap 3459 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3473 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3477 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_lock(&adap->stats_lock); adap 3478 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < adap->params.arch.nchan; i++) adap 3479 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_get_fcoe_stats(adap, i, &stats[i], false); adap 3480 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c spin_unlock(&adap->stats_lock); adap 3493 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct adapter *adap = seq->private; adap 3502 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->params.arch.nchan == NCHAN) adap 3519 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c void add_debugfs_files(struct adapter *adap, adap 3528 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->debugfs_root, adap 3529 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c (void *)adap + files[i].data, adap 3533 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c int t4_setup_debugfs(struct adapter *adap) adap 3605 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_files(adap, adap 3608 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!is_t4(adap->params.chip)) adap 3609 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_files(adap, adap 3613 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); adap 3615 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EDRAM0_BAR_A); adap 3616 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "edc0", MEM_EDC0, EDRAM0_SIZE_G(size)); adap 3619 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EDRAM1_BAR_A); adap 3620 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "edc1", MEM_EDC1, EDRAM1_SIZE_G(size)); adap 3622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (is_t5(adap->params.chip)) { adap 3624 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EXT_MEMORY0_BAR_A); adap 3625 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "mc0", MEM_MC0, adap 3629 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 3630 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "mc1", MEM_MC1, adap 3635 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EXT_MEMORY_BAR_A); adap 3636 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "mc", MEM_MC, adap 3641 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c size = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 3642 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c add_debugfs_mem(adap, "hma", MEM_HMA, adap 3647 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c debugfs_create_file_size("flash", 0400, adap->debugfs_root, adap, adap 3648 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c &flash_debugfs_fops, adap->params.sf_size); adap 3650 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->debugfs_root, &adap->use_bd); adap 3652 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->debugfs_root, &adap->trace_rss); adap 64 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h int t4_setup_debugfs(struct adapter *adap); adap 65 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h void add_debugfs_files(struct adapter *adap, adap 156 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = netdev2adap(dev); adap 158 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c return t4_get_regs_len(adap); adap 239 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c static void collect_sge_port_stats(const struct adapter *adap, adap 244 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c const struct sge_eth_txq *tx = &adap->sge.ethtxq[p->first_qset]; adap 245 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c const struct sge_eth_rxq *rx = &adap->sge.ethrxq[p->first_qset]; adap 259 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c static void collect_adapter_stats(struct adapter *adap, struct adapter_stats *s) adap 265 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c s->db_drop = adap->db_stats.db_drop; adap 266 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c s->db_full = adap->db_stats.db_full; adap 267 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c s->db_empty = adap->db_stats.db_empty; adap 269 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (!is_t4(adap->params.chip)) { adap 272 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c v = t4_read_reg(adap, SGE_STAT_CFG_A); adap 274 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c val2 = t4_read_reg(adap, SGE_STAT_MATCH_A); adap 275 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c val1 = t4_read_reg(adap, SGE_STAT_TOTAL_A); adap 313 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = netdev2adap(dev); adap 316 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c buf_size = t4_get_regs_len(adap); adap 317 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c regs->version = mk_adap_vers(adap); adap 318 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c t4_get_regs(adap, buf, buf_size); adap 337 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = netdev2adap(dev); adap 346 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c return t4_identify_port(adap, adap->pf, netdev2pinfo(dev)->viid, val); adap 877 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 878 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct sge_eth_rxq *q = &adap->sge.ethrxq[pi->first_qset]; adap 892 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 893 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct sge_eth_rxq *q = &adap->sge.ethrxq[pi->first_qset]; adap 904 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 905 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct sge_eth_rxq *q = &adap->sge.ethrxq[pi->first_qset]; adap 916 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (!(adap->flags & CXGB4_SGE_DBQ_TIMER)) adap 921 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c return adap->sge.dbqtimer_tick; adap 930 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 933 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c txq = &adap->sge.ethtxq[pi->first_qset]; adap 935 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (!(adap->flags & CXGB4_SGE_DBQ_TIMER)) adap 939 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c return adap->sge.dbqtimer_val[txq->dbqtimerix]; adap 952 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 953 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct sge *s = &adap->sge; adap 957 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (!(adap->flags & CXGB4_SGE_DBQ_TIMER)) adap 968 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); adap 974 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = t4_read_sge_dbqtimers(adap, ARRAY_SIZE(s->dbqtimer_val), adap 987 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 988 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct sge *s = &adap->sge; adap 993 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (!(adap->flags & CXGB4_SGE_DBQ_TIMER)) adap 1020 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (adap->flags & CXGB4_FULL_INIT_DONE) { adap 1026 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = t4_set_params(adap, adap->mbox, adap->pf, 0, adap 1050 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = pi->adapter; adap 1058 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c for_each_port(adap, port) adap 1062 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c timer[port] = get_dbqtimer(adap->port[port]); adap 1070 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c for_each_port(adap, port) { adap 1071 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = set_dbqtimer(adap->port[port], timer[port]); adap 1099 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c const struct adapter *adap = pi->adapter; adap 1100 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c const struct sge_rspq *rq = &adap->sge.ethrxq[pi->first_qset].rspq; adap 1102 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c c->rx_coalesce_usecs = qtimer_val(adap, rq); adap 1104 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c adap->sge.counter_val[rq->pktcnt_idx] : 0; adap 1113 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c static int eeprom_rd_phys(struct adapter *adap, unsigned int phys_addr, u32 *v) adap 1115 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c int vaddr = t4_eeprom_ptov(phys_addr, adap->pf, EEPROMPFSIZE); adap 1118 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c vaddr = pci_read_vpd(adap->pdev, vaddr, sizeof(u32), v); adap 1122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c static int eeprom_wr_phys(struct adapter *adap, unsigned int phys_addr, u32 v) adap 1124 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c int vaddr = t4_eeprom_ptov(phys_addr, adap->pf, EEPROMPFSIZE); adap 1127 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c vaddr = pci_write_vpd(adap->pdev, vaddr, sizeof(u32), &v); adap 1214 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c struct adapter *adap = netdev2adap(netdev); adap 1220 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c pcie_fw = t4_read_reg(adap, PCIE_FW_A); adap 1225 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (master_vld && (master != adap->pf)) { adap 1226 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c dev_warn(adap->pdev_dev, adap 1232 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = request_firmware(&fw, ef->data, adap->pdev_dev); adap 1241 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 1242 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c mbox = adap->mbox; adap 1244 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c ret = t4_fw_upgrade(adap, mbox, fw->data, fw->size, 1); adap 1247 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c dev_info(adap->pdev_dev, adap 41 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c bool cxgb_fcoe_sof_eof_supported(struct adapter *adap, struct sk_buff *skb) adap 48 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c dev_err(adap->pdev_dev, "Unsupported SOF 0x%x\n", sof); adap 55 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c dev_err(adap->pdev_dev, "Unsupported EOF 0x%x\n", eof); adap 71 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c struct adapter *adap = pi->adapter; adap 74 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c if (is_t4(adap->params.chip)) adap 77 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c if (!(adap->flags & CXGB4_FULL_INIT_DONE)) adap 80 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c dev_info(adap->pdev_dev, "Enabling FCoE offload features\n"); adap 103 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c struct adapter *adap = pi->adapter; adap 109 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c dev_info(adap->pdev_dev, "Disabling FCoE offload features\n"); adap 56 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c static int set_tcb_field(struct adapter *adap, struct filter_entry *f, adap 70 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c QUEUENO_V(adap->sge.fw_evtq.abs_id) | adap 76 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c t4_ofld_send(adap, skb); adap 82 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c static int set_tcb_tflag(struct adapter *adap, struct filter_entry *f, adap 86 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c return set_tcb_field(adap, f, ftid, TCB_T_FLAGS_W, 1ULL << bit_pos, adap 143 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c static int configure_filter_smac(struct adapter *adap, struct filter_entry *f) adap 148 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c err = set_tcb_tflag(adap, f, f->tid, TF_CCTRL_CWR_S, 1, 1); adap 152 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c err = set_tcb_field(adap, f, f->tid, TCB_SMAC_SEL_W, adap 159 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "filter %u smac config failed with error %u\n", adap 164 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c static void set_nat_params(struct adapter *adap, struct filter_entry *f, adap 170 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_SND_UNA_RAW_W, adap 176 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_SND_UNA_RAW_W + 1, adap 182 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_SND_UNA_RAW_W + 2, adap 188 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_SND_UNA_RAW_W + 3, adap 194 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_RX_FRAG3_LEN_RAW_W, adap 204 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_RX_FRAG2_PTR_RAW_W, adap 210 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_RX_FRAG2_PTR_RAW_W + 1, adap 216 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_RX_FRAG2_PTR_RAW_W + 2, adap 222 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_RX_FRAG2_PTR_RAW_W + 3, adap 229 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, adap 238 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_PDU_HDR_LEN_W, WORD_MASK, adap 441 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct adapter *adap = netdev2adap(dev); adap 442 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tid_info *t = &adap->tids; adap 451 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (is_t6(adap->params.chip)) { adap 715 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c void clear_filter(struct adapter *adap, struct filter_entry *f) adap 730 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c t4_free_encap_mac_filt(adap, pi->viid, adap 733 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if ((f->fs.hash || is_t6(adap->params.chip)) && f->fs.type) adap 872 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c bool is_filter_exact_match(struct adapter *adap, adap 875 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tp_params *tp = &adap->params.tp; adap 879 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (!is_hashfilter(adap)) adap 918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if ((adap->params.tp.ingress_config & VNIC_F)) adap 955 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct adapter *adap = netdev2adap(dev); adap 956 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tp_params *tp = &adap->params.tp; adap 979 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if ((adap->params.tp.ingress_config & USE_ENC_IDX_F) && adap 983 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c else if ((adap->params.tp.ingress_config & VNIC_F) && adap 1011 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c unsigned int qid_filterid, struct adapter *adap) adap 1052 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c unsigned int qid_filterid, struct adapter *adap) adap 1610 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c static int configure_filter_tcb(struct adapter *adap, unsigned int tid, adap 1614 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_field(adap, f, tid, TCB_TIMESTAMP_W, adap 1622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_tflag(adap, f, tid, TF_CCTRL_ECE_S, 1, adap 1627 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_tcb_tflag(adap, f, tid, TF_CCTRL_RFR_S, 1, adap 1630 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c configure_filter_smac(adap, f); adap 1635 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, false, false, false); adap 1639 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, false, true, false); adap 1643 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, true, true, false); adap 1646 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, false, true, true); adap 1650 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, false, true, false, true); adap 1654 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, true, false, true); adap 1658 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c set_nat_params(adap, f, tid, true, true, true, true); adap 1670 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c void hash_del_filter_rpl(struct adapter *adap, adap 1674 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tid_info *t = &adap->tids; adap 1679 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_dbg(adap->pdev_dev, "%s: status = %u; tid = %u\n", adap 1684 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "%s:could not find filter entry", adap 1690 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1699 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl) adap 1703 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tid_info *t = &adap->tids; adap 1708 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_dbg(adap->pdev_dev, "%s: tid = %u; atid = %u; status = %u\n", adap 1713 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "%s:could not find filter entry", adap 1731 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (configure_filter_tcb(adap, tid, f)) { adap 1732 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1745 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n", adap 1754 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1763 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl) adap 1770 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c max_fidx = adap->tids.nftids + adap->tids.nsftids; adap 1772 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (adap->tids.ftid_tab) { adap 1774 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c idx = tid - adap->tids.ftid_base; adap 1777 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c f = &adap->tids.ftid_tab[idx]; adap 1797 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1804 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c err = configure_filter_smac(adap, f); adap 1814 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1822 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "filter %u setup failed with error %u\n", adap 1824 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c clear_filter(adap, f); adap 1833 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c void init_hash_filter(struct adapter *adap) adap 1840 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (is_t6(adap->params.chip)) { adap 1841 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (is_offload(adap)) { adap 1842 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (!(t4_read_reg(adap, TP_GLOBAL_CONFIG_A) adap 1844 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "Invalid hash filter + ofld config\n"); adap 1848 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c reg = t4_read_reg(adap, LE_DB_RSP_CODE_0_A); adap 1850 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "Invalid hash filter config\n"); adap 1854 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c reg = t4_read_reg(adap, LE_DB_RSP_CODE_1_A); adap 1856 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "Invalid hash filter config\n"); adap 1862 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c dev_err(adap->pdev_dev, "Hash filter supported only on T6\n"); adap 1866 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c adap->params.hash_filter = 1; adap 42 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl); adap 43 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl); adap 44 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h void hash_del_filter_rpl(struct adapter *adap, adap 46 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h void clear_filter(struct adapter *adap, struct filter_entry *f); adap 53 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h void init_hash_filter(struct adapter *adap); adap 54 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h bool is_filter_exact_match(struct adapter *adap, adap 235 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 236 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge_eth_txq *txq = &adap->sge.ethtxq[pi->first_qset]; adap 256 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, adap 261 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 303 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void t4_os_portmod_changed(struct adapter *adap, int port_id) adap 309 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[port_id]; adap 348 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 354 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c list_for_each_entry(entry, &adap->mac_hlist, list) { adap 358 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c return t4_set_addr_hash(adap, adap->mbox, pi->viid, ucast, adap 365 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 380 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = cxgb4_alloc_mac_filt(adap, pi->viid, free, 1, maclist, adap 393 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c list_add_tail(&new_entry->list, &adap->mac_hlist); adap 403 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 411 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c list_for_each_entry_safe(entry, tmp, &adap->mac_hlist, list) { adap 419 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = cxgb4_free_mac_filt(adap, pi->viid, 1, maclist, false); adap 531 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void dcb_rpl(struct adapter *adap, const struct fw_port_cmd *pcmd) adap 534 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[adap->chan_map[port]]; adap 538 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb4_dcb_handle_fw_update(adap, pcmd); adap 567 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(q->adap->pdev_dev, "unexpected FW4/CPL %#x on FW event queue\n" adap 578 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c txq = q->adap->sge.egr_map[qid - q->adap->sge.egr_start]; adap 584 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_sge_eth_txq_egress_update(q->adap, eq, -1); adap 608 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev = q->adap->port[q->adap->chan_map[port]]; adap 622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dcb_rpl(q->adap, pcmd); adap 626 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_handle_fw_rpl(q->adap, p->data); adap 630 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c do_l2t_write_rpl(q->adap, p); adap 634 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c do_smt_write_rpl(q->adap, p); adap 638 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c filter_rpl(q->adap, p); adap 642 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c hash_filter_rpl(q->adap, p); adap 646 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c hash_del_filter_rpl(q->adap, p); adap 650 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c do_srq_table_rpl(q->adap, p); adap 652 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(q->adap->pdev_dev, adap 674 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = cookie; adap 675 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c u32 v = t4_read_reg(adap, MYPF_REG(PL_PF_INT_CAUSE_A)); adap 678 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->swintr = 1; adap 679 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, MYPF_REG(PL_PF_INT_CAUSE_A), v); adap 681 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_MASTER_PF) adap 682 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_slow_intr_handler(adap); adap 689 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void name_msix_vecs(struct adapter *adap) adap 691 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c int i, j, msi_idx = 2, n = sizeof(adap->msix_info[0].desc); adap 694 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c snprintf(adap->msix_info[0].desc, n, "%s", adap->port[0]->name); adap 697 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c snprintf(adap->msix_info[1].desc, n, "%s-FWeventq", adap 698 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0]->name); adap 701 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, j) { adap 702 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *d = adap->port[j]; adap 706 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c snprintf(adap->msix_info[msi_idx].desc, n, "%s-Rx%d", adap 711 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c int cxgb4_set_msix_aff(struct adapter *adap, unsigned short vec, adap 717 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "alloc_cpumask_var failed\n"); adap 721 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cpumask_set_cpu(cpumask_local_spread(idx, dev_to_node(adap->pdev_dev)), adap 726 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_warn(adap->pdev_dev, adap 739 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int request_msix_queue_irqs(struct adapter *adap) adap 741 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 746 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = request_irq(adap->msix_info[1].vec, t4_sge_intr_msix, 0, adap 747 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info[1].desc, &s->fw_evtq); adap 752 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c minfo = &adap->msix_info[msi_index]; adap 760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb4_set_msix_aff(adap, minfo->vec, adap 769 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c minfo = &adap->msix_info[msi_index]; adap 773 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_irq(adap->msix_info[1].vec, &s->fw_evtq); adap 777 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void free_msix_queue_irqs(struct adapter *adap) adap 779 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 783 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_irq(adap->msix_info[1].vec, &s->fw_evtq); adap 785 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c minfo = &adap->msix_info[msi_index++]; adap 791 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int setup_ppod_edram(struct adapter *adap) adap 805 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); adap 807 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_warn(adap->pdev_dev, adap 816 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); adap 818 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 875 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int setup_rss(struct adapter *adap) adap 879 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 880 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c const struct port_info *pi = adap2pinfo(adap, i); adap 905 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void quiesce_rx(struct adapter *adap) adap 909 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for (i = 0; i < adap->sge.ingr_sz; i++) { adap 910 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge_rspq *q = adap->sge.ingr_map[i]; adap 918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void disable_interrupts(struct adapter *adap) adap 920 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_FULL_INIT_DONE) { adap 921 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_intr_disable(adap); adap 922 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_USING_MSIX) { adap 923 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_msix_queue_irqs(adap); adap 924 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_irq(adap->msix_info[0].vec, adap); adap 926 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_irq(adap->pdev->irq, adap); adap 928 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c quiesce_rx(adap); adap 935 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void enable_rx(struct adapter *adap) adap 939 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for (i = 0; i < adap->sge.ingr_sz; i++) { adap 940 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge_rspq *q = adap->sge.ingr_map[i]; adap 948 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, MYPF_REG(SGE_PF_GTS_A), adap 955 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int setup_fw_sge_queues(struct adapter *adap) adap 957 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 963 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_USING_MSIX) adap 964 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msi_idx = 1; /* vector 0 is for non-queue interrupts */ adap 966 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_rxq(adap, &s->intrq, false, adap->port[0], 0, adap 970 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msi_idx = -((int)s->intrq.abs_id + 1); adap 973 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_rxq(adap, &s->fw_evtq, true, adap->port[0], adap 974 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msi_idx, NULL, fwevtq_handler, NULL, -1); adap 986 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int setup_sge_queues(struct adapter *adap) adap 989 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 993 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_uld(adap)) adap 996 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 997 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[i]; adap 1003 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->msi_idx > 0) adap 1004 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msi_idx++; adap 1005 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_rxq(adap, &q->rspq, false, dev, adap 1006 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msi_idx, &q->fl, adap 1009 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_get_tp_ch_map(adap, adap 1019 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_eth_txq(adap, t, dev, adap 1022 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c !!(adap->flags & CXGB4_SGE_DBQ_TIMER)); adap 1028 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 1035 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_ctrl_txq(adap, &s->ctrlq[i], adap->port[i], adap 1041 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!is_t4(adap->params.chip)) { adap 1042 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_sge_alloc_eth_txq(adap, &s->ptptxq, adap->port[0], adap 1043 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c netdev_get_tx_queue(adap->port[0], 0) adap 1049 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, is_t4(adap->params.chip) ? adap 1052 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c RSSCONTROL_V(netdev2pinfo(adap->port[0])->tx_chan) | adap 1056 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "Can't allocate queues, err=%d\n", -err); adap 1057 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_free_sge_resources(adap); adap 1151 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = q->adap; adap 1160 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c new_idx = closest_thres(&adap->sge, cnt); adap 1167 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, adap 1175 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c us = us == 0 ? 6 : closest_timer(&adap->sge, us); adap 1197 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int setup_debugfs(struct adapter *adap) adap 1199 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (IS_ERR_OR_NULL(adap->debugfs_root)) adap 1203 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_setup_debugfs(adap); adap 1369 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = container_of(t, struct adapter, tids); adap 1371 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock_bh(&adap->tid_release_lock); adap 1372 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c *p = adap->tid_release_head; adap 1374 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tid_release_head = (void **)((uintptr_t)p | chan); adap 1375 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->tid_release_task_busy) { adap 1376 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tid_release_task_busy = true; adap 1377 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c queue_work(adap->workq, &adap->tid_release_task); adap 1379 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock_bh(&adap->tid_release_lock); adap 1388 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1390 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = container_of(work, struct adapter, tid_release_task); adap 1392 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock_bh(&adap->tid_release_lock); adap 1393 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c while (adap->tid_release_head) { adap 1394 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void **p = adap->tid_release_head; adap 1398 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tid_release_head = *p; adap 1400 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock_bh(&adap->tid_release_lock); adap 1406 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c mk_tid_release(skb, chan, p - adap->tids.tid_tab); adap 1407 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_ofld_send(adap, skb); adap 1408 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock_bh(&adap->tid_release_lock); adap 1410 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tid_release_task_busy = false; adap 1411 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock_bh(&adap->tid_release_lock); adap 1422 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = container_of(t, struct adapter, tids); adap 1445 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_ofld_send(adap, skb); adap 1456 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = container_of(t, struct adapter, tids); adap 1502 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 1506 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 1531 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1539 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 1547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c chan = rxq_to_chan(&adap->sge, queue); adap 1551 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_mgmt_tx(adap, skb); adap 1572 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1580 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 1590 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c chan = rxq_to_chan(&adap->sge, queue); adap 1594 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_mgmt_tx(adap, skb); adap 1603 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1607 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 1618 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_mgmt_tx(adap, skb); adap 1743 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = netdev2adap(dev); adap 1746 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c v1 = t4_read_reg(adap, SGE_DBFIFO_STATUS_A); adap 1747 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c v2 = t4_read_reg(adap, SGE_DBFIFO_STATUS2_A); adap 1748 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 1786 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pci_get_drvdata(pdev); adap 1788 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock(&adap->stats_lock); adap 1789 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_tp_get_tcp_stats(adap, v4, v6, false); adap 1790 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock(&adap->stats_lock); adap 1797 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = netdev2adap(dev); adap 1799 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, ULP_RX_ISCSI_TAGMASK_A, tag_mask); adap 1800 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, ULP_RX_ISCSI_PSZ_A, HPZ0_V(pgsz_order[0]) | adap 1808 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = netdev2adap(dev); adap 1810 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c return t4_sge_ctxt_flush(adap, adap->mbox, CTXT_EGRESS); adap 1814 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int read_eq_indices(struct adapter *adap, u16 qid, u16 *pidx, u16 *cidx) adap 1816 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c u32 addr = t4_read_reg(adap, SGE_DBQ_CTXT_BADDR_A) + 24 * qid + 8; adap 1820 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock(&adap->win0_lock); adap 1821 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_memory_rw(adap, 0, MEM_EDC0, addr, adap 1824 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock(&adap->win0_lock); adap 1835 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = netdev2adap(dev); adap 1839 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = read_eq_indices(adap, qid, &hw_pidx, &hw_cidx); adap 1852 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) adap 1857 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL_A), adap 1870 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1874 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 1876 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c offset = ((stag >> 8) * 32) + adap->vres.stag.start; adap 1884 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c size = t4_read_reg(adap, MA_EDRAM0_BAR_A); adap 1886 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c size = t4_read_reg(adap, MA_EDRAM1_BAR_A); adap 1888 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c size = t4_read_reg(adap, MA_EXT_MEMORY0_BAR_A); adap 1891 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A) & HMA_MUX_F) { adap 1892 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c size = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 1912 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c } else if (is_t5(adap->params.chip)) { adap 1913 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c size = t4_read_reg(adap, MA_EXT_MEMORY1_BAR_A); adap 1929 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock(&adap->win0_lock); adap 1930 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_memory_rw(adap, 0, memtype, memaddr, 32, tpte, T4_MEMORY_READ); adap 1931 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock(&adap->win0_lock); adap 1935 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "stag %#x, offset %#x out of range\n", adap 1944 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 1946 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 1947 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c lo = t4_read_reg(adap, SGE_TIMESTAMP_LO_A); adap 1948 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c hi = TSVAL_G(t4_read_reg(adap, SGE_TIMESTAMP_HI_A)); adap 2005 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void drain_db_fifo(struct adapter *adap, int usecs) adap 2010 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c v1 = t4_read_reg(adap, SGE_DBFIFO_STATUS_A); adap 2011 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c v2 = t4_read_reg(adap, SGE_DBFIFO_STATUS2_A); adap 2012 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 2036 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void enable_txq_db(struct adapter *adap, struct sge_txq *q) adap 2044 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL_A), adap 2052 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void disable_dbs(struct adapter *adap) adap 2056 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ethrxq(&adap->sge, i) adap 2057 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c disable_txq_db(&adap->sge.ethtxq[i].q); adap 2058 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 2060 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.uld_txq_info[CXGB4_TX_OFLD]; adap 2063 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ofldtxq(&adap->sge, i) { adap 2070 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) adap 2071 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c disable_txq_db(&adap->sge.ctrlq[i].q); adap 2074 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void enable_dbs(struct adapter *adap) adap 2078 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ethrxq(&adap->sge, i) adap 2079 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_txq_db(adap, &adap->sge.ethtxq[i].q); adap 2080 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 2082 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.uld_txq_info[CXGB4_TX_OFLD]; adap 2085 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ofldtxq(&adap->sge, i) { adap 2088 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_txq_db(adap, &txq->q); adap 2092 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) adap 2093 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_txq_db(adap, &adap->sge.ctrlq[i].q); adap 2096 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void notify_rdma_uld(struct adapter *adap, enum cxgb4_control cmd) adap 2100 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->uld && adap->uld[type].handle) adap 2101 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->uld[type].control(adap->uld[type].handle, cmd); adap 2106 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 2108 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = container_of(work, struct adapter, db_full_task); adap 2110 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c drain_db_fifo(adap, dbfifo_drain_delay); adap 2111 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_dbs(adap); adap 2112 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_rdma_uld(adap, CXGB4_CONTROL_DB_EMPTY); adap 2113 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 2114 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_set_reg_field(adap, SGE_INT_ENABLE3_A, adap 2118 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_set_reg_field(adap, SGE_INT_ENABLE3_A, adap 2122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void sync_txq_pidx(struct adapter *adap, struct sge_txq *q) adap 2128 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = read_eq_indices(adap, (u16)q->cntxt_id, &hw_pidx, &hw_cidx); adap 2140 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) adap 2145 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL_A), adap 2153 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c CH_WARN(adap, "DB drop recovery failed.\n"); adap 2156 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void recover_all_queues(struct adapter *adap) adap 2160 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ethrxq(&adap->sge, i) adap 2161 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sync_txq_pidx(adap, &adap->sge.ethtxq[i].q); adap 2162 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 2164 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.uld_txq_info[CXGB4_TX_OFLD]; adap 2166 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_ofldtxq(&adap->sge, i) { adap 2169 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sync_txq_pidx(adap, &txq->q); adap 2173 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) adap 2174 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sync_txq_pidx(adap, &adap->sge.ctrlq[i].q); adap 2179 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 2181 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = container_of(work, struct adapter, db_drop_task); adap 2183 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 2184 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c drain_db_fifo(adap, dbfifo_drain_delay); adap 2185 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_rdma_uld(adap, CXGB4_CONTROL_DB_DROP); adap 2186 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c drain_db_fifo(adap, dbfifo_drain_delay); adap 2187 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c recover_all_queues(adap); adap 2188 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c drain_db_fifo(adap, dbfifo_drain_delay); adap 2189 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_dbs(adap); adap 2190 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_rdma_uld(adap, CXGB4_CONTROL_DB_EMPTY); adap 2191 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c } else if (is_t5(adap->params.chip)) { adap 2192 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c u32 dropped_db = t4_read_reg(adap, 0x010ac); adap 2199 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_bar2_sge_qregs(adap, qid, T4_BAR2_QTYPE_EGRESS, adap 2202 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "doorbell drop recovery: " adap 2206 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->bar2 + bar2_qoffset + SGE_UDB_KDOORBELL); adap 2209 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_set_reg_field(adap, 0x10b0, 1<<15, 1<<15); adap 2212 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 2213 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_set_reg_field(adap, SGE_DOORBELL_CONTROL_A, DROPPED_DB_F, 0); adap 2216 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void t4_db_full(struct adapter *adap) adap 2218 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 2219 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c disable_dbs(adap); adap 2220 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_rdma_uld(adap, CXGB4_CONTROL_DB_FULL); adap 2221 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_set_reg_field(adap, SGE_INT_ENABLE3_A, adap 2223 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c queue_work(adap->workq, &adap->db_full_task); adap 2227 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void t4_db_dropped(struct adapter *adap) adap 2229 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 2230 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c disable_dbs(adap); adap 2231 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_rdma_uld(adap, CXGB4_CONTROL_DB_FULL); adap 2233 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c queue_work(adap->workq, &adap->db_drop_task); adap 2244 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void detach_ulds(struct adapter *adap) adap 2249 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c list_del(&adap->list_node); adap 2252 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->uld && adap->uld[i].handle) adap 2253 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->uld[i].state_change(adap->uld[i].handle, adap 2263 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void notify_ulds(struct adapter *adap, enum cxgb4_state new_state) adap 2269 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->uld && adap->uld[i].handle) adap 2270 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->uld[i].state_change(adap->uld[i].handle, adap 2283 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 2289 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c list_for_each_entry(adap, &adapter_list, list_node) { adap 2292 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb4_clip_get(adap->port[0], adap 2296 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb4_clip_release(adap->port[0], adap 2330 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void update_clip(const struct adapter *adap) adap 2339 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev = adap->port[i]; adap 2362 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int cxgb_up(struct adapter *adap) adap 2367 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = setup_sge_queues(adap); adap 2370 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = setup_rss(adap); adap 2374 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_USING_MSIX) { adap 2375 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c name_msix_vecs(adap); adap 2376 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = request_irq(adap->msix_info[0].vec, t4_nondata_intr, 0, adap 2377 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info[0].desc, adap); adap 2380 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = request_msix_queue_irqs(adap); adap 2382 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_irq(adap->msix_info[0].vec, adap); adap 2386 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = request_irq(adap->pdev->irq, t4_intr_handler(adap), adap 2387 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c (adap->flags & CXGB4_USING_MSI) ? 0 adap 2389 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0]->name, adap); adap 2394 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c enable_rx(adap); adap 2395 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_sge_start(adap); adap 2396 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_intr_enable(adap); adap 2397 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_FULL_INIT_DONE; adap 2400 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_ulds(adap, CXGB4_STATE_UP); adap 2402 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c update_clip(adap); adap 2407 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "request_irq failed, err %d\n", err); adap 2409 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_free_sge_resources(adap); adap 2482 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 2486 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 2489 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c stid -= adap->tids.sftid_base; adap 2490 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c stid += adap->tids.nftids; adap 2494 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c f = &adap->tids.ftid_tab[stid]; adap 2503 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c clear_filter(adap, f); adap 2515 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.tp.vlan_pri_map & PORT_F) { adap 2521 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.tp.vlan_pri_map & PROTOCOL_F) { adap 2535 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c f->tid = stid + adap->tids.ftid_base; adap 2536 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = set_filter_wr(adap, stid); adap 2538 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c clear_filter(adap, f); adap 2550 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 2552 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = netdev2adap(dev); adap 2555 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c stid -= adap->tids.sftid_base; adap 2556 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c stid += adap->tids.nftids; adap 2558 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c f = &adap->tids.ftid_tab[stid]; adap 2562 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c return delete_filter(adap, stid); adap 2760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void cxgb4_mgmt_fill_vf_station_mac_addr(struct adapter *adap) adap 2768 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.pci.vpd_cap_addr = pci_find_capability(adap->pdev, adap 2770 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_get_raw_vpd_params(adap, &adap->params.vpd); adap 2774 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c na = adap->params.vpd.na; adap 2790 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for (vf = 0, nvfs = pci_sriov_get_totalvfs(adap->pdev); adap 2792 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c macaddr[5] = adap->pf * nvfs + vf; adap 2793 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ether_addr_copy(adap->vfinfo[vf].vf_mac_addr, macaddr); adap 2800 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 2813 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_vf_mac_acl(adap, vf + 1, 1, mac); adap 2815 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ether_addr_copy(adap->vfinfo[vf].vf_mac_addr, mac); adap 2823 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 2826 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (vf >= adap->num_vfs) adap 2828 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c vfinfo = &adap->vfinfo[vf]; adap 2855 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 2862 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (vf >= adap->num_vfs) adap 2866 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 2878 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_params(adap, adap->mbox, adap->pf, vf + 1, 1, adap 2881 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 2883 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret, adap->pf, vf); adap 2886 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, adap 2888 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->pf, vf); adap 2889 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo[vf].tx_rate = 0; adap 2895 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 2901 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "Link down for VF %d\n", vf); adap 2906 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 2918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_sched_params(adap, SCHED_CLASS_TYPE_PACKET, adap 2926 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "Err %d for Traffic Class config\n", adap 2930 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, adap 2938 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_params(adap, adap->mbox, adap->pf, vf + 1, 1, &fw_pfvf, adap 2941 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 2943 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret, adap->pf, vf, class_id); adap 2946 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "PF %d VF %d is bound to Class %d\n", adap 2947 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->pf, vf, class_id); adap 2948 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo[vf].tx_rate = max_tx_rate; adap 2956 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 2959 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (vf >= adap->num_vfs || vlan > 4095 || qos > 7) adap 2965 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_vlan_acl(adap, adap->mbox, vf + 1, vlan); adap 2967 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo[vf].vlan = vlan; adap 2971 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "Err %d %s VLAN ACL for PF/VF %d/%d\n", adap 2972 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret, (vlan ? "setting" : "clearing"), adap->pf, vf); adap 2980 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 2984 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (vf >= adap->num_vfs) adap 3006 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_set_params(adap, adap->mbox, adap->pf, vf + 1, 1, adap 3009 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3011 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret, adap->pf, vf); adap 3015 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo[vf].link_state = link; adap 3042 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 3044 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_USING_MSIX) { adap 3046 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge_eth_rxq *rx = &adap->sge.ethrxq[pi->first_qset]; adap 3051 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_intr_handler(adap)(0, adap); adap 3058 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pi->adapter; adap 3071 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!(adap->flags & CXGB4_FULL_INIT_DONE)) { adap 3072 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3083 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3096 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3131 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3170 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = netdev2adap(dev); adap 3172 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!(adap->flags & CXGB4_FULL_INIT_DONE)) { adap 3173 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3444 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap; adap 3446 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap = container_of(work, struct adapter, fatal_err_notify_task); adap 3447 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_ulds(adap, CXGB4_STATE_FATAL_ERROR); adap 3450 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void t4_fatal_err(struct adapter *adap) adap 3454 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (pci_channel_offline(adap->pdev)) adap 3460 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_shutdown_adapter(adap); adap 3461 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, port) { adap 3462 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[port]; adap 3473 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_alert(adap->pdev_dev, "encountered fatal error, adapter stopped\n"); adap 3474 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c queue_work(adap->workq, &adap->fatal_err_notify_task); adap 3477 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void setup_memwin(struct adapter *adap) adap 3479 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c u32 nic_win_base = t4_get_util_window(adap); adap 3481 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_setup_memwin(adap, nic_win_base, MEMWIN_NIC); adap 3484 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void setup_memwin_rdma(struct adapter *adap) adap 3486 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->vres.ocq.size) { adap 3490 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c start = t4_read_pcie_cfg4(adap, PCI_BASE_ADDRESS_2); adap 3492 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c start += OCQ_WIN_OFFSET(adap->pdev, &adap->vres); adap 3493 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sz_kb = roundup_pow_of_two(adap->vres.ocq.size) >> 10; adap 3494 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, adap 3497 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, adap 3499 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ocq.start); adap 3500 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_read_reg(adap, adap 3705 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int adap_init1(struct adapter *adap, struct fw_caps_config_cmd *c) adap 3713 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_get_pfres(adap); adap 3715 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 3725 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_wr_mbox(adap, adap->mbox, c, sizeof(*c), c); adap 3731 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_wr_mbox(adap, adap->mbox, c, sizeof(*c), NULL); adap 3735 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_config_glbl_rss(adap, adap->pf, adap 3742 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_cfg_pfvf(adap, adap->mbox, adap->pf, 0, adap->sge.egr_sz, 64, adap 3748 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_sge_init(adap); adap 3751 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_SHIFT_CNT_A, 0x64f8849); adap 3752 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, ULP_RX_TDDP_PSZ_A, HPZ0_V(PAGE_SHIFT - 12)); adap 3753 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_PIO_ADDR_A, TP_INGRESS_CONFIG_A); adap 3754 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c v = t4_read_reg(adap, TP_PIO_DATA_A); adap 3755 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_PIO_DATA_A, v & ~CSUM_HAS_PSEUDO_HDR_F); adap 3758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.tp.tx_modq_map = 0xE4; adap 3759 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_TX_MOD_QUEUE_REQ_MAP_A, adap 3760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c TX_MOD_QUEUE_REQ_MAP_V(adap->params.tp.tx_modq_map)); adap 3764 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_indirect(adap, TP_PIO_ADDR_A, TP_PIO_DATA_A, adap 3766 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_indirect(adap, TP_PIO_ADDR_A, TP_PIO_DATA_A, adap 3768 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_indirect(adap, TP_PIO_ADDR_A, TP_PIO_DATA_A, adap 3772 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 3773 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_TX_MOD_QUEUE_WEIGHT0_A, adap 3778 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_write_reg(adap, TP_TX_MOD_CHANNEL_WEIGHT_A, adap 3786 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c return t4_early_init(adap, adap->pf); adap 3910 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int adap_init0_phy(struct adapter *adap) adap 3918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c phy_info = find_phy_info(adap->pdev->device); adap 3920 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_warn(adap->pdev_dev, adap 3931 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->pdev_dev); adap 3939 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "unable to find PHY Firmware image " adap 3945 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_phy_fw_ver(adap, &cur_phy_fw_ver); adap 3946 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_warn(adap->pdev_dev, "continuing with, on-adapter " adap 3956 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_load_phy_fw(adap, MEMWIN_NIC, &adap->win0_lock, adap 3960 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "PHY Firmware transfer error %d\n", adap 3968 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "Successfully transferred PHY " adap 4288 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int adap_init0(struct adapter *adap) adap 4300 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_init_devlog_params(adap); adap 4305 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_fw_hello(adap, adap->mbox, adap->mbox, adap 4308 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "could not connect to FW, error %d\n", adap 4312 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (ret == adap->mbox) adap 4313 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_MASTER_PF; adap 4323 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_get_version_info(adap); adap 4324 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_check_fw_version(adap); adap 4328 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if ((adap->flags & CXGB4_MASTER_PF) && state != DEV_STATE_INIT) { adap 4338 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c fw_info = find_fw_info(CHELSIO_CHIP_VERSION(adap->params.chip)); adap 4340 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 4342 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c CHELSIO_CHIP_VERSION(adap->params.chip)); adap 4357 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->pdev_dev); adap 4359 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 4368 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_prep_fw(adap, fw_info, fw_data, fw_size, card_fw, adap 4383 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = adap_config_hma(adap); adap 4385 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 4388 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "Coming up as %s: "\ adap 4390 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags & CXGB4_MASTER_PF ? "MASTER" : "SLAVE"); adap 4392 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "Coming up as MASTER: "\ adap 4400 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, adap 4407 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "firmware doesn't support " adap 4416 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = adap_init0_config(adap, reset); adap 4418 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "no Configuration File " adap 4423 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "could not initialize " adap 4433 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_get_pfres(adap); adap 4435 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, adap 4450 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_get_vpd_params(adap, &adap->params.vpd); adap 4461 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, &v, &port_vec); adap 4465 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.nports = hweight32(port_vec); adap 4466 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.portvec = port_vec; adap 4472 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_sge_init(adap); adap 4481 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4485 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.dbqtimer_tick = val[0]; adap 4486 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_read_sge_dbqtimers(adap, adap 4487 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ARRAY_SIZE(adap->sge.dbqtimer_val), adap 4488 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.dbqtimer_val); adap 4492 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_SGE_DBQ_TIMER; adap 4494 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_bypass_device(adap->pdev->device)) adap 4495 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.bypass = 1; adap 4516 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 6, params, val); adap 4519 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.egr_start = val[0]; adap 4520 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->l2t_start = val[1]; adap 4521 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->l2t_end = val[2]; adap 4522 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.ftid_base = val[3]; adap 4523 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.nftids = val[4] - val[3] + 1; adap 4524 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.ingr_start = val[5]; adap 4526 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { adap 4532 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, adap 4535 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->rawf_start = val[0]; adap 4536 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->rawf_cnt = val[1] - val[0] + 1; adap 4548 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, params, val); adap 4551 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.egr_sz = val[0] - adap->sge.egr_start + 1; adap 4552 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.ingr_sz = val[1] - adap->sge.ingr_start + 1; adap 4554 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.egr_map = kcalloc(adap->sge.egr_sz, adap 4555 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sizeof(*adap->sge.egr_map), GFP_KERNEL); adap 4556 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->sge.egr_map) { adap 4561 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.ingr_map = kcalloc(adap->sge.ingr_sz, adap 4562 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c sizeof(*adap->sge.ingr_map), GFP_KERNEL); adap 4563 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->sge.ingr_map) { adap 4571 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.starving_fl = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz), adap 4573 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->sge.starving_fl) { adap 4578 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.txq_maperr = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz), adap 4580 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->sge.txq_maperr) { adap 4586 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.blocked_fl = kcalloc(BITS_TO_LONGS(adap->sge.egr_sz), adap 4588 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->sge.blocked_fl) { adap 4596 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, params, val); adap 4599 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->clipt_start = val[0]; adap 4600 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->clipt_end = val[1]; adap 4606 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.nsched_cls = is_t4(adap->params.chip) ? 15 : 16; adap 4611 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, params, val); adap 4616 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_FW_OFLD_CONN; adap 4617 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.aftid_base = val[0]; adap 4618 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.aftid_end = val[1]; adap 4628 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c (void)t4_set_params(adap, adap->mbox, adap->pf, 0, 1, params, val); adap 4636 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 4637 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.ulptx_memwrite_dsgl = false; adap 4640 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4642 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.ulptx_memwrite_dsgl = (ret == 0 && val[0] != 0); adap 4647 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4649 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.fr_nsmr_tpte_wr_support = (ret == 0 && val[0] != 0); adap 4652 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t4(adap->params.chip)) { adap 4653 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.filter2_wr_support = 0; adap 4656 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4658 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.filter2_wr_support = (ret == 0 && val[0] != 0); adap 4666 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4668 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.viid_smt_extn_support = (ret == 0 && val[0] != 0); adap 4678 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_wr_mbox(adap, adap->mbox, &caps_cmd, sizeof(caps_cmd), adap 4688 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.offload = 1; adap 4699 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 6, adap 4703 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.ntids = val[0]; adap 4704 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.natids = min(adap->tids.ntids / 2, MAX_ATIDS); adap 4705 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.stid_base = val[1]; adap 4706 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.nstids = val[2] - val[1] + 1; adap 4716 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_FW_OFLD_CONN && !is_bypass(adap)) { adap 4717 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.sftid_base = adap->tids.ftid_base + adap 4718 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c DIV_ROUND_UP(adap->tids.nftids, 3); adap 4719 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.nsftids = adap->tids.nftids - adap 4720 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c DIV_ROUND_UP(adap->tids.nftids, 3); adap 4721 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.nftids = adap->tids.sftid_base - adap 4722 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->tids.ftid_base; adap 4724 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ddp.start = val[3]; adap 4725 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ddp.size = val[4] - val[3] + 1; adap 4726 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.ofldq_wr_cred = val[5]; adap 4729 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c init_hash_filter(adap); adap 4731 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_ofld_uld += 1; adap 4741 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 6, adap 4745 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.stag.start = val[0]; adap 4746 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.stag.size = val[1] - val[0] + 1; adap 4747 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.rq.start = val[2]; adap 4748 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.rq.size = val[3] - val[2] + 1; adap 4749 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.pbl.start = val[4]; adap 4750 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.pbl.size = val[5] - val[4] + 1; adap 4754 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, adap 4757 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.srq.start = val[0]; adap 4758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.srq.size = val[1] - val[0] + 1; adap 4760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->vres.srq.size) { adap 4761 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->srq = t4_init_srq(adap->vres.srq.size); adap 4762 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->srq) adap 4763 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_warn(&adap->pdev->dev, "could not allocate SRQ, continuing\n"); adap 4772 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 6, params, adap 4776 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.qp.start = val[0]; adap 4777 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.qp.size = val[1] - val[0] + 1; adap 4778 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.cq.start = val[2]; adap 4779 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.cq.size = val[3] - val[2] + 1; adap 4780 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ocq.start = val[4]; adap 4781 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ocq.size = val[5] - val[4] + 1; adap 4785 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, params, adap 4788 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ordird_qp = 8; adap 4789 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ird_adapter = 32 * adap->tids.ntids; adap 4792 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ordird_qp = val[0]; adap 4793 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ird_adapter = val[1]; adap 4795 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, adap 4797 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ordird_qp, adap 4798 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.max_ird_adapter); adap 4802 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, params, adap 4804 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.write_w_imm_support = (ret == 0 && val[0] != 0); adap 4808 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, params, adap 4810 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.write_cmpl_support = (ret == 0 && val[0] != 0); adap 4811 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_ofld_uld += 2; adap 4816 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, adap 4820 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.iscsi.start = val[0]; adap 4821 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.iscsi.size = val[1] - val[0] + 1; adap 4822 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_t6(adap->params.chip)) { adap 4825 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, adap 4828 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ppod_edram.start = val[0]; adap 4829 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ppod_edram.size = adap 4832 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, adap 4835 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ppod_edram.size); adap 4839 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_ofld_uld += 2; adap 4845 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4851 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.ncrypto_fc = val[0]; adap 4853 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_ofld_uld += 1; adap 4859 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 4863 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.key.start = val[0]; adap 4864 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vres.key.size = val[1] - val[0] + 1; adap 4865 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_uld += 1; adap 4867 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.crypto = ntohs(caps_cmd.cryptocaps); adap 4877 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_read_mtu_tbl(adap, adap->params.mtus, NULL); adap 4899 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.mtus[i] == 1492) { adap 4900 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.mtus[i] = 1488; adap 4904 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_load_mtus(adap, adap->params.mtus, adap->params.a_wnd, adap 4905 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.b_wnd); adap 4907 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_init_sge_params(adap); adap 4908 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_FW_OK; adap 4909 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_init_tp_params(adap, true); adap 4918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap_free_hma_mem(adap); adap 4919 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->sge.egr_map); adap 4920 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->sge.ingr_map); adap 4921 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->sge.starving_fl); adap 4922 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->sge.txq_maperr); adap 4924 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->sge.blocked_fl); adap 4927 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_fw_bye(adap, adap->mbox); adap 4937 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pci_get_drvdata(pdev); adap 4939 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap) adap 4943 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags &= ~CXGB4_FW_OK; adap 4944 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c notify_ulds(adap, CXGB4_STATE_START_RECOVERY); adap 4945 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock(&adap->stats_lock); adap 4946 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 4947 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[i]; adap 4953 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_unlock(&adap->stats_lock); adap 4954 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c disable_interrupts(adap); adap 4955 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 4956 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb_down(adap); adap 4958 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if ((adap->flags & CXGB4_DEV_ENABLED)) { adap 4960 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags &= ~CXGB4_DEV_ENABLED; adap 4970 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pci_get_drvdata(pdev); adap 4972 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap) { adap 4978 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!(adap->flags & CXGB4_DEV_ENABLED)) { adap 4984 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_DEV_ENABLED; adap 4991 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (t4_wait_dev_ready(adap->regs) < 0) adap 4993 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (t4_fw_hello(adap, adap->mbox, adap->pf, MASTER_MUST, NULL) < 0) adap 4995 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->flags |= CXGB4_FW_OK; adap 4996 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap_init1(adap, &c)) adap 4999 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5000 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct port_info *pi = adap2pinfo(adap, i); adap 5003 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ret = t4_alloc_vi(adap, adap->mbox, pi->tx_chan, adap->pf, 0, 1, adap 5012 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.viid_smt_extn_support) { adap 5022 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c t4_load_mtus(adap, adap->params.mtus, adap->params.a_wnd, adap 5023 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.b_wnd); adap 5024 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c setup_memwin(adap); adap 5025 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (cxgb_up(adap)) adap 5033 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pci_get_drvdata(pdev); adap 5035 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap) adap 5039 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5040 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct net_device *dev = adap->port[i]; adap 5077 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int cfg_queues(struct adapter *adap) adap 5079 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 5089 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_kdump_kernel() || (is_uld(adap) && t4_uld_mem_alloc(adap))) { adap 5090 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.offload = 0; adap 5091 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.crypto = 0; adap 5106 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c niqflint = adap->params.pfres.niqflint - 1; adap 5107 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!(adap->flags & CXGB4_USING_MSIX)) adap 5109 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c neq = adap->params.pfres.neq / 2; adap 5115 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (avail_eth_qsets < adap->params.nports) { adap 5116 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "avail_eth_qsets=%d < nports=%d\n", adap 5117 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c avail_eth_qsets, adap->params.nports); adap 5122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) adap 5123 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c n10g += is_x_10g_port(&adap2pinfo(adap, i)->link_cfg); adap 5130 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.nports * 8 > avail_eth_qsets) { adap 5131 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_err(adap->pdev_dev, "DCB avail_eth_qsets=%d < %d!\n", adap 5132 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c avail_eth_qsets, adap->params.nports * 8); adap 5136 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5137 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct port_info *pi = adap2pinfo(adap, i); adap 5149 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c q10g = (avail_eth_qsets - (adap->params.nports - n10g)) / n10g; adap 5156 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5157 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct port_info *pi = adap2pinfo(adap, i); adap 5168 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_uld(adap)) { adap 5176 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c s->ofldqsets = roundup(i, adap->params.nports); adap 5178 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c s->ofldqsets = adap->params.nports; adap 5185 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c init_rspq(adap, &r->rspq, 5, 10, 1024, 64); adap 5195 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!is_t4(adap->params.chip)) adap 5198 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c init_rspq(adap, &s->fw_evtq, 0, 1, 1024, 64); adap 5199 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c init_rspq(adap, &s->intrq, 0, 1, 512, 64); adap 5208 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void reduce_ethqs(struct adapter *adap, int n) adap 5213 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c while (n < adap->sge.ethqsets) adap 5214 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5215 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c pi = adap2pinfo(adap, i); adap 5218 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->sge.ethqsets--; adap 5219 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->sge.ethqsets <= n) adap 5225 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5226 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c pi = adap2pinfo(adap, i); adap 5232 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int get_msix_info(struct adapter *adap) adap 5237 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) adap 5238 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c max_ingq += MAX_OFLD_QSETS * adap->num_ofld_uld; adap 5239 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_pci_uld(adap)) adap 5240 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c max_ingq += MAX_OFLD_QSETS * adap->num_uld; adap 5249 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_bmap_ulds.msix_bmap = kcalloc(BITS_TO_LONGS(max_ingq), adap 5251 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->msix_bmap_ulds.msix_bmap) { adap 5255 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c spin_lock_init(&adap->msix_bmap_ulds.lock); adap 5256 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info_ulds = msix_info; adap 5261 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void free_msix_info(struct adapter *adap) adap 5263 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!(adap->num_uld && adap->num_ofld_uld)) adap 5266 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->msix_info_ulds); adap 5267 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->msix_bmap_ulds.msix_bmap); adap 5273 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int enable_msix(struct adapter *adap) adap 5277 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct sge *s = &adap->sge; adap 5278 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c unsigned int nchan = adap->params.nports; adap 5282 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_pci_uld(adap)) adap 5283 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c max_ingq += (MAX_OFLD_QSETS * adap->num_uld); adap 5284 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) adap 5285 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c max_ingq += (MAX_OFLD_QSETS * adap->num_ofld_uld); adap 5292 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (get_msix_info(adap)) { adap 5293 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.offload = 0; adap 5294 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.crypto = 0; adap 5301 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_offload(adap)) { adap 5302 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c want += adap->num_ofld_uld * s->ofldqsets; adap 5303 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ofld_need = adap->num_ofld_uld * nchan; adap 5305 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_pci_uld(adap)) { adap 5306 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c want += adap->num_uld * s->ofldqsets; adap 5307 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c uld_need = adap->num_uld * nchan; adap 5313 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c need = 8 * adap->params.nports + EXTRA_VECS + ofld_need + uld_need; adap 5315 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c need = adap->params.nports + EXTRA_VECS + ofld_need + uld_need; adap 5317 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c allocated = pci_enable_msix_range(adap->pdev, entries, need, want); adap 5319 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "not enough MSI-X vectors left," adap 5333 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c reduce_ethqs(adap, i); adap 5335 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_uld(adap)) { adap 5343 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info[i].vec = entries[i].vector; adap 5344 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (is_uld(adap)) { adap 5346 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info_ulds[j].vec = entries[i].vector; adap 5347 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_info_ulds[j].idx = i; adap 5349 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->msix_bmap_ulds.mapsize = j; adap 5351 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev_info(adap->pdev_dev, "%d MSI-X vectors allocated, " adap 5361 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int init_rss(struct adapter *adap) adap 5366 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_init_rss_mode(adap, adap->mbox); adap 5370 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c for_each_port(adap, i) { adap 5371 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct port_info *pi = adap2pinfo(adap, i); adap 5399 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c const struct adapter *adap = pi->adapter; adap 5424 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c dev->name, adap->params.vpd.id, adap->name, buf); adap 5473 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static int t4_get_chip_type(struct adapter *adap, int ver) adap 5475 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c u32 pl_rev = REV_G(t4_read_reg(adap, PL_REV_A)); adap 5508 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c struct adapter *adap = pci_get_drvdata(pdev); adap 5513 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c pcie_fw = readl(adap->regs + PCIE_FW_A); adap 5543 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c unregister_netdev(adap->port[0]); adap 5544 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_netdev(adap->port[0]); adap 5545 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0] = NULL; adap 5548 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_vfs = 0; adap 5549 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->vfinfo); adap 5550 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo = NULL; adap 5588 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c FW_PFVF_CMD_PFN_V(adap->pf) | adap 5591 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = t4_wr_mbox(adap, adap->mbox, &port_cmd, sizeof(port_cmd), adap 5598 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c snprintf(name, IFNAMSIZ, "mgmtpf%d,%d", adap->adap_idx, adap 5599 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->pf); adap 5606 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c pi->adapter = adap; adap 5611 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0] = netdev; adap 5614 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c err = register_netdev(adap->port[0]); adap 5617 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_netdev(adap->port[0]); adap 5618 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0] = NULL; adap 5622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo = kcalloc(pci_sriov_get_totalvfs(pdev), adap 5624 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (!adap->vfinfo) { adap 5625 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c unregister_netdev(adap->port[0]); adap 5626 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_netdev(adap->port[0]); adap 5627 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0] = NULL; adap 5630 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c cxgb4_mgmt_fill_vf_station_mac_addr(adap); adap 5637 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c unregister_netdev(adap->port[0]); adap 5638 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c free_netdev(adap->port[0]); adap 5639 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->port[0] = NULL; adap 5640 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c kfree(adap->vfinfo); adap 5641 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->vfinfo = NULL; adap 5646 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->num_vfs = num_vfs; adap 6 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c static int cxgb4_mps_ref_dec_by_mac(struct adapter *adap, adap 13 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_lock_bh(&adap->mps_ref_lock); adap 14 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c list_for_each_entry_safe(mps_entry, tmp, &adap->mps_ref, list) { adap 18 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock_bh(&adap->mps_ref_lock); adap 27 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock_bh(&adap->mps_ref_lock); adap 31 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c static int cxgb4_mps_ref_dec(struct adapter *adap, u16 idx) adap 36 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_lock(&adap->mps_ref_lock); adap 37 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c list_for_each_entry_safe(mps_entry, tmp, &adap->mps_ref, list) { adap 40 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock(&adap->mps_ref_lock); adap 49 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock(&adap->mps_ref_lock); adap 53 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c static int cxgb4_mps_ref_inc(struct adapter *adap, const u8 *mac_addr, adap 60 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_lock_bh(&adap->mps_ref_lock); adap 61 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c list_for_each_entry(mps_entry, &adap->mps_ref, list) { adap 76 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c list_add_tail(&mps_entry->list, &adap->mps_ref); adap 78 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock_bh(&adap->mps_ref_lock); adap 82 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_free_mac_filt(struct adapter *adap, unsigned int viid, adap 88 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (!cxgb4_mps_ref_dec_by_mac(adap, addr[i], NULL)) { adap 89 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_free_mac_filt(adap, adap->mbox, viid, adap 100 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_alloc_mac_filt(struct adapter *adap, unsigned int viid, adap 106 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_alloc_mac_filt(adap, adap->mbox, viid, free, adap 113 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (cxgb4_mps_ref_inc(adap, addr[i], idx[i], NULL)) { adap 122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c cxgb4_free_mac_filt(adap, viid, naddr, addr, sleep_ok); adap 144 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_free_raw_mac_filt(struct adapter *adap, adap 155 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (!cxgb4_mps_ref_dec(adap, idx)) adap 156 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_free_raw_mac_filt(adap, viid, addr, adap 163 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_alloc_raw_mac_filt(struct adapter *adap, adap 174 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_alloc_raw_mac_filt(adap, viid, addr, adap 180 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (cxgb4_mps_ref_inc(adap, addr, ret, mask)) { adap 182 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c t4_free_raw_mac_filt(adap, viid, addr, adap 190 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 195 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (!cxgb4_mps_ref_dec(adap, idx)) adap 196 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_free_encap_mac_filt(adap, viid, idx, sleep_ok); adap 201 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 208 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c ret = t4_alloc_encap_mac_filt(adap, viid, addr, mask, vni, vni_mask, adap 213 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (cxgb4_mps_ref_inc(adap, addr, ret, mask)) { adap 215 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c t4_free_encap_mac_filt(adap, viid, ret, sleep_ok); adap 220 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c int cxgb4_init_mps_ref_entries(struct adapter *adap) adap 222 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_lock_init(&adap->mps_ref_lock); adap 223 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c INIT_LIST_HEAD(&adap->mps_ref); adap 228 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c void cxgb4_free_mps_ref_entries(struct adapter *adap) adap 232 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c if (!list_empty(&adap->mps_ref)) adap 235 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_lock(&adap->mps_ref_lock); adap 236 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c list_for_each_entry_safe(mps_entry, tmp, &adap->mps_ref, list) { adap 240 drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c spin_unlock(&adap->mps_ref_lock); adap 65 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h void cxgb4_ptp_init(struct adapter *adap); adap 66 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h void cxgb4_ptp_stop(struct adapter *adap); adap 70 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h int cxgb4_ptp_redirect_rx_packet(struct adapter *adap, struct port_info *pi); adap 71 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h int cxgb4_ptp_txtype(struct adapter *adap, u8 port_id); adap 72 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.h void cxgb4_ptp_read_hwstamp(struct adapter *adap, struct port_info *pi); adap 76 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c static struct ch_tc_flower_entry *ch_flower_lookup(struct adapter *adap, adap 79 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c return rhashtable_lookup_fast(&adap->flower_tbl, &flower_cookie, adap 80 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->flower_ht_params); adap 564 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = netdev2adap(dev); adap 570 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c for_each_port(adap, i) { adap 571 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c n_dev = adap->port[i]; adap 639 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = netdev2adap(dev); adap 663 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c fs->hash = is_filter_exact_match(adap, fs); adap 697 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ret = rhashtable_insert_fast(&adap->flower_tbl, &ch_flower->node, adap 698 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->flower_ht_params); adap 715 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = netdev2adap(dev); adap 719 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ch_flower = ch_flower_lookup(adap, cls->cookie); adap 727 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ret = rhashtable_remove_fast(&adap->flower_tbl, &ch_flower->node, adap 728 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->flower_ht_params); adap 741 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = container_of(work, struct adapter, adap 750 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c rhashtable_walk_enter(&adap->flower_tbl, &iter); adap 756 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ret = cxgb4_get_filter_counters(adap->port[0], adap 776 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c mod_timer(&adap->flower_stats_timer, jiffies + STATS_CHECK_PERIOD); adap 781 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = from_timer(adap, t, flower_stats_timer); adap 783 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c schedule_work(&adap->flower_stats_work); adap 789 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c struct adapter *adap = netdev2adap(dev); adap 796 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ch_flower = ch_flower_lookup(adap, cls->cookie); adap 838 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c int cxgb4_init_tc_flower(struct adapter *adap) adap 842 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c if (adap->tc_flower_initialized) adap 845 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->flower_ht_params = cxgb4_tc_flower_ht_params; adap 846 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c ret = rhashtable_init(&adap->flower_tbl, &adap->flower_ht_params); adap 850 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c INIT_WORK(&adap->flower_stats_work, ch_flower_stats_handler); adap 851 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c timer_setup(&adap->flower_stats_timer, ch_flower_stats_cb, 0); adap 852 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c mod_timer(&adap->flower_stats_timer, jiffies + STATS_CHECK_PERIOD); adap 853 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->tc_flower_initialized = true; adap 857 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c void cxgb4_cleanup_tc_flower(struct adapter *adap) adap 859 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c if (!adap->tc_flower_initialized) adap 862 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c if (adap->flower_stats_timer.function) adap 863 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c del_timer_sync(&adap->flower_stats_timer); adap 864 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c cancel_work_sync(&adap->flower_stats_work); adap 865 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c rhashtable_destroy(&adap->flower_tbl); adap 866 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c adap->tc_flower_initialized = false; adap 118 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h int cxgb4_init_tc_flower(struct adapter *adap); adap 119 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h void cxgb4_cleanup_tc_flower(struct adapter *adap); adap 43 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c static int fill_match_fields(struct adapter *adap, adap 89 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c static int fill_action_fields(struct adapter *adap, adap 121 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c for_each_port(adap, i) { adap 122 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c n_dev = adap->port[i]; adap 420 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c void cxgb4_cleanup_tc_u32(struct adapter *adap) adap 425 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c if (!adap->tc_u32) adap 429 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c t = adap->tc_u32; adap 435 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c kvfree(adap->tc_u32); adap 438 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c struct cxgb4_tc_u32_table *cxgb4_init_tc_u32(struct adapter *adap) adap 440 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c unsigned int max_tids = adap->tids.nftids; adap 42 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h struct adapter *adap = netdev2adap(dev); adap 44 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h return (dev->features & NETIF_F_HW_TC) && adap->tc_u32 ? true : false; adap 51 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h struct cxgb4_tc_u32_table *cxgb4_init_tc_u32(struct adapter *adap); adap 15 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c struct adapter *adap = tzdev->devdata; adap 23 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, adap 35 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c struct adapter *adap = tzdev->devdata; adap 37 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c if (!adap->ch_thermal.trip_temp) adap 40 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c *type = adap->ch_thermal.trip_type; adap 47 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c struct adapter *adap = tzdev->devdata; adap 49 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c if (!adap->ch_thermal.trip_temp) adap 52 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c *temp = adap->ch_thermal.trip_temp; adap 62 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c int cxgb4_thermal_init(struct adapter *adap) adap 64 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c struct ch_thermal *ch_thermal = &adap->ch_thermal; adap 76 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, adap 86 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c 0, adap, adap 91 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c dev_err(adap->pdev_dev, "Failed to register thermal zone\n"); adap 98 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c int cxgb4_thermal_remove(struct adapter *adap) adap 100 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c if (adap->ch_thermal.tzdev) adap 101 drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c thermal_zone_device_unregister(adap->ch_thermal.tzdev); adap 56 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static int get_msix_idx_from_bmap(struct adapter *adap) adap 58 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct uld_msix_bmap *bmap = &adap->msix_bmap_ulds; adap 75 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void free_msix_idx_in_bmap(struct adapter *adap, unsigned int msix_idx) adap 77 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct uld_msix_bmap *bmap = &adap->msix_bmap_ulds; adap 88 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct adapter *adap = q->adap; adap 90 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->uld[q->uld].lro_flush) adap 91 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[q->uld].lro_flush(&q->lro_mgr); adap 106 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct adapter *adap = q->adap; adap 116 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = adap->uld[q->uld].lro_rx_handler(adap->uld[q->uld].handle, adap 120 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = adap->uld[q->uld].rx_handler(adap->uld[q->uld].handle, adap 137 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static int alloc_uld_rxqs(struct adapter *adap, adap 144 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 147 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c per_chan = rxq_info->nrxq / adap->params.nports; adap 149 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) adap 157 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c per_chan = rxq_info->nciq / adap->params.nports; adap 162 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c bmap_idx = get_msix_idx_from_bmap(adap); adap 167 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c msi_idx = adap->msix_info_ulds[bmap_idx].idx; adap 169 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c err = t4_sge_alloc_rxq(adap, &q->rspq, false, adap 170 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->port[que_idx++ / per_chan], adap 189 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_rspq_fl(adap, &q->rspq, adap 196 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro) adap 198 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 201 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) { adap 209 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = !(!alloc_uld_rxqs(adap, rxq_info, lro)); adap 212 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE && adap 214 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 219 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c for_each_port(adap, i) { adap 224 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = t4_set_params(adap, adap->mbox, adap->pf, adap 231 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void t4_free_uld_rxqs(struct adapter *adap, int n, adap 236 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_rspq_fl(adap, &q->rspq, adap 241 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) adap 243 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 245 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE && uld_type == CXGB4_ULD_RDMA) { adap 246 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 251 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c for_each_port(adap, i) { adap 255 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c t4_set_params(adap, adap->mbox, adap->pf, adap 261 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c t4_free_uld_rxqs(adap, rxq_info->nciq, adap 263 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c t4_free_uld_rxqs(adap, rxq_info->nrxq, rxq_info->uldrxq); adap 264 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) adap 268 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, adap 271 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 279 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX && uld_info->nrxq > s->nqs_per_uld) { adap 281 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c rxq_info->nrxq = roundup(i, adap->params.nports); adap 285 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c rxq_info->nrxq = roundup(i, adap->params.nports); adap 290 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) adap 296 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c rxq_info->nciq = ((rxq_info->nciq / adap->params.nports) * adap 297 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->params.nports); adap 299 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->params.nports); adap 320 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c init_rspq(adap, &r->rspq, 5, 1, uld_info->rxq_size, 64); adap 325 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ciq_size = 64 + adap->vres.cq.size + adap->tids.nftids; adap 327 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c dev_warn(adap->pdev_dev, "CIQ size too small for available IQs\n"); adap 334 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c init_rspq(adap, &r->rspq, 5, 1, ciq_size, 64); adap 339 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->sge.uld_rxq_info[uld_type] = rxq_info; adap 344 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void free_queues_uld(struct adapter *adap, unsigned int uld_type) adap 346 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 348 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->sge.uld_rxq_info[uld_type] = NULL; adap 355 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) adap 357 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 364 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c minfo = &adap->msix_info_ulds[bmap_idx]; adap 372 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c cxgb4_set_msix_aff(adap, minfo->vec, adap 380 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c minfo = &adap->msix_info_ulds[bmap_idx]; adap 382 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_msix_idx_in_bmap(adap, bmap_idx); adap 389 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) adap 391 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 397 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c minfo = &adap->msix_info_ulds[bmap_idx]; adap 400 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_msix_idx_in_bmap(adap, bmap_idx); adap 405 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void name_msix_vecs_uld(struct adapter *adap, unsigned int uld_type) adap 407 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 408 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c int n = sizeof(adap->msix_info_ulds[0].desc); adap 414 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c snprintf(adap->msix_info_ulds[bmap_idx].desc, n, "%s-%s%d", adap 415 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->port[0]->name, rxq_info->name, idx); adap 419 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void enable_rx(struct adapter *adap, struct sge_rspq *q) adap 428 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c t4_write_reg(adap, MYPF_REG(SGE_PF_GTS_A), adap 433 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void quiesce_rx(struct adapter *adap, struct sge_rspq *q) adap 439 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void enable_rx_uld(struct adapter *adap, unsigned int uld_type) adap 441 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 445 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c enable_rx(adap, &rxq_info->uldrxq[idx].rspq); adap 448 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void quiesce_rx_uld(struct adapter *adap, unsigned int uld_type) adap 450 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 454 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c quiesce_rx(adap, &rxq_info->uldrxq[idx].rspq); adap 458 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info) adap 468 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c t4_ofld_eq_free(adap, adap->mbox, adap->pf, 0, adap 470 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_tx_desc(adap, &txq->q, txq->q.in_use, false); adap 473 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_txq(adap, &txq->q); adap 479 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c alloc_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info, adap 482 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 486 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c j = nq / adap->params.nports; adap 491 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c err = t4_sge_alloc_uld_txq(adap, txq, adap->port[i / j], adap 498 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_sge_txq_uld(adap, txq_info); adap 503 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c release_sge_txq_uld(struct adapter *adap, unsigned int uld_type) adap 508 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c txq_info = adap->sge.uld_txq_info[tx_uld_type]; adap 511 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_sge_txq_uld(adap, txq_info); adap 514 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->sge.uld_txq_info[tx_uld_type] = NULL; adap 519 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c setup_sge_txq_uld(struct adapter *adap, unsigned int uld_type, adap 526 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c txq_info = adap->sge.uld_txq_info[tx_uld_type]; adap 536 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c i = min_t(int, adap->vres.ncrypto_fc, adap 538 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c txq_info->ntxq = rounddown(i, adap->params.nports); adap 540 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c dev_warn(adap->pdev_dev, "Crypto Tx Queues can't be zero\n"); adap 547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c txq_info->ntxq = roundup(i, adap->params.nports); adap 556 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (alloc_sge_txq_uld(adap, txq_info, tx_uld_type)) { adap 563 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->sge.uld_txq_info[tx_uld_type] = txq_info; adap 567 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void uld_queue_init(struct adapter *adap, unsigned int uld_type, adap 570 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; adap 572 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge_uld_txq_info *txq_info = adap->sge.uld_txq_info[tx_uld_type]; adap 581 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c int t4_uld_mem_alloc(struct adapter *adap) adap 583 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 585 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld = kcalloc(CXGB4_ULD_MAX, sizeof(*adap->uld), GFP_KERNEL); adap 586 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (!adap->uld) adap 605 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c kfree(adap->uld); adap 609 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c void t4_uld_mem_free(struct adapter *adap) adap 611 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct sge *s = &adap->sge; adap 615 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c kfree(adap->uld); adap 619 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void cxgb4_shutdown_uld_adapter(struct adapter *adap, enum cxgb4_uld type) adap 621 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->uld[type].handle) { adap 622 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[type].handle = NULL; adap 623 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[type].add = NULL; adap 624 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c release_sge_txq_uld(adap, type); adap 626 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 627 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c quiesce_rx_uld(adap, type); adap 629 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) adap 630 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_msix_queue_irqs_uld(adap, type); adap 632 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_sge_queues_uld(adap, type); adap 633 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_queues_uld(adap, type); adap 637 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c void t4_uld_clean_up(struct adapter *adap) adap 643 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (!adap->uld[i].handle) adap 646 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c cxgb4_shutdown_uld_adapter(adap, i); adap 651 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static void uld_init(struct adapter *adap, struct cxgb4_lld_info *lld) adap 655 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->pdev = adap->pdev; adap 656 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->pf = adap->pf; adap 657 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->l2t = adap->l2t; adap 658 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->tids = &adap->tids; adap 659 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->ports = adap->port; adap 660 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->vr = &adap->vres; adap 661 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->mtus = adap->params.mtus; adap 662 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->nchan = adap->params.nports; adap 663 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->nports = adap->params.nports; adap 664 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->wr_cred = adap->params.ofldq_wr_cred; adap 665 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->crypto = adap->params.crypto; adap 666 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->iscsi_iolen = MAXRXDATA_G(t4_read_reg(adap, TP_PARA_REG2_A)); adap 667 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->iscsi_tagmask = t4_read_reg(adap, ULP_RX_ISCSI_TAGMASK_A); adap 668 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->iscsi_pgsz_order = t4_read_reg(adap, ULP_RX_ISCSI_PSZ_A); adap 669 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->iscsi_llimit = t4_read_reg(adap, ULP_RX_ISCSI_LLIMIT_A); adap 670 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->iscsi_ppm = &adap->iscsi_ppm; adap 671 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->adapter_type = adap->params.chip; adap 672 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->cclk_ps = 1000000000 / adap->params.vpd.cclk; adap 673 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->udb_density = 1 << adap->params.sge.eq_qpp; adap 674 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->ucq_density = 1 << adap->params.sge.iq_qpp; adap 675 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->sge_host_page_size = 1 << (adap->params.sge.hps + 10); adap 676 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->filt_mode = adap->params.tp.vlan_pri_map; adap 680 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->gts_reg = adap->regs + MYPF_REG(SGE_PF_GTS_A); adap 681 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->db_reg = adap->regs + MYPF_REG(SGE_PF_KDOORBELL_A); adap 682 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->fw_vers = adap->params.fw_vers; adap 684 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->sge_ingpadboundary = adap->sge.fl_align; adap 685 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->sge_egrstatuspagesize = adap->sge.stat_len; adap 686 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->sge_pktshift = adap->sge.pktshift; adap 687 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->ulp_crypto = adap->params.crypto; adap 688 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->enable_fw_ofld_conn = adap->flags & CXGB4_FW_OFLD_CONN; adap 689 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->max_ordird_qp = adap->params.max_ordird_qp; adap 690 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->max_ird_adapter = adap->params.max_ird_adapter; adap 691 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl; adap 692 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->nodeid = dev_to_node(adap->pdev_dev); adap 693 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->fr_nsmr_tpte_wr_support = adap->params.fr_nsmr_tpte_wr_support; adap 694 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->write_w_imm_support = adap->params.write_w_imm_support; adap 695 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->write_cmpl_support = adap->params.write_cmpl_support; adap 698 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c static int uld_attach(struct adapter *adap, unsigned int uld) adap 703 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c uld_init(adap, &lli); adap 704 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c uld_queue_init(adap, uld, &lli); adap 706 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c handle = adap->uld[uld].add(&lli); adap 708 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c dev_warn(adap->pdev_dev, adap 710 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[uld].name, PTR_ERR(handle)); adap 714 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[uld].handle = handle; adap 717 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 718 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[uld].state_change(handle, CXGB4_STATE_UP); adap 733 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct adapter *adap; adap 740 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c list_for_each_entry(adap, &adapter_list, list_node) { adap 741 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if ((type == CXGB4_ULD_CRYPTO && !is_pci_uld(adap)) || adap 742 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c (type != CXGB4_ULD_CRYPTO && !is_offload(adap))) adap 744 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (type == CXGB4_ULD_ISCSIT && is_t4(adap->params.chip)) adap 746 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = cfg_queues_uld(adap, type, p); adap 749 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = setup_sge_queues_uld(adap, type, p->lro); adap 752 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) { adap 753 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c name_msix_vecs_uld(adap, type); adap 754 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = request_msix_queue_irqs_uld(adap, type); adap 758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 759 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c enable_rx_uld(adap, type); adap 760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->uld[type].add) adap 762 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = setup_sge_txq_uld(adap, type, p); adap 765 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c adap->uld[type] = *p; adap 766 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c ret = uld_attach(adap, type); adap 771 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c release_sge_txq_uld(adap, type); adap 773 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_FULL_INIT_DONE) adap 774 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c quiesce_rx_uld(adap, type); adap 775 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (adap->flags & CXGB4_USING_MSIX) adap 776 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_msix_queue_irqs_uld(adap, type); adap 778 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_sge_queues_uld(adap, type); adap 780 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c free_queues_uld(adap, type); adap 782 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c dev_warn(adap->pdev_dev, adap 798 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c struct adapter *adap; adap 804 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c list_for_each_entry(adap, &adapter_list, list_node) { adap 805 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if ((type == CXGB4_ULD_CRYPTO && !is_pci_uld(adap)) || adap 806 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c (type != CXGB4_ULD_CRYPTO && !is_offload(adap))) adap 808 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c if (type == CXGB4_ULD_ISCSIT && is_t4(adap->params.chip)) adap 811 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c cxgb4_shutdown_uld_adapter(adap, type); adap 138 drivers/net/ethernet/chelsio/cxgb4/l2t.c static int write_l2e(struct adapter *adap, struct l2t_entry *e, int sync) adap 140 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct l2t_data *d = adap->l2t; adap 154 drivers/net/ethernet/chelsio/cxgb4/l2t.c TID_QID_V(adap->sge.fw_evtq.abs_id))); adap 162 drivers/net/ethernet/chelsio/cxgb4/l2t.c t4_mgmt_tx(adap, skb); adap 173 drivers/net/ethernet/chelsio/cxgb4/l2t.c static void send_pending(struct adapter *adap, struct l2t_entry *e) adap 178 drivers/net/ethernet/chelsio/cxgb4/l2t.c t4_ofld_send(adap, skb); adap 186 drivers/net/ethernet/chelsio/cxgb4/l2t.c void do_l2t_write_rpl(struct adapter *adap, const struct cpl_l2t_write_rpl *rpl) adap 188 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct l2t_data *d = adap->l2t; adap 193 drivers/net/ethernet/chelsio/cxgb4/l2t.c dev_err(adap->pdev_dev, adap 204 drivers/net/ethernet/chelsio/cxgb4/l2t.c send_pending(adap, e); adap 224 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct adapter *adap = netdev2adap(dev); adap 236 drivers/net/ethernet/chelsio/cxgb4/l2t.c return t4_ofld_send(adap, skb); adap 253 drivers/net/ethernet/chelsio/cxgb4/l2t.c write_l2e(adap, e, 1); adap 481 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct adapter *adap = netdev2adap(dev); adap 482 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct tp_params *tp = &adap->params.tp; adap 501 drivers/net/ethernet/chelsio/cxgb4/l2t.c FT_VNID_ID_PF_V(adap->pf) | adap 514 drivers/net/ethernet/chelsio/cxgb4/l2t.c static void handle_failed_resolution(struct adapter *adap, struct l2t_entry *e) adap 525 drivers/net/ethernet/chelsio/cxgb4/l2t.c t4_ofld_send(adap, skb); adap 534 drivers/net/ethernet/chelsio/cxgb4/l2t.c void t4_l2t_update(struct adapter *adap, struct neighbour *neigh) adap 538 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct l2t_data *d = adap->l2t; adap 567 drivers/net/ethernet/chelsio/cxgb4/l2t.c write_l2e(adap, e, 1); adap 573 drivers/net/ethernet/chelsio/cxgb4/l2t.c write_l2e(adap, e, 0); adap 577 drivers/net/ethernet/chelsio/cxgb4/l2t.c handle_failed_resolution(adap, e); adap 585 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct l2t_entry *t4_l2t_alloc_switching(struct adapter *adap, u16 vlan, adap 588 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct l2t_data *d = adap->l2t; adap 602 drivers/net/ethernet/chelsio/cxgb4/l2t.c ret = write_l2e(adap, e, 0); adap 631 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct adapter *adap = netdev2adap(dev); adap 633 drivers/net/ethernet/chelsio/cxgb4/l2t.c return t4_l2t_alloc_switching(adap, vlan, port, dmac); adap 744 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct adapter *adap = inode->i_private; adap 747 drivers/net/ethernet/chelsio/cxgb4/l2t.c seq->private = adap->l2t; adap 120 drivers/net/ethernet/chelsio/cxgb4/l2t.h void t4_l2t_update(struct adapter *adap, struct neighbour *neigh); adap 121 drivers/net/ethernet/chelsio/cxgb4/l2t.h struct l2t_entry *t4_l2t_alloc_switching(struct adapter *adap, u16 vlan, adap 45 drivers/net/ethernet/chelsio/cxgb4/sched.c struct adapter *adap = pi->adapter; adap 53 drivers/net/ethernet/chelsio/cxgb4/sched.c err = t4_sched_params(adap, p->type, adap 72 drivers/net/ethernet/chelsio/cxgb4/sched.c struct adapter *adap = pi->adapter; adap 74 drivers/net/ethernet/chelsio/cxgb4/sched.c unsigned int pf = adap->pf; adap 93 drivers/net/ethernet/chelsio/cxgb4/sched.c pf = adap->pf; adap 102 drivers/net/ethernet/chelsio/cxgb4/sched.c err = t4_set_params(adap, adap->mbox, pf, vf, 1, &fw_param, &fw_class); adap 145 drivers/net/ethernet/chelsio/cxgb4/sched.c struct adapter *adap = pi->adapter; adap 156 drivers/net/ethernet/chelsio/cxgb4/sched.c txq = &adap->sge.ethtxq[pi->first_qset + p->queue]; adap 186 drivers/net/ethernet/chelsio/cxgb4/sched.c struct adapter *adap = pi->adapter; adap 201 drivers/net/ethernet/chelsio/cxgb4/sched.c txq = &adap->sge.ethtxq[pi->first_qset + p->queue]; adap 496 drivers/net/ethernet/chelsio/cxgb4/sched.c void t4_cleanup_sched(struct adapter *adap) adap 501 drivers/net/ethernet/chelsio/cxgb4/sched.c for_each_port(adap, j) { adap 502 drivers/net/ethernet/chelsio/cxgb4/sched.c struct port_info *pi = netdev2pinfo(adap->port[j]); adap 107 drivers/net/ethernet/chelsio/cxgb4/sched.h void t4_cleanup_sched(struct adapter *adap); adap 370 drivers/net/ethernet/chelsio/cxgb4/sge.c void free_tx_desc(struct adapter *adap, struct sge_txq *q, adap 375 drivers/net/ethernet/chelsio/cxgb4/sge.c struct device *dev = adap->pdev_dev; adap 415 drivers/net/ethernet/chelsio/cxgb4/sge.c static inline int reclaim_completed_tx(struct adapter *adap, struct sge_txq *q, adap 430 drivers/net/ethernet/chelsio/cxgb4/sge.c free_tx_desc(adap, q, reclaim, unmap); adap 447 drivers/net/ethernet/chelsio/cxgb4/sge.c void cxgb4_reclaim_completed_tx(struct adapter *adap, struct sge_txq *q, adap 450 drivers/net/ethernet/chelsio/cxgb4/sge.c (void)reclaim_completed_tx(adap, q, -1, unmap); adap 494 drivers/net/ethernet/chelsio/cxgb4/sge.c static void free_rx_bufs(struct adapter *adap, struct sge_fl *q, int n) adap 500 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_unmap_page(adap->pdev_dev, get_buf_addr(d), adap 501 drivers/net/ethernet/chelsio/cxgb4/sge.c get_buf_size(adap, d), adap 522 drivers/net/ethernet/chelsio/cxgb4/sge.c static void unmap_rx_buf(struct adapter *adap, struct sge_fl *q) adap 527 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_unmap_page(adap->pdev_dev, get_buf_addr(d), adap 528 drivers/net/ethernet/chelsio/cxgb4/sge.c get_buf_size(adap, d), PCI_DMA_FROMDEVICE); adap 535 drivers/net/ethernet/chelsio/cxgb4/sge.c static inline void ring_fl_db(struct adapter *adap, struct sge_fl *q) adap 538 drivers/net/ethernet/chelsio/cxgb4/sge.c u32 val = adap->params.arch.sge_fl_db; adap 540 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_t4(adap->params.chip)) adap 555 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL_A), adap 591 drivers/net/ethernet/chelsio/cxgb4/sge.c static unsigned int refill_fl(struct adapter *adap, struct sge_fl *q, int n, adap 594 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 603 drivers/net/ethernet/chelsio/cxgb4/sge.c if (test_bit(q->cntxt_id - adap->sge.egr_start, adap->sge.blocked_fl)) adap 608 drivers/net/ethernet/chelsio/cxgb4/sge.c node = dev_to_node(adap->pdev_dev); adap 623 drivers/net/ethernet/chelsio/cxgb4/sge.c mapping = dma_map_page(adap->pdev_dev, pg, 0, adap 626 drivers/net/ethernet/chelsio/cxgb4/sge.c if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { adap 654 drivers/net/ethernet/chelsio/cxgb4/sge.c mapping = dma_map_page(adap->pdev_dev, pg, 0, PAGE_SIZE, adap 656 drivers/net/ethernet/chelsio/cxgb4/sge.c if (unlikely(dma_mapping_error(adap->pdev_dev, mapping))) { adap 676 drivers/net/ethernet/chelsio/cxgb4/sge.c ring_fl_db(adap, q); adap 678 drivers/net/ethernet/chelsio/cxgb4/sge.c if (unlikely(fl_starving(adap, q))) { adap 681 drivers/net/ethernet/chelsio/cxgb4/sge.c set_bit(q->cntxt_id - adap->sge.egr_start, adap 682 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.starving_fl); adap 688 drivers/net/ethernet/chelsio/cxgb4/sge.c static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) adap 690 drivers/net/ethernet/chelsio/cxgb4/sge.c refill_fl(adap, fl, min(MAX_RX_REFILL, fl_cap(fl) - fl->avail), adap 960 drivers/net/ethernet/chelsio/cxgb4/sge.c inline void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n) adap 979 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_write_reg(adap, MYPF_REG(SGE_PF_KDOORBELL_A), adap 1183 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb_fcoe_offload(struct sk_buff *skb, struct adapter *adap, adap 1200 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!cxgb_fcoe_sof_eof_supported(adap, skb)) adap 1324 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_eth_txq_egress_update(struct adapter *adap, struct sge_eth_txq *eq, adap 1335 drivers/net/ethernet/chelsio/cxgb4/sge.c reclaimed = reclaim_completed_tx(adap, &eq->q, maxreclaim, true); adap 1369 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap; adap 1403 drivers/net/ethernet/chelsio/cxgb4/sge.c adap = pi->adapter; adap 1407 drivers/net/ethernet/chelsio/cxgb4/sge.c return adap->uld[CXGB4_ULD_CRYPTO].tx_handler(skb, dev); adap 1412 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_lock(&adap->ptp_lock); adap 1413 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!(adap->ptp_tx_skb)) { adap 1415 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->ptp_tx_skb = skb_get(skb); adap 1417 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 1420 drivers/net/ethernet/chelsio/cxgb4/sge.c q = &adap->sge.ptptxq; adap 1422 drivers/net/ethernet/chelsio/cxgb4/sge.c q = &adap->sge.ethtxq[qidx + pi->first_qset]; adap 1426 drivers/net/ethernet/chelsio/cxgb4/sge.c reclaim_completed_tx(adap, &q->q, -1, true); adap 1430 drivers/net/ethernet/chelsio/cxgb4/sge.c err = cxgb_fcoe_offload(skb, adap, pi, &cntrl); adap 1433 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 1438 drivers/net/ethernet/chelsio/cxgb4/sge.c chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); adap 1445 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_err(adap->pdev_dev, adap 1449 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 1460 drivers/net/ethernet/chelsio/cxgb4/sge.c unlikely(cxgb4_map_skb(adap->pdev_dev, skb, addr) < 0)) { adap 1463 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 1517 drivers/net/ethernet/chelsio/cxgb4/sge.c cntrl = hwcsum(adap->params.chip, skb); adap 1528 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_t4(adap->params.chip)) adap 1534 drivers/net/ethernet/chelsio/cxgb4/sge.c if (CHELSIO_CHIP_VERSION(adap->params.chip) adap 1569 drivers/net/ethernet/chelsio/cxgb4/sge.c cntrl = hwcsum(adap->params.chip, skb) | adap 1586 drivers/net/ethernet/chelsio/cxgb4/sge.c TXPKT_PF_V(adap->pf); adap 1590 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_t4(adap->params.chip)) adap 1618 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(adap, &q->q, ndesc); adap 1620 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 2079 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, ndesc); adap 2127 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, written); adap 2135 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, written); adap 2146 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_mgmt_tx(struct adapter *adap, struct sk_buff *skb) adap 2151 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = ctrl_xmit(&adap->sge.ctrlq[0], skb); adap 2209 drivers/net/ethernet/chelsio/cxgb4/sge.c set_bit(q->q.cntxt_id - q->adap->sge.egr_start, adap 2210 drivers/net/ethernet/chelsio/cxgb4/sge.c q->adap->sge.txq_maperr); adap 2276 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_reclaim_completed_tx(q->adap, &q->q, false); adap 2288 drivers/net/ethernet/chelsio/cxgb4/sge.c else if (cxgb4_map_skb(q->adap->pdev_dev, skb, adap 2324 drivers/net/ethernet/chelsio/cxgb4/sge.c skb->dev = q->adap->port[0]; adap 2336 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, written); adap 2351 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, written); adap 2427 drivers/net/ethernet/chelsio/cxgb4/sge.c static inline int uld_send(struct adapter *adap, struct sk_buff *skb, adap 2436 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->tids.nsftids) adap 2438 drivers/net/ethernet/chelsio/cxgb4/sge.c return ctrl_xmit(&adap->sge.ctrlq[idx], skb); adap 2441 drivers/net/ethernet/chelsio/cxgb4/sge.c txq_info = adap->sge.uld_txq_info[tx_uld_type]; adap 2460 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_ofld_send(struct adapter *adap, struct sk_buff *skb) adap 2465 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = uld_send(adap, skb, CXGB4_TX_OFLD); adap 2550 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_ring_tx_db(q->adap, &q->q, ndesc); adap 2561 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap; adap 2564 drivers/net/ethernet/chelsio/cxgb4/sge.c adap = netdev2adap(dev); adap 2567 drivers/net/ethernet/chelsio/cxgb4/sge.c txq_info = adap->sge.uld_txq_info[CXGB4_TX_OFLD]; adap 2590 drivers/net/ethernet/chelsio/cxgb4/sge.c static int t4_crypto_send(struct adapter *adap, struct sk_buff *skb) adap 2595 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = uld_send(adap, skb, CXGB4_TX_CRYPTO); adap 2694 drivers/net/ethernet/chelsio/cxgb4/sge.c static noinline int handle_trace_pkt(struct adapter *adap, adap 2705 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_t4(adap->params.chip)) adap 2712 drivers/net/ethernet/chelsio/cxgb4/sge.c skb->dev = adap->port[0]; adap 2726 drivers/net/ethernet/chelsio/cxgb4/sge.c static void cxgb4_sgetim_to_hwtstamp(struct adapter *adap, adap 2731 drivers/net/ethernet/chelsio/cxgb4/sge.c u64 tmp = (sgetstamp * 1000 * 1000 + adap->params.vpd.cclk / 2); adap 2733 drivers/net/ethernet/chelsio/cxgb4/sge.c ns = div_u64(tmp, adap->params.vpd.cclk); adap 2742 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adapter = rxq->rspq.adap; adap 2891 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adapter = rspq->adap; adap 2933 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adapter = q->adap; adap 2934 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &q->adap->sge; adap 2935 drivers/net/ethernet/chelsio/cxgb4/sge.c int cpl_trace_pkt = is_t4(q->adap->params.chip) ? adap 2951 drivers/net/ethernet/chelsio/cxgb4/sge.c return handle_trace_pkt(q->adap, si); adap 2955 drivers/net/ethernet/chelsio/cxgb4/sge.c if (q->adap->params.tp.rx_pkt_encap) { adap 3009 drivers/net/ethernet/chelsio/cxgb4/sge.c cxgb4_sgetim_to_hwtstamp(q->adap, skb_hwtstamps(skb), adap 3036 drivers/net/ethernet/chelsio/cxgb4/sge.c if (q->adap->params.tp.rx_pkt_encap) adap 3140 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adapter = q->adap; adap 3161 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rx_bufs(q->adap, &rxq->fl, 1); adap 3178 drivers/net/ethernet/chelsio/cxgb4/sge.c unmap_rx_buf(q->adap, &rxq->fl); adap 3187 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_sync_single_for_cpu(q->adap->pdev_dev, adap 3218 drivers/net/ethernet/chelsio/cxgb4/sge.c __refill_fl(q->adap, &rxq->fl); adap 3272 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_write_reg(q->adap, MYPF_REG(SGE_PF_GTS_A), adap 3297 drivers/net/ethernet/chelsio/cxgb4/sge.c static unsigned int process_intrq(struct adapter *adap) adap 3301 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge_rspq *q = &adap->sge.intrq; adap 3304 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_lock(&adap->sge.intrq_lock); adap 3314 drivers/net/ethernet/chelsio/cxgb4/sge.c qid -= adap->sge.ingr_start; adap 3315 drivers/net/ethernet/chelsio/cxgb4/sge.c napi_schedule(&adap->sge.ingr_map[qid]->napi); adap 3327 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_write_reg(adap, MYPF_REG(SGE_PF_GTS_A), adap 3334 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->sge.intrq_lock); adap 3344 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap = cookie; adap 3346 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->flags & CXGB4_MASTER_PF) adap 3347 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_slow_intr_handler(adap); adap 3348 drivers/net/ethernet/chelsio/cxgb4/sge.c process_intrq(adap); adap 3359 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap = cookie; adap 3361 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_write_reg(adap, MYPF_REG(PCIE_PF_CLI_A), 0); adap 3362 drivers/net/ethernet/chelsio/cxgb4/sge.c if (((adap->flags & CXGB4_MASTER_PF) && t4_slow_intr_handler(adap)) | adap 3363 drivers/net/ethernet/chelsio/cxgb4/sge.c process_intrq(adap)) adap 3375 drivers/net/ethernet/chelsio/cxgb4/sge.c irq_handler_t t4_intr_handler(struct adapter *adap) adap 3377 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->flags & CXGB4_USING_MSIX) adap 3379 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->flags & CXGB4_USING_MSI) adap 3388 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap = from_timer(adap, t, sge.rx_timer); adap 3389 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3400 drivers/net/ethernet/chelsio/cxgb4/sge.c if (fl_starving(adap, fl)) { adap 3412 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!(adap->flags & CXGB4_MASTER_PF)) adap 3415 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_idma_monitor(adap, &s->idma_monitor, HZ, RX_QCHECK_PERIOD); adap 3423 drivers/net/ethernet/chelsio/cxgb4/sge.c struct adapter *adap = from_timer(adap, t, sge.tx_timer); adap 3424 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3437 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!is_t4(adap->params.chip)) { adap 3441 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_lock(&adap->ptp_lock); adap 3445 drivers/net/ethernet/chelsio/cxgb4/sge.c free_tx_desc(adap, &q->q, avail, false); adap 3448 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock(&adap->ptp_lock); adap 3454 drivers/net/ethernet/chelsio/cxgb4/sge.c budget -= t4_sge_eth_txq_egress_update(adap, &s->ethtxq[i], adap 3511 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, adap 3518 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3520 drivers/net/ethernet/chelsio/cxgb4/sge.c int relaxed = !(adap->flags & CXGB4_ROOT_NO_RELAXED_ORDERING); adap 3525 drivers/net/ethernet/chelsio/cxgb4/sge.c iq->desc = alloc_ring(adap->pdev_dev, iq->size, iq->iqe_len, 0, adap 3527 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_to_node(adap->pdev_dev)); adap 3534 drivers/net/ethernet/chelsio/cxgb4/sge.c FW_IQ_CMD_PFN_V(adap->pf) | FW_IQ_CMD_VFN_V(0)); adap 3556 drivers/net/ethernet/chelsio/cxgb4/sge.c CHELSIO_CHIP_VERSION(adap->params.chip); adap 3568 drivers/net/ethernet/chelsio/cxgb4/sge.c fl->desc = alloc_ring(adap->pdev_dev, fl->size, sizeof(__be64), adap 3571 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_to_node(adap->pdev_dev)); adap 3604 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), &c); adap 3615 drivers/net/ethernet/chelsio/cxgb4/sge.c iq->bar2_addr = bar2_address(adap, adap 3630 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.ingr_map[iq->cntxt_id - adap->sge.ingr_start] = iq; adap 3637 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.egr_map[fl->cntxt_id - adap->sge.egr_start] = fl; adap 3642 drivers/net/ethernet/chelsio/cxgb4/sge.c fl->bar2_addr = bar2_address(adap, adap 3646 drivers/net/ethernet/chelsio/cxgb4/sge.c refill_fl(adap, fl, fl_cap(fl), GFP_KERNEL); adap 3657 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!is_t4(adap->params.chip) && cong >= 0) { adap 3660 drivers/net/ethernet/chelsio/cxgb4/sge.c u16 cng_ch_bits_log = adap->params.arch.cng_ch_bits_log; adap 3676 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, adap 3679 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_warn(adap->pdev_dev, "Failed to set Congestion" adap 3690 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, iq->size * iq->iqe_len, adap 3697 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, flsz * sizeof(struct tx_desc), adap 3704 drivers/net/ethernet/chelsio/cxgb4/sge.c static void init_txq(struct adapter *adap, struct sge_txq *q, unsigned int id) adap 3707 drivers/net/ethernet/chelsio/cxgb4/sge.c q->bar2_addr = bar2_address(adap, adap 3716 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.egr_map[id - adap->sge.egr_start] = q; adap 3728 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq, adap 3732 drivers/net/ethernet/chelsio/cxgb4/sge.c unsigned int chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); adap 3734 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3741 drivers/net/ethernet/chelsio/cxgb4/sge.c txq->q.desc = alloc_ring(adap->pdev_dev, txq->q.size, adap 3751 drivers/net/ethernet/chelsio/cxgb4/sge.c FW_EQ_ETH_CMD_PFN_V(adap->pf) | adap 3792 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), &c); adap 3796 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, adap 3804 drivers/net/ethernet/chelsio/cxgb4/sge.c init_txq(adap, &txq->q, FW_EQ_ETH_CMD_EQID_G(ntohl(c.eqid_pkd))); adap 3813 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq, adap 3817 drivers/net/ethernet/chelsio/cxgb4/sge.c unsigned int chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); adap 3819 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3826 drivers/net/ethernet/chelsio/cxgb4/sge.c txq->q.desc = alloc_ring(adap->pdev_dev, nentries, adap 3828 drivers/net/ethernet/chelsio/cxgb4/sge.c NULL, 0, dev_to_node(adap->pdev_dev)); adap 3834 drivers/net/ethernet/chelsio/cxgb4/sge.c FW_EQ_CTRL_CMD_PFN_V(adap->pf) | adap 3853 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), &c); adap 3855 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, adap 3863 drivers/net/ethernet/chelsio/cxgb4/sge.c init_txq(adap, &txq->q, FW_EQ_CTRL_CMD_EQID_G(ntohl(c.cmpliqid_eqid))); adap 3864 drivers/net/ethernet/chelsio/cxgb4/sge.c txq->adap = adap; adap 3871 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_mod_ctrl_txq(struct adapter *adap, unsigned int eqid, adap 3880 drivers/net/ethernet/chelsio/cxgb4/sge.c return t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); adap 3883 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_alloc_uld_txq(struct adapter *adap, struct sge_uld_txq *txq, adap 3887 drivers/net/ethernet/chelsio/cxgb4/sge.c unsigned int chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); adap 3890 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3897 drivers/net/ethernet/chelsio/cxgb4/sge.c txq->q.desc = alloc_ring(adap->pdev_dev, txq->q.size, adap 3909 drivers/net/ethernet/chelsio/cxgb4/sge.c FW_EQ_OFLD_CMD_PFN_V(adap->pf) | adap 3926 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), &c); adap 3930 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, adap 3938 drivers/net/ethernet/chelsio/cxgb4/sge.c init_txq(adap, &txq->q, FW_EQ_OFLD_CMD_EQID_G(ntohl(c.eqid_pkd))); adap 3939 drivers/net/ethernet/chelsio/cxgb4/sge.c txq->adap = adap; adap 3947 drivers/net/ethernet/chelsio/cxgb4/sge.c void free_txq(struct adapter *adap, struct sge_txq *q) adap 3949 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3951 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, adap 3959 drivers/net/ethernet/chelsio/cxgb4/sge.c void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq, adap 3962 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 3965 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.ingr_map[rq->cntxt_id - adap->sge.ingr_start] = NULL; adap 3966 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_iq_free(adap, adap->mbox, adap->pf, 0, FW_IQ_TYPE_FL_INT_CAP, adap 3968 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, (rq->size + 1) * rq->iqe_len, adap 3976 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rx_bufs(adap, fl, fl->avail); adap 3977 drivers/net/ethernet/chelsio/cxgb4/sge.c dma_free_coherent(adap->pdev_dev, fl->size * 8 + s->stat_len, adap 3994 drivers/net/ethernet/chelsio/cxgb4/sge.c void t4_free_ofld_rxqs(struct adapter *adap, int n, struct sge_ofld_rxq *q) adap 3998 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rspq_fl(adap, &q->rspq, adap 4008 drivers/net/ethernet/chelsio/cxgb4/sge.c void t4_free_sge_resources(struct adapter *adap) adap 4015 drivers/net/ethernet/chelsio/cxgb4/sge.c for (i = 0; i < adap->sge.ethqsets; i++) { adap 4016 drivers/net/ethernet/chelsio/cxgb4/sge.c eq = &adap->sge.ethrxq[i]; adap 4018 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_iq_stop(adap, adap->mbox, adap->pf, 0, adap 4026 drivers/net/ethernet/chelsio/cxgb4/sge.c for (i = 0; i < adap->sge.ethqsets; i++) { adap 4027 drivers/net/ethernet/chelsio/cxgb4/sge.c eq = &adap->sge.ethrxq[i]; adap 4029 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rspq_fl(adap, &eq->rspq, adap 4032 drivers/net/ethernet/chelsio/cxgb4/sge.c etq = &adap->sge.ethtxq[i]; adap 4034 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_eth_eq_free(adap, adap->mbox, adap->pf, 0, adap 4037 drivers/net/ethernet/chelsio/cxgb4/sge.c free_tx_desc(adap, &etq->q, etq->q.in_use, true); adap 4040 drivers/net/ethernet/chelsio/cxgb4/sge.c free_txq(adap, &etq->q); adap 4045 drivers/net/ethernet/chelsio/cxgb4/sge.c for (i = 0; i < ARRAY_SIZE(adap->sge.ctrlq); i++) { adap 4046 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge_ctrl_txq *cq = &adap->sge.ctrlq[i]; adap 4050 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_ctrl_eq_free(adap, adap->mbox, adap->pf, 0, adap 4053 drivers/net/ethernet/chelsio/cxgb4/sge.c free_txq(adap, &cq->q); adap 4057 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->sge.fw_evtq.desc) adap 4058 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rspq_fl(adap, &adap->sge.fw_evtq, NULL); adap 4060 drivers/net/ethernet/chelsio/cxgb4/sge.c if (adap->sge.intrq.desc) adap 4061 drivers/net/ethernet/chelsio/cxgb4/sge.c free_rspq_fl(adap, &adap->sge.intrq, NULL); adap 4063 drivers/net/ethernet/chelsio/cxgb4/sge.c if (!is_t4(adap->params.chip)) { adap 4064 drivers/net/ethernet/chelsio/cxgb4/sge.c etq = &adap->sge.ptptxq; adap 4066 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_eth_eq_free(adap, adap->mbox, adap->pf, 0, adap 4068 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_lock_bh(&adap->ptp_lock); adap 4069 drivers/net/ethernet/chelsio/cxgb4/sge.c free_tx_desc(adap, &etq->q, etq->q.in_use, true); adap 4070 drivers/net/ethernet/chelsio/cxgb4/sge.c spin_unlock_bh(&adap->ptp_lock); adap 4072 drivers/net/ethernet/chelsio/cxgb4/sge.c free_txq(adap, &etq->q); adap 4077 drivers/net/ethernet/chelsio/cxgb4/sge.c memset(adap->sge.egr_map, 0, adap 4078 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.egr_sz * sizeof(*adap->sge.egr_map)); adap 4081 drivers/net/ethernet/chelsio/cxgb4/sge.c void t4_sge_start(struct adapter *adap) adap 4083 drivers/net/ethernet/chelsio/cxgb4/sge.c adap->sge.ethtxq_rover = 0; adap 4084 drivers/net/ethernet/chelsio/cxgb4/sge.c mod_timer(&adap->sge.rx_timer, jiffies + RX_QCHECK_PERIOD); adap 4085 drivers/net/ethernet/chelsio/cxgb4/sge.c mod_timer(&adap->sge.tx_timer, jiffies + TX_QCHECK_PERIOD); adap 4096 drivers/net/ethernet/chelsio/cxgb4/sge.c void t4_sge_stop(struct adapter *adap) adap 4099 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 4109 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_offload(adap)) { adap 4112 drivers/net/ethernet/chelsio/cxgb4/sge.c txq_info = adap->sge.uld_txq_info[CXGB4_TX_OFLD]; adap 4116 drivers/net/ethernet/chelsio/cxgb4/sge.c for_each_ofldtxq(&adap->sge, i) { adap 4123 drivers/net/ethernet/chelsio/cxgb4/sge.c if (is_pci_uld(adap)) { adap 4126 drivers/net/ethernet/chelsio/cxgb4/sge.c txq_info = adap->sge.uld_txq_info[CXGB4_TX_CRYPTO]; adap 4130 drivers/net/ethernet/chelsio/cxgb4/sge.c for_each_ofldtxq(&adap->sge, i) { adap 4153 drivers/net/ethernet/chelsio/cxgb4/sge.c static int t4_sge_init_soft(struct adapter *adap) adap 4155 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 4165 drivers/net/ethernet/chelsio/cxgb4/sge.c if ((t4_read_reg(adap, SGE_CONTROL_A) & RXPKTCPLMODE_F) != adap 4167 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_err(adap->pdev_dev, "bad SGE CPL MODE\n"); adap 4180 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_read_reg(adap, SGE_FL_BUFFER_SIZE0_A+(x)*sizeof(u32)) adap 4200 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_err(adap->pdev_dev, "bad SGE FL page buffer sizes [%d, %d]\n", adap 4207 drivers/net/ethernet/chelsio/cxgb4/sge.c if (fl_small_mtu < FL_MTU_SMALL_BUFSIZE(adap) || adap 4208 drivers/net/ethernet/chelsio/cxgb4/sge.c fl_large_mtu < FL_MTU_LARGE_BUFSIZE(adap)) { adap 4209 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_err(adap->pdev_dev, "bad SGE FL MTU sizes [%d, %d]\n", adap 4218 drivers/net/ethernet/chelsio/cxgb4/sge.c timer_value_0_and_1 = t4_read_reg(adap, SGE_TIMER_VALUE_0_AND_1_A); adap 4219 drivers/net/ethernet/chelsio/cxgb4/sge.c timer_value_2_and_3 = t4_read_reg(adap, SGE_TIMER_VALUE_2_AND_3_A); adap 4220 drivers/net/ethernet/chelsio/cxgb4/sge.c timer_value_4_and_5 = t4_read_reg(adap, SGE_TIMER_VALUE_4_AND_5_A); adap 4221 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[0] = core_ticks_to_us(adap, adap 4223 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[1] = core_ticks_to_us(adap, adap 4225 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[2] = core_ticks_to_us(adap, adap 4227 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[3] = core_ticks_to_us(adap, adap 4229 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[4] = core_ticks_to_us(adap, adap 4231 drivers/net/ethernet/chelsio/cxgb4/sge.c s->timer_val[5] = core_ticks_to_us(adap, adap 4234 drivers/net/ethernet/chelsio/cxgb4/sge.c ingress_rx_threshold = t4_read_reg(adap, SGE_INGRESS_RX_THRESHOLD_A); adap 4250 drivers/net/ethernet/chelsio/cxgb4/sge.c int t4_sge_init(struct adapter *adap) adap 4252 drivers/net/ethernet/chelsio/cxgb4/sge.c struct sge *s = &adap->sge; adap 4260 drivers/net/ethernet/chelsio/cxgb4/sge.c sge_control = t4_read_reg(adap, SGE_CONTROL_A); adap 4264 drivers/net/ethernet/chelsio/cxgb4/sge.c s->fl_align = t4_fl_pkt_align(adap); adap 4265 drivers/net/ethernet/chelsio/cxgb4/sge.c ret = t4_sge_init_soft(adap); adap 4281 drivers/net/ethernet/chelsio/cxgb4/sge.c sge_conm_ctrl = t4_read_reg(adap, SGE_CONM_CTRL_A); adap 4282 drivers/net/ethernet/chelsio/cxgb4/sge.c switch (CHELSIO_CHIP_VERSION(adap->params.chip)) { adap 4293 drivers/net/ethernet/chelsio/cxgb4/sge.c dev_err(adap->pdev_dev, "Unsupported Chip version %d\n", adap 4294 drivers/net/ethernet/chelsio/cxgb4/sge.c CHELSIO_CHIP_VERSION(adap->params.chip)); adap 4299 drivers/net/ethernet/chelsio/cxgb4/sge.c t4_idma_monitor_init(adap, &s->idma_monitor); adap 119 drivers/net/ethernet/chelsio/cxgb4/smt.c void do_smt_write_rpl(struct adapter *adap, const struct cpl_smt_write_rpl *rpl) adap 122 drivers/net/ethernet/chelsio/cxgb4/smt.c struct smt_data *s = adap->smt; adap 127 drivers/net/ethernet/chelsio/cxgb4/smt.c dev_err(adap->pdev_dev, adap 208 drivers/net/ethernet/chelsio/cxgb4/smt.c static struct smt_entry *t4_smt_alloc_switching(struct adapter *adap, u16 pfvf, adap 211 drivers/net/ethernet/chelsio/cxgb4/smt.c struct smt_data *s = adap->smt; adap 223 drivers/net/ethernet/chelsio/cxgb4/smt.c write_smt_entry(adap, e); adap 242 drivers/net/ethernet/chelsio/cxgb4/smt.c struct adapter *adap = netdev2adap(dev); adap 244 drivers/net/ethernet/chelsio/cxgb4/smt.c return t4_smt_alloc_switching(adap, 0x0, smac); adap 72 drivers/net/ethernet/chelsio/cxgb4/srq.c struct adapter *adap; adap 77 drivers/net/ethernet/chelsio/cxgb4/srq.c adap = netdev2adap(dev); adap 78 drivers/net/ethernet/chelsio/cxgb4/srq.c s = adap->srq; adap 80 drivers/net/ethernet/chelsio/cxgb4/srq.c if (!(adap->flags & CXGB4_FULL_INIT_DONE) || !s) adap 91 drivers/net/ethernet/chelsio/cxgb4/srq.c TID_QID_V(adap->sge.fw_evtq.abs_id))); adap 97 drivers/net/ethernet/chelsio/cxgb4/srq.c t4_mgmt_tx(adap, skb); adap 112 drivers/net/ethernet/chelsio/cxgb4/srq.c void do_srq_table_rpl(struct adapter *adap, adap 116 drivers/net/ethernet/chelsio/cxgb4/srq.c struct srq_data *s = adap->srq; adap 120 drivers/net/ethernet/chelsio/cxgb4/srq.c dev_err(adap->pdev_dev, adap 63 drivers/net/ethernet/chelsio/cxgb4/srq.h void do_srq_table_rpl(struct adapter *adap, adap 113 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_indirect(struct adapter *adap, unsigned int addr_reg, adap 118 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, addr_reg, start_idx); adap 119 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *vals++ = t4_read_reg(adap, data_reg); adap 136 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_write_indirect(struct adapter *adap, unsigned int addr_reg, adap 141 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, addr_reg, start_idx++); adap 142 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, data_reg, *vals++); adap 152 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_hw_pci_read_cfg4(struct adapter *adap, int reg, u32 *val) adap 154 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 req = FUNCTION_V(adap->pf) | REGISTER_V(reg); adap 156 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 161 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) adap 164 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PCIE_CFG_SPACE_REQ_A, req); adap 165 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *val = t4_read_reg(adap, PCIE_CFG_SPACE_DATA_A); adap 172 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PCIE_CFG_SPACE_REQ_A, 0); adap 183 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void t4_report_fw_error(struct adapter *adap) adap 197 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pcie_fw = t4_read_reg(adap, PCIE_FW_A); adap 199 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "Firmware reports adapter error: %s\n", adap 201 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->flags &= ~CXGB4_FW_OK; adap 208 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit, adap 212 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *rpl++ = cpu_to_be64(t4_read_reg64(adap, mbox_addr)); adap 218 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void fw_asrt(struct adapter *adap, u32 mbox_addr) adap 222 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c get_mbox_rpl(adap, (__be64 *)&asrt, sizeof(asrt) / 8, mbox_addr); adap 223 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, adap 282 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, adap 308 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (adap->pdev->error_state != pci_channel_io_normal) adap 322 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_lock_bh(&adap->mbox_lock); adap 323 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c list_add_tail(&entry.list, &adap->mlist.list); adap 324 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_unlock_bh(&adap->mbox_lock); adap 335 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pcie_fw = t4_read_reg(adap, PCIE_FW_A); adap 337 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_lock_bh(&adap->mbox_lock); adap 339 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_unlock_bh(&adap->mbox_lock); adap 341 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_record_mbox(adap, cmd, size, access, ret); adap 348 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (list_first_entry(&adap->mlist.list, struct mbox_list, adap 366 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = MBOWNER_G(t4_read_reg(adap, ctl_reg)); adap 368 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = MBOWNER_G(t4_read_reg(adap, ctl_reg)); adap 370 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_lock_bh(&adap->mbox_lock); adap 372 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_unlock_bh(&adap->mbox_lock); adap 374 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_record_mbox(adap, cmd, size, access, ret); adap 379 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_record_mbox(adap, cmd, size, access, 0); adap 381 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg64(adap, data_reg + i, be64_to_cpu(*p++)); adap 383 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ctl_reg, MBMSGVALID_F | MBOWNER_V(MBOX_OWNER_FW)); adap 384 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, ctl_reg); /* flush write */ adap 390 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c !((pcie_fw = t4_read_reg(adap, PCIE_FW_A)) & PCIE_FW_ERR_F) && adap 401 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, ctl_reg); adap 404 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ctl_reg, 0); adap 408 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c get_mbox_rpl(adap, cmd_rpl, MBOX_LEN / 8, data_reg); adap 412 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c fw_asrt(adap, data_reg); adap 418 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ctl_reg, 0); adap 421 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_record_mbox(adap, cmd_rpl, adap 423 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_lock_bh(&adap->mbox_lock); adap 425 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_unlock_bh(&adap->mbox_lock); adap 431 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_record_mbox(adap, cmd, size, access, ret); adap 432 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "command %#x in mailbox %d timed out\n", adap 434 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_report_fw_error(adap); adap 435 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_lock_bh(&adap->mbox_lock); adap 437 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c spin_unlock_bh(&adap->mbox_lock); adap 438 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 442 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, adap 445 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, sleep_ok, adap 449 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_edc_err_read(struct adapter *adap, int idx) adap 454 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 455 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, "%s: T4 NOT supported.\n", __func__); adap 459 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, "%s: idx %d NOT supported.\n", __func__, idx); adap 466 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, adap 469 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, edc_ecc_err_addr_reg)); adap 470 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, adap 473 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg), adap 474 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 8), adap 475 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 16), adap 476 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 24), adap 477 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 32), adap 478 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 40), adap 479 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 48), adap 480 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 56), adap 481 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (unsigned long long)t4_read_reg64(adap, rdata_reg + 64)); adap 497 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_memory_rw_init(struct adapter *adap, int win, int mtype, u32 *mem_off, adap 509 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c edc_size = EDRAM0_SIZE_G(t4_read_reg(adap, MA_EDRAM0_BAR_A)); adap 515 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c mc_size = EXT_MEM0_SIZE_G(t4_read_reg(adap, adap 528 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c mem_reg = t4_read_reg(adap, adap 537 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) adap 538 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *mem_base -= adap->t4_bar0; adap 551 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_memory_update_win(struct adapter *adap, int win, u32 addr) adap 553 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, adap 559 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, adap 573 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_memory_rw_residual(struct adapter *adap, u32 off, u32 addr, u8 *buf, adap 585 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, addr)); adap 592 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, addr, adap 614 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr, adap 636 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_memory_rw_init(adap, win, mtype, &memoffset, &mem_base, adap 644 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c win_pf = is_t4(adap->params.chip) ? 0 : PFNUM_V(adap->pf); adap 655 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_memory_update_win(adap, win, pos | win_pf); adap 693 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *buf++ = le32_to_cpu((__force __le32)t4_read_reg(adap, adap 696 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, mem_base + offset, adap 710 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_memory_update_win(adap, win, pos | win_pf); adap 720 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_memory_rw_residual(adap, resid, mem_base + offset, adap 731 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 t4_read_pcie_cfg4(struct adapter *adap, int reg) adap 750 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (FW_LDST_CMD_LC_F | FW_LDST_CMD_FN_V(adap->pf)); adap 756 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, adap->mbox, &ldst_cmd, sizeof(ldst_cmd), adap 764 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_hw_pci_read_cfg4(adap, reg, &val); adap 772 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static u32 t4_get_window(struct adapter *adap, u32 pci_base, u64 pci_mask, adap 777 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 789 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c bar0 = t4_read_pcie_cfg4(adap, pci_base); adap 791 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->t4_bar0 = bar0; adap 802 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 t4_get_util_window(struct adapter *adap) adap 804 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_get_window(adap, PCI_BASE_ADDRESS_0, adap 812 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_setup_memwin(struct adapter *adap, u32 memwin_base, u32 window) adap 814 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, adap 818 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, adap 856 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size) adap 2648 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int chip_version = CHELSIO_CHIP_VERSION(adap->params.chip); adap 2670 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 2688 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *bufp++ = t4_read_reg(adap, reg); adap 3180 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_get_exprom_version(struct adapter *adap, u32 *vers) adap 3190 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_read_flash(adap, FLASH_EXP_ROM_START, adap 3388 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_check_fw_version(struct adapter *adap) adap 3392 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int chip_version = CHELSIO_CHIP_VERSION(adap->params.chip); adap 3394 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_get_fw_version(adap, &adap->params.fw_vers); adap 3397 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_get_fw_version(adap, &adap->params.fw_vers); adap 3402 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c major = FW_HDR_FW_VER_MAJOR_G(adap->params.fw_vers); adap 3403 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c minor = FW_HDR_FW_VER_MINOR_G(adap->params.fw_vers); adap 3404 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c micro = FW_HDR_FW_VER_MICRO_G(adap->params.fw_vers); adap 3423 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "Unsupported chip type, %x\n", adap 3424 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->chip); adap 3430 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3462 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int should_install_fs_fw(struct adapter *adap, int card_fw_usable, adap 3480 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "firmware on card (%u.%u.%u.%u) is %s, " adap 3490 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info, adap 3502 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = -t4_read_flash(adap, FLASH_FW_START, adap 3508 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3528 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c should_install_fs_fw(adap, card_fw_usable, adap 3531 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = -t4_fw_upgrade(adap, adap->mbox, fw_data, adap 3534 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3552 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "Cannot find a usable firmware: " adap 3568 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.fw_vers = be32_to_cpu(card_fw->fw_ver); adap 3569 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp_vers = be32_to_cpu(card_fw->tp_microcode_ver); adap 3626 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static bool t4_fw_matches_chip(const struct adapter *adap, adap 3632 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if ((is_t4(adap->params.chip) && hdr->chip == FW_HDR_CHIP_T4) || adap 3633 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (is_t5(adap->params.chip) && hdr->chip == FW_HDR_CHIP_T5) || adap 3634 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (is_t6(adap->params.chip) && hdr->chip == FW_HDR_CHIP_T6)) adap 3637 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3639 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c hdr->chip, CHELSIO_CHIP_VERSION(adap->params.chip)); adap 3651 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size) adap 3659 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec; adap 3665 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "FW image has no data\n"); adap 3669 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3674 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3679 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "FW image too large, max is %u bytes\n", adap 3683 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (!t4_fw_matches_chip(adap, hdr)) adap 3690 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, adap 3696 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_flash_erase_sectors(adap, fw_start_sec, fw_start_sec + i - 1); adap 3707 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_write_flash(adap, fw_start, SF_PAGE_SIZE, first_page); adap 3715 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_write_flash(adap, addr, SF_PAGE_SIZE, fw_data); adap 3720 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_write_flash(adap, adap 3725 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "firmware download failed, error %d\n", adap 3728 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_get_fw_version(adap, &adap->params.fw_vers); adap 3740 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver) adap 3747 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c FW_PARAMS_PARAM_Y_V(adap->params.portvec) | adap 3749 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, adap 3784 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_load_phy_fw(struct adapter *adap, adap 3799 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_phy_fw_ver(adap, &cur_phy_fw_ver); adap 3804 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, "PHY Firmware already up-to-date, " adap 3818 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c FW_PARAMS_PARAM_Y_V(adap->params.portvec) | adap 3821 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_query_params_rw(adap, adap->mbox, adap->pf, 0, 1, adap 3833 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_memory_rw(adap, win, mtype, maddr, adap 3848 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c FW_PARAMS_PARAM_Y_V(adap->params.portvec) | adap 3850 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, adap 3857 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_phy_fw_ver(adap, &cur_phy_fw_ver); adap 3862 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c CH_WARN(adap, "PHY Firmware did not update: " adap 3878 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op) adap 3886 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c FW_PARAMS_CMD_PFN_V(adap->pf) | adap 3894 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL); adap 3897 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp, adap 3904 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg = t4_read_reg(adap, CIM_DEBUGCFG_A); adap 3906 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, cfg ^ LADBGEN_F); adap 3908 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c val = t4_read_reg(adap, CIM_DEBUGSTS_A); adap 3918 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, POLADBGRDPTR_V(req) | adap 3920 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *pif_req++ = t4_read_reg(adap, CIM_PO_LA_DEBUGDATA_A); adap 3921 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *pif_rsp++ = t4_read_reg(adap, CIM_PI_LA_DEBUGDATA_A); adap 3928 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, cfg); adap 3931 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp) adap 3936 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg = t4_read_reg(adap, CIM_DEBUGCFG_A); adap 3938 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, cfg ^ LADBGEN_F); adap 3943 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, POLADBGRDPTR_V(idx) | adap 3945 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *ma_req++ = t4_read_reg(adap, CIM_PO_LA_MADEBUGDATA_A); adap 3946 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *ma_rsp++ = t4_read_reg(adap, CIM_PI_LA_MADEBUGDATA_A); adap 3949 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_DEBUGCFG_A, cfg); adap 3952 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf) adap 3959 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ULP_RX_LA_CTL_A, i); adap 3960 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c j = t4_read_reg(adap, ULP_RX_LA_WRPTR_A); adap 3961 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ULP_RX_LA_RDPTR_A, j); adap 3963 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *p = t4_read_reg(adap, ULP_RX_LA_RDDATA_A); adap 4273 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port) adap 4275 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int fw_caps = adap->params.fw_caps_support; adap 4291 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 4294 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c typedef void (*int_handler_t)(struct adapter *adap); adap 4731 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void le_intr_handler(struct adapter *adap) adap 4733 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip); adap 4752 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_handle_intr_status(adap, LE_DB_INT_CAUSE_A, adap 4755 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 4897 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void ma_intr_handler(struct adapter *adap) adap 4899 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 v, status = t4_read_reg(adap, MA_INT_CAUSE_A); adap 4902 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, adap 4904 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, MA_PARITY_ERROR_STATUS1_A)); adap 4905 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t5(adap->params.chip)) adap 4906 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, adap 4908 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, adap 4912 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, MA_INT_WRAP_STATUS_A); adap 4913 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, "MA address wrap-around error by " adap 4918 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, MA_INT_CAUSE_A, status); adap 4919 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 4925 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void smb_intr_handler(struct adapter *adap) adap 4934 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_handle_intr_status(adap, SMB_INT_CAUSE_A, smb_intr_info)) adap 4935 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 4941 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void ncsi_intr_handler(struct adapter *adap) adap 4951 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_handle_intr_status(adap, NCSI_INT_CAUSE_A, ncsi_intr_info)) adap 4952 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 4958 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void xgmac_intr_handler(struct adapter *adap, int port) adap 4962 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) adap 4967 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, int_cause_reg); adap 4974 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, "XGMAC %d Tx FIFO parity error\n", adap 4977 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_alert(adap->pdev_dev, "XGMAC %d Rx FIFO parity error\n", adap 4979 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PORT_REG(port, XGMAC_PORT_INT_CAUSE_A), v); adap 4980 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 4986 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void pl_intr_handler(struct adapter *adap) adap 4994 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_handle_intr_status(adap, PL_PL_INT_CAUSE_A, pl_intr_info)) adap 4995 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_fatal_err(adap); adap 5132 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int t4_chip_rss_size(struct adapter *adap) adap 5134 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 5262 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int rd_rss_row(struct adapter *adap, int row, u32 *val) adap 5264 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_RSS_LKP_TABLE_A, 0xfff00000 | row); adap 5265 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wait_op_done_val(adap, TP_RSS_LKP_TABLE_A, LKPTBLROWVLD_F, 1, adap 5292 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static unsigned int t4_use_ldst(struct adapter *adap) adap 5294 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return (adap->flags & CXGB4_FW_OK) && !adap->use_bd; adap 5309 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_tp_fw_ldst_rw(struct adapter *adap, int cmd, u32 *vals, adap 5328 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, adap 5353 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void t4_tp_indirect_rw(struct adapter *adap, u32 reg_addr, u32 reg_data, adap 5374 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_use_ldst(adap)) adap 5375 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c rc = t4_tp_fw_ldst_rw(adap, cmd, buff, nregs, start_index, rw, adap 5382 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_indirect(adap, reg_addr, reg_data, buff, nregs, adap 5385 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_indirect(adap, reg_addr, reg_data, buff, nregs, adap 5400 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs, adap 5403 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_indirect_rw(adap, TP_PIO_ADDR_A, TP_PIO_DATA_A, buff, nregs, adap 5417 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static void t4_tp_pio_write(struct adapter *adap, u32 *buff, u32 nregs, adap 5420 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_indirect_rw(adap, TP_PIO_ADDR_A, TP_PIO_DATA_A, buff, nregs, adap 5434 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs, adap 5437 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_indirect_rw(adap, TP_TM_PIO_ADDR_A, TP_TM_PIO_DATA_A, buff, adap 5451 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs, u32 start_index, adap 5454 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_indirect_rw(adap, TP_MIB_INDEX_A, TP_MIB_DATA_A, buff, nregs, adap 5466 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_rss_key(struct adapter *adap, u32 *key, bool sleep_ok) adap 5468 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_read(adap, key, 10, TP_RSS_SECRET_KEY0_A, sleep_ok); adap 5482 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx, adap 5486 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 vrt = t4_read_reg(adap, TP_RSS_CONFIG_VRT_A); adap 5492 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if ((CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) && adap 5496 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_write(adap, (void *)key, 10, TP_RSS_SECRET_KEY0_A, sleep_ok); adap 5500 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_RSS_CONFIG_VRT_A, adap 5504 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_RSS_CONFIG_VRT_A, adap 5602 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, adap 5612 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, val, ARRAY_SIZE(val), adap 5620 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, val, ARRAY_SIZE(val), adap 5640 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st, adap 5643 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int nchan = adap->params.arch.nchan; adap 5645 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->mac_in_errs, nchan, TP_MIB_MAC_IN_ERR_0_A, adap 5647 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->hdr_in_errs, nchan, TP_MIB_HDR_IN_ERR_0_A, adap 5649 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tcp_in_errs, nchan, TP_MIB_TCP_IN_ERR_0_A, adap 5651 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tnl_cong_drops, nchan, adap 5653 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->ofld_chan_drops, nchan, adap 5655 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tnl_tx_drops, nchan, TP_MIB_TNL_DROP_0_A, adap 5657 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->ofld_vlan_drops, nchan, adap 5659 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tcp6_in_errs, nchan, adap 5661 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->ofld_no_neigh, 2, TP_MIB_OFD_ARP_DROP_A, adap 5673 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st, adap 5676 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int nchan = adap->params.arch.nchan; adap 5678 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->req, nchan, TP_MIB_CPL_IN_REQ_0_A, sleep_ok); adap 5680 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->rsp, nchan, TP_MIB_CPL_OUT_RSP_0_A, sleep_ok); adap 5691 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st, adap 5694 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->rqe_dfr_pkt, 2, TP_MIB_RQE_DFR_PKT_A, adap 5707 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx, adap 5712 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->frames_ddp, 1, TP_MIB_FCOE_DDP_0_A + idx, adap 5715 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->frames_drop, 1, adap 5718 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, val, 2, TP_MIB_FCOE_BYTE_0_HI_A + 2 * idx, adap 5732 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st, adap 5737 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, val, 4, TP_MIB_USM_PKTS_A, sleep_ok); adap 5751 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log) adap 5757 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_MTU_TABLE_A, adap 5759 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_MTU_TABLE_A); adap 5774 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]) adap 5780 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_CCTRL_TABLE_A, adap 5782 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c incr[mtu][w] = (u16)t4_read_reg(adap, adap 5796 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr, adap 5799 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_PIO_ADDR_A, addr); adap 5800 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c val |= t4_read_reg(adap, TP_PIO_DATA_A) & ~mask; adap 5801 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_PIO_DATA_A, val); adap 5863 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, adap 5880 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_MTU_TABLE_A, MTUINDEX_V(i) | adap 5889 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_CCTRL_TABLE_A, (i << 21) | adap 5904 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static u64 chan_rate(struct adapter *adap, unsigned int bytes256) adap 5906 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u64 v = bytes256 * adap->params.vpd.cclk; adap 5920 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate) adap 5924 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_TX_TRATE_A); adap 5925 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c nic_rate[0] = chan_rate(adap, TNLRATE0_G(v)); adap 5926 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c nic_rate[1] = chan_rate(adap, TNLRATE1_G(v)); adap 5927 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (adap->params.arch.nchan == NCHAN) { adap 5928 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c nic_rate[2] = chan_rate(adap, TNLRATE2_G(v)); adap 5929 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c nic_rate[3] = chan_rate(adap, TNLRATE3_G(v)); adap 5932 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_TX_ORATE_A); adap 5933 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ofld_rate[0] = chan_rate(adap, OFDRATE0_G(v)); adap 5934 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ofld_rate[1] = chan_rate(adap, OFDRATE1_G(v)); adap 5935 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (adap->params.arch.nchan == NCHAN) { adap 5936 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ofld_rate[2] = chan_rate(adap, OFDRATE2_G(v)); adap 5937 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ofld_rate[3] = chan_rate(adap, OFDRATE3_G(v)); adap 5952 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_trace_filter(struct adapter *adap, const struct trace_params *tp, adap 5959 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A_A + ofst, 0); adap 5963 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg = t4_read_reg(adap, MPS_TRC_CFG_A); adap 5980 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (tp->port > (is_t4(adap->params.chip) ? 11 : 19) || tp->invert > 1 || adap 5986 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A_A + ofst, 0); adap 5993 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, data_reg, tp->data[i]); adap 5994 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, mask_reg, ~tp->mask[i]); adap 5996 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_B_A + ofst, adap 5999 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A_A + ofst, adap 6001 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (is_t4(adap->params.chip) ? adap 6018 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_trace_filter(struct adapter *adap, struct trace_params *tp, int idx, adap 6025 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ctla = t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_A_A + ofst); adap 6026 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ctlb = t4_read_reg(adap, MPS_TRC_FILTER_MATCH_CTL_B_A + ofst); adap 6028 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 6047 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->mask[i] = ~t4_read_reg(adap, mask_reg); adap 6048 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->data[i] = t4_read_reg(adap, data_reg) & tp->mask[i]; adap 6060 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]) adap 6065 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for (i = 0; i < adap->params.arch.pm_stats_cnt; i++) { adap 6066 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PM_TX_STAT_CONFIG_A, i + 1); adap 6067 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cnt[i] = t4_read_reg(adap, PM_TX_STAT_COUNT_A); adap 6068 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 6069 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cycles[i] = t4_read_reg64(adap, PM_TX_STAT_LSB_A); adap 6071 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_indirect(adap, PM_TX_DBG_CTRL_A, adap 6087 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]) adap 6092 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for (i = 0; i < adap->params.arch.pm_stats_cnt; i++) { adap 6093 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PM_RX_STAT_CONFIG_A, i + 1); adap 6094 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cnt[i] = t4_read_reg(adap, PM_RX_STAT_COUNT_A); adap 6095 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 6096 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cycles[i] = t4_read_reg64(adap, PM_RX_STAT_LSB_A); adap 6098 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_indirect(adap, PM_RX_DBG_CTRL_A, adap 6252 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int t4_get_tp_ch_map(struct adapter *adap, int pidx) adap 6254 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int chip_version = CHELSIO_CHIP_VERSION(adap->params.chip); adap 6255 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int nports = 1 << NUMPORTS_G(t4_read_reg(adap, MPS_CMN_CTL_A)); adap 6258 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_warn(adap->pdev_dev, "TP Port Index %d >= Nports %d\n", adap 6285 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "Need TP Channel Map for Chip %0x, Nports %d\n", adap 6335 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_port_stats_offset(struct adapter *adap, int idx, adap 6342 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_get_port_stats(adap, idx, stats); adap 6357 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p) adap 6359 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 bgmap = t4_get_mps_bg_map(adap, idx); adap 6360 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 stat_ctl = t4_read_reg(adap, MPS_STAT_CTL_A); adap 6363 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg64(adap, \ adap 6364 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (is_t4(adap->params.chip) ? PORT_REG(idx, MPS_PORT_STAT_##name##_L) : \ adap 6366 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c #define GET_STAT_COM(name) t4_read_reg64(adap, MPS_STAT_##name##_L) adap 6392 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) >= CHELSIO_T5) { adap 6426 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) >= CHELSIO_T5) { adap 6454 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p) adap 6456 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c u32 bgmap = t4_get_mps_bg_map(adap, idx); adap 6459 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg64(adap, \ adap 6460 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (is_t4(adap->params.chip) ? \ adap 6463 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c #define GET_STAT_COM(name) t4_read_reg64(adap, MPS_STAT_##name##_L) adap 6522 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, adap 6538 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 6552 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, adap 6569 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 6586 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, adap 6603 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 6780 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type) adap 6796 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 6810 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_read_sge_dbqtimers(struct adapter *adap, unsigned int ndbqtimers, adap 6830 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, adap 6852 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, adap 6880 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 6884 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_read_reg(adap, PCIE_FW_A) & PCIE_FW_ERR_F) adap 6885 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_report_fw_error(adap); adap 6934 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pcie_fw = t4_read_reg(adap, PCIE_FW_A); adap 6978 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fw_bye(struct adapter *adap, unsigned int mbox) adap 6984 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 6995 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_early_init(struct adapter *adap, unsigned int mbox) adap 7001 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 7012 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset) adap 7019 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 7038 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force) adap 7053 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 7070 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, CIM_BOOT_CFG_A, UPCRST_F, UPCRST_F); adap 7071 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, PCIE_FW_A, PCIE_FW_HALT_F, adap 7103 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset) adap 7111 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, PCIE_FW_A, PCIE_FW_HALT_F, 0); adap 7121 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, CIM_BOOT_CFG_A, UPCRST_F, 0); adap 7123 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_fw_reset(adap, mbox, adap 7128 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, PL_RST_A, PIORST_F | PIORSTMODE_F); adap 7133 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, CIM_BOOT_CFG_A, UPCRST_F, 0); adap 7135 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (!(t4_read_reg(adap, PCIE_FW_A) & PCIE_FW_HALT_F)) adap 7166 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, adap 7172 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (!t4_fw_matches_chip(adap, fw_hdr)) adap 7178 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->flags &= ~CXGB4_FW_OK; adap 7180 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_fw_halt(adap, mbox, force); adap 7184 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_load_fw(adap, fw_data, size); adap 7197 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (void)t4_load_cfg(adap, NULL, 0); adap 7208 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_fw_restart(adap, mbox, reset); adap 7215 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (void)t4_init_devlog_params(adap); adap 7217 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->flags |= CXGB4_FW_OK; adap 7230 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fl_pkt_align(struct adapter *adap) adap 7235 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c sge_control = t4_read_reg(adap, SGE_CONTROL_A); adap 7249 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= CHELSIO_T5) adap 7257 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (!is_t4(adap->params.chip)) { adap 7261 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c sge_control2 = t4_read_reg(adap, SGE_CONTROL2_A); adap 7284 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fixup_host_params(struct adapter *adap, unsigned int page_size, adap 7293 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SGE_HOST_PAGE_SIZE_A, adap 7303 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t4(adap->params.chip)) { adap 7304 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, SGE_CONTROL_A, adap 7337 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (pci_is_pcie(adap->pdev)) { adap 7345 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pcie_capability_read_word(adap->pdev, PCI_EXP_DEVCTL, adap 7376 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t5(adap->params.chip)) adap 7381 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, SGE_CONTROL_A, adap 7386 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_set_reg_field(adap, SGE_CONTROL2_A, adap 7411 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SGE_FL_BUFFER_SIZE0_A, page_size); adap 7412 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SGE_FL_BUFFER_SIZE2_A, adap 7413 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (t4_read_reg(adap, SGE_FL_BUFFER_SIZE2_A) + fl_align-1) adap 7415 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SGE_FL_BUFFER_SIZE3_A, adap 7416 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c (t4_read_reg(adap, SGE_FL_BUFFER_SIZE3_A) + fl_align-1) adap 7419 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, ULP_RX_TDDP_PSZ_A, HPZ0_V(page_shift - 12)); adap 7432 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_fw_initialize(struct adapter *adap, unsigned int mbox) adap 7438 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 7456 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7481 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); adap 7488 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7492 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_query_params_rw(adap, mbox, pf, vf, nparams, params, val, 0, adap 7496 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_query_params_ns(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7500 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_query_params_rw(adap, mbox, pf, vf, nparams, params, val, 0, adap 7518 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_params_timeout(struct adapter *adap, unsigned int mbox, adap 7541 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_timeout(adap, mbox, &c, sizeof(c), NULL, timeout); adap 7557 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7561 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_set_params_timeout(adap, mbox, pf, vf, nparams, params, val, adap 7586 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7610 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 7630 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, adap 7645 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 7687 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_free_vi(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 7701 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 7718 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 7747 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); adap 7761 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 7783 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); adap 7802 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid, adap 7834 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); adap 7853 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, adap 7880 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); adap 7901 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid, adap 7932 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); adap 7964 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, adap 7971 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int max_naddr = adap->params.arch.mps_tcam_size; adap 8008 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); adap 8049 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_free_mac_filt(struct adapter *adap, unsigned int mbox, adap 8056 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int max_naddr = is_t4(adap->params.chip) ? adap 8090 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); adap 8130 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 8136 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int max_mac_addr = adap->params.arch.mps_tcam_size; adap 8152 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 8158 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (adap->params.viid_smt_extn_support) { adap 8167 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) <= adap 8189 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 8202 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); adap 8217 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, adap 8230 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL); adap 8243 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 8246 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_enable_vi_params(adap, mbox, viid, rx_en, tx_en, 0); adap 8264 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_enable_pi_params(struct adapter *adap, unsigned int mbox, adap 8268 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int ret = t4_enable_vi_params(adap, mbox, pi->viid, adap 8272 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_os_link_changed(adap, pi->port_id, adap 8286 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, adap 8297 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8315 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 8330 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8346 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 8361 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8374 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 8386 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8399 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 8411 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8424 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, adap 8436 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); adap 8835 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl) adap 8855 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for_each_port(adap, i) { adap 8856 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pi = adap2pinfo(adap, i); adap 8863 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_warn(adap->pdev_dev, "Unknown firmware reply %d\n", adap 8944 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_get_flash_params(struct adapter *adap) adap 8964 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = sf1_write(adap, 1, 1, 0, SF_RD_ID); adap 8966 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = sf1_read(adap, 3, 0, 1, &flashid); adap 8967 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SF_OP_A, 0); /* unlock SF */ adap 8975 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.sf_size = supported_flash[part].size_mb; adap 8976 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.sf_nsec = adap 8977 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.sf_size / SF_SEC_SIZE; adap 9081 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_warn(adap->pdev_dev, "Unknown Flash Part, ID = %#x, assuming 4MB\n", adap 9087 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.sf_size = size; adap 9088 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.sf_nsec = size / SF_SEC_SIZE; adap 9091 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (adap->params.sf_size < FLASH_MIN_SIZE) adap 9092 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_warn(adap->pdev_dev, "WARNING: Flash Part ID %#x, size %#x < %#x\n", adap 9093 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c flashid, adap->params.sf_size, FLASH_MIN_SIZE); adap 9317 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_init_devlog_params(struct adapter *adap) adap 9319 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c struct devlog_params *dparams = &adap->params.devlog; adap 9330 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_read_reg(adap, PCIE_FW_REG(PCIE_FW_PF_A, PCIE_FW_PF_DEVLOG)); adap 9350 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, adap->mbox, &devlog_cmd, sizeof(devlog_cmd), adap 9402 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_init_tp_params(struct adapter *adap, bool sleep_ok) adap 9408 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_TIMER_RESOLUTION_A); adap 9409 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tre = TIMERRESOLUTION_G(v); adap 9410 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.dack_re = DELAYEDACKRESOLUTION_G(v); adap 9414 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tx_modq[chan] = chan; adap 9424 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, adap 9427 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_info(adap->pdev_dev, adap 9431 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vlan_pri_map = adap 9433 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.filter_mask = adap 9436 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_info(adap->pdev_dev, adap 9444 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_read(adap, &adap->params.tp.vlan_pri_map, 1, adap 9454 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.filter_mask = adap->params.tp.vlan_pri_map; adap 9457 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_read(adap, &adap->params.tp.ingress_config, 1, adap 9463 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { adap 9464 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_OUT_CONFIG_A); adap 9465 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.rx_pkt_encap = (v & CRXPKTENC_F) ? 1 : 0; adap 9472 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.fcoe_shift = t4_filter_field_shift(adap, FCOE_F); adap 9473 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.port_shift = t4_filter_field_shift(adap, PORT_F); adap 9474 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vnic_shift = t4_filter_field_shift(adap, VNIC_ID_F); adap 9475 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vlan_shift = t4_filter_field_shift(adap, VLAN_F); adap 9476 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tos_shift = t4_filter_field_shift(adap, TOS_F); adap 9477 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.protocol_shift = t4_filter_field_shift(adap, adap 9479 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.ethertype_shift = t4_filter_field_shift(adap, adap 9481 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.macmatch_shift = t4_filter_field_shift(adap, adap 9483 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.matchtype_shift = t4_filter_field_shift(adap, adap 9485 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.frag_shift = t4_filter_field_shift(adap, adap 9491 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if ((adap->params.tp.ingress_config & VNIC_F) == 0) adap 9492 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vnic_shift = -1; adap 9494 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, LE_3_DB_HASH_MASK_GEN_IPV4_T6_A); adap 9495 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.hash_filter_mask = v; adap 9496 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, LE_4_DB_HASH_MASK_GEN_IPV4_T6_A); adap 9497 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.hash_filter_mask |= ((u64)v << 32); adap 9510 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_filter_field_shift(const struct adapter *adap, int filter_sel) adap 9512 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int filter_mode = adap->params.tp.vlan_pri_map; adap 9556 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_init_rss_mode(struct adapter *adap, int mbox) adap 9563 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for_each_port(adap, i) { adap 9564 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c struct port_info *p = adap2pinfo(adap, i); adap 9571 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &rvc, sizeof(rvc), &rvc); adap 9689 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_port_init(struct adapter *adap, int mbox, int pf, int vf) adap 9694 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for_each_port(adap, i) { adap 9695 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c struct port_info *pi = adap2pinfo(adap, i); adap 9697 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c while ((adap->params.portvec & (1 << j)) == 0) adap 9704 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN); adap 9720 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres) adap 9723 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int cim_num_obq = is_t4(adap->params.chip) ? adap 9727 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_QUEUE_CONFIG_REF_A, IBQSELECT_F | adap 9729 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, CIM_QUEUE_CONFIG_CTRL_A); adap 9736 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_QUEUE_CONFIG_REF_A, OBQSELECT_F | adap 9738 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, CIM_QUEUE_CONFIG_CTRL_A); adap 9756 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n) adap 9775 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_IBQ_DBG_CFG_A, IBQDBGADDR_V(addr) | adap 9777 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c err = t4_wait_op_done(adap, CIM_IBQ_DBG_CFG_A, IBQDBGBUSY_F, 0, adap 9781 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *data++ = t4_read_reg(adap, CIM_IBQ_DBG_DATA_A); adap 9783 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_IBQ_DBG_CFG_A, 0); adap 9798 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n) adap 9802 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int cim_num_obq = is_t4(adap->params.chip) ? adap 9808 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_QUEUE_CONFIG_REF_A, OBQSELECT_F | adap 9810 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, CIM_QUEUE_CONFIG_CTRL_A); adap 9818 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_OBQ_DBG_CFG_A, OBQDBGADDR_V(addr) | adap 9820 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c err = t4_wait_op_done(adap, CIM_OBQ_DBG_CFG_A, OBQDBGBUSY_F, 0, adap 9824 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *data++ = t4_read_reg(adap, CIM_OBQ_DBG_DATA_A); adap 9826 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_OBQ_DBG_CFG_A, 0); adap 9839 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n, adap 9844 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_read_reg(adap, CIM_HOST_ACC_CTRL_A) & HOSTBUSY_F) adap 9848 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_HOST_ACC_CTRL_A, addr); adap 9849 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wait_op_done(adap, CIM_HOST_ACC_CTRL_A, HOSTBUSY_F, adap 9852 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *valp++ = t4_read_reg(adap, CIM_HOST_ACC_DATA_A); adap 9866 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n, adap 9871 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (t4_read_reg(adap, CIM_HOST_ACC_CTRL_A) & HOSTBUSY_F) adap 9875 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_HOST_ACC_DATA_A, *valp++); adap 9876 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, CIM_HOST_ACC_CTRL_A, addr | HOSTWRITE_F); adap 9877 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wait_op_done(adap, CIM_HOST_ACC_CTRL_A, HOSTBUSY_F, adap 9883 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c static int t4_cim_write1(struct adapter *adap, unsigned int addr, adap 9886 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_cim_write(adap, addr, 1, &val); adap 9899 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr) adap 9904 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_read(adap, UP_UP_DBG_LA_CFG_A, 1, &cfg); adap 9909 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_write1(adap, UP_UP_DBG_LA_CFG_A, 0); adap 9914 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_read(adap, UP_UP_DBG_LA_CFG_A, 1, &val); adap 9922 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for (i = 0; i < adap->params.cim_la_size; i++) { adap 9923 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_write1(adap, UP_UP_DBG_LA_CFG_A, adap 9927 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_read(adap, UP_UP_DBG_LA_CFG_A, 1, &val); adap 9934 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_cim_read(adap, UP_UP_DBG_LA_DATA_A, 1, &la_buf[i]); adap 9941 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (is_t6(adap->params.chip) && (idx & 0xf) >= 9) adap 9950 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int r = t4_cim_write1(adap, UP_UP_DBG_LA_CFG_A, adap 9968 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr) adap 9973 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg = t4_read_reg(adap, TP_DBG_LA_CONFIG_A) & 0xffff; adap 9975 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_DBG_LA_CONFIG_A, adap 9976 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.la_mask | (cfg ^ DBGLAENABLE_F)); adap 9978 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c val = t4_read_reg(adap, TP_DBG_LA_CONFIG_A); adap 9988 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c val |= adap->params.tp.la_mask; adap 9991 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_DBG_LA_CONFIG_A, DBGLARPTR_V(idx) | val); adap 9992 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c la_buf[i] = t4_read_reg64(adap, TP_DBG_LA_DATAL_A); adap 10001 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_DBG_LA_CONFIG_A, adap 10002 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg | adap->params.tp.la_mask); adap 10140 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size) adap 10145 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec; adap 10147 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg_addr = t4_flash_cfg_addr(adap); adap 10155 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "cfg file too large, max is %u bytes\n", adap 10162 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_flash_erase_sectors(adap, flash_cfg_start_sec, adap 10176 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_write_flash(adap, addr, n, cfg_data); adap 10186 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c dev_err(adap->pdev_dev, "config file %s failed %d\n", adap 10239 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]) adap 10244 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, TP_PACE_TABLE_A, 0xffff0000 + i); adap 10245 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = t4_read_reg(adap, TP_PACE_TABLE_A); adap 10246 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c pace_vals[i] = dack_ticks_to_usec(adap, v); adap 10260 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_tx_sched(struct adapter *adap, unsigned int sched, adap 10267 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_tm_pio_read(adap, &v, 1, addr, sleep_ok); adap 10275 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c v = (adap->params.vpd.cclk * 1000) / cpt; /* ticks/s */ adap 10281 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_tm_pio_read(adap, &v, 1, addr, sleep_ok); adap 10285 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *ipg = (10000 * v) / core_ticks_per_usec(adap); adap 10298 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid, adap 10316 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); adap 10338 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, adap 10343 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, SGE_CTXT_CMD_A, CTXTQID_V(cid) | CTXTTYPE_V(ctype)); adap 10344 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wait_op_done(adap, SGE_CTXT_CMD_A, BUSY_F, 0, 3, 1); adap 10347 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c *data++ = t4_read_reg(adap, i); adap 10391 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port, adap 10422 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ret = t4_wr_mbox(adap, mbox, &ldst_cmd, sizeof(ldst_cmd), adap 10443 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, adap 10455 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c FW_ACL_VLAN_CMD_PFN_V(adap->pf) | adap 10467 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c return t4_wr_mbox(adap, adap->mbox, &vlan_cmd, sizeof(vlan_cmd), NULL); adap 1817 drivers/of/unittest.c struct i2c_adapter adap; adap 1820 drivers/of/unittest.c static int unittest_i2c_master_xfer(struct i2c_adapter *adap, adap 1823 drivers/of/unittest.c struct unittest_i2c_bus_data *std = i2c_get_adapdata(adap); adap 1830 drivers/of/unittest.c static u32 unittest_i2c_functionality(struct i2c_adapter *adap) adap 1845 drivers/of/unittest.c struct i2c_adapter *adap; adap 1864 drivers/of/unittest.c adap = &std->adap; adap 1865 drivers/of/unittest.c i2c_set_adapdata(adap, std); adap 1866 drivers/of/unittest.c adap->nr = -1; adap 1867 drivers/of/unittest.c strlcpy(adap->name, pdev->name, sizeof(adap->name)); adap 1868 drivers/of/unittest.c adap->class = I2C_CLASS_DEPRECATED; adap 1869 drivers/of/unittest.c adap->algo = &unittest_i2c_algo; adap 1870 drivers/of/unittest.c adap->dev.parent = dev; adap 1871 drivers/of/unittest.c adap->dev.of_node = dev->of_node; adap 1872 drivers/of/unittest.c adap->timeout = 5 * HZ; adap 1873 drivers/of/unittest.c adap->retries = 3; adap 1875 drivers/of/unittest.c ret = i2c_add_numbered_adapter(adap); adap 1891 drivers/of/unittest.c i2c_del_adapter(&std->adap); adap 1961 drivers/of/unittest.c struct i2c_adapter *adap = client->adapter; adap 1986 drivers/of/unittest.c muxc = i2c_mux_alloc(adap, dev, nchans, 0, 0, adap 208 drivers/staging/greybus/i2c.c static int gb_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 213 drivers/staging/greybus/i2c.c gb_i2c_dev = i2c_get_adapdata(adap); adap 220 drivers/staging/greybus/i2c.c static int gb_i2c_smbus_xfer(struct i2c_adapter *adap, adap 226 drivers/staging/greybus/i2c.c gb_i2c_dev = i2c_get_adapdata(adap); adap 232 drivers/staging/greybus/i2c.c static u32 gb_i2c_functionality(struct i2c_adapter *adap) adap 234 drivers/staging/greybus/i2c.c struct gb_i2c_device *gb_i2c_dev = i2c_get_adapdata(adap); adap 402 drivers/staging/kpc2000/kpc2000_i2c.c static s32 i801_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, u8 command, int size, union i2c_smbus_data *data) adap 407 drivers/staging/kpc2000/kpc2000_i2c.c struct i2c_device *priv = i2c_get_adapdata(adap); adap 103 drivers/staging/media/soc_camera/imx074.c struct i2c_adapter *adap = client->adapter; adap 117 drivers/staging/media/soc_camera/imx074.c ret = i2c_transfer(adap, &msg, 1); adap 1227 drivers/staging/media/soc_camera/soc_camera.c struct i2c_adapter *adap; adap 1239 drivers/staging/media/soc_camera/soc_camera.c adap = i2c_get_adapter(shd->i2c_adapter_id); adap 1240 drivers/staging/media/soc_camera/soc_camera.c if (!adap) { adap 1269 drivers/staging/media/soc_camera/soc_camera.c subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap, adap 1288 drivers/staging/media/soc_camera/soc_camera.c i2c_put_adapter(adap); adap 1296 drivers/staging/media/soc_camera/soc_camera.c struct i2c_adapter *adap; adap 1303 drivers/staging/media/soc_camera/soc_camera.c adap = client->adapter; adap 1307 drivers/staging/media/soc_camera/soc_camera.c i2c_put_adapter(adap); adap 240 drivers/usb/misc/usb251xb.c struct i2c_adapter *adap = hub->i2c->adapter; adap 249 drivers/usb/misc/usb251xb.c ret = usb251xb_check_dev_children(&adap->dev, gc->parent); adap 101 drivers/video/backlight/tosa_lcd.c struct i2c_adapter *adap = i2c_get_adapter(0); adap 107 drivers/video/backlight/tosa_lcd.c data->i2c = i2c_new_device(adap, &info); adap 17 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_wait_event(struct i2c_adapter *adap) adap 19 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 32 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_do_address(struct i2c_adapter *adap, int addr) adap 34 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 39 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (!mb862xx_i2c_wait_event(adap)) adap 45 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_write_byte(struct i2c_adapter *adap, u8 byte) adap 47 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 51 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (!mb862xx_i2c_wait_event(adap)) adap 56 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_read_byte(struct i2c_adapter *adap, u8 *byte, int last) adap 58 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 61 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (!mb862xx_i2c_wait_event(adap)) adap 67 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static void mb862xx_i2c_stop(struct i2c_adapter *adap) adap 69 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 76 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_read(struct i2c_adapter *adap, struct i2c_msg *m) adap 82 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (!mb862xx_i2c_read_byte(adap, &m->buf[i], i == last)) { adap 90 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_i2c_write(struct i2c_adapter *adap, struct i2c_msg *m) adap 95 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (!mb862xx_i2c_write_byte(adap, m->buf[i])) { adap 103 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static int mb862xx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 106 drivers/video/fbdev/mb862xx/mb862xx-i2c.c struct mb862xxfb_par *par = adap->algo_data; adap 123 drivers/video/fbdev/mb862xx/mb862xx-i2c.c err = mb862xx_i2c_do_address(adap, addr); adap 127 drivers/video/fbdev/mb862xx/mb862xx-i2c.c err = mb862xx_i2c_read(adap, m); adap 129 drivers/video/fbdev/mb862xx/mb862xx-i2c.c err = mb862xx_i2c_write(adap, m); adap 133 drivers/video/fbdev/mb862xx/mb862xx-i2c.c mb862xx_i2c_stop(adap); adap 138 drivers/video/fbdev/mb862xx/mb862xx-i2c.c static u32 mb862xx_func(struct i2c_adapter *adap) adap 157 drivers/video/fbdev/mb862xx/mb862xx-i2c.c par->adap = &mb862xx_i2c_adapter; adap 159 drivers/video/fbdev/mb862xx/mb862xx-i2c.c return i2c_add_adapter(par->adap); adap 164 drivers/video/fbdev/mb862xx/mb862xx-i2c.c if (par->adap) { adap 165 drivers/video/fbdev/mb862xx/mb862xx-i2c.c i2c_del_adapter(par->adap); adap 166 drivers/video/fbdev/mb862xx/mb862xx-i2c.c par->adap = NULL; adap 83 drivers/video/fbdev/mb862xx/mb862xxfb.h struct i2c_adapter *adap; /* GDC I2C bus adapter */ adap 13 drivers/video/fbdev/via/via_aux.c struct via_aux_bus *via_aux_probe(struct i2c_adapter *adap) adap 17 drivers/video/fbdev/via/via_aux.c if (!adap) adap 24 drivers/video/fbdev/via/via_aux.c bus->adap = adap; adap 19 drivers/video/fbdev/via/via_aux.h struct i2c_adapter *adap; /* the I2C device to access the bus */ adap 38 drivers/video/fbdev/via/via_aux.h struct via_aux_bus *via_aux_probe(struct i2c_adapter *adap); adap 62 drivers/video/fbdev/via/via_aux.h return i2c_transfer(drv->bus->adap, msg, 2) == 2; adap 107 drivers/video/fbdev/via/via_i2c.c int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata) adap 113 drivers/video/fbdev/via/via_i2c.c if (!via_i2c_par[adap].is_active) adap 122 drivers/video/fbdev/via/via_i2c.c ret = i2c_transfer(&via_i2c_par[adap].adapter, msgs, 2); adap 131 drivers/video/fbdev/via/via_i2c.c int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data) adap 137 drivers/video/fbdev/via/via_i2c.c if (!via_i2c_par[adap].is_active) adap 143 drivers/video/fbdev/via/via_i2c.c ret = i2c_transfer(&via_i2c_par[adap].adapter, &msgs, 1); adap 152 drivers/video/fbdev/via/via_i2c.c int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len) adap 158 drivers/video/fbdev/via/via_i2c.c if (!via_i2c_par[adap].is_active) adap 166 drivers/video/fbdev/via/via_i2c.c ret = i2c_transfer(&via_i2c_par[adap].adapter, msgs, 2); adap 270 drivers/xen/xenbus/xenbus_dev_frontend.c struct watch_adapter *adap; adap 277 drivers/xen/xenbus/xenbus_dev_frontend.c adap = container_of(watch, struct watch_adapter, watch); adap 279 drivers/xen/xenbus/xenbus_dev_frontend.c token_caller = adap->token; adap 288 drivers/xen/xenbus/xenbus_dev_frontend.c mutex_lock(&adap->dev_data->reply_mutex); adap 298 drivers/xen/xenbus/xenbus_dev_frontend.c list_splice_tail(&staging_q, &adap->dev_data->read_buffers); adap 299 drivers/xen/xenbus/xenbus_dev_frontend.c wake_up(&adap->dev_data->read_waitq); adap 303 drivers/xen/xenbus/xenbus_dev_frontend.c mutex_unlock(&adap->dev_data->reply_mutex); adap 1244 include/drm/drm_dp_helper.h struct cec_adapter *adap; adap 106 include/drm/drm_encoder_slave.h struct i2c_adapter *adap, adap 39 include/linux/i2c-smbus.h int of_i2c_setup_smbus_alert(struct i2c_adapter *adap); adap 41 include/linux/i2c-smbus.h static inline int of_i2c_setup_smbus_alert(struct i2c_adapter *adap) adap 118 include/linux/i2c.h extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 121 include/linux/i2c.h extern int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 443 include/linux/i2c.h i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info); adap 446 include/linux/i2c.h i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info); adap 455 include/linux/i2c.h i2c_new_probed_device(struct i2c_adapter *adap, adap 458 include/linux/i2c.h int (*probe)(struct i2c_adapter *adap, unsigned short addr)); adap 461 include/linux/i2c.h extern int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr); adap 467 include/linux/i2c.h i2c_new_dummy(struct i2c_adapter *adap, u16 address); adap 473 include/linux/i2c.h devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address); adap 536 include/linux/i2c.h int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs, adap 538 include/linux/i2c.h int (*master_xfer_atomic)(struct i2c_adapter *adap, adap 540 include/linux/i2c.h int (*smbus_xfer)(struct i2c_adapter *adap, u16 addr, adap 543 include/linux/i2c.h int (*smbus_xfer_atomic)(struct i2c_adapter *adap, u16 addr, adap 548 include/linux/i2c.h u32 (*functionality)(struct i2c_adapter *adap); adap 612 include/linux/i2c.h int (*recover_bus)(struct i2c_adapter *adap); adap 614 include/linux/i2c.h int (*get_scl)(struct i2c_adapter *adap); adap 615 include/linux/i2c.h void (*set_scl)(struct i2c_adapter *adap, int val); adap 616 include/linux/i2c.h int (*get_sda)(struct i2c_adapter *adap); adap 617 include/linux/i2c.h void (*set_sda)(struct i2c_adapter *adap, int val); adap 618 include/linux/i2c.h int (*get_bus_free)(struct i2c_adapter *adap); adap 620 include/linux/i2c.h void (*prepare_recovery)(struct i2c_adapter *adap); adap 621 include/linux/i2c.h void (*unprepare_recovery)(struct i2c_adapter *adap); adap 628 include/linux/i2c.h int i2c_recover_bus(struct i2c_adapter *adap); adap 631 include/linux/i2c.h int i2c_generic_scl_recovery(struct i2c_adapter *adap); adap 717 include/linux/i2c.h static inline void *i2c_get_adapdata(const struct i2c_adapter *adap) adap 719 include/linux/i2c.h return dev_get_drvdata(&adap->dev); adap 722 include/linux/i2c.h static inline void i2c_set_adapdata(struct i2c_adapter *adap, void *data) adap 724 include/linux/i2c.h dev_set_drvdata(&adap->dev, data); adap 794 include/linux/i2c.h static inline void i2c_mark_adapter_suspended(struct i2c_adapter *adap) adap 796 include/linux/i2c.h i2c_lock_bus(adap, I2C_LOCK_ROOT_ADAPTER); adap 797 include/linux/i2c.h set_bit(I2C_ALF_IS_SUSPENDED, &adap->locked_flags); adap 798 include/linux/i2c.h i2c_unlock_bus(adap, I2C_LOCK_ROOT_ADAPTER); adap 809 include/linux/i2c.h static inline void i2c_mark_adapter_resumed(struct i2c_adapter *adap) adap 811 include/linux/i2c.h i2c_lock_bus(adap, I2C_LOCK_ROOT_ADAPTER); adap 812 include/linux/i2c.h clear_bit(I2C_ALF_IS_SUSPENDED, &adap->locked_flags); adap 813 include/linux/i2c.h i2c_unlock_bus(adap, I2C_LOCK_ROOT_ADAPTER); adap 836 include/linux/i2c.h extern int i2c_add_adapter(struct i2c_adapter *adap); adap 837 include/linux/i2c.h extern void i2c_del_adapter(struct i2c_adapter *adap); adap 838 include/linux/i2c.h extern int i2c_add_numbered_adapter(struct i2c_adapter *adap); adap 852 include/linux/i2c.h extern void i2c_clients_command(struct i2c_adapter *adap, adap 856 include/linux/i2c.h extern void i2c_put_adapter(struct i2c_adapter *adap); adap 862 include/linux/i2c.h static inline u32 i2c_get_functionality(struct i2c_adapter *adap) adap 864 include/linux/i2c.h return adap->algo->functionality(adap); adap 868 include/linux/i2c.h static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func) adap 870 include/linux/i2c.h return (func & i2c_get_functionality(adap)) == func; adap 880 include/linux/i2c.h static inline bool i2c_check_quirks(struct i2c_adapter *adap, u64 quirks) adap 882 include/linux/i2c.h if (!adap->quirks) adap 884 include/linux/i2c.h return (adap->quirks->flags & quirks) == quirks; adap 888 include/linux/i2c.h static inline int i2c_adapter_id(struct i2c_adapter *adap) adap 890 include/linux/i2c.h return adap->nr; adap 901 include/linux/i2c.h int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr); adap 21 include/linux/via_i2c.h int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata); adap 22 include/linux/via_i2c.h int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data); adap 23 include/linux/via_i2c.h int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len); adap 90 include/media/cec-notifier.h struct cec_adapter *adap); adap 157 include/media/cec-notifier.h struct cec_adapter *adap) adap 36 include/media/cec-pin.h bool (*read)(struct cec_adapter *adap); adap 37 include/media/cec-pin.h void (*low)(struct cec_adapter *adap); adap 38 include/media/cec-pin.h void (*high)(struct cec_adapter *adap); adap 39 include/media/cec-pin.h bool (*enable_irq)(struct cec_adapter *adap); adap 40 include/media/cec-pin.h void (*disable_irq)(struct cec_adapter *adap); adap 41 include/media/cec-pin.h void (*free)(struct cec_adapter *adap); adap 42 include/media/cec-pin.h void (*status)(struct cec_adapter *adap, struct seq_file *file); adap 43 include/media/cec-pin.h int (*read_hpd)(struct cec_adapter *adap); adap 44 include/media/cec-pin.h int (*read_5v)(struct cec_adapter *adap); adap 56 include/media/cec-pin.h void cec_pin_changed(struct cec_adapter *adap, bool value); adap 63 include/media/cec.h struct cec_adapter *adap; adap 89 include/media/cec.h struct cec_adapter *adap; adap 113 include/media/cec.h int (*adap_enable)(struct cec_adapter *adap, bool enable); adap 114 include/media/cec.h int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); adap 115 include/media/cec.h int (*adap_monitor_pin_enable)(struct cec_adapter *adap, bool enable); adap 116 include/media/cec.h int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); adap 117 include/media/cec.h int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, adap 119 include/media/cec.h void (*adap_status)(struct cec_adapter *adap, struct seq_file *file); adap 120 include/media/cec.h void (*adap_free)(struct cec_adapter *adap); adap 123 include/media/cec.h int (*error_inj_show)(struct cec_adapter *adap, struct seq_file *sf); adap 124 include/media/cec.h bool (*error_inj_parse_line)(struct cec_adapter *adap, char *line); adap 127 include/media/cec.h int (*received)(struct cec_adapter *adap, struct cec_msg *msg); adap 237 include/media/cec.h static inline void *cec_get_drvdata(const struct cec_adapter *adap) adap 239 include/media/cec.h return adap->priv; adap 242 include/media/cec.h static inline bool cec_has_log_addr(const struct cec_adapter *adap, u8 log_addr) adap 244 include/media/cec.h return adap->log_addrs.log_addr_mask & (1 << log_addr); adap 247 include/media/cec.h static inline bool cec_is_sink(const struct cec_adapter *adap) adap 249 include/media/cec.h return adap->phys_addr == 0; adap 259 include/media/cec.h static inline bool cec_is_registered(const struct cec_adapter *adap) adap 261 include/media/cec.h return adap && adap->devnode.registered; adap 273 include/media/cec.h int cec_register_adapter(struct cec_adapter *adap, struct device *parent); adap 274 include/media/cec.h void cec_unregister_adapter(struct cec_adapter *adap); adap 275 include/media/cec.h void cec_delete_adapter(struct cec_adapter *adap); adap 277 include/media/cec.h int cec_s_log_addrs(struct cec_adapter *adap, struct cec_log_addrs *log_addrs, adap 279 include/media/cec.h void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, adap 281 include/media/cec.h void cec_s_phys_addr_from_edid(struct cec_adapter *adap, adap 283 include/media/cec.h void cec_s_conn_info(struct cec_adapter *adap, adap 285 include/media/cec.h int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, adap 289 include/media/cec.h void cec_transmit_done_ts(struct cec_adapter *adap, u8 status, adap 293 include/media/cec.h static inline void cec_transmit_done(struct cec_adapter *adap, u8 status, adap 297 include/media/cec.h cec_transmit_done_ts(adap, status, arb_lost_cnt, nack_cnt, adap 305 include/media/cec.h void cec_transmit_attempt_done_ts(struct cec_adapter *adap, adap 308 include/media/cec.h static inline void cec_transmit_attempt_done(struct cec_adapter *adap, adap 311 include/media/cec.h cec_transmit_attempt_done_ts(adap, status, ktime_get()); adap 314 include/media/cec.h void cec_received_msg_ts(struct cec_adapter *adap, adap 317 include/media/cec.h static inline void cec_received_msg(struct cec_adapter *adap, adap 320 include/media/cec.h cec_received_msg_ts(adap, msg, ktime_get()); adap 332 include/media/cec.h void cec_queue_pin_cec_event(struct cec_adapter *adap, bool is_high, adap 343 include/media/cec.h void cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts); adap 353 include/media/cec.h void cec_queue_pin_5v_event(struct cec_adapter *adap, bool is_high, ktime_t ts); adap 374 include/media/cec.h static inline int cec_register_adapter(struct cec_adapter *adap, adap 380 include/media/cec.h static inline void cec_unregister_adapter(struct cec_adapter *adap) adap 384 include/media/cec.h static inline void cec_delete_adapter(struct cec_adapter *adap) adap 388 include/media/cec.h static inline void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, adap 393 include/media/cec.h static inline void cec_s_phys_addr_from_edid(struct cec_adapter *adap, adap 406 include/media/cec.h static inline void cec_s_conn_info(struct cec_adapter *adap, adap 429 include/media/cec.h struct cec_adapter *adap, adap 430 include/media/cec.h void (*callback)(struct cec_adapter *adap, u16 pa)); adap 443 include/media/cec.h void cec_register_cec_notifier(struct cec_adapter *adap, adap 450 include/media/cec.h struct cec_adapter *adap, adap 451 include/media/cec.h void (*callback)(struct cec_adapter *adap, u16 pa)) adap 459 include/media/cec.h static inline void cec_register_cec_notifier(struct cec_adapter *adap, adap 474 include/media/cec.h static inline void cec_phys_addr_invalidate(struct cec_adapter *adap) adap 476 include/media/cec.h cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false); adap 205 include/media/dmxdev.h int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *adap); adap 65 include/media/dvb_net.h int dvb_net_init(struct dvb_adapter *adap, struct dvb_net *dvbnet, adap 85 include/media/dvb_net.h static inline int dvb_net_init(struct dvb_adapter *adap, adap 201 include/media/dvbdev.h int dvb_register_adapter(struct dvb_adapter *adap, const char *name, adap 210 include/media/dvbdev.h int dvb_unregister_adapter(struct dvb_adapter *adap); adap 224 include/media/dvbdev.h int dvb_register_device(struct dvb_adapter *adap, adap 276 include/media/dvbdev.h __must_check int dvb_create_media_graph(struct dvb_adapter *adap, adap 285 include/media/dvbdev.h static inline void dvb_register_media_controller(struct dvb_adapter *adap, adap 288 include/media/dvbdev.h adap->mdev = mdev; adap 297 include/media/dvbdev.h *dvb_get_media_controller(struct dvb_adapter *adap) adap 299 include/media/dvbdev.h return adap->mdev; adap 303 include/media/dvbdev.h int dvb_create_media_graph(struct dvb_adapter *adap, adap 399 include/media/dvbdev.h struct i2c_adapter *adap, adap 67 include/media/v4l2-clk.h #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \ adap 68 include/media/v4l2-clk.h "%d-%04x", adap, client) adap 34 include/sound/ac97/controller.h struct device adap; adap 25 include/sound/l3.h int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); adap 26 include/sound/l3.h int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap); adap 26 include/trace/events/i2c.h TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, adap 28 include/trace/events/i2c.h TP_ARGS(adap, msg, num), adap 37 include/trace/events/i2c.h __entry->adapter_nr = adap->nr; adap 59 include/trace/events/i2c.h TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, adap 61 include/trace/events/i2c.h TP_ARGS(adap, msg, num), adap 70 include/trace/events/i2c.h __entry->adapter_nr = adap->nr; adap 90 include/trace/events/i2c.h TP_PROTO(const struct i2c_adapter *adap, const struct i2c_msg *msg, adap 92 include/trace/events/i2c.h TP_ARGS(adap, msg, num), adap 101 include/trace/events/i2c.h __entry->adapter_nr = adap->nr; adap 123 include/trace/events/i2c.h TP_PROTO(const struct i2c_adapter *adap, int num, int ret), adap 124 include/trace/events/i2c.h TP_ARGS(adap, num, ret), adap 131 include/trace/events/i2c.h __entry->adapter_nr = adap->nr; adap 24 include/trace/events/smbus.h TP_PROTO(const struct i2c_adapter *adap, adap 28 include/trace/events/smbus.h TP_ARGS(adap, addr, flags, read_write, command, protocol, data), adap 41 include/trace/events/smbus.h __entry->adapter_nr = adap->nr; adap 92 include/trace/events/smbus.h TP_PROTO(const struct i2c_adapter *adap, adap 95 include/trace/events/smbus.h TP_ARGS(adap, addr, flags, read_write, command, protocol), adap 107 include/trace/events/smbus.h __entry->adapter_nr = adap->nr; adap 134 include/trace/events/smbus.h TP_PROTO(const struct i2c_adapter *adap, adap 138 include/trace/events/smbus.h TP_ARGS(adap, addr, flags, read_write, command, protocol, data, res), adap 149 include/trace/events/smbus.h __entry->adapter_nr = adap->nr; adap 200 include/trace/events/smbus.h TP_PROTO(const struct i2c_adapter *adap, adap 204 include/trace/events/smbus.h TP_ARGS(adap, addr, flags, read_write, command, protocol, res), adap 215 include/trace/events/smbus.h __entry->adapter_nr = adap->nr; adap 36 sound/ac97/bus.c return container_of(ac97_adapter, struct ac97_controller, adap); adap 115 sound/ac97/bus.c codec->dev.parent = &ac97_ctrl->adap; adap 149 sound/ac97/bus.c dev_dbg(&adrv->adap, "%s(codec_num=%u): vendor_id=0x%08x\n", adap 293 sound/ac97/bus.c device_unregister(&ac97_ctrl->adap); adap 302 sound/ac97/bus.c dev_dbg(&ac97_ctrl->adap, "adapter unregistered by %s\n", adap 319 sound/ac97/bus.c dev_set_name(&ac97_ctrl->adap, "ac97-%d", ret); adap 320 sound/ac97/bus.c ac97_ctrl->adap.type = &ac97_adapter_type; adap 321 sound/ac97/bus.c ac97_ctrl->adap.parent = ac97_ctrl->parent; adap 322 sound/ac97/bus.c ret = device_register(&ac97_ctrl->adap); adap 324 sound/ac97/bus.c put_device(&ac97_ctrl->adap); adap 331 sound/ac97/bus.c dev_dbg(&ac97_ctrl->adap, "adapter registered by %s\n", adap 129 sound/ppc/keywest.c struct i2c_adapter *adap; adap 135 sound/ppc/keywest.c adap = i2c_get_adapter(0); adap 136 sound/ppc/keywest.c if (!adap) adap 143 sound/ppc/keywest.c i2c_put_adapter(adap); adap 152 sound/ppc/keywest.c while (adap) { adap 154 sound/ppc/keywest.c err = keywest_attach_adapter(adap); adap 157 sound/ppc/keywest.c i2c_put_adapter(adap); adap 158 sound/ppc/keywest.c adap = i2c_get_adapter(++i); adap 26 sound/soc/codecs/l3.c static void sendbyte(struct l3_pins *adap, unsigned int byte) adap 31 sound/soc/codecs/l3.c adap->setclk(adap, 0); adap 32 sound/soc/codecs/l3.c udelay(adap->data_hold); adap 33 sound/soc/codecs/l3.c adap->setdat(adap, byte & 1); adap 34 sound/soc/codecs/l3.c udelay(adap->data_setup); adap 35 sound/soc/codecs/l3.c adap->setclk(adap, 1); adap 36 sound/soc/codecs/l3.c udelay(adap->clock_high); adap 46 sound/soc/codecs/l3.c static void sendbytes(struct l3_pins *adap, const u8 *buf, adap 53 sound/soc/codecs/l3.c udelay(adap->mode_hold); adap 54 sound/soc/codecs/l3.c adap->setmode(adap, 0); adap 55 sound/soc/codecs/l3.c udelay(adap->mode); adap 57 sound/soc/codecs/l3.c adap->setmode(adap, 1); adap 58 sound/soc/codecs/l3.c udelay(adap->mode_setup); adap 59 sound/soc/codecs/l3.c sendbyte(adap, buf[i]); adap 63 sound/soc/codecs/l3.c int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len) adap 65 sound/soc/codecs/l3.c adap->setclk(adap, 1); adap 66 sound/soc/codecs/l3.c adap->setdat(adap, 1); adap 67 sound/soc/codecs/l3.c adap->setmode(adap, 1); adap 68 sound/soc/codecs/l3.c udelay(adap->mode); adap 70 sound/soc/codecs/l3.c adap->setmode(adap, 0); adap 71 sound/soc/codecs/l3.c udelay(adap->mode_setup); adap 72 sound/soc/codecs/l3.c sendbyte(adap, addr); adap 73 sound/soc/codecs/l3.c udelay(adap->mode_hold); adap 75 sound/soc/codecs/l3.c sendbytes(adap, data, len); adap 77 sound/soc/codecs/l3.c adap->setclk(adap, 1); adap 78 sound/soc/codecs/l3.c adap->setdat(adap, 1); adap 79 sound/soc/codecs/l3.c adap->setmode(adap, 0); adap 86 sound/soc/codecs/l3.c static void l3_set_clk(struct l3_pins *adap, int val) adap 88 sound/soc/codecs/l3.c gpio_set_value(adap->gpio_clk, val); adap 91 sound/soc/codecs/l3.c static void l3_set_data(struct l3_pins *adap, int val) adap 93 sound/soc/codecs/l3.c gpio_set_value(adap->gpio_data, val); adap 96 sound/soc/codecs/l3.c static void l3_set_mode(struct l3_pins *adap, int val) adap 98 sound/soc/codecs/l3.c gpio_set_value(adap->gpio_mode, val); adap 101 sound/soc/codecs/l3.c int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap) adap 105 sound/soc/codecs/l3.c if (!adap->use_gpios) adap 108 sound/soc/codecs/l3.c ret = devm_gpio_request_one(dev, adap->gpio_data, adap 112 sound/soc/codecs/l3.c adap->setdat = l3_set_data; adap 114 sound/soc/codecs/l3.c ret = devm_gpio_request_one(dev, adap->gpio_clk, adap 118 sound/soc/codecs/l3.c adap->setclk = l3_set_clk; adap 120 sound/soc/codecs/l3.c ret = devm_gpio_request_one(dev, adap->gpio_mode, adap 124 sound/soc/codecs/l3.c adap->setmode = l3_set_mode;