usb_msctest.h revision 185290
1169689Skan/* $FreeBSD: head/sys/dev/usb2/core/usb2_msctest.h 185290 2008-11-25 08:04:40Z alfred $ */
2169689Skan/*-
3169689Skan * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4169689Skan *
5169689Skan * Redistribution and use in source and binary forms, with or without
6169689Skan * modification, are permitted provided that the following conditions
7169689Skan * are met:
8169689Skan * 1. Redistributions of source code must retain the above copyright
9169689Skan *    notice, this list of conditions and the following disclaimer.
10169689Skan * 2. Redistributions in binary form must reproduce the above copyright
11169689Skan *    notice, this list of conditions and the following disclaimer in the
12169689Skan *    documentation and/or other materials provided with the distribution.
13169689Skan *
14169689Skan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15169689Skan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16169689Skan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17169689Skan * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18169689Skan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19169689Skan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20169689Skan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21169689Skan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22169689Skan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23169689Skan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24169689Skan * SUCH DAMAGE.
25169689Skan */
26169689Skan
27169689Skan#ifndef _USB2_MSCTEST_H_
28169689Skan#define	_USB2_MSCTEST_H_
29169689Skan
30169689Skanusb2_error_t usb2_test_autoinstall(struct usb2_device *udev, uint8_t iface_index, uint8_t do_eject);
31169689Skanusb2_error_t usb2_test_huawei(struct usb2_device *udev, struct usb2_attach_arg *uaa);
32169689Skanint	usb2_lookup_huawei(struct usb2_attach_arg *uaa);
33169689Skan
34169689Skan/* Huawei specific defines */
35169689Skan
36169689Skan#define	U3GINFO(flag,speed) ((flag)|((speed) * 256))
37169689Skan#define	U3G_GET_SPEED(uaa) (USB_GET_DRIVER_INFO(uaa) / 256)
38169689Skan
39169689Skan#define	U3GFL_NONE		0x00
40169689Skan#define	U3GFL_HUAWEI_INIT	0x01	/* Requires init command (Huawei
41169689Skan					 * cards) */
42169689Skan#define	U3GFL_SCSI_EJECT	0x02	/* Requires SCSI eject command
43169689Skan					 * (Novatel) */
44169689Skan#define	U3GFL_SIERRA_INIT	0x04	/* Requires init command (Sierra
45169689Skan					 * cards) */
46169689Skan
47169689Skan#define	U3GSP_GPRS		0
48169689Skan#define	U3GSP_EDGE		1
49169689Skan#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_ */
57