* [PATCH] staging: greybus: bootrom: power off module on timeout
@ 2026-07-04 7:19 adi25charis
2026-07-04 7:34 ` Greg KH
2026-07-04 14:12 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: adi25charis @ 2026-07-04 7:19 UTC (permalink / raw)
To: vireshk, johan, elder, gregkh
Cc: greybus-dev, linux-staging, linux-kernel, Aditya Chari S
From: Aditya Chari S <adi25charis@gmail.com>
Previously, when a firmware size request, get firmware request, or
ready-to-boot request from a module timed out, the driver would log
an error and free any firmware buffer, but left the module powered
on in a potentially inconsistent state.
Fix this by ejecting the module's interface via the SVC when a
timeout occurs, forcing it to be power-cycled and re-detected rather
than left in limbo.
Signed-off-by: Aditya Chari S <adi25charis@gmail.com>
---
drivers/staging/greybus/bootrom.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index 83921d90c..b564d2255 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -54,8 +54,12 @@ static void gb_bootrom_timedout(struct work_struct *work)
struct delayed_work *dwork = to_delayed_work(work);
struct gb_bootrom *bootrom = container_of(dwork,
struct gb_bootrom, dwork);
- struct device *dev = &bootrom->connection->bundle->dev;
+ struct gb_connection *connection = bootrom->connection;
+ struct device *dev = &connection->bundle->dev;
+ struct gb_interface *intf = connection->bundle->intf;
+ struct gb_svc *svc = connection->hd->svc;
const char *reason;
+ int ret;
switch (bootrom->next_request) {
case NEXT_REQ_FIRMWARE_SIZE:
@@ -82,7 +86,11 @@ static void gb_bootrom_timedout(struct work_struct *work)
free_firmware(bootrom);
mutex_unlock(&bootrom->mutex);
- /* TODO: Power-off Module ? */
+ /* Power-off Module */
+ ret = gb_svc_intf_eject(svc, intf->interface_id);
+ if (ret)
+ dev_err(dev, "failed to eject interface %u (%d)\n",
+ intf->interface_id, ret);
}
static void gb_bootrom_set_timeout(struct gb_bootrom *bootrom,
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: greybus: bootrom: power off module on timeout
2026-07-04 7:19 [PATCH] staging: greybus: bootrom: power off module on timeout adi25charis
@ 2026-07-04 7:34 ` Greg KH
2026-07-04 11:53 ` adi25charis
2026-07-04 14:12 ` kernel test robot
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2026-07-04 7:34 UTC (permalink / raw)
To: adi25charis
Cc: vireshk, johan, elder, greybus-dev, linux-staging, linux-kernel
On Sat, Jul 04, 2026 at 12:49:26PM +0530, adi25charis@gmail.com wrote:
> From: Aditya Chari S <adi25charis@gmail.com>
>
> Previously, when a firmware size request, get firmware request, or
> ready-to-boot request from a module timed out, the driver would log
> an error and free any firmware buffer, but left the module powered
> on in a potentially inconsistent state.
>
> Fix this by ejecting the module's interface via the SVC when a
> timeout occurs, forcing it to be power-cycled and re-detected rather
> than left in limbo.
>
> Signed-off-by: Aditya Chari S <adi25charis@gmail.com>
> ---
> drivers/staging/greybus/bootrom.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Cool, but how was this tested? What hardware needs this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: greybus: bootrom: power off module on timeout
2026-07-04 7:34 ` Greg KH
@ 2026-07-04 11:53 ` adi25charis
0 siblings, 0 replies; 4+ messages in thread
From: adi25charis @ 2026-07-04 11:53 UTC (permalink / raw)
To: gregkh; +Cc: vireshk, johan, elder, greybus-dev, linux-staging, linux-kernel
On Sat, Jul 04, 2026 at 09:34:47AM +0200, Greg KH wrote:
> Cool, but how was this tested? What hardware needs this?
Fair question. Honestly - I don't have Project Ara hardware, and as
far as I can tell it's not really possible to get any at this point
(the project's been dead for years and I haven't found boards
floating around anywhere).
So this was build-tested only - compiles clean, checkpatch clean -
but I haven't been able to actually trigger the timeout path on real
hardware. I based the fix on the existing gb_svc_intf_eject() usage
elsewhere in the SVC code, so the API usage should be correct, but I
can't vouch for the runtime behavior beyond that.
That said, if this driver is effectively unmaintained at this point
and changes without hardware validation aren't worth taking, I'd
appreciate knowing that as well - happy to defer to your judgment on
whether this is worth pursuing further.
Thanks,
Aditya
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: greybus: bootrom: power off module on timeout
2026-07-04 7:19 [PATCH] staging: greybus: bootrom: power off module on timeout adi25charis
2026-07-04 7:34 ` Greg KH
@ 2026-07-04 14:12 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-07-04 14:12 UTC (permalink / raw)
To: adi25charis, vireshk, johan, elder, gregkh
Cc: llvm, oe-kbuild-all, greybus-dev, linux-staging, linux-kernel,
Aditya Chari S
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/adi25charis-gmail-com/staging-greybus-bootrom-power-off-module-on-timeout/20260704-152129
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260704071926.6606-1-adi25charis%40gmail.com
patch subject: [PATCH] staging: greybus: bootrom: power off module on timeout
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260704/202607042245.XyM6HiC2-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260704/202607042245.XyM6HiC2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607042245.XyM6HiC2-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "gb_svc_intf_eject" [drivers/staging/greybus/gb-bootrom.ko] undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-04 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04 7:19 [PATCH] staging: greybus: bootrom: power off module on timeout adi25charis
2026-07-04 7:34 ` Greg KH
2026-07-04 11:53 ` adi25charis
2026-07-04 14:12 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox