Fix pointer/int warnings so this compiles on amd64. The driver wants
to store an int in the bio->bio_driver1 (a void *). It is big enough, but you have to match the int sizes first before doing the cast. Glanced at by: scottl
This commit is contained in:
parent
eabd19726f
commit
f472527c95
@ -248,7 +248,7 @@ static int ips_diskdev_init(ips_softc_t *sc)
|
||||
for(i=0; i < IPS_MAX_NUM_DRIVES; i++){
|
||||
if(sc->drives[i].state & IPS_LD_OKAY){
|
||||
sc->diskdev[i] = device_add_child(sc->dev, NULL, -1);
|
||||
device_set_ivars(sc->diskdev[i],(void *) i);
|
||||
device_set_ivars(sc->diskdev[i],(void *)(uintptr_t) i);
|
||||
}
|
||||
}
|
||||
if(bus_generic_attach(sc->dev)){
|
||||
|
@ -97,7 +97,7 @@ static void ips_io_request_callback(void *cmdptr, bus_dma_segment_t *segments,in
|
||||
}
|
||||
command_struct = (ips_io_cmd *)command->command_buffer;
|
||||
command_struct->id = command->id;
|
||||
command_struct->drivenum = (uint32_t)iobuf->bio_driver1;
|
||||
command_struct->drivenum = (uintptr_t)iobuf->bio_driver1;
|
||||
if(segnum != 1){
|
||||
if(ips_read_request(iobuf))
|
||||
cmdtype = IPS_SG_READ_CMD;
|
||||
|
@ -97,7 +97,7 @@ static void ipsd_strategy(struct bio *iobuf)
|
||||
|
||||
dsc = iobuf->bio_disk->d_drv1;
|
||||
DEVICE_PRINTF(8,dsc->dev,"in strategy\n");
|
||||
(uint32_t)iobuf->bio_driver1 = dsc->sc->drives[dsc->disk_number].drivenum;
|
||||
iobuf->bio_driver1 = (void *)(uintptr_t)dsc->sc->drives[dsc->disk_number].drivenum;
|
||||
ips_start_io_request(dsc->sc, iobuf);
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ static int ipsd_attach(device_t dev)
|
||||
dsc->dev = dev;
|
||||
dsc->sc = device_get_softc(adapter);
|
||||
dsc->unit = device_get_unit(dev);
|
||||
dsc->disk_number = (int) device_get_ivars(dev);
|
||||
dsc->disk_number = (uintptr_t) device_get_ivars(dev);
|
||||
dsc->ipsd_disk.d_drv1 = dsc;
|
||||
dsc->ipsd_disk.d_name = "ipsd";
|
||||
dsc->ipsd_disk.d_maxsize = IPS_MAX_IO_SIZE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user