Commit Graph

59847 Commits

Author SHA1 Message Date
Alexander von Gluck IV
0e80d80a55 libroot/riscv64: Fix misplaced ppc 2019-03-18 08:18:55 -05:00
Augustin Cavalier
660dea3f6a net_server: Clean up authentication handling code.
Even if we find an authentication string, make sure it's not empty before
trying to use it; and use the other one if possible.
2019-03-17 15:34:04 -04:00
Augustin Cavalier
fef60ce6cc XHCI: Reworking locking behavior and check for lock failures.
Should fix #14959.
2019-03-17 15:33:17 -04:00
sushilhub
999c215e76 src/preferences: fixes break statement
* added break statement

Change-Id: I69125bd5af11e8a94b07a50601e6cebbace372d5
Reviewed-on: https://review.haiku-os.org/c/1298
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:29:02 +00:00
sushilhub
817902a223 src/preferences/bluetooth: fixes missing break statement
* Added break statement

Change-Id: I9ebb4b620db9f8ad1fbf919322425356384011b1
Reviewed-on: https://review.haiku-os.org/c/1297
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:29:02 +00:00
Lee Mon
d04d9b2519 BugFix 2: fix errors found by cppcheck
Change-Id: I262af4dcf3ad1dca9d7e7d88838ae90323303c1d
Reviewed-on: https://review.haiku-os.org/c/1294
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-16 17:28:06 +00:00
Lee Mon
446dc38f89 BugFix: fix some errors found by cppcheck
Fix coding style violations and minor errors (race condition in h2generic.cpp).

Change-Id: Iec58f2f431de79320579704ac449475f18deb731
Reviewed-on: https://review.haiku-os.org/c/1186
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-16 17:26:25 +00:00
Augustin Cavalier
b322554630 kernel: Check for uninitialized locks in mutex_trylock().
We already do this in mutex_lock() and variants.
2019-03-15 10:59:48 -04:00
François Revol
88255e0890 BFS: Add support for building big-endian BFS
I tried to use the feature stuff to relocate objects but didn't managed
to get it to work, having another subdir seems to be the simplest
solution.

I managed to mount a clone of my BeBox' drive, but it KDLed shortly when mouting
read-write.

Change-Id: Ia4f126673e553e4f3e524a40218e6c623527b96d
Reviewed-on: https://review.haiku-os.org/c/645
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-13 19:59:34 +00:00
Augustin Cavalier
d3f27239b1 bus: Remove IDE.h and change ATA bus manager paths. 2019-03-13 11:34:13 -04:00
Augustin Cavalier
19151d0134 usb_audio: Clean up and fix device management code.
* Actually use the global mutex instead of creating useless MutexLockers.
 * Don't delete the device object on _free(), then it can't be opened again,
   which we want to be possible. Matches the behavior of other audio drivers.
 * Clean up device detection code to better match other drivers.

At least under XHCI, multi_audio_test throws a variety of errors and then
crashes while attempting to use this driver. But following implementing
CancelQueuedTransfers, the system no longer KDLs after that. Progress!
2019-03-13 00:34:58 -04:00
Augustin Cavalier
d592cab849 usb_webcam: We won't be building for Zeta. 2019-03-13 00:33:47 -04:00
Augustin Cavalier
4d03f44874 multi_audio_test: Fix the build. 2019-03-13 00:33:27 -04:00
Augustin Cavalier
dda9c02789 XHCI: Use MutexLocker in HandleTransferComplete. 2019-03-13 00:32:25 -04:00
Augustin Cavalier
1d79fe616f XHCI: Implement CancelQueuedTransfers and RemoveEndpointForPipe.
Seems to work OK on my hardware now. Possibly helps with device unplug/replug
issues; though that worked on my hardware before this change, too. This is
now more correct at least.
2019-03-13 00:09:39 -04:00
François Revol
d51c92f872 Actually add AutoRaise to the regular image
Change-Id: Ied73e217ba91531c8b149fc5c23fd95bca53e732
2019-03-11 13:37:02 +01:00
François Revol
dc2d41d7e6 Add AutoRaise to the regular image
It now works reasonably well to be of some use.

Change-Id: I2e031e4d4a7e395d4c597014b73e399c65d15041
2019-03-11 04:33:29 +01:00
François Revol
0305dc14b4 AutoRaise: Make it actually working again
It seems we don't sort the window token list anymore, so it only worked
in very few cases.
2019-03-11 03:17:15 +01:00
François Revol
46308e28e5 AutoRaise: Just add itself to Deskbar on run
It's simpler, nobody runs things in Terminal, right?
2019-03-11 03:16:39 +01:00
PulkoMandy
f42cda29e8 sparc: get libroot to build
Add various stubs to fix undefined references. No implementation for
anything yet.

Change-Id: I2d398bc2369d099e3a35f0713058d6a5edc6801d
Reviewed-on: https://review.haiku-os.org/c/1138
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
PulkoMandy
803a4704e8 sparc: soft-float support library
No sparc implementation actually has "long double" implemented in
hardware. The instructions are defined in the spec, but they are caught
and emulated by traps.

gcc even bypasses the traps and calls the support functions directly.

Import the required functions from FreeBSD (they implement the
operations as specified in the sparc ABI) and link them into the kernel,
for now (they will also need to be in libroot).

Change-Id: Ifc21faa29fffa4bf5d3941468b62d81229a44971
Reviewed-on: https://review.haiku-os.org/c/1137
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
PulkoMandy
1c297254e5 sparc: cleanup netresolv
It's trying to set a field that doesn't exist.

Change-Id: Ic45b966585486d5da07ee8dace35160dac9355ed
Reviewed-on: https://review.haiku-os.org/c/1106
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
PulkoMandy
df19aba5e9 debug_commands: align user_data to 64bits
It is cast to a struct with 64bit fields, so it should be aligned
properly.

Change-Id: I513cfba4d8fc4f4286b13edabc47fbbda3227bf6
Reviewed-on: https://review.haiku-os.org/c/1089
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
PulkoMandy
14ffc38e44 kernel list: use BytePointer
Change-Id: I259cc33ad71cfbabc7f85278287a64a31dcb5e44
Reviewed-on: https://review.haiku-os.org/c/1101
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
Adrien Destugues
810071751d BytePointer: address Axel's post-merge comments
These changes had been on review on Gerrit for a few weeks, why do the
comment come only after they were merged?

Change-Id: I54064973e08b8b4dc0624f4c09c7cafb7f04e437
Reviewed-on: https://review.haiku-os.org/c/1185
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:41:03 +00:00
Adrien Destugues
fb7498fe2e system profiler: revert use of BytePointer.
This went through review way too fast once again. I did warn that these
changes were completely untested, and indeed this one was broken. Be
very careful when pressing the submit button, please!

Change-Id: I6e0230efe94830033f5427451f67fe6ce29a28e6
Reviewed-on: https://review.haiku-os.org/c/1184
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:41:03 +00:00
François Revol
6ff7e25bd0 mime_db: consider recipe files as text/x-source-code
Opening them in StyledEdit isn't handy.

Change-Id: Icbdcbdbace0432cd7c808eb0011186a4310aed79
2019-03-10 18:19:57 +01:00
François Revol
46113563a3 mime_db: Add some more text/x-source-code extensions
Change-Id: Ia0799e2614ebfeb1e1dd86e0cd60dfc2c3cb391a
2019-03-10 18:18:38 +01:00
Augustin Cavalier
7356f1de4b XHCI: Properly handle partially-failed transfers. 2019-03-09 17:53:31 -05:00
Augustin Cavalier
c5c392585c usb_audio: Fixes for SMAP. 2019-03-09 17:50:25 -05:00
Augustin Cavalier
965d4047bb usb_audio: Trim trailing spaces; change device basename to "hmulti/usb". 2019-03-09 16:10:07 -05:00
Augustin Cavalier
e6a55c69fe XHCI: Miscellaneous tweaks and cleanups.
* Check "endpoint == NULL" instead of the ID for this pipe; as
   _InsertEndpointForPipe will have already done the check for us.
 * Store the endpoint's ID (our internal ID) in the structure, and
   then move the doorbell-ring into _LinkDescriptorForPipe. Now all
   variables named "id" are actually that, and not the endpoint number
   (which is "id + 1".)
 * Return actual statuses in NotifyPipeChange, among other tweaks.
 * All things which set the usb_request_data structure also set data,
   so we can just use ReadDescriptor to do copies like normal, simplifying
   the finish-transfers code.

No (major) functional change intended.
2019-03-09 15:21:04 -05:00
Augustin Cavalier
e4487e3e45 screen_savers/Shelf: Fix build in DEBUG mode. 2019-03-09 14:08:27 -05:00
Augustin Cavalier
6aae8d5abb XHCI: Improve tracing in CreateDescriptor. 2019-03-09 13:27:00 -05:00
PulkoMandy
d581bcba52 slab: use BytePointer
Change-Id: I786f720ccd0c1469287a70906d05633218c25ceb
Reviewed-on: https://review.haiku-os.org/c/1100
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
PulkoMandy
995aabb04e MessagingService: use BytePointer
Change-Id: If7890e215180206010a374b8afa9f4cd47325afc
Reviewed-on: https://review.haiku-os.org/c/1099
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
PulkoMandy
5bf19df235 system profiler: use BytePointer
Change-Id: I297edd8aa5f2d8d35af660d557a2c78d68afab97
Reviewed-on: https://review.haiku-os.org/c/1092
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
PulkoMandy
401f42f794 kernel/fs/fd: use BytePointer
Change-Id: I0fcb549d313fe7193d8e1c2b6b0a44ae4b2fcb95
Reviewed-on: https://review.haiku-os.org/c/1090
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
PulkoMandy
1b312d7f0a kernel/elf: use BytePointer
Change-Id: I3a40921854540d78dec025b2a349e3a153f91d55
Reviewed-on: https://review.haiku-os.org/c/1083
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-09 17:09:11 +00:00
PulkoMandy
eea7ceb31d Add BytePointer to help with pointer conversions
This behaves mostly like a pointer, but pointer maths works in bytes,
not the native object size.

It avoids casting to char* and back when doing byte-based pointer math,
making the code easier to read.

Change-Id: I6a8681a398345f0c7d419a2cfe7244d972ffa62f
Reviewed-on: https://review.haiku-os.org/c/1086
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
Augustin Cavalier
c32137f3fd kernel: Tweak some mutex functions.
* Remove code duplication.
 * Make _mutex_trylock work in non-KDEBUG kernels. This should fix
   spurious failures to lock in drivers compiled for KDEBUG kernels
   running under non-KDEBUG kernels.
2019-03-09 12:02:00 -05:00
Jérôme Duval
10baa577a9 hda: wait between set and unset of the GLOBAL_CONTROL_RESET bit.
* the spec requires 521us, 1000us is generally used.
* also only uninit streams, corb and rirb when a codec reset is in progress (seen in zircon).
linux instead clears HDAC_STATE_STATUS.
2019-03-09 16:04:43 +01:00
Augustin Cavalier
3131c13005 XHCI: Implement the debug transfer hooks.
This requires a bit of massaging around the locking code. Probably
we shouldn't be able to do this, and there should be a "mutex_unlock_etc"
for use in interrupt contexts, but at present there is not.

This makes it possible to use XHCI-attached keyboards from within KDL!
2019-03-08 22:06:34 -05:00
Augustin Cavalier
9bdd88ebe3 XHCI: Granularize locking.
This is not so important now (though it is a mild performance improvement
when running transfers during commands), but it will be when the debug
transfer hooks are implemented, as we will need to use these to determine
if it is safe to queue and poll for transfers or not.
2019-03-08 20:40:12 -05:00
Augustin Cavalier
187a2c6ce7 XHCI: Completely overhaul endpoint configuration logic.
The code as it was before was very hard to follow and incorrect in
a number of corner cases, as well as not being very clear about what
the TODOs were.

It now follows the spec much more closely (especially in interval
computation) and contains more details on where it is still lacking.

This probably does not fix much (if anything) as is, but it paves the
way for future isochronous support.
2019-03-08 20:40:12 -05:00
Jérôme Duval
9ba45ef924 Update libroot stubs. 2019-03-08 23:12:05 +01:00
Jérôme Duval
ba56d0a513 pthread: add pthread_getattr_np.
non standard extension, but widely available to obtain attributes for a thread.
also provides an alias for pthread_getattr_np which is the bsd equivalent.

Change-Id: I26ef8245ed2537186f48c8b8bdf3e42b03e70892
Reviewed-on: https://review.haiku-os.org/c/1172
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-08 19:50:45 +00:00
Jérôme Duval
901c3d44b0 pthread: implement pthread_attr_[get|set]stack.
remove pthread_attr_[get|set]stackaddr from unimplemented functions.

Change-Id: I58807e86c75a189a576639ae1b2e4505a63700a5
Reviewed-on: https://review.haiku-os.org/c/1152
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-07 16:55:14 +00:00
Jérôme Duval
29ec639a6d ltrace: implement x86_64 arch specifics.
fix trace build on x86_64

Change-Id: I205bd9eee03efea9e298c2877cc0a6440770caf0
Reviewed-on: https://review.haiku-os.org/c/1148
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-07 02:51:50 +00:00
François Revol
f82b4294d8 urlwrapper: add support for binary plist webloc files
Quite hardcoded but it works.

We only support URLs shorter than 256 bytes as it's the only samples I have.
2019-03-06 04:54:56 +01:00