Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174413609
D60089.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60089.diff
View Options
diff --git a/sys/dev/virtio/console/virtio_console.c b/sys/dev/virtio/console/virtio_console.c
--- a/sys/dev/virtio/console/virtio_console.c
+++ b/sys/dev/virtio/console/virtio_console.c
@@ -137,7 +137,9 @@
KASSERT((_id) >= 0 && (_id) < (_sc)->vtcon_max_ports, \
("%s: port ID %d out of range", __func__, _id))
-#define VTCON_FEATURES VIRTIO_CONSOLE_F_MULTIPORT
+#define VTCON_FEATURES \
+ (VIRTIO_CONSOLE_F_SIZE | \
+ VIRTIO_CONSOLE_F_MULTIPORT)
static struct virtio_feature_desc vtcon_feature_desc[] = {
{ VIRTIO_CONSOLE_F_SIZE, "ConsoleSize" },
@@ -467,14 +469,19 @@
vtcon_read_config(struct vtcon_softc *sc, struct virtio_console_config *concfg)
{
device_t dev;
+ int gen;
dev = sc->vtcon_dev;
- bzero(concfg, sizeof(struct virtio_console_config));
+ do {
+ gen = virtio_config_generation(dev);
+ bzero(concfg, sizeof(struct virtio_console_config));
- VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_SIZE, cols, concfg);
- VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_SIZE, rows, concfg);
- VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_MULTIPORT, max_nr_ports, concfg);
+ VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_SIZE, cols, concfg);
+ VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_SIZE, rows, concfg);
+ VTCON_GET_CONFIG(dev, VIRTIO_CONSOLE_F_MULTIPORT, max_nr_ports,
+ concfg);
+ } while (gen != virtio_config_generation(dev));
}
#undef VTCON_GET_CONFIG
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 12:43 AM (9 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39872250
Default Alt Text
D60089.diff (1 KB)
Attached To
Mode
D60089: virtio_console: Negotiate VIRTIO_CONSOLE_F_SIZE
Attached
Detach File
Event Timeline
Log In to Comment