xref: /illumos-gate/usr/src/uts/common/io/usb/clients/usbser/usbser_keyspan/keyspan_49fw.c (revision 77e515715b61e28fcf0c3f30936492888cecfd8b)
1c138f478Syz147069 /*
2c138f478Syz147069  * CDDL HEADER START
3c138f478Syz147069  *
4c138f478Syz147069  * The contents of this file are subject to the terms of the
5*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Common Development and Distribution License (the "License").
6*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * You may not use this file except in compliance with the License.
7c138f478Syz147069  *
8c138f478Syz147069  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c138f478Syz147069  * or http://www.opensolaris.org/os/licensing.
10c138f478Syz147069  * See the License for the specific language governing permissions
11c138f478Syz147069  * and limitations under the License.
12c138f478Syz147069  *
13c138f478Syz147069  * When distributing Covered Code, include this CDDL HEADER in each
14c138f478Syz147069  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c138f478Syz147069  * If applicable, add the following below this CDDL HEADER, with the
16c138f478Syz147069  * fields enclosed by brackets "[]" replaced with your own identifying
17c138f478Syz147069  * information: Portions Copyright [yyyy] [name of copyright owner]
18c138f478Syz147069  *
19c138f478Syz147069  * CDDL HEADER END
20c138f478Syz147069  */
21c138f478Syz147069 
22c138f478Syz147069 /*
23*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24c138f478Syz147069  * Use is subject to license terms.
25c138f478Syz147069  */
26c138f478Syz147069 
27c138f478Syz147069 
28c138f478Syz147069 #include <sys/types.h>
29c138f478Syz147069 #include <sys/modctl.h>
30c138f478Syz147069 #include <sys/ddi.h>
31c138f478Syz147069 #include <sys/sunddi.h>
32c138f478Syz147069 
33c138f478Syz147069 #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_var.h>
34c138f478Syz147069 
35c138f478Syz147069 #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_49fw.h>
36c138f478Syz147069 
37c138f478Syz147069 /* Get the address of firmware structure */
38c138f478Syz147069 const usbser_keyspan_fw_record_t *
keyspan_usa49wlc_fw(void)39c138f478Syz147069 keyspan_usa49wlc_fw(void)
40c138f478Syz147069 {
41c138f478Syz147069 #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
42c138f478Syz147069 
43c138f478Syz147069 	return (NULL);
44c138f478Syz147069 #else
45c138f478Syz147069 
46c138f478Syz147069 	return (keyspan_usa49wlc_firmware);
47c138f478Syz147069 #endif
48c138f478Syz147069 }
49c138f478Syz147069 
50c138f478Syz147069 extern struct mod_ops mod_miscops;
51c138f478Syz147069 
52c138f478Syz147069 static struct modlmisc modlmisc = {
53c138f478Syz147069 #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
54c138f478Syz147069 	&mod_miscops, "Placeholder module for the firmware of Keyspan"
55*77e51571Sgongtian zhao - Sun Microsystems - Beijing China 	    " usb2serial adapter (usa49wlc)"
56c138f478Syz147069 #else
57*77e51571Sgongtian zhao - Sun Microsystems - Beijing China 	&mod_miscops, "Firmware for Keyspan usb2serial adapter (usa49wlc)"
58c138f478Syz147069 #endif
59c138f478Syz147069 };
60c138f478Syz147069 
61c138f478Syz147069 static struct modlinkage modlinkage = {
62c138f478Syz147069 	MODREV_1, (void *)&modlmisc, NULL
63c138f478Syz147069 };
64c138f478Syz147069 
65c138f478Syz147069 int
_init(void)66c138f478Syz147069 _init(void)
67c138f478Syz147069 {
68c138f478Syz147069 	return (mod_install(&modlinkage));
69c138f478Syz147069 }
70c138f478Syz147069 
71c138f478Syz147069 
72c138f478Syz147069 int
_fini(void)73c138f478Syz147069 _fini(void)
74c138f478Syz147069 {
75c138f478Syz147069 	return (mod_remove(&modlinkage));
76c138f478Syz147069 }
77c138f478Syz147069 
78c138f478Syz147069 
79c138f478Syz147069 int
_info(struct modinfo * modinfop)80c138f478Syz147069 _info(struct modinfo *modinfop)
81c138f478Syz147069 {
82c138f478Syz147069 	return (mod_info(&modlinkage, modinfop));
83c138f478Syz147069 }
84