Subject: Re: Bus-Master DMA error: missing interrupt
To: Todd Vierling <tv@pobox.com>
From: Zdenek Salvet <salvet@ics.muni.cz>
List: current-users
Date: 12/28/1998 12:55:13
> On Fri, 25 Dec 1998, Manuel Bouyer wrote:
> 
> : > BTW, cd driver does not properly check request size when reading
> : >      through the end of partition, dd if=/dev/rcd0a of=/dev/null bs=64k
> : >      results in 
> : > 
> : > cd0(pciide0:1:1):  Check Condition on CDB: 0x28 00 00 04 d6 00 00 00 20 00
> : >     SENSE KEY:  Illegal Request
> : >      ASC/ASCQ:  Logical Block Address Out of Range
> : 
> : For now, I don't think anything initialize the partition table;
> : the 'a' partition acts as a raw partition.
> 
> That's not quite it; I believe the user was mentioning the fact that neither
> EOF nor errno=EIO are returned on a read past end of raw unit as with tape
> drives; instead, the above check condition is generated.

Yes, I think one should get partial block and EOF at the end of partition
like with wd device:

$ dd if=/dev/rwd1b  of=/dev/null bs=64k
3152+1 records in
3152+1 records out
206599680 bytes transferred in 26 secs (7946141 bytes/sec)

I get: (CD size == 9904.75 * 64kB)

$ dd if=/dev/rcd0a  of=/dev/null bs=64k
dd: /dev/rcd0a: Invalid argument
9904+0 records in                     
9904+0 records out
649068544 bytes transferred in 193 secs (3363049 bytes/sec)

$ disklabel cd0
# /dev/rcd0d:
type: ATAPI
disk: \216\214\360
label: fictitious
flags: removable
bytes/sector: 2048
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 3170
total sectors: 316952
rpm: 300
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

4 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:  1267808        0    ISO9660                        # (Cyl.    0 - 12678*)
  d:  1267808        0    ISO9660                        # (Cyl.    0 - 12678*)
disklabel: boot block size 0
disklabel: super block size 0
disklabel: partition a: partition extends past end of unit
disklabel: partition d: partition extends past end of unit

$ dmesg |tail -4
cd0(pciide0:1:1):  Check Condition on CDB: 0x28 00 00 04 d6 00 00 00 20 00
    SENSE KEY:  Illegal Request
     ASC/ASCQ:  Logical Block Address Out of Range



-- 
Zdenek Salvet                                              salvet@ics.muni.cz 
Ustav vypocetni techniky Masarykovy univerzity, Brno
tel.: ++420-5-41 512 257                           Fax: ++420-5-41 212 747
----------------------------------------------------------------------------
           If God had meant for us to be in the Army,
         we would have been born with green, baggy skin.