}
 
                if (j >= MAX_CTL_CHECK) {
-                       printk("%s: %s Fail to write through agent\n",
-                                       __func__, netxen_nic_driver_name);
+                       if (printk_ratelimit())
+                               dev_err(&adapter->pdev->dev,
+                                       "failed to write through agent\n");
                        ret = -1;
                        break;
                }
                }
 
                if (j >= MAX_CTL_CHECK) {
-                       printk(KERN_ERR "%s: %s Fail to read through agent\n",
-                                       __func__, netxen_nic_driver_name);
+                       if (printk_ratelimit())
+                               dev_err(&adapter->pdev->dev,
+                                       "failed to read through agent\n");
                        break;
                }
 
                }
 
                if (j >= MAX_CTL_CHECK) {
-                       printk(KERN_ERR "%s: Fail to write through agent\n",
-                                       netxen_nic_driver_name);
+                       if (printk_ratelimit())
+                               dev_err(&adapter->pdev->dev,
+                                       "failed to write through agent\n");
                        ret = -1;
                        break;
                }
                }
 
                if (j >= MAX_CTL_CHECK) {
-                       printk(KERN_ERR "%s: Fail to read through agent\n",
-                                       netxen_nic_driver_name);
+                       if (printk_ratelimit())
+                               dev_err(&adapter->pdev->dev,
+                                       "failed to read through agent\n");
                        break;
                }