Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162568088
D58210.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
14 KB
Referenced Files
None
Subscribers
None
D58210.diff
View Options
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -982,9 +982,7 @@
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 @@
printf("%s: no such binding\n", __func__);
FW_GUNLOCK(fc);
- splx(s);
return (1);
found:
#if 0
@@ -1007,7 +1004,6 @@
#endif
FW_GUNLOCK(fc);
- splx(s);
return 0;
}
@@ -1016,7 +1012,7 @@
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 @@
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 @@
{
struct firewire_comm *fc;
struct fw_device *fwdev;
- int s;
- s = splfw();
fc = arg;
fc->status = FWBUSEXPLORE;
@@ -1476,7 +1468,6 @@
"Dev ID: %08x%08x already invalid\n",
__func__, fwdev->eui.hi, fwdev->eui.lo);
}
- splx(s);
wakeup(fc);
}
@@ -1737,7 +1728,7 @@
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 @@
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 @@
}
todo = todo2;
}
- splx(s);
}
static void
@@ -2018,10 +2007,8 @@
{
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 @@
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 @@
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 @@
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
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -42,8 +42,6 @@
#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
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -266,7 +266,7 @@
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 @@
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 @@
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -1066,7 +1066,7 @@
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 @@
} else {
return;
}
- s = splfw();
tr = dbch->bottom;
packets = 0;
fwdma_sync_multiseg_all(dbch->am, BUS_DMASYNC_POSTREAD);
@@ -1195,7 +1194,6 @@
fwohci_start(sc, dbch);
FW_GUNLOCK(fc);
}
- splx(s);
}
static void
@@ -1511,7 +1509,7 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
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 @@
w++;
}
FW_GUNLOCK(fc);
- splx(s);
if (w)
wakeup(it);
}
@@ -2804,7 +2796,6 @@
int pcnt;
#endif
int len, plen, hlen, offset;
- int s;
caddr_t buf;
int resCount;
@@ -2816,7 +2807,6 @@
return;
}
- s = splfw();
db_tr = dbch->top;
#ifdef COUNT_PACKETS
pcnt = 0;
@@ -3022,7 +3012,6 @@
if (pcnt < 1)
printf("fwohci_arcv: no packets\n");
#endif
- splx(s);
return;
err:
@@ -3042,5 +3031,4 @@
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
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -324,9 +324,6 @@
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_detach(sc, self);
mtx_destroy(FW_GMTX(&sc->fc));
- splx(s);
return 0;
}
@@ -428,11 +424,8 @@
* 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
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -139,7 +139,7 @@
{
struct fwe_softc *fwe;
if_t ifp;
- int unit, s;
+ int unit;
u_char eaddr[6];
struct fw_eui64 *eui;
@@ -190,9 +190,7 @@
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 @@
{
struct fwe_softc *fwe;
if_t ifp;
- int s;
fwe = device_get_softc(dev);
ifp = fwe->eth_softc.ifp;
@@ -251,13 +248,11 @@
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 @@
{
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 @@
}
/* 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 @@
#endif /* DEVICE_POLLING */
break;
default:
- s = splimp();
error = ether_ioctl(ifp, cmd, data);
- splx(s);
return (error);
}
@@ -390,7 +379,6 @@
{
struct fwe_softc *fwe;
if_t ifp;
- int s;
fwe = (struct fwe_softc *)xfer->sc;
ifp = fwe->eth_softc.ifp;
@@ -401,11 +389,9 @@
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 @@
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
--- a/sys/dev/firewire/if_fwip.c
+++ b/sys/dev/firewire/if_fwip.c
@@ -150,7 +150,7 @@
{
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 @@
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 @@
{
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 @@
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 @@
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 @@
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING)
fwip_stop(fwip);
}
- splx(s);
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
@@ -387,9 +379,7 @@
#endif /* DEVICE_POLLING */
break;
default:
- s = splimp();
error = firewire_ioctl(ifp, cmd, data);
- splx(s);
return (error);
}
@@ -432,7 +422,6 @@
{
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 @@
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 @@
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
--- a/sys/dev/firewire/sbp_targ.c
+++ b/sys/dev/firewire/sbp_targ.c
@@ -1402,11 +1402,8 @@
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 @@
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 @@
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 @@
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 @@
sfp->mode.wres.pri = 0;
fw_asyreq(xfer->fc, -1, xfer);
- splx(s);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 15, 3:27 PM (2 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35104764
Default Alt Text
D58210.diff (14 KB)
Attached To
Mode
D58210: firewire: remove SPL calls
Attached
Detach File
Event Timeline
Log In to Comment