Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932496AbVLUTyf (ORCPT ); Wed, 21 Dec 2005 14:54:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932499AbVLUTyf (ORCPT ); Wed, 21 Dec 2005 14:54:35 -0500 Received: from mail0.lsil.com ([147.145.40.20]:40163 "EHLO mail0.lsil.com") by vger.kernel.org with ESMTP id S932496AbVLUTyd (ORCPT ); Wed, 21 Dec 2005 14:54:33 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C60668.564A3D0D" Subject: [PATCH 1/1] megaraid_sas: cleanup up queuecommand path Date: Wed, 21 Dec 2005 12:54:21 -0700 Message-ID: <0631C836DBF79F42B5A60C8C8D4E8229136529@NAMAIL2.ad.lsil.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: [PATCH 1/1] megaraid_sas: cleanup up queuecommand path Thread-Index: AcYB34f2WcZ68GGdSLGqKup2RcukTgCZmqKQADA/icAAJqbJYAAxBkOA From: "Patro, Sumant" To: "Bagalkote, Sreenivas" , , , , Cc: "Kolli, Neela" , "Doelfel, Hardy" , "Yang, Bo" X-OriginalArrivalTime: 21 Dec 2005 19:54:22.0155 (UTC) FILETIME=[565711B0:01C60668] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 16834 Lines: 436 This is a multi-part message in MIME format. ------_=_NextPart_001_01C60668.564A3D0D Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hello All, This patch (originally submitted by Christoph Hellwig) removes code duplication in megasas_build_cmd. It also defines MEGASAS_IOC_FIRMWARE32 to allow 64 bit compiled applications to work. Patch is made against the latest git snapshot of scsi-misc-2.6 tree. Thanks, Sumant Patro =09 Signed-off-by: Sumant Patro diff -Naur linux2.6.orig/Documentation/scsi/ChangeLog.megaraid_sas linux2.6/Documentation/scsi/ChangeLog.megaraid_sas --- linux2.6.orig/Documentation/scsi/ChangeLog.megaraid_sas 1969-12-31 16:00:00.000000000 -0800 +++ linux2.6/Documentation/scsi/ChangeLog.megaraid_sas 2005-12-19 14:37:33.000000000 -0800 @@ -0,0 +1,15 @@ +1 Release Date : Mon Dec 19 14:36:26 PST 2005 - Sumant Patro +2 Current Version : 00.00.02.00-rc4=20 +3 Older Version : 00.00.02.01=20 + +i. Code reorganized to remove code duplication in megasas_build_cmd.=20 + + "There's a lot of duplicate code megasas_build_cmd. Move that out of the different codepathes and merge the reminder of megasas_build_cmd into megasas_queue_command" + + - Christoph Hellwig + +ii. Defined MEGASAS_IOC_FIRMWARE32 for code paths that handles 32 bit applications in 64 bit systems. + + "MEGASAS_IOC_FIRMWARE can't be redefined if CONFIG_COMPAT is set, we need to define a MEGASAS_IOC_FIRMWARE32 define so native binaries continue to work" + + - Christoph Hellwig diff -Naur linux2.6.orig/drivers/scsi/megaraid/megaraid_sas.c linux2.6/drivers/scsi/megaraid/megaraid_sas.c --- linux2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2005-12-15 14:08:21.000000000 -0800 +++ linux2.6/drivers/scsi/megaraid/megaraid_sas.c 2005-12-19 14:36:16.000000000 -0800 @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_sas.c - * Version : v00.00.02.00-rc4 + * Version : v00.00.02.01 * * Authors: * Sreenivas Bagalkote @@ -557,112 +557,29 @@ } =20 /** - * megasas_build_cmd - Prepares a command packet - * @instance: Adapter soft state - * @scp: SCSI command - * @frame_count: [OUT] Number of frames used to prepare this command + * megasas_is_ldio - Checks if the cmd is for logical drive + * @scmd: SCSI command + *=09 + * Called by megasas_queue_command to find out if the command to be queued + * is a logical drive command=09 */ -static inline struct megasas_cmd *megasas_build_cmd(struct megasas_instance - *instance, - struct scsi_cmnd *scp, - int *frame_count) +static inline int megasas_is_ldio(struct scsi_cmnd *cmd) { - u32 logical_cmd; - struct megasas_cmd *cmd; - - /* - * Find out if this is logical or physical drive command. - */ - logical_cmd =3D MEGASAS_IS_LOGICAL(scp); - - /* - * Logical drive command - */ - if (logical_cmd) { - - if (scp->device->id >=3D MEGASAS_MAX_LD) { - scp->result =3D DID_BAD_TARGET << 16; - return NULL; - } - - switch (scp->cmnd[0]) { - - case READ_10: - case WRITE_10: - case READ_12: - case WRITE_12: - case READ_6: - case WRITE_6: - case READ_16: - case WRITE_16: - /* - * Fail for LUN > 0 - */ - if (scp->device->lun) { - scp->result =3D DID_BAD_TARGET << 16; - return NULL; - } - - cmd =3D megasas_get_cmd(instance); - - if (!cmd) { - scp->result =3D DID_IMM_RETRY << 16; - return NULL; - } - - *frame_count =3D megasas_build_ldio(instance, scp, cmd); - - if (!(*frame_count)) { - megasas_return_cmd(instance, cmd); - return NULL; - } - - return cmd; - - default: - /* - * Fail for LUN > 0 - */ - if (scp->device->lun) { - scp->result =3D DID_BAD_TARGET << 16; - return NULL; - } - - cmd =3D megasas_get_cmd(instance); - - if (!cmd) { - scp->result =3D DID_IMM_RETRY << 16; - return NULL; - } - - *frame_count =3D megasas_build_dcdb(instance, scp, cmd); - - if (!(*frame_count)) { - megasas_return_cmd(instance, cmd); - return NULL; - } - - return cmd; - } - } else { - cmd =3D megasas_get_cmd(instance); - - if (!cmd) { - scp->result =3D DID_IMM_RETRY << 16; - return NULL; - } - - *frame_count =3D megasas_build_dcdb(instance, scp, cmd); - - if (!(*frame_count)) { - megasas_return_cmd(instance, cmd); - return NULL; - } - - return cmd; + if (!MEGASAS_IS_LOGICAL(cmd)) + return 0; + switch (cmd->cmnd[0]) { + case READ_10: + case WRITE_10: + case READ_12: + case WRITE_12: + case READ_6: + case WRITE_6: + case READ_16: + case WRITE_16: + return 1; + default: + return 0; } - - return NULL; } =20 /** @@ -683,13 +600,27 @@ scmd->scsi_done =3D done; scmd->result =3D 0; =20 - cmd =3D megasas_build_cmd(instance, scmd, &frame_count); - - if (!cmd) { - done(scmd); - return 0; + if (MEGASAS_IS_LOGICAL(scmd) && + (scmd->device->id >=3D MEGASAS_MAX_LD || scmd->device->lun)) { + scmd->result =3D DID_BAD_TARGET << 16; + goto out_done; } =20 + cmd =3D megasas_get_cmd(instance); + if (!cmd) + return SCSI_MLQUEUE_HOST_BUSY; + + /* + * Logical drive command + */ + if (megasas_is_ldio(scmd)) + frame_count =3D megasas_build_ldio(instance, scmd, cmd); + else + frame_count =3D megasas_build_dcdb(instance, scmd, cmd); + + if (!frame_count) + goto out_return_cmd; + cmd->scmd =3D scmd; scmd->SCp.ptr =3D (char *)cmd; scmd->SCp.sent_command =3D jiffies; @@ -705,6 +636,12 @@ &instance->reg_set->inbound_queue_port); =20 return 0; + + out_return_cmd: + megasas_return_cmd(instance, cmd); + out_done: + done(scmd); + return 0; } =20 /** @@ -2680,9 +2617,8 @@ unsigned long arg) { switch (cmd) { - case MEGASAS_IOC_FIRMWARE:{ - return megasas_mgmt_compat_ioctl_fw(file, arg); - } + case MEGASAS_IOC_FIRMWARE32: + return megasas_mgmt_compat_ioctl_fw(file, arg); case MEGASAS_IOC_GET_AEN: return megasas_mgmt_ioctl_aen(file, arg); } diff -Naur linux2.6.orig/drivers/scsi/megaraid/megaraid_sas.h linux2.6/drivers/scsi/megaraid/megaraid_sas.h --- linux2.6.orig/drivers/scsi/megaraid/megaraid_sas.h 2005-12-15 14:08:21.000000000 -0800 +++ linux2.6/drivers/scsi/megaraid/megaraid_sas.h 2005-12-19 14:29:32.000000000 -0800 @@ -18,10 +18,9 @@ /** * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "00.00.02.00-rc4" -#define MEGASAS_RELDATE "Sep 16, 2005" -#define MEGASAS_EXT_VERSION "Fri Sep 16 12:37:08 EDT 2005" - +#define MEGASAS_VERSION "00.00.02.01" +#define MEGASAS_RELDATE "Dec 19, 2005" +#define MEGASAS_EXT_VERSION "Mon Dec 19 14:36:26 PST 2005" /* * = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * MegaRAID SAS MFI firmware definitions @@ -1125,11 +1124,10 @@ struct compat_iovec sgl[MAX_IOCTL_SGE]; } __attribute__ ((packed)); =20 -#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct compat_megasas_iocpacket) -#else -#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) #endif =20 +#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) +#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket) #define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen) =20 struct megasas_mgmt_info { ------_=_NextPart_001_01C60668.564A3D0D Content-Type: application/octet-stream; name="patchmega.patch" Content-Transfer-Encoding: base64 Content-Description: patchmega.patch Content-Disposition: attachment; filename="patchmega.patch" ZGlmZiAtTmF1ciBsaW51eDIuNi5vcmlnL0RvY3VtZW50YXRpb24vc2NzaS9DaGFuZ2VMb2cubWVn YXJhaWRfc2FzIGxpbnV4Mi42L0RvY3VtZW50YXRpb24vc2NzaS9DaGFuZ2VMb2cubWVnYXJhaWRf c2FzCi0tLSBsaW51eDIuNi5vcmlnL0RvY3VtZW50YXRpb24vc2NzaS9DaGFuZ2VMb2cubWVnYXJh aWRfc2FzCTE5NjktMTItMzEgMTY6MDA6MDAuMDAwMDAwMDAwIC0wODAwCisrKyBsaW51eDIuNi9E b2N1bWVudGF0aW9uL3Njc2kvQ2hhbmdlTG9nLm1lZ2FyYWlkX3NhcwkyMDA1LTEyLTE5IDE0OjM3 OjMzLjAwMDAwMDAwMCAtMDgwMApAQCAtMCwwICsxLDE1IEBACisxIFJlbGVhc2UgRGF0ZSAgICA6 IE1vbiBEZWMgMTkgMTQ6MzY6MjYgUFNUIDIwMDUgLSBTdW1hbnQgUGF0cm8gPFN1bWFudC5QYX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QVRFCQkJCSJEZWMg MTksIDIwMDUiCisjZGVmaW5lIE1FR0FTQVNfRVhUX1ZFUlNJT04JCQkiTW9uIERlYyAxOSAxNDoz NjoyNiBQU1QgMjAwNSIKIC8qCiAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09CiAgKiBNZWdhUkFJRCBTQVMgTUZJIGZpcm13YXJlIGRlZmluaXRpb25zCkBAIC0xMTI1LDEx ICsxMTI0LDEwIEBACiAJc3RydWN0IGNvbXBhdF9pb3ZlYyBzZ2xbTUFYX0lPQ1RMX1NHRV07CiB9 IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTsKIAotI2RlZmluZSBNRUdBU0FTX0lPQ19GSVJNV0FS RQlfSU9XUignTScsIDEsIHN0cnVjdCBjb21wYXRfbWVnYXNhc19pb2NwYWNrZXQpCi0jZWxzZQot I2RlZmluZSBNRUdBU0FTX0lPQ19GSVJNV0FSRQlfSU9XUignTScsIDEsIHN0cnVjdCBtZWdhc2Fz X2lvY3BhY2tldCkKICNlbmRpZgogCisjZGVmaW5lIE1FR0FTQVNfSU9DX0ZJUk1XQVJFCV9JT1dS KCdNJywgMSwgc3RydWN0IG1lZ2FzYXNfaW9jcGFja2V0KQorI2RlZmluZSBNRUdBU0FTX0lPQ19G SVJNV0FSRTMyCV9JT1dSKCdNJywgMSwgc3RydWN0IGNvbXBhdF9tZWdhc2FzX2lvY3BhY2tldCkK ICNkZWZpbmUgTUVHQVNBU19JT0NfR0VUX0FFTglfSU9XKCdNJywgMywgc3RydWN0IG1lZ2FzYXNf YWVuKQogCiBzdHJ1Y3QgbWVnYXNhc19tZ210X2luZm8gewo= ------_=_NextPart_001_01C60668.564A3D0D-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/