On Sat, 2015-05-16 at 16:17 +0900, Akinobu Mita wrote: > For 6-byte r/w commands, transfer length 0 means 256 blocks of data, > not 0 block. > > But some drivers consider transfer length 0 as 0 block. > Fortunately, the scsi disk driver sets up 10-byte r/w commands for > 256 blocks of data instead of 6-byte r/w commands. So this could be > an issue when SCSI commands are issued by SG_IO ioctl. 6-byte commands are obsolete, so there's not a lot of point in doing this; however, in the early days of SCSI, there was considerable confusion about what 0 transfer length meant (I think it wasn't until SCSI-2 that it was clarified). Even today, USB drive manufacturers have considerable difficulty with it, that's why the sd driver avoids it, as would any sensible program doing sg_io. James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html