Re: Linux doesn't support bigger than 2TB IEEE-1394 disk

Stefan Richter
2009-06-29T18:33:00Z

James Bottomley wrote on 2009-05-04:
> On Mon, 2009-05-04 at 16:45 +0200, Stefan Richter wrote:
>> Ronald wrote at linux1394-user:
>>> Linux doesn't support bigger than 2TB IEEE-1394 disk.
>>>
>>> Will Linux have new driver for this issue?
>> (Adding Cc: linux-scsi)
>>
>> As far as I can tell, Linux does support IEEE 1394 disks of any size.
>> However, if I'm not mistaken, disks larger than 2 TB require that the
>> READ CAPACITY (16) command is used to check the disk's capacity, rather
>> than the usual READ CAPACITY (10) command. Somebody correct me if I'm
>> wrong.
>>
>> By far most firmwares of IEEE 1394/ SBP-2 chipsets implement only the
>> RBC (Reduced Block Commands) command set specification, or at least
>> claim so in their INQUIRY response. If I understood correctly, the
>> Linux SCSI stack will never send READ CAPACITY (16) to them since this
>> command is not included in RBC.
>
> That's true ... but not quite the way we work. There's a standard
> defined return for READ CAPACITY(10) which means ... I have more
> sectors, please use READ CAPACITY (16). If we get that return, we'll
> try again with READ CAPACITY (16) regardless of whether the device says
> it's only RBC or not.

I obviously missed one other fact:

Initiator drivers need to tell the Linux SCSI core what the maximum
length of commands is that the driver is able to send to targets. Alas
our SBP-2 drivers do not specifiy a value for this (struct
Scsi_Host.max_cmd_len) and hence the core will send at most 12 bytes
long command blocks. But for disks > 2TB, we need 16 bytes long command
blocks.

I need to fix the SBP-2 drivers to set the limit correctly. This will
be a little more than one-liners though, I guess, because we need to
check a target capability datum before we set the length limit.

Stay tuned.
--
Stefan Richter
-=====-==--= -==- ===-=