@@ -486,10 +486,17 @@ static int efx_ef10_alloc_piobufs(struct efx_nic *efx, unsigned int n)
486
486
BUILD_BUG_ON (MC_CMD_ALLOC_PIOBUF_IN_LEN != 0 );
487
487
488
488
for (i = 0 ; i < n ; i ++ ) {
489
- rc = efx_mcdi_rpc (efx , MC_CMD_ALLOC_PIOBUF , NULL , 0 ,
490
- outbuf , sizeof (outbuf ), & outlen );
491
- if (rc )
489
+ rc = efx_mcdi_rpc_quiet (efx , MC_CMD_ALLOC_PIOBUF , NULL , 0 ,
490
+ outbuf , sizeof (outbuf ), & outlen );
491
+ if (rc ) {
492
+ /* Don't display the MC error if we didn't have space
493
+ * for a VF.
494
+ */
495
+ if (!(efx_ef10_is_vf (efx ) && rc == - ENOSPC ))
496
+ efx_mcdi_display_error (efx , MC_CMD_ALLOC_PIOBUF ,
497
+ 0 , outbuf , outlen , rc );
492
498
break ;
499
+ }
493
500
if (outlen < MC_CMD_ALLOC_PIOBUF_OUT_LEN ) {
494
501
rc = - EIO ;
495
502
break ;
@@ -3833,13 +3840,12 @@ static void efx_ef10_filter_table_remove(struct efx_nic *efx)
3833
3840
MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE );
3834
3841
MCDI_SET_QWORD (inbuf , FILTER_OP_IN_HANDLE ,
3835
3842
table -> entry [filter_idx ].handle );
3836
- rc = efx_mcdi_rpc (efx , MC_CMD_FILTER_OP , inbuf , sizeof ( inbuf ) ,
3837
- NULL , 0 , NULL );
3843
+ rc = efx_mcdi_rpc_quiet (efx , MC_CMD_FILTER_OP , inbuf ,
3844
+ sizeof ( inbuf ), NULL , 0 , NULL );
3838
3845
if (rc )
3839
- netdev_WARN (efx -> net_dev ,
3840
- "filter_idx=%#x handle=%#llx\n" ,
3841
- filter_idx ,
3842
- table -> entry [filter_idx ].handle );
3846
+ netif_info (efx , drv , efx -> net_dev ,
3847
+ "%s: filter %04x remove failed\n" ,
3848
+ __func__ , filter_idx );
3843
3849
kfree (spec );
3844
3850
}
3845
3851
@@ -3848,11 +3854,14 @@ static void efx_ef10_filter_table_remove(struct efx_nic *efx)
3848
3854
}
3849
3855
3850
3856
#define EFX_EF10_FILTER_DO_MARK_OLD (id ) \
3851
- if (id != EFX_EF10_FILTER_ID_INVALID) { \
3852
- filter_idx = efx_ef10_filter_get_unsafe_id(efx, id); \
3853
- WARN_ON(!table->entry[filter_idx].spec); \
3854
- table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_AUTO_OLD; \
3855
- }
3857
+ if (id != EFX_EF10_FILTER_ID_INVALID) { \
3858
+ filter_idx = efx_ef10_filter_get_unsafe_id(efx, id); \
3859
+ if (!table->entry[filter_idx].spec) \
3860
+ netif_dbg(efx, drv, efx->net_dev, \
3861
+ "%s: marked null spec old %04x:%04x\n", \
3862
+ __func__, id, filter_idx); \
3863
+ table->entry[filter_idx].spec |= EFX_EF10_FILTER_FLAG_AUTO_OLD;\
3864
+ }
3856
3865
static void efx_ef10_filter_mark_old (struct efx_nic * efx )
3857
3866
{
3858
3867
struct efx_ef10_filter_table * table = efx -> filter_state ;
@@ -4026,9 +4035,10 @@ static int efx_ef10_filter_insert_def(struct efx_nic *efx, bool multicast,
4026
4035
4027
4036
rc = efx_ef10_filter_insert (efx , & spec , true);
4028
4037
if (rc < 0 ) {
4029
- netif_warn (efx , drv , efx -> net_dev ,
4030
- "%scast mismatch filter insert failed rc=%d\n" ,
4031
- multicast ? "Multi" : "Uni" , rc );
4038
+ netif_printk (efx , drv , rc == - EPERM ? KERN_DEBUG : KERN_WARNING ,
4039
+ efx -> net_dev ,
4040
+ "%scast mismatch filter insert failed rc=%d\n" ,
4041
+ multicast ? "Multi" : "Uni" , rc );
4032
4042
} else if (multicast ) {
4033
4043
table -> mcdef_id = efx_ef10_filter_get_unsafe_id (efx , rc );
4034
4044
if (!nic_data -> workaround_26807 ) {
@@ -4070,19 +4080,31 @@ static int efx_ef10_filter_insert_def(struct efx_nic *efx, bool multicast,
4070
4080
static void efx_ef10_filter_remove_old (struct efx_nic * efx )
4071
4081
{
4072
4082
struct efx_ef10_filter_table * table = efx -> filter_state ;
4073
- bool remove_failed = false;
4083
+ int remove_failed = 0 ;
4084
+ int remove_noent = 0 ;
4085
+ int rc ;
4074
4086
int i ;
4075
4087
4076
4088
for (i = 0 ; i < HUNT_FILTER_TBL_ROWS ; i ++ ) {
4077
4089
if (ACCESS_ONCE (table -> entry [i ].spec ) &
4078
4090
EFX_EF10_FILTER_FLAG_AUTO_OLD ) {
4079
- if (efx_ef10_filter_remove_internal (
4080
- efx , 1U << EFX_FILTER_PRI_AUTO ,
4081
- i , true) < 0 )
4082
- remove_failed = true;
4091
+ rc = efx_ef10_filter_remove_internal (efx ,
4092
+ 1U << EFX_FILTER_PRI_AUTO , i , true);
4093
+ if (rc == - ENOENT )
4094
+ remove_noent ++ ;
4095
+ else if (rc )
4096
+ remove_failed ++ ;
4083
4097
}
4084
4098
}
4085
- WARN_ON (remove_failed );
4099
+
4100
+ if (remove_failed )
4101
+ netif_info (efx , drv , efx -> net_dev ,
4102
+ "%s: failed to remove %d filters\n" ,
4103
+ __func__ , remove_failed );
4104
+ if (remove_noent )
4105
+ netif_info (efx , drv , efx -> net_dev ,
4106
+ "%s: failed to remove %d non-existent filters\n" ,
4107
+ __func__ , remove_noent );
4086
4108
}
4087
4109
4088
4110
static int efx_ef10_vport_set_mac_address (struct efx_nic * efx )
0 commit comments