Commit Graph

24688 Commits

Author SHA1 Message Date
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
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
Rene Gollent
a93840a2f4 Add gcc4-compatible Vision optional package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-16 22:31:35 +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
Ingo Weinhold
049dbc4652 Added APR-util optional package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 20:47: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
da2a1fefe4 Patch by Vasilis Kaoutsis: Fixed typo in comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-15 12:08:13 +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