ide-scsi: set drive->scsi flag for devices handled by the driver

This is a preparation for adding generic ide_transfer_pc() helper.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 794cc680
...@@ -629,6 +629,8 @@ static void ide_scsi_remove(ide_drive_t *drive) ...@@ -629,6 +629,8 @@ static void ide_scsi_remove(ide_drive_t *drive)
put_disk(g); put_disk(g);
ide_scsi_put(scsi); ide_scsi_put(scsi);
drive->scsi = 0;
} }
static int ide_scsi_probe(ide_drive_t *); static int ide_scsi_probe(ide_drive_t *);
...@@ -969,6 +971,8 @@ static int ide_scsi_probe(ide_drive_t *drive) ...@@ -969,6 +971,8 @@ static int ide_scsi_probe(ide_drive_t *drive)
!(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t)))) !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
return -ENODEV; return -ENODEV;
drive->scsi = 1;
g = alloc_disk(1 << PARTN_BITS); g = alloc_disk(1 << PARTN_BITS);
if (!g) if (!g)
goto out_host_put; goto out_host_put;
...@@ -1009,6 +1013,7 @@ static int ide_scsi_probe(ide_drive_t *drive) ...@@ -1009,6 +1013,7 @@ static int ide_scsi_probe(ide_drive_t *drive)
put_disk(g); put_disk(g);
out_host_put: out_host_put:
drive->scsi = 0;
scsi_host_put(host); scsi_host_put(host);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment