* [PATCH 1/3] scsi dh alua: fix group id masking
@ 2009-01-30 23:00 michaelc
2009-01-30 23:00 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device michaelc
2009-02-05 13:56 ` [PATCH 1/3] scsi dh alua: fix group id masking Hannes Reinecke
0 siblings, 2 replies; 7+ messages in thread
From: michaelc @ 2009-01-30 23:00 UTC (permalink / raw)
To: linux-scsi; +Cc: Ilgu Hong, Mike Christie
From: Ilgu Hong <ilgu.hong@promise.com>
The buf[i] is a byte but we are only asking 4 bits off the
group_id. This patch has us take off a byte.
Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index e356b43..5096b0b 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -247,8 +247,8 @@ static unsigned submit_stpg(struct scsi_device *sdev, struct alua_dh_data *h)
/* Prepare the data buffer */
memset(h->buff, 0, stpg_len);
h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f;
- h->buff[6] = (h->group_id >> 8) & 0x0f;
- h->buff[7] = h->group_id & 0x0f;
+ h->buff[6] = (h->group_id >> 8) & 0xff;
+ h->buff[7] = h->group_id & 0xff;
rq = get_alua_req(sdev, h->buff, stpg_len, WRITE);
if (!rq)
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] scsi dh alua: add intel Multi-Flex device
2009-01-30 23:00 [PATCH 1/3] scsi dh alua: fix group id masking michaelc
@ 2009-01-30 23:00 ` michaelc
2009-01-30 23:00 ` [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout michaelc
2009-02-05 13:56 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device Hannes Reinecke
2009-02-05 13:56 ` [PATCH 1/3] scsi dh alua: fix group id masking Hannes Reinecke
1 sibling, 2 replies; 7+ messages in thread
From: michaelc @ 2009-01-30 23:00 UTC (permalink / raw)
To: linux-scsi; +Cc: Ilgu Hong, Mike Christie
From: Ilgu Hong <ilgu.hong@promise.com>
This adds the Intel Multi-Flex device to scsi_dh_alua's
scsi_dh_devlist, so the module attaches to these devs.
Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5096b0b..31e1df5 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -691,6 +691,7 @@ static const struct scsi_dh_devlist alua_dev_list[] = {
{"IBM", "2107900" },
{"IBM", "2145" },
{"Pillar", "Axiom" },
+ {"Intel", "Multi-Flex"},
{NULL, NULL}
};
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout
2009-01-30 23:00 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device michaelc
@ 2009-01-30 23:00 ` michaelc
2009-02-05 13:59 ` Hannes Reinecke
2009-02-05 13:56 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device Hannes Reinecke
1 sibling, 1 reply; 7+ messages in thread
From: michaelc @ 2009-01-30 23:00 UTC (permalink / raw)
To: linux-scsi; +Cc: Ilgu Hong, Mike Christie
From: Ilgu Hong <ilgu.hong@promise.com>
When we switch controllers the Intel Multi-Flex reports
REPORTED_LUNS_DATA_HAS_CHANGED. This patch just has us
retry the command.
Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 31e1df5..dba154c 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -461,6 +461,15 @@ static int alua_check_sense(struct scsi_device *sdev,
*/
return ADD_TO_MLQUEUE;
}
+ if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e) {
+ /*
+ * REPORTED_LUNS_DATA_HAS_CHANGED is reported
+ * when switching controllers on targets like
+ * Intel Multi-Flex. We can just retry.
+ */
+ return ADD_TO_MLQUEUE;
+ }
+
break;
}
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] scsi dh alua: fix group id masking
2009-01-30 23:00 [PATCH 1/3] scsi dh alua: fix group id masking michaelc
2009-01-30 23:00 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device michaelc
@ 2009-02-05 13:56 ` Hannes Reinecke
1 sibling, 0 replies; 7+ messages in thread
From: Hannes Reinecke @ 2009-02-05 13:56 UTC (permalink / raw)
To: michaelc; +Cc: linux-scsi, Ilgu Hong
Hi Mike,
michaelc@cs.wisc.edu wrote:
> From: Ilgu Hong <ilgu.hong@promise.com>
>
>
> The buf[i] is a byte but we are only asking 4 bits off the
> group_id. This patch has us take off a byte.
>
> Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index e356b43..5096b0b 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -247,8 +247,8 @@ static unsigned submit_stpg(struct scsi_device *sdev, struct alua_dh_data *h)
> /* Prepare the data buffer */
> memset(h->buff, 0, stpg_len);
> h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f;
> - h->buff[6] = (h->group_id >> 8) & 0x0f;
> - h->buff[7] = h->group_id & 0x0f;
> + h->buff[6] = (h->group_id >> 8) & 0xff;
> + h->buff[7] = h->group_id & 0xff;
>
> rq = get_alua_req(sdev, h->buff, stpg_len, WRITE);
> if (!rq)
Correct.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
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] 7+ messages in thread
* Re: [PATCH 2/3] scsi dh alua: add intel Multi-Flex device
2009-01-30 23:00 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device michaelc
2009-01-30 23:00 ` [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout michaelc
@ 2009-02-05 13:56 ` Hannes Reinecke
1 sibling, 0 replies; 7+ messages in thread
From: Hannes Reinecke @ 2009-02-05 13:56 UTC (permalink / raw)
To: michaelc; +Cc: linux-scsi, Ilgu Hong
Hi Mike,
michaelc@cs.wisc.edu wrote:
> From: Ilgu Hong <ilgu.hong@promise.com>
>
> This adds the Intel Multi-Flex device to scsi_dh_alua's
> scsi_dh_devlist, so the module attaches to these devs.
>
> Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 5096b0b..31e1df5 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -691,6 +691,7 @@ static const struct scsi_dh_devlist alua_dev_list[] = {
> {"IBM", "2107900" },
> {"IBM", "2145" },
> {"Pillar", "Axiom" },
> + {"Intel", "Multi-Flex"},
> {NULL, NULL}
> };
>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
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] 7+ messages in thread
* Re: [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout
2009-01-30 23:00 ` [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout michaelc
@ 2009-02-05 13:59 ` Hannes Reinecke
2009-02-06 18:04 ` Mike Christie
0 siblings, 1 reply; 7+ messages in thread
From: Hannes Reinecke @ 2009-02-05 13:59 UTC (permalink / raw)
To: michaelc; +Cc: linux-scsi, Ilgu Hong
Hi Mike,
michaelc@cs.wisc.edu wrote:
> From: Ilgu Hong <ilgu.hong@promise.com>
>
> When we switch controllers the Intel Multi-Flex reports
> REPORTED_LUNS_DATA_HAS_CHANGED. This patch just has us
> retry the command.
>
> Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 31e1df5..dba154c 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -461,6 +461,15 @@ static int alua_check_sense(struct scsi_device *sdev,
> */
> return ADD_TO_MLQUEUE;
> }
> + if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e) {
> + /*
> + * REPORTED_LUNS_DATA_HAS_CHANGED is reported
> + * when switching controllers on targets like
> + * Intel Multi-Flex. We can just retry.
> + */
> + return ADD_TO_MLQUEUE;
> + }
> +
> break;
> }
>
Hmm. We could as well always retry for Unit Attention; it's meant to be
a temporary condition anyway so no harm in retrying.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
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] 7+ messages in thread
* Re: [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout
2009-02-05 13:59 ` Hannes Reinecke
@ 2009-02-06 18:04 ` Mike Christie
0 siblings, 0 replies; 7+ messages in thread
From: Mike Christie @ 2009-02-06 18:04 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: linux-scsi, Ilgu Hong
Hannes Reinecke wrote:
> Hi Mike,
>
> michaelc@cs.wisc.edu wrote:
>> From: Ilgu Hong <ilgu.hong@promise.com>
>>
>> When we switch controllers the Intel Multi-Flex reports
>> REPORTED_LUNS_DATA_HAS_CHANGED. This patch just has us
>> retry the command.
>>
>> Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
>> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
>> ---
>> drivers/scsi/device_handler/scsi_dh_alua.c | 9 +++++++++
>> 1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
>> b/drivers/scsi/device_handler/scsi_dh_alua.c
>> index 31e1df5..dba154c 100644
>> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
>> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
>> @@ -461,6 +461,15 @@ static int alua_check_sense(struct scsi_device
>> *sdev,
>> */
>> return ADD_TO_MLQUEUE;
>> }
>> + if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e) {
>> + /*
>> + * REPORTED_LUNS_DATA_HAS_CHANGED is reported
>> + * when switching controllers on targets like
>> + * Intel Multi-Flex. We can just retry.
>> + */
>> + return ADD_TO_MLQUEUE;
>> + }
>> +
>> break;
>> }
>>
> Hmm. We could as well always retry for Unit Attention; it's meant to be
> a temporary condition anyway so no harm in retrying.
>
Hey, do you mean you want me to just do
case UNIT_ATTENTION:
return ADD_TO_MLQUEUE;
? In scsi_error.c:scsi_check_sense we fail for
/*
* if the device is not started, we need to wake
* the error handler to start the motor
*/
if (scmd->device->allow_restart &&
(sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
return FAILED;
and in scsi_lib.c:scsi_io_compeltion we fail for
if (cmd->device->removable) {
/* Detected disc change. Set a bit
* and quietly refuse further access.
*/
cmd->device->changed = 1;
scsi_end_request(cmd, -EIO, this_count, 1);
return;
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-06 18:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30 23:00 [PATCH 1/3] scsi dh alua: fix group id masking michaelc
2009-01-30 23:00 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device michaelc
2009-01-30 23:00 ` [PATCH 3/3] scsi dh alua: handle report luns data changed in check sense callout michaelc
2009-02-05 13:59 ` Hannes Reinecke
2009-02-06 18:04 ` Mike Christie
2009-02-05 13:56 ` [PATCH 2/3] scsi dh alua: add intel Multi-Flex device Hannes Reinecke
2009-02-05 13:56 ` [PATCH 1/3] scsi dh alua: fix group id masking Hannes Reinecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.