Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77025
b: refs/heads/master
c: 25d7c36
h: refs/heads/master
i:
  77023: ded6727
v: v3
  • Loading branch information
Tony Battersby authored and James Bottomley committed Jan 12, 2008
1 parent bcb9cbe commit a15f7a8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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: f28cd7cf8f696eafe42d1632b5a306fbf784d3cd
refs/heads/master: 25d7c363f2663fe399e623c9bd819258c9760bdc
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static void scsi_run_queue(struct request_queue *q)
struct Scsi_Host *shost = sdev->host;
unsigned long flags;

if (sdev->single_lun)
if (scsi_target(sdev)->single_lun)
scsi_single_lun_run(sdev);

spin_lock_irqsave(shost->host_lock, flags);
Expand Down Expand Up @@ -1559,7 +1559,7 @@ static void scsi_request_fn(struct request_queue *q)

if (!scsi_host_queue_ready(q, shost, sdev))
goto not_ready;
if (sdev->single_lun) {
if (scsi_target(sdev)->single_lun) {
if (scsi_target(sdev)->starget_sdev_user &&
scsi_target(sdev)->starget_sdev_user != sdev)
goto not_ready;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
sdev->no_start_on_add = 1;

if (*bflags & BLIST_SINGLELUN)
sdev->single_lun = 1;
scsi_target(sdev)->single_lun = 1;

sdev->use_10_for_rw = 1;

Expand Down
6 changes: 3 additions & 3 deletions trunk/include/scsi/scsi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ struct scsi_device {
unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */
unsigned simple_tags:1; /* simple queue tag messages are enabled */
unsigned ordered_tags:1;/* ordered queue tag messages are enabled */
unsigned single_lun:1; /* Indicates we should only allow I/O to
* one of the luns for the device at a
* time. */
unsigned was_reset:1; /* There was a bus reset on the bus for
* this device */
unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN
Expand Down Expand Up @@ -202,6 +199,9 @@ struct scsi_target {
unsigned int id; /* target id ... replace
* scsi_device.id eventually */
unsigned int create:1; /* signal that it needs to be added */
unsigned int single_lun:1; /* Indicates we should only
* allow I/O to one of the luns
* for the device at a time. */
unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */
/* means no lun present */

Expand Down

0 comments on commit a15f7a8

Please sign in to comment.