diff options
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/Makefile | 28 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 31 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 31 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_compat.h | 31 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 33 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 28 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_disc.h | 30 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 47 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 55 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 50 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 40 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_logmsg.h | 30 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 38 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mem.c | 31 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 40 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 33 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.h | 32 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 125 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.h | 30 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_version.h | 33 |
20 files changed, 380 insertions, 416 deletions
diff --git a/drivers/scsi/lpfc/Makefile b/drivers/scsi/lpfc/Makefile index 2b3098591c41..d1be465d5f55 100644 --- a/drivers/scsi/lpfc/Makefile +++ b/drivers/scsi/lpfc/Makefile | |||
@@ -1,26 +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 * |
8 | # * * | 7 | # * * |
9 | # * This program is free software; you can redistribute it and/or * | 8 | # * This program is free software; you can redistribute it and/or * |
10 | # * modify it under the terms of the GNU General Public License * | 9 | # * modify it under the terms of version 2 of the GNU General * |
11 | # * as published by the Free Software Foundation; either version 2 * | 10 | # * Public License as published by the Free Software Foundation. * |
12 | # * of the License, or (at your option) any later version. * | 11 | # * This program is distributed in the hope that it will be useful. * |
13 | # * * | 12 | # * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | # * This program is distributed in the hope that it will be useful, * | 13 | # * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | # * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | # * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | # * GNU General Public License for more details, a copy of which * | 16 | # * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | # * can be found in the file COPYING included with this package. * | 17 | # * more details, a copy of which can be found in the file COPYING * |
18 | # * included with this package. * | ||
19 | # *******************************************************************/ | 19 | # *******************************************************************/ |
20 | ###################################################################### | 20 | ###################################################################### |
21 | 21 | ||
22 | #$Id: Makefile 1.58 2005/01/23 19:00:32EST sf_support Exp $ | ||
23 | |||
24 | ifneq ($(GCOV),) | 22 | ifneq ($(GCOV),) |
25 | EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage | 23 | EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage |
26 | EXTRA_CFLAGS += -O0 | 24 | EXTRA_CFLAGS += -O0 |
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index d78247c63d04..3bb82aae432e 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -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.h 1.167 2005/04/07 08:47:05EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | struct lpfc_sli2_slim; | 22 | struct lpfc_sli2_slim; |
26 | 23 | ||
27 | #define LPFC_MAX_TARGET 256 /* max targets supported */ | 24 | #define LPFC_MAX_TARGET 256 /* max targets supported */ |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 1276bd77b995..3cea92883019 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.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_attr.c 1.24 2005/04/13 11:58:55EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/ctype.h> | 22 | #include <linux/ctype.h> |
26 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
27 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/lpfc/lpfc_compat.h b/drivers/scsi/lpfc/lpfc_compat.h index 646649fe962a..a11f1ae7b98e 100644 --- a/drivers/scsi/lpfc/lpfc_compat.h +++ b/drivers/scsi/lpfc/lpfc_compat.h | |||
@@ -1,26 +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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * $Id: lpfc_compat.h 1.32 2005/01/25 17:51:45EST sf_support Exp $ | ||
23 | * | ||
24 | * This file provides macros to aid compilation in the Linux 2.4 kernel | 22 | * This file provides macros to aid compilation in the Linux 2.4 kernel |
25 | * over various platform architectures. | 23 | * over various platform architectures. |
26 | */ | 24 | */ |
@@ -32,8 +30,9 @@ memcpy_toio() and memcpy_fromio() can be used. | |||
32 | However on a big-endian host, copy 4 bytes at a time, | 30 | However on a big-endian host, copy 4 bytes at a time, |
33 | using writel() and readl(). | 31 | using writel() and readl(). |
34 | *******************************************************************/ | 32 | *******************************************************************/ |
33 | #include <asm/byteorder.h> | ||
35 | 34 | ||
36 | #if __BIG_ENDIAN | 35 | #ifdef __BIG_ENDIAN |
37 | 36 | ||
38 | static inline void | 37 | static inline void |
39 | lpfc_memcpy_to_slim(void __iomem *dest, void *src, unsigned int bytes) | 38 | lpfc_memcpy_to_slim(void __iomem *dest, void *src, unsigned int bytes) |
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index c504477a6a5d..bd5135d3eee4 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h | |||
@@ -1,27 +1,23 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | ||
22 | * $Id: lpfc_crtn.h 1.166 2005/04/07 08:46:47EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t); | 21 | void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t); |
26 | void lpfc_read_nv(struct lpfc_hba *, LPFC_MBOXQ_t *); | 22 | void lpfc_read_nv(struct lpfc_hba *, LPFC_MBOXQ_t *); |
27 | int lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, | 23 | int lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, |
@@ -195,6 +191,9 @@ int lpfc_sli_issue_iocb_wait_high_priority(struct lpfc_hba * phba, | |||
195 | void lpfc_sli_wake_iocb_high_priority(struct lpfc_hba * phba, | 191 | void lpfc_sli_wake_iocb_high_priority(struct lpfc_hba * phba, |
196 | struct lpfc_iocbq * queue1, | 192 | struct lpfc_iocbq * queue1, |
197 | struct lpfc_iocbq * queue2); | 193 | struct lpfc_iocbq * queue2); |
194 | void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba * phba, | ||
195 | struct lpfc_iocbq * cmdiocb, | ||
196 | struct lpfc_iocbq * rspiocb); | ||
198 | 197 | ||
199 | void *lpfc_mbuf_alloc(struct lpfc_hba *, int, dma_addr_t *); | 198 | void *lpfc_mbuf_alloc(struct lpfc_hba *, int, dma_addr_t *); |
200 | void lpfc_mbuf_free(struct lpfc_hba *, void *, dma_addr_t); | 199 | void lpfc_mbuf_free(struct lpfc_hba *, void *, dma_addr_t); |
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index c40cb239c16d..78adee4699af 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -1,26 +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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * $Id: lpfc_ct.c 1.161 2005/04/13 11:59:01EDT sf_support Exp $ | ||
23 | * | ||
24 | * Fibre Channel SCSI LAN Device Driver CT support | 22 | * Fibre Channel SCSI LAN Device Driver CT support |
25 | */ | 23 | */ |
26 | 24 | ||
diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h index adccc99510d5..098b8b45c7f1 100644 --- a/drivers/scsi/lpfc/lpfc_disc.h +++ b/drivers/scsi/lpfc/lpfc_disc.h | |||
@@ -1,27 +1,23 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | ||
22 | * $Id: lpfc_disc.h 1.61 2005/04/07 08:46:52EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #define FC_MAX_HOLD_RSCN 32 /* max number of deferred RSCNs */ | 21 | #define FC_MAX_HOLD_RSCN 32 /* max number of deferred RSCNs */ |
26 | #define FC_MAX_NS_RSP 65536 /* max size NameServer rsp */ | 22 | #define FC_MAX_NS_RSP 65536 /* max size NameServer rsp */ |
27 | #define FC_MAXLOOP 126 /* max devices supported on a fc loop */ | 23 | #define FC_MAXLOOP 126 /* max devices supported on a fc loop */ |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 68d1b77e0256..2b1c9572dae7 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.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_els.c 1.186 2005/04/13 14:26:55EDT 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> |
@@ -3139,7 +3136,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3139 | case ELS_CMD_PLOGI: | 3136 | case ELS_CMD_PLOGI: |
3140 | phba->fc_stat.elsRcvPLOGI++; | 3137 | phba->fc_stat.elsRcvPLOGI++; |
3141 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3138 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3142 | rjt_err = LSEXP_NOTHING_MORE; | 3139 | rjt_err = 1; |
3143 | break; | 3140 | break; |
3144 | } | 3141 | } |
3145 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); | 3142 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); |
@@ -3154,7 +3151,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3154 | case ELS_CMD_LOGO: | 3151 | case ELS_CMD_LOGO: |
3155 | phba->fc_stat.elsRcvLOGO++; | 3152 | phba->fc_stat.elsRcvLOGO++; |
3156 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3153 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3157 | rjt_err = LSEXP_NOTHING_MORE; | 3154 | rjt_err = 1; |
3158 | break; | 3155 | break; |
3159 | } | 3156 | } |
3160 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); | 3157 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO); |
@@ -3162,7 +3159,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3162 | case ELS_CMD_PRLO: | 3159 | case ELS_CMD_PRLO: |
3163 | phba->fc_stat.elsRcvPRLO++; | 3160 | phba->fc_stat.elsRcvPRLO++; |
3164 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3161 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3165 | rjt_err = LSEXP_NOTHING_MORE; | 3162 | rjt_err = 1; |
3166 | break; | 3163 | break; |
3167 | } | 3164 | } |
3168 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); | 3165 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO); |
@@ -3177,7 +3174,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3177 | case ELS_CMD_ADISC: | 3174 | case ELS_CMD_ADISC: |
3178 | phba->fc_stat.elsRcvADISC++; | 3175 | phba->fc_stat.elsRcvADISC++; |
3179 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3176 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3180 | rjt_err = LSEXP_NOTHING_MORE; | 3177 | rjt_err = 1; |
3181 | break; | 3178 | break; |
3182 | } | 3179 | } |
3183 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); | 3180 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC); |
@@ -3185,7 +3182,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3185 | case ELS_CMD_PDISC: | 3182 | case ELS_CMD_PDISC: |
3186 | phba->fc_stat.elsRcvPDISC++; | 3183 | phba->fc_stat.elsRcvPDISC++; |
3187 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3184 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3188 | rjt_err = LSEXP_NOTHING_MORE; | 3185 | rjt_err = 1; |
3189 | break; | 3186 | break; |
3190 | } | 3187 | } |
3191 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); | 3188 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC); |
@@ -3209,7 +3206,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3209 | case ELS_CMD_PRLI: | 3206 | case ELS_CMD_PRLI: |
3210 | phba->fc_stat.elsRcvPRLI++; | 3207 | phba->fc_stat.elsRcvPRLI++; |
3211 | if (phba->hba_state < LPFC_DISC_AUTH) { | 3208 | if (phba->hba_state < LPFC_DISC_AUTH) { |
3212 | rjt_err = LSEXP_NOTHING_MORE; | 3209 | rjt_err = 1; |
3213 | break; | 3210 | break; |
3214 | } | 3211 | } |
3215 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); | 3212 | lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI); |
@@ -3220,7 +3217,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3220 | break; | 3217 | break; |
3221 | default: | 3218 | default: |
3222 | /* Unsupported ELS command, reject */ | 3219 | /* Unsupported ELS command, reject */ |
3223 | rjt_err = LSEXP_NOTHING_MORE; | 3220 | rjt_err = 1; |
3224 | 3221 | ||
3225 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 3222 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
3226 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3223 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
@@ -3236,7 +3233,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3236 | if (rjt_err) { | 3233 | if (rjt_err) { |
3237 | stat.un.b.lsRjtRsvd0 = 0; | 3234 | stat.un.b.lsRjtRsvd0 = 0; |
3238 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 3235 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
3239 | stat.un.b.lsRjtRsnCodeExp = rjt_err; | 3236 | stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; |
3240 | stat.un.b.vendorUnique = 0; | 3237 | stat.un.b.vendorUnique = 0; |
3241 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); | 3238 | lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp); |
3242 | } | 3239 | } |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index d546206038bf..233901e9dfde 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.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_hbadisc.c 1.266 2005/04/13 11:59:06EDT 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/kthread.h> | 24 | #include <linux/kthread.h> |
@@ -61,14 +58,7 @@ static void lpfc_disc_timeout_handler(struct lpfc_hba *); | |||
61 | static void | 58 | static void |
62 | lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | 59 | lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) |
63 | { | 60 | { |
64 | if (!(ndlp->nlp_type & NLP_FABRIC)) { | 61 | int warn_on = 0; |
65 | /* Nodev timeout on NPort <nlp_DID> */ | ||
66 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | ||
67 | "%d:0203 Nodev timeout on NPort x%x " | ||
68 | "Data: x%x x%x x%x\n", | ||
69 | phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, | ||
70 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
71 | } | ||
72 | 62 | ||
73 | spin_lock_irq(phba->host->host_lock); | 63 | spin_lock_irq(phba->host->host_lock); |
74 | if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) { | 64 | if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) { |
@@ -79,12 +69,27 @@ lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | |||
79 | ndlp->nlp_flag &= ~NLP_NODEV_TMO; | 69 | ndlp->nlp_flag &= ~NLP_NODEV_TMO; |
80 | 70 | ||
81 | if (ndlp->nlp_sid != NLP_NO_SID) { | 71 | if (ndlp->nlp_sid != NLP_NO_SID) { |
72 | warn_on = 1; | ||
82 | /* flush the target */ | 73 | /* flush the target */ |
83 | lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], | 74 | lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring], |
84 | ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); | 75 | ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT); |
85 | } | 76 | } |
86 | spin_unlock_irq(phba->host->host_lock); | 77 | spin_unlock_irq(phba->host->host_lock); |
87 | 78 | ||
79 | if (warn_on) { | ||
80 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | ||
81 | "%d:0203 Nodev timeout on NPort x%x " | ||
82 | "Data: x%x x%x x%x\n", | ||
83 | phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, | ||
84 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
85 | } else { | ||
86 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | ||
87 | "%d:0204 Nodev timeout on NPort x%x " | ||
88 | "Data: x%x x%x x%x\n", | ||
89 | phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, | ||
90 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
91 | } | ||
92 | |||
88 | lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM); | 93 | lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM); |
89 | return; | 94 | return; |
90 | } | 95 | } |
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index fc958a99dadb..21591cb9f551 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -1,27 +1,23 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | ||
22 | * $Id: lpfc_hw.h 1.37 2005/03/29 19:51:45EST sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #define FDMI_DID 0xfffffaU | 21 | #define FDMI_DID 0xfffffaU |
26 | #define NameServer_DID 0xfffffcU | 22 | #define NameServer_DID 0xfffffcU |
27 | #define SCR_DID 0xfffffdU | 23 | #define SCR_DID 0xfffffdU |
@@ -2214,20 +2210,20 @@ typedef union { | |||
2214 | * SLI-2 specific structures | 2210 | * SLI-2 specific structures |
2215 | */ | 2211 | */ |
2216 | 2212 | ||
2217 | typedef struct { | 2213 | struct lpfc_hgp { |
2218 | uint32_t cmdPutInx; | 2214 | __le32 cmdPutInx; |
2219 | uint32_t rspGetInx; | 2215 | __le32 rspGetInx; |
2220 | } HGP; | 2216 | }; |
2221 | 2217 | ||
2222 | typedef struct { | 2218 | struct lpfc_pgp { |
2223 | uint32_t cmdGetInx; | 2219 | __le32 cmdGetInx; |
2224 | uint32_t rspPutInx; | 2220 | __le32 rspPutInx; |
2225 | } PGP; | 2221 | }; |
2226 | 2222 | ||
2227 | typedef struct _SLI2_DESC { | 2223 | typedef struct _SLI2_DESC { |
2228 | HGP host[MAX_RINGS]; | 2224 | struct lpfc_hgp host[MAX_RINGS]; |
2229 | uint32_t unused1[16]; | 2225 | uint32_t unused1[16]; |
2230 | PGP port[MAX_RINGS]; | 2226 | struct lpfc_pgp port[MAX_RINGS]; |
2231 | } SLI2_DESC; | 2227 | } SLI2_DESC; |
2232 | 2228 | ||
2233 | typedef union { | 2229 | typedef union { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 233c912b63ce..34d416d2b007 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.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_init.c 1.233 2005/04/13 11:59:09EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
26 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
27 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
@@ -780,6 +777,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) | |||
780 | pci_read_config_dword(phba->pcidev, PCI_VENDOR_ID, &id); | 777 | pci_read_config_dword(phba->pcidev, PCI_VENDOR_ID, &id); |
781 | 778 | ||
782 | switch ((id >> 16) & 0xffff) { | 779 | switch ((id >> 16) & 0xffff) { |
780 | case PCI_DEVICE_ID_FIREFLY: | ||
781 | strcpy(str, "LP6000 1"); | ||
782 | break; | ||
783 | case PCI_DEVICE_ID_SUPERFLY: | 783 | case PCI_DEVICE_ID_SUPERFLY: |
784 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) | 784 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) |
785 | strcpy(str, "LP7000 1"); | 785 | strcpy(str, "LP7000 1"); |
@@ -837,6 +837,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) | |||
837 | case PCI_DEVICE_ID_LP10000S: | 837 | case PCI_DEVICE_ID_LP10000S: |
838 | strcpy(str, "LP10000-S 2"); | 838 | strcpy(str, "LP10000-S 2"); |
839 | break; | 839 | break; |
840 | default: | ||
841 | memset(str, 0, 16); | ||
842 | break; | ||
840 | } | 843 | } |
841 | if (mdp) | 844 | if (mdp) |
842 | sscanf(str, "%s", mdp); | 845 | sscanf(str, "%s", mdp); |
@@ -1662,6 +1665,8 @@ lpfc_pci_remove_one(struct pci_dev *pdev) | |||
1662 | static struct pci_device_id lpfc_id_table[] = { | 1665 | static struct pci_device_id lpfc_id_table[] = { |
1663 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_VIPER, | 1666 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_VIPER, |
1664 | PCI_ANY_ID, PCI_ANY_ID, }, | 1667 | PCI_ANY_ID, PCI_ANY_ID, }, |
1668 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FIREFLY, | ||
1669 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
1665 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_THOR, | 1670 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_THOR, |
1666 | PCI_ANY_ID, PCI_ANY_ID, }, | 1671 | PCI_ANY_ID, PCI_ANY_ID, }, |
1667 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PEGASUS, | 1672 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PEGASUS, |
@@ -1712,6 +1717,7 @@ lpfc_init(void) | |||
1712 | int error = 0; | 1717 | int error = 0; |
1713 | 1718 | ||
1714 | printk(LPFC_MODULE_DESC "\n"); | 1719 | printk(LPFC_MODULE_DESC "\n"); |
1720 | printk(LPFC_COPYRIGHT "\n"); | ||
1715 | 1721 | ||
1716 | lpfc_transport_template = | 1722 | lpfc_transport_template = |
1717 | fc_attach_transport(&lpfc_transport_functions); | 1723 | fc_attach_transport(&lpfc_transport_functions); |
diff --git a/drivers/scsi/lpfc/lpfc_logmsg.h b/drivers/scsi/lpfc/lpfc_logmsg.h index a85268880fae..62c8ca862e9e 100644 --- a/drivers/scsi/lpfc/lpfc_logmsg.h +++ b/drivers/scsi/lpfc/lpfc_logmsg.h | |||
@@ -1,27 +1,23 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | ||
22 | * $Id: lpfc_logmsg.h 1.32 2005/01/25 17:52:01EST sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #define LOG_ELS 0x1 /* ELS events */ | 21 | #define LOG_ELS 0x1 /* ELS events */ |
26 | #define LOG_DISCOVERY 0x2 /* Link discovery events */ | 22 | #define LOG_DISCOVERY 0x2 /* Link discovery events */ |
27 | #define LOG_MBOX 0x4 /* Mailbox events */ | 23 | #define LOG_MBOX 0x4 /* Mailbox events */ |
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 - |
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 4397e1160712..a5cfb6421fa9 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.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_mem.c 1.79 2005/04/13 14:25:50EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/mempool.h> | 22 | #include <linux/mempool.h> |
26 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
27 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index e7470a4738c5..45dc0210fc49 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.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_nportdisc.c 1.179 2005/04/13 11:59:13EDT 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> |
@@ -950,8 +947,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_hba * phba, | |||
950 | lpfc_unreg_rpi(phba, ndlp); | 947 | lpfc_unreg_rpi(phba, ndlp); |
951 | return (ndlp->nlp_state); | 948 | return (ndlp->nlp_state); |
952 | } | 949 | } |
953 | ndlp->nlp_state = NLP_STE_MAPPED_NODE; | 950 | if (ndlp->nlp_type & NLP_FCP_TARGET) { |
954 | lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST); | 951 | ndlp->nlp_state = NLP_STE_MAPPED_NODE; |
952 | lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST); | ||
953 | } else { | ||
954 | ndlp->nlp_state = NLP_STE_UNMAPPED_NODE; | ||
955 | lpfc_nlp_list(phba, ndlp, NLP_UNMAPPED_LIST); | ||
956 | } | ||
955 | return (ndlp->nlp_state); | 957 | return (ndlp->nlp_state); |
956 | } | 958 | } |
957 | 959 | ||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index f2aff3f4042b..17e4974d4445 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.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_scsi.c 1.37 2005/04/13 14:27:09EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
26 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
27 | 24 | ||
@@ -874,6 +871,7 @@ __lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
874 | else | 871 | else |
875 | icmd->ulpCommand = CMD_CLOSE_XRI_CN; | 872 | icmd->ulpCommand = CMD_CLOSE_XRI_CN; |
876 | 873 | ||
874 | abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl; | ||
877 | if (lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0) == | 875 | if (lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0) == |
878 | IOCB_ERROR) { | 876 | IOCB_ERROR) { |
879 | list_add_tail(&abtsiocb->list, lpfc_iocb_list); | 877 | list_add_tail(&abtsiocb->list, lpfc_iocb_list); |
@@ -1273,4 +1271,5 @@ struct scsi_host_template lpfc_template = { | |||
1273 | .cmd_per_lun = LPFC_CMD_PER_LUN, | 1271 | .cmd_per_lun = LPFC_CMD_PER_LUN, |
1274 | .use_clustering = ENABLE_CLUSTERING, | 1272 | .use_clustering = ENABLE_CLUSTERING, |
1275 | .shost_attrs = lpfc_host_attrs, | 1273 | .shost_attrs = lpfc_host_attrs, |
1274 | .max_sectors = 0xFFFF, | ||
1276 | }; | 1275 | }; |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.h b/drivers/scsi/lpfc/lpfc_scsi.h index 4aafba47628d..0fd9ba14e1b5 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.h +++ b/drivers/scsi/lpfc/lpfc_scsi.h | |||
@@ -1,26 +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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | 21 | #include <asm/byteorder.h> |
22 | * $Id: lpfc_scsi.h 1.83 2005/04/07 08:47:43EDT sf_support Exp $ | ||
23 | */ | ||
24 | 22 | ||
25 | struct lpfc_hba; | 23 | struct lpfc_hba; |
26 | 24 | ||
@@ -85,7 +83,7 @@ struct fcp_cmnd { | |||
85 | /* # of bits to shift lun id to end up in right | 83 | /* # of bits to shift lun id to end up in right |
86 | * payload word, little endian = 8, big = 16. | 84 | * payload word, little endian = 8, big = 16. |
87 | */ | 85 | */ |
88 | #if __BIG_ENDIAN | 86 | #ifdef __BIG_ENDIAN |
89 | #define FC_LUN_SHIFT 16 | 87 | #define FC_LUN_SHIFT 16 |
90 | #define FC_ADDR_MODE_SHIFT 24 | 88 | #define FC_ADDR_MODE_SHIFT 24 |
91 | #else /* __LITTLE_ENDIAN */ | 89 | #else /* __LITTLE_ENDIAN */ |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 8d14b28c80b9..1775508ed276 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.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_sli.c 1.232 2005/04/13 11:59:16EDT 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> |
@@ -225,8 +222,7 @@ lpfc_sli_ringtx_get(struct lpfc_hba * phba, struct lpfc_sli_ring * pring) | |||
225 | static IOCB_t * | 222 | static IOCB_t * |
226 | lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) | 223 | lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) |
227 | { | 224 | { |
228 | MAILBOX_t *mbox = (MAILBOX_t *)phba->sli.MBhostaddr; | 225 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno]; |
229 | PGP *pgp = (PGP *)&mbox->us.s2.port[pring->ringno]; | ||
230 | uint32_t max_cmd_idx = pring->numCiocb; | 226 | uint32_t max_cmd_idx = pring->numCiocb; |
231 | IOCB_t *iocb = NULL; | 227 | IOCB_t *iocb = NULL; |
232 | 228 | ||
@@ -411,9 +407,7 @@ lpfc_sli_resume_iocb(struct lpfc_hba * phba, struct lpfc_sli_ring * pring) | |||
411 | static void | 407 | static void |
412 | lpfc_sli_turn_on_ring(struct lpfc_hba * phba, int ringno) | 408 | lpfc_sli_turn_on_ring(struct lpfc_hba * phba, int ringno) |
413 | { | 409 | { |
414 | PGP *pgp = | 410 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[ringno]; |
415 | ((PGP *) & | ||
416 | (((MAILBOX_t *)phba->sli.MBhostaddr)->us.s2.port[ringno])); | ||
417 | 411 | ||
418 | /* If the ring is active, flag it */ | 412 | /* If the ring is active, flag it */ |
419 | if (phba->sli.ring[ringno].cmdringaddr) { | 413 | if (phba->sli.ring[ringno].cmdringaddr) { |
@@ -537,7 +531,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba * phba) | |||
537 | /* Get a Mailbox buffer to setup mailbox commands for callback */ | 531 | /* Get a Mailbox buffer to setup mailbox commands for callback */ |
538 | if ((pmb = phba->sli.mbox_active)) { | 532 | if ((pmb = phba->sli.mbox_active)) { |
539 | pmbox = &pmb->mb; | 533 | pmbox = &pmb->mb; |
540 | mbox = (MAILBOX_t *) phba->sli.MBhostaddr; | 534 | mbox = &phba->slim2p->mbx; |
541 | 535 | ||
542 | /* First check out the status word */ | 536 | /* First check out the status word */ |
543 | lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof (uint32_t)); | 537 | lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof (uint32_t)); |
@@ -905,10 +899,11 @@ static int | |||
905 | lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | 899 | lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, |
906 | struct lpfc_sli_ring * pring, uint32_t mask) | 900 | struct lpfc_sli_ring * pring, uint32_t mask) |
907 | { | 901 | { |
902 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno]; | ||
908 | IOCB_t *irsp = NULL; | 903 | IOCB_t *irsp = NULL; |
904 | IOCB_t *entry = NULL; | ||
909 | struct lpfc_iocbq *cmdiocbq = NULL; | 905 | struct lpfc_iocbq *cmdiocbq = NULL; |
910 | struct lpfc_iocbq rspiocbq; | 906 | struct lpfc_iocbq rspiocbq; |
911 | PGP *pgp; | ||
912 | uint32_t status; | 907 | uint32_t status; |
913 | uint32_t portRspPut, portRspMax; | 908 | uint32_t portRspPut, portRspMax; |
914 | int rc = 1; | 909 | int rc = 1; |
@@ -920,10 +915,6 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
920 | spin_lock_irqsave(phba->host->host_lock, iflag); | 915 | spin_lock_irqsave(phba->host->host_lock, iflag); |
921 | pring->stats.iocb_event++; | 916 | pring->stats.iocb_event++; |
922 | 917 | ||
923 | /* The driver assumes SLI-2 mode */ | ||
924 | pgp = (PGP *) &((MAILBOX_t *) phba->sli.MBhostaddr) | ||
925 | ->us.s2.port[pring->ringno]; | ||
926 | |||
927 | /* | 918 | /* |
928 | * The next available response entry should never exceed the maximum | 919 | * The next available response entry should never exceed the maximum |
929 | * entries. If it does, treat it as an adapter hardware error. | 920 | * entries. If it does, treat it as an adapter hardware error. |
@@ -955,7 +946,17 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
955 | 946 | ||
956 | rmb(); | 947 | rmb(); |
957 | while (pring->rspidx != portRspPut) { | 948 | while (pring->rspidx != portRspPut) { |
958 | irsp = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx); | 949 | /* |
950 | * Fetch an entry off the ring and copy it into a local data | ||
951 | * structure. The copy involves a byte-swap since the | ||
952 | * network byte order and pci byte orders are different. | ||
953 | */ | ||
954 | entry = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx); | ||
955 | lpfc_sli_pcimem_bcopy((uint32_t *) entry, | ||
956 | (uint32_t *) &rspiocbq.iocb, | ||
957 | sizeof (IOCB_t)); | ||
958 | irsp = &rspiocbq.iocb; | ||
959 | |||
959 | type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK); | 960 | type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK); |
960 | pring->stats.iocb_rsp++; | 961 | pring->stats.iocb_rsp++; |
961 | rsp_cmpl++; | 962 | rsp_cmpl++; |
@@ -987,10 +988,6 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, | |||
987 | break; | 988 | break; |
988 | } | 989 | } |
989 | 990 | ||
990 | rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4]; | ||
991 | rspiocbq.iocb.ulpStatus = irsp->ulpStatus; | ||
992 | rspiocbq.iocb.ulpContext = irsp->ulpContext; | ||
993 | rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag; | ||
994 | cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba, | 991 | cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba, |
995 | pring, | 992 | pring, |
996 | &rspiocbq); | 993 | &rspiocbq); |
@@ -1075,9 +1072,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba, | |||
1075 | struct lpfc_iocbq *cmdiocbp; | 1072 | struct lpfc_iocbq *cmdiocbp; |
1076 | struct lpfc_iocbq *saveq; | 1073 | struct lpfc_iocbq *saveq; |
1077 | struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list; | 1074 | struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list; |
1078 | HGP *hgp; | 1075 | struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno]; |
1079 | PGP *pgp; | ||
1080 | MAILBOX_t *mbox; | ||
1081 | uint8_t iocb_cmd_type; | 1076 | uint8_t iocb_cmd_type; |
1082 | lpfc_iocb_type type; | 1077 | lpfc_iocb_type type; |
1083 | uint32_t status, free_saveq; | 1078 | uint32_t status, free_saveq; |
@@ -1089,11 +1084,6 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba, | |||
1089 | spin_lock_irqsave(phba->host->host_lock, iflag); | 1084 | spin_lock_irqsave(phba->host->host_lock, iflag); |
1090 | pring->stats.iocb_event++; | 1085 | pring->stats.iocb_event++; |
1091 | 1086 | ||
1092 | /* The driver assumes SLI-2 mode */ | ||
1093 | mbox = (MAILBOX_t *) phba->sli.MBhostaddr; | ||
1094 | pgp = (PGP *) & mbox->us.s2.port[pring->ringno]; | ||
1095 | hgp = (HGP *) & mbox->us.s2.host[pring->ringno]; | ||
1096 | |||
1097 | /* | 1087 | /* |
1098 | * The next available response entry should never exceed the maximum | 1088 | * The next available response entry should never exceed the maximum |
1099 | * entries. If it does, treat it as an adapter hardware error. | 1089 | * entries. If it does, treat it as an adapter hardware error. |
@@ -1738,6 +1728,8 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
1738 | return; | 1728 | return; |
1739 | } | 1729 | } |
1740 | 1730 | ||
1731 | phba->work_hba_events &= ~WORKER_MBOX_TMO; | ||
1732 | |||
1741 | pmbox = phba->sli.mbox_active; | 1733 | pmbox = phba->sli.mbox_active; |
1742 | mb = &pmbox->mb; | 1734 | mb = &pmbox->mb; |
1743 | 1735 | ||
@@ -1752,16 +1744,14 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
1752 | phba->sli.sli_flag, | 1744 | phba->sli.sli_flag, |
1753 | phba->sli.mbox_active); | 1745 | phba->sli.mbox_active); |
1754 | 1746 | ||
1755 | if (phba->sli.mbox_active == pmbox) { | 1747 | phba->sli.mbox_active = NULL; |
1756 | phba->sli.mbox_active = NULL; | 1748 | if (pmbox->mbox_cmpl) { |
1757 | if (pmbox->mbox_cmpl) { | 1749 | mb->mbxStatus = MBX_NOT_FINISHED; |
1758 | mb->mbxStatus = MBX_NOT_FINISHED; | 1750 | spin_unlock_irq(phba->host->host_lock); |
1759 | spin_unlock_irq(phba->host->host_lock); | 1751 | (pmbox->mbox_cmpl) (phba, pmbox); |
1760 | (pmbox->mbox_cmpl) (phba, pmbox); | 1752 | spin_lock_irq(phba->host->host_lock); |
1761 | spin_lock_irq(phba->host->host_lock); | ||
1762 | } | ||
1763 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
1764 | } | 1753 | } |
1754 | phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | ||
1765 | 1755 | ||
1766 | spin_unlock_irq(phba->host->host_lock); | 1756 | spin_unlock_irq(phba->host->host_lock); |
1767 | lpfc_mbox_abort(phba); | 1757 | lpfc_mbox_abort(phba); |
@@ -1771,7 +1761,6 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
1771 | int | 1761 | int |
1772 | lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) | 1762 | lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) |
1773 | { | 1763 | { |
1774 | MAILBOX_t *mbox; | ||
1775 | MAILBOX_t *mb; | 1764 | MAILBOX_t *mb; |
1776 | struct lpfc_sli *psli; | 1765 | struct lpfc_sli *psli; |
1777 | uint32_t status, evtctr; | 1766 | uint32_t status, evtctr; |
@@ -1901,15 +1890,13 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) | |||
1901 | mb->mbxOwner = OWN_CHIP; | 1890 | mb->mbxOwner = OWN_CHIP; |
1902 | 1891 | ||
1903 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { | 1892 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { |
1904 | |||
1905 | /* First copy command data to host SLIM area */ | 1893 | /* First copy command data to host SLIM area */ |
1906 | mbox = (MAILBOX_t *) psli->MBhostaddr; | 1894 | lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx, MAILBOX_CMD_SIZE); |
1907 | lpfc_sli_pcimem_bcopy(mb, mbox, MAILBOX_CMD_SIZE); | ||
1908 | } else { | 1895 | } else { |
1909 | if (mb->mbxCommand == MBX_CONFIG_PORT) { | 1896 | if (mb->mbxCommand == MBX_CONFIG_PORT) { |
1910 | /* copy command data into host mbox for cmpl */ | 1897 | /* copy command data into host mbox for cmpl */ |
1911 | mbox = (MAILBOX_t *) psli->MBhostaddr; | 1898 | lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx, |
1912 | lpfc_sli_pcimem_bcopy(mb, mbox, MAILBOX_CMD_SIZE); | 1899 | MAILBOX_CMD_SIZE); |
1913 | } | 1900 | } |
1914 | 1901 | ||
1915 | /* First copy mbox command data to HBA SLIM, skip past first | 1902 | /* First copy mbox command data to HBA SLIM, skip past first |
@@ -1946,8 +1933,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) | |||
1946 | psli->mbox_active = NULL; | 1933 | psli->mbox_active = NULL; |
1947 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { | 1934 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { |
1948 | /* First read mbox status word */ | 1935 | /* First read mbox status word */ |
1949 | mbox = (MAILBOX_t *) psli->MBhostaddr; | 1936 | word0 = *((volatile uint32_t *)&phba->slim2p->mbx); |
1950 | word0 = *((volatile uint32_t *)mbox); | ||
1951 | word0 = le32_to_cpu(word0); | 1937 | word0 = le32_to_cpu(word0); |
1952 | } else { | 1938 | } else { |
1953 | /* First read mbox status word */ | 1939 | /* First read mbox status word */ |
@@ -1984,8 +1970,8 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) | |||
1984 | 1970 | ||
1985 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { | 1971 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { |
1986 | /* First copy command data */ | 1972 | /* First copy command data */ |
1987 | mbox = (MAILBOX_t *) psli->MBhostaddr; | 1973 | word0 = *((volatile uint32_t *) |
1988 | word0 = *((volatile uint32_t *)mbox); | 1974 | &phba->slim2p->mbx); |
1989 | word0 = le32_to_cpu(word0); | 1975 | word0 = le32_to_cpu(word0); |
1990 | if (mb->mbxCommand == MBX_CONFIG_PORT) { | 1976 | if (mb->mbxCommand == MBX_CONFIG_PORT) { |
1991 | MAILBOX_t *slimmb; | 1977 | MAILBOX_t *slimmb; |
@@ -2009,10 +1995,9 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) | |||
2009 | } | 1995 | } |
2010 | 1996 | ||
2011 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { | 1997 | if (psli->sli_flag & LPFC_SLI2_ACTIVE) { |
2012 | /* First copy command data */ | ||
2013 | mbox = (MAILBOX_t *) psli->MBhostaddr; | ||
2014 | /* copy results back to user */ | 1998 | /* copy results back to user */ |
2015 | lpfc_sli_pcimem_bcopy(mbox, mb, MAILBOX_CMD_SIZE); | 1999 | lpfc_sli_pcimem_bcopy(&phba->slim2p->mbx, mb, |
2000 | MAILBOX_CMD_SIZE); | ||
2016 | } else { | 2001 | } else { |
2017 | /* First copy command data */ | 2002 | /* First copy command data */ |
2018 | lpfc_memcpy_from_slim(mb, phba->MBslimaddr, | 2003 | lpfc_memcpy_from_slim(mb, phba->MBslimaddr, |
@@ -2089,8 +2074,6 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
2089 | switch (piocb->iocb.ulpCommand) { | 2074 | switch (piocb->iocb.ulpCommand) { |
2090 | case CMD_QUE_RING_BUF_CN: | 2075 | case CMD_QUE_RING_BUF_CN: |
2091 | case CMD_QUE_RING_BUF64_CN: | 2076 | case CMD_QUE_RING_BUF64_CN: |
2092 | case CMD_CLOSE_XRI_CN: | ||
2093 | case CMD_ABORT_XRI_CN: | ||
2094 | /* | 2077 | /* |
2095 | * For IOCBs, like QUE_RING_BUF, that have no rsp ring | 2078 | * For IOCBs, like QUE_RING_BUF, that have no rsp ring |
2096 | * completion, iocb_cmpl MUST be 0. | 2079 | * completion, iocb_cmpl MUST be 0. |
@@ -2573,6 +2556,16 @@ lpfc_sli_sum_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
2573 | return sum; | 2556 | return sum; |
2574 | } | 2557 | } |
2575 | 2558 | ||
2559 | void | ||
2560 | lpfc_sli_abort_fcp_cmpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | ||
2561 | struct lpfc_iocbq * rspiocb) | ||
2562 | { | ||
2563 | spin_lock_irq(phba->host->host_lock); | ||
2564 | list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list); | ||
2565 | spin_unlock_irq(phba->host->host_lock); | ||
2566 | return; | ||
2567 | } | ||
2568 | |||
2576 | int | 2569 | int |
2577 | lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | 2570 | lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, |
2578 | uint16_t tgt_id, uint64_t lun_id, uint32_t ctx, | 2571 | uint16_t tgt_id, uint64_t lun_id, uint32_t ctx, |
@@ -2622,6 +2615,8 @@ lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
2622 | else | 2615 | else |
2623 | abtsiocb->iocb.ulpCommand = CMD_CLOSE_XRI_CN; | 2616 | abtsiocb->iocb.ulpCommand = CMD_CLOSE_XRI_CN; |
2624 | 2617 | ||
2618 | /* Setup callback routine and issue the command. */ | ||
2619 | abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl; | ||
2625 | ret_val = lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0); | 2620 | ret_val = lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0); |
2626 | if (ret_val == IOCB_ERROR) { | 2621 | if (ret_val == IOCB_ERROR) { |
2627 | list_add_tail(&abtsiocb->list, lpfc_iocb_list); | 2622 | list_add_tail(&abtsiocb->list, lpfc_iocb_list); |
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index abd9a8c84e9e..6c74f3c85ff7 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h | |||
@@ -1,27 +1,23 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | ||
22 | * $Id: lpfc_sli.h 1.42 2005/03/21 02:01:28EST sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | /* forward declaration for LPFC_IOCB_t's use */ | 21 | /* forward declaration for LPFC_IOCB_t's use */ |
26 | struct lpfc_hba; | 22 | struct lpfc_hba; |
27 | 23 | ||
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index dfacd8d82097..47dea48ee0ec 100644 --- a/drivers/scsi/lpfc/lpfc_version.h +++ b/drivers/scsi/lpfc/lpfc_version.h | |||
@@ -1,32 +1,29 @@ | |||
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 * |
8 | * * | 7 | * * |
9 | * This program is free software; you can redistribute it and/or * | 8 | * This program is free software; you can redistribute it and/or * |
10 | * modify it under the terms of the GNU General Public License * | 9 | * modify it under the terms of version 2 of the GNU General * |
11 | * as published by the Free Software Foundation; either version 2 * | 10 | * Public License as published by the Free Software Foundation. * |
12 | * of the License, or (at your option) any later version. * | 11 | * This program is distributed in the hope that it will be useful. * |
13 | * * | 12 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * |
14 | * This program is distributed in the hope that it will be useful, * | 13 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 14 | * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 15 | * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * |
17 | * GNU General Public License for more details, a copy of which * | 16 | * TO BE LEGALLY INVALID. See the GNU General Public License for * |
18 | * can be found in the file COPYING included with this package. * | 17 | * more details, a copy of which can be found in the file COPYING * |
18 | * included with this package. * | ||
19 | *******************************************************************/ | 19 | *******************************************************************/ |
20 | 20 | ||
21 | /* | 21 | #define LPFC_DRIVER_VERSION "8.0.29" |
22 | * $Id: lpfc_version.h 1.49 2005/04/13 15:07:19EDT sf_support Exp $ | ||
23 | */ | ||
24 | |||
25 | #define LPFC_DRIVER_VERSION "8.0.28" | ||
26 | 22 | ||
27 | #define LPFC_DRIVER_NAME "lpfc" | 23 | #define LPFC_DRIVER_NAME "lpfc" |
28 | 24 | ||
29 | #define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \ | 25 | #define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \ |
30 | LPFC_DRIVER_VERSION | 26 | LPFC_DRIVER_VERSION |
27 | #define LPFC_COPYRIGHT "Copyright(c) 2004-2005 Emulex. All rights reserved." | ||
31 | 28 | ||
32 | #define DFC_API_VERSION "0.0.0" | 29 | #define DFC_API_VERSION "0.0.0" |