> -----Original Message-----
> From: Christoph Hellwig [mailto:[email protected]]
> Sent: Friday, 26 September, 2014 3:14 AM
> To: Dolev Raviv
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-arm-
> [email protected]; [email protected]; 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 <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Sujit Reddy Thumma <[email protected]>
> > Signed-off-by: Dolev Raviv <[email protected]>
> >
> > 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 <[email protected]>

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to