#define PCI_VENDOR_ID_YAGL 0x19B1
#define PCI_DEVICE_ID_YAGL 0x1010
+static uint32_t protocol_version = 0;
+
static struct pci_device_id yagl_pci_table[] =
{
{
yfile->render_type = yagl_marshal_get_uint32_t(&buff);
yfile->gl_version = yagl_marshal_get_uint32_t(&buff);
+ protocol_version = yagl_marshal_get_uint32_t(&buff);
kunmap(yfile->pages[0]);
mutex_unlock(&device->mutex);
- print_info("%d opened\n", yfile->index);
+ print_info("(protocol %u) %d opened\n", protocol_version, yfile->index);
return nonseekable_open(inode, file);
switch (cmd) {
case YAGL_IOC_GET_VERSION:
- value.uint = YAGL_VERSION;
+ value.uint = protocol_version;
ret = put_user(value.uint, (unsigned int __user*)arg);
break;
case YAGL_IOC_GET_USER_INFO: