Print this page
XXXX introduce drv_sectohz

@@ -1117,11 +1117,11 @@
 ql_8021_wait_flash_done(ql_adapter_state_t *ha)
 {
         clock_t         timer;
         uint32_t        status;
 
-        for (timer = 30 * drv_usectohz(1000000); timer; timer--) {
+        for (timer = drv_sectohz(30); timer; timer--) {
                 ql_8021_wr_32(ha, UNM_ROMUSB_ROM_ABYTE_CNT, 0);
                 ql_8021_wr_32(ha, UNM_ROMUSB_ROM_INSTR_OPCODE,
                     UNM_ROMUSB_ROM_RDSR_INSTR);
                 if (ql_8021_wait_rom_done(ha)) {
                         EL(ha, "Error waiting for rom done2\n");

@@ -1606,11 +1606,11 @@
 {
         uint32_t        data;
 
         /* ??? */
         ql_8021_wr_32(ha, UNM_PORT_MODE_ADDR, UNM_PORT_MODE_AUTO_NEG);
-        delay(drv_usectohz(1000000));
+        delay(drv_sectohz(1));
 
         /* CAM RAM Cold Boot Register */
         ql_8021_rd_32(ha, UNM_RAM_COLD_BOOT, &data);
         if (data == 0x55555555) {
                 ql_8021_rd_32(ha, UNM_ROMUSB_GLB_SW_RESET, &data);