From 7be03d1815edb706c647407ade4b90f38241b050 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 20 Mar 2026 08:46:28 +0000 Subject: [PATCH 1/5] add bitflags to the workspace Cargo.toml --- Cargo.toml | 1 + drivers/audio/ihdad/Cargo.toml | 2 +- drivers/audio/sb16d/Cargo.toml | 2 +- drivers/input/usbhidd/Cargo.toml | 2 +- drivers/net/e1000d/Cargo.toml | 2 +- drivers/net/ixgbed/Cargo.toml | 2 +- drivers/net/rtl8139d/Cargo.toml | 2 +- drivers/net/rtl8168d/Cargo.toml | 2 +- drivers/storage/nvmed/Cargo.toml | 2 +- drivers/virtio-core/Cargo.toml | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1199d7a51e..092776fa71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,6 +74,7 @@ exclude = ["bootstrap"] # Remember to also update bootstrap dependencies, those are not in the workspace [workspace.dependencies] anyhow = "1" +bitflags = "2" drm = "0.14.2" drm-sys = "0.8.1" libc = "0.2.181" diff --git a/drivers/audio/ihdad/Cargo.toml b/drivers/audio/ihdad/Cargo.toml index 999e808f13..1f61c71381 100644 --- a/drivers/audio/ihdad/Cargo.toml +++ b/drivers/audio/ihdad/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2021" [dependencies] -bitflags = "2" +bitflags.workspace = true libredox.workspace = true log.workspace = true redox_event.workspace = true diff --git a/drivers/audio/sb16d/Cargo.toml b/drivers/audio/sb16d/Cargo.toml index d4fcf93280..a330a783cf 100644 --- a/drivers/audio/sb16d/Cargo.toml +++ b/drivers/audio/sb16d/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2021" [dependencies] -bitflags = "2" +bitflags.workspace = true common = { path = "../../common" } libredox.workspace = true log.workspace = true diff --git a/drivers/input/usbhidd/Cargo.toml b/drivers/input/usbhidd/Cargo.toml index 32b73dded4..2c0cda1915 100644 --- a/drivers/input/usbhidd/Cargo.toml +++ b/drivers/input/usbhidd/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT" [dependencies] anyhow.workspace = true -bitflags = "2" +bitflags.workspace = true log.workspace = true orbclient.workspace = true redox_syscall.workspace = true diff --git a/drivers/net/e1000d/Cargo.toml b/drivers/net/e1000d/Cargo.toml index 15cf02ebc2..43ef78f4de 100644 --- a/drivers/net/e1000d/Cargo.toml +++ b/drivers/net/e1000d/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2018" [dependencies] -bitflags = "2" +bitflags.workspace = true log.workspace = true libredox.workspace = true redox_event.workspace = true diff --git a/drivers/net/ixgbed/Cargo.toml b/drivers/net/ixgbed/Cargo.toml index f548c28b2d..d97ff39874 100644 --- a/drivers/net/ixgbed/Cargo.toml +++ b/drivers/net/ixgbed/Cargo.toml @@ -5,7 +5,7 @@ version = "1.0.0" edition = "2021" [dependencies] -bitflags = "2" +bitflags.workspace = true libredox.workspace = true redox_event.workspace = true redox_syscall.workspace = true diff --git a/drivers/net/rtl8139d/Cargo.toml b/drivers/net/rtl8139d/Cargo.toml index d39b106cd0..8686242a89 100644 --- a/drivers/net/rtl8139d/Cargo.toml +++ b/drivers/net/rtl8139d/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2018" [dependencies] -bitflags = "2" +bitflags.workspace = true libredox.workspace = true log.workspace = true redox_event.workspace = true diff --git a/drivers/net/rtl8168d/Cargo.toml b/drivers/net/rtl8168d/Cargo.toml index 7726db364b..35975ed241 100644 --- a/drivers/net/rtl8168d/Cargo.toml +++ b/drivers/net/rtl8168d/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2018" [dependencies] -bitflags = "2" +bitflags.workspace = true libredox.workspace = true log.workspace = true redox_event.workspace = true diff --git a/drivers/storage/nvmed/Cargo.toml b/drivers/storage/nvmed/Cargo.toml index 61cdad99a5..9447368835 100644 --- a/drivers/storage/nvmed/Cargo.toml +++ b/drivers/storage/nvmed/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] arrayvec = "0.7" -bitflags = "2" +bitflags.workspace = true futures = "0.3" libredox.workspace = true log.workspace = true diff --git a/drivers/virtio-core/Cargo.toml b/drivers/virtio-core/Cargo.toml index 306091c488..27b9da0481 100644 --- a/drivers/virtio-core/Cargo.toml +++ b/drivers/virtio-core/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Anhad Singh "] [dependencies] static_assertions = "1.1.0" -bitflags = "2.3.2" +bitflags.workspace = true redox_syscall.workspace = true libredox.workspace = true log.workspace = true From bba8eac7cbe4e18a1126cd581945dfd5fe1477c0 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 20 Mar 2026 11:52:15 +0000 Subject: [PATCH 2/5] remove bitflags from ahcid --- Cargo.lock | 1 - drivers/storage/ahcid/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02b13447ab..ebc4a6bb46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,6 @@ dependencies = [ name = "ahcid" version = "0.1.0" dependencies = [ - "bitflags 1.3.2", "byteorder", "common", "daemon", diff --git a/drivers/storage/ahcid/Cargo.toml b/drivers/storage/ahcid/Cargo.toml index 17be8177f2..91458cf1d1 100644 --- a/drivers/storage/ahcid/Cargo.toml +++ b/drivers/storage/ahcid/Cargo.toml @@ -5,7 +5,6 @@ version = "0.1.0" edition = "2021" [dependencies] -bitflags = "1.2" byteorder = "1.2" log.workspace = true redox_syscall = { workspace = true, features = ["std"] } From 6cbf83995c7701387379778d49a62bb4856ce977 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 20 Mar 2026 11:55:27 +0000 Subject: [PATCH 3/5] remove bitflags from ac97d --- Cargo.lock | 1 - drivers/audio/ac97d/Cargo.toml | 1 - drivers/audio/ac97d/src/main.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebc4a6bb46..aa2891d66c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,7 +6,6 @@ version = 4 name = "ac97d" version = "0.1.0" dependencies = [ - "bitflags 1.3.2", "common", "daemon", "libredox", diff --git a/drivers/audio/ac97d/Cargo.toml b/drivers/audio/ac97d/Cargo.toml index 628c75bdc2..0b1d4534f7 100644 --- a/drivers/audio/ac97d/Cargo.toml +++ b/drivers/audio/ac97d/Cargo.toml @@ -5,7 +5,6 @@ version = "0.1.0" edition = "2021" [dependencies] -bitflags = "1" common = { path = "../../common" } libredox.workspace = true log.workspace = true diff --git a/drivers/audio/ac97d/src/main.rs b/drivers/audio/ac97d/src/main.rs index fdcf015795..94d5e28e55 100644 --- a/drivers/audio/ac97d/src/main.rs +++ b/drivers/audio/ac97d/src/main.rs @@ -1,6 +1,5 @@ //#![deny(warnings)] -extern crate bitflags; extern crate event; extern crate spin; extern crate syscall; From e054af78c0a1526d1124c582e70ec9a656d5ddfe Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 20 Mar 2026 11:58:53 +0000 Subject: [PATCH 4/5] update bitflags for ps2d --- Cargo.lock | 2 +- drivers/input/ps2d/Cargo.toml | 2 +- drivers/input/ps2d/src/controller.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa2891d66c..91ac6193d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1583,7 +1583,7 @@ dependencies = [ name = "ps2d" version = "0.1.0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.11.0", "common", "daemon", "inputd", diff --git a/drivers/input/ps2d/Cargo.toml b/drivers/input/ps2d/Cargo.toml index e09e86f7ed..fdba06b634 100644 --- a/drivers/input/ps2d/Cargo.toml +++ b/drivers/input/ps2d/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2018" [dependencies] -bitflags = "1" +bitflags.workspace = true log.workspace = true orbclient.workspace = true redox_event.workspace = true diff --git a/drivers/input/ps2d/src/controller.rs b/drivers/input/ps2d/src/controller.rs index d40d7998fe..d7af4cba2c 100644 --- a/drivers/input/ps2d/src/controller.rs +++ b/drivers/input/ps2d/src/controller.rs @@ -45,6 +45,7 @@ bitflags! { } bitflags! { + #[derive(Clone, Copy, Debug)] pub struct ConfigFlags: u8 { const FIRST_INTERRUPT = 1 << 0; const SECOND_INTERRUPT = 1 << 1; From c88ab21c3f78d7680737a1fe65ea2ec4d1cd5c27 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 20 Mar 2026 12:07:36 +0000 Subject: [PATCH 5/5] update bitflags for xhcid --- Cargo.lock | 2 +- drivers/usb/xhcid/Cargo.toml | 2 +- drivers/usb/xhcid/src/usb/hub.rs | 4 ++-- drivers/usb/xhcid/src/xhci/port.rs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91ac6193d7..f1db30d93c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2902,7 +2902,7 @@ dependencies = [ name = "xhcid" version = "0.1.0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.11.0", "chashmap", "common", "crossbeam-channel", diff --git a/drivers/usb/xhcid/Cargo.toml b/drivers/usb/xhcid/Cargo.toml index 51eec59f36..f897dbae89 100644 --- a/drivers/usb/xhcid/Cargo.toml +++ b/drivers/usb/xhcid/Cargo.toml @@ -13,7 +13,7 @@ name = "xhcid_interface" path = "src/lib.rs" [dependencies] -bitflags = "1" +bitflags.workspace = true chashmap = "2.2.2" crossbeam-channel = "0.4" futures = "0.3" diff --git a/drivers/usb/xhcid/src/usb/hub.rs b/drivers/usb/xhcid/src/usb/hub.rs index fbdb860624..9dab55e85a 100644 --- a/drivers/usb/xhcid/src/usb/hub.rs +++ b/drivers/usb/xhcid/src/usb/hub.rs @@ -93,7 +93,7 @@ pub enum HubPortFeature { } bitflags::bitflags! { - #[derive(Default)] + #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] #[repr(transparent)] pub struct HubPortStatusV2: u32 { const CONNECTION = 1 << 0; @@ -120,7 +120,7 @@ bitflags::bitflags! { unsafe impl plain::Plain for HubPortStatusV2 {} bitflags::bitflags! { - #[derive(Default)] + #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] #[repr(transparent)] pub struct HubPortStatusV3: u32 { const CONNECTION = 1 << 0; diff --git a/drivers/usb/xhcid/src/xhci/port.rs b/drivers/usb/xhcid/src/xhci/port.rs index 7c0f570d37..0654ccc3a7 100644 --- a/drivers/usb/xhcid/src/xhci/port.rs +++ b/drivers/usb/xhcid/src/xhci/port.rs @@ -9,6 +9,7 @@ use common::io::{Io, Mmio}; // Sticky register values may preserve values through chip hardware reset bitflags! { + #[derive(Debug)] pub struct PortFlags: u32 { const CCS = 1 << 0; // ROS const PED = 1 << 1; // RW1CS