> -----Original Message-----
> From: Christoph Hellwig [mailto:h...@infradead.org]
> Sent: Friday, 26 September, 2014 3:14 AM
> To: Dolev Raviv
> Cc: james.bottom...@hansenpartnership.com; h...@infradead.org; linux-
> s...@vger.kernel.org; linux-scsi-ow...@vger.kernel.org; linux-arm-
> m...@vger.kernel.org; santos...@gmail.com; Subhash Jadavani; Sujit Reddy
> Thumma; Elliott, Robert (Server Storage); Martin K. Petersen
> Subject: Re: [PATCH V6 01/18] scsi: fixing the "type" for well known LUs
> 
> Robert, I guess this version is okay with you?
> 
> On Thu, Sep 25, 2014 at 03:32:19PM +0300, Dolev Raviv wrote:
> > From: Subhash Jadavani <subha...@codeaurora.org>
> >
> > Some devices may respond with wrong type for well-known logical units.
> > This patch forces well-known type for devices which doesn't report it
> > correct.
> >
> > Signed-off-by: Subhash Jadavani <subha...@codeaurora.org>
> > Signed-off-by: Sujit Reddy Thumma <sthu...@codeaurora.org>
> > Signed-off-by: Dolev Raviv <dra...@codeaurora.org>
> >
> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> > index 56675db..1095d5a 100644
> > --- a/drivers/scsi/scsi_scan.c
> > +++ b/drivers/scsi/scsi_scan.c
> > @@ -805,6 +805,19 @@ static int scsi_add_lun(struct scsi_device *sdev,
> unsigned char *inq_result,
> >     } else {
> >             sdev->type = (inq_result[0] & 0x1f);
> >             sdev->removable = (inq_result[1] & 0x80) >> 7;
> > +
> > +           /*
> > +            * some devices may respond with wrong type for
> > +            * well-known logical units. Force well-known type
> > +            * to enumerate them correctly.
> > +            */
> > +           if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) {
> > +                   sdev_printk(KERN_WARNING, sdev,
> > +                           "%s: correcting incorrect peripheral device type
> 0x%x for W-LUN 0x%16phN\n",
> > +                           __func__, sdev->type, sdev->lun);
> > +                   sdev->type = TYPE_WLUN;
> > +           }
> > +

Yes, that looks good.

Reviewed-by: Robert Elliott <elli...@hp.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to