Commit Graph

24366 Commits

Author SHA1 Message Date
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
Axel Dörfler
4caadfdb36 Removed firewire driver, as it causes several problems on many machines.
See bug #2243, for an example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 07:32:45 +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
François Revol
cc9020e51d Fix completion when DEVROOT contains more than 1 folder, like on linux accounts on ~/devel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 00:42:32 +00:00
François Revol
4af535b0aa A very handy script I use to manage several projects, like haiku, oss, ...
It adds a "dev" function which completes on project names, sources local .profile and uses local .bash_history, as well as other niceties.
See comments on how to use it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 00:27:44 +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
Marcus Overhagen
1eace5fc53 fixed typo again ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:59:14 +00:00
Marcus Overhagen
be121a1c53 fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 20:57:49 +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
2b9cc6d877 Typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-18 00:01:17 +00:00
Ingo Weinhold
9b0dd52858 Support for adding libraries compiled with the alternative gcc (2 vs.
4). One has to have a (fully configured) "generated" directory for the
alternative gcc and specify it using the new option
"--alternative-gcc-output-dir" when configuring the main build.
Additionally the build variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS has to be
set to "1".

If that has been done, when building the image a sub-jam is invoked that
generates the alternative libs and zips them. The main-jam unzips them
into the correct directory in the image. Note that the JAM build
variable has to be set when using a jam executable not invoked by "jam".

Tested with gcc 2 NetPositive, Pe, and FireFox under gcc 4 Haiku, and
with a few of the standard gcc 4 Haiku apps under gcc 2 Haiku. Seems to
work fine so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:47:39 +00:00
Ingo Weinhold
3c504a317e Added rules F{Files,Symlinks}In{Container,HaikuImage}Directory returning
the targets/symlinks added to a container/Haiku image directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:31:04 +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