File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
drivers/net/ethernet/google/gve Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -727,18 +727,7 @@ static int gve_set_desc_cnt(struct gve_priv *priv,
727
727
struct gve_device_descriptor * descriptor )
728
728
{
729
729
priv -> tx_desc_cnt = be16_to_cpu (descriptor -> tx_queue_entries );
730
- if (priv -> tx_desc_cnt * sizeof (priv -> tx -> desc [0 ]) < PAGE_SIZE ) {
731
- dev_err (& priv -> pdev -> dev , "Tx desc count %d too low\n" ,
732
- priv -> tx_desc_cnt );
733
- return - EINVAL ;
734
- }
735
730
priv -> rx_desc_cnt = be16_to_cpu (descriptor -> rx_queue_entries );
736
- if (priv -> rx_desc_cnt * sizeof (priv -> rx -> desc .desc_ring [0 ])
737
- < PAGE_SIZE ) {
738
- dev_err (& priv -> pdev -> dev , "Rx desc count %d too low\n" ,
739
- priv -> rx_desc_cnt );
740
- return - EINVAL ;
741
- }
742
731
return 0 ;
743
732
}
744
733
Original file line number Diff line number Diff line change @@ -211,9 +211,9 @@ static int gve_rx_alloc_ring(struct gve_priv *priv, int idx)
211
211
{
212
212
struct gve_rx_ring * rx = & priv -> rx [idx ];
213
213
struct device * hdev = & priv -> pdev -> dev ;
214
- u32 slots , npages ;
215
214
int filled_pages ;
216
215
size_t bytes ;
216
+ u32 slots ;
217
217
int err ;
218
218
219
219
netif_dbg (priv , drv , priv -> dev , "allocating rx ring\n" );
@@ -270,12 +270,6 @@ static int gve_rx_alloc_ring(struct gve_priv *priv, int idx)
270
270
271
271
/* alloc rx desc ring */
272
272
bytes = sizeof (struct gve_rx_desc ) * priv -> rx_desc_cnt ;
273
- npages = bytes / PAGE_SIZE ;
274
- if (npages * PAGE_SIZE != bytes ) {
275
- err = - EIO ;
276
- goto abort_with_q_resources ;
277
- }
278
-
279
273
rx -> desc .desc_ring = dma_alloc_coherent (hdev , bytes , & rx -> desc .bus ,
280
274
GFP_KERNEL );
281
275
if (!rx -> desc .desc_ring ) {
You can’t perform that action at this time.
0 commit comments