On Mon, Jun 01 2009, Rusty Russell wrote:
> On Fri, 29 May 2009 01:45:27 pm john cooper wrote:
> > virtio_blk-serial-4.patch
>
> Hate to ask dumb questions, but is there a scsi equivalent of this? It'd be
> nice if we could avoid being ATA-specific in the long run...
SCSI has mode pages, where ATA pretty much stuffs everything into the
identify data.
> Also, why u16?
The identify page is word based, so u16 makes sense.
>
> Thanks,
> Rusty.
>
> > +/* return ATA identify data
> > + */
> > +static int virtblk_identify(struct gendisk *disk, void *argp)
> > +{
> > + struct virtio_blk *vblk = disk->private_data;
> > + u16 *id;
> > + int err = -ENOMEM;
> > +
> > + id = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
> > + if (!id)
> > + goto out;
> > +
> > + err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY,
> > + offsetof(struct virtio_blk_config, identify), id,
> > + VIRTIO_BLK_ID_BYTES);
>
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html