* [PATCH 1/1] scsi: usb: fix bug which some usb isn't used
@ 2016-04-12 12:35 Xinwei Kong
2016-04-12 12:45 ` Hannes Reinecke
0 siblings, 1 reply; 3+ messages in thread
From: Xinwei Kong @ 2016-04-12 12:35 UTC (permalink / raw)
To: linuxraid, James.Bottomley, hch, snitzer
Cc: martin.petersen, hare, JBottomley, linux-scsi, kong.kongxinwei
some usb disk such as Manufacturer Lenovo will have some problem in
init process.
when it run "scsi_dh_find_driver" function, because this parameter of
"sdev->inquiry[5]" is 115, it will return "alua" in "scsi_dh_find_driver"
function and will have some error log (alua: Attach failed (-22)). some
usb init will fail and isn't used.
Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
---
drivers/scsi/scsi_dh.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
index 54d446c..36b3f354e 100644
--- a/drivers/scsi/scsi_dh.c
+++ b/drivers/scsi/scsi_dh.c
@@ -77,9 +77,6 @@ scsi_dh_find_driver(struct scsi_device *sdev)
{
const struct scsi_dh_blist *b;
- if (scsi_device_tpgs(sdev))
- return "alua";
-
for (b = scsi_dh_blist; b->vendor; b++) {
if (!strncmp(sdev->vendor, b->vendor, strlen(b->vendor)) &&
!strncmp(sdev->model, b->model, strlen(b->model))) {
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] scsi: usb: fix bug which some usb isn't used
2016-04-12 12:35 [PATCH 1/1] scsi: usb: fix bug which some usb isn't used Xinwei Kong
@ 2016-04-12 12:45 ` Hannes Reinecke
2016-04-13 2:16 ` Xinwei Kong
0 siblings, 1 reply; 3+ messages in thread
From: Hannes Reinecke @ 2016-04-12 12:45 UTC (permalink / raw)
To: Xinwei Kong, linuxraid, James.Bottomley, hch, snitzer
Cc: martin.petersen, JBottomley, linux-scsi
On 04/12/2016 02:35 PM, Xinwei Kong wrote:
> some usb disk such as Manufacturer Lenovo will have some problem in
> init process.
>
> when it run "scsi_dh_find_driver" function, because this parameter of
> "sdev->inquiry[5]" is 115, it will return "alua" in "scsi_dh_find_driver"
> function and will have some error log (alua: Attach failed (-22)). some
> usb init will fail and isn't used.
>
> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> ---
> drivers/scsi/scsi_dh.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
> index 54d446c..36b3f354e 100644
> --- a/drivers/scsi/scsi_dh.c
> +++ b/drivers/scsi/scsi_dh.c
> @@ -77,9 +77,6 @@ scsi_dh_find_driver(struct scsi_device *sdev)
> {
> const struct scsi_dh_blist *b;
>
> - if (scsi_device_tpgs(sdev))
> - return "alua";
> -
> for (b = scsi_dh_blist; b->vendor; b++) {
> if (!strncmp(sdev->vendor, b->vendor, strlen(b->vendor)) &&
> !strncmp(sdev->model, b->model, strlen(b->model))) {
>
Nack.
That will completely disable ALUA support for everybody.
And should've been fixed with commit
221255aee67ec1c752001080aafec0c4e9390d95
("scsi: ignore errors from scsi_dh_add_device()").
Please validate.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (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] 3+ messages in thread
* Re: [PATCH 1/1] scsi: usb: fix bug which some usb isn't used
2016-04-12 12:45 ` Hannes Reinecke
@ 2016-04-13 2:16 ` Xinwei Kong
0 siblings, 0 replies; 3+ messages in thread
From: Xinwei Kong @ 2016-04-13 2:16 UTC (permalink / raw)
To: Hannes Reinecke, linuxraid, James.Bottomley, hch, snitzer
Cc: martin.petersen, JBottomley, linux-scsi, liguozhu@hisilicon.com
On 2016/4/12 20:45, Hannes Reinecke wrote:
> On 04/12/2016 02:35 PM, Xinwei Kong wrote:
>> some usb disk such as Manufacturer Lenovo will have some problem in
>> init process.
>>
>> when it run "scsi_dh_find_driver" function, because this parameter of
>> "sdev->inquiry[5]" is 115, it will return "alua" in "scsi_dh_find_driver"
>> function and will have some error log (alua: Attach failed (-22)). some
>> usb init will fail and isn't used.
>>
>> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
>> ---
>> drivers/scsi/scsi_dh.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c
>> index 54d446c..36b3f354e 100644
>> --- a/drivers/scsi/scsi_dh.c
>> +++ b/drivers/scsi/scsi_dh.c
>> @@ -77,9 +77,6 @@ scsi_dh_find_driver(struct scsi_device *sdev)
>> {
>> const struct scsi_dh_blist *b;
>>
>> - if (scsi_device_tpgs(sdev))
>> - return "alua";
>> -
>> for (b = scsi_dh_blist; b->vendor; b++) {
>> if (!strncmp(sdev->vendor, b->vendor, strlen(b->vendor)) &&
>> !strncmp(sdev->model, b->model, strlen(b->model))) {
>>
> Nack.
> That will completely disable ALUA support for everybody.
>
> And should've been fixed with commit
> 221255aee67ec1c752001080aafec0c4e9390d95
> ("scsi: ignore errors from scsi_dh_add_device()").
>
> Please validate.
>
ok, I slove this bug for using this patch.
thank you
xinwei
> Cheers,
>
> Hannes
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-13 2:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12 12:35 [PATCH 1/1] scsi: usb: fix bug which some usb isn't used Xinwei Kong
2016-04-12 12:45 ` Hannes Reinecke
2016-04-13 2:16 ` Xinwei Kong
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.