* [PATCH 1/3] arcmsr: Modify maxium outstanding command
@ 2013-07-17 2:52 黃清隆
2013-08-23 17:31 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: 黃清隆 @ 2013-07-17 2:52 UTC (permalink / raw)
To: linux-scsi, linux-kernel; +Cc: ching2048
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
From: Ching<ching2048@areca.com.tw>
Modify maximum outstanding command number, notify command complete with auto
request sense, reassign ARC12x4 series to SATA type adapter
Signed-off-by: Chingching2048@areca.com.tw
---
[-- Attachment #2: patch1 --]
[-- Type: application/octet-stream, Size: 3305 bytes --]
diff -uprN a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h
--- a/drivers/scsi/arcmsr/arcmsr.h 2012-11-17 02:02:18.000000000 +0800
+++ b/drivers/scsi/arcmsr/arcmsr.h 2013-05-07 01:49:08.000000000 +0800
@@ -51,7 +51,7 @@ struct device_attribute;
#else
#define ARCMSR_MAX_FREECCB_NUM 320
#endif
-#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2012/09/30"
+#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2013/05/06"
#define ARCMSR_SCSI_INITIATOR_ID 255
#define ARCMSR_MAX_XFER_SECTORS 512
#define ARCMSR_MAX_XFER_SECTORS_B 4096
@@ -705,6 +705,7 @@ struct AdapterControlBlock
#define FW_DEADLOCK 0x0010
atomic_t rq_map_token;
atomic_t ante_token_value;
+ uint32_t maxOutstanding;
};/* HW_DEVICE_EXTENSION */
/*
*******************************************************************************
diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
--- a/drivers/scsi/arcmsr/arcmsr_hba.c 2012-12-19 02:02:36.000000000 +0800
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2013-05-07 19:12:12.000000000 +0800
@@ -2,7 +2,7 @@
*******************************************************************************
** O.S : Linux
** FILE NAME : arcmsr_hba.c
-** BY : Nick Cheng
+** BY : Nick Cheng, C.L. Huang
** Description: SCSI RAID Device Driver for
** ARECA RAID Host adapter
*******************************************************************************
@@ -71,7 +71,7 @@
#include <scsi/scsicam.h>
#include "arcmsr.h"
MODULE_AUTHOR("Nick Cheng <support@areca.com.tw>");
-MODULE_DESCRIPTION("Areca SAS RAID Controller Driver");
+MODULE_DESCRIPTION("Areca SAS,SATA RAID Controller Driver");
MODULE_LICENSE("Dual BSD/GPL");
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
@@ -1329,7 +1329,8 @@ arcmsr_report_sense_info(struct CommandC
struct scsi_cmnd *pcmd = ccb->pcmd;
struct SENSE_DATA *sensebuffer =
(struct SENSE_DATA *)pcmd->sense_buffer;
- pcmd->result = DID_OK << 16;
+ pcmd->result = (DID_OK << 16) | (CHECK_CONDITION << 1)
+ | (DRIVER_SENSE << 24);
if (sensebuffer) {
int sense_data_length =
sizeof(struct SENSE_DATA) < SCSI_SENSE_BUFFERSIZE
@@ -3313,7 +3314,7 @@ arcmsr_queue_command_lck(struct scsi_cmn
return 0;
}
if (atomic_read(&acb->ccboutstandingcount) >=
- ARCMSR_MAX_OUTSTANDING_CMD)
+ acb->maxOutstanding)
return SCSI_MLQUEUE_HOST_BUSY;
ccb = arcmsr_get_freeccb(acb);
if (!ccb)
@@ -3710,6 +3711,10 @@ arcmsr_get_firmware_spec(struct AdapterC
default:
break;
}
+ if(acb->firm_numbers_queue > ARCMSR_MAX_FREECCB_NUM)
+ acb->maxOutstanding = ARCMSR_MAX_FREECCB_NUM-1;
+ else
+ acb->maxOutstanding = acb->firm_numbers_queue - 1;
return rtn;
}
@@ -4882,6 +4887,7 @@ static const char
case PCI_DEVICE_ID_ARECA_1160:
case PCI_DEVICE_ID_ARECA_1170:
case PCI_DEVICE_ID_ARECA_1201:
+ case PCI_DEVICE_ID_ARECA_1214:
case PCI_DEVICE_ID_ARECA_1220:
case PCI_DEVICE_ID_ARECA_1230:
case PCI_DEVICE_ID_ARECA_1260:
@@ -4889,7 +4895,6 @@ static const char
case PCI_DEVICE_ID_ARECA_1280:
type = "SATA";
break;
- case PCI_DEVICE_ID_ARECA_1214:
case PCI_DEVICE_ID_ARECA_1680:
case PCI_DEVICE_ID_ARECA_1681:
case PCI_DEVICE_ID_ARECA_1880:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] arcmsr: Modify maxium outstanding command
2013-07-17 2:52 [PATCH 1/3] arcmsr: Modify maxium outstanding command 黃清隆
@ 2013-08-23 17:31 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2013-08-23 17:31 UTC (permalink / raw)
To: 黃清隆; +Cc: linux-scsi, linux-kernel, ching2048
On Wed, 2013-07-17 at 10:52 +0800, 黃清隆 wrote:
> From: Ching<ching2048@areca.com.tw>
>
> Modify maximum outstanding command number, notify command complete with auto
> request sense, reassign ARC12x4 series to SATA type adapter
> Signed-off-by: Chingching2048@areca.com.tw
That should be
Signed-off-by: Ching <ching2048@areca.com.tw>
Shouldn't it?
Also, this patch doesn't apply; it doesn't look to be constructed
against an upstream version of the driver:
patching file drivers/scsi/arcmsr/arcmsr.h
Hunk #1 FAILED at 51.
Hunk #2 FAILED at 705.
2 out of 2 hunks FAILED -- saving rejects to file
drivers/scsi/arcmsr/arcmsr.h.rej
patching file drivers/scsi/arcmsr/arcmsr_hba.c
Hunk #2 FAILED at 71.
Hunk #3 FAILED at 1329.
Hunk #4 FAILED at 3313.
Hunk #5 succeeded at 3040 with fuzz 2 (offset -670 lines).
Hunk #6 succeeded at 3106 (offset -1780 lines).
Hunk #7 FAILED at 4894.
4 out of 7 hunks FAILED -- saving rejects to file
drivers/scsi/arcmsr/arcmsr_hba.c.rej
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-23 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 2:52 [PATCH 1/3] arcmsr: Modify maxium outstanding command 黃清隆
2013-08-23 17:31 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).