New: aacraid driver fails with Dell PowerEdge Expandable RAID Controller 3/Di
Subsystems (2)
PATCH 1/1 New: aacraid driver fails with Dell PowerEdge Expandable RAID Controller 3/Di
In reply to a message not in the archiveAs reported in http://bugzilla.kernel.org/show_bug.cgi?id=9133 it was discovered that the PERC line of controllers lacked a key 64 bit ScatterGather capable SCSI pass-through function. The adapters are still capable of 64 bit ScatterGather I/O commands, but these two can not be mixed. This problem was exacerbated by the introduction of the SCSI Generic access to the DASD physical devices.
The fix for users before this patch is applied is aacraid.dacmode=0 on the kernel command line to disable 64 bit I/O.
The enclosed patch introduces a new adapter quirk and tries to limp along by enabling pass-through in situations where memory is 32 bit addressable on 64 bit machines, or disable the pass-through functions altogether. I expect that the check for 32 bit addressable memory to be controversial in that it can be incorrect in non-Dell non-Intel systems that PERC would never be installed under, the alternative is to disable pass-through in all cases which could be reported as another regression.
Pass-through is used for SCSI Generic access to the physical devices, or for the management applications to properly function.
In systems where this patch has disabled pass-through because it is unsupportable in combination with I/O performance, the user can choose to enable pass-through by turning off dacmode (aacraid.dacmode=0) or limiting the discovered kernel memory (mem=4G) with an associated loss in runtime performance. If we chose instead to turn off 64 bit dacmode for the adapters with this quirk, then this would be reported as another regression.
This attached patch is against current scsi-misc-2.6.
ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments.
drivers/scsi/aacraid/aachba.c | 15 +++++++++++++- drivers/scsi/aacraid/aacraid.h | 6 +++++ drivers/scsi/aacraid/commsup.c | 6 ++--- drivers/scsi/aacraid/linit.c | 42
+++++++++++++++++++++++------------------
4 files changed, 47 insertions(+), 22 deletions(-)
Sincerely -- Mark Salyzyn
drivers/scsi/aacraid/aachba.c +14 -1
@@ -1190,6 +1190,15 @@ (fib_callback) aac_srb_callback, (void *) cmd); } +static int aac_scsi_32_64 (struct fib * fib,struct scsi_cmnd * cmd) +{ +if ((sizeof (dma_addr_t) >4 ) && + (num_physpages > (0xFFFFFFFFULL >>PAGE_SHIFT )) && + (fib->dev->adapter_info.options &AAC_OPT_SGMAP_HOST64 )) +return FAILED ; +return aac_scsi_32 (fib, cmd); +} +int aac_get_adapter_info (struct aac_dev * dev) {struct fib * fibptr;
@@ -1267,6 +1276,8 @@1 ,1 , NULL, NULL); +/* reasoned default */ + dev->maximum_num_physicals =16 ;if (rcode >=0 &&le32_to_cpu (bus_info->Status) ==ST_OK ) { dev->maximum_num_physicals =le32_to_cpu (bus_info->TargetsPerBus); dev->maximum_num_channels =le32_to_cpu (bus_info->BusCount);
@@ -1376,7 +1387,9 @@* interface. */ dev->a_ops.adapter_scsi = (dev->dac_support) - ? aac_scsi_64 + ? ((aac_get_driver_ident (dev->cardtype)->quirks &AAC_QUIRK_SCSI_32 ) + ? aac_scsi_32_64 + : aac_scsi_64) : aac_scsi_32;if (dev->raw_io_interface) { dev->a_ops.adapter_bounds = (dev->raw_io_64)
drivers/scsi/aacraid/aacraid.h +6 -0
@@ -521,6 +521,12 @@#define AAC_QUIRK_17SG 0x0010/* +* Some adapter firmware does not support 64 bit scsi passthrough +* commands. +*/ +#define AAC_QUIRK_SCSI_32 0x0020 + +/* * The adapter interface specs all queues to be located in the same * physically contigous block. The host structure that defines the * commuication queues will assume they are each a separate physically
drivers/scsi/aacraid/commsup.c +3 -3
@@ -1099,7 +1099,8 @@free_irq (aac->pdev->irq, aac);kfree (aac->fsa_dev); aac->fsa_dev =NULL ; -if (aac_get_driver_ident (index)->quirks &AAC_QUIRK_31BIT ) { + quirks =aac_get_driver_ident (index)->quirks; +if (quirks &AAC_QUIRK_31BIT ) {if (((retval =pci_set_dma_mask (aac->pdev,DMA_31BIT_MASK ))) || ((retval =pci_set_consistent_dma_mask (aac->pdev,DMA_31BIT_MASK )))) goto out;
@@ -1110,7 +1111,7 @@ }if ((retval = (*(aac_get_driver_ident (index)->init))(aac))) goto out; -if (aac_get_driver_ident (index)->quirks &AAC_QUIRK_31BIT ) +if (quirks &AAC_QUIRK_31BIT )if ((retval =pci_set_dma_mask (aac->pdev,DMA_32BIT_MASK ))) goto out;if (jafo) {
@@ -1121,7 +1122,6 @@ } } (void )aac_get_adapter_info (aac); - quirks =aac_get_driver_ident (index)->quirks;if ((quirks &AAC_QUIRK_34SG ) && (host->sg_tablesize >34 )) { host->sg_tablesize =34 ; host->max_sectors = (host->sg_tablesize *8 ) +112 ;
drivers/scsi/aacraid/linit.c +24 -18
60 lines not on this page · raw message
PATCH 1/1 aacraid: forced reset override
In reply to a message not in the archiveSome of our vendors have requested that our adapters ignore the hardware reset attempts during recovery and have enforced this with changes in Adapter Firmware. Some of our customers have requested the option to be able to reset the adapter under adverse adapter failure, we even had a few defects reported here considering it a regression that the Adapter could not be reset. This patch addresses this dichotomy. The user can force the adapter to be reset if it supports the IOP_RESET_ALWAYS command, in cases where the adapter has been programmed to ignore the reset, by setting the aacraid.check_reset parameter to a value of -1.
The driver will not reset an Adapter that does not support the reset command(s).
This patch also fixes and cleans up some of the logic associated with resetting the adapter.
This attached patch is against current scsi-misc-2.6.
ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments.
drivers/scsi/aacraid/aachba.c | 8 ++++---- drivers/scsi/aacraid/commsup.c | 13 +++++++------ drivers/scsi/aacraid/linit.c | 7 +++++-- drivers/scsi/aacraid/rx.c | 4 +++- 4 files changed, 19 insertions(+), 13 deletions(-)
Sincerely -- Mark Salyzyn
drivers/scsi/aacraid/aachba.c +4 -4
@@ -179,7 +179,7 @@int aac_check_reset =1 ;module_param_named (check_reset, aac_check_reset, int,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (aac_check_reset,"If adapter fails health check, reset the adapter." ); +MODULE_PARM_DESC (aac_check_reset,"If adapter fails health check, reset the adapter. a value of -1 forces the reset to adapters programmed to ignore it." );int expose_physicals =-1 ;module_param (expose_physicals, int,S_IRUGO |S_IWUSR );
@@ -1316,9 +1316,9 @@ (int )sizeof (dev->supplement_adapter_info.VpdInfo.Tsid), dev->supplement_adapter_info.VpdInfo.Tsid); } -if (!aac_check_reset || +if (!aac_check_reset || ((aac_check_reset !=1 ) && (dev->supplement_adapter_info.SupportedOptions2 & -le32_to_cpu (AAC_OPTION_IGNORE_RESET ))) { +le32_to_cpu (AAC_OPTION_IGNORE_RESET )))) {printk (KERN_INFO "%s%d: Reset Adapter Ignored\n" , dev->name, dev->id); }
@@ -1811,7 +1811,7 @@if (active)return SCSI_MLQUEUE_DEVICE_BUSY ; - aac = (struct aac_dev *)scsicmd->device->host->hostdata; + aac = (struct aac_dev *)sdev->host->hostdata;if (aac->in_reset)return SCSI_MLQUEUE_HOST_BUSY ;
drivers/scsi/aacraid/commsup.c +7 -6
@@ -1217,12 +1217,13 @@ }/* Quiesce build, flush cache, write through mode */ -aac_send_shutdown (aac); +if (forced <2 ) +aac_send_shutdown (aac);spin_lock_irqsave (host->host_lock, flagv); - retval =_aac_reset_adapter (aac, forced); + retval =_aac_reset_adapter (aac, forced ? forced : ((aac_check_reset !=0 ) && (aac_check_reset !=1 )));spin_unlock_irqrestore (host->host_lock, flagv); -if (retval == -ENODEV ) { +if ((forced <2 ) && (retval == -ENODEV )) {/* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */ struct fib * fibctx =aac_fib_alloc (aac);if (fibctx) {
@@ -1372,14 +1373,14 @@printk (KERN_ERR "%s: Host adapter BLINK LED 0x%x\n" , aac->name, BlinkLED); -if (!aac_check_reset || +if (!aac_check_reset || ((aac_check_reset !=1 ) && (aac->supplement_adapter_info.SupportedOptions2 & -le32_to_cpu (AAC_OPTION_IGNORE_RESET ))) +le32_to_cpu (AAC_OPTION_IGNORE_RESET )))) goto out; host = aac->scsi_host_ptr;if (aac->thread->pid != current->pid)spin_lock_irqsave (host->host_lock, flagv); - BlinkLED =_aac_reset_adapter (aac,0 ); + BlinkLED =_aac_reset_adapter (aac, aac_check_reset !=1 );if (aac->thread->pid != current->pid)spin_unlock_irqrestore (host->host_lock, flagv);return BlinkLED;
drivers/scsi/aacraid/linit.c +5 -2
@@ -590,8 +590,11 @@* support a register, instead of a commanded, reset. */ if ((aac->supplement_adapter_info.SupportedOptions2 & -le32_to_cpu (AAC_OPTION_MU_RESET |AAC_OPTION_IGNORE_RESET )) == -le32_to_cpu (AAC_OPTION_MU_RESET )) +le32_to_cpu (AAC_OPTION_MU_RESET )) && + aac_check_reset && + ((aac_check_reset !=1 ) || + (aac->supplement_adapter_info.SupportedOptions2 & +le32_to_cpu (AAC_OPTION_IGNORE_RESET ))))aac_reset_adapter (aac,2 );/* Bypass wait for command quiesce */ return SUCCESS ;/* Cause an immediate retry of the command with a ten second delay after successful tur */ }
drivers/scsi/aacraid/rx.c +3 -1
@@ -549,7 +549,9 @@ dev->OIMR = status =rx_readb (dev, MUnit.OIMR);if ((((status &0x0c ) !=0x0c ) || aac_reset_devices || reset_devices) && !aac_rx_restart_adapter (dev,0 )) - ++restart; +/* Make sure the Hardware FIFO is empty */ +while ((++restart <512 ) && + (rx_readl (dev, MUnit.OutboundQueue) !=0xFFFFFFFFL ));/* * Check to see if the board panic'd while booting. */
PATCH 1/1 aacraid: thread stop patch
Got a panic in the threading code on an older kernel when the Adapter failed to load properly and driver shut down apparently before any threading had started, can not dupe. Expect that this may be relevant in the latest kernel, but not sure. This patch does no harm, and should alleviate the possibility of this panic.
This attached patch is against current scsi-misc-2.6.
ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, use attachment).
drivers/scsi/aacraid/linit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c 2007-10-31 16:32:10.394394185
-0400
+++ b/drivers/scsi/aacraid/linit.c 2007-10-31 16:32:17.740458222
-0400
@@ -959,7 +959,8 @@
static void __aac_shutdown(struct aac_dev * aac)
{
- kthread_stop(aac->thread);
+ if (aac->aif_thread)
+ kthread_stop(aac->thread);
aac_send_shutdown(aac);
aac_adapter_disable_int(aac);
free_irq(aac->pdev->irq, aac);
Sincerely -- Mark Salyzyn
drivers/scsi/aacraid/linit.c +2 -1
@@ -959,7 +959,8 @@static void __aac_shutdown (struct aac_dev * aac) { -kthread_stop (aac->thread); +if (aac->aif_thread) +kthread_stop (aac->thread);aac_send_shutdown (aac);aac_adapter_disable_int (aac);free_irq (aac->pdev->irq, aac);
RE: [PATCH 1/1] [Bugme-new] [Bug 9133] New: aacraid driver fails withDell PowerEdge Expandable RAID Controller 3/Di
In reply to Salyzyn, MarkQuoted 2 lines
As reported in http://bugzilla.kernel.org/show_bug.cgi?id=9133 it was
discovered that the PERC line of controllers lacked a key 64 bit ScatterGather
Quoted 1 line
capable SCSI pass-through function. The adapters are still capable of
64 bit ScatterGather I/O commands, but these two can not be mixed.
Can't this be implemented? Now, we are imposing a performance hit on consumers investing on more that 4G memory.
-Shyam
RE: [PATCH 1/1] [Bugme-new] [Bug 9133] New: aacraid driver fails withDell PowerEdge Expandable RAID Controller 3/Di
You, as a Dell representative, will need to address changes in Firmware or other options for these adapters to the Adaptec representative on site.
This patch does NOT impose a performance hit on consumers investing on more than 4G of Memory, what it does is prevent SCSI pass-through calls from /dev/sg, /dev/sd and the management ioctls. Many functions of the management tools do NOT require the SCSI pass-through, as the information FIBs continue to function. I choose drop in functionality instead of a possible performance hit to resolve the missing Firmware Function.
If the consumer needs the management functionality or SCSI pass-through then they *may* affect performance by selecting the other driver options; but one needs to sit down and actually measure this to be sure there is a loss in their situation.
Sincerely -- Mark Salyzyn
Quoted 12 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Friday, November 02, 2007 6:12 AM
To: Salyzyn, Mark; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [PATCH 1/1] [Bugme-new] [Bug 9133] New: aacraid driver fails withDell PowerEdge Expandable RAID Controller 3/DiQuoted 4 lines
As reported in http://bugzilla.kernel.org/show_bug.cgi?id=9133 it was discovered that the PERC line of controllers lacked a key 64 bit ScatterGather capable SCSI pass-through function. The adapters are still capable of 64 bit ScatterGather I/O commands, but these
two can not be mixed.
Quoted 4 lines
Can't this be implemented? Now, we are imposing a performance hit on consumers investing on more that 4G memory.
-Shyam