sfp               333 arch/arm64/kernel/signal.c 	char const __user *const sfp = (char const __user *)sf;
sfp               447 arch/arm64/kernel/signal.c 			if (extra_size > sfp + SIGFRAME_MAXSZ - userp)
sfp               650 arch/arm64/kernel/signal.c 		char __user *sfp = (char __user *)user->sigframe;
sfp               671 arch/arm64/kernel/signal.c 		extra_size = sfp + round_up(user->size, 16) - userp;
sfp               286 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id)
sfp               293 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,ctl_id);
sfp               303 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	cip->chptr = sfp;
sfp               305 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->item_last) {
sfp               306 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->item_last->item_next = cip;
sfp               308 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->item_first = cip;
sfp               310 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->item_last = cip;
sfp               395 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp);
sfp               413 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp)
sfp               429 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->debugifc = dip;
sfp               430 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,&dip->attr_debugcmd);
sfp               438 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,&dip->attr_debuginfo);
sfp               449 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp)
sfp               451 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp->debugifc) return;
sfp               452 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->debugifc->debuginfo_created_ok) {
sfp               453 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               454 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->debugifc->attr_debuginfo);
sfp               456 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->debugifc->debugcmd_created_ok) {
sfp               457 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               458 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->debugifc->attr_debugcmd);
sfp               460 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	kfree(sfp->debugifc);
sfp               461 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->debugifc = NULL;
sfp               466 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void pvr2_sysfs_add_controls(struct pvr2_sysfs *sfp)
sfp               469 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	cnt = pvr2_hdw_get_ctrl_count(sfp->channel.hdw);
sfp               471 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		pvr2_sysfs_add_control(sfp,idx);
sfp               476 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void pvr2_sysfs_tear_down_controls(struct pvr2_sysfs *sfp)
sfp               479 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	for (cip1 = sfp->item_first; cip1; cip1 = cip2) {
sfp               482 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp);
sfp               506 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void class_dev_destroy(struct pvr2_sysfs *sfp)
sfp               509 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp->class_dev) return;
sfp               511 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_sysfs_tear_down_debugifc(sfp);
sfp               513 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_sysfs_tear_down_controls(sfp);
sfp               514 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->hdw_desc_created_ok) {
sfp               515 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               516 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				   &sfp->attr_hdw_desc);
sfp               518 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->hdw_name_created_ok) {
sfp               519 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               520 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				   &sfp->attr_hdw_name);
sfp               522 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->bus_info_created_ok) {
sfp               523 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               524 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->attr_bus_info);
sfp               526 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->v4l_minor_number_created_ok) {
sfp               527 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               528 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->attr_v4l_minor_number);
sfp               530 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->v4l_radio_minor_number_created_ok) {
sfp               531 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               532 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->attr_v4l_radio_minor_number);
sfp               534 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (sfp->unit_number_created_ok) {
sfp               535 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		device_remove_file(sfp->class_dev,
sfp               536 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 					 &sfp->attr_unit_number);
sfp               538 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev);
sfp               539 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	dev_set_drvdata(sfp->class_dev, NULL);
sfp               540 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	dev = sfp->class_dev->parent;
sfp               541 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->class_dev->parent = NULL;
sfp               543 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	device_unregister(sfp->class_dev);
sfp               544 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->class_dev = NULL;
sfp               551 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               552 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               553 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               555 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_v4l_get_minor_number(sfp->channel.hdw,
sfp               563 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               564 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               565 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               567 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_get_bus_info(sfp->channel.hdw));
sfp               574 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               575 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               576 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               578 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_get_type(sfp->channel.hdw));
sfp               585 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               586 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               587 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               589 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_get_desc(sfp->channel.hdw));
sfp               597 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               598 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               599 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               601 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_v4l_get_minor_number(sfp->channel.hdw,
sfp               609 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               610 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               611 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               613 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 			 pvr2_hdw_get_unit_number(sfp->channel.hdw));
sfp               617 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c static void class_dev_create(struct pvr2_sysfs *sfp,
sfp               624 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	usb_dev = pvr2_hdw_get_dev(sfp->channel.hdw);
sfp               634 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		     pvr2_hdw_get_device_identifier(sfp->channel.hdw));
sfp               638 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->class_dev = class_dev;
sfp               639 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	dev_set_drvdata(class_dev, sfp);
sfp               648 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_v4l_minor_number.attr);
sfp               649 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number";
sfp               650 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_minor_number.attr.mode = S_IRUGO;
sfp               651 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_minor_number.show = v4l_minor_number_show;
sfp               652 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_minor_number.store = NULL;
sfp               653 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,
sfp               654 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				       &sfp->attr_v4l_minor_number);
sfp               660 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->v4l_minor_number_created_ok = !0;
sfp               663 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_v4l_radio_minor_number.attr);
sfp               664 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_radio_minor_number.attr.name = "v4l_radio_minor_number";
sfp               665 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_radio_minor_number.attr.mode = S_IRUGO;
sfp               666 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_radio_minor_number.show = v4l_radio_minor_number_show;
sfp               667 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_v4l_radio_minor_number.store = NULL;
sfp               668 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,
sfp               669 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				       &sfp->attr_v4l_radio_minor_number);
sfp               675 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->v4l_radio_minor_number_created_ok = !0;
sfp               678 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_unit_number.attr);
sfp               679 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_unit_number.attr.name = "unit_number";
sfp               680 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_unit_number.attr.mode = S_IRUGO;
sfp               681 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_unit_number.show = unit_number_show;
sfp               682 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_unit_number.store = NULL;
sfp               683 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,&sfp->attr_unit_number);
sfp               689 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->unit_number_created_ok = !0;
sfp               692 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_bus_info.attr);
sfp               693 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_bus_info.attr.name = "bus_info_str";
sfp               694 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_bus_info.attr.mode = S_IRUGO;
sfp               695 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_bus_info.show = bus_info_show;
sfp               696 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_bus_info.store = NULL;
sfp               697 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,
sfp               698 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				       &sfp->attr_bus_info);
sfp               704 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->bus_info_created_ok = !0;
sfp               707 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_hdw_name.attr);
sfp               708 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_name.attr.name = "device_hardware_type";
sfp               709 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_name.attr.mode = S_IRUGO;
sfp               710 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_name.show = hdw_name_show;
sfp               711 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_name.store = NULL;
sfp               712 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,
sfp               713 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				 &sfp->attr_hdw_name);
sfp               719 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->hdw_name_created_ok = !0;
sfp               722 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sysfs_attr_init(&sfp->attr_hdw_desc.attr);
sfp               723 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_desc.attr.name = "device_hardware_description";
sfp               724 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_desc.attr.mode = S_IRUGO;
sfp               725 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_desc.show = hdw_desc_show;
sfp               726 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->attr_hdw_desc.store = NULL;
sfp               727 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = device_create_file(sfp->class_dev,
sfp               728 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 				 &sfp->attr_hdw_desc);
sfp               734 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 		sfp->hdw_desc_created_ok = !0;
sfp               737 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_sysfs_add_controls(sfp);
sfp               739 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_sysfs_add_debugifc(sfp);
sfp               746 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               747 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = container_of(chp,struct pvr2_sysfs,channel);
sfp               748 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp->channel.mc_head->disconnect_flag) return;
sfp               749 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_sysfs id=%p",sfp);
sfp               750 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	class_dev_destroy(sfp);
sfp               751 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_channel_done(&sfp->channel);
sfp               752 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	kfree(sfp);
sfp               759 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               760 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = kzalloc(sizeof(*sfp),GFP_KERNEL);
sfp               761 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return sfp;
sfp               762 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr2_sysfs id=%p",sfp);
sfp               763 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_channel_init(&sfp->channel,mp);
sfp               764 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp->channel.check_func = pvr2_sysfs_internal_check;
sfp               766 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	class_dev_create(sfp,class_ptr);
sfp               767 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	return sfp;
sfp               804 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               805 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               806 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               807 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	pvr2_hdw_trigger_module_log(sfp->channel.hdw);
sfp               808 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	return pvr2_debugifc_print_info(sfp->channel.hdw,buf,PAGE_SIZE);
sfp               815 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               816 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               817 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               818 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	return pvr2_debugifc_print_status(sfp->channel.hdw,buf,PAGE_SIZE);
sfp               826 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	struct pvr2_sysfs *sfp;
sfp               829 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	sfp = dev_get_drvdata(class_dev);
sfp               830 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	if (!sfp) return -EINVAL;
sfp               832 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c 	ret = pvr2_debugifc_docmd(sfp->channel.hdw,buf,count);
sfp                23 drivers/net/phy/sfp-bus.c 	struct sfp *sfp;
sfp               293 drivers/net/phy/sfp-bus.c 	struct sfp_bus *sfp, *new, *found = NULL;
sfp               299 drivers/net/phy/sfp-bus.c 	list_for_each_entry(sfp, &sfp_buses, node) {
sfp               300 drivers/net/phy/sfp-bus.c 		if (sfp->fwnode == fwnode) {
sfp               301 drivers/net/phy/sfp-bus.c 			kref_get(&sfp->kref);
sfp               302 drivers/net/phy/sfp-bus.c 			found = sfp;
sfp               350 drivers/net/phy/sfp-bus.c 	bus->socket_ops->attach(bus->sfp);
sfp               352 drivers/net/phy/sfp-bus.c 		bus->socket_ops->start(bus->sfp);
sfp               365 drivers/net/phy/sfp-bus.c 			bus->socket_ops->stop(bus->sfp);
sfp               366 drivers/net/phy/sfp-bus.c 		bus->socket_ops->detach(bus->sfp);
sfp               385 drivers/net/phy/sfp-bus.c 	return bus->socket_ops->module_info(bus->sfp, modinfo);
sfp               403 drivers/net/phy/sfp-bus.c 	return bus->socket_ops->module_eeprom(bus->sfp, ee, data);
sfp               419 drivers/net/phy/sfp-bus.c 		bus->socket_ops->start(bus->sfp);
sfp               436 drivers/net/phy/sfp-bus.c 		bus->socket_ops->stop(bus->sfp);
sfp               471 drivers/net/phy/sfp-bus.c 		if (bus->sfp) {
sfp               498 drivers/net/phy/sfp-bus.c 	if (bus->sfp)
sfp               575 drivers/net/phy/sfp-bus.c 	bus->sfp = NULL;
sfp               579 drivers/net/phy/sfp-bus.c struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
sfp               588 drivers/net/phy/sfp-bus.c 		bus->sfp = sfp;
sfp               182 drivers/net/phy/sfp.c 	unsigned int (*get_state)(struct sfp *);
sfp               183 drivers/net/phy/sfp.c 	void (*set_state)(struct sfp *, unsigned int);
sfp               184 drivers/net/phy/sfp.c 	int (*read)(struct sfp *, bool, u8, void *, size_t);
sfp               185 drivers/net/phy/sfp.c 	int (*write)(struct sfp *, bool, u8, void *, size_t);
sfp               242 drivers/net/phy/sfp.c static unsigned int sfp_gpio_get_state(struct sfp *sfp)
sfp               247 drivers/net/phy/sfp.c 		if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i])
sfp               250 drivers/net/phy/sfp.c 		v = gpiod_get_value_cansleep(sfp->gpio[i]);
sfp               258 drivers/net/phy/sfp.c static unsigned int sff_gpio_get_state(struct sfp *sfp)
sfp               260 drivers/net/phy/sfp.c 	return sfp_gpio_get_state(sfp) | SFP_F_PRESENT;
sfp               263 drivers/net/phy/sfp.c static void sfp_gpio_set_state(struct sfp *sfp, unsigned int state)
sfp               267 drivers/net/phy/sfp.c 		if (sfp->gpio[GPIO_TX_DISABLE])
sfp               268 drivers/net/phy/sfp.c 			gpiod_direction_output(sfp->gpio[GPIO_TX_DISABLE],
sfp               271 drivers/net/phy/sfp.c 			gpiod_direction_output(sfp->gpio[GPIO_RATE_SELECT],
sfp               275 drivers/net/phy/sfp.c 		if (sfp->gpio[GPIO_TX_DISABLE])
sfp               276 drivers/net/phy/sfp.c 			gpiod_direction_input(sfp->gpio[GPIO_TX_DISABLE]);
sfp               278 drivers/net/phy/sfp.c 			gpiod_direction_input(sfp->gpio[GPIO_RATE_SELECT]);
sfp               282 drivers/net/phy/sfp.c static int sfp_i2c_read(struct sfp *sfp, bool a2, u8 dev_addr, void *buf,
sfp               306 drivers/net/phy/sfp.c 		ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
sfp               321 drivers/net/phy/sfp.c static int sfp_i2c_write(struct sfp *sfp, bool a2, u8 dev_addr, void *buf,
sfp               338 drivers/net/phy/sfp.c 	ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
sfp               348 drivers/net/phy/sfp.c static int sfp_i2c_configure(struct sfp *sfp, struct i2c_adapter *i2c)
sfp               356 drivers/net/phy/sfp.c 	sfp->i2c = i2c;
sfp               357 drivers/net/phy/sfp.c 	sfp->read = sfp_i2c_read;
sfp               358 drivers/net/phy/sfp.c 	sfp->write = sfp_i2c_write;
sfp               360 drivers/net/phy/sfp.c 	i2c_mii = mdio_i2c_alloc(sfp->dev, i2c);
sfp               373 drivers/net/phy/sfp.c 	sfp->i2c_mii = i2c_mii;
sfp               379 drivers/net/phy/sfp.c static unsigned int sfp_get_state(struct sfp *sfp)
sfp               381 drivers/net/phy/sfp.c 	return sfp->get_state(sfp);
sfp               384 drivers/net/phy/sfp.c static void sfp_set_state(struct sfp *sfp, unsigned int state)
sfp               386 drivers/net/phy/sfp.c 	sfp->set_state(sfp, state);
sfp               389 drivers/net/phy/sfp.c static int sfp_read(struct sfp *sfp, bool a2, u8 addr, void *buf, size_t len)
sfp               391 drivers/net/phy/sfp.c 	return sfp->read(sfp, a2, addr, buf, len);
sfp               394 drivers/net/phy/sfp.c static int sfp_write(struct sfp *sfp, bool a2, u8 addr, void *buf, size_t len)
sfp               396 drivers/net/phy/sfp.c 	return sfp->write(sfp, a2, addr, buf, len);
sfp               415 drivers/net/phy/sfp.c 	const struct sfp *sfp = data;
sfp               428 drivers/net/phy/sfp.c 			if (!(sfp->id.ext.enhopts & SFP_ENHOPTS_ALARMWARN))
sfp               447 drivers/net/phy/sfp.c 			if (!(sfp->id.ext.enhopts & SFP_ENHOPTS_ALARMWARN))
sfp               466 drivers/net/phy/sfp.c 			if (!(sfp->id.ext.enhopts & SFP_ENHOPTS_ALARMWARN))
sfp               482 drivers/net/phy/sfp.c 		if (sfp->id.ext.diagmon & SFP_DIAGMON_EXT_CAL &&
sfp               494 drivers/net/phy/sfp.c 			if (!(sfp->id.ext.enhopts & SFP_ENHOPTS_ALARMWARN))
sfp               508 drivers/net/phy/sfp.c static int sfp_hwmon_read_sensor(struct sfp *sfp, int reg, long *value)
sfp               513 drivers/net/phy/sfp.c 	err = sfp_read(sfp, true, reg, &val, sizeof(val));
sfp               527 drivers/net/phy/sfp.c static void sfp_hwmon_calibrate(struct sfp *sfp, unsigned int slope, int offset,
sfp               530 drivers/net/phy/sfp.c 	if (sfp->id.ext.diagmon & SFP_DIAGMON_EXT_CAL)
sfp               534 drivers/net/phy/sfp.c static void sfp_hwmon_calibrate_temp(struct sfp *sfp, long *value)
sfp               536 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate(sfp, be16_to_cpu(sfp->diag.cal_t_slope),
sfp               537 drivers/net/phy/sfp.c 			    be16_to_cpu(sfp->diag.cal_t_offset), value);
sfp               545 drivers/net/phy/sfp.c static void sfp_hwmon_calibrate_vcc(struct sfp *sfp, long *value)
sfp               547 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate(sfp, be16_to_cpu(sfp->diag.cal_v_slope),
sfp               548 drivers/net/phy/sfp.c 			    be16_to_cpu(sfp->diag.cal_v_offset), value);
sfp               553 drivers/net/phy/sfp.c static void sfp_hwmon_calibrate_bias(struct sfp *sfp, long *value)
sfp               555 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate(sfp, be16_to_cpu(sfp->diag.cal_txi_slope),
sfp               556 drivers/net/phy/sfp.c 			    be16_to_cpu(sfp->diag.cal_txi_offset), value);
sfp               561 drivers/net/phy/sfp.c static void sfp_hwmon_calibrate_tx_power(struct sfp *sfp, long *value)
sfp               563 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate(sfp, be16_to_cpu(sfp->diag.cal_txpwr_slope),
sfp               564 drivers/net/phy/sfp.c 			    be16_to_cpu(sfp->diag.cal_txpwr_offset), value);
sfp               569 drivers/net/phy/sfp.c static int sfp_hwmon_read_temp(struct sfp *sfp, int reg, long *value)
sfp               573 drivers/net/phy/sfp.c 	err = sfp_hwmon_read_sensor(sfp, reg, value);
sfp               577 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate_temp(sfp, value);
sfp               582 drivers/net/phy/sfp.c static int sfp_hwmon_read_vcc(struct sfp *sfp, int reg, long *value)
sfp               586 drivers/net/phy/sfp.c 	err = sfp_hwmon_read_sensor(sfp, reg, value);
sfp               590 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate_vcc(sfp, value);
sfp               595 drivers/net/phy/sfp.c static int sfp_hwmon_read_bias(struct sfp *sfp, int reg, long *value)
sfp               599 drivers/net/phy/sfp.c 	err = sfp_hwmon_read_sensor(sfp, reg, value);
sfp               603 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate_bias(sfp, value);
sfp               608 drivers/net/phy/sfp.c static int sfp_hwmon_read_tx_power(struct sfp *sfp, int reg, long *value)
sfp               612 drivers/net/phy/sfp.c 	err = sfp_hwmon_read_sensor(sfp, reg, value);
sfp               616 drivers/net/phy/sfp.c 	sfp_hwmon_calibrate_tx_power(sfp, value);
sfp               621 drivers/net/phy/sfp.c static int sfp_hwmon_read_rx_power(struct sfp *sfp, int reg, long *value)
sfp               625 drivers/net/phy/sfp.c 	err = sfp_hwmon_read_sensor(sfp, reg, value);
sfp               634 drivers/net/phy/sfp.c static int sfp_hwmon_temp(struct sfp *sfp, u32 attr, long *value)
sfp               641 drivers/net/phy/sfp.c 		return sfp_hwmon_read_temp(sfp, SFP_TEMP, value);
sfp               644 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.temp_low_alarm);
sfp               645 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_temp(sfp, value);
sfp               649 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.temp_low_warn);
sfp               650 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_temp(sfp, value);
sfp               653 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.temp_high_warn);
sfp               654 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_temp(sfp, value);
sfp               658 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.temp_high_alarm);
sfp               659 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_temp(sfp, value);
sfp               663 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               671 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               679 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               687 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               700 drivers/net/phy/sfp.c static int sfp_hwmon_vcc(struct sfp *sfp, u32 attr, long *value)
sfp               707 drivers/net/phy/sfp.c 		return sfp_hwmon_read_vcc(sfp, SFP_VCC, value);
sfp               710 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.volt_low_alarm);
sfp               711 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_vcc(sfp, value);
sfp               715 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.volt_low_warn);
sfp               716 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_vcc(sfp, value);
sfp               720 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.volt_high_warn);
sfp               721 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_vcc(sfp, value);
sfp               725 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.volt_high_alarm);
sfp               726 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_vcc(sfp, value);
sfp               730 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               738 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               746 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               754 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               767 drivers/net/phy/sfp.c static int sfp_hwmon_bias(struct sfp *sfp, u32 attr, long *value)
sfp               774 drivers/net/phy/sfp.c 		return sfp_hwmon_read_bias(sfp, SFP_TX_BIAS, value);
sfp               777 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.bias_low_alarm);
sfp               778 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_bias(sfp, value);
sfp               782 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.bias_low_warn);
sfp               783 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_bias(sfp, value);
sfp               787 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.bias_high_warn);
sfp               788 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_bias(sfp, value);
sfp               792 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.bias_high_alarm);
sfp               793 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_bias(sfp, value);
sfp               797 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               805 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               813 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               821 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               834 drivers/net/phy/sfp.c static int sfp_hwmon_tx_power(struct sfp *sfp, u32 attr, long *value)
sfp               841 drivers/net/phy/sfp.c 		return sfp_hwmon_read_tx_power(sfp, SFP_TX_POWER, value);
sfp               844 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.txpwr_low_alarm);
sfp               845 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_tx_power(sfp, value);
sfp               849 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.txpwr_low_warn);
sfp               850 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_tx_power(sfp, value);
sfp               854 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.txpwr_high_warn);
sfp               855 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_tx_power(sfp, value);
sfp               859 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.txpwr_high_alarm);
sfp               860 drivers/net/phy/sfp.c 		sfp_hwmon_calibrate_tx_power(sfp, value);
sfp               864 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               872 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               880 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN0, &status, sizeof(status));
sfp               888 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM0, &status, sizeof(status));
sfp               901 drivers/net/phy/sfp.c static int sfp_hwmon_rx_power(struct sfp *sfp, u32 attr, long *value)
sfp               908 drivers/net/phy/sfp.c 		return sfp_hwmon_read_rx_power(sfp, SFP_RX_POWER, value);
sfp               911 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.rxpwr_low_alarm);
sfp               916 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.rxpwr_low_warn);
sfp               921 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.rxpwr_high_warn);
sfp               926 drivers/net/phy/sfp.c 		*value = be16_to_cpu(sfp->diag.rxpwr_high_alarm);
sfp               931 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM1, &status, sizeof(status));
sfp               939 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN1, &status, sizeof(status));
sfp               947 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_WARN1, &status, sizeof(status));
sfp               955 drivers/net/phy/sfp.c 		err = sfp_read(sfp, true, SFP_ALARM1, &status, sizeof(status));
sfp               971 drivers/net/phy/sfp.c 	struct sfp *sfp = dev_get_drvdata(dev);
sfp               975 drivers/net/phy/sfp.c 		return sfp_hwmon_temp(sfp, attr, value);
sfp               977 drivers/net/phy/sfp.c 		return sfp_hwmon_vcc(sfp, attr, value);
sfp               979 drivers/net/phy/sfp.c 		return sfp_hwmon_bias(sfp, attr, value);
sfp               983 drivers/net/phy/sfp.c 			return sfp_hwmon_tx_power(sfp, attr, value);
sfp               985 drivers/net/phy/sfp.c 			return sfp_hwmon_rx_power(sfp, attr, value);
sfp              1145 drivers/net/phy/sfp.c static int sfp_hwmon_insert(struct sfp *sfp)
sfp              1149 drivers/net/phy/sfp.c 	if (sfp->id.ext.sff8472_compliance == SFP_SFF8472_COMPLIANCE_NONE)
sfp              1152 drivers/net/phy/sfp.c 	if (!(sfp->id.ext.diagmon & SFP_DIAGMON_DDM))
sfp              1155 drivers/net/phy/sfp.c 	if (sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE)
sfp              1161 drivers/net/phy/sfp.c 	err = sfp_read(sfp, true, 0, &sfp->diag, sizeof(sfp->diag));
sfp              1165 drivers/net/phy/sfp.c 	sfp->hwmon_name = kstrdup(dev_name(sfp->dev), GFP_KERNEL);
sfp              1166 drivers/net/phy/sfp.c 	if (!sfp->hwmon_name)
sfp              1169 drivers/net/phy/sfp.c 	for (i = 0; sfp->hwmon_name[i]; i++)
sfp              1170 drivers/net/phy/sfp.c 		if (hwmon_is_bad_char(sfp->hwmon_name[i]))
sfp              1171 drivers/net/phy/sfp.c 			sfp->hwmon_name[i] = '_';
sfp              1173 drivers/net/phy/sfp.c 	sfp->hwmon_dev = hwmon_device_register_with_info(sfp->dev,
sfp              1174 drivers/net/phy/sfp.c 							 sfp->hwmon_name, sfp,
sfp              1178 drivers/net/phy/sfp.c 	return PTR_ERR_OR_ZERO(sfp->hwmon_dev);
sfp              1181 drivers/net/phy/sfp.c static void sfp_hwmon_remove(struct sfp *sfp)
sfp              1183 drivers/net/phy/sfp.c 	if (!IS_ERR_OR_NULL(sfp->hwmon_dev)) {
sfp              1184 drivers/net/phy/sfp.c 		hwmon_device_unregister(sfp->hwmon_dev);
sfp              1185 drivers/net/phy/sfp.c 		sfp->hwmon_dev = NULL;
sfp              1186 drivers/net/phy/sfp.c 		kfree(sfp->hwmon_name);
sfp              1190 drivers/net/phy/sfp.c static int sfp_hwmon_insert(struct sfp *sfp)
sfp              1195 drivers/net/phy/sfp.c static void sfp_hwmon_remove(struct sfp *sfp)
sfp              1201 drivers/net/phy/sfp.c static void sfp_module_tx_disable(struct sfp *sfp)
sfp              1203 drivers/net/phy/sfp.c 	dev_dbg(sfp->dev, "tx disable %u -> %u\n",
sfp              1204 drivers/net/phy/sfp.c 		sfp->state & SFP_F_TX_DISABLE ? 1 : 0, 1);
sfp              1205 drivers/net/phy/sfp.c 	sfp->state |= SFP_F_TX_DISABLE;
sfp              1206 drivers/net/phy/sfp.c 	sfp_set_state(sfp, sfp->state);
sfp              1209 drivers/net/phy/sfp.c static void sfp_module_tx_enable(struct sfp *sfp)
sfp              1211 drivers/net/phy/sfp.c 	dev_dbg(sfp->dev, "tx disable %u -> %u\n",
sfp              1212 drivers/net/phy/sfp.c 		sfp->state & SFP_F_TX_DISABLE ? 1 : 0, 0);
sfp              1213 drivers/net/phy/sfp.c 	sfp->state &= ~SFP_F_TX_DISABLE;
sfp              1214 drivers/net/phy/sfp.c 	sfp_set_state(sfp, sfp->state);
sfp              1217 drivers/net/phy/sfp.c static void sfp_module_tx_fault_reset(struct sfp *sfp)
sfp              1219 drivers/net/phy/sfp.c 	unsigned int state = sfp->state;
sfp              1224 drivers/net/phy/sfp.c 	sfp_set_state(sfp, state | SFP_F_TX_DISABLE);
sfp              1228 drivers/net/phy/sfp.c 	sfp_set_state(sfp, state);
sfp              1232 drivers/net/phy/sfp.c static void sfp_sm_set_timer(struct sfp *sfp, unsigned int timeout)
sfp              1235 drivers/net/phy/sfp.c 		mod_delayed_work(system_power_efficient_wq, &sfp->timeout,
sfp              1238 drivers/net/phy/sfp.c 		cancel_delayed_work(&sfp->timeout);
sfp              1241 drivers/net/phy/sfp.c static void sfp_sm_next(struct sfp *sfp, unsigned int state,
sfp              1244 drivers/net/phy/sfp.c 	sfp->sm_state = state;
sfp              1245 drivers/net/phy/sfp.c 	sfp_sm_set_timer(sfp, timeout);
sfp              1248 drivers/net/phy/sfp.c static void sfp_sm_ins_next(struct sfp *sfp, unsigned int state,
sfp              1251 drivers/net/phy/sfp.c 	sfp->sm_mod_state = state;
sfp              1252 drivers/net/phy/sfp.c 	sfp_sm_set_timer(sfp, timeout);
sfp              1255 drivers/net/phy/sfp.c static void sfp_sm_phy_detach(struct sfp *sfp)
sfp              1257 drivers/net/phy/sfp.c 	phy_stop(sfp->mod_phy);
sfp              1258 drivers/net/phy/sfp.c 	sfp_remove_phy(sfp->sfp_bus);
sfp              1259 drivers/net/phy/sfp.c 	phy_device_remove(sfp->mod_phy);
sfp              1260 drivers/net/phy/sfp.c 	phy_device_free(sfp->mod_phy);
sfp              1261 drivers/net/phy/sfp.c 	sfp->mod_phy = NULL;
sfp              1264 drivers/net/phy/sfp.c static void sfp_sm_probe_phy(struct sfp *sfp)
sfp              1271 drivers/net/phy/sfp.c 	phy = mdiobus_scan(sfp->i2c_mii, SFP_PHY_ADDR);
sfp              1273 drivers/net/phy/sfp.c 		dev_info(sfp->dev, "no PHY detected\n");
sfp              1277 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
sfp              1281 drivers/net/phy/sfp.c 	err = sfp_add_phy(sfp->sfp_bus, phy);
sfp              1285 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "sfp_add_phy failed: %d\n", err);
sfp              1289 drivers/net/phy/sfp.c 	sfp->mod_phy = phy;
sfp              1293 drivers/net/phy/sfp.c static void sfp_sm_link_up(struct sfp *sfp)
sfp              1295 drivers/net/phy/sfp.c 	sfp_link_up(sfp->sfp_bus);
sfp              1296 drivers/net/phy/sfp.c 	sfp_sm_next(sfp, SFP_S_LINK_UP, 0);
sfp              1299 drivers/net/phy/sfp.c static void sfp_sm_link_down(struct sfp *sfp)
sfp              1301 drivers/net/phy/sfp.c 	sfp_link_down(sfp->sfp_bus);
sfp              1304 drivers/net/phy/sfp.c static void sfp_sm_link_check_los(struct sfp *sfp)
sfp              1306 drivers/net/phy/sfp.c 	unsigned int los = sfp->state & SFP_F_LOS;
sfp              1311 drivers/net/phy/sfp.c 	if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED))
sfp              1313 drivers/net/phy/sfp.c 	else if (!(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL)))
sfp              1317 drivers/net/phy/sfp.c 		sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
sfp              1319 drivers/net/phy/sfp.c 		sfp_sm_link_up(sfp);
sfp              1322 drivers/net/phy/sfp.c static bool sfp_los_event_active(struct sfp *sfp, unsigned int event)
sfp              1324 drivers/net/phy/sfp.c 	return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
sfp              1326 drivers/net/phy/sfp.c 	       (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
sfp              1330 drivers/net/phy/sfp.c static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
sfp              1332 drivers/net/phy/sfp.c 	return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
sfp              1334 drivers/net/phy/sfp.c 	       (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
sfp              1338 drivers/net/phy/sfp.c static void sfp_sm_fault(struct sfp *sfp, bool warn)
sfp              1340 drivers/net/phy/sfp.c 	if (sfp->sm_retries && !--sfp->sm_retries) {
sfp              1341 drivers/net/phy/sfp.c 		dev_err(sfp->dev,
sfp              1343 drivers/net/phy/sfp.c 		sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0);
sfp              1346 drivers/net/phy/sfp.c 			dev_err(sfp->dev, "module transmit fault indicated\n");
sfp              1348 drivers/net/phy/sfp.c 		sfp_sm_next(sfp, SFP_S_TX_FAULT, T_FAULT_RECOVER);
sfp              1352 drivers/net/phy/sfp.c static void sfp_sm_mod_init(struct sfp *sfp)
sfp              1354 drivers/net/phy/sfp.c 	sfp_module_tx_enable(sfp);
sfp              1360 drivers/net/phy/sfp.c 	sfp_sm_next(sfp, SFP_S_INIT, T_INIT_JIFFIES);
sfp              1361 drivers/net/phy/sfp.c 	sfp->sm_retries = 5;
sfp              1372 drivers/net/phy/sfp.c 	if (sfp->id.base.e1000_base_t ||
sfp              1373 drivers/net/phy/sfp.c 	    sfp->id.base.e100_base_lx ||
sfp              1374 drivers/net/phy/sfp.c 	    sfp->id.base.e100_base_fx)
sfp              1375 drivers/net/phy/sfp.c 		sfp_sm_probe_phy(sfp);
sfp              1378 drivers/net/phy/sfp.c static int sfp_sm_mod_hpower(struct sfp *sfp)
sfp              1385 drivers/net/phy/sfp.c 	if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_POWER_DECL))
sfp              1387 drivers/net/phy/sfp.c 	if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_HIGH_POWER_LEVEL))
sfp              1390 drivers/net/phy/sfp.c 	if (sfp->id.ext.sff8472_compliance == SFP_SFF8472_COMPLIANCE_NONE &&
sfp              1391 drivers/net/phy/sfp.c 	    (sfp->id.ext.diagmon & (SFP_DIAGMON_DDM | SFP_DIAGMON_ADDRMODE)) !=
sfp              1397 drivers/net/phy/sfp.c 		if (power > sfp->max_power_mW) {
sfp              1398 drivers/net/phy/sfp.c 			dev_err(sfp->dev,
sfp              1406 drivers/net/phy/sfp.c 	if (power > sfp->max_power_mW) {
sfp              1407 drivers/net/phy/sfp.c 		dev_warn(sfp->dev,
sfp              1416 drivers/net/phy/sfp.c 	err = sfp_read(sfp, true, SFP_EXT_STATUS, &val, sizeof(val));
sfp              1418 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "Failed to read EEPROM: %d\n", err);
sfp              1425 drivers/net/phy/sfp.c 	err = sfp_write(sfp, true, SFP_EXT_STATUS, &val, sizeof(val));
sfp              1427 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "Failed to write EEPROM: %d\n", err);
sfp              1432 drivers/net/phy/sfp.c 	dev_info(sfp->dev, "Module switched to %u.%uW power level\n",
sfp              1440 drivers/net/phy/sfp.c static int sfp_sm_mod_probe(struct sfp *sfp)
sfp              1448 drivers/net/phy/sfp.c 	ret = sfp_read(sfp, false, 0, &id, sizeof(id));
sfp              1450 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "failed to read EEPROM: %d\n", ret);
sfp              1455 drivers/net/phy/sfp.c 		dev_err(sfp->dev, "EEPROM short read: %d\n", ret);
sfp              1469 drivers/net/phy/sfp.c 			dev_warn(sfp->dev,
sfp              1473 drivers/net/phy/sfp.c 			dev_err(sfp->dev,
sfp              1485 drivers/net/phy/sfp.c 			dev_warn(sfp->dev,
sfp              1489 drivers/net/phy/sfp.c 			dev_err(sfp->dev,
sfp              1498 drivers/net/phy/sfp.c 	sfp->id = id;
sfp              1500 drivers/net/phy/sfp.c 	dev_info(sfp->dev, "module %.*s %.*s rev %.*s sn %.*s dc %.*s\n",
sfp              1508 drivers/net/phy/sfp.c 	if (!sfp->type->module_supported(&sfp->id)) {
sfp              1509 drivers/net/phy/sfp.c 		dev_err(sfp->dev,
sfp              1511 drivers/net/phy/sfp.c 			sfp->id.base.phys_id, sfp->id.base.phys_ext_id);
sfp              1516 drivers/net/phy/sfp.c 	if (sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE)
sfp              1517 drivers/net/phy/sfp.c 		dev_warn(sfp->dev,
sfp              1520 drivers/net/phy/sfp.c 	ret = sfp_hwmon_insert(sfp);
sfp              1524 drivers/net/phy/sfp.c 	ret = sfp_module_insert(sfp->sfp_bus, &sfp->id);
sfp              1528 drivers/net/phy/sfp.c 	return sfp_sm_mod_hpower(sfp);
sfp              1531 drivers/net/phy/sfp.c static void sfp_sm_mod_remove(struct sfp *sfp)
sfp              1533 drivers/net/phy/sfp.c 	sfp_module_remove(sfp->sfp_bus);
sfp              1535 drivers/net/phy/sfp.c 	sfp_hwmon_remove(sfp);
sfp              1537 drivers/net/phy/sfp.c 	if (sfp->mod_phy)
sfp              1538 drivers/net/phy/sfp.c 		sfp_sm_phy_detach(sfp);
sfp              1540 drivers/net/phy/sfp.c 	sfp_module_tx_disable(sfp);
sfp              1542 drivers/net/phy/sfp.c 	memset(&sfp->id, 0, sizeof(sfp->id));
sfp              1544 drivers/net/phy/sfp.c 	dev_info(sfp->dev, "module removed\n");
sfp              1547 drivers/net/phy/sfp.c static void sfp_sm_event(struct sfp *sfp, unsigned int event)
sfp              1549 drivers/net/phy/sfp.c 	mutex_lock(&sfp->sm_mutex);
sfp              1551 drivers/net/phy/sfp.c 	dev_dbg(sfp->dev, "SM: enter %s:%s:%s event %s\n",
sfp              1552 drivers/net/phy/sfp.c 		mod_state_to_str(sfp->sm_mod_state),
sfp              1553 drivers/net/phy/sfp.c 		dev_state_to_str(sfp->sm_dev_state),
sfp              1554 drivers/net/phy/sfp.c 		sm_state_to_str(sfp->sm_state),
sfp              1560 drivers/net/phy/sfp.c 	switch (sfp->sm_mod_state) {
sfp              1562 drivers/net/phy/sfp.c 		if (event == SFP_E_INSERT && sfp->attached) {
sfp              1563 drivers/net/phy/sfp.c 			sfp_module_tx_disable(sfp);
sfp              1564 drivers/net/phy/sfp.c 			sfp_sm_ins_next(sfp, SFP_MOD_PROBE, T_PROBE_INIT);
sfp              1570 drivers/net/phy/sfp.c 			sfp_sm_ins_next(sfp, SFP_MOD_EMPTY, 0);
sfp              1572 drivers/net/phy/sfp.c 			int val = sfp_sm_mod_probe(sfp);
sfp              1575 drivers/net/phy/sfp.c 				sfp_sm_ins_next(sfp, SFP_MOD_PRESENT, 0);
sfp              1577 drivers/net/phy/sfp.c 				sfp_sm_ins_next(sfp, SFP_MOD_HPOWER, val);
sfp              1579 drivers/net/phy/sfp.c 				sfp_sm_ins_next(sfp, SFP_MOD_ERROR, 0);
sfp              1581 drivers/net/phy/sfp.c 				sfp_sm_set_timer(sfp, T_PROBE_RETRY);
sfp              1587 drivers/net/phy/sfp.c 			sfp_sm_ins_next(sfp, SFP_MOD_PRESENT, 0);
sfp              1594 drivers/net/phy/sfp.c 			sfp_sm_mod_remove(sfp);
sfp              1595 drivers/net/phy/sfp.c 			sfp_sm_ins_next(sfp, SFP_MOD_EMPTY, 0);
sfp              1601 drivers/net/phy/sfp.c 	switch (sfp->sm_dev_state) {
sfp              1604 drivers/net/phy/sfp.c 			sfp->sm_dev_state = SFP_DEV_UP;
sfp              1613 drivers/net/phy/sfp.c 			if (!sfp->mod_phy)
sfp              1614 drivers/net/phy/sfp.c 				sfp_module_tx_disable(sfp);
sfp              1615 drivers/net/phy/sfp.c 			sfp->sm_dev_state = SFP_DEV_DOWN;
sfp              1621 drivers/net/phy/sfp.c 	if (sfp->sm_state != SFP_S_DOWN &&
sfp              1622 drivers/net/phy/sfp.c 	    (sfp->sm_mod_state != SFP_MOD_PRESENT ||
sfp              1623 drivers/net/phy/sfp.c 	     sfp->sm_dev_state != SFP_DEV_UP)) {
sfp              1624 drivers/net/phy/sfp.c 		if (sfp->sm_state == SFP_S_LINK_UP &&
sfp              1625 drivers/net/phy/sfp.c 		    sfp->sm_dev_state == SFP_DEV_UP)
sfp              1626 drivers/net/phy/sfp.c 			sfp_sm_link_down(sfp);
sfp              1627 drivers/net/phy/sfp.c 		if (sfp->mod_phy)
sfp              1628 drivers/net/phy/sfp.c 			sfp_sm_phy_detach(sfp);
sfp              1629 drivers/net/phy/sfp.c 		sfp_sm_next(sfp, SFP_S_DOWN, 0);
sfp              1630 drivers/net/phy/sfp.c 		mutex_unlock(&sfp->sm_mutex);
sfp              1635 drivers/net/phy/sfp.c 	switch (sfp->sm_state) {
sfp              1637 drivers/net/phy/sfp.c 		if (sfp->sm_mod_state == SFP_MOD_PRESENT &&
sfp              1638 drivers/net/phy/sfp.c 		    sfp->sm_dev_state == SFP_DEV_UP)
sfp              1639 drivers/net/phy/sfp.c 			sfp_sm_mod_init(sfp);
sfp              1643 drivers/net/phy/sfp.c 		if (event == SFP_E_TIMEOUT && sfp->state & SFP_F_TX_FAULT)
sfp              1644 drivers/net/phy/sfp.c 			sfp_sm_fault(sfp, true);
sfp              1646 drivers/net/phy/sfp.c 			sfp_sm_link_check_los(sfp);
sfp              1651 drivers/net/phy/sfp.c 			sfp_sm_fault(sfp, true);
sfp              1652 drivers/net/phy/sfp.c 		else if (sfp_los_event_inactive(sfp, event))
sfp              1653 drivers/net/phy/sfp.c 			sfp_sm_link_up(sfp);
sfp              1658 drivers/net/phy/sfp.c 			sfp_sm_link_down(sfp);
sfp              1659 drivers/net/phy/sfp.c 			sfp_sm_fault(sfp, true);
sfp              1660 drivers/net/phy/sfp.c 		} else if (sfp_los_event_active(sfp, event)) {
sfp              1661 drivers/net/phy/sfp.c 			sfp_sm_link_down(sfp);
sfp              1662 drivers/net/phy/sfp.c 			sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
sfp              1668 drivers/net/phy/sfp.c 			sfp_module_tx_fault_reset(sfp);
sfp              1669 drivers/net/phy/sfp.c 			sfp_sm_next(sfp, SFP_S_REINIT, T_INIT_JIFFIES);
sfp              1674 drivers/net/phy/sfp.c 		if (event == SFP_E_TIMEOUT && sfp->state & SFP_F_TX_FAULT) {
sfp              1675 drivers/net/phy/sfp.c 			sfp_sm_fault(sfp, false);
sfp              1677 drivers/net/phy/sfp.c 			dev_info(sfp->dev, "module transmit fault recovered\n");
sfp              1678 drivers/net/phy/sfp.c 			sfp_sm_link_check_los(sfp);
sfp              1686 drivers/net/phy/sfp.c 	dev_dbg(sfp->dev, "SM: exit %s:%s:%s\n",
sfp              1687 drivers/net/phy/sfp.c 		mod_state_to_str(sfp->sm_mod_state),
sfp              1688 drivers/net/phy/sfp.c 		dev_state_to_str(sfp->sm_dev_state),
sfp              1689 drivers/net/phy/sfp.c 		sm_state_to_str(sfp->sm_state));
sfp              1691 drivers/net/phy/sfp.c 	mutex_unlock(&sfp->sm_mutex);
sfp              1694 drivers/net/phy/sfp.c static void sfp_attach(struct sfp *sfp)
sfp              1696 drivers/net/phy/sfp.c 	sfp->attached = true;
sfp              1697 drivers/net/phy/sfp.c 	if (sfp->state & SFP_F_PRESENT)
sfp              1698 drivers/net/phy/sfp.c 		sfp_sm_event(sfp, SFP_E_INSERT);
sfp              1701 drivers/net/phy/sfp.c static void sfp_detach(struct sfp *sfp)
sfp              1703 drivers/net/phy/sfp.c 	sfp->attached = false;
sfp              1704 drivers/net/phy/sfp.c 	sfp_sm_event(sfp, SFP_E_REMOVE);
sfp              1707 drivers/net/phy/sfp.c static void sfp_start(struct sfp *sfp)
sfp              1709 drivers/net/phy/sfp.c 	sfp_sm_event(sfp, SFP_E_DEV_UP);
sfp              1712 drivers/net/phy/sfp.c static void sfp_stop(struct sfp *sfp)
sfp              1714 drivers/net/phy/sfp.c 	sfp_sm_event(sfp, SFP_E_DEV_DOWN);
sfp              1717 drivers/net/phy/sfp.c static int sfp_module_info(struct sfp *sfp, struct ethtool_modinfo *modinfo)
sfp              1721 drivers/net/phy/sfp.c 	if (sfp->id.ext.sff8472_compliance &&
sfp              1722 drivers/net/phy/sfp.c 	    !(sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE)) {
sfp              1732 drivers/net/phy/sfp.c static int sfp_module_eeprom(struct sfp *sfp, struct ethtool_eeprom *ee,
sfp              1747 drivers/net/phy/sfp.c 		ret = sfp_read(sfp, false, first, data, len);
sfp              1759 drivers/net/phy/sfp.c 		ret = sfp_read(sfp, true, first, data, len);
sfp              1777 drivers/net/phy/sfp.c 	struct sfp *sfp = container_of(work, struct sfp, timeout.work);
sfp              1780 drivers/net/phy/sfp.c 	sfp_sm_event(sfp, SFP_E_TIMEOUT);
sfp              1784 drivers/net/phy/sfp.c static void sfp_check_state(struct sfp *sfp)
sfp              1788 drivers/net/phy/sfp.c 	mutex_lock(&sfp->st_mutex);
sfp              1789 drivers/net/phy/sfp.c 	state = sfp_get_state(sfp);
sfp              1790 drivers/net/phy/sfp.c 	changed = state ^ sfp->state;
sfp              1795 drivers/net/phy/sfp.c 			dev_dbg(sfp->dev, "%s %u -> %u\n", gpio_of_names[i],
sfp              1796 drivers/net/phy/sfp.c 				!!(sfp->state & BIT(i)), !!(state & BIT(i)));
sfp              1798 drivers/net/phy/sfp.c 	state |= sfp->state & (SFP_F_TX_DISABLE | SFP_F_RATE_SELECT);
sfp              1799 drivers/net/phy/sfp.c 	sfp->state = state;
sfp              1803 drivers/net/phy/sfp.c 		sfp_sm_event(sfp, state & SFP_F_PRESENT ?
sfp              1807 drivers/net/phy/sfp.c 		sfp_sm_event(sfp, state & SFP_F_TX_FAULT ?
sfp              1811 drivers/net/phy/sfp.c 		sfp_sm_event(sfp, state & SFP_F_LOS ?
sfp              1814 drivers/net/phy/sfp.c 	mutex_unlock(&sfp->st_mutex);
sfp              1819 drivers/net/phy/sfp.c 	struct sfp *sfp = data;
sfp              1821 drivers/net/phy/sfp.c 	sfp_check_state(sfp);
sfp              1828 drivers/net/phy/sfp.c 	struct sfp *sfp = container_of(work, struct sfp, poll.work);
sfp              1830 drivers/net/phy/sfp.c 	sfp_check_state(sfp);
sfp              1831 drivers/net/phy/sfp.c 	mod_delayed_work(system_wq, &sfp->poll, poll_jiffies);
sfp              1834 drivers/net/phy/sfp.c static struct sfp *sfp_alloc(struct device *dev)
sfp              1836 drivers/net/phy/sfp.c 	struct sfp *sfp;
sfp              1838 drivers/net/phy/sfp.c 	sfp = kzalloc(sizeof(*sfp), GFP_KERNEL);
sfp              1839 drivers/net/phy/sfp.c 	if (!sfp)
sfp              1842 drivers/net/phy/sfp.c 	sfp->dev = dev;
sfp              1844 drivers/net/phy/sfp.c 	mutex_init(&sfp->sm_mutex);
sfp              1845 drivers/net/phy/sfp.c 	mutex_init(&sfp->st_mutex);
sfp              1846 drivers/net/phy/sfp.c 	INIT_DELAYED_WORK(&sfp->poll, sfp_poll);
sfp              1847 drivers/net/phy/sfp.c 	INIT_DELAYED_WORK(&sfp->timeout, sfp_timeout);
sfp              1849 drivers/net/phy/sfp.c 	return sfp;
sfp              1854 drivers/net/phy/sfp.c 	struct sfp *sfp = data;
sfp              1856 drivers/net/phy/sfp.c 	cancel_delayed_work_sync(&sfp->poll);
sfp              1857 drivers/net/phy/sfp.c 	cancel_delayed_work_sync(&sfp->timeout);
sfp              1858 drivers/net/phy/sfp.c 	if (sfp->i2c_mii) {
sfp              1859 drivers/net/phy/sfp.c 		mdiobus_unregister(sfp->i2c_mii);
sfp              1860 drivers/net/phy/sfp.c 		mdiobus_free(sfp->i2c_mii);
sfp              1862 drivers/net/phy/sfp.c 	if (sfp->i2c)
sfp              1863 drivers/net/phy/sfp.c 		i2c_put_adapter(sfp->i2c);
sfp              1864 drivers/net/phy/sfp.c 	kfree(sfp);
sfp              1871 drivers/net/phy/sfp.c 	struct sfp *sfp;
sfp              1875 drivers/net/phy/sfp.c 	sfp = sfp_alloc(&pdev->dev);
sfp              1876 drivers/net/phy/sfp.c 	if (IS_ERR(sfp))
sfp              1877 drivers/net/phy/sfp.c 		return PTR_ERR(sfp);
sfp              1879 drivers/net/phy/sfp.c 	platform_set_drvdata(pdev, sfp);
sfp              1881 drivers/net/phy/sfp.c 	err = devm_add_action(sfp->dev, sfp_cleanup, sfp);
sfp              1885 drivers/net/phy/sfp.c 	sff = sfp->type = &sfp_data;
sfp              1896 drivers/net/phy/sfp.c 		sff = sfp->type = id->data;
sfp              1900 drivers/net/phy/sfp.c 			dev_err(sfp->dev, "missing 'i2c-bus' property\n");
sfp              1928 drivers/net/phy/sfp.c 	err = sfp_i2c_configure(sfp, i2c);
sfp              1936 drivers/net/phy/sfp.c 			sfp->gpio[i] = devm_gpiod_get_optional(sfp->dev,
sfp              1938 drivers/net/phy/sfp.c 			if (IS_ERR(sfp->gpio[i]))
sfp              1939 drivers/net/phy/sfp.c 				return PTR_ERR(sfp->gpio[i]);
sfp              1942 drivers/net/phy/sfp.c 	sfp->get_state = sfp_gpio_get_state;
sfp              1943 drivers/net/phy/sfp.c 	sfp->set_state = sfp_gpio_set_state;
sfp              1946 drivers/net/phy/sfp.c 	if (!(sfp->gpio[GPIO_MODDEF0]))
sfp              1947 drivers/net/phy/sfp.c 		sfp->get_state = sff_gpio_get_state;
sfp              1950 drivers/net/phy/sfp.c 				 &sfp->max_power_mW);
sfp              1951 drivers/net/phy/sfp.c 	if (!sfp->max_power_mW)
sfp              1952 drivers/net/phy/sfp.c 		sfp->max_power_mW = 1000;
sfp              1954 drivers/net/phy/sfp.c 	dev_info(sfp->dev, "Host maximum power %u.%uW\n",
sfp              1955 drivers/net/phy/sfp.c 		 sfp->max_power_mW / 1000, (sfp->max_power_mW / 100) % 10);
sfp              1960 drivers/net/phy/sfp.c 	sfp->state = sfp_get_state(sfp) | SFP_F_TX_DISABLE;
sfp              1962 drivers/net/phy/sfp.c 	if (sfp->gpio[GPIO_RATE_SELECT] &&
sfp              1963 drivers/net/phy/sfp.c 	    gpiod_get_value_cansleep(sfp->gpio[GPIO_RATE_SELECT]))
sfp              1964 drivers/net/phy/sfp.c 		sfp->state |= SFP_F_RATE_SELECT;
sfp              1965 drivers/net/phy/sfp.c 	sfp_set_state(sfp, sfp->state);
sfp              1966 drivers/net/phy/sfp.c 	sfp_module_tx_disable(sfp);
sfp              1969 drivers/net/phy/sfp.c 		if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i])
sfp              1972 drivers/net/phy/sfp.c 		sfp->gpio_irq[i] = gpiod_to_irq(sfp->gpio[i]);
sfp              1973 drivers/net/phy/sfp.c 		if (!sfp->gpio_irq[i]) {
sfp              1978 drivers/net/phy/sfp.c 		err = devm_request_threaded_irq(sfp->dev, sfp->gpio_irq[i],
sfp              1983 drivers/net/phy/sfp.c 						dev_name(sfp->dev), sfp);
sfp              1985 drivers/net/phy/sfp.c 			sfp->gpio_irq[i] = 0;
sfp              1991 drivers/net/phy/sfp.c 		mod_delayed_work(system_wq, &sfp->poll, poll_jiffies);
sfp              1998 drivers/net/phy/sfp.c 	if (!sfp->gpio[GPIO_TX_DISABLE])
sfp              1999 drivers/net/phy/sfp.c 		dev_warn(sfp->dev,
sfp              2002 drivers/net/phy/sfp.c 	sfp->sfp_bus = sfp_register_socket(sfp->dev, sfp, &sfp_module_ops);
sfp              2003 drivers/net/phy/sfp.c 	if (!sfp->sfp_bus)
sfp              2011 drivers/net/phy/sfp.c 	struct sfp *sfp = platform_get_drvdata(pdev);
sfp              2013 drivers/net/phy/sfp.c 	sfp_unregister_socket(sfp->sfp_bus);
sfp              2020 drivers/net/phy/sfp.c 	struct sfp *sfp = platform_get_drvdata(pdev);
sfp              2024 drivers/net/phy/sfp.c 		if (!sfp->gpio_irq[i])
sfp              2027 drivers/net/phy/sfp.c 		devm_free_irq(sfp->dev, sfp->gpio_irq[i], sfp);
sfp              2030 drivers/net/phy/sfp.c 	cancel_delayed_work_sync(&sfp->poll);
sfp              2031 drivers/net/phy/sfp.c 	cancel_delayed_work_sync(&sfp->timeout);
sfp                 7 drivers/net/phy/sfp.h struct sfp;
sfp                10 drivers/net/phy/sfp.h 	void (*attach)(struct sfp *sfp);
sfp                11 drivers/net/phy/sfp.h 	void (*detach)(struct sfp *sfp);
sfp                12 drivers/net/phy/sfp.h 	void (*start)(struct sfp *sfp);
sfp                13 drivers/net/phy/sfp.h 	void (*stop)(struct sfp *sfp);
sfp                14 drivers/net/phy/sfp.h 	int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo);
sfp                15 drivers/net/phy/sfp.h 	int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee,
sfp                26 drivers/net/phy/sfp.h struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
sfp               126 drivers/scsi/bfa/bfa_core.c 	struct bfa_sfp_s	*sfp = BFA_SFP_MOD(bfa);
sfp               129 drivers/scsi/bfa/bfa_core.c 	bfa_sfp_attach(sfp, &bfa->ioc, bfa, bfa->trcmod);
sfp               130 drivers/scsi/bfa/bfa_core.c 	bfa_sfp_memclaim(sfp, sfp_dma->kva_curp, sfp_dma->dma_curp);
sfp              3635 drivers/scsi/bfa/bfa_ioc.c static void bfa_sfp_getdata_send(struct bfa_sfp_s *sfp);
sfp              3636 drivers/scsi/bfa/bfa_ioc.c static void bfa_sfp_media_get(struct bfa_sfp_s *sfp);
sfp              3637 drivers/scsi/bfa/bfa_ioc.c static bfa_status_t bfa_sfp_speed_valid(struct bfa_sfp_s *sfp,
sfp              3641 drivers/scsi/bfa/bfa_ioc.c bfa_cb_sfp_show(struct bfa_sfp_s *sfp)
sfp              3643 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->lock);
sfp              3644 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->cbfn)
sfp              3645 drivers/scsi/bfa/bfa_ioc.c 		sfp->cbfn(sfp->cbarg, sfp->status);
sfp              3646 drivers/scsi/bfa/bfa_ioc.c 	sfp->lock = 0;
sfp              3647 drivers/scsi/bfa/bfa_ioc.c 	sfp->cbfn = NULL;
sfp              3651 drivers/scsi/bfa/bfa_ioc.c bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp)
sfp              3653 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->portspeed);
sfp              3654 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->media) {
sfp              3655 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_media_get(sfp);
sfp              3656 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state_query_cbfn)
sfp              3657 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbfn(sfp->state_query_cbarg,
sfp              3658 drivers/scsi/bfa/bfa_ioc.c 					sfp->status);
sfp              3659 drivers/scsi/bfa/bfa_ioc.c 		sfp->media = NULL;
sfp              3662 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->portspeed) {
sfp              3663 drivers/scsi/bfa/bfa_ioc.c 		sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
sfp              3664 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state_query_cbfn)
sfp              3665 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbfn(sfp->state_query_cbarg,
sfp              3666 drivers/scsi/bfa/bfa_ioc.c 					sfp->status);
sfp              3667 drivers/scsi/bfa/bfa_ioc.c 		sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
sfp              3670 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_lock = 0;
sfp              3671 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_cbfn = NULL;
sfp              3680 drivers/scsi/bfa/bfa_ioc.c 	struct bfa_sfp_s *sfp = sfp_arg;
sfp              3682 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, event);
sfp              3683 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->lock);
sfp              3684 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->state_query_lock);
sfp              3689 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->lock) {
sfp              3690 drivers/scsi/bfa/bfa_ioc.c 			sfp->status = BFA_STATUS_IOC_FAILURE;
sfp              3691 drivers/scsi/bfa/bfa_ioc.c 			bfa_cb_sfp_show(sfp);
sfp              3694 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state_query_lock) {
sfp              3695 drivers/scsi/bfa/bfa_ioc.c 			sfp->status = BFA_STATUS_IOC_FAILURE;
sfp              3696 drivers/scsi/bfa/bfa_ioc.c 			bfa_cb_sfp_state_query(sfp);
sfp              3709 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_scn_aen_post(struct bfa_sfp_s *sfp, struct bfi_sfp_scn_s *rsp)
sfp              3711 drivers/scsi/bfa/bfa_ioc.c 	struct bfad_s *bfad = (struct bfad_s *)sfp->ioc->bfa->bfad;
sfp              3715 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, (((u64)rsp->pomlvl) << 16) | (((u64)rsp->sfpid) << 8) |
sfp              3722 drivers/scsi/bfa/bfa_ioc.c 	aen_entry->aen_data.port.ioc_type = bfa_ioc_get_type(sfp->ioc);
sfp              3723 drivers/scsi/bfa/bfa_ioc.c 	aen_entry->aen_data.port.pwwn = sfp->ioc->attr->pwwn;
sfp              3724 drivers/scsi/bfa/bfa_ioc.c 	aen_entry->aen_data.port.mac = bfa_ioc_get_mac(sfp->ioc);
sfp              3744 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, rsp->event);
sfp              3749 drivers/scsi/bfa/bfa_ioc.c 	bfad_im_post_vendor_event(aen_entry, bfad, ++sfp->ioc->ioc_aen_seq,
sfp              3757 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_getdata_send(struct bfa_sfp_s *sfp)
sfp              3759 drivers/scsi/bfa/bfa_ioc.c 	struct bfi_sfp_req_s *req = (struct bfi_sfp_req_s *)sfp->mbcmd.msg;
sfp              3761 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, req->memtype);
sfp              3765 drivers/scsi/bfa/bfa_ioc.c 			bfa_ioc_portid(sfp->ioc));
sfp              3768 drivers/scsi/bfa/bfa_ioc.c 	bfa_ioc_mbox_queue(sfp->ioc, &sfp->mbcmd);
sfp              3775 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_getdata(struct bfa_sfp_s *sfp, enum bfi_sfp_mem_e memtype)
sfp              3777 drivers/scsi/bfa/bfa_ioc.c 	struct bfi_sfp_req_s *req = (struct bfi_sfp_req_s *)sfp->mbcmd.msg;
sfp              3779 drivers/scsi/bfa/bfa_ioc.c 	WARN_ON(sfp->lock != 0);
sfp              3780 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->state);
sfp              3782 drivers/scsi/bfa/bfa_ioc.c 	sfp->lock = 1;
sfp              3783 drivers/scsi/bfa/bfa_ioc.c 	sfp->memtype = memtype;
sfp              3787 drivers/scsi/bfa/bfa_ioc.c 	bfa_alen_set(&req->alen, sizeof(struct sfp_mem_s), sfp->dbuf_pa);
sfp              3789 drivers/scsi/bfa/bfa_ioc.c 	bfa_sfp_getdata_send(sfp);
sfp              3796 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_scn(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg)
sfp              3802 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = BFA_SFP_STATE_INSERTED;
sfp              3803 drivers/scsi/bfa/bfa_ioc.c 		sfp->data_valid = 0;
sfp              3804 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn_aen_post(sfp, rsp);
sfp              3807 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = BFA_SFP_STATE_REMOVED;
sfp              3808 drivers/scsi/bfa/bfa_ioc.c 		sfp->data_valid = 0;
sfp              3809 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn_aen_post(sfp, rsp);
sfp              3812 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = BFA_SFP_STATE_FAILED;
sfp              3813 drivers/scsi/bfa/bfa_ioc.c 		sfp->data_valid = 0;
sfp              3814 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn_aen_post(sfp, rsp);
sfp              3817 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = BFA_SFP_STATE_UNSUPPORT;
sfp              3818 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn_aen_post(sfp, rsp);
sfp              3819 drivers/scsi/bfa/bfa_ioc.c 		if (!sfp->lock)
sfp              3820 drivers/scsi/bfa/bfa_ioc.c 			bfa_sfp_getdata(sfp, BFI_SFP_MEM_ALL);
sfp              3823 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn_aen_post(sfp, rsp);
sfp              3826 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = BFA_SFP_STATE_VALID;
sfp              3827 drivers/scsi/bfa/bfa_ioc.c 		if (!sfp->lock)
sfp              3828 drivers/scsi/bfa/bfa_ioc.c 			bfa_sfp_getdata(sfp, BFI_SFP_MEM_ALL);
sfp              3831 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, rsp->event);
sfp              3840 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_show_comp(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg)
sfp              3844 drivers/scsi/bfa/bfa_ioc.c 	if (!sfp->lock) {
sfp              3848 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, sfp->lock);
sfp              3852 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, rsp->status);
sfp              3854 drivers/scsi/bfa/bfa_ioc.c 		sfp->data_valid = 1;
sfp              3855 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state == BFA_SFP_STATE_VALID)
sfp              3856 drivers/scsi/bfa/bfa_ioc.c 			sfp->status = BFA_STATUS_OK;
sfp              3857 drivers/scsi/bfa/bfa_ioc.c 		else if (sfp->state == BFA_SFP_STATE_UNSUPPORT)
sfp              3858 drivers/scsi/bfa/bfa_ioc.c 			sfp->status = BFA_STATUS_SFP_UNSUPP;
sfp              3860 drivers/scsi/bfa/bfa_ioc.c 			bfa_trc(sfp, sfp->state);
sfp              3862 drivers/scsi/bfa/bfa_ioc.c 		sfp->data_valid = 0;
sfp              3863 drivers/scsi/bfa/bfa_ioc.c 		sfp->status = rsp->status;
sfp              3867 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->memtype);
sfp              3868 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->memtype == BFI_SFP_MEM_DIAGEXT) {
sfp              3869 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, sfp->data_valid);
sfp              3870 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->data_valid) {
sfp              3872 drivers/scsi/bfa/bfa_ioc.c 			u8 *des = (u8 *)(sfp->sfpmem);
sfp              3873 drivers/scsi/bfa/bfa_ioc.c 			memcpy(des, sfp->dbuf_kva, size);
sfp              3878 drivers/scsi/bfa/bfa_ioc.c 		bfa_cb_sfp_show(sfp);
sfp              3880 drivers/scsi/bfa/bfa_ioc.c 		sfp->lock = 0;
sfp              3882 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->state_query_lock);
sfp              3883 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state_query_lock) {
sfp              3884 drivers/scsi/bfa/bfa_ioc.c 		sfp->state = rsp->state;
sfp              3886 drivers/scsi/bfa/bfa_ioc.c 		bfa_cb_sfp_state_query(sfp);
sfp              3894 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_state_query(struct bfa_sfp_s *sfp)
sfp              3896 drivers/scsi/bfa/bfa_ioc.c 	struct bfi_sfp_req_s *req = (struct bfi_sfp_req_s *)sfp->mbcmd.msg;
sfp              3899 drivers/scsi/bfa/bfa_ioc.c 	WARN_ON(sfp->state != BFA_SFP_STATE_INIT);
sfp              3900 drivers/scsi/bfa/bfa_ioc.c 	WARN_ON(sfp->state_query_lock != 0);
sfp              3901 drivers/scsi/bfa/bfa_ioc.c 	bfa_trc(sfp, sfp->state);
sfp              3903 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_lock = 1;
sfp              3906 drivers/scsi/bfa/bfa_ioc.c 	if (!sfp->lock)
sfp              3907 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_getdata(sfp, BFI_SFP_MEM_ALL);
sfp              3911 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_media_get(struct bfa_sfp_s *sfp)
sfp              3913 drivers/scsi/bfa/bfa_ioc.c 	enum bfa_defs_sfp_media_e *media = sfp->media;
sfp              3917 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state == BFA_SFP_STATE_UNSUPPORT)
sfp              3919 drivers/scsi/bfa/bfa_ioc.c 	else if (sfp->state == BFA_SFP_STATE_VALID) {
sfp              3921 drivers/scsi/bfa/bfa_ioc.c 		struct sfp_mem_s *sfpmem = (struct sfp_mem_s *)sfp->dbuf_kva;
sfp              3926 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, e10g.b);
sfp              3927 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, xmtr_tech);
sfp              3951 drivers/scsi/bfa/bfa_ioc.c 			bfa_trc(sfp, 0);
sfp              3953 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, sfp->state);
sfp              3957 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_speed_valid(struct bfa_sfp_s *sfp, enum bfa_port_speed portspeed)
sfp              3959 drivers/scsi/bfa/bfa_ioc.c 	struct sfp_mem_s *sfpmem = (struct sfp_mem_s *)sfp->dbuf_kva;
sfp              3968 drivers/scsi/bfa/bfa_ioc.c 			bfa_trc(sfp, e10g.b);
sfp              3979 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, portspeed);
sfp              3980 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, fc3.b);
sfp              3981 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, e10g.b);
sfp              3992 drivers/scsi/bfa/bfa_ioc.c 	struct bfa_sfp_s *sfp = sfparg;
sfp              3996 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_show_comp(sfp, msg);
sfp              4000 drivers/scsi/bfa/bfa_ioc.c 		bfa_sfp_scn(sfp, msg);
sfp              4004 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, msg->mh.msg_id);
sfp              4022 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc, void *dev,
sfp              4025 drivers/scsi/bfa/bfa_ioc.c 	sfp->dev = dev;
sfp              4026 drivers/scsi/bfa/bfa_ioc.c 	sfp->ioc = ioc;
sfp              4027 drivers/scsi/bfa/bfa_ioc.c 	sfp->trcmod = trcmod;
sfp              4029 drivers/scsi/bfa/bfa_ioc.c 	sfp->cbfn = NULL;
sfp              4030 drivers/scsi/bfa/bfa_ioc.c 	sfp->cbarg = NULL;
sfp              4031 drivers/scsi/bfa/bfa_ioc.c 	sfp->sfpmem = NULL;
sfp              4032 drivers/scsi/bfa/bfa_ioc.c 	sfp->lock = 0;
sfp              4033 drivers/scsi/bfa/bfa_ioc.c 	sfp->data_valid = 0;
sfp              4034 drivers/scsi/bfa/bfa_ioc.c 	sfp->state = BFA_SFP_STATE_INIT;
sfp              4035 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_lock = 0;
sfp              4036 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_cbfn = NULL;
sfp              4037 drivers/scsi/bfa/bfa_ioc.c 	sfp->state_query_cbarg = NULL;
sfp              4038 drivers/scsi/bfa/bfa_ioc.c 	sfp->media = NULL;
sfp              4039 drivers/scsi/bfa/bfa_ioc.c 	sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
sfp              4040 drivers/scsi/bfa/bfa_ioc.c 	sfp->is_elb = BFA_FALSE;
sfp              4042 drivers/scsi/bfa/bfa_ioc.c 	bfa_ioc_mbox_regisr(sfp->ioc, BFI_MC_SFP, bfa_sfp_intr, sfp);
sfp              4043 drivers/scsi/bfa/bfa_ioc.c 	bfa_q_qe_init(&sfp->ioc_notify);
sfp              4044 drivers/scsi/bfa/bfa_ioc.c 	bfa_ioc_notify_init(&sfp->ioc_notify, bfa_sfp_notify, sfp);
sfp              4045 drivers/scsi/bfa/bfa_ioc.c 	list_add_tail(&sfp->ioc_notify.qe, &sfp->ioc->notify_q);
sfp              4052 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_memclaim(struct bfa_sfp_s *sfp, u8 *dm_kva, u64 dm_pa)
sfp              4054 drivers/scsi/bfa/bfa_ioc.c 	sfp->dbuf_kva   = dm_kva;
sfp              4055 drivers/scsi/bfa/bfa_ioc.c 	sfp->dbuf_pa    = dm_pa;
sfp              4056 drivers/scsi/bfa/bfa_ioc.c 	memset(sfp->dbuf_kva, 0, sizeof(struct sfp_mem_s));
sfp              4071 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_show(struct bfa_sfp_s *sfp, struct sfp_mem_s *sfpmem,
sfp              4075 drivers/scsi/bfa/bfa_ioc.c 	if (!bfa_ioc_is_operational(sfp->ioc)) {
sfp              4076 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, 0);
sfp              4080 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->lock) {
sfp              4081 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, 0);
sfp              4085 drivers/scsi/bfa/bfa_ioc.c 	sfp->cbfn = cbfn;
sfp              4086 drivers/scsi/bfa/bfa_ioc.c 	sfp->cbarg = cbarg;
sfp              4087 drivers/scsi/bfa/bfa_ioc.c 	sfp->sfpmem = sfpmem;
sfp              4089 drivers/scsi/bfa/bfa_ioc.c 	bfa_sfp_getdata(sfp, BFI_SFP_MEM_DIAGEXT);
sfp              4102 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_media(struct bfa_sfp_s *sfp, enum bfa_defs_sfp_media_e *media,
sfp              4105 drivers/scsi/bfa/bfa_ioc.c 	if (!bfa_ioc_is_operational(sfp->ioc)) {
sfp              4106 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, 0);
sfp              4110 drivers/scsi/bfa/bfa_ioc.c 	sfp->media = media;
sfp              4111 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state == BFA_SFP_STATE_INIT) {
sfp              4112 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state_query_lock) {
sfp              4113 drivers/scsi/bfa/bfa_ioc.c 			bfa_trc(sfp, 0);
sfp              4116 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbfn = cbfn;
sfp              4117 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbarg = cbarg;
sfp              4118 drivers/scsi/bfa/bfa_ioc.c 			bfa_sfp_state_query(sfp);
sfp              4123 drivers/scsi/bfa/bfa_ioc.c 	bfa_sfp_media_get(sfp);
sfp              4135 drivers/scsi/bfa/bfa_ioc.c bfa_sfp_speed(struct bfa_sfp_s *sfp, enum bfa_port_speed portspeed,
sfp              4140 drivers/scsi/bfa/bfa_ioc.c 	if (!bfa_ioc_is_operational(sfp->ioc))
sfp              4144 drivers/scsi/bfa/bfa_ioc.c 	if (bfa_mfg_is_mezz(sfp->ioc->attr->card_type))
sfp              4148 drivers/scsi/bfa/bfa_ioc.c 	sfp->portspeed = portspeed;
sfp              4149 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state == BFA_SFP_STATE_INIT) {
sfp              4150 drivers/scsi/bfa/bfa_ioc.c 		if (sfp->state_query_lock) {
sfp              4151 drivers/scsi/bfa/bfa_ioc.c 			bfa_trc(sfp, 0);
sfp              4154 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbfn = cbfn;
sfp              4155 drivers/scsi/bfa/bfa_ioc.c 			sfp->state_query_cbarg = cbarg;
sfp              4156 drivers/scsi/bfa/bfa_ioc.c 			bfa_sfp_state_query(sfp);
sfp              4161 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state == BFA_SFP_STATE_REMOVED ||
sfp              4162 drivers/scsi/bfa/bfa_ioc.c 	    sfp->state == BFA_SFP_STATE_FAILED) {
sfp              4163 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, sfp->state);
sfp              4167 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->state == BFA_SFP_STATE_INSERTED) {
sfp              4168 drivers/scsi/bfa/bfa_ioc.c 		bfa_trc(sfp, sfp->state);
sfp              4173 drivers/scsi/bfa/bfa_ioc.c 	if (sfp->is_elb)
sfp              4176 drivers/scsi/bfa/bfa_ioc.c 	return bfa_sfp_speed_valid(sfp, portspeed);
sfp               444 drivers/scsi/bfa/bfa_ioc.h #define BFA_SFP_MOD(__bfa)	(&(__bfa)->modules.sfp)
sfp               449 drivers/scsi/bfa/bfa_ioc.h void	bfa_sfp_attach(struct bfa_sfp_s *sfp, struct bfa_ioc_s *ioc,
sfp               455 drivers/scsi/bfa/bfa_ioc.h bfa_status_t	bfa_sfp_show(struct bfa_sfp_s *sfp, struct sfp_mem_s *sfpmem,
sfp               458 drivers/scsi/bfa/bfa_ioc.h bfa_status_t	bfa_sfp_media(struct bfa_sfp_s *sfp,
sfp               462 drivers/scsi/bfa/bfa_ioc.h bfa_status_t	bfa_sfp_speed(struct bfa_sfp_s *sfp,
sfp                36 drivers/scsi/bfa/bfa_modules.h 	struct bfa_sfp_s	sfp;		/*  SFP module	*/
sfp              1734 drivers/scsi/bfa/bfad_bsg.c 	iocmd->status = bfa_sfp_show(BFA_SFP_MOD(&bfad->bfa), &iocmd->sfp,
sfp               628 drivers/scsi/bfa/bfad_bsg.h 	struct sfp_mem_s sfp;
sfp              1534 drivers/scsi/qla2xxx/qla_bsg.c 	void *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
sfp              1536 drivers/scsi/qla2xxx/qla_bsg.c 	if (!sfp) {
sfp              1548 drivers/scsi/qla2xxx/qla_bsg.c 		memcpy(sfp, &image->field_info, sizeof(image->field_info));
sfp              1549 drivers/scsi/qla2xxx/qla_bsg.c 		rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
sfp              1563 drivers/scsi/qla2xxx/qla_bsg.c 	dma_pool_free(ha->s_dma_pool, sfp, sfp_dma);
sfp              1585 drivers/scsi/qla2xxx/qla_bsg.c 	uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
sfp              1587 drivers/scsi/qla2xxx/qla_bsg.c 	if (!sfp) {
sfp              1596 drivers/scsi/qla2xxx/qla_bsg.c 	rval = qla2x00_read_sfp(vha, sfp_dma, sfp,
sfp              1599 drivers/scsi/qla2xxx/qla_bsg.c 	sr->status_reg = *sfp;
sfp              1613 drivers/scsi/qla2xxx/qla_bsg.c 	dma_pool_free(ha->s_dma_pool, sfp, sfp_dma);
sfp              1636 drivers/scsi/qla2xxx/qla_bsg.c 	uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
sfp              1638 drivers/scsi/qla2xxx/qla_bsg.c 	if (!sfp) {
sfp              1647 drivers/scsi/qla2xxx/qla_bsg.c 	*sfp = sr->status_reg;
sfp              1648 drivers/scsi/qla2xxx/qla_bsg.c 	rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
sfp              1661 drivers/scsi/qla2xxx/qla_bsg.c 	dma_pool_free(ha->s_dma_pool, sfp, sfp_dma);
sfp              1683 drivers/scsi/qla2xxx/qla_bsg.c 	uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
sfp              1685 drivers/scsi/qla2xxx/qla_bsg.c 	if (!sfp) {
sfp              1694 drivers/scsi/qla2xxx/qla_bsg.c 	memcpy(sfp, i2c->buffer, i2c->length);
sfp              1695 drivers/scsi/qla2xxx/qla_bsg.c 	rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
sfp              1707 drivers/scsi/qla2xxx/qla_bsg.c 	dma_pool_free(ha->s_dma_pool, sfp, sfp_dma);
sfp              1729 drivers/scsi/qla2xxx/qla_bsg.c 	uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
sfp              1731 drivers/scsi/qla2xxx/qla_bsg.c 	if (!sfp) {
sfp              1740 drivers/scsi/qla2xxx/qla_bsg.c 	rval = qla2x00_read_sfp(vha, sfp_dma, sfp,
sfp              1749 drivers/scsi/qla2xxx/qla_bsg.c 	memcpy(i2c->buffer, sfp, i2c->length);
sfp              1756 drivers/scsi/qla2xxx/qla_bsg.c 	dma_pool_free(ha->s_dma_pool, sfp, sfp_dma);
sfp              4863 drivers/scsi/qla2xxx/qla_mbx.c qla2x00_read_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp,
sfp              4896 drivers/scsi/qla2xxx/qla_mbx.c 		*sfp = mcp->mb[1];
sfp              4914 drivers/scsi/qla2xxx/qla_mbx.c qla2x00_write_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp,
sfp              4932 drivers/scsi/qla2xxx/qla_mbx.c 		len = *sfp;
sfp               178 drivers/scsi/sg.c static int sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size);
sfp               179 drivers/scsi/sg.c static ssize_t sg_new_read(Sg_fd * sfp, char __user *buf, size_t count,
sfp               181 drivers/scsi/sg.c static ssize_t sg_new_write(Sg_fd *sfp, struct file *file,
sfp               184 drivers/scsi/sg.c static int sg_common_write(Sg_fd * sfp, Sg_request * srp,
sfp               187 drivers/scsi/sg.c static void sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp);
sfp               188 drivers/scsi/sg.c static void sg_build_reserve(Sg_fd * sfp, int req_size);
sfp               189 drivers/scsi/sg.c static void sg_link_reserve(Sg_fd * sfp, Sg_request * srp, int size);
sfp               190 drivers/scsi/sg.c static void sg_unlink_reserve(Sg_fd * sfp, Sg_request * srp);
sfp               193 drivers/scsi/sg.c static Sg_request *sg_get_rq_mark(Sg_fd * sfp, int pack_id);
sfp               194 drivers/scsi/sg.c static Sg_request *sg_add_request(Sg_fd * sfp);
sfp               195 drivers/scsi/sg.c static int sg_remove_request(Sg_fd * sfp, Sg_request * srp);
sfp               237 drivers/scsi/sg.c 	struct sg_fd *sfp = filp->private_data;
sfp               239 drivers/scsi/sg.c 	if (sfp->parentdp->device->type == TYPE_SCANNER)
sfp               289 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp               350 drivers/scsi/sg.c 	sfp = sg_add_sfp(sdp);
sfp               351 drivers/scsi/sg.c 	if (IS_ERR(sfp)) {
sfp               352 drivers/scsi/sg.c 		retval = PTR_ERR(sfp);
sfp               356 drivers/scsi/sg.c 	filp->private_data = sfp;
sfp               385 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp               387 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp               393 drivers/scsi/sg.c 	kref_put(&sfp->f_ref, sg_remove_sfp);
sfp               412 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp               427 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp               434 drivers/scsi/sg.c 	if (sfp->force_packid && (count >= SZ_SG_HEADER)) {
sfp               462 drivers/scsi/sg.c 	srp = sg_get_rq_mark(sfp, req_pack_id);
sfp               472 drivers/scsi/sg.c 		retval = wait_event_interruptible(sfp->read_wait,
sfp               474 drivers/scsi/sg.c 			(srp = sg_get_rq_mark(sfp, req_pack_id))));
sfp               485 drivers/scsi/sg.c 		retval = sg_new_read(sfp, buf, count, srp);
sfp               557 drivers/scsi/sg.c 	sg_remove_request(sfp, srp);
sfp               565 drivers/scsi/sg.c sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
sfp               598 drivers/scsi/sg.c 	sg_remove_request(sfp, srp);
sfp               609 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp               620 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp               638 drivers/scsi/sg.c 		return sg_new_write(sfp, filp, buf, count,
sfp               643 drivers/scsi/sg.c 	if (!(srp = sg_add_request(sfp))) {
sfp               650 drivers/scsi/sg.c 	mutex_lock(&sfp->f_mutex);
sfp               651 drivers/scsi/sg.c 	if (sfp->next_cmd_len > 0) {
sfp               652 drivers/scsi/sg.c 		cmd_size = sfp->next_cmd_len;
sfp               653 drivers/scsi/sg.c 		sfp->next_cmd_len = 0;	/* reset so only this write() effected */
sfp               659 drivers/scsi/sg.c 	mutex_unlock(&sfp->f_mutex);
sfp               668 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               693 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               711 drivers/scsi/sg.c 	k = sg_common_write(sfp, srp, cmnd, sfp->timeout, blocking);
sfp               716 drivers/scsi/sg.c sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,
sfp               732 drivers/scsi/sg.c 	sfp->cmd_q = 1;	/* when sg_io_hdr seen, set command queuing on */
sfp               733 drivers/scsi/sg.c 	if (!(srp = sg_add_request(sfp))) {
sfp               734 drivers/scsi/sg.c 		SCSI_LOG_TIMEOUT(1, sg_printk(KERN_INFO, sfp->parentdp,
sfp               741 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               745 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               749 drivers/scsi/sg.c 		if (hp->dxfer_len > sfp->reserve.bufflen) {
sfp               750 drivers/scsi/sg.c 			sg_remove_request(sfp, srp);
sfp               754 drivers/scsi/sg.c 			sg_remove_request(sfp, srp);
sfp               757 drivers/scsi/sg.c 		if (sfp->res_in_use) {
sfp               758 drivers/scsi/sg.c 			sg_remove_request(sfp, srp);
sfp               765 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               769 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               773 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               777 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               780 drivers/scsi/sg.c 	k = sg_common_write(sfp, srp, cmnd, timeout, blocking);
sfp               789 drivers/scsi/sg.c sg_common_write(Sg_fd * sfp, Sg_request * srp,
sfp               793 drivers/scsi/sg.c 	Sg_device *sdp = sfp->parentdp;
sfp               804 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp               809 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               815 drivers/scsi/sg.c 		SCSI_LOG_TIMEOUT(1, sg_printk(KERN_INFO, sfp->parentdp,
sfp               818 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               829 drivers/scsi/sg.c 		sg_remove_request(sfp, srp);
sfp               841 drivers/scsi/sg.c 	kref_get(&sfp->f_ref); /* sg_rq_end_io() does kref_put(). */
sfp               847 drivers/scsi/sg.c static int srp_done(Sg_fd *sfp, Sg_request *srp)
sfp               852 drivers/scsi/sg.c 	read_lock_irqsave(&sfp->rq_list_lock, flags);
sfp               854 drivers/scsi/sg.c 	read_unlock_irqrestore(&sfp->rq_list_lock, flags);
sfp               868 drivers/scsi/sg.c sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo)
sfp               875 drivers/scsi/sg.c 	list_for_each_entry(srp, &sfp->rq_list, entry) {
sfp               907 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp               911 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp               926 drivers/scsi/sg.c 		result = sg_new_write(sfp, filp, p, SZ_SG_IO_HDR,
sfp               930 drivers/scsi/sg.c 		result = wait_event_interruptible(sfp->read_wait,
sfp               931 drivers/scsi/sg.c 			(srp_done(sfp, srp) || atomic_read(&sdp->detaching)));
sfp               934 drivers/scsi/sg.c 		write_lock_irq(&sfp->rq_list_lock);
sfp               937 drivers/scsi/sg.c 			write_unlock_irq(&sfp->rq_list_lock);
sfp               938 drivers/scsi/sg.c 			result = sg_new_read(sfp, p, SZ_SG_IO_HDR, srp);
sfp               942 drivers/scsi/sg.c 		write_unlock_irq(&sfp->rq_list_lock);
sfp               953 drivers/scsi/sg.c 		sfp->timeout_user = val;
sfp               954 drivers/scsi/sg.c 		sfp->timeout = mult_frac(val, HZ, USER_HZ);
sfp               959 drivers/scsi/sg.c 		return sfp->timeout_user;
sfp               996 drivers/scsi/sg.c 		sfp->force_packid = val ? 1 : 0;
sfp              1001 drivers/scsi/sg.c 		read_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              1002 drivers/scsi/sg.c 		list_for_each_entry(srp, &sfp->rq_list, entry) {
sfp              1004 drivers/scsi/sg.c 				read_unlock_irqrestore(&sfp->rq_list_lock,
sfp              1010 drivers/scsi/sg.c 		read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              1014 drivers/scsi/sg.c 		read_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              1016 drivers/scsi/sg.c 		list_for_each_entry(srp, &sfp->rq_list, entry) {
sfp              1020 drivers/scsi/sg.c 		read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              1032 drivers/scsi/sg.c 		mutex_lock(&sfp->f_mutex);
sfp              1033 drivers/scsi/sg.c 		if (val != sfp->reserve.bufflen) {
sfp              1034 drivers/scsi/sg.c 			if (sfp->mmap_called ||
sfp              1035 drivers/scsi/sg.c 			    sfp->res_in_use) {
sfp              1036 drivers/scsi/sg.c 				mutex_unlock(&sfp->f_mutex);
sfp              1040 drivers/scsi/sg.c 			sg_remove_scat(sfp, &sfp->reserve);
sfp              1041 drivers/scsi/sg.c 			sg_build_reserve(sfp, val);
sfp              1043 drivers/scsi/sg.c 		mutex_unlock(&sfp->f_mutex);
sfp              1046 drivers/scsi/sg.c 		val = min_t(int, sfp->reserve.bufflen,
sfp              1053 drivers/scsi/sg.c 		sfp->cmd_q = val ? 1 : 0;
sfp              1056 drivers/scsi/sg.c 		return put_user((int) sfp->cmd_q, ip);
sfp              1061 drivers/scsi/sg.c 		sfp->keep_orphan = val;
sfp              1064 drivers/scsi/sg.c 		return put_user((int) sfp->keep_orphan, ip);
sfp              1071 drivers/scsi/sg.c 		sfp->next_cmd_len = (val > 0) ? val : 0;
sfp              1089 drivers/scsi/sg.c 			read_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              1090 drivers/scsi/sg.c 			sg_fill_request_table(sfp, rinfo);
sfp              1091 drivers/scsi/sg.c 			read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              1151 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1154 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp              1175 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1180 drivers/scsi/sg.c 	sfp = filp->private_data;
sfp              1181 drivers/scsi/sg.c 	if (!sfp)
sfp              1183 drivers/scsi/sg.c 	sdp = sfp->parentdp;
sfp              1186 drivers/scsi/sg.c 	poll_wait(filp, &sfp->read_wait, wait);
sfp              1187 drivers/scsi/sg.c 	read_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              1188 drivers/scsi/sg.c 	list_for_each_entry(srp, &sfp->rq_list, entry) {
sfp              1194 drivers/scsi/sg.c 	read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              1198 drivers/scsi/sg.c 	else if (!sfp->cmd_q) {
sfp              1212 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1214 drivers/scsi/sg.c 	if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
sfp              1219 drivers/scsi/sg.c 	return fasync_helper(fd, filp, mode, &sfp->async_qp);
sfp              1226 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1231 drivers/scsi/sg.c 	if ((NULL == vma) || (!(sfp = (Sg_fd *) vma->vm_private_data)))
sfp              1233 drivers/scsi/sg.c 	rsv_schp = &sfp->reserve;
sfp              1237 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1266 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1272 drivers/scsi/sg.c 	if ((!filp) || (!vma) || (!(sfp = (Sg_fd *) filp->private_data)))
sfp              1275 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1280 drivers/scsi/sg.c 	rsv_schp = &sfp->reserve;
sfp              1281 drivers/scsi/sg.c 	mutex_lock(&sfp->f_mutex);
sfp              1295 drivers/scsi/sg.c 	sfp->mmap_called = 1;
sfp              1297 drivers/scsi/sg.c 	vma->vm_private_data = sfp;
sfp              1300 drivers/scsi/sg.c 	mutex_unlock(&sfp->f_mutex);
sfp              1308 drivers/scsi/sg.c 	struct sg_fd *sfp = srp->parentfp;
sfp              1311 drivers/scsi/sg.c 	sg_remove_request(sfp, srp);
sfp              1312 drivers/scsi/sg.c 	kref_put(&sfp->f_ref, sg_remove_sfp);
sfp              1325 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1334 drivers/scsi/sg.c 	sfp = srp->parentfp;
sfp              1335 drivers/scsi/sg.c 	if (WARN_ON(sfp == NULL))
sfp              1338 drivers/scsi/sg.c 	sdp = sfp->parentdp;
sfp              1394 drivers/scsi/sg.c 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              1396 drivers/scsi/sg.c 		if (sfp->keep_orphan)
sfp              1402 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              1408 drivers/scsi/sg.c 		wake_up_interruptible(&sfp->read_wait);
sfp              1409 drivers/scsi/sg.c 		kill_fasync(&sfp->async_qp, SIGPOLL, POLL_IN);
sfp              1410 drivers/scsi/sg.c 		kref_put(&sfp->f_ref, sg_remove_sfp);
sfp              1605 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              1619 drivers/scsi/sg.c 	list_for_each_entry(sfp, &sdp->sfds, sfd_siblings) {
sfp              1620 drivers/scsi/sg.c 		wake_up_interruptible_all(&sfp->read_wait);
sfp              1621 drivers/scsi/sg.c 		kill_fasync(&sfp->async_qp, SIGPOLL, POLL_HUP);
sfp              1707 drivers/scsi/sg.c 	Sg_fd *sfp = srp->parentfp;
sfp              1713 drivers/scsi/sg.c 	Sg_scatter_hold *rsv_schp = &sfp->reserve;
sfp              1714 drivers/scsi/sg.c 	struct request_queue *q = sfp->parentdp->device->request_queue;
sfp              1719 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1762 drivers/scsi/sg.c 	    !sfp->parentdp->device->host->unchecked_isa_dma &&
sfp              1769 drivers/scsi/sg.c 		mutex_lock(&sfp->f_mutex);
sfp              1771 drivers/scsi/sg.c 		    !sfp->res_in_use) {
sfp              1772 drivers/scsi/sg.c 			sfp->res_in_use = 1;
sfp              1773 drivers/scsi/sg.c 			sg_link_reserve(sfp, srp, dxfer_len);
sfp              1778 drivers/scsi/sg.c 			mutex_unlock(&sfp->f_mutex);
sfp              1781 drivers/scsi/sg.c 			res = sg_build_indirect(req_schp, sfp, dxfer_len);
sfp              1783 drivers/scsi/sg.c 				mutex_unlock(&sfp->f_mutex);
sfp              1787 drivers/scsi/sg.c 		mutex_unlock(&sfp->f_mutex);
sfp              1836 drivers/scsi/sg.c 	Sg_fd *sfp = srp->parentfp;
sfp              1839 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1851 drivers/scsi/sg.c 		sg_unlink_reserve(sfp, srp);
sfp              1853 drivers/scsi/sg.c 		sg_remove_scat(sfp, req_schp);
sfp              1859 drivers/scsi/sg.c sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize)
sfp              1872 drivers/scsi/sg.c sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
sfp              1875 drivers/scsi/sg.c 	int sg_tablesize = sfp->parentdp->sg_tablesize;
sfp              1878 drivers/scsi/sg.c 	struct sg_device *sdp = sfp->parentdp;
sfp              1886 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1891 drivers/scsi/sg.c 	mx_sc_elems = sg_build_sgat(schp, sfp, sg_tablesize);
sfp              1928 drivers/scsi/sg.c 		SCSI_LOG_TIMEOUT(5, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1935 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(5, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1954 drivers/scsi/sg.c sg_remove_scat(Sg_fd * sfp, Sg_scatter_hold * schp)
sfp              1956 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              1964 drivers/scsi/sg.c 					sg_printk(KERN_INFO, sfp->parentdp,
sfp              2010 drivers/scsi/sg.c sg_build_reserve(Sg_fd * sfp, int req_size)
sfp              2012 drivers/scsi/sg.c 	Sg_scatter_hold *schp = &sfp->reserve;
sfp              2014 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              2019 drivers/scsi/sg.c 		if (0 == sg_build_indirect(schp, sfp, req_size))
sfp              2022 drivers/scsi/sg.c 			sg_remove_scat(sfp, schp);
sfp              2028 drivers/scsi/sg.c sg_link_reserve(Sg_fd * sfp, Sg_request * srp, int size)
sfp              2031 drivers/scsi/sg.c 	Sg_scatter_hold *rsv_schp = &sfp->reserve;
sfp              2035 drivers/scsi/sg.c 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
sfp              2054 drivers/scsi/sg.c 		SCSI_LOG_TIMEOUT(1, sg_printk(KERN_INFO, sfp->parentdp,
sfp              2059 drivers/scsi/sg.c sg_unlink_reserve(Sg_fd * sfp, Sg_request * srp)
sfp              2073 drivers/scsi/sg.c 	sfp->res_in_use = 0;
sfp              2077 drivers/scsi/sg.c sg_get_rq_mark(Sg_fd * sfp, int pack_id)
sfp              2082 drivers/scsi/sg.c 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              2083 drivers/scsi/sg.c 	list_for_each_entry(resp, &sfp->rq_list, entry) {
sfp              2088 drivers/scsi/sg.c 			write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2092 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2098 drivers/scsi/sg.c sg_add_request(Sg_fd * sfp)
sfp              2102 drivers/scsi/sg.c 	Sg_request *rp = sfp->req_arr;
sfp              2104 drivers/scsi/sg.c 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              2105 drivers/scsi/sg.c 	if (!list_empty(&sfp->rq_list)) {
sfp              2106 drivers/scsi/sg.c 		if (!sfp->cmd_q)
sfp              2117 drivers/scsi/sg.c 	rp->parentfp = sfp;
sfp              2119 drivers/scsi/sg.c 	list_add_tail(&rp->entry, &sfp->rq_list);
sfp              2120 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2123 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2129 drivers/scsi/sg.c sg_remove_request(Sg_fd * sfp, Sg_request * srp)
sfp              2134 drivers/scsi/sg.c 	if (!sfp || !srp || list_empty(&sfp->rq_list))
sfp              2136 drivers/scsi/sg.c 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              2142 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2149 drivers/scsi/sg.c 	Sg_fd *sfp;
sfp              2153 drivers/scsi/sg.c 	sfp = kzalloc(sizeof(*sfp), GFP_ATOMIC | __GFP_NOWARN);
sfp              2154 drivers/scsi/sg.c 	if (!sfp)
sfp              2157 drivers/scsi/sg.c 	init_waitqueue_head(&sfp->read_wait);
sfp              2158 drivers/scsi/sg.c 	rwlock_init(&sfp->rq_list_lock);
sfp              2159 drivers/scsi/sg.c 	INIT_LIST_HEAD(&sfp->rq_list);
sfp              2160 drivers/scsi/sg.c 	kref_init(&sfp->f_ref);
sfp              2161 drivers/scsi/sg.c 	mutex_init(&sfp->f_mutex);
sfp              2162 drivers/scsi/sg.c 	sfp->timeout = SG_DEFAULT_TIMEOUT;
sfp              2163 drivers/scsi/sg.c 	sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER;
sfp              2164 drivers/scsi/sg.c 	sfp->force_packid = SG_DEF_FORCE_PACK_ID;
sfp              2165 drivers/scsi/sg.c 	sfp->cmd_q = SG_DEF_COMMAND_Q;
sfp              2166 drivers/scsi/sg.c 	sfp->keep_orphan = SG_DEF_KEEP_ORPHAN;
sfp              2167 drivers/scsi/sg.c 	sfp->parentdp = sdp;
sfp              2171 drivers/scsi/sg.c 		kfree(sfp);
sfp              2174 drivers/scsi/sg.c 	list_add_tail(&sfp->sfd_siblings, &sdp->sfds);
sfp              2177 drivers/scsi/sg.c 				      "sg_add_sfp: sfp=0x%p\n", sfp));
sfp              2183 drivers/scsi/sg.c 	sg_build_reserve(sfp, bufflen);
sfp              2186 drivers/scsi/sg.c 				      sfp->reserve.bufflen,
sfp              2187 drivers/scsi/sg.c 				      sfp->reserve.k_use_sg));
sfp              2191 drivers/scsi/sg.c 	return sfp;
sfp              2197 drivers/scsi/sg.c 	struct sg_fd *sfp = container_of(work, struct sg_fd, ew.work);
sfp              2198 drivers/scsi/sg.c 	struct sg_device *sdp = sfp->parentdp;
sfp              2203 drivers/scsi/sg.c 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
sfp              2204 drivers/scsi/sg.c 	while (!list_empty(&sfp->rq_list)) {
sfp              2205 drivers/scsi/sg.c 		srp = list_first_entry(&sfp->rq_list, Sg_request, entry);
sfp              2210 drivers/scsi/sg.c 	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
sfp              2212 drivers/scsi/sg.c 	if (sfp->reserve.bufflen > 0) {
sfp              2215 drivers/scsi/sg.c 				(int) sfp->reserve.bufflen,
sfp              2216 drivers/scsi/sg.c 				(int) sfp->reserve.k_use_sg));
sfp              2217 drivers/scsi/sg.c 		sg_remove_scat(sfp, &sfp->reserve);
sfp              2221 drivers/scsi/sg.c 			"sg_remove_sfp: sfp=0x%p\n", sfp));
sfp              2222 drivers/scsi/sg.c 	kfree(sfp);
sfp              2232 drivers/scsi/sg.c 	struct sg_fd *sfp = container_of(kref, struct sg_fd, f_ref);
sfp              2233 drivers/scsi/sg.c 	struct sg_device *sdp = sfp->parentdp;
sfp              2237 drivers/scsi/sg.c 	list_del(&sfp->sfd_siblings);
sfp              2240 drivers/scsi/sg.c 	INIT_WORK(&sfp->ew.work, sg_remove_sfp_usercontext);
sfp              2241 drivers/scsi/sg.c 	schedule_work(&sfp->ew.work);
sfp               179 drivers/scsi/snic/snic_debugfs.c snic_stats_show(struct seq_file *sfp, void *data)
sfp               181 drivers/scsi/snic/snic_debugfs.c 	struct snic *snic = (struct snic *) sfp->private;
sfp               188 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               194 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               225 drivers/scsi/snic/snic_debugfs.c 	seq_puts(sfp, "\nSGL Counters\n");
sfp               228 drivers/scsi/snic/snic_debugfs.c 		seq_printf(sfp,
sfp               233 drivers/scsi/snic/snic_debugfs.c 			seq_puts(sfp, "\n");
sfp               237 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               242 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               257 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               262 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               271 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               276 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               290 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               298 drivers/scsi/snic/snic_debugfs.c 	seq_printf(sfp,
sfp               414 drivers/scsi/snic/snic_debugfs.c snic_trc_seq_start(struct seq_file *sfp, loff_t *pos)
sfp               420 drivers/scsi/snic/snic_debugfs.c snic_trc_seq_next(struct seq_file *sfp, void *data, loff_t *pos)
sfp               426 drivers/scsi/snic/snic_debugfs.c snic_trc_seq_stop(struct seq_file *sfp, void *data)
sfp               432 drivers/scsi/snic/snic_debugfs.c snic_trc_seq_show(struct seq_file *sfp, void *data)
sfp               437 drivers/scsi/snic/snic_debugfs.c 		seq_printf(sfp, "%s\n", buf);
sfp               111 fs/freevxfs/vxfs_fshead.c 	struct vxfs_fsh			*pfp, *sfp;
sfp               132 fs/freevxfs/vxfs_fshead.c 	sfp = vxfs_getfsh(infp->vsi_fship, 0);
sfp               133 fs/freevxfs/vxfs_fshead.c 	if (!sfp) {
sfp               139 fs/freevxfs/vxfs_fshead.c 	vxfs_dumpfsh(sfp);
sfp               153 fs/freevxfs/vxfs_fshead.c 			fs32_to_cpu(infp, sfp->fsh_ilistino[0]));
sfp               176 fs/freevxfs/vxfs_fshead.c 	kfree(sfp);
sfp               186 fs/freevxfs/vxfs_fshead.c  	kfree(sfp);
sfp               921 fs/xfs/libxfs/xfs_attr_leaf.c 	struct xfs_attr_shortform	*sfp;
sfp               931 fs/xfs/libxfs/xfs_attr_leaf.c 	sfp = (struct xfs_attr_shortform *)ifp->if_u1.if_data;
sfp               940 fs/xfs/libxfs/xfs_attr_leaf.c 	endp = (char *)sfp + size;
sfp               943 fs/xfs/libxfs/xfs_attr_leaf.c 	sfep = &sfp->list[0];
sfp               944 fs/xfs/libxfs/xfs_attr_leaf.c 	for (i = 0; i < sfp->hdr.count; i++) {
sfp               173 fs/xfs/libxfs/xfs_dir2.c 	xfs_dir2_sf_hdr_t	*sfp;
sfp               180 fs/xfs/libxfs/xfs_dir2.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               181 fs/xfs/libxfs/xfs_dir2.c 	return !sfp->count;
sfp              1063 fs/xfs/libxfs/xfs_dir2_block.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform header  */
sfp              1095 fs/xfs/libxfs/xfs_dir2_block.c 	sfp = kmem_alloc(ifp->if_bytes, 0);
sfp              1096 fs/xfs/libxfs/xfs_dir2_block.c 	memcpy(sfp, oldsfp, ifp->if_bytes);
sfp              1121 fs/xfs/libxfs/xfs_dir2_block.c 	    (sfp->count + 2) * (uint)sizeof(xfs_dir2_leaf_entry_t);
sfp              1137 fs/xfs/libxfs/xfs_dir2_block.c 	btp->count = cpu_to_be32(sfp->count + 2);	/* ., .. */
sfp              1167 fs/xfs/libxfs/xfs_dir2_block.c 	dep->inumber = cpu_to_be64(dp->d_ops->sf_get_parent_ino(sfp));
sfp              1182 fs/xfs/libxfs/xfs_dir2_block.c 	if (!sfp->count)
sfp              1185 fs/xfs/libxfs/xfs_dir2_block.c 		sfep = xfs_dir2_sf_firstentry(sfp);
sfp              1218 fs/xfs/libxfs/xfs_dir2_block.c 		dep->inumber = cpu_to_be64(dp->d_ops->sf_get_ino(sfp, sfep));
sfp              1232 fs/xfs/libxfs/xfs_dir2_block.c 		if (++i == sfp->count)
sfp              1235 fs/xfs/libxfs/xfs_dir2_block.c 			sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp              1238 fs/xfs/libxfs/xfs_dir2_block.c 	kmem_free(sfp);
sfp              1253 fs/xfs/libxfs/xfs_dir2_block.c 	kmem_free(sfp);
sfp               153 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform directory header */
sfp               173 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dst;
sfp               174 fs/xfs/libxfs/xfs_dir2_sf.c 	memcpy(sfp, sfhp, xfs_dir2_sf_hdr_size(sfhp->i8count));
sfp               181 fs/xfs/libxfs/xfs_dir2_sf.c 	sfep = xfs_dir2_sf_firstentry(sfp);
sfp               207 fs/xfs/libxfs/xfs_dir2_sf.c 			       dp->d_ops->sf_get_parent_ino(sfp));
sfp               217 fs/xfs/libxfs/xfs_dir2_sf.c 			dp->d_ops->sf_put_ino(sfp, sfep,
sfp               222 fs/xfs/libxfs/xfs_dir2_sf.c 			sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp               226 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT((char *)sfep - (char *)sfp == size);
sfp               272 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               289 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               290 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT(dp->i_d.di_size >= xfs_dir2_sf_hdr_size(sfp->i8count));
sfp               294 fs/xfs/libxfs/xfs_dir2_sf.c 	incr_isize = dp->d_ops->sf_entsize(sfp, args->namelen);
sfp               300 fs/xfs/libxfs/xfs_dir2_sf.c 	if (args->inumber > XFS_DIR2_MAX_SHORT_INUM && sfp->i8count == 0) {
sfp               304 fs/xfs/libxfs/xfs_dir2_sf.c 		incr_isize += (sfp->count + 2) * XFS_INO64_DIFF;
sfp               369 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               373 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               374 fs/xfs/libxfs/xfs_dir2_sf.c 	byteoff = (int)((char *)sfep - (char *)sfp);
sfp               378 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_idata_realloc(dp, dp->d_ops->sf_entsize(sfp, args->namelen),
sfp               383 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               384 fs/xfs/libxfs/xfs_dir2_sf.c 	sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + byteoff);
sfp               391 fs/xfs/libxfs/xfs_dir2_sf.c 	dp->d_ops->sf_put_ino(sfp, sfep, args->inumber);
sfp               397 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count++;
sfp               399 fs/xfs/libxfs/xfs_dir2_sf.c 		sfp->i8count++;
sfp               430 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* new shortform dir */
sfp               437 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               441 fs/xfs/libxfs/xfs_dir2_sf.c 	memcpy(oldsfp, sfp, old_isize);
sfp               469 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               474 fs/xfs/libxfs/xfs_dir2_sf.c 	memcpy(sfp, oldsfp, nbytes);
sfp               475 fs/xfs/libxfs/xfs_dir2_sf.c 	sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + nbytes);
sfp               482 fs/xfs/libxfs/xfs_dir2_sf.c 	dp->d_ops->sf_put_ino(sfp, sfep, args->inumber);
sfp               484 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count++;
sfp               486 fs/xfs/libxfs/xfs_dir2_sf.c 		sfp->i8count++;
sfp               491 fs/xfs/libxfs/xfs_dir2_sf.c 		sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp               518 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               524 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               527 fs/xfs/libxfs/xfs_dir2_sf.c 	sfep = xfs_dir2_sf_firstentry(sfp);
sfp               534 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0; i < sfp->count; i++) {
sfp               539 fs/xfs/libxfs/xfs_dir2_sf.c 		sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp               546 fs/xfs/libxfs/xfs_dir2_sf.c 	       (sfp->count + 3) * (uint)sizeof(xfs_dir2_leaf_entry_t) +
sfp               587 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               591 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               593 fs/xfs/libxfs/xfs_dir2_sf.c 	ino = dp->d_ops->sf_get_parent_ino(sfp);
sfp               596 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp);
sfp               597 fs/xfs/libxfs/xfs_dir2_sf.c 	     i < sfp->count;
sfp               598 fs/xfs/libxfs/xfs_dir2_sf.c 	     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) {
sfp               600 fs/xfs/libxfs/xfs_dir2_sf.c 		ino = dp->d_ops->sf_get_ino(sfp, sfep);
sfp               607 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT(i8count == sfp->i8count);
sfp               608 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT((char *)sfep - (char *)sfp == dp->i_d.di_size);
sfp               610 fs/xfs/libxfs/xfs_dir2_sf.c 	       (sfp->count + 2) * (uint)sizeof(xfs_dir2_leaf_entry_t) +
sfp               621 fs/xfs/libxfs/xfs_dir2_sf.c 	struct xfs_dir2_sf_hdr		*sfp;
sfp               643 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (struct xfs_dir2_sf_hdr *)ifp->if_u1.if_data;
sfp               650 fs/xfs/libxfs/xfs_dir2_sf.c 	    size < xfs_dir2_sf_hdr_size(sfp->i8count))
sfp               653 fs/xfs/libxfs/xfs_dir2_sf.c 	endp = (char *)sfp + size;
sfp               656 fs/xfs/libxfs/xfs_dir2_sf.c 	ino = dops->sf_get_parent_ino(sfp);
sfp               664 fs/xfs/libxfs/xfs_dir2_sf.c 	sfep = xfs_dir2_sf_firstentry(sfp);
sfp               665 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0; i < sfp->count; i++) {
sfp               683 fs/xfs/libxfs/xfs_dir2_sf.c 		next_sfep = dops->sf_nextentry(sfp, sfep);
sfp               692 fs/xfs/libxfs/xfs_dir2_sf.c 		ino = dops->sf_get_ino(sfp, sfep);
sfp               708 fs/xfs/libxfs/xfs_dir2_sf.c 	if (i8count != sfp->i8count)
sfp               714 fs/xfs/libxfs/xfs_dir2_sf.c 	if (offset + (sfp->count + 2) * (uint)sizeof(xfs_dir2_leaf_entry_t) +
sfp               731 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t *sfp;		/* shortform structure */
sfp               761 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               762 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->i8count = i8count;
sfp               766 fs/xfs/libxfs/xfs_dir2_sf.c 	dp->d_ops->sf_put_parent_ino(sfp, pino);
sfp               767 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count = 0;
sfp               786 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               805 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               806 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT(dp->i_d.di_size >= xfs_dir2_sf_hdr_size(sfp->i8count));
sfp               821 fs/xfs/libxfs/xfs_dir2_sf.c 		args->inumber = dp->d_ops->sf_get_parent_ino(sfp);
sfp               830 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count;
sfp               831 fs/xfs/libxfs/xfs_dir2_sf.c 	     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) {
sfp               841 fs/xfs/libxfs/xfs_dir2_sf.c 			args->inumber = dp->d_ops->sf_get_ino(sfp, sfep);
sfp               874 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               891 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               892 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT(oldsize >= xfs_dir2_sf_hdr_size(sfp->i8count));
sfp               897 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count;
sfp               898 fs/xfs/libxfs/xfs_dir2_sf.c 	     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) {
sfp               901 fs/xfs/libxfs/xfs_dir2_sf.c 			ASSERT(dp->d_ops->sf_get_ino(sfp, sfep) ==
sfp               909 fs/xfs/libxfs/xfs_dir2_sf.c 	if (i == sfp->count)
sfp               914 fs/xfs/libxfs/xfs_dir2_sf.c 	byteoff = (int)((char *)sfep - (char *)sfp);
sfp               915 fs/xfs/libxfs/xfs_dir2_sf.c 	entsize = dp->d_ops->sf_entsize(sfp, args->namelen);
sfp               921 fs/xfs/libxfs/xfs_dir2_sf.c 		memmove((char *)sfp + byteoff, (char *)sfp + byteoff + entsize,
sfp               926 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count--;
sfp               932 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               937 fs/xfs/libxfs/xfs_dir2_sf.c 		if (sfp->i8count == 1)
sfp               940 fs/xfs/libxfs/xfs_dir2_sf.c 			sfp->i8count--;
sfp               959 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp               975 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp               976 fs/xfs/libxfs/xfs_dir2_sf.c 	ASSERT(dp->i_d.di_size >= xfs_dir2_sf_hdr_size(sfp->i8count));
sfp               981 fs/xfs/libxfs/xfs_dir2_sf.c 	if (args->inumber > XFS_DIR2_MAX_SHORT_INUM && sfp->i8count == 0) {
sfp               985 fs/xfs/libxfs/xfs_dir2_sf.c 		newsize = dp->i_df.if_bytes + (sfp->count + 1) * XFS_INO64_DIFF;
sfp              1001 fs/xfs/libxfs/xfs_dir2_sf.c 		sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp              1011 fs/xfs/libxfs/xfs_dir2_sf.c 		ino = dp->d_ops->sf_get_parent_ino(sfp);
sfp              1013 fs/xfs/libxfs/xfs_dir2_sf.c 		dp->d_ops->sf_put_parent_ino(sfp, args->inumber);
sfp              1019 fs/xfs/libxfs/xfs_dir2_sf.c 		for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp); i < sfp->count;
sfp              1020 fs/xfs/libxfs/xfs_dir2_sf.c 		     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep)) {
sfp              1023 fs/xfs/libxfs/xfs_dir2_sf.c 				ino = dp->d_ops->sf_get_ino(sfp, sfep);
sfp              1025 fs/xfs/libxfs/xfs_dir2_sf.c 				dp->d_ops->sf_put_ino(sfp, sfep, args->inumber);
sfp              1033 fs/xfs/libxfs/xfs_dir2_sf.c 		if (i == sfp->count) {
sfp              1048 fs/xfs/libxfs/xfs_dir2_sf.c 		if (sfp->i8count == 1)
sfp              1051 fs/xfs/libxfs/xfs_dir2_sf.c 			sfp->i8count--;
sfp              1062 fs/xfs/libxfs/xfs_dir2_sf.c 		ASSERT(sfp->i8count != 0);
sfp              1064 fs/xfs/libxfs/xfs_dir2_sf.c 			sfp->i8count++;
sfp              1087 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* new sf directory */
sfp              1113 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp              1117 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count = oldsfp->count;
sfp              1118 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->i8count = 0;
sfp              1119 fs/xfs/libxfs/xfs_dir2_sf.c 	dp->d_ops->sf_put_parent_ino(sfp, dp->d_ops->sf_get_parent_ino(oldsfp));
sfp              1123 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp),
sfp              1125 fs/xfs/libxfs/xfs_dir2_sf.c 	     i < sfp->count;
sfp              1126 fs/xfs/libxfs/xfs_dir2_sf.c 	     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep),
sfp              1131 fs/xfs/libxfs/xfs_dir2_sf.c 		dp->d_ops->sf_put_ino(sfp, sfep,
sfp              1160 fs/xfs/libxfs/xfs_dir2_sf.c 	xfs_dir2_sf_hdr_t	*sfp;		/* new sf directory */
sfp              1186 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp              1190 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->count = oldsfp->count;
sfp              1191 fs/xfs/libxfs/xfs_dir2_sf.c 	sfp->i8count = 1;
sfp              1192 fs/xfs/libxfs/xfs_dir2_sf.c 	dp->d_ops->sf_put_parent_ino(sfp, dp->d_ops->sf_get_parent_ino(oldsfp));
sfp              1196 fs/xfs/libxfs/xfs_dir2_sf.c 	for (i = 0, sfep = xfs_dir2_sf_firstentry(sfp),
sfp              1198 fs/xfs/libxfs/xfs_dir2_sf.c 	     i < sfp->count;
sfp              1199 fs/xfs/libxfs/xfs_dir2_sf.c 	     i++, sfep = dp->d_ops->sf_nextentry(sfp, sfep),
sfp              1204 fs/xfs/libxfs/xfs_dir2_sf.c 		dp->d_ops->sf_put_ino(sfp, sfep,
sfp               207 fs/xfs/libxfs/xfs_symlink_remote.c 	char			*sfp;
sfp               214 fs/xfs/libxfs/xfs_symlink_remote.c 	sfp = (char *)ifp->if_u1.if_data;
sfp               216 fs/xfs/libxfs/xfs_symlink_remote.c 	endp = sfp + size;
sfp               230 fs/xfs/libxfs/xfs_symlink_remote.c 	if (memchr(sfp, 0, size - 1))
sfp                52 fs/xfs/xfs_dir2_readdir.c 	xfs_dir2_sf_hdr_t	*sfp;		/* shortform structure */
sfp                62 fs/xfs/xfs_dir2_readdir.c 	sfp = (xfs_dir2_sf_hdr_t *)dp->i_df.if_u1.if_data;
sfp                94 fs/xfs/xfs_dir2_readdir.c 		ino = dp->d_ops->sf_get_parent_ino(sfp);
sfp               103 fs/xfs/xfs_dir2_readdir.c 	sfep = xfs_dir2_sf_firstentry(sfp);
sfp               104 fs/xfs/xfs_dir2_readdir.c 	for (i = 0; i < sfp->count; i++) {
sfp               111 fs/xfs/xfs_dir2_readdir.c 			sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp               115 fs/xfs/xfs_dir2_readdir.c 		ino = dp->d_ops->sf_get_ino(sfp, sfep);
sfp               121 fs/xfs/xfs_dir2_readdir.c 		sfep = dp->d_ops->sf_nextentry(sfp, sfep);
sfp                25 net/hsr/hsr_debugfs.c static void print_mac_address(struct seq_file *sfp, unsigned char *mac)
sfp                27 net/hsr/hsr_debugfs.c 	seq_printf(sfp, "%02x:%02x:%02x:%02x:%02x:%02x:",
sfp                33 net/hsr/hsr_debugfs.c hsr_node_table_show(struct seq_file *sfp, void *data)
sfp                35 net/hsr/hsr_debugfs.c 	struct hsr_priv *priv = (struct hsr_priv *)sfp->private;
sfp                38 net/hsr/hsr_debugfs.c 	seq_puts(sfp, "Node Table entries\n");
sfp                39 net/hsr/hsr_debugfs.c 	seq_puts(sfp, "MAC-Address-A,   MAC-Address-B, time_in[A], ");
sfp                40 net/hsr/hsr_debugfs.c 	seq_puts(sfp, "time_in[B], Address-B port\n");
sfp                46 net/hsr/hsr_debugfs.c 		print_mac_address(sfp, &node->macaddress_A[0]);
sfp                47 net/hsr/hsr_debugfs.c 		seq_puts(sfp, " ");
sfp                48 net/hsr/hsr_debugfs.c 		print_mac_address(sfp, &node->macaddress_B[0]);
sfp                49 net/hsr/hsr_debugfs.c 		seq_printf(sfp, "0x%lx, ", node->time_in[HSR_PT_SLAVE_A]);
sfp                50 net/hsr/hsr_debugfs.c 		seq_printf(sfp, "0x%lx ", node->time_in[HSR_PT_SLAVE_B]);
sfp                51 net/hsr/hsr_debugfs.c 		seq_printf(sfp, "0x%x\n", node->addr_B_port);