diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 8712a80fe747..c27cf94795db 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -1,27 +1,24 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * This file is part of the Emulex Linux Device Driver for * | 2 | * This file is part of the Emulex Linux Device Driver for * |
3 | * Enterprise Fibre Channel Host Bus Adapters. * | 3 | * Fibre Channel Host Bus Adapters. * |
4 | * Refer to the README file included with this package for * | 4 | * Copyright (C) 2004-2005 Emulex. All rights reserved. * |
5 | * driver version and adapter support. * | 5 | * EMULEX and SLI are trademarks of Emulex. * |
6 | * Copyright (C) 2004 Emulex Corporation. * | ||
7 | * www.emulex.com * | 6 | * www.emulex.com * |
7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * | ||
8 | * * | 8 | * * |
9 | * This program is free software; you can redistribute it and/or * | 9 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 10 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 11 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 12 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 13 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 14 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 15 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 16 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 17 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 18 | * more details, a copy of which can be found in the file COPYING * |
19 | * included with this package. * | ||
19 | *******************************************************************/ | 20 | *******************************************************************/ |
20 | 21 | ||
21 | /* | ||
22 | * $Id: lpfc_mbox.c 1.85 2005/04/13 11:59:11EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
26 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
27 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
@@ -422,7 +419,6 @@ lpfc_config_pcb_setup(struct lpfc_hba * phba) | |||
422 | uint32_t iocbCnt; | 419 | uint32_t iocbCnt; |
423 | int i; | 420 | int i; |
424 | 421 | ||
425 | psli->MBhostaddr = (uint32_t *)&phba->slim2p->mbx; | ||
426 | pcbp->maxRing = (psli->num_rings - 1); | 422 | pcbp->maxRing = (psli->num_rings - 1); |
427 | 423 | ||
428 | iocbCnt = 0; | 424 | iocbCnt = 0; |
@@ -528,7 +524,7 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) | |||
528 | dma_addr_t pdma_addr; | 524 | dma_addr_t pdma_addr; |
529 | uint32_t bar_low, bar_high; | 525 | uint32_t bar_low, bar_high; |
530 | size_t offset; | 526 | size_t offset; |
531 | HGP hgp; | 527 | struct lpfc_hgp hgp; |
532 | void __iomem *to_slim; | 528 | void __iomem *to_slim; |
533 | 529 | ||
534 | memset(pmb, 0, sizeof(LPFC_MBOXQ_t)); | 530 | memset(pmb, 0, sizeof(LPFC_MBOXQ_t)); |
@@ -584,9 +580,9 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) | |||
584 | else | 580 | else |
585 | phba->slim2p->pcb.hgpAddrHigh = 0; | 581 | phba->slim2p->pcb.hgpAddrHigh = 0; |
586 | /* write HGP data to SLIM at the required longword offset */ | 582 | /* write HGP data to SLIM at the required longword offset */ |
587 | memset(&hgp, 0, sizeof(HGP)); | 583 | memset(&hgp, 0, sizeof(struct lpfc_hgp)); |
588 | to_slim = phba->MBslimaddr + (SLIMOFF*sizeof (uint32_t)); | 584 | to_slim = phba->MBslimaddr + (SLIMOFF*sizeof (uint32_t)); |
589 | lpfc_memcpy_to_slim(to_slim, &hgp, sizeof (HGP)); | 585 | lpfc_memcpy_to_slim(to_slim, &hgp, sizeof(struct lpfc_hgp)); |
590 | 586 | ||
591 | /* Setup Port Group ring pointer */ | 587 | /* Setup Port Group ring pointer */ |
592 | offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port - | 588 | offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port - |