Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553408
D58100.1794701726.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D58100.1794701726.diff
View Options
diff --git a/sys/dev/firewire/fwcam.c b/sys/dev/firewire/fwcam.c
--- a/sys/dev/firewire/fwcam.c
+++ b/sys/dev/firewire/fwcam.c
@@ -288,7 +288,7 @@
sc->state = FWCAM_STATE_PROBED;
FWCAM_UNLOCK(sc);
- if (sc->open_count > 0 &&
+ if (sc->dma_ch >= 0 &&
sc->state != FWCAM_STATE_DETACHING)
fwcam_iso_start(sc);
}
@@ -601,7 +601,6 @@
fwcam_cdev_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
struct fwcam_softc *sc = dev->si_drv1;
- int err = 0;
FWCAM_LOCK(sc);
if (sc->state == FWCAM_STATE_DETACHING) {
@@ -615,18 +614,8 @@
}
sc->open_count++;
- if (sc->open_count == 1 && sc->state == FWCAM_STATE_PROBED) {
- FWCAM_UNLOCK(sc);
- err = fwcam_iso_start(sc);
- if (err) {
- FWCAM_LOCK(sc);
- sc->open_count--;
- FWCAM_UNLOCK(sc);
- }
- } else {
- FWCAM_UNLOCK(sc);
- }
- return (err);
+ FWCAM_UNLOCK(sc);
+ return (0);
}
static int
@@ -657,6 +646,13 @@
int err;
FWCAM_LOCK(sc);
+ if (sc->state == FWCAM_STATE_PROBED) {
+ FWCAM_UNLOCK(sc);
+ err = fwcam_iso_start(sc);
+ if (err)
+ return (err);
+ FWCAM_LOCK(sc);
+ }
while (!sc->frame_ready) {
if (sc->state != FWCAM_STATE_STREAMING) {
FWCAM_UNLOCK(sc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 12:15 AM (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41734499
Default Alt Text
D58100.1794701726.diff (1 KB)
Attached To
Mode
D58100: fwcam: defer ISO streaming to first read
Attached
Detach File
Event Timeline