struct dma_buf *dmabuf;
int32_t export_id;
int32_t vcid;
+ struct physical_channel *pchan;
};
struct importer_context {
pglist->userflags = userflags;
pglist->export_id = exp->export_id;
pglist->vcid = exp->vcid_remote;
+ pglist->pchan = exp->pchan;
if (!(userflags & HABMM_IMPORT_FLAGS_CACHED))
prot = pgprot_writecombine(prot);
pglist->userflags = userflags;
pglist->export_id = exp->export_id;
pglist->vcid = exp->vcid_remote;
+ pglist->pchan = exp->pchan;
if (!(userflags & HABMM_IMPORT_FLAGS_CACHED))
prot = pgprot_writecombine(prot);
pglist->userflags = userflags;
pglist->export_id = exp->export_id;
pglist->vcid = exp->vcid_remote;
+ pglist->pchan = exp->pchan;
write_lock(&priv->implist_lock);
list_add_tail(&pglist->list, &priv->imp_list);
write_lock(&priv->implist_lock);
list_for_each_entry_safe(pglist, tmp, &priv->imp_list, list) {
if (pglist->export_id == exp->export_id &&
- pglist->vcid == exp->vcid_remote) {
+ pglist->pchan == exp->pchan) {
found = 1;
list_del(&pglist->list);
priv->cnt--;
read_lock(&priv->implist_lock);
list_for_each_entry(pglist, &priv->imp_list, list) {
if (pglist->export_id == exp->export_id &&
- pglist->vcid == exp->vcid_remote) {
+ pglist->pchan == exp->pchan) {
found = 1;
break;
}
write_lock(&ctx->exp_lock);
list_for_each_entry_safe(exp, tmp, &ctx->exp_whse, node) {
if (param->exportid == exp->export_id &&
- param->vcid == exp->vcid_local) {
- /* same vchan guarantees the pchan for idr */
+ vchan->pchan == exp->pchan) {
list_del(&exp->node);
found = 1;
break;
spin_lock_bh(&ctx->imp_lock);
list_for_each_entry(exp, &ctx->imp_whse, node) {
if ((exp->export_id == param->exportid) &&
- (param->vcid == exp->vcid_remote)) {
- /* only allow import on the vchan recevied from
- * remote
- */
+ (exp->pchan == vchan->pchan)) {
found = 1;
break;
}
spin_lock_bh(&ctx->imp_lock);
list_for_each_entry_safe(exp, exp_tmp, &ctx->imp_whse, node) {
if (exp->export_id == param->exportid &&
- param->vcid == exp->vcid_remote) {
- /* same vchan is expected here */
+ exp->pchan == vchan->pchan) {
+ /* same pchan is expected here */
list_del(&exp->node);
ctx->import_total--;
found = 1;