~ubuntu-branches/ubuntu/oneiric/seabios/oneiric

« back to all changes in this revision

Viewing changes to .pc/0019-fix-two-issues-with-virtio-blk.patch/src/virtio-blk.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn, Serge Hallyn, Dustin Kirkland
  • Date: 2011-02-14 14:38:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110214143850-cmzexufi3dlrt7ga
Tags: 0.6.1.2-0ubuntu1
[ Serge Hallyn ]
* upstream merge
  - updated debian/watch
  - remove all patches as they are applied upstream
  - removed debian-changes-0.6.0-0ubuntu2 - I'm not certain about this one,
    so it may re-introduce a regression

[ Dustin Kirkland ]
* debian/rules: fix lintian warnings, install changelog, make binary build
  arch indep
* debian/control: update standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _VIRTIO_BLK_H
2
 
#define _VIRTIO_BLK_H
3
 
 
4
 
struct virtio_blk_config
5
 
{
6
 
    u64 capacity;
7
 
    u32 size_max;
8
 
    u32 seg_max;
9
 
    u16 cylinders;
10
 
    u8 heads;
11
 
    u8 sectors;
12
 
    u32 blk_size;
13
 
    u8 physical_block_exp;
14
 
    u8 alignment_offset;
15
 
    u16 min_io_size;
16
 
    u32 opt_io_size;
17
 
} __attribute__((packed));
18
 
 
19
 
/* These two define direction. */
20
 
#define VIRTIO_BLK_T_IN         0
21
 
#define VIRTIO_BLK_T_OUT        1
22
 
 
23
 
/* This is the first element of the read scatter-gather list. */
24
 
struct virtio_blk_outhdr {
25
 
    /* VIRTIO_BLK_T* */
26
 
    u32 type;
27
 
    /* io priority. */
28
 
    u32 ioprio;
29
 
    /* Sector (ie. 512 byte offset) */
30
 
    u64 sector;
31
 
};
32
 
 
33
 
#define VIRTIO_BLK_S_OK         0
34
 
#define VIRTIO_BLK_S_IOERR      1
35
 
#define VIRTIO_BLK_S_UNSUPP     2
36
 
 
37
 
struct disk_op_s;
38
 
int process_virtio_op(struct disk_op_s *op);
39
 
void virtio_blk_setup(void);
40
 
 
41
 
#endif /* _VIRTIO_BLK_H */