Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci clear register 0x41 as FreeBSD and OpenBSD do. U...



details:   https://anonhg.NetBSD.org/src/rev/3d046984b905
branches:  trunk
changeset: 761513:3d046984b905
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 31 00:01:07 2011 +0000

description:
clear register 0x41 as FreeBSD and OpenBSD do. Update copyright to the latest.

diffstat:

 sys/dev/pci/if_iwi.c |  43 ++++++++++++++++++++-----------------------
 1 files changed, 20 insertions(+), 23 deletions(-)

diffs (65 lines):

diff -r 0a13781e68bf -r 3d046984b905 sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c      Sun Jan 30 23:43:08 2011 +0000
+++ b/sys/dev/pci/if_iwi.c      Mon Jan 31 00:01:07 2011 +0000
@@ -1,34 +1,25 @@
-/*     $NetBSD: if_iwi.c,v 1.85 2010/11/15 05:57:24 uebayasi Exp $  */
+/*     $NetBSD: if_iwi.c,v 1.86 2011/01/31 00:01:07 christos Exp $  */
+/*     $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $     */
 
 /*-
- * Copyright (c) 2004, 2005
+ * Copyright (c) 2004-2008
  *      Damien Bergamini <damien.bergamini%free.fr@localhost>. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice unmodified, this list of conditions, and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.85 2010/11/15 05:57:24 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.86 2011/01/31 00:01:07 christos Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -239,6 +230,12 @@
                return;
        }
 
+       /* clear device specific PCI configuration register 0x41 */
+       data = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40);
+       data &= ~0x0000ff00;
+       pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, data);
+
+
        /* enable bus-mastering */
        data = pci_conf_read(sc->sc_pct, sc->sc_pcitag, PCI_COMMAND_STATUS_REG);
        data |= PCI_COMMAND_MASTER_ENABLE;



Home | Main Index | Thread Index | Old Index