Problem Description: The Adaptec aic7xxx / aic79xx HBA drivers use the default max_cmd_len of 12, when in fact the hardware supports 16 byte CDBs. This can be corrected by adding the line: host->max_cmd_len = 16; soon after the call to scsi_host_alloc() in aic7xxx_osm.c and aic79xx_osm.c. I have confirmed that this change functions correctly. This feature is important because Quantum's latest drives (SDLT600, DLT-S4 and DLT-V4) use the 16 byte commands 8C (Read Attributes) and 8D (Write Attributes) to implement their WORM functionality. In order to support this feature on Linux platforms 16 byte CDBs must be enabled in the individual HBA driver.
This same problem applies to many other HBAs as well, but I have not tested the change since I don't have the hardware available. Some hardware may not support 16 byte CDBs.
Begin forwarded message: Date: Fri, 16 Dec 2005 14:50:39 -0800 From: bugme-daemon@bugzilla.kernel.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 5755] New: 16 byte CDBs not enabled in Adaptec SCSI HBA drivers http://bugzilla.kernel.org/show_bug.cgi?id=5755 Summary: 16 byte CDBs not enabled in Adaptec SCSI HBA drivers Kernel Version: 2.6.12 Status: NEW Severity: low Owner: andmike@us.ibm.com Submitter: brianr01@yahoo.com Problem Description: The Adaptec aic7xxx / aic79xx HBA drivers use the default max_cmd_len of 12, when in fact the hardware supports 16 byte CDBs. This can be corrected by adding the line: host->max_cmd_len = 16; soon after the call to scsi_host_alloc() in aic7xxx_osm.c and aic79xx_osm.c. I have confirmed that this change functions correctly. This feature is important because Quantum's latest drives (SDLT600, DLT-S4 and DLT-V4) use the 16 byte commands 8C (Read Attributes) and 8D (Write Attributes) to implement their WORM functionality. In order to support this feature on Linux platforms 16 byte CDBs must be enabled in the individual HBA driver. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
Created attachment 7346 [details] proposed patch to enable 16 byte CDBs in the aic7xxx/aic79xx driver Here's a proposed patch to resolve this bug; it changes two lines of code. The only risks I can see is if there are versions of the Adaptec HBAs that don't support 16 byte CDBs that are supported by these drivers.
Not quite so. aic79xx has a specific register CDBLIMIT which holds the maximum CDB length. It is initialised with 0xc, ie 12 byte CDBs. It's
(Rah, hit the 'commit' button too early). It's quite unclear if this is a soft- or a hard limit. The sources seem to indicate that 16-byte CDBs are possible, but only for 12-byte CDBs it can do autosense. Some more investigation is needed, I think.
Any updates on this problem? Thanks.
Created attachment 12099 [details] aic7xx-enable-16byte-CDBs Patch to enable large CDBs in aic7xxx/aic79xx.
After further digging I think it's reasonably safe to enable large CDBs in the driver. However, we should stick to the driver defined values (ie 32 bytes for aic7xxx and 16 byte for aic79xx). Patch has been sent to linux-scsi for inclusion.