Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xone for openSUSE:Factory checked in 
at 2026-04-13 23:18:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xone (Old)
 and      /work/SRC/openSUSE:Factory/.xone.new.21863 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xone"

Mon Apr 13 23:18:28 2026 rev:5 rq:1346217 version:0.5.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/xone/xone.changes        2026-03-15 
14:33:30.210195179 +0100
+++ /work/SRC/openSUSE:Factory/.xone.new.21863/xone.changes     2026-04-13 
23:19:03.140533883 +0200
@@ -1,0 +2,8 @@
+Thu Mar 26 08:38:50 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.5.8:
+  * Fix for not connecting after sleep/wake
+  * Fix boot loop and improve suspend/resume reconnection
+  * dongle: fix beacon loopback and duplicate WCID allocation
+
+-------------------------------------------------------------------

Old:
----
  v0.5.7.tar.gz

New:
----
  v0.5.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xone.spec ++++++
--- /var/tmp/diff_new_pack.7KtXZG/_old  2026-04-13 23:19:03.652555017 +0200
+++ /var/tmp/diff_new_pack.7KtXZG/_new  2026-04-13 23:19:03.656555182 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xone
-Version:        0.5.7
+Version:        0.5.8
 Release:        0
 Summary:        Driver for Xbox One and Xbox Series X|S controllers
 License:        GPL-2.0-or-later

++++++ v0.5.7.tar.gz -> v0.5.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xone-0.5.7/transport/dongle.c 
new/xone-0.5.8/transport/dongle.c
--- old/xone-0.5.7/transport/dongle.c   2026-02-27 13:40:31.000000000 +0100
+++ new/xone-0.5.8/transport/dongle.c   2026-03-13 13:49:42.000000000 +0100
@@ -303,12 +303,6 @@
                                           XONE_DONGLE_PAIRING_TIMEOUT);
 }
 
-static int xone_dongle_enable_pairing(struct xone_dongle *dongle,
-                                     u8 timeout_secs)
-{
-       return xone_dongle_pairing_handler(dongle, true, timeout_secs);
-}
-
 static void xone_dongle_pairing_timeout(struct work_struct *work)
 {
        struct xone_dongle *dongle = container_of(to_delayed_work(work),
@@ -523,9 +517,15 @@
 static int xone_dongle_add_client(struct xone_dongle *dongle, u8 *addr)
 {
        struct xone_dongle_client *client;
-       int err;
+       int i, err;
        unsigned long flags;
 
+       /* reject duplicate: controller already has a WCID slot */
+       for (i = 0; i < XONE_DONGLE_MAX_CLIENTS; i++)
+               if (dongle->clients[i] &&
+                   ether_addr_equal(dongle->clients[i]->address, addr))
+                       return 0;
+
        client = xone_dongle_create_client(dongle, addr);
        if (IS_ERR(client))
                return PTR_ERR(client);
@@ -895,6 +895,12 @@
        }
 
        ctl = le32_to_cpu(rxwi->ctl);
+
+       /* drop frames where RXWI claims more data than the USB transfer
+        * actually delivered — commonly the chip's own beacon loopback */
+       if (FIELD_GET(MT_RXWI_CTL_MPDU_LEN, ctl) > skb->len)
+               return 0;
+
        skb_trim(skb, FIELD_GET(MT_RXWI_CTL_MPDU_LEN, ctl));
 
        return xone_dongle_process_frame(dongle, skb, hdr_len,
@@ -1182,12 +1188,13 @@
         * In this state already-paired controllers cannot reconnect: they see
         * the beacon but are rejected by the filter.
         *
-        * Enable pairing for 10 seconds so controllers present at boot or
-        * after a replug reconnect automatically without requiring a manual
-        * button press. The pairing timeout (XONE_DONGLE_PAIRING_TIMEOUT)
-        * disables it again once the window expires.
+        * Enable pairing so controllers present at boot or after a replug
+        * reconnect automatically without requiring a manual button press.
+        * The channel scan cycles through all 12 channels at 2 s each
+        * (24 s per full cycle), so the timeout must be long enough for
+        * at least two full cycles.  Use the default 60 s timeout.
         */
-       err = xone_dongle_enable_pairing(dongle, 10);
+       err = xone_dongle_toggle_pairing(dongle, true);
        if (err)
                dev_err(mt->dev, "%s: enable pairing failed: %d\n",
                        __func__, err);
@@ -1479,17 +1486,62 @@
 static int xone_dongle_reset_resume(struct usb_interface *intf)
 {
        struct xone_dongle *dongle = usb_get_intfdata(intf);
-       int err;
+       struct xone_dongle_client *client;
+       struct urb *urb;
+       int i;
 
        pr_debug("%s", __func__);
 
-       err = usb_reset_device(dongle->mt.udev);
-       if (err == -EINPROGRESS) {
-               pr_debug("%s: Reset already in progress", __func__);
-               return 0;
+       /*
+        * The kernel already reset the USB device before calling
+        * reset_resume — a second usb_reset_device() is redundant and
+        * can leave the XHCI port in a bad state (the same class of bug
+        * as the former usb_reset_device() call in probe).
+        *
+        * Instead, clean up all stale state and reinitialize from scratch.
+        * This also ensures old GIP adapters are destroyed so the
+        * reconnecting controller gets a fresh input device.
+        */
+       if (dongle->fw_state < XONE_DONGLE_FW_STATE_ERROR)
+               dongle->fw_state = XONE_DONGLE_FW_STATE_STOP_LOADING;
+
+       usb_kill_anchored_urbs(&dongle->urbs_in_busy);
+       cancel_work_sync(&dongle->load_fw_work);
+       /*
+        * If load_fw_work raced past the STOP_LOADING check and created
+        * new URBs before cancel_work_sync returned, kill them now.
+        */
+       usb_kill_anchored_urbs(&dongle->urbs_in_busy);
+       drain_workqueue(dongle->event_wq);
+       cancel_delayed_work_sync(&dongle->pairing_work);
+       cancel_delayed_work_sync(&dongle->pairing_scan_work);
+
+       for (i = 0; i < XONE_DONGLE_MAX_CLIENTS; i++) {
+               client = dongle->clients[i];
+               if (!client)
+                       continue;
+               gip_destroy_adapter(client->adapter);
+               kfree(client);
+               dongle->clients[i] = NULL;
        }
+       atomic_set(&dongle->client_count, 0);
 
-       return err;
+       usb_kill_anchored_urbs(&dongle->urbs_out_busy);
+
+       while ((urb = usb_get_from_anchor(&dongle->urbs_out_idle)))
+               usb_free_urb(urb);
+
+       while ((urb = usb_get_from_anchor(&dongle->urbs_in_idle))) {
+               usb_free_coherent(urb->dev, urb->transfer_buffer_length,
+                                 urb->transfer_buffer, urb->transfer_dma);
+               usb_free_urb(urb);
+       }
+
+       dongle->pairing = false;
+       dongle->pairing_scan_idx = 0;
+       dongle->last_wlan_rx = 0;
+
+       return xone_dongle_init(dongle);
 }
 
 static const struct usb_device_id xone_dongle_id_table[] = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xone-0.5.7/transport/mt76.c 
new/xone-0.5.8/transport/mt76.c
--- old/xone-0.5.7/transport/mt76.c     2026-02-27 13:40:31.000000000 +0100
+++ new/xone-0.5.8/transport/mt76.c     2026-03-13 13:49:42.000000000 +0100
@@ -518,7 +518,6 @@
        int err;
 
        if (xone_mt76_read_register(mt, MT_FCE_DMA_ADDR | MT_VEND_TYPE_CFG)) {
-               msleep(2000);
                dev_dbg(mt->dev, "%s: resetting firmware...\n", __func__);
                err = xone_mt76_reset_firmware(mt);
                if (err)
@@ -1015,6 +1014,31 @@
        /* mandatory delay after channel change */
        msleep(1000);
 
+       /*
+        * After S3 sleep the reset_resume path does a warm firmware MCU reset
+        * (reset_firmware) rather than a full USB re-enumeration. The MT76
+        * chip's hardware DMA routing registers are NOT reset by the MCU soft
+        * reset, so any WoW configuration applied by suspend_radio() may
+        * persist: specifically, set_wow_traffic(TO_HOST) reconfigures the
+        * hardware to forward received frames via the wake-on-wireless path
+        * rather than the normal firmware-processed path. With that routing
+        * still active, incoming QoS data frames (GIP ANNOUNCE from the
+        * controller) are silently dropped before they reach the host driver,
+        * so the GIP handshake never completes and the controller light stays
+        * solid but never dims.
+        *
+        * Explicitly restore normal traffic routing before setting up the
+        * beacon. On cold boot (no prior WoW state) these are harmless no-ops.
+        * mt->channel is valid here because init_channels() has already run.
+        */
+       err = xone_mt76_set_wow_traffic(mt, XONE_MT_WOW_TO_FIRMWARE);
+       if (err)
+               return err;
+
+       err = xone_mt76_set_wow_enable(mt, false);
+       if (err)
+               return err;
+
        return xone_mt76_set_pairing(mt, false);
 }
 

Reply via email to