Deleted Added
sdiff udiff text old ( 106894 ) new ( 107301 )
full compact
1/*
2 * Copyright (c) 2000,2001 Jonathan Chen.
3 * 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

--- 11 unchanged lines hidden (view full) ---

20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/cardbus/cardbus_cis.c 106894 2002-11-14 05:10:16Z imp $
29 */
30
31/*
32 * CIS Handling for the Cardbus Bus
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>

--- 169 unchanged lines hidden (view full) ---

206 return (EINVAL);
207 }
208 return (0);
209}
210
211DECODE_PROTOTYPE(vers_1)
212{
213 int i;
214 printf("Product version: %d.%d\n", tupledata[0], tupledata[1]);
215 printf("Product name: ");
216 for (i = 2; i < len; i++) {
217 if (tupledata[i] == '\0')
218 printf(" | ");
219 else if (tupledata[i] == 0xff)
220 break;
221 else
222 printf("%c", tupledata[i]);
223 }
224 printf("\n");
225 return (0);
226}
227
228DECODE_PROTOTYPE(funcid)
229{
230 int i;
231 int numnames = sizeof(funcnames) / sizeof(funcnames[0]);
232
233 printf("Functions: ");
234 for (i = 0; i < len; i++) {
235 if (tupledata[i] < numnames)
236 printf("%s", funcnames[tupledata[i]]);
237 else
238 printf("Unknown(%d)", tupledata[i]);
239 if (i < len-1)
240 printf(", ");
241 }
242 printf("\n");
243 return (0);
244}
245
246DECODE_PROTOTYPE(manfid)
247{
248 int i;
249 printf("Manufacturer ID: ");
250 for (i = 0; i < len; i++)
251 printf("%02x", tupledata[i]);
252 printf("\n");
253 return (0);
254}
255
256DECODE_PROTOTYPE(funce)
257{
258 int i;
259 printf("Function Extension: ");
260 for (i = 0; i < len; i++)
261 printf("%02x", tupledata[i]);
262 printf("\n");
263 return (0);
264}
265
266DECODE_PROTOTYPE(bar)
267{
268 struct cardbus_devinfo *dinfo = device_get_ivars(child);
269 int type;
270 int reg;

--- 779 unchanged lines hidden ---