* [PATCH] isci: fix reset timeout handling
@ 2013-12-09 19:47 Dan Williams
2013-12-10 1:32 ` Do anybody know the format of bsg device node name? Newtech Tan
2013-12-10 13:18 ` [PATCH] isci: fix reset timeout handling Dorau, Lukasz
0 siblings, 2 replies; 4+ messages in thread
From: Dan Williams @ 2013-12-09 19:47 UTC (permalink / raw)
To: linux-scsi; +Cc: Xun Ni, dave.jiang, lukasz.dorau, stable, maciej.patelczyk
Remove an erroneous BUG_ON() in the case of a hard reset timeout. If a
SATA device is unable to restore the link in time we expect the port to
go back to the "awaiting link-up" state. Since the timeout path
notified libsas that the port is down, we want to notify libsas when it
returns and expect that the port may not be in the "resetting" state.
Also, once we have notified that the port is down, in-progress resets should
abort immediately. Return -ENODEV from ->lldd_I_T_nexus_reset() to indicate
that libata error handling should end.
Cc: <stable@vger.kernel.org>
Reported-by: Xun Ni <xun.ni@intel.com>
Tested-by: Xun Ni <xun.ni@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/scsi/isci/port_config.c | 5 -----
drivers/scsi/isci/task.c | 2 +-
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/isci/port_config.c b/drivers/scsi/isci/port_config.c
index 85c77f6b802b..4b84d204db01 100644
--- a/drivers/scsi/isci/port_config.c
+++ b/drivers/scsi/isci/port_config.c
@@ -617,11 +617,6 @@ static void sci_apc_agent_link_up(struct isci_host *ihost,
/* the phy is already the part of the port */
u32 port_state = iport->sm.current_state_id;
- /* if the PORT'S state is resetting then the link up is from
- * port hard reset in this case, we need to tell the port
- * that link up is recieved
- */
- BUG_ON(port_state != SCI_PORT_RESETTING);
port_agent->phy_ready_mask |= 1 << phy_index;
sci_port_link_up(iport, iphy);
}
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 0d30ca849e8f..5d6fda72d659 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -801,7 +801,7 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev)
/* XXX: need to cleanup any ireqs targeting this
* domain_device
*/
- ret = TMF_RESP_FUNC_COMPLETE;
+ ret = -ENODEV;
goto out;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Do anybody know the format of bsg device node name?
2013-12-09 19:47 [PATCH] isci: fix reset timeout handling Dan Williams
@ 2013-12-10 1:32 ` Newtech Tan
2013-12-10 10:04 ` Douglas Gilbert
2013-12-10 13:18 ` [PATCH] isci: fix reset timeout handling Dorau, Lukasz
1 sibling, 1 reply; 4+ messages in thread
From: Newtech Tan @ 2013-12-10 1:32 UTC (permalink / raw)
To: linux-scsi
For example of bsg device node name:
[4:0:0:0]
Each field is Hex or Dec?
[BackGroup]
I am using lsscsi -g command to get SCSI device list as the following.
If bsg device name's target number field is over ten, Will it display [4:0:10:0] or [4:0:a:0]?
# lsscsi -g
[0:0:0:0] cd/dvd HL-DT-ST DVD+-RW GSA-H53N B104 /dev/sr0 /dev/sg0
[3:0:0:0] disk ATA WDC WD1600AAJS-1 05.0 /dev/sda /dev/sg1
[4:0:0:0] disk ATA Hitachi HDT72102 A31B /dev/sdb /dev/sg2
[4:0:1:0] disk ATA Hitachi HDT72502 A73A /dev/sdc /dev/sg3
[4:0:2:0] disk ATA Hitachi HDT72502 A73A /dev/sdd /dev/sg4
[4:0:3:0] disk ATA Hitachi HDT72502 A73A /dev/sde /dev/sg5
[4:0:4:0] disk ATA Hitachi HDT72502 A73A /dev/sdf /dev/sg6
[4:0:5:0] disk ATA Hitachi HDT72502 A73A /dev/sdg /dev/sg7
[4:0:6:0] disk ATA Hitachi HDT72502 A73A /dev/sdh /dev/sg8
[4:0:7:0] disk ATA Hitachi HDT72502 A73A /dev/sdi /dev/sg9
[4:0:8:0] enclosu LSI SAS616x 0502 - /dev/sg10
Thanks !
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Do anybody know the format of bsg device node name?
2013-12-10 1:32 ` Do anybody know the format of bsg device node name? Newtech Tan
@ 2013-12-10 10:04 ` Douglas Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Douglas Gilbert @ 2013-12-10 10:04 UTC (permalink / raw)
To: Newtech Tan, linux-scsi
On 13-12-10 02:32 AM, Newtech Tan wrote:
>
> For example of bsg device node name:
> [4:0:0:0]
>
> Each field is Hex or Dec?
>
> [BackGroup]
> I am using lsscsi -g command to get SCSI device list as the following.
> If bsg device name's target number field is over ten, Will it display [4:0:10:0] or [4:0:a:0]?
>
> # lsscsi -g
> [0:0:0:0] cd/dvd HL-DT-ST DVD+-RW GSA-H53N B104 /dev/sr0 /dev/sg0
> [3:0:0:0] disk ATA WDC WD1600AAJS-1 05.0 /dev/sda /dev/sg1
> [4:0:0:0] disk ATA Hitachi HDT72102 A31B /dev/sdb /dev/sg2
> [4:0:1:0] disk ATA Hitachi HDT72502 A73A /dev/sdc /dev/sg3
> [4:0:2:0] disk ATA Hitachi HDT72502 A73A /dev/sdd /dev/sg4
> [4:0:3:0] disk ATA Hitachi HDT72502 A73A /dev/sde /dev/sg5
> [4:0:4:0] disk ATA Hitachi HDT72502 A73A /dev/sdf /dev/sg6
> [4:0:5:0] disk ATA Hitachi HDT72502 A73A /dev/sdg /dev/sg7
> [4:0:6:0] disk ATA Hitachi HDT72502 A73A /dev/sdh /dev/sg8
> [4:0:7:0] disk ATA Hitachi HDT72502 A73A /dev/sdi /dev/sg9
> [4:0:8:0] enclosu LSI SAS616x 0502 - /dev/sg10
/dev/bsg/0:0:0:0
/dev/bsg/3:0:0:0
/dev/bsg/4:0:0:0
etc
Depending on your shell you may need to escape the ":"
characters (or surround the whole string in quotes).
Also CONFIG_BLK_DEV_BSG needs to be defined in your kernel
build but as udev needs that, that is probably already the
case.
Looks like you have a SAS expander there as well. It will
have a bsg node name like:
/dev/bsg/expander-4:0
that my smp_utils package can use. There might also be a
SAS host node like this:
/dev/bsg/sas_host4
Doug Gilbert
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] isci: fix reset timeout handling
2013-12-09 19:47 [PATCH] isci: fix reset timeout handling Dan Williams
2013-12-10 1:32 ` Do anybody know the format of bsg device node name? Newtech Tan
@ 2013-12-10 13:18 ` Dorau, Lukasz
1 sibling, 0 replies; 4+ messages in thread
From: Dorau, Lukasz @ 2013-12-10 13:18 UTC (permalink / raw)
To: Williams, Dan J, linux-scsi@vger.kernel.org
Cc: Ni, Xun, Jiang, Dave, stable@vger.kernel.org, Patelczyk, Maciej
On Monday, December 09, 2013 8:47 PM Williams, Dan J <dan.j.williams@intel.com> wrote:
> Remove an erroneous BUG_ON() in the case of a hard reset timeout. If a
> SATA device is unable to restore the link in time we expect the port to
> go back to the "awaiting link-up" state. Since the timeout path
> notified libsas that the port is down, we want to notify libsas when it
> returns and expect that the port may not be in the "resetting" state.
>
> Also, once we have notified that the port is down, in-progress resets should
> abort immediately. Return -ENODEV from ->lldd_I_T_nexus_reset() to indicate
> that libata error handling should end.
>
> Cc: <stable@vger.kernel.org>
> Reported-by: Xun Ni <xun.ni@intel.com>
> Tested-by: Xun Ni <xun.ni@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-10 13:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 19:47 [PATCH] isci: fix reset timeout handling Dan Williams
2013-12-10 1:32 ` Do anybody know the format of bsg device node name? Newtech Tan
2013-12-10 10:04 ` Douglas Gilbert
2013-12-10 13:18 ` [PATCH] isci: fix reset timeout handling Dorau, Lukasz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).