• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/message/i2o/

Lines Matching defs:context

82  *      i2o_cntxt_list_add - Append a pointer to context list and return a id
83 * @c: controller to which the context list belong
84 * @ptr: pointer to add to the context list
86 * Because the context field in I2O is only 32-bit large, on 64-bit the
87 * pointer is to large to fit in the context field. The i2o_cntxt_list
88 * functions therefore map pointers to context fields.
90 * Returns context id > 0 on success or 0 on failure.
98 osm_err("%s: couldn't add NULL pointer to context list!\n",
103 osm_err("%s: Could not allocate memory for context list element"
117 entry->context = atomic_read(&c->context_list_counter);
123 osm_debug("%s: Add context to list %p -> %d\n", c->name, ptr, context);
125 return entry->context;
129 * i2o_cntxt_list_remove - Remove a pointer from the context list
130 * @c: controller to which the context list belong
131 * @ptr: pointer which should be removed from the context list
133 * Removes a previously added pointer from the context list and returns
134 * the matching context id.
136 * Returns context id on success or 0 on failure.
141 u32 context = 0;
148 context = entry->context;
154 if (!context)
158 osm_debug("%s: remove ptr from context list %d -> %p\n", c->name,
159 context, ptr);
161 return context;
165 * i2o_cntxt_list_get - Get a pointer from the context list and remove it
166 * @c: controller to which the context list belong
167 * @context: context id to which the pointer belong
169 * Returns pointer to the matching context id on success or NULL on
172 void *i2o_cntxt_list_get(struct i2o_controller *c, u32 context)
180 if (entry->context == context) {
189 osm_warn("%s: context id %d not found\n", c->name, context);
191 osm_debug("%s: get ptr from context list %d -> %p\n", c->name, context,
198 * i2o_cntxt_list_get_ptr - Get a context id from the context list
199 * @c: controller to which the context list belong
200 * @ptr: pointer to which the context id should be fetched
202 * Returns context id which matches to the pointer on success or 0 on
208 u32 context = 0;
214 context = entry->context;
219 if (!context)
223 osm_debug("%s: get context id from context list %p -> %d\n", c->name,
224 ptr, context);
226 return context;
449 msg->u.s.icntxt = cpu_to_le32(i2o_exec_driver.context);
513 msg->u.s.icntxt = cpu_to_le32(i2o_exec_driver.context);
938 msg->u.s.icntxt = cpu_to_le32(i2o_exec_driver.context);
1150 * @tcntxt: transaction context to use with this notifier
1173 msg->u.s.icntxt = cpu_to_le32(drv->context);