if_cs.c (162321) | if_cs.c (179507) |
---|---|
1/*- 2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. 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 --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. 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 --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/cs/if_cs.c 162321 2006-09-15 15:16:12Z glebius $"); | 30__FBSDID("$FreeBSD: head/sys/dev/cs/if_cs.c 179507 2008-06-03 05:47:28Z imp $"); |
31 32/* 33 * 34 * Device driver for Crystal Semiconductor CS8920 based ethernet 35 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997 36 */ 37 38/* --- 409 unchanged lines hidden (view full) --- 448 break; 449 case 11: 450 irq = 1; 451 break; 452 case 12: 453 irq = 2; 454 break; 455 default: | 31 32/* 33 * 34 * Device driver for Crystal Semiconductor CS8920 based ethernet 35 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997 36 */ 37 38/* --- 409 unchanged lines hidden (view full) --- 448 break; 449 case 11: 450 irq = 1; 451 break; 452 case 12: 453 irq = 2; 454 break; 455 default: |
456 error=EINVAL; | 456 error = EINVAL; 457 break; |
457 } 458 } else { | 458 } 459 } else { |
459 if (irq > CS8920_NO_INTS) { | 460 if (irq > CS8920_NO_INTS && !(sc->flags & CS_NO_IRQ)) |
460 error = EINVAL; | 461 error = EINVAL; |
461 } | |
462 } 463 } 464 | 462 } 463 } 464 |
465 if (!error) { 466 if (!(sc->flags & CS_NO_IRQ)) 467 cs_writereg(sc, pp_isaint, irq); 468 } else { | 465 if (error) { |
469 device_printf(dev, "Unknown or invalid irq\n"); | 466 device_printf(dev, "Unknown or invalid irq\n"); |
470 return (ENXIO); | 467 return (error); |
471 } 472 | 468 } 469 |
470 if (!(sc->flags & CS_NO_IRQ)) 471 cs_writereg(sc, pp_isaint, irq); 472 |
|
473 /* 474 * Temporary disabled 475 * 476 if (drq>0) 477 cs_writereg(sc, pp_isadma, drq); 478 else { 479 device_printf(dev, "incorrect drq\n",); 480 return (0); --- 827 unchanged lines hidden --- | 473 /* 474 * Temporary disabled 475 * 476 if (drq>0) 477 cs_writereg(sc, pp_isadma, drq); 478 else { 479 device_printf(dev, "incorrect drq\n",); 480 return (0); --- 827 unchanged lines hidden --- |