File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,14 @@ impl FrameFiltering {
183
183
. bits( addr. address. high( ) )
184
184
} ) ;
185
185
186
- eth_mac. $regl. write( |w| w. $al( ) . bits( addr. address. low( ) ) ) ;
186
+ // This operation is only unsafe for register maca2lr STM32F107
187
+ //
188
+ // NOTE(safety): this operation is only unsafe for a single one
189
+ // of the lower-address-part registers, so this should be fine.
190
+ #[ allow( unused_unsafe) ]
191
+ eth_mac
192
+ . $regl
193
+ . write( |w| unsafe { w. $al( ) . bits( addr. address. low( ) ) } ) ;
187
194
}
188
195
} ;
189
196
}
Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ impl<'a> TxRing<'a> {
222
222
// Register TxDescriptor
223
223
eth_dma
224
224
. dmatdlar
225
- // Note: unsafe block required for `stm32f107`.
226
225
. write ( |w| unsafe { w. stl ( ) . bits ( ring_ptr as u32 ) } ) ;
227
226
228
227
// "Preceding reads and writes cannot be moved past subsequent writes."
You can’t perform that action at this time.
0 commit comments