Commit Graph

21392 Commits

Author SHA1 Message Date
Michael Lotz
32ab216c85 * Check for the removed case before doing any transfers.
* Cancel possibly active transfers when removed.
* Do not interpret the transfer buffer in case of an error or removal.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 22:29:41 +00:00
Michael Lotz
9e48bf8e42 Rewriting the usb_hid driver. It has now gotten a driver part and a device part
structured into the HIDDevice base class and KeyboardDevice and MouseDevice
subclasses. This can be extended easily to support more device types like game
controllers, joysticks and other HID devices. The parsing code remains untouched
while the interpretation code has been integrated into the device classes.
The driver should work much the same way as before including the boot protocol
only keyboard limitation. On the other hand composite devices that combine
multiple devices should now work, as long as they expose those devices as two
seperate interfaces.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 22:01:08 +00:00
François Revol
e26120ae27 Add char * version of ReadFrames, for compatibility with some R5 games.
Patch by genki0. I didn't see any reason not to commit it, so...
This should fix #897.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 21:45:32 +00:00
Michael Lotz
c2f077d03e * Clear the configurations list so it can safely be handled in case the device
fails to init completely.
* Fix wrong usage of realloc and check the allocations.
* Check a few more allocations, should be all now.
* Fix a small memory leaks in error case.
* Do a few more checks when unconfiguring and deleting a device so an incompletely
  initilized device is deleted correctly and does not crash or leak.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 15:11:34 +00:00
Marcus Overhagen
d53ddcce75 Provide better sense data. Turn off auto-sense
for ATAPI, as we can't report anything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 23:08:11 +00:00
Marcus Overhagen
205acfb4dc first attempt to report sense data
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 22:34:40 +00:00
Marcus Overhagen
ad36dc4f21 Set the correct SCSI data direction mask.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 21:46:30 +00:00
Marcus Overhagen
b54c709405 Use scsi direction mask to determine if the command to execute is a write,
instead of checking every single command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 21:27:44 +00:00
Marcus Overhagen
ec5161c7b2 add more error handling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 20:40:32 +00:00
Marcus Overhagen
88bd06fbc7 Separate port and device reset. Only perform device reset during error handling if the device is busy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 20:35:22 +00:00
Marcus Overhagen
c3342cf811 added simple error handling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 19:17:17 +00:00
Ingo Weinhold
5839058aa9 Memory leak in error cases. CID 737.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:29:53 +00:00
Ingo Weinhold
d2e55e94c0 Memory leak in error case. CID 807.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:23:22 +00:00
Ingo Weinhold
a1e3759f69 Memory leak in error cases. CID 808.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:17:56 +00:00
Ingo Weinhold
cefcb7b41c Memory leak in error case. CID 872.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:07:29 +00:00
Ingo Weinhold
7ad3cf0bc3 Memory leak in error case. CID 873.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:04:57 +00:00
Ingo Weinhold
06a28b5416 BFilePanel doesn't take over ownership of the supplied messenger, so it
was leaked. CID 881.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:56:54 +00:00
Ingo Weinhold
7dd1df01f9 Fixed memory leak (though not so interesting, since the strace would
exit in this case anyway). CID 985.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:42:39 +00:00
Ingo Weinhold
9dec848f8d Fixed memory leak. Discovered by Coverity (CID 1013).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:36:25 +00:00
Stephan Aßmus
5593e6d9f6 Spotted a mistake in my previous commit, the style would still point to
the last style if the face was not found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:30:48 +00:00
Ingo Weinhold
1462a0827b Reordered the functions (private -> public). No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 15:27:31 +00:00
Stephan Aßmus
5b30a26b7c Added additional font face flags for "condensed", "light" and "heavy".
Our font has some extra styles and these could be picked up as the
"regular" face by accident, as witnessed by Firefox. Tracked down by
Michael Lotz. Firefox uses the correct font now for it's interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 14:54:18 +00:00
Marcus Overhagen
4f04d37ff3 Applied patch2 from bug #2243 for further testing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 14:15:13 +00:00
Marcus Overhagen
33e9755153 Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 13:40:58 +00:00
Ingo Weinhold
6607b17d6b Pimped up the "caches" command. Now it prints the caches in trees with
additional info (offset, size, used pages, areas), sorting the trees
by used pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 00:48:15 +00:00
Ingo Weinhold
5e3a974d1e * When KERNEL_HEAP_LEAK_CHECK is enabled we also store the calling
function requesting the allocation.
* The "allocations" commands does also print the caller and can filter
  by caller, now.
* Added new "allocations_per_caller" command, which sums up allocations
  per caller and prints them in a table sorted by size or count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 22:30:20 +00:00
Ingo Weinhold
91890a3258 * Moved the allocation of the static ch_randgen structure from the
open() hook to init_driver(). Unlike commented the structure was not
  allocated lazily, but with every open(), and thus leaked.
* Replaced static semaphore by a mutex.
* Reordered includes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 22:18:58 +00:00
Michael Lotz
b30304acc8 * Add a DumpFontList test that dumps all families and styles with most BFont
infos (should all be defaults expect for a few).

This shows that with our default installation there are quite a few "condensed"
styles and also an "extra light" variation. The condensed ones should probably
get their own face flag. The "extra light" and other unhandled styles should
probably not be classified as a B_REGULAR_FACE as this could lead applications
to use them in a wrong way yielding unexpected results (i.e. firefox that
picks up the "extra light" style for it's interface font).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 20:35:46 +00:00
Ingo Weinhold
fe8878faa4 Implemented unmapping of partial areas (mmap()/munmap()). Review
welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 14:00:15 +00:00
Axel Dörfler
a411c76cd6 * Added pthread_attr_setscope(), and pthread_attr_getscope(). We only support
PTHREAD_SCOPE_SYSTEM which makes the implementation rather simple.
* This closed ticket #2242.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 11:24:40 +00:00
François Revol
74be35c78b Some more funny sysconf()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 01:38:05 +00:00
François Revol
3a17a548da - factored out [f]pathconf().
- *pathconf() now uses statvfs and fs_info data when appropriate. It should also check for file type though, some only apply to directory or others.
- added confstr(_CS_PATH) with a sensible default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 00:33:08 +00:00
François Revol
15ebab7616 *pathconf() need to call statvfs() to be more correct, but the kernel doesn't have it. Remove conf.c for now, it's likely not needed anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-23 00:11:07 +00:00
François Revol
ca974ded95 Some more [f]pathconf() names, not yet handled. filesizebits returns 64 though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 23:22:26 +00:00
François Revol
4f20b083aa Error in *conf() must set errno.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 23:04:11 +00:00
Michael Lotz
2d80d1b5a7 Cleanup a small leftover.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 22:08:20 +00:00
Ingo Weinhold
0f448d21e5 * Added vm_page_write_modified_page_range(), which is similar to
vm_page_write_modified_pages(), save that it only writes pages in the
  given range.
* Added vm_page_schedule_write_page_range() which schedules all modified
  pages in the given cache's range for writing by the page writer.
* Added _kern_sync_memory() syscall and the msync() POSIX function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 21:51:12 +00:00
François Revol
05ffb70e8f Add compiler version to AboutSystem so newbs can identify if an image is built with gcc4 or gcc2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 21:00:11 +00:00
Karsten Heimrich
fc0c84e771 * use the HVIF icon for the default printer folder, this will fix the black
rect arround the folder icon after setting the default printer on Haiku...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:38:14 +00:00
Karsten Heimrich
c749605ff1 * respect the users choise and don't show the printer panel if he does not wan't to setup a printer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:23:50 +00:00
Jérôme Duval
905b181d73 always clear resume interrupts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 20:11:36 +00:00
Michael Lotz
77cc55629c Add missing api_version to usb_ecm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 18:46:06 +00:00
Michael Lotz
5a1f43f8f0 Unconditionally report initialization success for OHCI too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 17:09:15 +00:00
Michael Lotz
c1990557b8 * Use a lazily initialized notification sem for all SendRequest() calls.
* Also use member variables to transport the status information from the
  callback instead of allocating a dedicated structure each time.
* Remove the now unused transfer_result_data struct.

This should bring down some overhead otherwise involved with sending requests
over control pipes. As this is heavily used in updating for example the hub
status (also on roothubs), this change should make the polling loop a lot
cheaper. Note that this makes SendRequest() non-thread safe, but as it is a
synchronous function (as opposed to QueueRequest) and since the underlying
architecture is not thread safe either this shouldn't be a problem (drivers
doing a SendRequest from two different threads would have failed previously
anyway). A benaphore or mutex could be employed to fix that if the need really
arises.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 16:40:33 +00:00
François Revol
6524effd4f Fix style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 16:13:09 +00:00
Axel Dörfler
403bfdda6c * The floating point output now correctly honours eventual sign flags,
and actually shows the sign (before, it would just absorb it).
* On calling floating() from vsnprintf(), the order of the "fieldWidth", and
  "flags" parameters were mixed, causing some strange output.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 15:38:09 +00:00
Axel Dörfler
15173df4e9 Last patch of the vm86 patch series from Jan Klötzke - thanks!:
* The new function vm86_do_int(struct vm86_state *state, uint8 vec) provides a
  facility to call BIOS interupt handlers. The function must only be called from
  a user thread context because the lower 1MB of the address space is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 13:54:28 +00:00
Axel Dörfler
7da0a81c0e Patch by Jan Klötzke (with additional TODO comments):
* Add a "fault_callback" to the thread structure which is called when a
  unhandled page fault happens in user space. A SIGSEGV will only be sent
  if the callback returns "true".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 12:33:30 +00:00
Axel Dörfler
ec09e0a89d Patch by Jan Klötzke:
* For vm86 mode the kernel stack top is adjusted -> do not rely on the
  kernel_stack_base + KERNEL_STACK_SIZE calculation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 12:02:30 +00:00
Axel Dörfler
bb107c4e29 Patch by Jan Klötzke:
* In vm86 mode CS will have arbitrary values so we check for both USER_CODE_SEG
  and the VM flag in EFLAGS. This is also done when entering interrupt gates.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:59:47 +00:00
Axel Dörfler
a71e7c8d43 Patch by Jan Klötzke:
* The IO permission bitmap is always checked for virtual 8086 mode tasks.
  Make sure it is invalid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:44:42 +00:00
Axel Dörfler
b8caf749bf * _user_cpu_enabled() accidently returned an error code instead of "false".
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:38:00 +00:00
Axel Dörfler
44431460dd Daemons are now spawned with "new", and thus they should be sent back using
"delete", not free().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:37:20 +00:00
Axel Dörfler
88f4305da5 * Cleanup. Not sure where this change originated from, but I believe it was a
patch by Vasilis Kaoutsis. I may have cleaned up the file a bit, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:34:45 +00:00
Axel Dörfler
c25cbc530f * Applied a patch by James Woodcock that fixes the pcap_platform_finddevs()
function to use pcap_add_if() instead of maintaining that list manually.
  This also seem to have caused problems with this functionality in case the
  loop device came first. Thanks!
* Some changes to that patch by myself: removed comment about pseudo device,
  as Haiku doesn't have that, and probably will never get it either. Moved
  declaration of "flags" to where it belongs.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 07:49:54 +00:00
Ingo Weinhold
d129070196 Release the fork lock when _kern_fork() failed or otherwise we'll
deadlock when trying the next fork().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 23:13:27 +00:00
François Revol
fe8f40adef Fix gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 22:48:29 +00:00
Marcus Overhagen
4738637486 The AHCI controller doesn't natively support ATAPI commands.
Instead, one needs to execute the ATA command 0xa0 (PACKET) using
a normal ATA PIO FIS and in addition fill the SCSI CDB into the ACMD
space to transfer the ATAPI PACKET command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 22:14:39 +00:00
Oliver Ruiz Dorantes
fd585f3c8b Implement/stub the mandatory parent methods from the BluetoothDevice Class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 21:55:30 +00:00
François Revol
dfd39d8b12 Fix "may be uninitialized" warnings. Not sure we want black there though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 21:45:52 +00:00
Jérôme Duval
dd07c0feb8 disable channels before installing the handler
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 20:52:59 +00:00
Jérôme Duval
d68d2bb1da fix ppc boot build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 20:48:58 +00:00
Jérôme Duval
269dbbdc5c fix ppc libroot build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 20:45:09 +00:00
Jérôme Duval
9727e26555 revert my changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 18:49:52 +00:00
Ingo Weinhold
3021393e36 Let's pretend we support POSIX threads.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 00:03:09 +00:00
François Revol
867bc16149 It should be eieio...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 21:49:25 +00:00
Marcus Overhagen
fd735f9bb0 More preparation for sending ATAPI PACKET commands (pass through of SCSI commands).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 21:48:18 +00:00
Axel Dörfler
35db13ea5a * Replaced the old s3savage driver with the new s3 driver, both written by
Gerald Zajac. Thanks a lot!
* Also put it on the image by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 21:09:49 +00:00
Ingo Weinhold
a8af2b6dda Some work on pthreads:
* Made the pthread_cond_t internals public. This is necessary to support
  process shared condition variables. Fixed initializer macro.
* Made the pthread_rwlockattr_t structure opaque.
* pthread_t is no longer typedef'ed to int. It's the pointer to the
  internal _pthread_thread structure.
* Removed __get_pthread(). pthread_self() can be used instead.
* No longer tunnel the pthread exit value through Haiku's thread exit
  value. We do have a separate field in the _pthread_thread structure
  for it, now.
* Handle detaching of threads correctly.
* pthread_rwlockattr_{g,s}etpshared() use the
  PTHREAD_PROCESS_{SHARED,PRIVATE} constants, now.
* Commented out yet unsupported structures (barriers, spinlocks).
* Rebuilt APR optional package. The pthread changes weren't binary
  compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:43:28 +00:00
Marcus Overhagen
c940faf16a disable "identify device" debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:40:02 +00:00
Karsten Heimrich
75ef87aeb5 * make printing for child views working, noticed while trying to print
from Scooby, it would draw all child views on top of each other...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:39:47 +00:00
Marcus Overhagen
6e251c6604 moved tracing into it's own header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:37:44 +00:00
Michael Lotz
307fe93f85 * Disable the root hub change interrupt when it gets triggered. As the change
status stays on until the port is reset, this causes the interrupt to be
  constantly retriggered on some controllers.
* Added TODO that we need to reenable it once we want to take advantage of
  status change notifications instead of polling. It should be reenabled when
  clearing roothub status changes in ClearPortFeature().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:37:18 +00:00
Marcus Overhagen
17321b91fb move kernel tracing to separate file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:31:09 +00:00
Marcus Overhagen
5d92f82a94 Begin ATAPI support. The scsi_cd driver already tries opening the device.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:30:06 +00:00
Axel Dörfler
705263f5b3 * Some preparations for the new driver architecture: added FindCapability(),
and {Read|Write}Config() that get a PCIDev structure, added a FindDevice()
  method.
* Made sPCI a global gPCI, since the new PCI root/device modules will be using
  it directly.
* Moved the functionality of pci_find_capability() into a new
  PCI::FindCapability() method.
* Removed the redundant "Pci" from PCI::{Read|Write}PciConfig(), and
  GetNthPciInfo().
* Added PCI::_NumFunctions() that returns the number of functions instead of
  doing it manually every time.
* Tried to honour the 80 character limit, as well as other coding style things
  a bit more.
* Added '_' prefix for private method names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 17:53:54 +00:00
Jérôme Duval
0f0fba6373 wait for codec reset before attaching the codec
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 17:07:50 +00:00
Axel Dörfler
1a19981411 * If we don't add a buffer because of FLAG_NO_RECEIVE, we still have to
maintain our fReceiveNext member, or else the other endpoint never gets its
  data acknowledged. This fixes the ssl_closure test of the neon test suite,
  all tests finally go through.
* Use is_writable() in SendData() instead of checking all the states manually.
* Also bail out when the endpoint stops being writable when we were waiting
  for it to become writable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 10:15:14 +00:00
Michael Lotz
9cc4091e35 Enable interrupts only after installing the interrupt handler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 07:24:24 +00:00
Ingo Weinhold
0a89fae916 wait_for_child() does now wait for the main thread of a dead child to be
gone. Fixes bug #1639.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 23:21:58 +00:00
Ingo Weinhold
4e9ac4d14e POSIX test suite related changes by Vasilis Kaoutsis:
* made the output easier to observe
* added the sigsuspend_6-1 test to the package
* made the fork_3-1 test return when it fails
* added output to the pthread_once tests
* other minor cosmetic changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 23:03:47 +00:00
Jérôme Duval
6ca824a7aa wait on codec power up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 21:42:44 +00:00
Michael Lotz
5b03912b5f * Correct removal of failed transfers by applying the address mask. As the head
pointer also contains the toggle carry and the halt bit (which was obviously
  always set as the endpoint had an error) the address comparison failed and
  the head was dead in the water with all further transfers timing out until
  a subsequet cancel cleaned the mess up again.
* Add the OHCI host controller driver to the image as it should now be fully
  functional except for isochronous transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 20:41:58 +00:00
Axel Dörfler
30a396ab42 * Made the endpoint manager wait on bind() if the existing connection is
local, and is about to close.
* This fixes several race conditions with the neon test suite that relied
  on TCP sockets being gone after close, and their port being available again
  (note, that is not what the TCP spec says, anyway, but it makes sense to
  do so, since we already removed the time wait state for local connections).
* The endpoint manager is now using a mutex instead of a semaphore.
* TCPEndpoint::_Close() now notifies the senders/receivers instead of
  _HandleReset().
* Besides ssl_closure(), all tests of the neon test suite seem to pass now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 18:27:10 +00:00
Jérôme Duval
8eadf4d51f patch from Michael Weirauch: cast before shifting vendor id. thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 18:07:51 +00:00
Jérôme Duval
127da0271b fix the stereo enhancement list
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 17:20:00 +00:00
Axel Dörfler
b30e56f287 Applied patch by Marco Minutoli that adds the short name to nfs, and userlandfs.
Please note, though, that both of these file systems currently don't compile and
are not part of the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 12:43:45 +00:00
Ingo Weinhold
89d327d66e Added missing spwd::sp_lstchg field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 02:16:12 +00:00
Rene Gollent
087592136a Moved scroll implementation from ScrollBy into ScrollTo and made ScrollBy simply wrap a call to the former. This
guarantees that the virtual hook is called in all cases, and fixes bugs 1252 and 1838.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 00:16:49 +00:00
Michael Lotz
a69e04b96e * Implement removal of failed transfers. The head pointer will be moved past
the failed transfer if the transfer in question is found to be the offending
  one. Probably not quite enough and still untested.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 00:04:08 +00:00
Marcus Overhagen
9cb5c9bf8f Fix the HI32 macro. This fixes bug #2021.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 23:31:47 +00:00
Ingo Weinhold
1fab7b919f Add a newline to the syslog message, if it was missing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 23:06:30 +00:00
Michael Lotz
519fbf77d3 * Make the maximum port count a define and set it to 16. OHCI officially
supports up to 15 ports and QEMUs OHCI emulation uses a port count of 10
  for example.
* Update the hub code to remove the hardcoded 8 port limits.
* Some other code to enumerate the USB structure I had laying around
  (available internally only, might be added as a public API some time).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 23:04:06 +00:00
Michael Lotz
a5a728361c * Build the interrupt tree the same (imperfect) way as in EHCI to conserve
on resources but still satisfy the scheduling policy. This works well, but
  effectifly limits the bandwidth available as the interrupts aren't spread
  across different frames.
* Implement finding the interrupt endpoint head for a certain interval.
* Deactivate endpoints that are going away until removing them is implemented.
* Allow short packets for all data phases.
* Disable tracing by default.

There you go, interrupt transfers should work as well. Should enable mice,
keyboards, hubs and other devices that use interrupt pipes. Note that it's
still easily possible that a single failed request will hang an endpoint and
prevent a device from working.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 22:57:17 +00:00
Marcus Overhagen
11a1e0e580 Trace address of prd table.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 22:42:04 +00:00
Marcus Overhagen
ce45f42218 nicer formatting of the output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:59:32 +00:00
Marcus Overhagen
694c3b75f4 fix bridge control register size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:21:39 +00:00
Marcus Overhagen
63f68729a8 Configure all PCI-PCI bridges to report errors rather than masquerade
them, which would lead to undetected data corruption.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:17:29 +00:00
Michael Lotz
016ce5dd54 * Handle the data == first and last == first case as this can occure for
single td bulk transfers.
* Implement SubmitTransfer() for bulk transfers (interrupts will use the exact
  same code path, but as their endpoints aren't yet setup, interrupt transfers
  won't work).
* Handle the cancel case when finishing transfers. The descriptors of the
  canceled transfers cannot be accessed by the controller so they can be freed.

Bulk transfers should work now, so devices only using control and bulk transfers
should too (anything using usb_disk for example). Note though that a transfer
error will cause the whole thing to fail miserably as the error case is not
yet handled correctly (failed descriptors aren't removed from the endpoint).
Therefore I suggest not testing with the memory stick with that important
presentation you haven't stored anywhere else...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 21:15:07 +00:00
Michael Lotz
408a8ff36a * Completely rework how transfer finishing is implemented. It is now using
pretty much the same strategy as UHCI. This does not leverage the done queue
  the hardware provides us, but as it saves a lot of other overhead and allows
  the structures to be smaller I think it is overall worth it.
* Removed now unnecessary stuff from the transfer descriptor struct.
* Directly acknowledge the done head interrupt as we do not use it either.
* Activate control endpoints by removing the skip bit when a transfer is scheduled.
* Correct the way the first descriptor is determined (the current tail becomes
  the first descriptor while the current first descriptor becomes the tail).
* Remove the head_logical_descriptor field from the endpoint structure, as this
  would simply get out of sync with the first td with no real way of updating.
* Stub out RemoveTransferFromEndpoint() as this needs reworking.
* Correct CreateDescriptorChain() signature and implement the method.
* Add ReadDescriptorChain() and ReadActualLength() to process finished transfers.
* Prepare for actual data transfers by renaming/regrouping transfer types.
* Fully clear out the new tail when switching (for the sake of it)
* Add some helpers and definitions to the hardware header.
* Add debugging facilities.

With all this transfers can now actually be scheduled and they are processed
when done. This brings control transfers to a usable state so setting the
device address and reading out/setting the configuration works. That means you
can now view your device using usb_dev_info, but since any other transfer type
besides control transfers isn't implemented yet the device will most probably
not yet do anything useful.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 19:34:25 +00:00
Axel Dörfler
3aecf8aa00 Some cleanup I made before the integration.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 14:22:56 +00:00
Axel Dörfler
7504dbf51f Fixed build under non-BeOS platforms.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 14:09:58 +00:00
Michael Lotz
87fe2972ec Correctly clear an endpoint on cancel. Adjusted some comments/output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 13:07:54 +00:00
Michael Lotz
0439bcbbbb Use a dedicated endpoint lock for endpoint manipulation. Fixes the guaranteed
deadlock with the BusManager on setup of the default pipes (for addressing).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 12:34:40 +00:00
Michael Lotz
a9d7e87d40 * Implement "tail switching" so that a new transfer descriptor chain can be
appended to an endpoint descriptor without locking/disabling the endpoint.
* Correct the direction of the data phase of a control transfer.
* Some minor cleanup.

Control requests without data phase (set address for example) might actually
work now, but this is still untested.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 12:16:34 +00:00
Michael Lotz
aeae544e7d * Complete the roothub get/set/clear port feature functions
* Reorder to match the usual order of the states/commands
* Fix some debug output and make it more informative

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 10:27:31 +00:00
Michael Lotz
812dd254dc Acknowledge OHCI interrupts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 09:36:06 +00:00
Michael Lotz
20bbb1bf28 * Make the operational register memory a uint8 * instead of a uint32 * so the
driver has at least a chance of working (it previously always used wrong
  offsets for register access).
* Remove the hash approach for now (I'm going to explore a few other ways of
  doing that first).
* Reorder some stuff and check for errors in some more places.
* More cleanup (mostly whitespace again).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 09:23:29 +00:00
Ingo Weinhold
adfd232086 Allow building zip as build tool. Tested under Linux only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:29:01 +00:00
Ingo Weinhold
1cc5173533 * Use 0 instead of the unportable EOK.
* If not built for BeOS or Haiku, we use _kern_open() instead of open(),
  so we get attribute emulation support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:27:38 +00:00
Ingo Weinhold
61b37794a4 Added explicit support for loading executables compiled with the
respectively other gcc version on a Haiku compiled with gcc 2 or gcc 4.
The libraries for such an executable are first searched in "gcc4"
respectively "gcc2" subdirectories of the standard search path
directories. If not found there, we try again with the standard paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:25:17 +00:00
Ingo Weinhold
b3d6c12dbf * Fixed kernel tracing for gcc 4. The ABI changed in a way that isn't
compatible with what our code assumed (pointers to objects of
  TraceEntry and its POD base class trace_entry aren't identical
  anymore).
* Added optional stack traces for ktrace_printf() output in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 18:59:19 +00:00
Ingo Weinhold
ec1f43f304 axeld + bonefish:
* Small style changes.
* Currently ifdef'ed out potentially correct changes, that break Neon
  tests which otherwise succeed. Axel will investigate this further.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 18:48:24 +00:00
Stephan Aßmus
91af9113d6 The compiler warns, and it is correct - DPMSState() and DPMSCapabilities
are supposed to return flags, and not a status_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 16:50:29 +00:00
Michael Lotz
0e2a404fc9 * Sync roothub code between UHCI and EHCI (will be reworked to a common one)
* Minor whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 12:41:56 +00:00
Michael Lotz
fd1e6f2b37 * Getting familiar with the existing code
* Cleanup (whitespace, nameing, code style)
* Move around methods so they match the header order
* Fix some obvious stuff
* Initialize all members
* Sync roothub code (this will be reworked to a common roothub)
* Only minor functional changes (to the worse for now)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 12:39:46 +00:00
Ingo Weinhold
25d0a0841f axeld + bonefish:
_WaitForEstablished() must also accept states implying that the state
has been established at some point. Fixes bug #2172.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 11:56:25 +00:00
Ingo Weinhold
fbe0c27a94 axeld + bonefish:
Changed condition variables so that it is allowed to block (e.g. lock
mutexes etc.) between Add() and Wait(). This fixes #2059, since the
block writer used them this way and could thusly fail to wait for a
condition variable, causing a temporary stack object to be used past its
lifetime.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 10:21:37 +00:00
Marcus Overhagen
f5831806ff Added a "pcistatus" command to KDL that prints and clears the PCI device status register.
Also clear the status register during init.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 22:17:21 +00:00
Stephan Aßmus
94a6647354 Improved the coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 08:50:45 +00:00
Stephan Aßmus
8e48eb6c32 Base the visibility decision for a shape (Level of Detail) on the global
transform only, not combined with the shapes own scale, since that is likely
not what the user intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 08:47:38 +00:00
David McPaul
cca73f2ab9 display codec id when codec not available\nSome layout changes too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 02:30:50 +00:00
David McPaul
fa9257456d set user data to contain codec id
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 02:29:10 +00:00
Jérôme Duval
4c1f76cbf4 Patch from Shinta: don't send B_INPUT_METHOD_STOPPED when IM is not active
fix bug #2220


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 23:37:34 +00:00
Jérôme Duval
40bf8fc2d4 a waiting thread can wait on something else than a sem
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 23:25:17 +00:00
Jérôme Duval
45f03296cf fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 22:07:42 +00:00
Ingo Weinhold
5947a3be5a * Fixed read() on a read-shutdown socket. It must never wait.
* Added TODO regarding read/write shutdown.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 21:05:59 +00:00
Ingo Weinhold
8a1852a447 * Corrected the read() behavior on a read-shutdown socket. All the data
that arrived before the shutdown can still be read.
* Debug some more returns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 20:50:42 +00:00
Axel Dörfler
9f925127db This should be the last commit to this one, I'll next work on integrating it
into the kernel:
* Added device_removed() function to the device level as well.
* A device_node now also tracks its published devices.
* Made the driver API more consistent with the device API; instead of the node,
  they now get the driverCookie (so they now need to store the node themselves,
  the driver cookie could be retrieved via the node).
  Alternatively, one could either pass both, or have something similar to what
  Ingo did for the file systems, ie. pass a structure that contains both
  elements. Suggestions welcome.
* Implemented device node replacement when a better driver becomes available:
  the new node (and its devices) is already published even though the old device
  is still in use. The new device is B_BUSY until the old one is closed.
* Implemented an update cycle counter: this will prevent a device node from
  being probed again, if there is no new driver since the last time; eventually
  this will be moved into devfs, though.
* Driver removal and replacement now works as expected in all tested scenarios
  (device removed, better driver installed, both with and without open device).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 15:08:33 +00:00
Stephan Aßmus
9aa2788e97 Another patch by Vasilis Kaoutsis:
* Use find_directory() for the hash for preloaded modules. I am not sure this
  patch is needed, since it only concerns the hash. Please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:28:08 +00:00
Michael Lotz
f940ec3d9c Fix the GCC4 build the other way around. Remove the unnecessary forward
declarations and make the functions static again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:27:20 +00:00
Stephan Aßmus
7c61d84fcd Patch by Vasilis Kaoutsis:
* Renamed main.c to main.cpp
* Use find_directory() to construct the Bootscript path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:10:12 +00:00
Stephan Aßmus
ea26d9f0c2 Honour 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:09:12 +00:00
Stephan Aßmus
5dc81824d6 Another patch by Vasilis Kaoutsis:
Use find_directory() to find the runtime_loader when starting teams.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 11:55:09 +00:00
Maurice Kalinowski
8f65f279f2 gcc4 build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:46:25 +00:00
Maurice Kalinowski
20993ed92e gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:38:24 +00:00
Stephan Aßmus
2764548ef3 Use find_directory() in the devfs. Based on patch by Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 10:06:58 +00:00
Rene Gollent
9194faef55 Cleanup as suggested by Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 23:03:31 +00:00
Rene Gollent
9603eba5f2 Build fix from Ingo's header reorganization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 21:37:18 +00:00
Stephan Aßmus
01c52d4f9c Print the error message to stdout, since that is where the
message->PrintToStream() output goes. Thanks, Jerome, for the suggestion!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:33:53 +00:00
Stephan Aßmus
1781abf702 Print and error and the message in case _ArgvReceived() fails to parse the
message correctly, it is a bit strange why the message should not follow
protocol.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:12:57 +00:00
Axel Dörfler
7a6818d3fa Work in progress:
* added [un]publish_device() calls to the device manager.
* added a very basic devfs emulation to the playground to be able to test how
  the manager reacts to opened devices.
* renamed *_device() functions to *_node() in the device manager API.
* made B_DEVICE_FIND_CHILD_FLAGS a generic flags field, and renamed it to
  B_DEVICE_FLAGS.
* added support for keeping a driver loaded as long as its device is available.
* implemented get_next_child_node().
* added test for device removal, and implemented unregister_node() for this.
* fixed some bugs in the device node reference/initialization count maintenance.
* moved more code from register_node() to device_node::Register().
* initialize the device_node::fFlags member to the value of B_DEVICE_FLAGS, and
  have additional private flags.
* renamed UninitUnusedChildren() to UninitUnusedDriver(), and fixed this
  function by adding the new flag NODE_FLAG_REGISTER_INITIALIZED.
* Now remembers the support when a driver is registered - this will be used
  later to be able to compare with a new driver without having to call
  supports_device() again.
* Removed NODE_FLAG_REMOVE_ON_UNINIT again, as that was pretty stupid - there
  is reference counting for a reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:05:40 +00:00
Jérôme Duval
c27f3926a0 * updated ac97 code with the one from Marcus' ich driver
* merged existing quirks (reversed amp enable and ad1981b)
testing is welcome!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 20:03:29 +00:00
Axel Dörfler
32f1d45867 * Reworked James Woodcock/stippi's patch a bit: since the remaining entries
are NULL pointers anyway, we just adjust argc.
* Made argv processing more safe, it will now check if the allocation of the
  argv array succeeded in the first place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:57:12 +00:00
Stephan Aßmus
9765d74881 Just spotted a mistake in my previous commit... and while I am at it, I can
properly credit James Woodcock, who debugged this problem and whom I forgot
to mention in my previous commit. Sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:51:36 +00:00
Stephan Aßmus
e5aa9e13f4 If an error happens during extraction of the argument vectors in
_ArgvReceived(), the array elements still need to be set to NULL otherwise
the function will free() random pointers at the end.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 19:44:47 +00:00
Axel Dörfler
707cdd3719 Added Christian Fasshauer, and Marco Minutoli to the list of contributors.
Shinta, if you can give me your full name, I would like to add you too :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 16:48:03 +00:00
Stephan Aßmus
7557d13189 Applied patch by Marco Minutoli:
Added a new command line utility "mkfs" which can initialize a given volume
with a file system by it's short name via the new Disk Device API.
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 15:48:41 +00:00
Stephan Aßmus
fe76020396 GetDiskSystem() is supposed to find the system by name, it should not influence
the internal enumaration for GetNextDiskSystem(). The compiler spotted that
one actually... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 15:47:22 +00:00
Ingo Weinhold
07ddcd64cf * Renamed libnetapi to libbnetapi. Create a symlink in the image.
* Extended R5 compatibility check to also consider calls from
  libbnetapi.
* Fixed incorrect R5 compatibility check in BNetEndpoint constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 13:49:48 +00:00