Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Remove wrong semaphore access in wm_nvm_{read, wr...
details: https://anonhg.NetBSD.org/src/rev/7ff7b54db7c4
branches: trunk
changeset: 355194:7ff7b54db7c4
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jul 18 08:01:07 2017 +0000
description:
Remove wrong semaphore access in wm_nvm_{read,write}_{ich8,spt} to prevent
hungup. A semaphore is get/put in wm_nvm_{read,write}.
diffstat:
sys/dev/pci/if_wm.c | 20 ++------------------
1 files changed, 2 insertions(+), 18 deletions(-)
diffs (62 lines):
diff -r 1fbed7fce172 -r 7ff7b54db7c4 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Tue Jul 18 06:01:36 2017 +0000
+++ b/sys/dev/pci/if_wm.c Tue Jul 18 08:01:07 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.525 2017/07/14 04:34:29 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.525 2017/07/14 04:34:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.526 2017/07/18 08:01:07 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -11964,13 +11964,6 @@
*/
bank_offset = flash_bank * (sc->sc_ich8_flash_bank_size * 2);
- error = wm_get_swfwhw_semaphore(sc);
- if (error) {
- aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n",
- __func__);
- return error;
- }
-
for (i = 0; i < words; i++) {
/* The NVM part needs a byte offset, hence * 2 */
act_offset = bank_offset + ((offset + i) * 2);
@@ -11983,7 +11976,6 @@
data[i] = word;
}
- wm_put_swfwhw_semaphore(sc);
return error;
}
@@ -12028,13 +12020,6 @@
*/
bank_offset = flash_bank * (sc->sc_ich8_flash_bank_size * 2);
- error = wm_get_swfwhw_semaphore(sc);
- if (error) {
- aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n",
- __func__);
- return error;
- }
-
for (i = 0; i < words; i++) {
/* The NVM part needs a byte offset, hence * 2 */
act_offset = bank_offset + ((offset + i) * 2);
@@ -12052,7 +12037,6 @@
data[i] = (uint16_t)((dword >> 16) & 0xFFFF);
}
- wm_put_swfwhw_semaphore(sc);
return error;
}
Home |
Main Index |
Thread Index |
Old Index