All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] add extra inquiry byte 56 data to struct scsi_device
Date: Sat, 21 Aug 2004 00:41:12 -0400	[thread overview]
Message-ID: <4126D268.4060208@pobox.com> (raw)
In-Reply-To: <1093061216.2688.710.camel@mulgrave>

James Bottomley wrote:
> +/* accessor functions for the SCSI parameters */
> +static inline int scsi_device_sync(struct scsi_device *sdev)
> +{
> +	return sdev->sdtr;
> +}
> +static inline int scsi_device_wide(struct scsi_device *sdev)
> +{
> +	return sdev->wdtr;
> +}
> +static inline int scsi_device_dt(struct scsi_device *sdev)
> +{
> +	return sdev->ppr;
> +}
> +static inline int scsi_device_dt_only(struct scsi_device *sdev)
> +{
> +	if (sdev->inquiry_len < 57)
> +		return 0;
> +	return (sdev->inquiry[56] & 0x0c) == 0x04;
> +}
> +static inline int scsi_device_ius(struct scsi_device *sdev)
> +{
> +	if (sdev->inquiry_len < 57)
> +		return 0;
> +	return sdev->inquiry[56] & 0x01;
> +}
> +static inline int scsi_device_qas(struct scsi_device *sdev)
> +{
> +	if (sdev->inquiry_len < 57)
> +		return 0;
> +	return sdev->inquiry[56] & 0x02;


Very nice.  Two nits (of course),
* my fingers would prefer scsidev_foo or scsi_inq_foo
* might as well take the opportunity to kill sdtr/wdtr/ppr :)


  reply	other threads:[~2004-08-21  4:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-21  1:56 [PATCH] add extra inquiry byte 56 data to struct scsi_device James Bottomley
2004-08-21  3:21 ` Jeff Garzik
2004-08-21  3:39   ` James Bottomley
2004-08-21  4:06   ` James Bottomley
2004-08-21  4:41     ` Jeff Garzik [this message]
2004-08-21  4:38   ` Randy.Dunlap
2004-08-21  4:57     ` Jeff Garzik
2004-08-21 13:03 ` Douglas Gilbert
2004-08-21 13:51   ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4126D268.4060208@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.