diff options
author | Brian King <brking@us.ibm.com> | 2006-03-29 15:37:22 (GMT) |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 15:13:28 (GMT) |
commit | e4fbf44ed0618acce4a06010ed9fa9c02e06e36a (patch) | |
tree | fea3359ad2e1281781a6cefb75c270a0a9ed0bd7 /drivers/scsi/ipr.h | |
parent | 1121b794a384bc317fe36e967b82308b0e2c3852 (diff) | |
download | linux-e4fbf44ed0618acce4a06010ed9fa9c02e06e36a.tar.xz |
[SCSI] ipr: Fixup device type check
Fixup a check used by the ipr driver to determine if a given
device is a SCSI disk. Due to the addition of support for
attaching SATA devices, this check needs to be more robust.
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r-- | drivers/scsi/ipr.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index ee9169d..c08bd2f 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -1305,6 +1305,22 @@ static inline int ipr_is_gscsi(struct ipr_resource_entry *res) } /** + * ipr_is_scsi_disk - Determine if a resource is a SCSI disk + * @res: resource entry struct + * + * Return value: + * 1 if SCSI disk / 0 if not SCSI disk + **/ +static inline int ipr_is_scsi_disk(struct ipr_resource_entry *res) +{ + if (ipr_is_af_dasd_device(res) || + (ipr_is_gscsi(res) && IPR_IS_DASD_DEVICE(res->cfgte.std_inq_data))) + return 1; + else + return 0; +} + +/** * ipr_is_naca_model - Determine if a resource is using NACA queueing model * @res: resource entry struct * |