Deleted Added
full compact
usb_msctest.h (185290) usb_msctest.h (185948)
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_msctest.h 185290 2008-11-25 08:04:40Z alfred $ */
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_msctest.h 185948 2008-12-11 23:13:02Z thompsa $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef _USB2_MSCTEST_H_
28#define _USB2_MSCTEST_H_
29
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#ifndef _USB2_MSCTEST_H_
28#define _USB2_MSCTEST_H_
29
30usb2_error_t usb2_test_autoinstall(struct usb2_device *udev, uint8_t iface_index, uint8_t do_eject);
31usb2_error_t usb2_test_huawei(struct usb2_device *udev, struct usb2_attach_arg *uaa);
30usb2_error_t usb2_test_autoinstall(struct usb2_device *udev,
31 uint8_t iface_index, uint8_t do_eject);
32usb2_error_t usb2_test_huawei(struct usb2_device *udev,
33 struct usb2_attach_arg *uaa);
32int usb2_lookup_huawei(struct usb2_attach_arg *uaa);
33
34/* Huawei specific defines */
35
36#define U3GINFO(flag,speed) ((flag)|((speed) * 256))
37#define U3G_GET_SPEED(uaa) (USB_GET_DRIVER_INFO(uaa) / 256)
38
39#define U3GFL_NONE 0x00
40#define U3GFL_HUAWEI_INIT 0x01 /* Requires init command (Huawei
41 * cards) */
42#define U3GFL_SCSI_EJECT 0x02 /* Requires SCSI eject command
43 * (Novatel) */
44#define U3GFL_SIERRA_INIT 0x04 /* Requires init command (Sierra
45 * cards) */
46
47#define U3GSP_GPRS 0
48#define U3GSP_EDGE 1
49#define U3GSP_CDMA 2
50#define U3GSP_UMTS 3
51#define U3GSP_HSDPA 4
52#define U3GSP_HSUPA 5
53#define U3GSP_HSPA 6
54#define U3GSP_MAX 7
55
56#endif /* _USB2_MSCTEST_H_ */
34int usb2_lookup_huawei(struct usb2_attach_arg *uaa);
35
36/* Huawei specific defines */
37
38#define U3GINFO(flag,speed) ((flag)|((speed) * 256))
39#define U3G_GET_SPEED(uaa) (USB_GET_DRIVER_INFO(uaa) / 256)
40
41#define U3GFL_NONE 0x00
42#define U3GFL_HUAWEI_INIT 0x01 /* Requires init command (Huawei
43 * cards) */
44#define U3GFL_SCSI_EJECT 0x02 /* Requires SCSI eject command
45 * (Novatel) */
46#define U3GFL_SIERRA_INIT 0x04 /* Requires init command (Sierra
47 * cards) */
48
49#define U3GSP_GPRS 0
50#define U3GSP_EDGE 1
51#define U3GSP_CDMA 2
52#define U3GSP_UMTS 3
53#define U3GSP_HSDPA 4
54#define U3GSP_HSUPA 5
55#define U3GSP_HSPA 6
56#define U3GSP_MAX 7
57
58#endif /* _USB2_MSCTEST_H_ */