From: Stefan Richter Subject: [PATCH] firewire: sbp2: add support for disks >2 TB (and CBSs >12 bytes) Date: Mon, 29 Jun 2009 22:01:22 +0200 (CEST) Message-ID: References: <85681F9DCBFF144DA59C70D83EBC1DA2E1EDE7@EIOISER.ioi.com.tw> <49FEFF7A.3090603@s5r6.in-berlin.de> <1241448686.3315.27.camel@mulgrave.int.hansenpartnership.com> <4A4908C4.1070705@s5r6.in-berlin.de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Return-path: Received: from einhorn.in-berlin.de ([192.109.42.8]:56706 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752304AbZF2UBf (ORCPT ); Mon, 29 Jun 2009 16:01:35 -0400 In-Reply-To: <4A4908C4.1070705@s5r6.in-berlin.de> Content-Disposition: INLINE Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: linux1394-devel@lists.sourceforge.net Cc: linux-scsi@vger.kernel.org, Ronald I wrote: > 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. No, we don't need to check anything. The transport allows for arbitrarily sized command descriptor blocks. ---------- 8< ---------- We forgot to set Scsi_Host.max_cmd_len. Therefore SCSI core sent at most 12 bytes long commands to FireWire targets. Among else, this prevented support of disks larger than 2 TB. Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: b/drivers/firewire/sbp2.c =================================================================== --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1146,6 +1146,12 @@ static int sbp2_probe(struct device *dev if (fw_device_enable_phys_dma(device) < 0) goto fail_shost_put; + /* + * SBP-2 does not impose limits on the CDB length. Targets may have + * limits, but this is going to be reported at the command set level. + */ + shost->max_cmd_len = SCSI_MAX_VARLEN_CDB_SIZE; + if (scsi_add_host(shost, &unit->device) < 0) goto fail_shost_put; -- Stefan Richter -=====-==--= -==- ===-= http://arcgraph.de/sr/