diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-09-04 13:25:44 -0400 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2013-09-04 13:25:44 -0400 |
commit | 3bc4f3993b93dbf1f6402e2034a2e20eb07db807 (patch) | |
tree | 592283e59e121b76355836295d6016fe33cfc5d1 /drivers/scsi/mpt2sas | |
parent | 17638db1b88184d8895f3f4551c936d7480a1d3f (diff) | |
parent | cb3e4330e697dffaf3d9cefebc9c7e7d39c89f2e (diff) |
Merge remote branch 'origin/master' into next-merge
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2.h | 7 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | 10 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_init.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_ioc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_raid.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_sas.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_tool.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpi/mpi2_type.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 40 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.h | 10 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_config.c | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.c | 14 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_debug.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 82 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_transport.c | 7 |
16 files changed, 107 insertions, 81 deletions
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2.h b/drivers/scsi/mpt2sas/mpi/mpi2.h index 31b5b15a4726..7b14a015c903 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2012 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2.h | 5 | * Name: mpi2.h |
@@ -8,7 +8,7 @@ | |||
8 | * scatter/gather formats. | 8 | * scatter/gather formats. |
9 | * Creation Date: June 21, 2006 | 9 | * Creation Date: June 21, 2006 |
10 | * | 10 | * |
11 | * mpi2.h Version: 02.00.27 | 11 | * mpi2.h Version: 02.00.28 |
12 | * | 12 | * |
13 | * Version History | 13 | * Version History |
14 | * --------------- | 14 | * --------------- |
@@ -77,6 +77,7 @@ | |||
77 | * Added Hard Reset delay timings. | 77 | * Added Hard Reset delay timings. |
78 | * 07-10-12 02.00.26 Bumped MPI2_HEADER_VERSION_UNIT. | 78 | * 07-10-12 02.00.26 Bumped MPI2_HEADER_VERSION_UNIT. |
79 | * 07-26-12 02.00.27 Bumped MPI2_HEADER_VERSION_UNIT. | 79 | * 07-26-12 02.00.27 Bumped MPI2_HEADER_VERSION_UNIT. |
80 | * 11-27-12 02.00.28 Bumped MPI2_HEADER_VERSION_UNIT. | ||
80 | * -------------------------------------------------------------------------- | 81 | * -------------------------------------------------------------------------- |
81 | */ | 82 | */ |
82 | 83 | ||
@@ -102,7 +103,7 @@ | |||
102 | #define MPI2_VERSION_02_00 (0x0200) | 103 | #define MPI2_VERSION_02_00 (0x0200) |
103 | 104 | ||
104 | /* versioning for this MPI header set */ | 105 | /* versioning for this MPI header set */ |
105 | #define MPI2_HEADER_VERSION_UNIT (0x1B) | 106 | #define MPI2_HEADER_VERSION_UNIT (0x1C) |
106 | #define MPI2_HEADER_VERSION_DEV (0x00) | 107 | #define MPI2_HEADER_VERSION_DEV (0x00) |
107 | #define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00) | 108 | #define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00) |
108 | #define MPI2_HEADER_VERSION_UNIT_SHIFT (8) | 109 | #define MPI2_HEADER_VERSION_UNIT_SHIFT (8) |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h index 737fa8cfb54a..88cb7f828bbd 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2011 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_cnfg.h | 5 | * Name: mpi2_cnfg.h |
6 | * Title: MPI Configuration messages and pages | 6 | * Title: MPI Configuration messages and pages |
7 | * Creation Date: November 10, 2006 | 7 | * Creation Date: November 10, 2006 |
8 | * | 8 | * |
9 | * mpi2_cnfg.h Version: 02.00.22 | 9 | * mpi2_cnfg.h Version: 02.00.23 |
10 | * | 10 | * |
11 | * Version History | 11 | * Version History |
12 | * --------------- | 12 | * --------------- |
@@ -149,6 +149,8 @@ | |||
149 | * 11-18-11 02.00.22 Added define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT. | 149 | * 11-18-11 02.00.22 Added define MPI2_IOCPAGE6_CAP_FLAGS_4K_SECTORS_SUPPORT. |
150 | * Added UEFIVersion field to BIOS Page 1 and defined new | 150 | * Added UEFIVersion field to BIOS Page 1 and defined new |
151 | * BiosOptions bits. | 151 | * BiosOptions bits. |
152 | * 11-27-12 02.00.23 Added MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER. | ||
153 | * Added MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID. | ||
152 | * -------------------------------------------------------------------------- | 154 | * -------------------------------------------------------------------------- |
153 | */ | 155 | */ |
154 | 156 | ||
@@ -698,6 +700,7 @@ typedef struct _MPI2_CONFIG_PAGE_MAN_7 | |||
698 | #define MPI2_MANUFACTURING7_PAGEVERSION (0x01) | 700 | #define MPI2_MANUFACTURING7_PAGEVERSION (0x01) |
699 | 701 | ||
700 | /* defines for the Flags field */ | 702 | /* defines for the Flags field */ |
703 | #define MPI2_MANPAGE7_FLAG_EVENTREPLAY_SLOT_ORDER (0x00000002) | ||
701 | #define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001) | 704 | #define MPI2_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001) |
702 | 705 | ||
703 | 706 | ||
@@ -1224,6 +1227,9 @@ typedef struct _MPI2_CONFIG_PAGE_BIOS_1 | |||
1224 | #define MPI2_BIOSPAGE1_PAGEVERSION (0x05) | 1227 | #define MPI2_BIOSPAGE1_PAGEVERSION (0x05) |
1225 | 1228 | ||
1226 | /* values for BIOS Page 1 BiosOptions field */ | 1229 | /* values for BIOS Page 1 BiosOptions field */ |
1230 | #define MPI2_BIOSPAGE1_OPTIONS_MASK_OEM_ID (0x000000F0) | ||
1231 | #define MPI2_BIOSPAGE1_OPTIONS_LSI_OEM_ID (0x00000000) | ||
1232 | |||
1227 | #define MPI2_BIOSPAGE1_OPTIONS_MASK_UEFI_HII_REGISTRATION (0x00000006) | 1233 | #define MPI2_BIOSPAGE1_OPTIONS_MASK_UEFI_HII_REGISTRATION (0x00000006) |
1228 | #define MPI2_BIOSPAGE1_OPTIONS_ENABLE_UEFI_HII (0x00000000) | 1234 | #define MPI2_BIOSPAGE1_OPTIONS_ENABLE_UEFI_HII (0x00000000) |
1229 | #define MPI2_BIOSPAGE1_OPTIONS_DISABLE_UEFI_HII (0x00000002) | 1235 | #define MPI2_BIOSPAGE1_OPTIONS_DISABLE_UEFI_HII (0x00000002) |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_init.h b/drivers/scsi/mpt2sas/mpi/mpi2_init.h index 963761fb8462..9d284dae6553 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_init.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_init.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2012 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_init.h | 5 | * Name: mpi2_init.h |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_ioc.h b/drivers/scsi/mpt2sas/mpi/mpi2_ioc.h index e93f8f53adf9..d159c5f24aab 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_ioc.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_ioc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2012 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_ioc.h | 5 | * Name: mpi2_ioc.h |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_raid.h b/drivers/scsi/mpt2sas/mpi/mpi2_raid.h index 255b0ca219a4..0d202a2c6db7 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_raid.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_raid.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2012 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_raid.h | 5 | * Name: mpi2_raid.h |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_sas.h b/drivers/scsi/mpt2sas/mpi/mpi2_sas.h index fdffde1ebc0f..50b39ccd526a 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_sas.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_sas.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2010 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_sas.h | 5 | * Name: mpi2_sas.h |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_tool.h b/drivers/scsi/mpt2sas/mpi/mpi2_tool.h index 67c387f10e59..11b2ac4e7c6e 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_tool.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_tool.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2012 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_tool.h | 5 | * Name: mpi2_tool.h |
diff --git a/drivers/scsi/mpt2sas/mpi/mpi2_type.h b/drivers/scsi/mpt2sas/mpi/mpi2_type.h index cfde017bf16e..0b128b68a5ea 100644 --- a/drivers/scsi/mpt2sas/mpi/mpi2_type.h +++ b/drivers/scsi/mpt2sas/mpi/mpi2_type.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2007 LSI Corporation. | 2 | * Copyright (c) 2000-2013 LSI Corporation. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * Name: mpi2_type.h | 5 | * Name: mpi2_type.h |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index ccd6d5a97ec3..3901edc35812 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * for access to MPT (Message Passing Technology) firmware. | 3 | * for access to MPT (Message Passing Technology) firmware. |
4 | * | 4 | * |
5 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c | 5 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c |
6 | * Copyright (C) 2007-2012 LSI Corporation | 6 | * Copyright (C) 2007-2013 LSI Corporation |
7 | * (mailto:DL-MPTFusionLinux@lsi.com) | 7 | * (mailto:DL-MPTFusionLinux@lsi.com) |
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 |
@@ -768,10 +768,9 @@ mpt2sas_base_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, | |||
768 | * @msix_index: MSIX table index supplied by the OS | 768 | * @msix_index: MSIX table index supplied by the OS |
769 | * @reply: reply message frame(lower 32bit addr) | 769 | * @reply: reply message frame(lower 32bit addr) |
770 | * | 770 | * |
771 | * Return 1 meaning mf should be freed from _base_interrupt | 771 | * Returns void. |
772 | * 0 means the mf is freed from this function. | ||
773 | */ | 772 | */ |
774 | static u8 | 773 | static void |
775 | _base_async_event(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, u32 reply) | 774 | _base_async_event(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, u32 reply) |
776 | { | 775 | { |
777 | Mpi2EventNotificationReply_t *mpi_reply; | 776 | Mpi2EventNotificationReply_t *mpi_reply; |
@@ -780,9 +779,9 @@ _base_async_event(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, u32 reply) | |||
780 | 779 | ||
781 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); | 780 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); |
782 | if (!mpi_reply) | 781 | if (!mpi_reply) |
783 | return 1; | 782 | return; |
784 | if (mpi_reply->Function != MPI2_FUNCTION_EVENT_NOTIFICATION) | 783 | if (mpi_reply->Function != MPI2_FUNCTION_EVENT_NOTIFICATION) |
785 | return 1; | 784 | return; |
786 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING | 785 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING |
787 | _base_display_event_data(ioc, mpi_reply); | 786 | _base_display_event_data(ioc, mpi_reply); |
788 | #endif | 787 | #endif |
@@ -812,7 +811,7 @@ _base_async_event(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, u32 reply) | |||
812 | /* ctl callback handler */ | 811 | /* ctl callback handler */ |
813 | mpt2sas_ctl_event_callback(ioc, msix_index, reply); | 812 | mpt2sas_ctl_event_callback(ioc, msix_index, reply); |
814 | 813 | ||
815 | return 1; | 814 | return; |
816 | } | 815 | } |
817 | 816 | ||
818 | /** | 817 | /** |
@@ -1409,8 +1408,6 @@ _base_enable_msix(struct MPT2SAS_ADAPTER *ioc) | |||
1409 | int i; | 1408 | int i; |
1410 | u8 try_msix = 0; | 1409 | u8 try_msix = 0; |
1411 | 1410 | ||
1412 | INIT_LIST_HEAD(&ioc->reply_queue_list); | ||
1413 | |||
1414 | if (msix_disable == -1 || msix_disable == 0) | 1411 | if (msix_disable == -1 || msix_disable == 0) |
1415 | try_msix = 1; | 1412 | try_msix = 1; |
1416 | 1413 | ||
@@ -1489,6 +1486,7 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
1489 | if (pci_enable_device_mem(pdev)) { | 1486 | if (pci_enable_device_mem(pdev)) { |
1490 | printk(MPT2SAS_WARN_FMT "pci_enable_device_mem: " | 1487 | printk(MPT2SAS_WARN_FMT "pci_enable_device_mem: " |
1491 | "failed\n", ioc->name); | 1488 | "failed\n", ioc->name); |
1489 | ioc->bars = 0; | ||
1492 | return -ENODEV; | 1490 | return -ENODEV; |
1493 | } | 1491 | } |
1494 | 1492 | ||
@@ -1497,6 +1495,7 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
1497 | MPT2SAS_DRIVER_NAME)) { | 1495 | MPT2SAS_DRIVER_NAME)) { |
1498 | printk(MPT2SAS_WARN_FMT "pci_request_selected_regions: " | 1496 | printk(MPT2SAS_WARN_FMT "pci_request_selected_regions: " |
1499 | "failed\n", ioc->name); | 1497 | "failed\n", ioc->name); |
1498 | ioc->bars = 0; | ||
1500 | r = -ENODEV; | 1499 | r = -ENODEV; |
1501 | goto out_fail; | 1500 | goto out_fail; |
1502 | } | 1501 | } |
@@ -4229,18 +4228,25 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc) | |||
4229 | dexitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name, | 4228 | dexitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name, |
4230 | __func__)); | 4229 | __func__)); |
4231 | 4230 | ||
4232 | _base_mask_interrupts(ioc); | 4231 | if (ioc->chip_phys && ioc->chip) { |
4233 | ioc->shost_recovery = 1; | 4232 | _base_mask_interrupts(ioc); |
4234 | _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET); | 4233 | ioc->shost_recovery = 1; |
4235 | ioc->shost_recovery = 0; | 4234 | _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET); |
4235 | ioc->shost_recovery = 0; | ||
4236 | } | ||
4237 | |||
4236 | _base_free_irq(ioc); | 4238 | _base_free_irq(ioc); |
4237 | _base_disable_msix(ioc); | 4239 | _base_disable_msix(ioc); |
4238 | if (ioc->chip_phys) | 4240 | |
4241 | if (ioc->chip_phys && ioc->chip) | ||
4239 | iounmap(ioc->chip); | 4242 | iounmap(ioc->chip); |
4240 | ioc->chip_phys = 0; | 4243 | ioc->chip_phys = 0; |
4241 | pci_release_selected_regions(ioc->pdev, ioc->bars); | 4244 | |
4242 | pci_disable_pcie_error_reporting(pdev); | 4245 | if (pci_is_enabled(pdev)) { |
4243 | pci_disable_device(pdev); | 4246 | pci_release_selected_regions(ioc->pdev, ioc->bars); |
4247 | pci_disable_pcie_error_reporting(pdev); | ||
4248 | pci_disable_device(pdev); | ||
4249 | } | ||
4244 | return; | 4250 | return; |
4245 | } | 4251 | } |
4246 | 4252 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index 6fbd08417773..1f2ac3a28621 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * for access to MPT (Message Passing Technology) firmware. | 3 | * for access to MPT (Message Passing Technology) firmware. |
4 | * | 4 | * |
5 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.h | 5 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.h |
6 | * Copyright (C) 2007-2012 LSI Corporation | 6 | * Copyright (C) 2007-2013 LSI Corporation |
7 | * (mailto:DL-MPTFusionLinux@lsi.com) | 7 | * (mailto:DL-MPTFusionLinux@lsi.com) |
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 |
@@ -69,8 +69,8 @@ | |||
69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" | 69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" |
70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" | 70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" |
71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" | 71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" |
72 | #define MPT2SAS_DRIVER_VERSION "15.100.00.00" | 72 | #define MPT2SAS_DRIVER_VERSION "16.100.00.00" |
73 | #define MPT2SAS_MAJOR_VERSION 15 | 73 | #define MPT2SAS_MAJOR_VERSION 16 |
74 | #define MPT2SAS_MINOR_VERSION 100 | 74 | #define MPT2SAS_MINOR_VERSION 100 |
75 | #define MPT2SAS_BUILD_VERSION 00 | 75 | #define MPT2SAS_BUILD_VERSION 00 |
76 | #define MPT2SAS_RELEASE_VERSION 00 | 76 | #define MPT2SAS_RELEASE_VERSION 00 |
@@ -1061,7 +1061,7 @@ void mpt2sas_base_update_missing_delay(struct MPT2SAS_ADAPTER *ioc, | |||
1061 | int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc); | 1061 | int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc); |
1062 | 1062 | ||
1063 | /* scsih shared API */ | 1063 | /* scsih shared API */ |
1064 | u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | 1064 | void mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, |
1065 | u32 reply); | 1065 | u32 reply); |
1066 | int mpt2sas_scsih_issue_tm(struct MPT2SAS_ADAPTER *ioc, u16 handle, | 1066 | int mpt2sas_scsih_issue_tm(struct MPT2SAS_ADAPTER *ioc, u16 handle, |
1067 | uint channel, uint id, uint lun, u8 type, u16 smid_task, | 1067 | uint channel, uint id, uint lun, u8 type, u16 smid_task, |
@@ -1144,7 +1144,7 @@ void mpt2sas_ctl_exit(void); | |||
1144 | u8 mpt2sas_ctl_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, | 1144 | u8 mpt2sas_ctl_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, |
1145 | u32 reply); | 1145 | u32 reply); |
1146 | void mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase); | 1146 | void mpt2sas_ctl_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase); |
1147 | u8 mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | 1147 | void mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, |
1148 | u32 reply); | 1148 | u32 reply); |
1149 | void mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc, | 1149 | void mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc, |
1150 | Mpi2EventNotificationReply_t *mpi_reply); | 1150 | Mpi2EventNotificationReply_t *mpi_reply); |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index 863778071a9d..0c47425c73f2 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * This module provides common API for accessing firmware configuration pages | 2 | * This module provides common API for accessing firmware configuration pages |
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c | 4 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c |
5 | * Copyright (C) 2007-2012 LSI Corporation | 5 | * Copyright (C) 2007-2013 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * (mailto:DL-MPTFusionLinux@lsi.com) |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index eec052c2670a..b7f887c9b0bf 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * controllers | 3 | * controllers |
4 | * | 4 | * |
5 | * This code is based on drivers/scsi/mpt2sas/mpt2_ctl.c | 5 | * This code is based on drivers/scsi/mpt2sas/mpt2_ctl.c |
6 | * Copyright (C) 2007-2012 LSI Corporation | 6 | * Copyright (C) 2007-2013 LSI Corporation |
7 | * (mailto:DL-MPTFusionLinux@lsi.com) | 7 | * (mailto:DL-MPTFusionLinux@lsi.com) |
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 |
@@ -397,18 +397,22 @@ mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc, | |||
397 | * This function merely adds a new work task into ioc->firmware_event_thread. | 397 | * This function merely adds a new work task into ioc->firmware_event_thread. |
398 | * The tasks are worked from _firmware_event_work in user context. | 398 | * The tasks are worked from _firmware_event_work in user context. |
399 | * | 399 | * |
400 | * Return 1 meaning mf should be freed from _base_interrupt | 400 | * Returns void. |
401 | * 0 means the mf is freed from this function. | ||
402 | */ | 401 | */ |
403 | u8 | 402 | void |
404 | mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | 403 | mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, |
405 | u32 reply) | 404 | u32 reply) |
406 | { | 405 | { |
407 | Mpi2EventNotificationReply_t *mpi_reply; | 406 | Mpi2EventNotificationReply_t *mpi_reply; |
408 | 407 | ||
409 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); | 408 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); |
409 | if (unlikely(!mpi_reply)) { | ||
410 | printk(MPT2SAS_ERR_FMT "mpi_reply not valid at %s:%d/%s()!\n", | ||
411 | ioc->name, __FILE__, __LINE__, __func__); | ||
412 | return; | ||
413 | } | ||
410 | mpt2sas_ctl_add_to_event_log(ioc, mpi_reply); | 414 | mpt2sas_ctl_add_to_event_log(ioc, mpi_reply); |
411 | return 1; | 415 | return; |
412 | } | 416 | } |
413 | 417 | ||
414 | /** | 418 | /** |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.h b/drivers/scsi/mpt2sas/mpt2sas_ctl.h index b5eb0d1b8ea6..8b2ac1869dcc 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.h +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * controllers | 3 | * controllers |
4 | * | 4 | * |
5 | * This code is based on drivers/scsi/mpt2sas/mpt2_ctl.h | 5 | * This code is based on drivers/scsi/mpt2sas/mpt2_ctl.h |
6 | * Copyright (C) 2007-2012 LSI Corporation | 6 | * Copyright (C) 2007-2013 LSI Corporation |
7 | * (mailto:DL-MPTFusionLinux@lsi.com) | 7 | * (mailto:DL-MPTFusionLinux@lsi.com) |
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 |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_debug.h b/drivers/scsi/mpt2sas/mpt2sas_debug.h index 69cc7d0c112c..a9021cbd6628 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_debug.h +++ b/drivers/scsi/mpt2sas/mpt2sas_debug.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Logging Support for MPT (Message Passing Technology) based controllers | 2 | * Logging Support for MPT (Message Passing Technology) based controllers |
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt2sas/mpt2_debug.c | 4 | * This code is based on drivers/scsi/mpt2sas/mpt2_debug.c |
5 | * Copyright (C) 2007-2012 LSI Corporation | 5 | * Copyright (C) 2007-2013 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * (mailto:DL-MPTFusionLinux@lsi.com) |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 51004768d0f5..7f0af4fcc001 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Scsi Host Layer for MPT (Message Passing Technology) based controllers | 2 | * Scsi Host Layer for MPT (Message Passing Technology) based controllers |
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt2sas/mpt2_scsih.c | 4 | * This code is based on drivers/scsi/mpt2sas/mpt2_scsih.c |
5 | * Copyright (C) 2007-2012 LSI Corporation | 5 | * Copyright (C) 2007-2013 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * (mailto:DL-MPTFusionLinux@lsi.com) |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -628,11 +628,12 @@ _scsih_sas_device_add(struct MPT2SAS_ADAPTER *ioc, | |||
628 | * devices while scanning is turned on due to an oops in | 628 | * devices while scanning is turned on due to an oops in |
629 | * scsi_sysfs_add_sdev()->add_device()->sysfs_addrm_start() | 629 | * scsi_sysfs_add_sdev()->add_device()->sysfs_addrm_start() |
630 | */ | 630 | */ |
631 | if (!ioc->is_driver_loading) | 631 | if (!ioc->is_driver_loading) { |
632 | mpt2sas_transport_port_remove(ioc, | 632 | mpt2sas_transport_port_remove(ioc, |
633 | sas_device->sas_address, | 633 | sas_device->sas_address, |
634 | sas_device->sas_address_parent); | 634 | sas_device->sas_address_parent); |
635 | _scsih_sas_device_remove(ioc, sas_device); | 635 | _scsih_sas_device_remove(ioc, sas_device); |
636 | } | ||
636 | } | 637 | } |
637 | } | 638 | } |
638 | 639 | ||
@@ -1402,6 +1403,7 @@ _scsih_slave_alloc(struct scsi_device *sdev) | |||
1402 | struct MPT2SAS_DEVICE *sas_device_priv_data; | 1403 | struct MPT2SAS_DEVICE *sas_device_priv_data; |
1403 | struct scsi_target *starget; | 1404 | struct scsi_target *starget; |
1404 | struct _raid_device *raid_device; | 1405 | struct _raid_device *raid_device; |
1406 | struct _sas_device *sas_device; | ||
1405 | unsigned long flags; | 1407 | unsigned long flags; |
1406 | 1408 | ||
1407 | sas_device_priv_data = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); | 1409 | sas_device_priv_data = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); |
@@ -1430,6 +1432,19 @@ _scsih_slave_alloc(struct scsi_device *sdev) | |||
1430 | spin_unlock_irqrestore(&ioc->raid_device_lock, flags); | 1432 | spin_unlock_irqrestore(&ioc->raid_device_lock, flags); |
1431 | } | 1433 | } |
1432 | 1434 | ||
1435 | if (!(sas_target_priv_data->flags & MPT_TARGET_FLAGS_VOLUME)) { | ||
1436 | spin_lock_irqsave(&ioc->sas_device_lock, flags); | ||
1437 | sas_device = mpt2sas_scsih_sas_device_find_by_sas_address(ioc, | ||
1438 | sas_target_priv_data->sas_address); | ||
1439 | if (sas_device && (sas_device->starget == NULL)) { | ||
1440 | sdev_printk(KERN_INFO, sdev, | ||
1441 | "%s : sas_device->starget set to starget @ %d\n", | ||
1442 | __func__, __LINE__); | ||
1443 | sas_device->starget = starget; | ||
1444 | } | ||
1445 | spin_unlock_irqrestore(&ioc->sas_device_lock, flags); | ||
1446 | } | ||
1447 | |||
1433 | return 0; | 1448 | return 0; |
1434 | } | 1449 | } |
1435 | 1450 | ||
@@ -6753,7 +6768,7 @@ _scsih_search_responding_sas_devices(struct MPT2SAS_ADAPTER *ioc) | |||
6753 | handle))) { | 6768 | handle))) { |
6754 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 6769 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
6755 | MPI2_IOCSTATUS_MASK; | 6770 | MPI2_IOCSTATUS_MASK; |
6756 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | 6771 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) |
6757 | break; | 6772 | break; |
6758 | handle = le16_to_cpu(sas_device_pg0.DevHandle); | 6773 | handle = le16_to_cpu(sas_device_pg0.DevHandle); |
6759 | device_info = le32_to_cpu(sas_device_pg0.DeviceInfo); | 6774 | device_info = le32_to_cpu(sas_device_pg0.DeviceInfo); |
@@ -6862,7 +6877,7 @@ _scsih_search_responding_raid_devices(struct MPT2SAS_ADAPTER *ioc) | |||
6862 | &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { | 6877 | &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { |
6863 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 6878 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
6864 | MPI2_IOCSTATUS_MASK; | 6879 | MPI2_IOCSTATUS_MASK; |
6865 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | 6880 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) |
6866 | break; | 6881 | break; |
6867 | handle = le16_to_cpu(volume_pg1.DevHandle); | 6882 | handle = le16_to_cpu(volume_pg1.DevHandle); |
6868 | 6883 | ||
@@ -6887,7 +6902,7 @@ _scsih_search_responding_raid_devices(struct MPT2SAS_ADAPTER *ioc) | |||
6887 | phys_disk_num))) { | 6902 | phys_disk_num))) { |
6888 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 6903 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
6889 | MPI2_IOCSTATUS_MASK; | 6904 | MPI2_IOCSTATUS_MASK; |
6890 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | 6905 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) |
6891 | break; | 6906 | break; |
6892 | phys_disk_num = pd_pg0.PhysDiskNum; | 6907 | phys_disk_num = pd_pg0.PhysDiskNum; |
6893 | handle = le16_to_cpu(pd_pg0.DevHandle); | 6908 | handle = le16_to_cpu(pd_pg0.DevHandle); |
@@ -6967,7 +6982,7 @@ _scsih_search_responding_expanders(struct MPT2SAS_ADAPTER *ioc) | |||
6967 | 6982 | ||
6968 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 6983 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
6969 | MPI2_IOCSTATUS_MASK; | 6984 | MPI2_IOCSTATUS_MASK; |
6970 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | 6985 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) |
6971 | break; | 6986 | break; |
6972 | 6987 | ||
6973 | handle = le16_to_cpu(expander_pg0.DevHandle); | 6988 | handle = le16_to_cpu(expander_pg0.DevHandle); |
@@ -7109,8 +7124,6 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) | |||
7109 | MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL, handle))) { | 7124 | MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL, handle))) { |
7110 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 7125 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
7111 | MPI2_IOCSTATUS_MASK; | 7126 | MPI2_IOCSTATUS_MASK; |
7112 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | ||
7113 | break; | ||
7114 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | 7127 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { |
7115 | printk(MPT2SAS_INFO_FMT "\tbreak from expander scan: " | 7128 | printk(MPT2SAS_INFO_FMT "\tbreak from expander scan: " |
7116 | "ioc_status(0x%04x), loginfo(0x%08x)\n", | 7129 | "ioc_status(0x%04x), loginfo(0x%08x)\n", |
@@ -7153,8 +7166,6 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) | |||
7153 | phys_disk_num))) { | 7166 | phys_disk_num))) { |
7154 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 7167 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
7155 | MPI2_IOCSTATUS_MASK; | 7168 | MPI2_IOCSTATUS_MASK; |
7156 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | ||
7157 | break; | ||
7158 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | 7169 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { |
7159 | printk(MPT2SAS_INFO_FMT "\tbreak from phys disk scan:" | 7170 | printk(MPT2SAS_INFO_FMT "\tbreak from phys disk scan:" |
7160 | "ioc_status(0x%04x), loginfo(0x%08x)\n", | 7171 | "ioc_status(0x%04x), loginfo(0x%08x)\n", |
@@ -7219,8 +7230,6 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) | |||
7219 | &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { | 7230 | &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { |
7220 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 7231 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
7221 | MPI2_IOCSTATUS_MASK; | 7232 | MPI2_IOCSTATUS_MASK; |
7222 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | ||
7223 | break; | ||
7224 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | 7233 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { |
7225 | printk(MPT2SAS_INFO_FMT "\tbreak from volume scan: " | 7234 | printk(MPT2SAS_INFO_FMT "\tbreak from volume scan: " |
7226 | "ioc_status(0x%04x), loginfo(0x%08x)\n", | 7235 | "ioc_status(0x%04x), loginfo(0x%08x)\n", |
@@ -7278,8 +7287,6 @@ _scsih_scan_for_devices_after_reset(struct MPT2SAS_ADAPTER *ioc) | |||
7278 | handle))) { | 7287 | handle))) { |
7279 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | 7288 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & |
7280 | MPI2_IOCSTATUS_MASK; | 7289 | MPI2_IOCSTATUS_MASK; |
7281 | if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE) | ||
7282 | break; | ||
7283 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | 7290 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { |
7284 | printk(MPT2SAS_INFO_FMT "\tbreak from end device scan:" | 7291 | printk(MPT2SAS_INFO_FMT "\tbreak from end device scan:" |
7285 | " ioc_status(0x%04x), loginfo(0x%08x)\n", | 7292 | " ioc_status(0x%04x), loginfo(0x%08x)\n", |
@@ -7471,10 +7478,9 @@ _firmware_event_work(struct work_struct *work) | |||
7471 | * This function merely adds a new work task into ioc->firmware_event_thread. | 7478 | * This function merely adds a new work task into ioc->firmware_event_thread. |
7472 | * The tasks are worked from _firmware_event_work in user context. | 7479 | * The tasks are worked from _firmware_event_work in user context. |
7473 | * | 7480 | * |
7474 | * Return 1 meaning mf should be freed from _base_interrupt | 7481 | * Returns void. |
7475 | * 0 means the mf is freed from this function. | ||
7476 | */ | 7482 | */ |
7477 | u8 | 7483 | void |
7478 | mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | 7484 | mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, |
7479 | u32 reply) | 7485 | u32 reply) |
7480 | { | 7486 | { |
@@ -7485,14 +7491,14 @@ mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | |||
7485 | 7491 | ||
7486 | /* events turned off due to host reset or driver unloading */ | 7492 | /* events turned off due to host reset or driver unloading */ |
7487 | if (ioc->remove_host || ioc->pci_error_recovery) | 7493 | if (ioc->remove_host || ioc->pci_error_recovery) |
7488 | return 1; | 7494 | return; |
7489 | 7495 | ||
7490 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); | 7496 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); |
7491 | 7497 | ||
7492 | if (unlikely(!mpi_reply)) { | 7498 | if (unlikely(!mpi_reply)) { |
7493 | printk(MPT2SAS_ERR_FMT "mpi_reply not valid at %s:%d/%s()!\n", | 7499 | printk(MPT2SAS_ERR_FMT "mpi_reply not valid at %s:%d/%s()!\n", |
7494 | ioc->name, __FILE__, __LINE__, __func__); | 7500 | ioc->name, __FILE__, __LINE__, __func__); |
7495 | return 1; | 7501 | return; |
7496 | } | 7502 | } |
7497 | 7503 | ||
7498 | event = le16_to_cpu(mpi_reply->Event); | 7504 | event = le16_to_cpu(mpi_reply->Event); |
@@ -7507,11 +7513,11 @@ mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | |||
7507 | 7513 | ||
7508 | if (baen_data->Primitive != | 7514 | if (baen_data->Primitive != |
7509 | MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT) | 7515 | MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT) |
7510 | return 1; | 7516 | return; |
7511 | 7517 | ||
7512 | if (ioc->broadcast_aen_busy) { | 7518 | if (ioc->broadcast_aen_busy) { |
7513 | ioc->broadcast_aen_pending++; | 7519 | ioc->broadcast_aen_pending++; |
7514 | return 1; | 7520 | return; |
7515 | } else | 7521 | } else |
7516 | ioc->broadcast_aen_busy = 1; | 7522 | ioc->broadcast_aen_busy = 1; |
7517 | break; | 7523 | break; |
@@ -7587,14 +7593,14 @@ mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | |||
7587 | break; | 7593 | break; |
7588 | 7594 | ||
7589 | default: /* ignore the rest */ | 7595 | default: /* ignore the rest */ |
7590 | return 1; | 7596 | return; |
7591 | } | 7597 | } |
7592 | 7598 | ||
7593 | fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC); | 7599 | fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC); |
7594 | if (!fw_event) { | 7600 | if (!fw_event) { |
7595 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | 7601 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", |
7596 | ioc->name, __FILE__, __LINE__, __func__); | 7602 | ioc->name, __FILE__, __LINE__, __func__); |
7597 | return 1; | 7603 | return; |
7598 | } | 7604 | } |
7599 | sz = le16_to_cpu(mpi_reply->EventDataLength) * 4; | 7605 | sz = le16_to_cpu(mpi_reply->EventDataLength) * 4; |
7600 | fw_event->event_data = kzalloc(sz, GFP_ATOMIC); | 7606 | fw_event->event_data = kzalloc(sz, GFP_ATOMIC); |
@@ -7602,7 +7608,7 @@ mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | |||
7602 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | 7608 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", |
7603 | ioc->name, __FILE__, __LINE__, __func__); | 7609 | ioc->name, __FILE__, __LINE__, __func__); |
7604 | kfree(fw_event); | 7610 | kfree(fw_event); |
7605 | return 1; | 7611 | return; |
7606 | } | 7612 | } |
7607 | 7613 | ||
7608 | memcpy(fw_event->event_data, mpi_reply->EventData, | 7614 | memcpy(fw_event->event_data, mpi_reply->EventData, |
@@ -7612,7 +7618,7 @@ mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, | |||
7612 | fw_event->VP_ID = mpi_reply->VP_ID; | 7618 | fw_event->VP_ID = mpi_reply->VP_ID; |
7613 | fw_event->event = event; | 7619 | fw_event->event = event; |
7614 | _scsih_fw_event_add(ioc, fw_event); | 7620 | _scsih_fw_event_add(ioc, fw_event); |
7615 | return 1; | 7621 | return; |
7616 | } | 7622 | } |
7617 | 7623 | ||
7618 | /* shost template */ | 7624 | /* shost template */ |
@@ -7711,10 +7717,6 @@ _scsih_ir_shutdown(struct MPT2SAS_ADAPTER *ioc) | |||
7711 | if (!ioc->ir_firmware) | 7717 | if (!ioc->ir_firmware) |
7712 | return; | 7718 | return; |
7713 | 7719 | ||
7714 | /* are there any volumes ? */ | ||
7715 | if (list_empty(&ioc->raid_device_list)) | ||
7716 | return; | ||
7717 | |||
7718 | mutex_lock(&ioc->scsih_cmds.mutex); | 7720 | mutex_lock(&ioc->scsih_cmds.mutex); |
7719 | 7721 | ||
7720 | if (ioc->scsih_cmds.status != MPT2_CMD_NOT_USED) { | 7722 | if (ioc->scsih_cmds.status != MPT2_CMD_NOT_USED) { |
@@ -7929,10 +7931,12 @@ _scsih_probe_boot_devices(struct MPT2SAS_ADAPTER *ioc) | |||
7929 | sas_device->sas_address_parent)) { | 7931 | sas_device->sas_address_parent)) { |
7930 | _scsih_sas_device_remove(ioc, sas_device); | 7932 | _scsih_sas_device_remove(ioc, sas_device); |
7931 | } else if (!sas_device->starget) { | 7933 | } else if (!sas_device->starget) { |
7932 | if (!ioc->is_driver_loading) | 7934 | if (!ioc->is_driver_loading) { |
7933 | mpt2sas_transport_port_remove(ioc, sas_address, | 7935 | mpt2sas_transport_port_remove(ioc, |
7936 | sas_address, | ||
7934 | sas_address_parent); | 7937 | sas_address_parent); |
7935 | _scsih_sas_device_remove(ioc, sas_device); | 7938 | _scsih_sas_device_remove(ioc, sas_device); |
7939 | } | ||
7936 | } | 7940 | } |
7937 | } | 7941 | } |
7938 | } | 7942 | } |
@@ -7985,14 +7989,14 @@ _scsih_probe_sas(struct MPT2SAS_ADAPTER *ioc) | |||
7985 | kfree(sas_device); | 7989 | kfree(sas_device); |
7986 | continue; | 7990 | continue; |
7987 | } else if (!sas_device->starget) { | 7991 | } else if (!sas_device->starget) { |
7988 | if (!ioc->is_driver_loading) | 7992 | if (!ioc->is_driver_loading) { |
7989 | mpt2sas_transport_port_remove(ioc, | 7993 | mpt2sas_transport_port_remove(ioc, |
7990 | sas_device->sas_address, | 7994 | sas_device->sas_address, |
7991 | sas_device->sas_address_parent); | 7995 | sas_device->sas_address_parent); |
7992 | list_del(&sas_device->list); | 7996 | list_del(&sas_device->list); |
7993 | kfree(sas_device); | 7997 | kfree(sas_device); |
7994 | continue; | 7998 | continue; |
7995 | 7999 | } | |
7996 | } | 8000 | } |
7997 | spin_lock_irqsave(&ioc->sas_device_lock, flags); | 8001 | spin_lock_irqsave(&ioc->sas_device_lock, flags); |
7998 | list_move_tail(&sas_device->list, &ioc->sas_device_list); | 8002 | list_move_tail(&sas_device->list, &ioc->sas_device_list); |
@@ -8175,6 +8179,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
8175 | INIT_LIST_HEAD(&ioc->sas_hba.sas_port_list); | 8179 | INIT_LIST_HEAD(&ioc->sas_hba.sas_port_list); |
8176 | INIT_LIST_HEAD(&ioc->delayed_tr_list); | 8180 | INIT_LIST_HEAD(&ioc->delayed_tr_list); |
8177 | INIT_LIST_HEAD(&ioc->delayed_tr_volume_list); | 8181 | INIT_LIST_HEAD(&ioc->delayed_tr_volume_list); |
8182 | INIT_LIST_HEAD(&ioc->reply_queue_list); | ||
8178 | 8183 | ||
8179 | /* init shost parameters */ | 8184 | /* init shost parameters */ |
8180 | shost->max_cmd_len = 32; | 8185 | shost->max_cmd_len = 32; |
@@ -8280,6 +8285,7 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8280 | 8285 | ||
8281 | mpt2sas_base_stop_watchdog(ioc); | 8286 | mpt2sas_base_stop_watchdog(ioc); |
8282 | scsi_block_requests(shost); | 8287 | scsi_block_requests(shost); |
8288 | _scsih_ir_shutdown(ioc); | ||
8283 | device_state = pci_choose_state(pdev, state); | 8289 | device_state = pci_choose_state(pdev, state); |
8284 | printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering " | 8290 | printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering " |
8285 | "operating state [D%d]\n", ioc->name, pdev, | 8291 | "operating state [D%d]\n", ioc->name, pdev, |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index 193e7ae90c3b..9d26637308be 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * SAS Transport Layer for MPT (Message Passing Technology) based controllers | 2 | * SAS Transport Layer for MPT (Message Passing Technology) based controllers |
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt2sas/mpt2_transport.c | 4 | * This code is based on drivers/scsi/mpt2sas/mpt2_transport.c |
5 | * Copyright (C) 2007-2012 LSI Corporation | 5 | * Copyright (C) 2007-2013 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * (mailto:DL-MPTFusionLinux@lsi.com) |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -1006,9 +1006,12 @@ mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, | |||
1006 | &mpt2sas_phy->remote_identify); | 1006 | &mpt2sas_phy->remote_identify); |
1007 | _transport_add_phy_to_an_existing_port(ioc, sas_node, | 1007 | _transport_add_phy_to_an_existing_port(ioc, sas_node, |
1008 | mpt2sas_phy, mpt2sas_phy->remote_identify.sas_address); | 1008 | mpt2sas_phy, mpt2sas_phy->remote_identify.sas_address); |
1009 | } else | 1009 | } else { |
1010 | memset(&mpt2sas_phy->remote_identify, 0 , sizeof(struct | 1010 | memset(&mpt2sas_phy->remote_identify, 0 , sizeof(struct |
1011 | sas_identify)); | 1011 | sas_identify)); |
1012 | _transport_del_phy_from_an_existing_port(ioc, sas_node, | ||
1013 | mpt2sas_phy); | ||
1014 | } | ||
1012 | 1015 | ||
1013 | if (mpt2sas_phy->phy) | 1016 | if (mpt2sas_phy->phy) |
1014 | mpt2sas_phy->phy->negotiated_linkrate = | 1017 | mpt2sas_phy->phy->negotiated_linkrate = |