Deleted Added
full compact
ql_misc.c (250661) ql_misc.c (254976)
1/*
2 * Copyright (c) 2013-2014 Qlogic Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 16 unchanged lines hidden (view full) ---

25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27/*
28 * File : ql_misc.c
29 * Author : David C Somayajulu, Qlogic Corporation, Aliso Viejo, CA 92656.
30 */
31
32#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2013-2014 Qlogic Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 16 unchanged lines hidden (view full) ---

25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27/*
28 * File : ql_misc.c
29 * Author : David C Somayajulu, Qlogic Corporation, Aliso Viejo, CA 92656.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/qlxgbe/ql_misc.c 250661 2013-05-15 17:03:09Z davidcs $");
33__FBSDID("$FreeBSD: head/sys/dev/qlxgbe/ql_misc.c 254976 2013-08-27 21:29:21Z davidcs $");
34
35#include "ql_os.h"
36#include "ql_hw.h"
37#include "ql_def.h"
38#include "ql_inline.h"
39#include "ql_glbl.h"
40#include "ql_dbg.h"
41#include "ql_tmplt.h"

--- 274 unchanged lines hidden (view full) ---

316 __func__);
317 return (-1);
318 }
319
320 data32 &= 0x6;
321
322 } while ((count < 10000) && (data32 != 0x6));
323
34
35#include "ql_os.h"
36#include "ql_hw.h"
37#include "ql_def.h"
38#include "ql_inline.h"
39#include "ql_glbl.h"
40#include "ql_dbg.h"
41#include "ql_tmplt.h"

--- 274 unchanged lines hidden (view full) ---

316 __func__);
317 return (-1);
318 }
319
320 data32 &= 0x6;
321
322 } while ((count < 10000) && (data32 != 0x6));
323
324 if (count == 0 && data32 != 0x6) {
324 if (data32 != 0x6) {
325 qla_sem_unlock(ha, Q8_FLASH_UNLOCK);
326 device_printf(ha->pci_dev,
327 "%s: Poll Q8_FLASH_STATUS failed\n",
328 __func__);
329 return (-1);
330 }
331
332 if (ql_rdwr_indreg32(ha, Q8_FLASH_RD_DATA, &data32, 1)) {

--- 63 unchanged lines hidden (view full) ---

396 __func__);
397 return (-1);
398 }
399
400 data32 &= 0x6;
401
402 } while ((count < 10000) && (data32 != 0x6));
403
325 qla_sem_unlock(ha, Q8_FLASH_UNLOCK);
326 device_printf(ha->pci_dev,
327 "%s: Poll Q8_FLASH_STATUS failed\n",
328 __func__);
329 return (-1);
330 }
331
332 if (ql_rdwr_indreg32(ha, Q8_FLASH_RD_DATA, &data32, 1)) {

--- 63 unchanged lines hidden (view full) ---

396 __func__);
397 return (-1);
398 }
399
400 data32 &= 0x6;
401
402 } while ((count < 10000) && (data32 != 0x6));
403
404 if (count == 0 && data32 != 0x6) {
404 if (data32 != 0x6) {
405 device_printf(ha->pci_dev,
406 "%s: Poll Q8_FLASH_STATUS failed\n",
407 __func__);
408 return (-1);
409 }
410
411 return 0;
412}

--- 14 unchanged lines hidden (view full) ---

427 __func__);
428 return (-1);
429 }
430
431 data32 &= 0x6;
432
433 } while (((count++) < 1000) && (data32 != 0x6));
434
405 device_printf(ha->pci_dev,
406 "%s: Poll Q8_FLASH_STATUS failed\n",
407 __func__);
408 return (-1);
409 }
410
411 return 0;
412}

--- 14 unchanged lines hidden (view full) ---

427 __func__);
428 return (-1);
429 }
430
431 data32 &= 0x6;
432
433 } while (((count++) < 1000) && (data32 != 0x6));
434
435 if (count == 0 && data32 != 0x6) {
435 if (data32 != 0x6) {
436 device_printf(ha->pci_dev,
437 "%s: Poll Q8_FLASH_STATUS failed\n",
438 __func__);
439 return (-1);
440 }
441
442 data32 = (start >> 16) & 0xFF;
443 if (ql_rdwr_indreg32(ha, Q8_FLASH_WR_DATA, &data32, 0)) {

--- 30 unchanged lines hidden (view full) ---

474 __func__);
475 return (-1);
476 }
477
478 data32 &= 0x6;
479
480 } while (((count++) < 1000) && (data32 != 0x6));
481
436 device_printf(ha->pci_dev,
437 "%s: Poll Q8_FLASH_STATUS failed\n",
438 __func__);
439 return (-1);
440 }
441
442 data32 = (start >> 16) & 0xFF;
443 if (ql_rdwr_indreg32(ha, Q8_FLASH_WR_DATA, &data32, 0)) {

--- 30 unchanged lines hidden (view full) ---

474 __func__);
475 return (-1);
476 }
477
478 data32 &= 0x6;
479
480 } while (((count++) < 1000) && (data32 != 0x6));
481
482 if (count == 0 && data32 != 0x6) {
482 if (data32 != 0x6) {
483 device_printf(ha->pci_dev,
484 "%s: Poll Q8_FLASH_STATUS failed\n",
485 __func__);
486 return (-1);
487 }
488
489 return 0;
490}

--- 79 unchanged lines hidden (view full) ---

570 __func__);
571 return (-1);
572 }
573
574 data32 &= 0x6;
575
576 } while ((count < 10000) && (data32 != 0x6));
577
483 device_printf(ha->pci_dev,
484 "%s: Poll Q8_FLASH_STATUS failed\n",
485 __func__);
486 return (-1);
487 }
488
489 return 0;
490}

--- 79 unchanged lines hidden (view full) ---

570 __func__);
571 return (-1);
572 }
573
574 data32 &= 0x6;
575
576 } while ((count < 10000) && (data32 != 0x6));
577
578 if (count == 0 && data32 != 0x6) {
578 if (data32 != 0x6) {
579 device_printf(ha->pci_dev,
580 "%s: Poll Q8_FLASH_STATUS failed\n",
581 __func__);
582 return (-1);
583 }
584
585 return 0;
586}

--- 718 unchanged lines hidden ---
579 device_printf(ha->pci_dev,
580 "%s: Poll Q8_FLASH_STATUS failed\n",
581 __func__);
582 return (-1);
583 }
584
585 return 0;
586}

--- 718 unchanged lines hidden ---