Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312533
| From | "Sinclair Yeh" <syeh@vmware.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] Input: Remove vmmouse port reservation |
| Date | 2016-01-19 22:50 +0100 |
| Message-ID | <qSMk2-59V-7@gated-at.bofh.it> (permalink) |
| References | <qC7NT-MQ-9@gated-at.bofh.it> <qSMk2-59V-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This port is used by quite a few guest-to-host communication
capabilities, e.g. getting configuration, logging, etc. Currently
multiple kernel modules, and one or more priviledged guest user
mode app, e.g. open-vm-tools, use this port without reservation.
It was determined that no reservation is required when accessing
the port in this manner.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: pv-drivers@vmware.com
Cc: linux-graphics-maintainer@vmware.com
Cc: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/input/mouse/vmmouse.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
index d06daf6..85fb3d47 100644
--- a/drivers/input/mouse/vmmouse.c
+++ b/drivers/input/mouse/vmmouse.c
@@ -347,16 +347,10 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
return -ENXIO;
}
- if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
- psmouse_dbg(psmouse, "VMMouse port in use.\n");
- return -EBUSY;
- }
-
/* Check if the device is present */
response = ~VMMOUSE_PROTO_MAGIC;
VMMOUSE_CMD(GETVERSION, 0, version, response, dummy1, dummy2);
if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU) {
- release_region(VMMOUSE_PROTO_PORT, 4);
return -ENXIO;
}
@@ -366,8 +360,6 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
psmouse->model = version;
}
- release_region(VMMOUSE_PROTO_PORT, 4);
-
return 0;
}
@@ -386,7 +378,6 @@ static void vmmouse_disconnect(struct psmouse *psmouse)
psmouse_reset(psmouse);
input_unregister_device(priv->abs_dev);
kfree(priv);
- release_region(VMMOUSE_PROTO_PORT, 4);
}
/**
@@ -430,15 +421,10 @@ int vmmouse_init(struct psmouse *psmouse)
struct input_dev *rel_dev = psmouse->dev, *abs_dev;
int error;
- if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
- psmouse_dbg(psmouse, "VMMouse port in use.\n");
- return -EBUSY;
- }
-
psmouse_reset(psmouse);
error = vmmouse_enable(psmouse);
if (error)
- goto release_region;
+ return error;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
abs_dev = input_allocate_device();
@@ -493,8 +479,5 @@ init_fail:
kfree(priv);
psmouse->private = NULL;
-release_region:
- release_region(VMMOUSE_PROTO_PORT, 4);
-
return error;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] Create common VMWare host port communication macros v3 "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100 [PATCH 4/6] Input: Remove vmmouse port reservation "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100 [PATCH 1/6] x86: Add VMWare Host Communication Macros "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100 [PATCH 5/6] x86: Remove address from the vmware.c header "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100 [PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100 [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro "Sinclair Yeh" <syeh@vmware.com> - 2016-01-19 22:50 +0100
csiph-web