* segmentCount was potentially set incorrectly. It could be too big,
since we considered all vecs, not only those remaining.
* The main loop condition was incorrect. This would lead to too few
DMABuffer vecs (or none at all) for any but the first IOOperation of a
request. Should fix#2586.
* Correctly offset by vecIndex in debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26881 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Cleaning up AllocationDescriptorList in order to follow our coding guidelines
- Moving methods implentation outside the class
I've already ported udf but I'm going to commit it one file at the time
so it's easier to review, plus I still have to clean up the code.
Please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26880 a95241bf-73f2-0310-859d-f6bbb57e9c96
patch applied, the card didn't work at all anymore.
* Minor 80-column/white space cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26879 a95241bf-73f2-0310-859d-f6bbb57e9c96
to be the habbit now.
* Improve PathHandler::Quit() to delete the object in case the BMessenger was
not valid or failed to send the Quit message. This should handle the corner
case that the PathHandler's looper was already Quit(). There could still be
a race condition, although I don't know if it affects local message targets
in Haiku. I added a TODO note for that, but I believe it can be neglected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26877 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Tracked down the problem[1] to the wrong offset being read from the pci config.
Now matches Realtek's Linux driver. I couldn't find why it worked before as
the value hasn't changed since the original version added to the repository.
This is only verified with my own 8168 but I found no special logic in other
drivers for 8167 or 8169.
[1] See #1853, "RTL8168 recognized but not working"
I don't have the hardware myself to test.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26873 a95241bf-73f2-0310-859d-f6bbb57e9c96
specifying the protection of each page (4 bits per page).
* Added no-op implementation of posix_madvise().
* Replaced a few "addr_t size" parameters by "size_t size".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26871 a95241bf-73f2-0310-859d-f6bbb57e9c96
inefficient. And while it did check if the handler was not NULL, it would have
resulted in an endless loop if it was. I think we can safely assume we have no
NULL BHandlers in that list though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26870 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Output something if the node monitor message does not contain the expected
fields (Haiku node monitoring is soo much easier...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26869 a95241bf-73f2-0310-859d-f6bbb57e9c96
* avoid using read/write and block flags for mapping register memory
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26867 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Cast the slider value to double before dividing by 1000 in order to apply
a smooth speed value. Fixes#1470. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26866 a95241bf-73f2-0310-859d-f6bbb57e9c96
with the VMCache lock held, and WriteModified() locks itself.
* Added an assertion that the lock is held when calling that method.
* This fixes a KDL as soon as you would have used O_NOCACHE with a file that
had already some pages read in.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26864 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Added skeleton code for setting device mode.
- Next, figure out which bits to set!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26862 a95241bf-73f2-0310-859d-f6bbb57e9c96
the dirent buffer. This fixes Rene's comment about "ls" entering an endless
loop.
* It also didn't access the buffer passed in correctly if it came from userland.
* It now also fills in as many entries in the buffer as fit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26861 a95241bf-73f2-0310-859d-f6bbb57e9c96
* dir_read() now takes into account that we may have read more than one dir
entry, and calls fix_dirent() for each of them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26859 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The use of B_{READ|WRITE}_AREA throughout the drivers is surely alarming.
Defining these flags means that *every user* application can access these
buffers read/write, it becomes visible in userspace like any other memory
(just shared among all apps). I would like to ask each driver maintainer
to see if that is really wished here. If you only need one app to be able
to access it, cloning the area would be more appropriate.
* I came across the use of B_ANY_KERNEL_BLOCK_ADDRESS a number of times. This
is almost completely useless for most usages, as it tries to align the
virtual to a multiple of the size of the area. It just makes the allocation
more likely to fail. Please only use where appropriate, and please review
your code.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26858 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Moving common functions and macros used in realtime_sem_test1
to a shared header as they are probably going to be used for other test unit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26854 a95241bf-73f2-0310-859d-f6bbb57e9c96
cut down the buffer size on the last request. This fixes bug #2565.
* cdda_read() did report an incorrect number of bytes read. This fixes bug
#2511, and also that you couldn't copy tracks via "cp".
* cdda_read_stat() did not include the WAV header in its reported size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26853 a95241bf-73f2-0310-859d-f6bbb57e9c96
* If a segment violation occurs, we do now check whether the thread in
question has a handler for SIGSEGV. If so, we just send it the signal.
Otherwise we notify the debugger as before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26851 a95241bf-73f2-0310-859d-f6bbb57e9c96
the cache locked, since it enters the VFS and might reenter VMCache,
thus causing deadlocks. Fixes bug #2577.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26849 a95241bf-73f2-0310-859d-f6bbb57e9c96
* On Haiku, this will make them disappear from the results list.
* On BeOS, it will only work around the problem that we don't know
which file was removed from the node monitoring message...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26848 a95241bf-73f2-0310-859d-f6bbb57e9c96
* use HDAC_STREAM_POSITION register value to check the current buffer cycle in interrupt handler
* added B_FULL_LOCK flags for area allocation, not sure it's handled but at least more correct
* buffer descriptors now use a low and high address fields
* applied a byte mask on format
* enabled PCI bus mastering if not yet done
* the PCI space register TCSEL (Traffic Class Select Register, which sets PCI express QOS) is now reset to TC0 (clear 0-2 bits) as needed on some boards like mine to
ensure good playback
Playback is finally working correctly here on ICH8 HDA!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26847 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Removed most of the currently fixup code as, at least on my machine,
it was messing stuff up. This makes the PATA controller work in IDE
mode!
- Added comments to clarify things and TODOs about what is still missing
(specially getting AHCI mode working).
Marcus, please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26844 a95241bf-73f2-0310-859d-f6bbb57e9c96
then be used for receiving node monitoring messages.
* Reenabled using be_app as default BLooper if the API user does not provide
one. I think the problem that Stefano needed to work aroung in r23995 was
actually caused by the incorrect locking (an never unlocking) of the looper
before calling PathHandler::Quit().
->If I understand correctly, this code as supposed to work around the possible
situation that the looper holding those PathHandlers may have already quit,
leaving stale PathHandler pointers behind. But that case was not prevented
by the old code anyways, since one would have had to access freed memory to
even get the stale BLooper pointer. The real fix would be to store the
BLooper pointer with each PathHandler so that the possible gone-ness of
those loopers could be checked independent of accessing the PathHandler
pointer. (The whole problem is that PathHandler adds itself to the BLooper
and if the looper quits, it will free all its attached handlers.)
* Introduced a global fallback BLooper for the case that no BApplication is
running, which resolves a TODO.
All this is yet untested, but should have a good chance of working.
(Famous last words...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26843 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Better adhere to style guide.
- Remove superfluous check for device function before setting IRQ.
- Added comment about setting IRQ for device with function 1.
- This fixes nothing yet, in case you are wondering. :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26842 a95241bf-73f2-0310-859d-f6bbb57e9c96
fixed. Not sure why the 6 to 10-byte command translation was triggered,
though.
* Minor coding style changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26840 a95241bf-73f2-0310-859d-f6bbb57e9c96
dedicated functions.
* Introduced gMappedPagesCount variable which counts the total number of
physical pages that are mapped.
* Added vm_page_get_stats() which fills in the memory related part of
the system_info structure. Used and cached pages are computed
differently, now. The "available" (== not committed) memory is no
longer used for the computation as it doesn't say anything about the
actually used/free pages (with swap support enabled it is even
less meaningful, since we first commit swap space when possible).
We do also consider the memory used by the block cache as cached
pages, now. All in all these changes should fix the memory statistics
reported by get_system_info(), IOW bug #2574.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26837 a95241bf-73f2-0310-859d-f6bbb57e9c96