diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-10-26 11:48:06 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-10-26 11:48:06 -0400 |
commit | 1902c94de0c5621726c0b05b55a2bb33e76268d6 (patch) | |
tree | f1cd02a0706a61550a7ab22018666c4bced1d136 /src/hw/virtio-scsi.c | |
parent | f08e84793c51ef64dc1d08e3a9bee3f47581e8de (diff) | |
download | seabios-1902c94de0c5621726c0b05b55a2bb33e76268d6.tar.gz |
Convert op->drive_g from a 16bit pointer to a 32 bit "GLOBALFLAT" pointer.
The "drive" structure is always malloc'ed and therefore always starts
off described as a 32-bit "flat" pointer. Instead of switching
to/from 16bit pointers, make all the code use the 32bit pointer. This
eliminates the confusing 16/32 bit pointer switches.
This patch also removes the "_g" suffixes on local variables in
functions that are always called in 32bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/virtio-scsi.c')
-rw-r--r-- | src/hw/virtio-scsi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c index 7cde3bcb..4b4ec7bb 100644 --- a/src/hw/virtio-scsi.c +++ b/src/hw/virtio-scsi.c @@ -7,7 +7,7 @@ // // This file may be distributed under the terms of the GNU LGPLv3 license. -#include "biosvar.h" // GET_GLOBAL +#include "biosvar.h" // GET_GLOBALFLAT #include "block.h" // struct drive_s #include "blockcmd.h" // scsi_drive_setup #include "config.h" // CONFIG_* @@ -89,12 +89,13 @@ virtio_scsi_cmd(u16 ioaddr, struct vring_virtqueue *vq, struct disk_op_s *op, int virtio_scsi_cmd_data(struct disk_op_s *op, void *cdbcmd, u16 blocksize) { - struct virtio_lun_s *vlun = - container_of(op->drive_g, struct virtio_lun_s, drive); + struct virtio_lun_s *vlun_gf = + container_of(op->drive_gf, struct virtio_lun_s, drive); - return virtio_scsi_cmd(GET_GLOBAL(vlun->ioaddr), - GET_GLOBAL(vlun->vq), op, cdbcmd, - GET_GLOBAL(vlun->target), GET_GLOBAL(vlun->lun), + return virtio_scsi_cmd(GET_GLOBALFLAT(vlun_gf->ioaddr), + GET_GLOBALFLAT(vlun_gf->vq), op, cdbcmd, + GET_GLOBALFLAT(vlun_gf->target), + GET_GLOBALFLAT(vlun_gf->lun), blocksize); } |