• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/s390/cio/

Lines Matching refs:chp

2  *  drivers/s390/cio/chp.c
25 #include "chp.h"
147 struct channel_path *chp;
150 chp = to_channelpath(container_of(kobj, struct device, kobj));
151 if (!chp->cmg_chars)
160 memcpy(buf, chp->cmg_chars + off, count);
199 struct channel_path *chp;
203 chp = to_channelpath(container_of(kobj, struct device, kobj));
204 css = to_css(chp->dev.parent);
211 chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->chpid);
226 void chp_remove_cmg_attr(struct channel_path *chp)
228 device_remove_bin_file(&chp->dev, &chp_measurement_chars_attr);
229 device_remove_bin_file(&chp->dev, &chp_measurement_attr);
232 int chp_add_cmg_attr(struct channel_path *chp)
236 ret = device_create_bin_file(&chp->dev, &chp_measurement_chars_attr);
239 ret = device_create_bin_file(&chp->dev, &chp_measurement_attr);
241 device_remove_bin_file(&chp->dev, &chp_measurement_chars_attr);
251 struct channel_path *chp = container_of(dev, struct channel_path, dev);
253 if (!chp)
255 return (chp_get_status(chp->chpid) ? sprintf(buf, "online\n") :
325 struct channel_path *chp = container_of(dev, struct channel_path, dev);
327 if (!chp)
329 return sprintf(buf, "%x\n", chp->desc.desc);
337 struct channel_path *chp = to_channelpath(dev);
339 if (!chp)
341 if (chp->cmg == -1) /* channel measurements not available */
343 return sprintf(buf, "%x\n", chp->cmg);
351 struct channel_path *chp = to_channelpath(dev);
353 if (!chp)
355 if (chp->shared == -1) /* channel measurements not available */
357 return sprintf(buf, "%x\n", chp->shared);
392 struct channel_path *chp;
397 chp = kzalloc(sizeof(struct channel_path), GFP_KERNEL);
398 if (!chp)
402 chp->chpid = chpid;
403 chp->state = 1;
404 chp->dev.parent = &css[chpid.cssid]->device;
405 chp->dev.release = chp_release;
406 snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp%x.%02x", chpid.cssid,
410 ret = chsc_determine_channel_path_description(chpid, &chp->desc);
413 if ((chp->desc.flags & 0x80) == 0) {
420 ret = chsc_get_channel_measurement_chars(chp);
431 chp->cmg = -1;
435 ret = device_register(&chp->dev);
441 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
443 device_unregister(&chp->dev);
448 ret = chp_add_cmg_attr(chp);
450 sysfs_remove_group(&chp->dev.kobj, &chp_attr_group);
451 device_unregister(&chp->dev);
456 css[chpid.cssid]->chps[chpid.id] = chp;
460 kfree(chp);
473 struct channel_path *chp;
476 chp = chpid_to_chp(chpid);
477 if (!chp)
482 memcpy(desc, &chp->desc, sizeof(struct channel_path_desc));