Commit cb6d0f44 authored by Alan Stern's avatar Alan Stern Committed by James Bottomley

[PATCH] PATCH: (as333) BLIST flag for non-lockable devices

On Wed, 23 Jun 2004, Mike Anderson wrote:
> Since SCSI already has the device list it would seem like we would
> possibly add a new flag like was done for mode sense. As this is not a
> transport issue I would assume we would not want to add flags in
> usb/storage, but handle it in the mid-layer as a SCSI protocol
> non-compliance.

Here is a patch that implements this suggestion.  It's rather similar to
the one that Javier Marcet wrote back in January, in

http://marc.theaimsgroup.com/?l=linux-usb-users&m=107345268526718&w=2Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent f4e7ddb6
......@@ -159,8 +159,11 @@ static struct {
{"IOMEGA", "Io20S *F", NULL, BLIST_KEY},
{"INSITE", "Floptical F*8I", NULL, BLIST_KEY},
{"INSITE", "I325VM", NULL, BLIST_KEY},
{"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
{"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN},
{"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
{"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
{"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
{"Medion", "Flash XL MMC/SD", "2.6D", BLIST_FORCELUN},
{"MegaRAID", "LD", NULL, BLIST_FORCELUN},
{"MICROP", "4110", NULL, BLIST_NOTQ},
......
......@@ -663,6 +663,9 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
if (*bflags & BLIST_MS_192_BYTES_FOR_3F)
sdev->use_192_bytes_for_3f = 1;
if (*bflags & BLIST_NOT_LOCKABLE)
sdev->lockable = 0;
if(sdev->host->hostt->slave_configure)
sdev->host->hostt->slave_configure(sdev);
......
......@@ -24,4 +24,5 @@
#define BLIST_REPORTLUN2 0x20000 /* try REPORT_LUNS even for SCSI-2 devs
(if HBA supports more than 8 LUNs) */
#define BLIST_NOREPORTLUN 0x40000 /* don't try REPORT_LUNS scan (SCSI-3 devs) */
#define BLIST_NOT_LOCKABLE 0x80000 /* don't use PREVENT-ALLOW commands */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment