Re: [PATCH 1/2] scsi: Add scsi_device max_cmd_len (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-04-28 at 17:32 -0400, Jeff Garzik wrote:
> If both host controller and device support 16-byte CDB, it should not be 
> limited to 12 bytes.

Well, the limit should really only reflect what the controller supports.
The SCSI heuristics, or slave configure flags should take care of the
devices.

> libata is not "playing games", just exporting what the hardware supports 
> as best the API allows.  It needs to support 16-byte CDBs for the same 
> reason any SCSI LLDD supports 16-byte CDBs.

I think he means this piece of code in libata-core.c:ata_dev_configure()

	ap->host->max_cmd_len = 0;
	for (i = 0; i < ATA_MAX_DEVICES; i++)
		ap->host->max_cmd_len = max_t(unsigned int,
					      ap->host->max_cmd_len,
					      ap->device[i].cdb_len);

You're setting the max_cmd_len based on the largest one supported by the
device.  What happens if that's larger than the HBA can support?

> Remember ATAPI<->SCSI bridges exist, thus any SCSI disk can appear 
> attached to ATAPI.

Well, that's like attaching a 4TB SPI array to a qla1280 (which has a
firmware 12 byte command limit).  You don't do it unless you want a
horrible mess.

James


-
: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux