hrev52107 adds 4 changesets to branch 'master'
old head: 0988f80fed032d45efed92734f9487daa55d4e09
new head: 4a88aa503ad4155a20931e263d24343043994ea9
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=4a88aa503ad4+%5E0988f80fed03
----------------------------------------------------------------------------
8959d55643de: freebsd11_wlan: Sync previous ifdetach patch with FreeBSD.
It was upstreamed, albeit in a slightly different location and with
a different comment than I originally had.
dffc3e235360: freebsd11_wlan: Drain ageq before cleaning it up.
The comment above ieee80211_ageq_cleanup specifically notes that the queue
is assumed to be empty, and in order to make it so, ieee80211_ageq_drain
must be used.
Possibly helps with #3180, as this might be a source of mbuf leakage.
c2dbeb9d3139: Revert the cargo-culted changes to sata_request.
This reverts commit ffd36865cf3e66a57f5b1c5e938d53bdbd1c9933.
They didn't fix anything, and on some systems it's reported that they
cause boot failures.
Fixes #14272.
4a88aa503ad4: atheroswifi: Turn some apparently-harmless spam into debug-prints.
Both korli and KapiX report seeing this, but the driver works for them.
Fixes #14273.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
5 files changed, 31 insertions(+), 32 deletions(-)
.../kernel/busses/scsi/ahci/sata_request.cpp | 16 +++++----------
.../kernel/busses/scsi/ahci/sata_request.h | 3 +--
.../wlan/atheroswifi/dev/ath/if_ath_rx_edma.c | 8 ++++----
.../compat/freebsd11_wlan/net80211/ieee80211.c | 15 ++++++++------
.../freebsd11_wlan/net80211/ieee80211_node.c | 21 +++++++++++---------
############################################################################
Commit: 8959d55643de7a1447ede8f35c53c5efcda9ac24
URL: https://git.haiku-os.org/haiku/commit/?id=8959d55643de
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jul 16 23:43:55 2018 UTC
freebsd11_wlan: Sync previous ifdetach patch with FreeBSD.
It was upstreamed, albeit in a slightly different location and with
a different comment than I originally had.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
b/src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
index b4f38a77fb..88b9c5c646 100644
--- a/src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
+++ b/src/libs/compat/freebsd11_wlan/net80211/ieee80211.c
@@ -362,16 +362,19 @@ ieee80211_ifdetach(struct ieee80211com *ic)
{
struct ieee80211vap *vap;
+ /*
+ * We use this as an indicator that ifattach never had a chance to be
+ * called, e.g. early driver attach failed and ifdetach was called
+ * during subsequent detach. Never fear, for we have nothing to do
+ * here.
+ */
+ if (ic->ic_tq == NULL)
+ return;
+
mtx_lock(&ic_list_mtx);
LIST_REMOVE(ic, ic_next);
mtx_unlock(&ic_list_mtx);
-#ifdef __HAIKU__
- /* Have we even initialized this com? */
- if (!ic->ic_tq)
- return;
-#endif
-
taskqueue_drain(taskqueue_thread, &ic->ic_restart_task);
/*
############################################################################
Commit: dffc3e235360cd7b71261239ee8507b7d62a1471
URL: https://git.haiku-os.org/haiku/commit/?id=dffc3e235360
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Mon Jul 16 23:57:28 2018 UTC
Ticket: https://dev.haiku-os.org/ticket/3180
freebsd11_wlan: Drain ageq before cleaning it up.
The comment above ieee80211_ageq_cleanup specifically notes that the queue
is assumed to be empty, and in order to make it so, ieee80211_ageq_drain
must be used.
Possibly helps with #3180, as this might be a source of mbuf leakage.
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
b/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
index f3f918de7d..379f508463 100644
--- a/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
+++ b/src/libs/compat/freebsd11_wlan/net80211/ieee80211_node.c
@@ -30,13 +30,13 @@ __FBSDID("$FreeBSD:
releng/11.1/sys/net80211/ieee80211_node.c 302018 2016-06-19
#include "opt_wlan.h"
#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
+#include <sys/systm.h>
+#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/socket.h>
-
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_media.h>
@@ -134,6 +134,9 @@ ieee80211_node_detach(struct ieee80211com *ic)
callout_drain(&ic->ic_inact);
ieee80211_node_table_cleanup(&ic->ic_sta);
+#ifdef __HAIKU__
+ ieee80211_ageq_drain(&ic->ic_stageq);
+#endif
ieee80211_ageq_cleanup(&ic->ic_stageq);
}
@@ -199,7 +202,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap)
}
}
-/*
+/*
* Port authorize/unauthorize interfaces for use by an authenticator.
*/
@@ -370,7 +373,7 @@ ieee80211_create_ibss(struct ieee80211vap* vap, struct
ieee80211_channel *chan)
memcpy(ni->ni_meshid, vap->iv_mesh->ms_id, ni->ni_meshidlen);
#endif
}
- /*
+ /*
* Fix the channel and related attributes.
*/
/* clear DFS CAC state on previous channel */
@@ -550,7 +553,7 @@ check_bss_debug(struct ieee80211vap *vap, struct
ieee80211_node *ni)
printf("%s\n", fail & 0x10 ? "!" : "");
}
#endif /* IEEE80211_DEBUG */
-
+
int
ieee80211_ibss_merge_check(struct ieee80211_node *ni)
@@ -755,7 +758,7 @@ ieee80211_sta_join1(struct ieee80211_node *selbs)
* Set the erp state (mostly the slot time) to deal with
* the auto-select case; this should be redundant if the
* mode is locked.
- */
+ */
ieee80211_reset_erp(ic);
ieee80211_wme_initparams(vap);
@@ -1461,7 +1464,7 @@ ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
/*
* In adhoc demo mode there are no management
* frames to use to discover neighbor capabilities,
- * so blindly propagate the local configuration
+ * so blindly propagate the local configuration
* so we can do interesting things (e.g. use
* WME to disable ACK's).
*/
@@ -2043,7 +2046,7 @@ timeout_stations(void *arg __unused, struct
ieee80211_node *ni)
/* XXX before inact decrement? */
if (ni == vap->iv_bss)
return;
- if (ni->ni_associd != 0 ||
+ if (ni->ni_associd != 0 ||
(vap->iv_opmode == IEEE80211_M_IBSS ||
vap->iv_opmode == IEEE80211_M_AHDEMO)) {
/*
############################################################################
Commit: c2dbeb9d3139900a801aafbd5cb407a925a44dc5
URL: https://git.haiku-os.org/haiku/commit/?id=c2dbeb9d3139
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jul 17 00:11:59 2018 UTC
Ticket: https://dev.haiku-os.org/ticket/14272
Revert the cargo-culted changes to sata_request.
This reverts commit ffd36865cf3e66a57f5b1c5e938d53bdbd1c9933.
They didn't fix anything, and on some systems it's reported that they
cause boot failures.
Fixes #14272.
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/busses/scsi/ahci/sata_request.cpp
b/src/add-ons/kernel/busses/scsi/ahci/sata_request.cpp
index 65d22917e3..9e06dceab6 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/sata_request.cpp
+++ b/src/add-ons/kernel/busses/scsi/ahci/sata_request.cpp
@@ -1,7 +1,6 @@
/*
* Copyright 2008, Marcus Overhagen. All rights reserved.
- * Copyright 2009-2018, Haiku, Inc. All rights reserved.
- * Distributed under the terms of the MIT license.
+ * Distributed under the terms of the MIT License.
*/
@@ -13,9 +12,6 @@
#define FIS_TYPE_REGISTER_HOST_TO_DEVICE 0x27
-#define ATA_D_LBA 0x40 /* use LBA addressing */
-#define ATA_A_4BIT 0x08 /* 4 head bits */
-
sata_request::sata_request()
:
@@ -64,10 +60,7 @@ sata_request::SetATACommand(uint8 command)
fFis[0] = FIS_TYPE_REGISTER_HOST_TO_DEVICE;
fFis[1] = 0x80;
// This is a command
- if (fCcb != NULL)
- fFis[1] |= fCcb->target_id & 0x0f;
fFis[2] = command;
- fFis[15] = ATA_A_4BIT;
}
@@ -78,7 +71,8 @@ sata_request::SetATA28Command(uint8 command, uint32 lba,
uint8 sectorCount)
fFis[4] = lba & 0xff;
fFis[5] = (lba >> 8) & 0xff;
fFis[6] = (lba >> 16) & 0xff;
- fFis[7] = ATA_D_LBA | ((lba >> 24) & 0x0f);
+ fFis[7] = 0x40 | ((lba >> 24) & 0x0f);
+ // device
fFis[12] = sectorCount & 0xff;
}
@@ -90,7 +84,8 @@ sata_request::SetATA48Command(uint8 command, uint64 lba,
uint16 sectorCount)
fFis[4] = lba & 0xff;
fFis[5] = (lba >> 8) & 0xff;
fFis[6] = (lba >> 16) & 0xff;
- fFis[7] = ATA_D_LBA;
+ fFis[7] = 0x40;
+ // device
fFis[8] = (lba >> 24) & 0xff;
fFis[9] = (lba >> 32) & 0xff;
fFis[10] = (lba >> 40) & 0xff;
@@ -112,7 +107,6 @@ sata_request::SetATAPICommand(size_t transferLength)
{
fIsATAPI = true;
SetATACommand(0xa0);
- fFis[7] = ATA_D_LBA;
if (1 /* isPIO */) {
if (transferLength == 0)
transferLength = 2;
diff --git a/src/add-ons/kernel/busses/scsi/ahci/sata_request.h
b/src/add-ons/kernel/busses/scsi/ahci/sata_request.h
index 5e6afad1ed..5686530fa0 100644
--- a/src/add-ons/kernel/busses/scsi/ahci/sata_request.h
+++ b/src/add-ons/kernel/busses/scsi/ahci/sata_request.h
@@ -1,7 +1,6 @@
/*
* Copyright 2008, Marcus Overhagen. All rights reserved.
- * Copyright 2009-2018, Haiku, Inc. All rights reserved.
- * Distributed under the terms of the MIT license.
+ * Distributed under the terms of the MIT License.
*/
#ifndef _SATA_REQUEST_H
#define _SATA_REQUEST_H
############################################################################
Revision: hrev52107
Commit: 4a88aa503ad4155a20931e263d24343043994ea9
URL: https://git.haiku-os.org/haiku/commit/?id=4a88aa503ad4
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jul 17 00:20:00 2018 UTC
Ticket: https://dev.haiku-os.org/ticket/14273
atheroswifi: Turn some apparently-harmless spam into debug-prints.
Both korli and KapiX report seeing this, but the driver works for them.
Fixes #14273.
----------------------------------------------------------------------------
diff --git
a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_rx_edma.c
b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_rx_edma.c
index e856a9f7d7..977ce8dc11 100644
---
a/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_rx_edma.c
+++
b/src/add-ons/kernel/drivers/network/wlan/atheroswifi/dev/ath/if_ath_rx_edma.c
@@ -166,7 +166,7 @@ ath_edma_stoprecv(struct ath_softc *sc, int dodelay)
ath_hal_setrxfilter(ah, 0);
/*
- *
+ *
*/
if (ath_hal_stopdmarecv(ah) == AH_TRUE)
sc->sc_rx_stopped = 1;
@@ -727,7 +727,7 @@ ath_edma_rxbuf_alloc(struct ath_softc *sc)
bf = TAILQ_FIRST(&sc->sc_rxbuf);
/* XXX shouldn't happen upon startup? */
if (bf == NULL) {
- device_printf(sc->sc_dev, "%s: nothing on rxbuf?!\n",
+ DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: nothing on rxbuf?!\n",
__func__);
return (NULL);
}
@@ -808,7 +808,7 @@ ath_edma_rxfifo_alloc(struct ath_softc *sc, HAL_RX_QUEUE
qtype, int nbufs)
bf = ath_edma_rxbuf_alloc(sc);
/* XXX should ensure the FIFO is not NULL? */
if (bf == NULL) {
- device_printf(sc->sc_dev,
+ DPRINTF(sc, ATH_DEBUG_EDMA_RX,
"%s: Q%d: alloc failed: i=%d, nbufs=%d?\n",
__func__,
qtype,
@@ -925,7 +925,7 @@ ath_edma_rxfifo_free(struct ath_softc *sc, HAL_RX_QUEUE
qtype)
device_printf(sc->sc_dev, "%s: called; qtype=%d\n",
__func__,
qtype);
-
+
free(re->m_fifo, M_ATHDEV);
return (0);