Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jul 2026 04:09:31 +0000
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Abdelkader Boudih <freebsd@seuros.com>
Subject:   git: dd9fac5e4f00 - main - firewire: remove SPL calls
Message-ID:  <6a59aafb.268ba.515ee6f5@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=dd9fac5e4f003de0275f82efa0c326d7ee154623

commit dd9fac5e4f003de0275f82efa0c326d7ee154623
Author:     Abdelkader Boudih <freebsd@seuros.com>
AuthorDate: 2026-07-17 04:08:43 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-07-17 04:08:45 +0000

    firewire: remove SPL calls
    
    SPL is a no-op on amd64. Real locking is already handled by fc_mtx and
    per-driver mutexes.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D58210
---
 sys/dev/firewire/firewire.c    | 21 ++-------------------
 sys/dev/firewire/firewirereg.h |  2 --
 sys/dev/firewire/fwdev.c       | 16 +++-------------
 sys/dev/firewire/fwohci.c      | 20 ++++----------------
 sys/dev/firewire/fwohci_pci.c  |  7 -------
 sys/dev/firewire/if_fwe.c      | 23 ++---------------------
 sys/dev/firewire/if_fwip.c     | 22 ++--------------------
 sys/dev/firewire/sbp_targ.c    | 10 +---------
 8 files changed, 14 insertions(+), 107 deletions(-)

diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index c0a7c53cdd6c..3d41b4691276 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -982,9 +982,7 @@ fw_bindremove(struct firewire_comm *fc, struct fw_bind *fwb)
 	struct fw_xfer *xfer, *next;
 #endif
 	struct fw_bind *tfw;
-	int s;
 
-	s = splfw();
 	FW_GLOCK(fc);
 	STAILQ_FOREACH(tfw, &fc->binds, fclist)
 		if (tfw == fwb) {
@@ -994,7 +992,6 @@ fw_bindremove(struct firewire_comm *fc, struct fw_bind *fwb)
 
 	printf("%s: no such binding\n", __func__);
 	FW_GUNLOCK(fc);
-	splx(s);
 	return (1);
 found:
 #if 0
@@ -1007,7 +1004,6 @@ found:
 #endif
 	FW_GUNLOCK(fc);
 
-	splx(s);
 	return 0;
 }
 
@@ -1016,7 +1012,7 @@ fw_xferlist_add(struct fw_xferlist *q, struct malloc_type *type,
     int slen, int rlen, int n,
     struct firewire_comm *fc, void *sc, void (*hand)(struct fw_xfer *))
 {
-	int i, s;
+	int i;
 	struct fw_xfer *xfer;
 
 	for (i = 0; i < n; i++) {
@@ -1026,9 +1022,7 @@ fw_xferlist_add(struct fw_xferlist *q, struct malloc_type *type,
 		xfer->fc = fc;
 		xfer->sc = sc;
 		xfer->hand = hand;
-		s = splfw();
 		STAILQ_INSERT_TAIL(q, xfer, link);
-		splx(s);
 	}
 	return (n);
 }
@@ -1451,9 +1445,7 @@ fw_bus_probe(void *arg)
 {
 	struct firewire_comm *fc;
 	struct fw_device *fwdev;
-	int s;
 
-	s = splfw();
 	fc = arg;
 	fc->status = FWBUSEXPLORE;
 
@@ -1476,7 +1468,6 @@ fw_bus_probe(void *arg)
 					"Dev ID: %08x%08x already invalid\n",
 					__func__, fwdev->eui.hi, fwdev->eui.lo);
 		}
-	splx(s);
 
 	wakeup(fc);
 }
@@ -1737,7 +1728,7 @@ fw_find_self_id(struct firewire_comm *fc, int node)
 static void
 fw_explore(struct firewire_comm *fc)
 {
-	int node, err, s, i, todo, todo2, trys;
+	int node, err, i, todo, todo2, trys;
 	char nodes[63];
 	struct fw_device dfwdev;
 	union fw_self_id *fwsid;
@@ -1773,7 +1764,6 @@ fw_explore(struct firewire_comm *fc)
 		nodes[todo++] = node;
 	}
 
-	s = splfw();
 	for (trys = 0; todo > 0 && trys < 3; trys++) {
 		todo2 = 0;
 		for (i = 0; i < todo; i++) {
@@ -1788,7 +1778,6 @@ fw_explore(struct firewire_comm *fc)
 		}
 		todo = todo2;
 	}
-	splx(s);
 }
 
 static void
@@ -2018,10 +2007,8 @@ fw_get_tlabel(struct firewire_comm *fc, struct fw_xfer *xfer)
 {
 	u_int dst, new_tlabel;
 	struct fw_xfer *txfer;
-	int s;
 
 	dst = xfer->send.hdr.mode.hdr.dst & 0x3f;
-	s = splfw();
 	mtx_lock(&fc->tlabel_lock);
 	new_tlabel = (fc->last_tlabel[dst] + 1) & 0x3f;
 	STAILQ_FOREACH(txfer, &fc->tlabels[new_tlabel], tlabel)
@@ -2031,7 +2018,6 @@ fw_get_tlabel(struct firewire_comm *fc, struct fw_xfer *xfer)
 		fc->last_tlabel[dst] = new_tlabel;
 		STAILQ_INSERT_TAIL(&fc->tlabels[new_tlabel], xfer, tlabel);
 		mtx_unlock(&fc->tlabel_lock);
-		splx(s);
 		xfer->tl = new_tlabel;
 		xfer->send.hdr.mode.hdr.tlrt = new_tlabel << 2;
 		if (firewire_debug > 1)
@@ -2039,7 +2025,6 @@ fw_get_tlabel(struct firewire_comm *fc, struct fw_xfer *xfer)
 		return (new_tlabel);
 	}
 	mtx_unlock(&fc->tlabel_lock);
-	splx(s);
 
 	if (firewire_debug > 1)
 		printf("fw_get_tlabel: no free tlabel\n");
@@ -2272,10 +2257,8 @@ fw_rcv(struct fw_rcv_buf *rb)
 		if (rb->xfer == NULL)
 			return;
 		fw_rcv_copy(rb)
-		s = splfw();
 		xferq->queued++;
 		STAILQ_INSERT_TAIL(&xferq->q, rb->xfer, link);
-		splx(s);
 		sc = device_get_softc(rb->fc->bdev);
 		if (SEL_WAITING(&xferq->rsel))
 			selwakeuppri(&xferq->rsel, FWPRI);
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index a9f4f23e6a91..656b7e2a448e 100644
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -42,8 +42,6 @@ typedef	struct thread fw_proc;
 #include <sys/mutex.h>
 #include <sys/taskqueue.h>
 
-#define	splfw splimp
-
 STAILQ_HEAD(fw_xferlist, fw_xfer);
 
 struct fw_device {
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index c01a3eab33da..18c2da6d2d94 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -266,7 +266,7 @@ fw_close(struct cdev *dev, int flags, int fmt, fw_proc *td)
 static int
 fw_read_async(struct fw_drv1 *d, struct uio *uio, int ioflag)
 {
-	int err = 0, s;
+	int err = 0;
 	struct fw_xfer *xfer;
 	struct fw_bind *fwb;
 	struct fw_pkt *fp;
@@ -281,10 +281,8 @@ fw_read_async(struct fw_drv1 *d, struct uio *uio, int ioflag)
 		return (err);
 	}
 
-	s = splfw();
 	STAILQ_REMOVE_HEAD(&d->rq, link);
 	FW_GUNLOCK(xfer->fc);
-	splx(s);
 	fp = &xfer->recv.hdr;
 #if 0 /* for GASP ?? */
 	if (fc->irx_post != NULL)
@@ -316,7 +314,7 @@ fw_read(struct cdev *dev, struct uio *uio, int ioflag)
 	struct fw_drv1 *d;
 	struct fw_xferq *ir;
 	struct firewire_comm *fc;
-	int err = 0, s, slept = 0;
+	int err = 0, slept = 0;
 	struct fw_pkt *fp;
 
 	if (DEV_FWMEM(dev))
@@ -338,9 +336,7 @@ readloop:
 		/* iso bulkxfer */
 		ir->stproc = STAILQ_FIRST(&ir->stvalid);
 		if (ir->stproc != NULL) {
-			s = splfw();
 			STAILQ_REMOVE_HEAD(&ir->stvalid, link);
-			splx(s);
 			ir->queued = 0;
 		}
 	}
@@ -372,9 +368,7 @@ readloop:
 			fp->mode.stream.len + sizeof(uint32_t), uio);
 		ir->queued++;
 		if (ir->queued >= ir->bnpacket) {
-			s = splfw();
 			STAILQ_INSERT_TAIL(&ir->stfree, ir->stproc, link);
-			splx(s);
 			fc->irx_enable(fc, ir->dmach);
 			ir->stproc = NULL;
 		}
@@ -447,7 +441,7 @@ static int
 fw_write(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	int err = 0;
-	int s, slept = 0;
+	int slept = 0;
 	struct fw_drv1 *d;
 	struct fw_pkt *fp;
 	struct firewire_comm *fc;
@@ -471,9 +465,7 @@ isoloop:
 	if (it->stproc == NULL) {
 		it->stproc = STAILQ_FIRST(&it->stfree);
 		if (it->stproc != NULL) {
-			s = splfw();
 			STAILQ_REMOVE_HEAD(&it->stfree, link);
-			splx(s);
 			it->queued = 0;
 		} else if (slept == 0) {
 			slept = 1;
@@ -499,9 +491,7 @@ isoloop:
 				fp->mode.stream.len, uio);
 	it->queued++;
 	if (it->queued >= it->bnpacket) {
-		s = splfw();
 		STAILQ_INSERT_TAIL(&it->stvalid, it->stproc, link);
-		splx(s);
 		it->stproc = NULL;
 		err = fc->itx_enable(fc, it->dmach);
 	}
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index 245edb1f8fe4..d78312682e0c 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -1066,7 +1066,7 @@ fwohci_start_ats(struct firewire_comm *fc)
 void
 fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
 {
-	int s, ch, err = 0;
+	int ch, err = 0;
 	struct fwohcidb_tr *tr;
 	struct fwohcidb *db;
 	struct fw_xfer *xfer;
@@ -1084,7 +1084,6 @@ fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
 	} else {
 		return;
 	}
-	s = splfw();
 	tr = dbch->bottom;
 	packets = 0;
 	fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_POSTREAD);
@@ -1195,7 +1194,6 @@ out:
 		fwohci_start(sc, dbch);
 		FW_GUNLOCK(fc);
 	}
-	splx(s);
 }
 
 static void
@@ -1511,7 +1509,7 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
 	struct fwohci_softc *sc = (struct fwohci_softc *)fc;
 	int err = 0;
 	struct fwohci_dbch *dbch;
-	int cycle_match, cycle_now, s, ldesc;
+	int cycle_match, cycle_now, ldesc;
 	uint32_t stat;
 	struct fw_bulkxfer *first, *chunk, *prev;
 	struct fw_xferq *it;
@@ -1532,7 +1530,6 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
 		return err;
 
 	ldesc = dbch->ndesc - 1;
-	s = splfw();
 	FW_GLOCK(fc);
 	prev = STAILQ_LAST(&it->stdma, fw_bulkxfer, link);
 	while  ((chunk = STAILQ_FIRST(&it->stvalid)) != NULL) {
@@ -1563,7 +1560,6 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
 	FW_GUNLOCK(fc);
 	fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_PREWRITE);
 	fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_PREREAD);
-	splx(s);
 	stat = OREAD(sc, OHCI_ITCTL(dmach));
 	if (firewire_debug && (stat & OHCI_CNTL_CYCMATCH_S))
 		printf("stat 0x%x\n", stat);
@@ -1627,7 +1623,7 @@ static int
 fwohci_irx_enable(struct firewire_comm *fc, int dmach)
 {
 	struct fwohci_softc *sc = (struct fwohci_softc *)fc;
-	int err = 0, s, ldesc;
+	int err = 0, ldesc;
 	unsigned short tag, ich;
 	uint32_t stat;
 	struct fwohci_dbch *dbch;
@@ -1661,7 +1657,6 @@ fwohci_irx_enable(struct firewire_comm *fc, int dmach)
 	}
 
 	ldesc = dbch->ndesc - 1;
-	s = splfw();
 	if ((ir->flag & FWXFERQ_HANDLER) == 0)
 		FW_GLOCK(fc);
 	prev = STAILQ_LAST(&ir->stdma, fw_bulkxfer, link);
@@ -1695,7 +1690,6 @@ fwohci_irx_enable(struct firewire_comm *fc, int dmach)
 		FW_GUNLOCK(fc);
 	fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_PREWRITE);
 	fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_PREREAD);
-	splx(s);
 	stat = OREAD(sc, OHCI_IRCTL(dmach));
 	if (stat & OHCI_CNTL_DMA_ACTIVE)
 		return 0;
@@ -2180,11 +2174,10 @@ fwohci_tbuf_update(struct fwohci_softc *sc, int dmach)
 	struct fw_bulkxfer *chunk;
 	struct fw_xferq *it;
 	uint32_t stat, count __unused;
-	int s, w=0, ldesc;
+	int w=0, ldesc;
 
 	it = fc->it[dmach];
 	ldesc = sc->it[dmach].ndesc - 1;
-	s = splfw(); /* unnecessary ? */
 	FW_GLOCK(fc);
 	fwdma_sync_multiseg_all(sc->it[dmach].am, BUS_DMASYNC_POSTREAD);
 	if (firewire_debug)
@@ -2215,7 +2208,6 @@ fwohci_tbuf_update(struct fwohci_softc *sc, int dmach)
 		w++;
 	}
 	FW_GUNLOCK(fc);
-	splx(s);
 	if (w)
 		wakeup(it);
 }
@@ -2804,7 +2796,6 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
 	int pcnt;
 #endif
         int len, plen, hlen, offset;
-	int s;
 	caddr_t buf;
 	int resCount;
 
@@ -2816,7 +2807,6 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
 		return;
 	}
 
-	s = splfw();
 	db_tr = dbch->top;
 #ifdef COUNT_PACKETS
 	pcnt = 0;
@@ -3022,7 +3012,6 @@ out:
 	if (pcnt < 1)
 		printf("fwohci_arcv: no packets\n");
 #endif
-	splx(s);
 	return;
 
 err:
@@ -3042,5 +3031,4 @@ err:
 	dbch->top = db_tr;
 	dbch->buf_offset = dbch->xferq.psize - resCount;
 	OWRITE(sc, OHCI_DMACTL(off), OHCI_CNTL_DMA_WAKE);
-	splx(s);
 }
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index a6f9f50701f0..4abebb3b9468 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -324,9 +324,6 @@ static int
 fwohci_pci_detach(device_t self)
 {
 	fwohci_softc_t *sc = device_get_softc(self);
-	int s;
-
-	s = splfw();
 
 	if (sc->bsr)
 		fwohci_stop(sc, self);
@@ -360,7 +357,6 @@ fwohci_pci_detach(device_t self)
 
 	fwohci_detach(sc, self);
 	mtx_destroy(FW_GMTX(&sc->fc));
-	splx(s);
 
 	return 0;
 }
@@ -428,11 +424,8 @@ fwohci_pci_add_child(device_t dev, u_int order, const char *name, int unit)
 	 * interrupt is disabled during the boot process.
 	 */
 	if (cold) {
-		int s;
 		DELAY(250); /* 2 cycles */
-		s = splfw();
 		fwohci_poll(&sc->fc, 0, -1);
-		splx(s);
 	}
 
 	return (child);
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c
index ed288cab02c7..763950e59bac 100644
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -139,7 +139,7 @@ fwe_attach(device_t dev)
 {
 	struct fwe_softc *fwe;
 	if_t ifp;
-	int unit, s;
+	int unit;
 	u_char eaddr[6];
 	struct fw_eui64 *eui;
 
@@ -190,9 +190,7 @@ fwe_attach(device_t dev)
 	if_setflags(ifp, (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST));
 	if_setsendqlen(ifp, TX_MAX_QUEUE);
 
-	s = splimp();
 	ether_ifattach(ifp, eaddr);
-	splx(s);
 
         /* Tell the upper layer(s) we support long frames. */
 	if_setifheaderlen(ifp, sizeof(struct ether_vlan_header));
@@ -242,7 +240,6 @@ fwe_detach(device_t dev)
 {
 	struct fwe_softc *fwe;
 	if_t ifp;
-	int s;
 
 	fwe = device_get_softc(dev);
 	ifp = fwe->eth_softc.ifp;
@@ -251,13 +248,11 @@ fwe_detach(device_t dev)
 	if (if_getcapenable(ifp) & IFCAP_POLLING)
 		ether_poll_deregister(ifp);
 #endif
-	s = splimp();
 
 	fwe_stop(fwe);
 	ether_ifdetach(ifp);
 	if_free(ifp);
 
-	splx(s);
 	mtx_destroy(&fwe->mtx);
 	return 0;
 }
@@ -336,11 +331,10 @@ fwe_ioctl(if_t ifp, u_long cmd, caddr_t data)
 {
 	struct fwe_softc *fwe = ((struct fwe_eth_softc *)if_getsoftc(ifp))->fwe;
 	struct ifstat *ifs = NULL;
-	int s, error;
+	int error;
 
 	switch (cmd) {
 		case SIOCSIFFLAGS:
-			s = splimp();
 			if (if_getflags(ifp) & IFF_UP) {
 				if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))
 					fwe_init(&fwe->eth_softc);
@@ -350,18 +344,15 @@ fwe_ioctl(if_t ifp, u_long cmd, caddr_t data)
 			}
 			/* XXX keep promiscoud mode */
 			if_setflagbits(ifp, IFF_PROMISC, 0);
-			splx(s);
 			break;
 		case SIOCADDMULTI:
 		case SIOCDELMULTI:
 			break;
 
 		case SIOCGIFSTATUS:
-			s = splimp();
 			ifs = (struct ifstat *)data;
 			snprintf(ifs->ascii, sizeof(ifs->ascii),
 			    "\tch %d dma %d\n",	fwe->stream_ch, fwe->dma_ch);
-			splx(s);
 			break;
 		case SIOCSIFCAP:
 #ifdef DEVICE_POLLING
@@ -376,9 +367,7 @@ fwe_ioctl(if_t ifp, u_long cmd, caddr_t data)
 #endif /* DEVICE_POLLING */
 			break;
 		default:
-			s = splimp();
 			error = ether_ioctl(ifp, cmd, data);
-			splx(s);
 			return (error);
 	}
 
@@ -390,7 +379,6 @@ fwe_output_callback(struct fw_xfer *xfer)
 {
 	struct fwe_softc *fwe;
 	if_t ifp;
-	int s;
 
 	fwe = (struct fwe_softc *)xfer->sc;
 	ifp = fwe->eth_softc.ifp;
@@ -401,11 +389,9 @@ fwe_output_callback(struct fw_xfer *xfer)
 	m_freem(xfer->mbuf);
 	fw_xfer_unload(xfer);
 
-	s = splimp();
 	FWE_LOCK(fwe);
 	STAILQ_INSERT_TAIL(&fwe->xferlist, xfer, link);
 	FWE_UNLOCK(fwe);
-	splx(s);
 
 	/* for queue full */
 	if (!if_sendq_empty(ifp))
@@ -416,28 +402,23 @@ static void
 fwe_start(if_t ifp)
 {
 	struct fwe_softc *fwe = ((struct fwe_eth_softc *)if_getsoftc(ifp))->fwe;
-	int s;
 
 	FWEDEBUG(ifp, "starting\n");
 
 	if (fwe->dma_ch < 0) {
 		FWEDEBUG(ifp, "not ready\n");
 
-		s = splimp();
 		fw_net_drain_sendq(ifp);
-		splx(s);
 
 		return;
 	}
 
-	s = splimp();
 	if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
 
 	if (!if_sendq_empty(ifp))
 		fwe_as_output(fwe, ifp);
 
 	if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE);
-	splx(s);
 }
 
 #define HDR_LEN 4
diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c
index c3c6c595c775..8ac139361a89 100644
--- a/sys/dev/firewire/if_fwip.c
+++ b/sys/dev/firewire/if_fwip.c
@@ -150,7 +150,7 @@ fwip_attach(device_t dev)
 {
 	struct fwip_softc *fwip;
 	if_t ifp;
-	int unit, s;
+	int unit;
 	struct fw_hwaddr *hwaddr;
 
 	fwip = ((struct fwip_softc *)device_get_softc(dev));
@@ -195,9 +195,7 @@ fwip_attach(device_t dev)
 	if_setcapabilitiesbit(ifp, IFCAP_POLLING, 0);
 #endif
 
-	s = splimp();
 	firewire_ifattach(ifp, hwaddr);
-	splx(s);
 
 	FWIPDEBUG(ifp, "interface created\n");
 	return (0);
@@ -244,7 +242,6 @@ fwip_detach(device_t dev)
 {
 	struct fwip_softc *fwip;
 	if_t ifp;
-	int s;
 
 	fwip = (struct fwip_softc *)device_get_softc(dev);
 	ifp = fwip->fw_softc.fwip_ifp;
@@ -254,14 +251,11 @@ fwip_detach(device_t dev)
 		ether_poll_deregister(ifp);
 #endif
 
-	s = splimp();
-
 	fwip_stop(fwip);
 	firewire_ifdetach(ifp);
 	if_free(ifp);
 	mtx_destroy(&fwip->mtx);
 
-	splx(s);
 	return 0;
 }
 
@@ -357,11 +351,10 @@ static int
 fwip_ioctl(if_t ifp, u_long cmd, caddr_t data)
 {
 	struct fwip_softc *fwip = ((struct fwip_eth_softc *)if_getsoftc(ifp))->fwip;
-	int s, error;
+	int error;
 
 	switch (cmd) {
 	case SIOCSIFFLAGS:
-		s = splimp();
 		if (if_getflags(ifp) & IFF_UP) {
 			if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))
 				fwip_init(&fwip->fw_softc);
@@ -369,7 +362,6 @@ fwip_ioctl(if_t ifp, u_long cmd, caddr_t data)
 			if (if_getdrvflags(ifp) & IFF_DRV_RUNNING)
 				fwip_stop(fwip);
 		}
-		splx(s);
 		break;
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
@@ -387,9 +379,7 @@ fwip_ioctl(if_t ifp, u_long cmd, caddr_t data)
 #endif /* DEVICE_POLLING */
 		break;
 	default:
-		s = splimp();
 		error = firewire_ioctl(ifp, cmd, data);
-		splx(s);
 		return (error);
 	}
 
@@ -432,7 +422,6 @@ fwip_output_callback(struct fw_xfer *xfer)
 {
 	struct fwip_softc *fwip;
 	if_t ifp;
-	int s;
 
 	fwip = (struct fwip_softc *)xfer->sc;
 	ifp = fwip->fw_softc.fwip_ifp;
@@ -443,11 +432,9 @@ fwip_output_callback(struct fw_xfer *xfer)
 	m_freem(xfer->mbuf);
 	fw_xfer_unload(xfer);
 
-	s = splimp();
 	FWIP_LOCK(fwip);
 	STAILQ_INSERT_TAIL(&fwip->xferlist, xfer, link);
 	FWIP_UNLOCK(fwip);
-	splx(s);
 
 	/* for queue full */
 	if (!if_sendq_empty(ifp)) {
@@ -459,28 +446,23 @@ static void
 fwip_start(if_t ifp)
 {
 	struct fwip_softc *fwip = ((struct fwip_eth_softc *)if_getsoftc(ifp))->fwip;
-	int s;
 
 	FWIPDEBUG(ifp, "starting\n");
 
 	if (fwip->dma_ch < 0) {
 		FWIPDEBUG(ifp, "not ready\n");
 
-		s = splimp();
 		fw_net_drain_sendq(ifp);
-		splx(s);
 
 		return;
 	}
 
-	s = splimp();
 	if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
 
 	if (!if_sendq_empty(ifp))
 		fwip_async_output(fwip, ifp);
 
 	if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE);
-	splx(s);
 }
 
 /* Async. stream output */
diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c
index ba40d2807ae8..cd4b3eb3b537 100644
--- a/sys/dev/firewire/sbp_targ.c
+++ b/sys/dev/firewire/sbp_targ.c
@@ -1402,11 +1402,8 @@ sbp_targ_action1(struct cam_sim *sim, union ccb *ccb)
 static void
 sbp_targ_action(struct cam_sim *sim, union ccb *ccb)
 {
-	int s;
 
-	s = splfw();
 	sbp_targ_action1(sim, ccb);
-	splx(s);
 }
 
 static void
@@ -1784,7 +1781,6 @@ static void
 sbp_targ_resp_callback(struct fw_xfer *xfer)
 {
 	struct sbp_targ_softc *sc;
-	int s;
 
 	if (debug)
 		printf("%s: xfer=%p\n", __func__, xfer);
@@ -1792,9 +1788,7 @@ sbp_targ_resp_callback(struct fw_xfer *xfer)
 	fw_xfer_unload(xfer);
 	xfer->recv.pay_len = SBP_TARG_RECV_LEN;
 	xfer->hand = sbp_targ_recv;
-	s = splfw();
 	STAILQ_INSERT_TAIL(&sc->fwb.xferlist, xfer, link);
-	splx(s);
 }
 
 static int
@@ -1901,10 +1895,9 @@ sbp_targ_recv(struct fw_xfer *xfer)
 	struct fw_pkt *fp, *sfp;
 	struct fw_device *fwdev;
 	uint32_t lo;
-	int s, rtcode;
+	int rtcode;
 	struct sbp_targ_softc *sc;
 
-	s = splfw();
 	sc = (struct sbp_targ_softc *)xfer->sc;
 	fp = &xfer->recv.hdr;
 	fwdev = fw_noderesolve_nodeid(sc->fd.fc, fp->mode.wreqb.src & 0x3f);
@@ -1937,7 +1930,6 @@ done:
 	sfp->mode.wres.pri = 0;
 
 	fw_asyreq(xfer->fc, -1, xfer);
-	splx(s);
 }
 
 static int


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a59aafb.268ba.515ee6f5>