Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22536
b: refs/heads/master
c: 1bfc5d9
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and James Bottomley committed Feb 28, 2006
1 parent 9607ffa commit 9cb9673
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cac814501677e9f6a824cf4d423122ac8d67fcb
refs/heads/master: 1bfc5d9d5eb8e1a2efacc306bc55c248ed259a8e
13 changes: 13 additions & 0 deletions trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,19 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
goto out_free_result;
}

/*
* Non-standard SCSI targets may set the PDT to 0x1f (unknown or
* no device type) instead of using the Peripheral Qualifier to
* indicate that no LUN is present. For example, USB UFI does this.
*/
if (starget->pdt_1f_for_no_lun && (result[0] & 0x1f) == 0x1f) {
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
"scsi scan: peripheral device type"
" of 31, no device added\n"));
res = SCSI_SCAN_TARGET_PRESENT;
goto out_free_result;
}

res = scsi_add_lun(sdev, result, &bflags);
if (res == SCSI_SCAN_LUN_PRESENT) {
if (bflags & BLIST_KEY) {
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/scsi/scsi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ struct scsi_target {
unsigned int channel;
unsigned int id; /* target id ... replace
* scsi_device.id eventually */
unsigned long create:1; /* signal that it needs to be added */
unsigned int create:1; /* signal that it needs to be added */
unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */
/* means no lun present */

char scsi_level;
void *hostdata; /* available to low-level driver */
unsigned long starget_data[0]; /* for the transport */
Expand Down

0 comments on commit 9cb9673

Please sign in to comment.