temp.vm-help.com
http://www.vm-help.com/forum/

Build driver for our SSD PCIe card
http://www.vm-help.com/forum/viewtopic.php?f=34&t=5140
Page 1 of 1

Author:  libran108 [ Sun Jan 05, 2014 9:58 pm ]
Post subject:  Build driver for our SSD PCIe card

I have already set up the build environment with the help of trickstarter's ESXI 5.x Drivers Part 1 and 2. When failed to compile our code, I find that the struct bio is changed like:

Code:
78 /*
 79  * main unit of I/O for the block layer and lower layers (ie drivers and
 80  * stacking drivers)
 81  */
 82 struct bio {
 83         sector_t                bi_sector;
 84         struct bio              *bi_next;       /* request queue link */
 85         struct block_device     *bi_bdev;
 86         unsigned long           bi_flags;       /* status, command, etc */
 87         unsigned long           bi_rw;          /* bottom bits READ/WRITE,
 88                                                  * top bits priority
 89                                                  */
 90
 91 #if !defined(__VMKLNX__)
 92         unsigned short          bi_vcnt;        /* how many bio_vec's */
 93         unsigned short          bi_idx;         /* current index into bvl_vec */
 94 #endif /* !defined(__VMKLNX__) */
 95  ...
 


The bi_vcnt and bi_idx are commented, so I can't use them any more.
However, I need them to judge if it is aligned or not, like:
Code:
(((struct bio *)bio)->bi_vcnt - ((struct bio *)bio)->bi_idx) == ((struct bio *)bio)->bi_size/PAGE_SIZE;


According to ESXI 5.x Drivers Part 3: Compiling, it seems I shall remove them since __VMKLNX__ means VMWare intends to do it explicitly.

Any suggestion or hint? thanks in advance!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/