From: Jesse Brandeburg <jesse.brandeburg@intel•com>
To: <m.chetan.kumar@linux•intel.com>, <netdev@vger•kernel.org>
Cc: <kuba@kernel•org>, <davem@davemloft•net>,
<johannes@sipsolutions•net>, <ryazanov.s.a@gmail•com>,
<loic.poulain@linaro•org>, <ilpo.jarvinen@linux•intel.com>,
<ricardo.martinez@linux•intel.com>,
<chiranjeevi.rapolu@linux•intel.com>, <haijun.liu@mediatek•com>,
<edumazet@google•com>, <pabeni@redhat•com>, <linuxwwan@intel•com>,
<linuxwwan_5g@intel•com>, <chandrashekar.devegowda@intel•com>,
<matthias.bgg@gmail•com>, <linux-arm-kernel@lists•infradead.org>,
<linux-mediatek@lists•infradead.org>,
Mishra Soumya Prakash <soumya.prakash.mishra@intel•com>
Subject: Re: [PATCH v3 net-next 4/5] net: wwan: t7xx: Enable devlink based fw flashing and coredump collection
Date: Fri, 6 Jan 2023 10:50:06 -0800 [thread overview]
Message-ID: <72232efa-e29d-9e40-d3f5-96ac7fb556c0@intel.com> (raw)
In-Reply-To: <e9e8285ad5ade22fd4ad31b1f90c8934d2d10be4.1673016069.git.m.chetan.kumar@linux.intel.com>
On 1/6/2023 8:27 AM, m.chetan.kumar@linux•intel.com wrote:
> From: M Chetan Kumar <m.chetan.kumar@linux•intel.com>
>
> Adds support for t7xx wwan device firmware flashing & coredump collection
> using devlink.
>
> 1> Driver Registers with Devlink framework.
> 2> Implements devlink ops flash_update callback that programs modem fw.
> 3> Creates region & snapshot required for device coredump log collection.
>
> On early detection of wwan device in fastboot mode driver sets up CLDMA0 HW
> tx/rx queues for raw data transfer and then registers to devlink framework.
> On user space application issuing command for firmware update the driver
> sends fastboot flash command & firmware to program NAND.
>
> In flashing procedure the fastboot command & response are exchanged between
> driver and device. Once firmware flashing is success completion status is
> reported to user space application.
>
> Below is the devlink command usage for firmware flashing
>
> $devlink dev flash pci/$BDF file ABC.img component ABC
>
> Note: ABC.img is the firmware to be programmed to "ABC" partition.
>
> In case of coredump collection when wwan device encounters an exception
> it reboots & stays in fastboot mode for coredump collection by host driver.
> On detecting exception state driver collects the core dump, creates the
> devlink region & reports an event to user space application for dump
> collection. The user space application invokes devlink region read command
> for dump collection.
>
> Below are the devlink commands used for coredump collection.
>
> devlink region new pci/$BDF/mr_dump
> devlink region read pci/$BDF/mr_dump snapshot $ID address $ADD length $LEN
> devlink region del pci/$BDF/mr_dump snapshot $ID
>
> Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux•intel.com>
> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel•com>
> Signed-off-by: Mishra Soumya Prakash <soumya.prakash.mishra@intel•com>
> --
> v3:
> * No Change.
> v2:
> * Remove devlink pointer inside the port state container.
> * Rename t7xx_devlink_region_list to t7xx_devlink_region_infos &
> use region index in initialization.
> * Change t7xx_devlink_region_infos to const.
> * Handle remaining packet data if the buffer is less than the skb data.
> * Drop t7xx_devlink_fb_send_buffer(), push fragmentation logic to
> t7xx_devlink_port_write().
> * Add "\n" to log message.
> * Move mrdump_region allocation to devlink initialization.
> * Drop snprintf for CTS command fill.
> * Drop intermediate mdata buffer & zipsize.
> * For mcmd use strcmp instead of strncmp.
> * Drop set_fastboot_dl instead use devlink param for fastboot operational mode.
> * Drop unnecessary logs.
> * Change t7xx_devlink_create_region to t7xx_devlink_create_regions.
> * Use BUILD_BUG_ON on array size checks.
> * Use ARRAY_SIZE inside loop.
> * Correct indentation.
> * Drop odd empty line.
> * Push common devlink initialization code to t7xx_devlink_init.
> * Use skb_queue_purge instead of running loop to free skbs.
> * Change t7xx_regions index to enums.
> * Remove dev in devlink container.
> * Refactor struct to separate out devlink static and dynamic data structs.
> * Use min_t.
> * Drop unnecessary var assginment during initialization.
> * Change while() to for().
> * Correct size check.
> * Rename result to ret.
> * Clean-up error handling path in t7xx_devlink_fb_get_core & t7xx_devlink_fb_dump_log.
> * Drop __func__ in log message.
> * Change NOTY to NOTIFY.
> * Push channel enable or disable cb to port proxy.
> * Use array index in t7xx_devlink_region_list initialization.
> * Drop t7xx_port_proxy_get_port_by_name() instead access port name directly via port_prox.
> * Drop udev based event reporting logic.
> * Drop get_core prefix in goto label.
> * Remove unnessary header files.
> * Allocate memory for mrdump_region->buf inside get_core.
> * Remove 'region->buf' in t7xx_devlink_region_snapshot.
> * Destroy workqueue on following error case in 'devlink_init'.
> * Remove useless checks(dl->mode) and condition(dl->wq).
> * Support devlink component versioning.
> * Kconfig changes to select devlink.
LGTM, but I wouldn't mind having someone with more devlink flash
experience review.
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel•com>
next prev parent reply other threads:[~2023-01-06 18:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 16:26 [PATCH v3 net-next 0/5] net: wwan: t7xx: fw flashing & coredump support m.chetan.kumar
2023-01-06 16:26 ` [PATCH v3 net-next 1/5] net: wwan: t7xx: Add AP CLDMA m.chetan.kumar
2023-01-06 17:56 ` Jesse Brandeburg
2023-01-06 16:26 ` [PATCH v3 net-next 2/5] net: wwan: t7xx: Infrastructure for early port configuration m.chetan.kumar
2023-01-06 18:31 ` Jesse Brandeburg
2023-01-08 14:07 ` Kumar, M Chetan
2023-01-06 16:27 ` [PATCH v3 net-next 3/5] net: wwan: t7xx: PCIe reset rescan m.chetan.kumar
2023-01-06 18:42 ` Jesse Brandeburg
2023-01-08 14:14 ` Kumar, M Chetan
2023-01-06 16:27 ` [PATCH v3 net-next 4/5] net: wwan: t7xx: Enable devlink based fw flashing and coredump collection m.chetan.kumar
2023-01-06 18:50 ` Jesse Brandeburg [this message]
2023-01-06 16:28 ` [PATCH v3 net-next 5/5] net: wwan: t7xx: Devlink documentation m.chetan.kumar
2023-01-06 18:37 ` Jesse Brandeburg
2023-01-08 14:20 ` Kumar, M Chetan
2023-01-09 3:48 ` Bagas Sanjaya
2023-01-09 16:07 ` Kumar, M Chetan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72232efa-e29d-9e40-d3f5-96ac7fb556c0@intel.com \
--to=jesse.brandeburg@intel$(echo .)com \
--cc=chandrashekar.devegowda@intel$(echo .)com \
--cc=chiranjeevi.rapolu@linux$(echo .)intel.com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=haijun.liu@mediatek$(echo .)com \
--cc=ilpo.jarvinen@linux$(echo .)intel.com \
--cc=johannes@sipsolutions$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=linuxwwan@intel$(echo .)com \
--cc=linuxwwan_5g@intel$(echo .)com \
--cc=loic.poulain@linaro$(echo .)org \
--cc=m.chetan.kumar@linux$(echo .)intel.com \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=ricardo.martinez@linux$(echo .)intel.com \
--cc=ryazanov.s.a@gmail$(echo .)com \
--cc=soumya.prakash.mishra@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox