Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7693
b: refs/heads/master
c: 10c1b88
h: refs/heads/master
i:
  7691: a532f98
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Aug 14, 2005
1 parent 9234cbd commit d7d67d5
Show file tree
Hide file tree
Showing 3 changed files with 12 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: 3a4f5c60dbe1978580ea03c1aff353d1e63d1638
refs/heads/master: 10c1b88987d618f4f89c10e11e574c76de73b5e7
11 changes: 10 additions & 1 deletion trunk/drivers/scsi/scsi_transport_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,7 @@ static int spi_device_match(struct attribute_container *cont,
{
struct scsi_device *sdev;
struct Scsi_Host *shost;
struct spi_internal *i;

if (!scsi_is_sdev_device(dev))
return 0;
Expand All @@ -1094,13 +1095,17 @@ static int spi_device_match(struct attribute_container *cont,
/* Note: this class has no device attributes, so it has
* no per-HBA allocation and thus we don't need to distinguish
* the attribute containers for the device */
i = to_spi_internal(shost->transportt);
if (i->f->deny_binding && i->f->deny_binding(sdev->sdev_target))
return 0;
return 1;
}

static int spi_target_match(struct attribute_container *cont,
struct device *dev)
{
struct Scsi_Host *shost;
struct scsi_target *starget;
struct spi_internal *i;

if (!scsi_is_target_device(dev))
Expand All @@ -1112,7 +1117,11 @@ static int spi_target_match(struct attribute_container *cont,
return 0;

i = to_spi_internal(shost->transportt);

starget = to_scsi_target(dev);

if (i->f->deny_binding && i->f->deny_binding(starget))
return 0;

return &i->t.target_attrs.ac == cont;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/scsi_transport_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ struct spi_function_template {
void (*set_hold_mcs)(struct scsi_target *, int);
void (*get_signalling)(struct Scsi_Host *);
void (*set_signalling)(struct Scsi_Host *, enum spi_signal_type);
int (*deny_binding)(struct scsi_target *);
/* The driver sets these to tell the transport class it
* wants the attributes displayed in sysfs. If the show_ flag
* is not set, the attribute will be private to the transport
Expand Down

0 comments on commit d7d67d5

Please sign in to comment.