rpms/libraw1394/F-9 libraw1394-fix-channel_modify.patch, NONE, 1.1 libraw1394.spec, 1.43, 1.44
Jarod Wilson
jwilson at fedoraproject.org
Fri Dec 5 19:37:24 UTC 2008
- Previous message (by thread): comps comps-f11.xml.in,1.20,1.21
- Next message (by thread): rpms/fcron/devel fcron_config_modified.c, NONE, 1.1 fcron.LISEZMOI, 1.3, 1.4 fcron.README, 1.3, 1.4 fcron.spec, 1.17, 1.18 fcron_watch_config, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwilson
Update of /cvs/pkgs/rpms/libraw1394/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13217
Modified Files:
libraw1394.spec
Added Files:
libraw1394-fix-channel_modify.patch
Log Message:
* Fri Dec 05 2008 Jarod Wilson <jarod at redhat.com> - 1.3.0-9
- Fix channel modify code, should make iso reception work reliably now
libraw1394-fix-channel_modify.patch:
--- NEW FILE libraw1394-fix-channel_modify.patch ---
diff -Naurp libraw1394-1.3.0.orig/juju/raw1394.c libraw1394-1.3.0.fix/juju/raw1394.c
--- libraw1394-1.3.0.orig/juju/raw1394.c 2008-12-05 14:33:02.415432526 -0500
+++ libraw1394-1.3.0.fix/juju/raw1394.c 2008-12-05 14:36:32.954557694 -0500
@@ -1410,46 +1410,45 @@ raw1394_channel_modify (raw1394handle_t
unsigned int channel,
enum raw1394_modify_mode mode)
{
- quadlet_t buffer, compare, swap, bit;
- nodeaddr_t addr;
+ quadlet_t buffer;
int result;
-
- if (channel >= 64)
- return -1;
- addr = CSR_REGISTER_BASE +
- CSR_CHANNELS_AVAILABLE_HI + 4 * (channel / 32);
- /* Read currently available channels from IRM. */
- result = raw1394_read(handle, raw1394_get_irm_id (handle), addr,
- sizeof buffer, &buffer);
+ nodeaddr_t addr = CSR_REGISTER_BASE;
+ unsigned int c = channel;
+ quadlet_t compare, swap = 0, new;
+
+ if (c > 31 && c < 64) {
+ addr += CSR_CHANNELS_AVAILABLE_LO;
+ c -= 32;
+ } else if (c < 64)
+ addr += CSR_CHANNELS_AVAILABLE_HI;
+ else
+ return -1;
+ c = 31 - c;
+
+ result = raw1394_read (handle, raw1394_get_irm_id (handle), addr,
+ sizeof (quadlet_t), &buffer);
if (result < 0)
return -1;
-
- /* IEEE numbers bits from MSB (0) to LSB (31). */
- bit = 1 << (31 - (channel & 31));
- compare = ntohl(buffer);
- switch (mode) {
- case RAW1394_MODIFY_ALLOC:
- if ((compare & bit) == 0)
- return -1;
- swap = buffer & ~bit;
- break;
- case RAW1394_MODIFY_FREE:
- if ((buffer & bit) != 0)
- return -1;
- swap = buffer | bit;
- break;
+ buffer = ntohl (buffer);
- default:
- return -1;
+ if ( mode == RAW1394_MODIFY_ALLOC ) {
+ if( (buffer & (1 << c)) == 0 )
+ return -1;
+ swap = htonl (buffer & ~(1 << c));
+ }
+ else if ( mode == RAW1394_MODIFY_FREE ) {
+ if ( (buffer & (1 << c)) != 0 )
+ return -1;
+ swap = htonl (buffer | (1 << c));
}
-
- result = raw1394_lock (handle, raw1394_get_irm_id (handle), addr,
- RAW1394_EXTCODE_COMPARE_SWAP,
- htonl(swap), htonl(compare), &buffer);
- if (result < 0 || ntohl(buffer) != compare)
+ compare = htonl (buffer);
+
+ result = raw1394_lock (handle, raw1394_get_irm_id (handle), addr,
+ RAW1394_EXTCODE_COMPARE_SWAP, swap, compare, &new);
+ if ( (result < 0) || (new != compare) )
return -1;
-
+
return 0;
}
Index: libraw1394.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libraw1394/F-9/libraw1394.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- libraw1394.spec 20 Nov 2008 18:10:09 -0000 1.43
+++ libraw1394.spec 5 Dec 2008 19:36:54 -0000 1.44
@@ -1,7 +1,7 @@
Summary: Library providing low-level IEEE-1394 access
Name: libraw1394
Version: 1.3.0
-Release: 8%{?dist}
+Release: 9%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://www.linux1394.org/dl/libraw1394-%{version}.tar.gz
@@ -16,6 +16,7 @@
Patch3: libraw1394-juju-munmap-correct-max_packet_size.patch
Patch4: libraw1394-memset-and-patch-up-leaks.patch
Patch5: libraw1394-fix-segfault-in-handle_arm_request.patch
+Patch6: libraw1394-fix-channel_modify.patch
%description
The libraw1394 library provides direct access to the IEEE-1394 bus through
@@ -38,6 +39,7 @@
%patch3 -p1 -b .munmap
%patch4 -p1 -b .memset
%patch5 -p1 -b .segv
+%patch6 -p1
%build
aclocal
@@ -80,6 +82,9 @@
%changelog
+* Fri Dec 05 2008 Jarod Wilson <jarod at redhat.com> - 1.3.0-9
+- Fix channel modify code, should make iso reception work reliably now
+
* Thu Nov 20 2008 Jarod Wilson <jarod at redhat.com> - 1.3.0-8
- Fix segfault in handle_arm_request
- Previous message (by thread): comps comps-f11.xml.in,1.20,1.21
- Next message (by thread): rpms/fcron/devel fcron_config_modified.c, NONE, 1.1 fcron.LISEZMOI, 1.3, 1.4 fcron.README, 1.3, 1.4 fcron.spec, 1.17, 1.18 fcron_watch_config, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list