libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] Warning of potential regression


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] Warning of potential regression
Date: Sun, 20 Dec 2009 07:33:58 -0500

Register an account at  https://savannah.gnu.org/ and contact me off list
with the user id.

It is likely that setting the drive speed or block size is broken. Down the
line more and better testing is needed.

Your suggestion to change the two questionable SCSI_MMC_DATA_WRITEs to
SCSI_MMC_DATA_NONE is fine.

On Sun, Dec 20, 2009 at 6:02 AM, Thomas Schmitt <address@hidden> wrote:

> Hi,
>
> i have to raise a warning about the commit
> diff at
>
> http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff;h=4e8eff137e4912f13f6740c3abf52e44430bcff8
>
> Something went wrong with patching.
> (I will have to practice that.)
>
> Now is defined
>  SCSI_MMC_DATA_NONE
> but it is not interpreted in
>  run_mmc_cmd_linux()
>
> So it gets now mapped to
>  CGC_DATA_WRITE
>
> But all libcdio MMC commands on Linux
> effectively used
>  CGC_DATA_READ
> up to this change.
> So it is untested whether the commands of
> direction NONE work on all Linuxes with
>  CGC_DATA_WRITE
>
> On the other hand, the other six OS drivers all
> evaluate e_direction and this mapped
> SCSI_MMC_DATA_WRITE to their WRITE symbol.
> (How much tested ?)
>
>
> Thus the correction of the bug might have impact
> on two functions in libcdio if performed on
> Linux:
>  mmc_start_stop_media(const CdIo_t *p_cdio, bool b_eject, bool b_immediate,
>                     uint8_t power_condition)
> uses
>  SCSI_MMC_DATA_WRITE
> which now gets into effect on Linux.
> It was already in effect on the other OSes.
> CDIO_MMC_GPCMD_START_STOP = 1Bh START/STOP UNIT
> is a command with direction NONE.
>
> The same with
>  mmc_eject_media( const CdIo_t *p_cdio )
> which uses 1Eh PREVENT/ALLOW MEDIA REMOVAL.
>
>
> It also affects all applications which use
> SCSI_MMC_DATA_WRITE on Linux.
> (But we cannot simply continue with mapping
> WRITE to READ, can we ?)
>
>
> ------------------------------------------------
>
> Proposal:
>
> - Change the two questionable SCSI_MMC_DATA_WRITE
>  to SCSI_MMC_DATA_NONE.
>  The other six OS drivers will for now continue
>  to map this to their WRITE symbol. (I checked.)
>
> - In gnu_linux.c either
>  - interpret SCSI_MMC_DATA_NONE as CGC_DATA_NONE
>    as i proposed in my patch.
>  - or default SCSI_MMC_DATA_NONE to CGC_DATA_READ
>    so that the two changed functions are back on
>    READ again.
>
> This is because i am quite sure that CGC_DATA_NONE
> is ok on all Linux >= 2.4. Up to now it was more or
> less ok to use CGC_DATA_READ within libcdio.
> (How did mmc_set_speed() and
>  mmc_set_blocksize_private() perform up to now ?
>  They did not get their WRITE into effect before
>  the change. Did they work anyway ?)
>
>
> Have a nice day :)
>
> Thomas
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]