On Sat, Jan 26, 2019 at 09:51:58PM +0100, Thomas Schmitt wrote: > Hi, > > > So to answer your question, it's the ioctl itself failing. > > This explains why we see a message. > It would be better to show errno or strerror() instead of req.retsts.
Yeah, perror() does that already. That's where 'Invalid argument' comes from. So it's failing with EINVAL. > Any traces to see in the system logs ? I was hoping to see something in the dmesg buffer, but alas, nothing. I printed the scsi command for each request in the hope that we can compare and spot the problem: ``` cdio_read_audio_sectors cmd: be 00 00 00 00 00 00 00 25 78 | datalen = 87024 SCIOCCOMMAND: Invalid argument cdio_read_audio_sectors cmd: be 00 00 00 00 00 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 12 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 24 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 36 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 48 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 5a 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 6c 00 00 12 78 | datalen = 42336 cdio_read_audio_sectors cmd: be 00 00 00 00 7e 00 00 12 78 | datalen = 42336 ... ``` After consulting the SCSI docs, the first request differs in that it requests 37 bits, whereas the subsequent request 18 bits. Is there perhaps some constraint on the transfer length? Must it be an even number, or a power of two, for example? -- Best Regards Edd Barrett http://www.theunixzoo.co.uk