Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

eth: fbnic: split fbnic_disable()

Factor out handling a single nv from fbnic_disable() to make
it reusable for queue ops. Use a __ prefix for the factored
out code. The real fbnic_nv_disable() which will include
fbnic_wrfl() will be added with the qops, to avoid unused
function warnings.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20250901211214.1027927-7-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jakub Kicinski and committed by
Paolo Abeni
cbfc0474 4ddb17c1

+25 -21
+25 -21
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
··· 2180 2180 } 2181 2181 } 2182 2182 2183 + static void __fbnic_nv_disable(struct fbnic_napi_vector *nv) 2184 + { 2185 + int i, t; 2186 + 2187 + /* Disable Tx queue triads */ 2188 + for (t = 0; t < nv->txt_count; t++) { 2189 + struct fbnic_q_triad *qt = &nv->qt[t]; 2190 + 2191 + fbnic_disable_twq0(&qt->sub0); 2192 + fbnic_disable_twq1(&qt->sub1); 2193 + fbnic_disable_tcq(&qt->cmpl); 2194 + } 2195 + 2196 + /* Disable Rx queue triads */ 2197 + for (i = 0; i < nv->rxt_count; i++, t++) { 2198 + struct fbnic_q_triad *qt = &nv->qt[t]; 2199 + 2200 + fbnic_disable_bdq(&qt->sub0, &qt->sub1); 2201 + fbnic_disable_rcq(&qt->cmpl); 2202 + } 2203 + } 2204 + 2183 2205 void fbnic_disable(struct fbnic_net *fbn) 2184 2206 { 2185 2207 struct fbnic_dev *fbd = fbn->fbd; 2186 - int i, j, t; 2208 + int i; 2187 2209 2188 - for (i = 0; i < fbn->num_napi; i++) { 2189 - struct fbnic_napi_vector *nv = fbn->napi[i]; 2190 - 2191 - /* Disable Tx queue triads */ 2192 - for (t = 0; t < nv->txt_count; t++) { 2193 - struct fbnic_q_triad *qt = &nv->qt[t]; 2194 - 2195 - fbnic_disable_twq0(&qt->sub0); 2196 - fbnic_disable_twq1(&qt->sub1); 2197 - fbnic_disable_tcq(&qt->cmpl); 2198 - } 2199 - 2200 - /* Disable Rx queue triads */ 2201 - for (j = 0; j < nv->rxt_count; j++, t++) { 2202 - struct fbnic_q_triad *qt = &nv->qt[t]; 2203 - 2204 - fbnic_disable_bdq(&qt->sub0, &qt->sub1); 2205 - fbnic_disable_rcq(&qt->cmpl); 2206 - } 2207 - } 2210 + for (i = 0; i < fbn->num_napi; i++) 2211 + __fbnic_nv_disable(fbn->napi[i]); 2208 2212 2209 2213 fbnic_wrfl(fbd); 2210 2214 }