Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1752734022, "reponame":"whirlygig-driver", "desc":"Linux driver files for Whirlygig HWRNG", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/whirlygig-driver", "f":3, "items": [ {"schema":"libjg2-1", "cid":"d47b9d1c39fd462f6d9b725e7e130624", "commit": {"type":"commit", "time": 1282555347, "time_ofs": 60, "oid_tree": { "oid": "b45878fd43ddee2c2028a097ad3433a0efd0debc", "alias": []}, "oid":{ "oid": "a6bcb10b1bf2beedd547124e1f9724bd5cc60deb", "alias": []}, "msg": "remove-generated-files.patch", "sig_commit": { "git_time": { "time": 1282555347, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1282555347, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "remove-generated-files.patch\n\nSigned-off-by: Andy Green \u003candy@warmcat.com\u003e\n" , "diff": "diff --git a/Module.symvers b/Module.symvers\ndeleted file mode 100644\nindex e69de29..0000000\n--- a/Module.symvers\n+++ /dev/null\ndiff --git a/whirlygig-rng.c~ b/whirlygig-rng.c~\ndeleted file mode 100644\nindex 9d5e72a..0000000\n--- a/whirlygig-rng.c~\n+++ /dev/null\n@@ -1,477 +0,0 @@\n-/*\n- * RNG driver for Whirlygig GPL USB RNG\n- * see http://warmcat.com/whirlygig\n- * (c) Copyright 2007 Andy Green \u003candy@warmcat.com\u003e\n- *\n- * derived from\n- *\n- * RNG driver for Intel RNGs\n- *\n- * Copyright 2005 (c) MontaVista Software, Inc.\n- *\n- * with the majority of the code coming from:\n- *\n- * Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG)\n- * (c) Copyright 2003 Red Hat Inc \u003cjgarzik@redhat.com\u003e\n- *\n- * derived from\n- *\n- * Hardware driver for the AMD 768 Random Number Generator (RNG)\n- * (c) Copyright 2001 Red Hat Inc \u003calan@redhat.com\u003e\n- *\n- * derived from\n- *\n- * Hardware driver for Intel i810 Random Number Generator (RNG)\n- * Copyright 2000,2001 Jeff Garzik \u003cjgarzik@pobox.com\u003e\n- * Copyright 2000,2001 Philipp Rumpf \u003cprumpf@mandrakesoft.com\u003e\n- *\n- * This file is licensed under the terms of the GNU General Public\n- * License version 2. This program is licensed \u0022as is\u0022 without any\n- * warranty of any kind, whether express or implied.\n- */\n-\n-#include \u003clinux/module.h\u003e\n-#include \u003clinux/kernel.h\u003e\n-#include \u003clinux/pci.h\u003e\n-#include \u003clinux/hw_random.h\u003e\n-#include \u003casm/io.h\u003e\n-#include \u003clinux/usb.h\u003e\n-#include \u003clinux/list.h\u003e\n-#include \u003clinux/smp_lock.h\u003e\n-\n-\n-#define PFX\tKBUILD_MODNAME \u0022: \u0022\n-\n-/* Version Information */\n-#define DRIVER_VERSION \u0022v1.1\u0022\n-#define DRIVER_AUTHOR \u0022Andy Green, andy@warmcat.com\u0022\n-#define DRIVER_DESC \u0022Whirlygig RNG driver\u0022\n-#define WG_TIMEOUT 1000\n-#define RANDOM_CACHE_SIZE_PWR_2 17\n-#define RANDOM_CACHE_BYTES (1 \u003c\u003c RANDOM_CACHE_SIZE_PWR_2)\n-#define RANDOM_PACKET_LEN_PWR_2 9\n-#define RANDOM_PACKET_LEN (1 \u003c\u003c RANDOM_PACKET_LEN_PWR_2)\n-\n-#define WHIRLYGIG_VENDOR_ID\t0x16C0\t/* VID */\n-#define WHIRLYGIG_PRODUCT_ID\t0x09E2\t/* Whirlygig */\n-\n-static struct usb_device_id id_table [] \u003d {\n-\t{ USB_DEVICE(WHIRLYGIG_VENDOR_ID, WHIRLYGIG_PRODUCT_ID) },\n-\t{ },\n-};\n-MODULE_DEVICE_TABLE(usb, id_table);\n-\n-/* number of URBs each instance has on the go at once */\n-#define COUNT_URBS 4\n-\n-/* just one of these no matter how many USB devices attach */\n-struct whirlygig {\n-\t/* list of struct wg_instance per USB device attached */\n-\tstruct list_head\tlist_wg;\n-\tint\t\t\tcount_instances;\n-\tint\t\t\tcount_urbs_in_flight;\n-\t /* protects list */\n-\tspinlock_t\t\tlocklist;\n-\t/*\n-\t * we cache random in a single random_byte_cache[], all attached devices\n-\t * contribute to the same cache\n-\t */\n-\tu8 \t\t\trandom_byte_cache[RANDOM_CACHE_BYTES];\n-\tint \t\t\tnTail;\n-\tint \t\t\tnHead;\n-\tspinlock_t\t\tlockcache; /* protects cache head and tail */\n-\tstruct semaphore\tsem_empty;\n-};\n-\n-/* one of these instances created per USB device attached */\n-struct wg_instance {\n-\tstruct list_head\tlist_wg;\n-\tstruct whirlygig\t*pwg; /* struct whirlygig parent */\n-\tstruct usb_device \t*udev;\n-\tstruct urb \t\t*urb[COUNT_URBS];\n-\tu8 \t\t\t*pu8UrbData[COUNT_URBS];\n-\tu8\t\t\tflagBackgroundRestart[COUNT_URBS];\n-};\n-\n-\n-/*\n- * A single byte-orientated ring buffer cache accepts random packets from all\n- * attached devices.\n- *\n- * When the ringbuffer falls below 75% full, all devices have all URBs\n- * submitted requesting more random packets.\n- *\n- * While there is \u003e RANDOM_PACKET_LEN bytes left free in the ringbuffer,\n- * URBs are set to re-submit themselves in the completion routine. When the\n- * ringbuffer is full enough that only RANDOM_PACKET_LEN bytes or less is free,\n- * the auto re-submit action is defeated and there is no traffic from the\n- * whirlygig hardware.\n- *\n- * The ringbuffer is filled when the first device is attached, and then\n- * any further traffic is driven by the /dev/hw_random device being emptied.\n- */\n-\n-static void\n-urb_callback(struct urb *urb)\n-{\n-\tstruct wg_instance *pwgi \u003d (struct wg_instance *)urb-\u003econtext;\n-\tstruct whirlygig *pwg \u003d pwgi-\u003epwg;\n-\tint nBudget;\n-\tint nRx \u003d urb-\u003eactual_length;\n-\tint n;\n-\tint nUrb \u003d -1;\n-\tunsigned long flags;\n-\n-\t/* IRQ context, safe */\n-\tpwg-\u003ecount_urbs_in_flight--;\n-\n-\t/* which URB index is this? */\n-\tfor (n \u003d 0; n \u003c COUNT_URBS; n++)\n-\t\tif (urb \u003d\u003d pwgi-\u003eurb[n])\n-\t\t\tnUrb \u003d n;\n-\tif (nUrb \u003c 0) {\n-\t\terr(\u0022unknown URB seen, urb pwgi\u003d %p\u0022, urb-\u003econtext);\n-\t\treturn;\n-\t}\n-\n-\tif (urb-\u003estatus \u0026\u0026 !(urb-\u003estatus \u003d\u003d -ENOENT ||\n-\t urb-\u003estatus \u003d\u003d -ECONNRESET || urb-\u003estatus \u003d\u003d -ESHUTDOWN)) {\n-\t\tdev_err(\u0026pwgi-\u003eudev-\u003edev,\n-\t\t\t\u0022urb\u003d%p write bulk status received: %d\u005cn\u0022,\n-\t\t\tpwgi-\u003eurb[nUrb], pwgi-\u003eurb[nUrb]-\u003estatus);\n-\t\treturn;\n-\t}\n-\t/*\n-\t * spinlock needed only because multiple URBs may complete on\n-\t * different CPUs simultaneously messing up the nHead and the budget\n-\t */\n-\tspin_lock_irqsave(\u0026pwg-\u003elockcache, flags);\n-\tnBudget \u003d sizeof(pwg-\u003erandom_byte_cache) - ((pwg-\u003enTail - pwg-\u003enHead) \u0026\n-\t\t (sizeof(pwg-\u003erandom_byte_cache) - 1)) - 1;\n-\tn \u003d 0;\n-//\tif (nBudget \u003c nRx)\n-//\t\tgoto done;\n-\twhile ((nBudget--) \u0026\u0026 (nRx--)) {\n-\t\tpwg-\u003erandom_byte_cache[pwg-\u003enHead] \u003d\n-\t\t\t\t\t\t pwgi-\u003epu8UrbData[nUrb][n++];\n-\t\tpwg-\u003enHead \u003d (pwg-\u003enHead + 1) \u0026\n-\t\t\t (sizeof(pwg-\u003erandom_byte_cache) - 1);\n-\t}\n-//done:\n-\tspin_unlock_irqrestore(\u0026pwg-\u003elockcache, flags);\n-\t/*\n-\t * if anything was waiting or would wait due to empty cache,\n-\t * allow it to resume\n-\t */\n-\tif (atomic_read(\u0026pwg-\u003esem_empty.count) \u003c\u003d 0)\n-\t\tup(\u0026pwg-\u003esem_empty);\n-\t/*\n-\t * kick this URB off again immediately while we didn't yet sumbit enough\n-\t * URBs for double the space remaining\n-\t */\n-\tif (nBudget \u003e (pwg-\u003ecount_urbs_in_flight * RANDOM_PACKET_LEN / 4)) {\n-\t\t/* tell the foreground code we are auto-restarting the URB */\n-\t\tpwgi-\u003eflagBackgroundRestart[nUrb] \u003d 1;\n-\t\tusb_fill_bulk_urb(pwgi-\u003eurb[nUrb], pwgi-\u003eudev,\n-\t\t\t\t usb_rcvbulkpipe(pwgi-\u003eudev, 3),\n-\t\t\t\t pwgi-\u003epu8UrbData[nUrb], RANDOM_PACKET_LEN,\n-\t\t\t\t urb_callback, pwgi);\n-\t\tpwgi-\u003eurb[nUrb]-\u003etransfer_flags |\u003d URB_NO_TRANSFER_DMA_MAP;\n-\t\tn \u003d usb_submit_urb(urb, GFP_ATOMIC);\n-\t\tif (n)\n-\t\t\terr(\u0022urb restart failed, %s-%s/whirlygig, status %d\u0022,\n-\t\t\t pwgi-\u003eudev-\u003ebus-\u003ebus_name, pwgi-\u003eudev-\u003edevpath, n);\n-\t\telse\n-\t\t\tpwg-\u003ecount_urbs_in_flight++; /* IRQ context, safe */\n-\t} else /* tell the foreground code it can restart the URB */\n-\t\tpwgi-\u003eflagBackgroundRestart[nUrb] \u003d 0;\n-}\n-\n-static void\n-WhirlygigRequestAllPackets(struct whirlygig *pwg)\n-{\n-\tstruct wg_instance *pwgi;\n-\tunsigned long flags;\n-\tint retval;\n-\n-\tspin_lock_irqsave(\u0026pwg-\u003elocklist, flags);\n-\tlist_for_each_entry(pwgi, \u0026pwg-\u003elist_wg, list_wg) {\n-\t\tint nUrb;\n-\t\tfor (nUrb \u003d 0; nUrb \u003c COUNT_URBS; nUrb++) {\n-\t\t\t/*\n-\t\t\t * only start URBs that are idle right now\n-\t\t\t * no race -- only cleared when no URBs being\n-\t\t\t * submitted for this instance\n-\t\t\t */\n-\t\t\tif (pwgi-\u003eflagBackgroundRestart[nUrb])\n-\t\t\t\tcontinue;\n-\t\t\t/* set the flag here so we do it only once */\n-\t\t\tpwgi-\u003eflagBackgroundRestart[nUrb] \u003d 1;\n-\t\t\t/* prepare the URB and submit it */\n-\t\t\tusb_fill_bulk_urb(pwgi-\u003eurb[nUrb], pwgi-\u003eudev,\n-\t\t\t\t\t usb_rcvbulkpipe(pwgi-\u003eudev, 3),\n-\t\t\t\t\t pwgi-\u003epu8UrbData[nUrb],\n-\t\t\t\t\t RANDOM_PACKET_LEN,\n-\t\t\t\t\t urb_callback, pwgi);\n-\t\t\tpwgi-\u003eurb[nUrb]-\u003etransfer_flags |\u003d\n-\t\t\t\t\t\t\tURB_NO_TRANSFER_DMA_MAP;\n-\t\t\tretval \u003d usb_submit_urb(pwgi-\u003eurb[nUrb], GFP_KERNEL);\n-\t\t\tif (retval) {\n-\t\t\t\tprintk(KERN_INFO PFX \u0022URB submit error %d \u005cn\u0022,\n-\t\t\t\t retval);\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t\tpwg-\u003ecount_urbs_in_flight++; /* IRQs disabled, safe */\n-\t\t}\n-\t}\n-\tspin_unlock_irqrestore(\u0026pwg-\u003elocklist, flags);\n-}\n-\n-static int\n-whirlygig_rng_data_present(struct hwrng *rng)\n-{\n-\tstruct whirlygig *pwg \u003d (struct whirlygig *)rng-\u003epriv;\n-\tint rlen;\n-\n-\tif (!pwg)\n-\t\treturn 0;\n-\t/*\n-\t * no need to spinlock the ringbuffer here, any nHead seen that is\n-\t * different to nTail means we return positive\n-\t */\n-\trlen \u003d (pwg-\u003enTail - pwg-\u003enHead) \u0026 (sizeof(pwg-\u003erandom_byte_cache) - 1);\n-\t/*\n-\t * if our cache is more than 1/4 empty request a fill from all\n-\t * instances that are not already auto-filling\n-\t * (and so get them to resume auto-filling)\n-\t */\n-\tif ((rlen + (pwg-\u003ecount_urbs_in_flight \u003c\u003c RANDOM_PACKET_LEN_PWR_2)) \u003c\n-\t (sizeof(pwg-\u003erandom_byte_cache) \u003e\u003e 1))\n-\t\tWhirlygigRequestAllPackets(pwg);\n-\t/*\n-\t * if the caller took it so fast he exhausted us completely, we might\n-\t * as well sleep until new stuff has arrived\n-\t */\n-\tif (pwg-\u003enTail \u003d\u003d pwg-\u003enHead)\n-\t\tif (down_interruptible(\u0026pwg-\u003esem_empty)) /* on error */\n-\t\t\treturn 0;\n-\n-\treturn pwg-\u003enTail - pwg-\u003enHead;\n-}\n-\n-static int\n-whirlygig_rng_data_read(struct hwrng *rng, u32 *data)\n-{\n-\tint retval \u003d 0;\n-\tstruct whirlygig *pwg \u003d (struct whirlygig *)rng-\u003epriv;\n-\tu8 * pu8 \u003d (u8 *)data;\n-\n-\tif (!pwg)\n-\t\treturn 0;\n-\n-\twhile ((retval \u003c 4) \u0026\u0026 (pwg-\u003enTail !\u003d pwg-\u003enHead)) {\n-\t\tpu8[retval++] \u003d pwg-\u003erandom_byte_cache[pwg-\u003enTail++];\n-\t\tpwg-\u003enTail \u0026\u003d sizeof(pwg-\u003erandom_byte_cache) - 1;\n-\t}\n-\t/* was that the last one? clear the semaphore so we block next time */\n-\tif (pwg-\u003enTail \u003d\u003d pwg-\u003enHead)\n-\t\t/* blocked for next data_present, until URB completion */\n-\t\tsema_init(\u0026pwg-\u003esem_empty, 0);\n-\n-\treturn retval;\n-}\n-\n-\n-static struct hwrng whirlygig_rng \u003d {\n-\t.name\t\t\u003d \u0022whirlygig\u0022,\n-\t.data_present\t\u003d whirlygig_rng_data_present,\n-\t.data_read\t\u003d whirlygig_rng_data_read,\n-};\n-\n-\n-static int\n-whirlygig_probe(struct usb_interface *interface,\n-\t\tconst struct usb_device_id *id)\n-{\n-\tstruct usb_device *udev \u003d interface_to_usbdev(interface);\n-\tstruct wg_instance *pwgi;\n-\tint retval \u003d -ENOMEM;\n-\tint rlen;\n-\tint nUrb;\n-\tu8 u8a[RANDOM_PACKET_LEN];\n-\tstruct whirlygig *pwg \u003d (struct whirlygig *)whirlygig_rng.priv;\n-\tunsigned long flags;\n-\n-\t/* create the instance */\n-\tpwgi \u003d kzalloc(sizeof(struct wg_instance), GFP_KERNEL);\n-\tif (pwgi \u003d\u003d NULL) {\n-\t\tdev_err(\u0026interface-\u003edev, \u0022Out of memory\u005cn\u0022);\n-\t\tgoto bail1;\n-\t}\n-\n-\tpwgi-\u003epwg \u003d pwg; /* set parent */\n-\tpwgi-\u003eudev \u003d usb_get_dev(udev);\n-\tusb_set_intfdata(interface, pwgi); /* associate instance with pwgi */\n-\n-\t/* query firmware version */\n-\tu8a[0] \u003d '\u005c0'; /* fetch the firmware string */\n-\tretval \u003d usb_bulk_msg(udev, usb_rcvbulkpipe(udev, 1),\n-\t\t\t u8a, RANDOM_PACKET_LEN, \u0026rlen, WG_TIMEOUT);\n-\tif (retval) {\n-\t\tdev_err(\u0026pwgi-\u003eudev-\u003edev, \u0022usb RX 2 ret %d %d %02X %02X\u005cn\u0022,\n-\t\t retval, rlen, u8a[0], u8a[1]);\n-\t\tgoto bail2;\n-\t}\n-\n-\tu8a[sizeof(u8a) - 1] \u003d '\u005c0'; /* just in case */\n-\tprintk(KERN_INFO PFX \u0022Device firmware '%s'\u005cn\u0022, (const char *)u8a);\n-\n-\t/* set up URBs for bulk random */\n-\tfor (nUrb \u003d 0; nUrb \u003c COUNT_URBS; nUrb++) {\n-\t\tpwgi-\u003eurb[nUrb] \u003d usb_alloc_urb(0, GFP_KERNEL);\n-\t\tif (!pwgi-\u003eurb[nUrb]) {\n-\t\t\tdev_err(\u0026pwgi-\u003eudev-\u003edev, \u0022could not alloc urb\u005cn\u0022);\n-\t\t\tgoto bail2;\n-\t\t}\n-\t\tpwgi-\u003epu8UrbData[nUrb] \u003d usb_buffer_alloc(pwgi-\u003eudev,\n-\t\t\t\t\t\t\t RANDOM_PACKET_LEN,\n-\t\t\t\t\t\t\t GFP_KERNEL,\n-\t\t\t\t\t\t\u0026pwgi-\u003eurb[nUrb]-\u003etransfer_dma);\n-\t\tif (!pwgi-\u003epu8UrbData[nUrb]) {\n-\t\t\tdev_err(\u0026pwgi-\u003eudev-\u003edev, \u0022could not alloc urb\u005cn\u0022);\n-\t\t\tgoto bail3;\n-\t\t}\n-\t\t/* the URB is filled before being submitted */\n-\t\t/* the URB is not being autotriggered in the completion func */\n-\t\tpwgi-\u003eflagBackgroundRestart[nUrb] \u003d 0;\n-\t}\n-\t/* add this probed device to the list of attached devices */\n-\tspin_lock_irqsave(\u0026pwg-\u003elocklist, flags);\n-\tlist_add(\u0026pwgi-\u003elist_wg, \u0026pwg-\u003elist_wg);\n-\tpwg-\u003ecount_instances++;\n-\tspin_unlock_irqrestore(\u0026pwg-\u003elocklist, flags);\n-\n-\t/* If we just added the first instance, fill up the cache */\n-\tif (pwg-\u003ecount_instances \u003d\u003d 1)\n-\t\tWhirlygigRequestAllPackets(pwg);\n-\n-\t/* log it as attached okay */\n-\tprintk(KERN_INFO PFX \u0022new Whirlygig initialized, \u0022\n-\t \u0022%d device(s) present\u005cn\u0022, pwg-\u003ecount_instances);\n-\treturn 0;\n-\n-bail3:\n-\tfor (nUrb \u003d 0; nUrb \u003c COUNT_URBS; nUrb++)\n-\t\tif (pwgi-\u003eurb[nUrb]) {\n-\t\t\tusb_kill_urb(pwgi-\u003eurb[nUrb]);\n-\t\t\tusb_free_urb(pwgi-\u003eurb[nUrb]);\n-\t\t}\n-bail2:\n-\tusb_put_dev(udev);\n-\tusb_set_intfdata(interface, NULL);\n-bail1:\n-\tkfree(pwgi);\n-\twhirlygig_rng.priv \u003d 0;\n-\treturn retval;\n-}\n-\n-static void\n-whirlygig_disconnect(struct usb_interface *interface)\n-{\n-\tstruct wg_instance *pwgi \u003d usb_get_intfdata(interface);\n-\tint nUrb;\n-\tstruct whirlygig *pwg;\n-\n-\tif (!pwgi)\n-\t\treturn;\n-\tpwg \u003d (struct whirlygig *)whirlygig_rng.priv;\n-\tif (!pwg)\n-\t\tgoto done;\n-\n-\tspin_lock(\u0026pwg-\u003elocklist);\n-\tfor (nUrb \u003d 0; nUrb \u003c COUNT_URBS; nUrb++) {\n-\t\tusb_kill_urb(pwgi-\u003eurb[nUrb]);\n-\t\tusb_buffer_free(pwgi-\u003eudev, RANDOM_PACKET_LEN,\n-\t\t\t\tpwgi-\u003epu8UrbData[nUrb],\n-\t\t\t\tpwgi-\u003eurb[nUrb]-\u003etransfer_dma);\n-\t\tusb_free_urb(pwgi-\u003eurb[nUrb]);\n-\t}\n-\tlist_del(\u0026pwgi-\u003elist_wg);\n-\tusb_set_intfdata(interface, NULL);\n-\tusb_put_dev(pwgi-\u003eudev);\n-\tkfree(pwgi);\n-\tpwg-\u003ecount_instances--;\n-\tspin_unlock(\u0026pwg-\u003elocklist);\n-\n-done:\n-\tprintk(KERN_INFO PFX \u0022whirlygig removed, %d device(s) present\u005cn\u0022,\n-\t pwg-\u003ecount_instances);\n-}\n-\n-\n-/* USB subsystem object */\n-static struct usb_driver whirlygig_driver \u003d {\n-\t.name \u003d\t\t\u0022whirlygig_rng\u0022,\n-\t.probe \u003d\twhirlygig_probe,\n-\t.disconnect \u003d\twhirlygig_disconnect,\n-\t.id_table \u003d\tid_table,\n-};\n-\n-\n-static int __init\n-mod_init(void)\n-{\n-\tint err \u003d -ENOMEM;\n-\tstruct whirlygig *pwg;\n-\n-\t/* create the instance */\n-\tpwg \u003d kzalloc(sizeof(struct whirlygig), GFP_KERNEL);\n-\tif (pwg \u003d\u003d NULL) {\n-\t\tprintk(KERN_ERR PFX \u0022Out of memory\u005cn\u0022);\n-\t\tgoto bail;\n-\t}\n-\twhirlygig_rng.priv \u003d (long)pwg;\n-\t/* initially block data_present() due to empty cache */\n-\tsema_init(\u0026pwg-\u003esem_empty, 0);\n-\n-\tprintk(KERN_INFO PFX DRIVER_VERSION \u0022:\u0022 DRIVER_DESC \u0022\u005cn\u0022);\n-\n-\tspin_lock_init(\u0026pwg-\u003elocklist);\n-\tspin_lock_init(\u0026pwg-\u003elockcache);\n-\tINIT_LIST_HEAD(\u0026pwg-\u003elist_wg);\n-\n-\terr \u003d usb_register(\u0026whirlygig_driver);\n-\tif (err) {\n-\t\terr(\u0022usb_register failed. Error number %d\u0022, err);\n-\t\tgoto bail1;\n-\t}\n-\n-\terr \u003d hwrng_register(\u0026whirlygig_rng);\n-\tif (err) {\n-\t\terr(\u0022RNG registering failed (%d)\u005cn\u0022, err);\n-\t\tgoto bail2;\n-\t}\n-\treturn 0;\n-bail2:\n-\tusb_deregister(\u0026whirlygig_driver);\n-bail1:\n-\tkfree(pwg);\n-bail:\n-\treturn err;\n-}\n-\n-static void __exit\n-mod_exit(void)\n-{\n-\thwrng_unregister(\u0026whirlygig_rng);\n-\tusb_deregister(\u0026whirlygig_driver);\n-\tif (whirlygig_rng.priv)\n-\t\tkfree((void *)whirlygig_rng.priv);\n-\twhirlygig_rng.priv \u003d 0;\n-}\n-\n-module_init(mod_init);\n-module_exit(mod_exit);\n-\n-MODULE_DESCRIPTION(\u0022H/W RNG driver for Whirlygig\u0022);\n-MODULE_LICENSE(\u0022GPL\u0022);\ndiff --git a/whirlygig-rng.ko b/whirlygig-rng.ko\ndeleted file mode 100644\nindex f3f74a6..0000000\nBinary files a/whirlygig-rng.ko and /dev/null differ\ndiff --git a/whirlygig-rng.mod.c b/whirlygig-rng.mod.c\ndeleted file mode 100644\nindex 18f5cb3..0000000\n--- a/whirlygig-rng.mod.c\n+++ /dev/null\n@@ -1,22 +0,0 @@\n-#include \u003clinux/module.h\u003e\n-#include \u003clinux/vermagic.h\u003e\n-#include \u003clinux/compiler.h\u003e\n-\n-MODULE_INFO(vermagic, VERMAGIC_STRING);\n-\n-struct module __this_module\n-__attribute__((section(\u0022.gnu.linkonce.this_module\u0022))) \u003d {\n- .name \u003d KBUILD_MODNAME,\n- .init \u003d init_module,\n-#ifdef CONFIG_MODULE_UNLOAD\n- .exit \u003d cleanup_module,\n-#endif\n- .arch \u003d MODULE_ARCH_INIT,\n-};\n-\n-static const char __module_depends[]\n-__attribute_used__\n-__attribute__((section(\u0022.modinfo\u0022))) \u003d\n-\u0022depends\u003d\u0022;\n-\n-MODULE_ALIAS(\u0022usb:v16C0p09E2d*dc*dsc*dp*ic*isc*ip*\u0022);\ndiff --git a/whirlygig-rng.mod.o b/whirlygig-rng.mod.o\ndeleted file mode 100644\nindex 5b1d414..0000000\nBinary files a/whirlygig-rng.mod.o and /dev/null differ\ndiff --git a/whirlygig-rng.o b/whirlygig-rng.o\ndeleted file mode 100644\nindex b0fe225..0000000\nBinary files a/whirlygig-rng.o and /dev/null differ\n","s":{"c":1752734022,"u": 7371}} ],"g": 9929,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}