* RE: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-18 10:06 scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas Sander Smeenk
@ 2012-01-20 3:57 ` Nandigama, Nagalakshmi
2012-01-23 13:03 ` Sander Smeenk
2012-01-31 5:24 ` Nandigama, Nagalakshmi
1 sibling, 1 reply; 5+ messages in thread
From: Nandigama, Nagalakshmi @ 2012-01-20 3:57 UTC (permalink / raw)
To: Sander Smeenk, linux-scsi@vger.kernel.org
Request you to provide the response of "modinfo mptsas".
Also please capture the logs with the scsi logging set to 0x180000DB.
"echo 0x180000db > /proc/sys/dev/scsi/logging_level".
And mptsas debug level set to 0x3f8
"echo 3f8 > /sys/module/mptbase/parameters/mpt_debug_level"
Regards,
Nagalakshmi
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sander Smeenk
Sent: Wednesday, January 18, 2012 3:37 PM
To: linux-scsi@vger.kernel.org
Subject: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
Hi,
i'm experiencing issues while hot(re)plugging SAS-drives in a server
running 2.6.32-37 (stock Ubuntu Lucid). The disks are connected to an
LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS HBA (1000:0500 r2)
Google has no information at all on this specific errormessage.
Situation:
The server is running on 4xSAS drives with the mptsas module, disks are
JBODed to the OS, the OS has them in mdadm software raid.
Each disk needs to be replaced so i unconfigure one in mdadm, ask the
kernel to 'delete' the device node:
| # echo 1 > /sys/block/sdN/device/delete
And then i pull the disk after which the kernel logs:
| scsi: killing requests for dead queue
| scsi target4:0:1: mptsas: ioc0: delete device: fw_channel 0, fw_id 1,
| phy 1, sas_addr 0x500000e019670902
When i reseat the replacement disk, nothing gets logged. When i then ask
the kernel to rescan the scsi bus on host4, the kernel logs an error:
| # echo '- - -' > /sys/class/scsi_host/host4/scan
| scsi target4:0:4: target allocation failed, error -6
The replacement drive will not be available to the OS until the system
is rebooted after which the drive works like a charm.
The error message is produced in drivers/scsi/scsi_scan.c but i believe
the target_alloc() call comes from the drivers/scsi/mtpsas/mptsas.c
driver. Unfortunately my kernelhack-fu is lacking to look into this
further. As stated, Google has no information about this either.
Anyone on this list with clues as to why this happens or how to
circumvent it from happening with the other three disks?
Thanks,
With regards,
-Sander.
--
| How do you write zero in Roman numerals?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-18 10:06 scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas Sander Smeenk
2012-01-20 3:57 ` Nandigama, Nagalakshmi
@ 2012-01-31 5:24 ` Nandigama, Nagalakshmi
2012-02-02 12:45 ` Sander Smeenk
1 sibling, 1 reply; 5+ messages in thread
From: Nandigama, Nagalakshmi @ 2012-01-31 5:24 UTC (permalink / raw)
To: Sander Smeenk, linux-scsi@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
Sander, can you apply the attached patch and redo the test.
Regards,
Nagalakshmi
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sander Smeenk
Sent: Wednesday, January 18, 2012 3:37 PM
To: linux-scsi@vger.kernel.org
Subject: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
Hi,
i'm experiencing issues while hot(re)plugging SAS-drives in a server
running 2.6.32-37 (stock Ubuntu Lucid). The disks are connected to an
LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS HBA (1000:0500 r2)
Google has no information at all on this specific errormessage.
Situation:
The server is running on 4xSAS drives with the mptsas module, disks are
JBODed to the OS, the OS has them in mdadm software raid.
Each disk needs to be replaced so i unconfigure one in mdadm, ask the
kernel to 'delete' the device node:
| # echo 1 > /sys/block/sdN/device/delete
And then i pull the disk after which the kernel logs:
| scsi: killing requests for dead queue
| scsi target4:0:1: mptsas: ioc0: delete device: fw_channel 0, fw_id 1,
| phy 1, sas_addr 0x500000e019670902
When i reseat the replacement disk, nothing gets logged. When i then ask
the kernel to rescan the scsi bus on host4, the kernel logs an error:
| # echo '- - -' > /sys/class/scsi_host/host4/scan
| scsi target4:0:4: target allocation failed, error -6
The replacement drive will not be available to the OS until the system
is rebooted after which the drive works like a charm.
The error message is produced in drivers/scsi/scsi_scan.c but i believe
the target_alloc() call comes from the drivers/scsi/mtpsas/mptsas.c
driver. Unfortunately my kernelhack-fu is lacking to look into this
further. As stated, Google has no information about this either.
Anyone on this list with clues as to why this happens or how to
circumvent it from happening with the other three disks?
Thanks,
With regards,
-Sander.
--
| How do you write zero in Roman numerals?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: scsi-misc-2[1].6.git-3e84beba608dee5a7c7711a3503eb2f335c78fca.patch --]
[-- Type: application/octet-stream, Size: 2024 bytes --]
From 3e84beba608dee5a7c7711a3503eb2f335c78fca Mon Sep 17 00:00:00 2001
From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Date: Wed, 7 Apr 2010 19:17:24 +0900
Subject: [PATCH] [SCSI] mptsas: fixed hot-removal processing
This patch fixes mptsas disk hot-removal processing. The
hot-removal processing doesn't complete because of this condition.
drivers/message/fusion/mptsas.c:
mptsas_taskmgmt_complete()
if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
mptsas_queue_device_delete(...);
mptsas_queue_device_delete(), which must be called for
hot-removal, never gets called because mptsas_find_vtarget()
always returns 0 here. At that time, the vtarget has already
been freed in mptsas_target_destroy(), and also the scsi_device
has been marked as SDEV_DEL.
As a result of the issue, port deletion functions won't get
called and the device ends up being in an incomplete state.
(Some data structures and sysfs entries, which should be
removed in hot-removal, remain.) One side effect of this is
that a hot-addition of the device (bringing the device back
on) fails.
This patch just removes mptsas_find_vtarget() from the if-state
condition.
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
---
drivers/message/fusion/mptsas.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index f42781b..46cc90c 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -1261,7 +1261,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
* enable work queue to remove device from upper layers
*/
list_del(&target_reset_list->list);
- if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
+ if (!ioc->fw_events_off)
mptsas_queue_device_delete(ioc,
&target_reset_list->sas_event_data);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread