Commit Graph

64122 Commits

Author SHA1 Message Date
Augustin Cavalier
b5eee5ce22 openbsd_network: Correct return values of m_dup_pkthdr and m_tag_copy_chain.
FreeBSD's versions return 1 on success, OpenBSD's return 0.
Fixes at least some of the packet loss in OpenBSD WiFi drivers.
2022-07-07 16:41:49 -04:00
Augustin Cavalier
d51cccd9a5 Revert "freebsd_network: Adjust callout_reset to drain not stop callouts."
This reverts commit 259f9a76d8.

This does not work with callouts that reschedule themselves, which is
something certain drivers indeed do.
2022-07-07 15:46:47 -04:00
Augustin Cavalier
259f9a76d8 freebsd_network: Adjust callout_reset to drain not stop callouts.
As we are going to modify func/arg, we need to be sure they are not
even executing.
2022-07-07 14:58:02 -04:00
Augustin Cavalier
a73773b24e freebsd_network: Clean up struct callout.
* Remove unused flags field.
 * Rename internal members to have c_ at the beginning, like FreeBSD.
2022-07-07 14:57:23 -04:00
Augustin Cavalier
af11bc7bc7 freebsd_network: Correct time_uptime.
It should be in seconds, not ticks.
2022-07-07 14:56:33 -04:00
Augustin Cavalier
93f2021912 openbsd_network: Fix return values of timeout functions.
As far as I can tell, nothing checks these, so this should not
actually make any kind of difference.

The timeout_set change is also not a functional one, either,
as callout_init with mpsafe=0 uses &Giant also.
2022-07-07 14:44:53 -04:00
Augustin Cavalier
631f505f82 freebsd_network: Fix callout_active checking in callout_stop.
We have to perform the "due" check after checking callout_active,
because due is set to -1 while the callout is actually active.
2022-07-07 14:43:27 -04:00
Augustin Cavalier
fbff149ce2 openbsd_network: Refactor if_input_openbsd to use ml_dequeue.
Should not be any functional change.
2022-07-07 12:46:15 -04:00
Augustin Cavalier
e3056a7eff vesa & framebuffer accelerants: Drop engine hook stubs.
We don't need to provide them after the previous commit.
2022-07-07 11:52:51 -04:00
Augustin Cavalier
2270ca94f1 app_server: Make engine accelerant hooks optional.
We don't need them here, or anywhere else for that matter, to run.
2022-07-07 11:52:00 -04:00
Augustin Cavalier
6489b77dee nvme_disk: Fix build on non-PAE 32-bit architectures. 2022-07-06 20:55:04 -04:00
Augustin Cavalier
50d29435e9 app_server: Mild cleanup to ScreenManager.
The #ifdefs for test mode are now more appropriately located.
2022-07-06 19:53:30 -04:00
Augustin Cavalier
5c3aa92735 app_server: Refactor and improve graphics device iteration.
* Do not open() devices while looping but only open() the one
   we were actually asked to open.

 * Try the VESA or Framebuffer driver even if deviceNumber is something
   other than 1.

 * Start iterating at 0 instead of 1 following loop iteration changes.

Ideally this iteration should occur a completely different way, in order
to properly support multiple graphics cards, but that's a problem for
another day.

Fixes #4303.
2022-07-06 19:52:23 -04:00
Augustin Cavalier
ab8109c152 app_server: Fix build of test_app_server. 2022-07-06 18:10:14 -04:00
Augustin Cavalier
a68b6c2579 app_server: Move DWindowHWInterface and ViewHWInterface to a subdirectory.
AccelerantHWInterface and the Remote engines already did this.
These are not used at all outside of test_app_server, so we do not
need to even compile them in to the regular one.
2022-07-06 17:56:12 -04:00
Augustin Cavalier
40d99076df openbsd_network: Move mbuf_list and mbuf_queue into mbuf-obsd.h. 2022-07-06 17:23:40 -04:00
Augustin Cavalier
0297582112 openbsd_network: Implement two mbuf macros in terms of FreeBSD ones. 2022-07-06 17:07:49 -04:00
Augustin Cavalier
41d93c5ed1 freebsd_network: Do not deinitialize USB if we never initialized it.
Fixes some "mutex not owned" KDLs seen on deinitialization.
2022-07-06 16:03:46 -04:00
Augustin Cavalier
19453ce798 freebsd_network: Unlock taskqueues before final destruction.
This is needed for MTX_SPIN taskqueues.
2022-07-06 16:03:46 -04:00
Máximo Castañeda
ab52604b90 arm syscalls: add explicit dependency
Some syscall headers are generated during the build process, and jam is
not smart enough to add an automatic dependency.

Change-Id: I7c19da7aca9da4a52c4537a5f5c279fdbe24a48a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5435
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 18:03:45 +00:00
Augustin Cavalier
f5eecfe4ea openbsd_network: Remove shadowing variable. 2022-07-06 13:42:43 -04:00
Augustin Cavalier
138d4bbd68 nvme_disk: Refactor 64-bit BAR handling into nvme_pcicfg_get_bar_addr_len.
Then invoke this function in nvme_pcicfg_map_bar instead of duplicating
the logic.
2022-07-06 13:42:43 -04:00
Jim906
5e0c100f78 BFilePanel: use position from FilePanelSettings
* Set a flag if TFilePanel::RestoreState successfully reads the
  FilePanelSettings file.
* Check for this flag in BFilePanel::Show.
* Part of #17374.

Change-Id: I4431c01f9282fe411fa7b30667215bba9249bd96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5433
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-06 16:03:10 +00:00
Augustin Cavalier
d6fedd7fcf Userguide CSS: Fix banner color. 2022-07-06 12:01:20 -04:00
Pascal Abresch
05844f660c Userguide CSS: add dark mode
Change-Id: I94c308ea22a304f061544a28e1490b9c004191d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5329
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 15:49:23 +00:00
Augustin Cavalier
06b68f46f9 kernel/fifo: Add missing check for B_SELECT_READ in Deselect().
This should have been part of 27fda3e46f.
Fixes #17826.
2022-07-06 11:13:00 -04:00
Augustin Cavalier
6fd4a3eea9 XHCI: Set the DIR_IN bit on Status Stages even if there is no data.
The referenced section of the specification gives no indication that
the bit should not be set if there was no data; indeed it indicates
it should always be set.

This brings our behavior here in line with other OSes seem to do.

Change-Id: I86b2eb2a6a5fa3af84fd0941e0a3ec601c7037bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5421
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-04 17:14:45 +00:00
David Karoly
2e0a9b9554 kernel/arm: use generic/user_memory.h
Change-Id: I890bdd7d6f64162416a1a80c7d8280618aaa8fb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5429
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-04 16:43:39 +00:00
David Karoly
1b95b1e857 kernel/arm/int: convert TRACE to new syntax and hush
Change-Id: I8945ad621aee2bc1c8d8852bb1c220936e567d86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5430
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-04 07:00:03 +00:00
Augustin Cavalier
e0a405d765 openbsd_network: Use the new bus_dmamap_sync_etc.
This preserves the semantics of partial syncs. Unfortunately in my
testing it does not seem to improve the packet loss I was seeing...
2022-07-01 23:16:28 -04:00
Augustin Cavalier
b12b802c4d freebsd_network: Add an extended bus_dmamap_sync API for partial syncs.
To preserve proper semantics with the OpenBSD layer, this is needed.
2022-07-01 23:15:07 -04:00
Augustin Cavalier
7ff2f10462 OpenBSD wlan drivers: We cannot back out of initialization at preinit.
Otherwise we get KDLs. Fixes #17811.
2022-07-01 22:09:06 -04:00
Augustin Cavalier
27fda3e46f kernel/fifo: Properly support opening FIFOs in O_RDWR mode.
While pipe() only supports a read end and a write end, named FIFOs
are supposed to allow opening in read/write mode (which, indeed,
is something the Fish shell seems to require.)

The code that checks open_mode in the read/write routines was introduced
all the way back in 2003 (2469f26dfc).
At that time, the VFS did not do open_mode checks on FDs in the
I/O syscalls, so these doubled as permissions checks. Now, however,
the VFS does check that in common_user_io, so we can remove these
entirely and let things behave as they should.

Additionally, there is now also no reason to prevent select()ing
on both events for the same FD independent of open_mode, so
allow that too.

Change-Id: Ib3cba76d18e91b7c00d1695e8d29dd47cae06b79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5427
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-01 18:57:28 +00:00
David Karoly
fe3405c087 kernel/arm: ensure page dir is correctly aligned
Page directory physical address must be aligned on 16K and
it must be mapped to a contiguous physical region.

Change-Id: I6723023c9deaa1c4a1081cf5a984a1766241a532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-01 18:39:30 +00:00
Jérôme Duval
0db74b55dc btrfs: fix SMAP violation, reading inline uncompressed data
should fix for #17061

Change-Id: I5973be6c443e8cf4460c6a3aca7b5378e90d717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5426
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:47:08 +00:00
Jérôme Duval
374a3a07a1 libtracker: don't try to fix permissions on read-only volumes
* instead try to guess the type, find the app, and launch the app with the document refs.
* fix #5783

Change-Id: Icd25a81ff28038fec0494045390edc6271433b07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5425
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:47:08 +00:00
John Scipione
3571cd8a6b StyledEdit: Add comment explaining MakeFocus() loc
... to explain hrev562209 by Jim906 which fixes #17733
StyledEdit: give initial focus to the TextView

No functional change

Change-Id: Id428290d8d3530e5ef9213489625c1968984d323
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5422
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 15:38:41 +00:00
Alexander von Gluck IV
946bd9ab3c HaikuPorts: bump arm build-packages via davidkaroly
* Downgrades icu-67 to 57 given crashing issues
  (riscv64 saw similar issues, cause unknown still)

Change-Id: I7927c7892fa517e5c51f86082b4df5977af92eb2
2022-06-30 07:56:05 -05:00
Jérôme Duval
187f73dbf5 bfs: take in account the block_run allocation group when computing reserved blocks.
after hrev56221, the block bitmaps can span over multiple allocation groups.
Blocks would be allocated in the block bitmaps, especially root indexes (for instance 2.5TB, blocksize 2k).

Change-Id: I35d21d48e84945e5f949a272d530c466ae6506ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5420
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-30 08:25:12 +00:00
Augustin Cavalier
2884a00088 ralinkwifi: Import USB modules.
Not entirely sure if these are working as they were not really tested.
But they don't seem to cause KDLs at least, so the worst that happens
is that the WiFi devices fail to work.
2022-06-29 13:17:15 -04:00
Augustin Cavalier
e410069738 freebsd_network: Implement USB routines needed by Ralink USB modules.
Tested by nephele with a RT2573. The device starts and scans for networks,
but hits some USB errors probably related to buffer sizing which I'm
not quite sure what the cause of could be. More work (by someone who
owns these devices) may be required.
2022-06-29 13:16:13 -04:00
Augustin Cavalier
db4df8fcf5 freebsd_network: Use the real usb_endian.h.
Turns out some FreeBSD drivers use these macros on types other
than the ones declared in this header and expect them to behave
as array accessors, so we really do have to keep the originals.
2022-06-29 13:14:47 -04:00
Augustin Cavalier
00096a9d1f USB: Add default max packet size for SuperSpeed bulk endpoints.
We already had one for High-Speed endpoints, but SuperSpeed endpoints
also have a fixed size, similar to Control endpoints.

May help with some devices failing to configure.
2022-06-29 10:36:36 -04:00
Jim906
5b5da451b3 StyledEdit: give initial focus to the TextView
* Move the existing MakeFocus call to after the window layout is built.
* Also, add calls to Activate so that StyledEdit becomes the active
  window after its find or replace window is closed/hidden, even if
  another application is set to 'always on top.'
* Fixes #17733.

Change-Id: I8380e8ce2760ffa3f3467a618a0d843826e4ac99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5416
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-29 06:44:08 +00:00
David Karoly
84360889a2 ldscripts: remove linker script for Raspberry Pi
This linker script was introduced in commit 5426ff9 in 2012
predating both the EFI and the raw u-boot ARM loader,
at that time it seems that it was intended to be used
as part of a 'raspberrypi_arm' boot platform which does
not exist anymore. So this is not needed anymore.

Change-Id: I530e922807fe6d80f74248f2dc7ed25cdc8bcb1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5419
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 17:10:40 +00:00
Trung Nguyen
908107a15f libs/bsd: implemented dl_iterate_phdr
dl_iterate_phdr now fills the first four fields of
struct dl_phdr_info. The last four fields remain
unimplemented, as it requires help from the
runtime_loader.

Change-Id: Id96a7c7ac05633a71b9fb62c98b3a40f7d4f255b
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2022-06-28 13:07:54 -04:00
Augustin Cavalier
045f7a5f3a headers/bsd: Rewrite link_elf.h.
Include only the APIs we are (shortly) going to actually support.

The other structures and functions declared in this file were
never supported nor used anywhere in Haiku's tree.
2022-06-28 13:07:53 -04:00
Mikael Konradsson
c5702ad4e8 DiskProbe: Clean up old compiler pragmas for BeOS and Dano.
Change-Id: I0c8a4ce6c8d1c8994e2f89a4d35db3ac0ae03117
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 16:48:33 +00:00
Augustin Cavalier
63816858af boot/platform/u-boot: Drop ARM support.
Newer versions of u-boot support EFI natively, which is what we
have been making use of instead.

There may be some use for the "native" u-boot loader still on PowerPC,
but otherwise the EFI support is much more advanced and even in u-boot
supports as or more features than "native" loaders, so there is no
reason to keep this around.
2022-06-28 12:27:06 -04:00
Alexander G. M. Smith
7c09ef1255 FAT: Fix 32 bit gcc2 compile.
You can't initialize struct fields in the declaration in gcc2, but you
can set them up in a constructor.  So made one for struct diri,
and initialize nested sub-structures too.

Change-Id: Ic8b824bc157cca4cdb8c4e41afdca596776c0d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4995
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-06-28 15:40:41 +00:00