[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interface for SCSI transactions ?
From: |
Thomas Schmitt |
Subject: |
Re: Interface for SCSI transactions ? |
Date: |
Tue, 13 Sep 2011 16:49:55 +0200 |
Hi,
i had to learn that a kvm emulated CD-ROM appears as /dev/hd2.
I suspect this means it is not controlled by an SCSI driver but by
gnumach/linux/src/drivers/block/ide.c
gnumach/linux/src/drivers/block/ide-cd.c
Is this correct ?
If so then i will try to use ATAPI commands. E.g via
int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq,
ide_action_t action)
Linux >= 2.6 is so nice to hide the difference by allowing to use
ioctl(SG_IO) on /dev/srN and /dev/hdX.
On 2.4 one had to use kernel module ide-scsi for ioctl(SG_IO) on /dev/sgN,
or ioctl(CDROM_SEND_PACKET) on /dev/hdX. growisofs uses both ioctls with
the same SCSI commands.
So in principle, this replugging should be doable.
Well, first i will have to find a road from device_t to ide_drive_t ...
Hey. That was easy ! gnumach/linux/src/drivers/block/ide.c:
/*
* get_info_ptr() returns the (ide_drive_t *) for a given device number.
* It returns NULL if the given device number does not match any present drives.
*/
static ide_drive_t *get_info_ptr (kdev_t i_rdev)
(Hopefully not too easy.)
Have a nice day :)
Thomas
- Re: Interface for SCSI transactions ?, (continued)
- Re: Interface for SCSI transactions ?, Thomas Schmitt, 2011/09/29
- Re: Interface for SCSI transactions ?, olafBuddenhagen, 2011/09/13
- Re: Interface for SCSI transactions ?, Samuel Thibault, 2011/09/13
- Implicit IN? (was: Interface for SCSI transactions ?), olafBuddenhagen, 2011/09/23
- Re: Implicit IN? (was: Interface for SCSI transactions ?), Samuel Thibault, 2011/09/23
- Re: Implicit IN?, olafBuddenhagen, 2011/09/29
- Re: Implicit IN?, Samuel Thibault, 2011/09/29
- Re: Interface for SCSI transactions ?, Thomas Schmitt, 2011/09/13
- Re: Interface for SCSI transactions ?, Thomas Schmitt, 2011/09/13
- Re: Interface for SCSI transactions ?, Samuel Thibault, 2011/09/13
- Re: Interface for SCSI transactions ?,
Thomas Schmitt <=
- Re: Interface for SCSI transactions ?, olafBuddenhagen, 2011/09/23
- Re: Interface for SCSI transactions ?, Samuel Thibault, 2011/09/14
- Re: Interface for SCSI transactions ?, Thomas Schmitt, 2011/09/15
Re: Interface for SCSI transactions ?, Samuel Thibault, 2011/09/05