RE: [PATCH] [8/22] Remove random noop unchecked_isa_dma users
ACK (for ips portion, see no harm other chunks). Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andi Kleen Sent: Sunday, February 24, 2008 6:35 PM To: linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Subject: [PATCH] [8/22] Remove random noop unchecked_isa_dma users Lots of drivers set it to 0. Remove that. Patch should be a nop. Signed-off-by: Andi Kleen [EMAIL PROTECTED] --- drivers/scsi/arm/acornscsi.c |1 - drivers/scsi/arm/cumana_1.c |1 - drivers/scsi/dc395x.c|1 - drivers/scsi/eata_pio.c |2 -- drivers/scsi/hptiop.c|1 - drivers/scsi/ips.c |1 - drivers/scsi/mac_scsi.c |1 - drivers/scsi/scsi_debug.c|1 - 8 files changed, 9 deletions(-) Index: linux/drivers/scsi/arm/acornscsi.c === --- linux.orig/drivers/scsi/arm/acornscsi.c +++ linux/drivers/scsi/arm/acornscsi.c @@ -2983,7 +2983,6 @@ static struct scsi_host_template acornsc .this_id= 7, .sg_tablesize = SG_ALL, .cmd_per_lun= 2, - .unchecked_isa_dma = 0, .use_clustering = DISABLE_CLUSTERING, .proc_name = acornscsi, }; Index: linux/drivers/scsi/arm/cumana_1.c === --- linux.orig/drivers/scsi/arm/cumana_1.c +++ linux/drivers/scsi/arm/cumana_1.c @@ -222,7 +222,6 @@ static struct scsi_host_template cumanas .this_id= 7, .sg_tablesize = SG_ALL, .cmd_per_lun= 2, - .unchecked_isa_dma = 0, .use_clustering = DISABLE_CLUSTERING, .proc_name = CumanaSCSI-1, }; Index: linux/drivers/scsi/dc395x.c === --- linux.orig/drivers/scsi/dc395x.c +++ linux/drivers/scsi/dc395x.c @@ -4761,7 +4761,6 @@ static struct scsi_host_template dc395x_ .cmd_per_lun= DC395x_MAX_CMD_PER_LUN, .eh_abort_handler = dc395x_eh_abort, .eh_bus_reset_handler = dc395x_eh_bus_reset, - .unchecked_isa_dma = 0, .use_clustering = DISABLE_CLUSTERING, }; Index: linux/drivers/scsi/eata_pio.c === --- linux.orig/drivers/scsi/eata_pio.c +++ linux/drivers/scsi/eata_pio.c @@ -815,8 +815,6 @@ static int register_pio_HBA(long base, s else hd-primary = 1; - sh-unchecked_isa_dma = 0; /* We can only do PIO */ - hd-next = NULL;/* build a linked list of all HBAs */ hd-prev = last_HBA; if (hd-prev != NULL) Index: linux/drivers/scsi/hptiop.c === --- linux.orig/drivers/scsi/hptiop.c +++ linux/drivers/scsi/hptiop.c @@ -903,7 +903,6 @@ static struct scsi_host_template driver_ .eh_device_reset_handler= hptiop_reset, .eh_bus_reset_handler = hptiop_reset, .info = hptiop_info, - .unchecked_isa_dma = 0, .emulated = 0, .use_clustering = ENABLE_CLUSTERING, .proc_name = driver_name, Index: linux/drivers/scsi/ips.c === --- linux.orig/drivers/scsi/ips.c +++ linux/drivers/scsi/ips.c @@ -6842,7 +6842,6 @@ ips_register_scsi(int index) sh-sg_tablesize = sh-hostt-sg_tablesize; sh-can_queue = sh-hostt-can_queue; sh-cmd_per_lun = sh-hostt-cmd_per_lun; - sh-unchecked_isa_dma = sh-hostt-unchecked_isa_dma; sh-use_clustering = sh-hostt-use_clustering; sh-max_sectors = 128; Index: linux/drivers/scsi/mac_scsi.c === --- linux.orig/drivers/scsi/mac_scsi.c +++ linux/drivers/scsi/mac_scsi.c @@ -592,7 +592,6 @@ static struct scsi_host_template driver_ .this_id= 7, .sg_tablesize = SG_ALL, .cmd_per_lun= CMD_PER_LUN, - .unchecked_isa_dma = 0, .use_clustering = DISABLE_CLUSTERING }; Index: linux/drivers/scsi/scsi_debug.c === --- linux.orig/drivers/scsi/scsi_debug.c +++ linux/drivers/scsi/scsi_debug.c @@ -221,7 +221,6 @@ static struct scsi_host_template sdebug_ .sg_tablesize = 256, .cmd_per_lun = 16, .max_sectors = 0x, - .unchecked_isa_dma =0, .use_clustering = ENABLE_CLUSTERING, .module = THIS_MODULE, }; - To unsubscribe from this
RE: [PATCH] ips: sg chaining support to the path to non I/O commands
ACK Other RAID drivers (eg: aacraid) makes the assumption that commands in these paths (INQUIRY, READ CAPACITY, MODE SENSE etc spoofing) are single scatter gather elements and have yet to be bitten. I agree with Fujita-san about the practical unlikelihood. The fix does not incur any change in code overhead, so it is worth hardening! Can one create a request via /dev/sg for a buffer smaller than 256 and manage to create a multi-element scatter gather? Sincerely -- Mark Salyzyn -Original Message- From: FUJITA Tomonori [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 19, 2008 4:42 AM To: [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org; Salyzyn, Mark; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PATCH] ips: sg chaining support to the path to non I/O commands Here is another ips patch, but not a bug fix. = From: FUJITA Tomonori [EMAIL PROTECTED] Subject: [PATCH] ips: sg chaining support to the path to non I/O commands I overlooked ips_scmd_buf_write and ips_scmd_buf_read when I converted ips to use the data buffer accessors. ips is unlikely to use sg chaining (especially in this path) since a) this path is used only for non I/O commands (with little data transfer), b) ips's sg_tablesize is set to just 17. Thanks to Tim Pepper for testing this patch. Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED] Cc: Salyzyn, Mark [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] --- drivers/scsi/ips.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 7ed568f..e5467a4 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -3510,15 +3510,16 @@ ips_scmd_buf_write(struct scsi_cmnd *scmd, void *data, unsigned int count) struct scatterlist *sg = scsi_sglist(scmd); for (i = 0, xfer_cnt = 0; - (i scsi_sg_count(scmd)) (xfer_cnt count); i++) { -min_cnt = min(count - xfer_cnt, sg[i].length); + (i scsi_sg_count(scmd)) (xfer_cnt count); + i++, sg = sg_next(sg)) { +min_cnt = min(count - xfer_cnt, sg-length); /* kmap_atomic() ensures addressability of the data buffer.*/ /* local_irq_save() protects the KM_IRQ0 address slot. */ local_irq_save(flags); -buffer = kmap_atomic(sg_page(sg[i]), KM_IRQ0) + sg[i].offset; + buffer = kmap_atomic(sg_page(sg), KM_IRQ0) + sg-offset; memcpy(buffer, cdata[xfer_cnt], min_cnt); -kunmap_atomic(buffer - sg[i].offset, KM_IRQ0); + kunmap_atomic(buffer - sg-offset, KM_IRQ0); local_irq_restore(flags); xfer_cnt += min_cnt; @@ -3543,15 +3544,16 @@ ips_scmd_buf_read(struct scsi_cmnd *scmd, void *data, unsigned int count) struct scatterlist *sg = scsi_sglist(scmd); for (i = 0, xfer_cnt = 0; - (i scsi_sg_count(scmd)) (xfer_cnt count); i++) { -min_cnt = min(count - xfer_cnt, sg[i].length); + (i scsi_sg_count(scmd)) (xfer_cnt count); + i++, sg = sg_next(sg)) { + min_cnt = min(count - xfer_cnt, sg-length); /* kmap_atomic() ensures addressability of the data buffer.*/ /* local_irq_save() protects the KM_IRQ0 address slot. */ local_irq_save(flags); -buffer = kmap_atomic(sg_page(sg[i]), KM_IRQ0) + sg[i].offset; + buffer = kmap_atomic(sg_page(sg), KM_IRQ0) + sg-offset; memcpy(cdata[xfer_cnt], buffer, min_cnt); -kunmap_atomic(buffer - sg[i].offset, KM_IRQ0); + kunmap_atomic(buffer - sg-offset, KM_IRQ0); local_irq_restore(flags); xfer_cnt += min_cnt; - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: ips.c broken since 2.6.23 on x86_64?
The path needs to be triggered, it is the path to handle spoofing of the Adapter's inquiry. You need more printk instrumentation to determine *why* it is not reaching that code path. What is the result of scb-scsi_cmd. scb-bus, ips_is_passthru(scb-scsi_cmd)? The sg breakup issue may need to be looked at, but keep in mind the driver is going down a path that was not intended. Sincerely -- Mark Salyzyn -Original Message- From: Tim Pepper [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 7:04 PM To: linux-scsi@vger.kernel.org Cc: FUJITA Tomonori; Salyzyn, Mark Subject: Re: ips.c broken since 2.6.23 on x86_64? (replaced missing cc's including linux-scsi) On Wed 13 Feb at 14:39:07 -0800 [EMAIL PROTECTED] said: - Is the command path code even reaching the controller's processor inquiry spoofing section? if (scb-scsi_cmd-cmnd[0] == INQUIRY) { IPS_SCSI_INQ_DATA inquiry; memset(inquiry, 0, sizeof (IPS_SCSI_INQ_DATA)); inquiry.DeviceType = IPS_SCSI_INQ_TYPE_PROCESSOR; I just added printk's in ips_send_cmd()'s INQUIRY case just before the above condition test and just within the conditional block. Neither showed on the console. The target_id check may be flawed? It is not using the scmd/sdev accessors and could be the wrong value as a result. Wild goose since arrays are working correctly (?) In the original case the arrays appeared to be working correctly although we were worried. In the repro case we don't actually have any disk attached...Forgot to mention that in the original email. - There appears to be a missing 'break' statement for the START_STOP command immediately preceding the TEST_UNIT_READY/INQUIRY cases. What are the side effects of that? It appears to be innocuous. No change noted with the missing break added. - ips_scmd_buf_write is used for array capacity and other fiddly bits and must be functioning correctly (?), so I can NOT harm it's functionality except to question if the kmap_atomic returned a non-null value, it's return value apparently is not checked. It's failure could speak of problem(s) elsewhere. I've got a printk there and haven't seen any output from it. Haven't seen anything from any of the printk's I've tried actually before: In the run above to check if ips_send_cmd() hits the condition you were curious about...I did capture the following from printk's I added in ips_allocatescbs(): pci_alloc_consistent returns ha-scbs@ 0x18446604437762007040 pci_alloc_consistent returns ips_sg.list @ 0x18446604437762002944 pci_alloc_consistent returns ha-scbs@ 0x18446604437698871296 pci_alloc_consistent returns ips_sg.list @ 0x18446604437756837888 I take that as ips_init_phase2() being called and presumable returning SUCCESS. -- Tim Pepper [EMAIL PROTECTED] IBM Linux Technology Center - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] scsi: le*_add_cpu conversion
ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 12, 2008 6:06 PM To: LKML Cc: Marcin Slusarz; linux-scsi@vger.kernel.org; AACRAID; [EMAIL PROTECTED] Subject: [PATCH] scsi: le*_add_cpu conversion From: Marcin Slusarz [EMAIL PROTECTED] replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(little_endian_variable, expression_in_cpu_byteorder); generated with semantic patch Signed-off-by: Marcin Slusarz [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] --- drivers/scsi/aacraid/commsup.c |2 +- drivers/scsi/ips.c |8 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 81b3692..3ac8c82 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -594,7 +594,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid) if (le32_to_cpu(*q-headers.consumer) = q-entries) *q-headers.consumer = cpu_to_le32(1); else - *q-headers.consumer = cpu_to_le32(le32_to_cpu(*q-headers.consumer)+1); + le32_add_cpu(q-headers.consumer, 1); if (wasfull) { switch (qid) { diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index bb152fb..f45770a 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -3696,9 +3696,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) scb-cmd.basic_io.sg_count = scb-sg_len; if (scb-cmd.basic_io.lba) - scb-cmd.basic_io.lba = - cpu_to_le32(le32_to_cpu - (scb-cmd.basic_io.lba) + + le32_add_cpu(scb-cmd.basic_io.lba, le16_to_cpu(scb-cmd.basic_io. sector_count)); else @@ -3744,9 +3742,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) scb-cmd.basic_io.sg_count = scb-sg_len; if (scb-cmd.basic_io.lba) - scb-cmd.basic_io.lba = - cpu_to_le32(le32_to_cpu - (scb-cmd.basic_io.lba) + + le32_add_cpu(scb-cmd.basic_io.lba, le16_to_cpu(scb-cmd.basic_io. sector_count)); else -- 1.5.3.7 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] Adaptec AACRAID: convert fibctx-wait_sem to completion
linux/completion is already included in commctrl.c, in the patch fragment it is noted two lines below the addition. Please explain in the description the need/advantages for the change from semaphore to completion. Sincerely -- Mark Salyzyn -Original Message- From: Matthias Kaehlcke [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 1:35 PM To: AACRAID; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PATCH] Adaptec AACRAID: convert fibctx-wait_sem to completion Adaptec AACRAID driver: The semaphore fibctx-wait_sem is used for signalling an event. Convert it to a completion. Signed-off-by: Matthias Kaehlcke [EMAIL PROTECTED] -- diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 3195d29..eef4939 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -717,7 +717,7 @@ struct aac_fib_context { u32 unique; // unique value representing this context ulong jiffies;// used for cleanup - dmb changed to ulong struct list_headnext; // used to link context's into a linked list - struct semaphorewait_sem; // this is used to wait for the next fib to arrive. + struct completion compl; // this is used to wait for the next fib to arrive. int wait; // Set to true when thread is in WaitForSingleObject unsigned long count; // total number of FIBs on FibList struct list_headfib_list; // this holds fibs and their attachd hw_fibs diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index abef051..98efda6 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -33,6 +33,7 @@ #include linux/types.h #include linux/pci.h #include linux/spinlock.h +#include linux/completion.h #include linux/slab.h #include linux/completion.h #include linux/dma-mapping.h @@ -177,9 +178,9 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg) */ fibctx-unique = (u32)((ulong)fibctx 0x); /* -* Initialize the mutex used to wait for the next AIF. +* Initialize the completion used to wait for the next AIF. */ - init_MUTEX_LOCKED(fibctx-wait_sem); + init_completion(fibctx-compl); fibctx-wait = 0; /* * Initialize the fibs and set the count of fibs on @@ -310,7 +311,7 @@ return_fib: ssleep(1); } if (f.wait) { - if(down_interruptible(fibctx-wait_sem) 0) { + if(wait_for_completion_interruptible(fibctx-compl) 0) { status = -EINTR; } else { /* Lock again and retry */ diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 81b3692..486bdb3 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1440,7 +1440,7 @@ int aac_check_health(struct aac_dev * aac) * Set the event to wake up the * thread that will waiting. */ - up(fibctx-wait_sem); + complete(fibctx-compl); } else { printk(KERN_WARNING aifd: didn't allocate NewFib.\n); kfree(fib); @@ -1671,7 +1671,7 @@ int aac_command_thread(void *data) * Set the event to wake up the * thread that is waiting. */ - up(fibctx-wait_sem); + complete(fibctx-compl); } else { printk(KERN_WARNING aifd: didn't allocate NewFib.\n); } -- Matthias Kaehlcke Linux System Developer Barcelona Si deseas mantener tu libertad, debes estar preparado para defenderla (Richard Stallman) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: ignore adapter reset check polarity
The Adapter's Ignore Reset flag and insmod parameter boolean polarity is incorrect in the driver. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 14 -- drivers/scsi/aacraid/commsup.c |2 +- drivers/scsi/aacraid/linit.c |2 +- 3 files changed, 10 insertions(+), 8 deletions(-) Sincerely - Mark Salyzyn aacraid_ignore_reset.patch Description: aacraid_ignore_reset.patch
[PATCH 1/1] aacraid: informational sysfs value corrections
Some sysfs problems reported. The serial number on late model controllers was truncated. Non-DASD devices (tapes and CDROMs) were showing up as JBOD in the level report on the physical channel. 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, please use attachment). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c 2008-02-08 11:22:43.497295473 -0500 +++ b/drivers/scsi/aacraid/linit.c 2008-02-08 11:51:52.376880890 -0500 @@ -494,13 +494,14 @@ static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf) { - struct scsi_device * sdev = to_scsi_device(dev); + struct scsi_device *sdev = to_scsi_device(dev); + struct aac_dev *aac = (struct aac_dev *)(sdev-host-hostdata); if (sdev_channel(sdev) != CONTAINER_CHANNEL) return snprintf(buf, PAGE_SIZE, sdev-no_uld_attach - ? Hidden\n : JBOD); + ? Hidden\n : + ((aac-jbod (sdev-type == TYPE_DISK)) ? JBOD\n : )); return snprintf(buf, PAGE_SIZE, %s\n, - get_container_type(((struct aac_dev *)(sdev-host-hostdata)) - -fsa_dev[sdev_id(sdev)].type)); + get_container_type(aac-fsa_dev[sdev_id(sdev)].type)); } static struct device_attribute aac_raid_level_attr = { @@ -860,8 +861,8 @@ le32_to_cpu(dev-adapter_info.serial[0])); if (len !memcmp(dev-supplement_adapter_info.MfgPcbaSerialNo[ - sizeof(dev-supplement_adapter_info.MfgPcbaSerialNo)+2-len], - buf, len)) + sizeof(dev-supplement_adapter_info.MfgPcbaSerialNo)-len], + buf, len-1)) len = snprintf(buf, PAGE_SIZE, %.*s\n, (int)sizeof(dev-supplement_adapter_info.MfgPcbaSerialNo), dev-supplement_adapter_info.MfgPcbaSerialNo); Sincerely - Mark Salyzyn aacraid_serial_level_sysfs.patch Description: aacraid_serial_level_sysfs.patch
[PATCH 1/1] aacraid: add optional MSI support (take 2)
Thanks for performing my compile check for me ;-}. You nailed the problem on the head. excuseIn my efforts to trim down the patch from my internal version of the driver, I neglected to pass the '#include linux/pci.h' chunk. Sadly, my only compile check was done against an older FC release, related to the customer request, and one should note that we removed the include linux/pci.h line in sa.c in May last year (join_rx_rkt.patch) post that FC release only to need to reinstate it a year later with this patch. Sigh./excuse This patch is against current scsi-misc-2.6. It has been checkpatch.pl and compile tested against today's scsi-misc-2.6! ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 56 ++--- drivers/scsi/aacraid/aacraid.h |2 + drivers/scsi/aacraid/linit.c | 32 --- drivers/scsi/aacraid/rx.c |5 ++- drivers/scsi/aacraid/sa.c |5 ++- 5 files changed, 67 insertions(+), 33 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: James Bottomley [mailto:[EMAIL PROTECTED] Sent: Thursday, February 07, 2008 7:31 PM To: Salyzyn, Mark Cc: 'linux-scsi@vger.kernel.org' Subject: Re: [PATCH 1/1] aacraid: add optional MSI support. On Wed, 2008-02-06 at 13:20 -0800, Salyzyn, Mark wrote: Added support for MSI utilizing the aacraid.msi=1 parameter. This patch adds some localized or like-minded janitor fixes. Since the default is disabled, there is no impact on the code paths unless the customer wishes to experiment with the MSI performance. This patch is against current scsi-misc-2.6 It doesn't seem to compile: drivers/scsi/aacraid/sa.c: In function 'aac_sa_init': drivers/scsi/aacraid/sa.c:388: error: dereferencing pointer to incomplete type drivers/scsi/aacraid/sa.c:406: error: dereferencing pointer to incomplete type It looks like this can be corrected by #include linux/pci.h since it's struct pci_dev that's the incomplete type. James aacraid_msi2.patch Description: aacraid_msi2.patch
[PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers
This patch depends on 'RE: [patch 048/265] iommu sg merging: aacraid: use pci_set_dma_max_seg_size' and ensures that the modern adapters get a maximum sg segment size on par with the maximum transfer size. Added some localized janitor fixes to the discussion patch I used with Fujita. FUJITA Tomonori [mailto:[EMAIL PROTECTED] sez: I think that setting the proper maximum segment size for the late model cards (as you did above) makes sense. This attached patch is against current linux-2.6. It will not apply to current scsi-misc-2.6 without the above mentioned dependency. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Please use the attached file to patch Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c 2008-02-06 11:35:55.111631591 -0500 +++ b/drivers/scsi/aacraid/linit.c 2008-02-06 11:52:11.095208736 -0500 @@ -1130,31 +1130,29 @@ if (error 0) goto out_deinit; - if (!(aac-adapter_info.options AAC_OPT_NEW_COMM)) { - error = pci_set_dma_max_seg_size(pdev, 65536); - if (error) - goto out_deinit; - } - /* * Lets override negotiations and drop the maximum SG limit to 34 */ if ((aac_drivers[index].quirks AAC_QUIRK_34SG) - (aac-scsi_host_ptr-sg_tablesize 34)) { - aac-scsi_host_ptr-sg_tablesize = 34; - aac-scsi_host_ptr-max_sectors - = (aac-scsi_host_ptr-sg_tablesize * 8) + 112; + (shost-sg_tablesize 34)) { + shost-sg_tablesize = 34; + shost-max_sectors = (shost-sg_tablesize * 8) + 112; } if ((aac_drivers[index].quirks AAC_QUIRK_17SG) - (aac-scsi_host_ptr-sg_tablesize 17)) { - aac-scsi_host_ptr-sg_tablesize = 17; - aac-scsi_host_ptr-max_sectors - = (aac-scsi_host_ptr-sg_tablesize * 8) + 112; + (shost-sg_tablesize 17)) { + shost-sg_tablesize = 17; + shost-max_sectors = (shost-sg_tablesize * 8) + 112; } + error = pci_set_dma_max_seg_size(pdev, + (aac-adapter_info.options AAC_OPT_NEW_COMM) ? + (shost-max_sectors 9) : 65536); + if (error) + goto out_deinit; + /* -* Firware printf works only with older firmware. +* Firmware printf works only with older firmware. */ if (aac_drivers[index].quirks AAC_QUIRK_34SG) aac-printf_enabled = 1; aacraid_pci_set_dma.patch Description: aacraid_pci_set_dma.patch
[PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers (take 2)
Merde, excuse my english. No idea how those spaces snuck in, a last minute vi fumble finger?! Updated patch enclosed. My apologies for the gaff! Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: James Bottomley [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 12:55 PM To: Salyzyn, Mark Cc: FUJITA Tomonori; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; 'linux-scsi@vger.kernel.org' Subject: Re: [PATCH 1/1] aacraid: pci_set_dma_max_seg_size opened up for late model controllers On Wed, 2008-02-06 at 09:00 -0800, Salyzyn, Mark wrote: This patch depends on 'RE: [patch 048/265] iommu sg merging: aacraid: use pci_set_dma_max_seg_size' and ensures that the modern adapters get a maximum sg segment size on par with the maximum transfer size. Added some localized janitor fixes to the discussion patch I used with Fujita. FUJITA Tomonori [mailto:[EMAIL PROTECTED] sez: I think that setting the proper maximum segment size for the late model cards (as you did above) makes sense. This attached patch is against current linux-2.6. It will not apply to current scsi-misc-2.6 without the above mentioned dependency. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Please use the attached file to patch Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] OK, I have this, but someone really needs to do a little more checkpatch love: [EMAIL PROTECTED] ./scripts/checkpatch.pl ~/tmp.mail ERROR: use tabs not spaces #44: FILE: drivers/scsi/aacraid/linit.c:1138: + ^I^Ishost-sg_tablesize = 34;$ ERROR: use tabs not spaces #45: FILE: drivers/scsi/aacraid/linit.c:1139: + ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$ ERROR: use tabs not spaces #54: FILE: drivers/scsi/aacraid/linit.c:1144: + ^I^Ishost-sg_tablesize = 17;$ ERROR: use tabs not spaces #55: FILE: drivers/scsi/aacraid/linit.c:1145: + ^I^Ishost-max_sectors = (shost-sg_tablesize * 8) + 112;$ ERROR: use tabs not spaces #60: FILE: drivers/scsi/aacraid/linit.c:1150: + ^I^I^I(shost-max_sectors 9) : 65536);$ total: 5 errors, 0 warnings, 44 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. James aacraid_pci_set_dma1.patch Description: aacraid_pci_set_dma1.patch
[PATCH 1/1] aacraid: add optional MSI support.
Added support for MSI utilizing the aacraid.msi=1 parameter. This patch adds some localized or like-minded janitor fixes. Since the default is disabled, there is no impact on the code paths unless the customer wishes to experiment with the MSI performance. This patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Please use the attached file to patch, the inlined patch is a hand filtered diff -rub unusable to patch but usable for inspection clarity. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 56 ++--- drivers/scsi/aacraid/aacraid.h |2 + drivers/scsi/aacraid/linit.c | 32 --- drivers/scsi/aacraid/rx.c |5 ++- drivers/scsi/aacraid/sa.c |4 +- 5 files changed, 66 insertions(+), 33 deletions(-) diff -rub a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-02-06 15:33:31.356341806 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-02-06 15:52:33.988699503 -0500 @@ -144,51 +144,77 @@ */ static int nondasd = -1; -static int aac_cache = 0; +static int aac_cache; static int dacmode = -1; - +int aac_msi; int aac_commit = -1; int startup_timeout = 180; int aif_timeout = 120; @@ -159,6 +153,9 @@ MODULE_PARM_DESC(dacmode, Control whether dma addressing is using 64 bit DAC. 0=off, 1=on); module_param_named(commit, aac_commit, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(commit, Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on); +module_param_named(msi, aac_msi, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(msi, IRQ handling. +0=PIC(default), 1=MSI, 2=MSI-X(unsupported, uses MSI)); module_param(startup_timeout, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(startup_timeout, The duration of time in seconds to wait for adapter to have it's kernel up and\nrunning. This is typically adjusted for large systems that do not have a BIOS.); module_param(aif_timeout, int, S_IRUGO|S_IWUSR); @@ -181,7 +184,7 @@ module_param(expose_physicals, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(expose_physicals, Expose physical components of the arrays. - 1=protect 0=off, 1=on); -int aac_reset_devices = 0; +int aac_reset_devices; module_param_named(reset_devices, aac_reset_devices, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(reset_devices, Force an adapter reset at initialization.); diff -rub a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h2008-02-06 15:33:31.357341679 -0500 +++ b/drivers/scsi/aacraid/aacraid.h2008-02-06 15:44:11.908258253 -0500 @@ -1026,6 +1026,7 @@ u8 raw_io_64; u8 printf_enabled; u8 in_reset; + u8 msi; }; #define aac_adapter_interrupt(dev) \ @@ -1881,6 +1882,7 @@ extern int aif_timeout; extern int expose_physicals; extern int aac_reset_devices; +extern int aac_msi; extern int aac_commit; extern int update_interval; extern int check_interval; diff -rub a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c 2008-02-06 15:33:31.358341553 -0500 +++ b/drivers/scsi/aacraid/linit.c 2008-02-06 15:44:11.908258253 -0500 @@ -1039,6 +1039,8 @@ aac_send_shutdown(aac); aac_adapter_disable_int(aac); free_irq(aac-pdev-irq, aac); + if (aac-msi) + pci_disable_msi(aac-pdev); } static int __devinit aac_probe_one(struct pci_dev *pdev, diff -rub a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c --- a/drivers/scsi/aacraid/rx.c 2008-02-06 15:33:31.359341426 -0500 +++ b/drivers/scsi/aacraid/rx.c 2008-02-06 15:44:11.909258127 -0500 @@ -625,8 +625,11 @@ if (aac_init_adapter(dev) == NULL) goto error_iounmap; aac_adapter_comm(dev, dev-comm_interface); - if (request_irq(dev-scsi_host_ptr-irq, dev-a_ops.adapter_intr, + dev-msi = aac_msi !pci_enable_msi(dev-pdev); + if (request_irq(dev-pdev-irq, dev-a_ops.adapter_intr, IRQF_SHARED|IRQF_DISABLED, aacraid, dev) 0) { + if (dev-msi) + pci_disable_msi(dev-pdev); printk(KERN_ERR %s%d: Interrupt unavailable.\n, name, instance); goto error_iounmap; diff -rub a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c --- a/drivers/scsi/aacraid/sa.c 2008-02-06 15:33:31.359341426 -0500 +++ b/drivers/scsi/aacraid/sa.c 2008-02-06 15:44:11.909258127 -0500 @@ -385,7 +385,7 @@ if(aac_init_adapter(dev) == NULL) goto error_irq; - if (request_irq(dev-scsi_host_ptr-irq, dev-a_ops.adapter_intr, + if (request_irq(dev-pdev-irq, dev-a_ops.adapter_intr,
[PATCH 1/1] aacraid: do not set valid bit in sense information
Luben Tuikov [mailto:[EMAIL PROTECTED] sez: Just as in your case and Tony's case, which I presume uses the same RAID firmware vendor, it would've probably been better if the RAID firmware vendor fixed the firmware to not set the VALID bit if the INFORMATION field is not valid. Point taken regarding the aacraid driver. Dropped the VALID bit, and then did some cleanup/simplification of the set_sense procedure and the associated parameters. Mike did some preliminary tests when the VALID bit was dropped before the 'Re: [PATCH] [SCSI] sd: make error handling more robust' patches came on the scene. The change in the SCSI subsystem does make this enclosed aacraid patch unnecessary, so this aacraid patch is merely post battle ground cleanup. If the simplification is an issue, repugnant, too much for a back-port to the stable trees or clouds the point, this patch could be happily distilled down to: diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-02-06 16:26:45.834938955 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-02-06 16:32:01.109035329 -0500 @@ -865,7 +865,7 @@ u32 residue) { -sense_buf[0] = 0xF0;/* Sense data valid, err code 70h (current error) */ +sense_buf[0] = 0x70;/* Sense data invalid, err code 70h (current error) */ sense_buf[1] = 0; /* Segment number, always zero */ if (incorrect_length) { This patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Please use the attached patch and not any inline content. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 81 +++--- 1 file changed, 30 insertions(+), 51 deletions(-) Sincerely -- Mark Salyzyn aacraid_set_sense.patch Description: aacraid_set_sense.patch
RE: [PATCH 5/24][RFC] dpt_i2o: Use new scsi_eh_cpy_sense()
I do not think the midlayer needs to be fixed. I think this was a bug/feature that presented itself in the 2.2 tree when we were developing this driver in 1996... Sincerely -- Mark Salyzyn -Original Message- From: Boaz Harrosh [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 3:52 AM To: Salyzyn, Mark Cc: James Bottomley; FUJITA Tomonori; Christoph Hellwig; Jens Axboe; Jeff Garzik; linux-scsi; Andrew Morton Subject: Re: [PATCH 5/24][RFC] dpt_i2o: Use new scsi_eh_cpy_sense() On Mon, Feb 04 2008 at 20:32 +0200, Salyzyn, Mark [EMAIL PROTECTED] wrote: ACK with condition that community accepts the RFC's entire premise. The removed code that shunted the REQUEST_SENSE was based on the assumption that the sense data in the current scsi command packet was left over from the previous command's execution with a check condition as the scsi command packet is reused to issue the REQUEST_SENSE. For a new, or second from the target's point of view, request sense to the target issued by these older kernels would always return an erased sense. The dpt_i2o driver does not itself maintain the sense history, nor does the Firmware. This behavior, I believe, is not the case for current kernels so the code fragment made little sense (pun not intended). If my historical knowledge is correct, this (now removed) workaround makes no more sense because the scsi layer correctly manages adapters that produce auto-request sense and does not ever turn around the command and send a second request for sense information. Given this understanding, I have no problem with the removed fragment of REQUEST_SENSE shunting. However, I do urge some target error recovery testing, tape drives being the likely type of target affected by this change. I have no such hardware to confirm... Sincerely -- Mark Salyzyn I have removed this test because the midlayer does a scsi_eh_reset_sense() just before the new invocation of a command. So even if the second bad REQUEST_SENSE comes this will not filter it out anymore. If such a thing still happens? A driver state machine must be used to filter it out, or of course midlayer should be fixed. Boaz - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 3/24][RFC] scsi-drivers: more drivers use new scsi_eh_cpy_sense()
ACK for aacraid and ips with condition that community accepts the RFC's premise. The code changes appear trivial and make sense. I had some upstream changes in the set_sense code in aacraid related to a recent discussion regarding error propagation that is overlapped directly by the changes in this RFC. However, it looks like the changes in the SCSI layer to deal with the error propagation will mask the problem in set_sense reducing the pressure on me submitting the set_sense code changes; so I can hold on to them for a while until this RFC is settled and submit them as a janitor-style changes later. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Boaz Harrosh Sent: Monday, February 04, 2008 10:48 AM To: James Bottomley; FUJITA Tomonori; Christoph Hellwig; Jens Axboe; Jeff Garzik; linux-scsi Cc: Andrew Morton Subject: [PATCH 3/24][RFC] scsi-drivers: more drivers use new scsi_eh_cpy_sense() All below drivers had the sense information stored in some driver internal structure, which was copied or manipulated and set into sense_buffer. So use scsi_eh_cpy_sense() in it's place. In case of manipulation of sense data. a temporary buffer is used, then copied. Some places that inspect the sense buffer are converted to use scsi_sense() accessor. driver files changed: drivers/s390/scsi/zfcp_fsf.c drivers/scsi/3w-.c drivers/scsi/aacraid/aachba.c drivers/scsi/aic7xxx/aic79xx_osm.c drivers/scsi/aic7xxx/aic7xxx_osm.c drivers/scsi/arcmsr/arcmsr_hba.c drivers/scsi/ipr.c drivers/scsi/ips.c drivers/scsi/megaraid/megaraid_mbox.c drivers/scsi/ps3rom.c drivers/scsi/qla4xxx/ql4_isr.c drivers/scsi/stex.c Signed-off-by: Boaz Harrosh [EMAIL PROTECTED] --- drivers/s390/scsi/zfcp_fsf.c | 11 ++ drivers/scsi/3w-.c| 20 + drivers/scsi/aacraid/aachba.c | 52 ++-- drivers/scsi/aic7xxx/aic79xx_osm.c| 34 +++-- drivers/scsi/aic7xxx/aic7xxx_osm.c| 22 -- drivers/scsi/arcmsr/arcmsr_hba.c | 32 drivers/scsi/arm/fas216.c |2 +- drivers/scsi/ipr.c| 17 ++- drivers/scsi/ips.c| 13 drivers/scsi/megaraid/megaraid_mbox.c | 24 ++- drivers/scsi/ps3rom.c | 31 +++ drivers/scsi/qla1280.c| 26 drivers/scsi/qla4xxx/ql4_isr.c| 12 ++- drivers/scsi/stex.c | 31 +-- 14 files changed, 147 insertions(+), 180 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 1abbac5..388d218 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -4209,13 +4209,11 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) /* check for sense data */ if (unlikely(fcp_rsp_iu-validity.bits.fcp_sns_len_valid)) { + u8 *sense; sns_len = FSF_FCP_RSP_SIZE - sizeof (struct fcp_rsp_iu) + fcp_rsp_iu-fcp_rsp_len; ZFCP_LOG_TRACE(room for %i bytes sense data in QTCB\n, sns_len); - sns_len = min(sns_len, (u32) SCSI_SENSE_BUFFERSIZE); - ZFCP_LOG_TRACE(room for %i bytes sense data in SCSI command\n, - SCSI_SENSE_BUFFERSIZE); sns_len = min(sns_len, fcp_rsp_iu-fcp_sns_len); ZFCP_LOG_TRACE(scpnt-result =0x%x, command was:\n, scpnt-result); @@ -4224,10 +4222,9 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ZFCP_LOG_TRACE(%i bytes sense data provided by FCP\n, fcp_rsp_iu-fcp_sns_len); - memcpy(scpnt-sense_buffer, - zfcp_get_fcp_sns_info_ptr(fcp_rsp_iu), sns_len); - ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, - (void *)scpnt-sense_buffer, sns_len); + sense = zfcp_get_fcp_sns_info_ptr(fcp_rsp_iu); + scsi_eh_cpy_sense(scpnt, sense, sns_len); + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, sense, sns_len); } /* check for overrun */ diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c index d095321..f5dde3d 100644 --- a/drivers/scsi/3w-.c +++ b/drivers/scsi/3w-.c @@ -214,6 +214,7 @@ #include scsi/scsi_host.h #include scsi/scsi_tcq.h #include scsi/scsi_cmnd.h +#include scsi/scsi_eh.h #include 3w-.h /* Globals */ @@ -410,23 +411,30 @@ static int tw_decode_sense(TW_Device_Extension *tw_dev, int request_id, int fill if ((command-status == 0xc7) || (command-status ==
RE: [PATCH 5/24][RFC] dpt_i2o: Use new scsi_eh_cpy_sense()
ACK with condition that community accepts the RFC's entire premise. The removed code that shunted the REQUEST_SENSE was based on the assumption that the sense data in the current scsi command packet was left over from the previous command's execution with a check condition as the scsi command packet is reused to issue the REQUEST_SENSE. For a new, or second from the target's point of view, request sense to the target issued by these older kernels would always return an erased sense. The dpt_i2o driver does not itself maintain the sense history, nor does the Firmware. This behavior, I believe, is not the case for current kernels so the code fragment made little sense (pun not intended). If my historical knowledge is correct, this (now removed) workaround makes no more sense because the scsi layer correctly manages adapters that produce auto-request sense and does not ever turn around the command and send a second request for sense information. Given this understanding, I have no problem with the removed fragment of REQUEST_SENSE shunting. However, I do urge some target error recovery testing, tape drives being the likely type of target affected by this change. I have no such hardware to confirm... Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Boaz Harrosh Sent: Monday, February 04, 2008 10:59 AM To: James Bottomley; FUJITA Tomonori; Christoph Hellwig; Jens Axboe; Jeff Garzik; linux-scsi Cc: Andrew Morton Subject: [PATCH 5/24][RFC] dpt_i2o: Use new scsi_eh_cpy_sense() - Abstract away scsi_cmnd-sense_buffer for later removal. - Removed a filtering out of a REQUEST_SENSE at .queuecommand In the case of sense beeing clean. This is no longer relevant since scsi-ml will always send a zero out sense buffer even on a resend, so this means outside REQUEST_SENSE would never go through. If this is intended then comment and check should change. Signed-off-by: Boaz Harrosh [EMAIL PROTECTED] --- drivers/scsi/dpt_i2o.c | 25 +++-- 1 files changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index c9dd839..6ee6fcd 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -71,6 +71,7 @@ MODULE_DESCRIPTION(Adaptec I2O RAID Driver); #include scsi/scsi_device.h #include scsi/scsi_host.h #include scsi/scsi_tcq.h +#include scsi/scsi_eh.h #include dpt/dptsig.h #include dpti.h @@ -385,18 +386,6 @@ static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *)) struct adpt_device* pDev = NULL;/* dpt per device information */ cmd-scsi_done = done; - /* -* SCSI REQUEST_SENSE commands will be executed automatically by the -* Host Adapter for any errors, so they should not be executed -* explicitly unless the Sense Data is zero indicating that no error -* occurred. -*/ - - if ((cmd-cmnd[0] == REQUEST_SENSE) (cmd-sense_buffer[0] != 0)) { - cmd-result = (DID_OK 16); - cmd-scsi_done(cmd); - return 0; - } pHba = (adpt_hba*)cmd-device-host-hostdata[0]; if (!pHba) { @@ -2226,8 +2215,6 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) pHba = (adpt_hba*) cmd-device-host-hostdata[0]; - cmd-sense_buffer[0] = '\0'; // initialize sense valid flag to false - if(!(reply_flags MSG_FAIL)) { switch(detailed_status I2O_SCSI_DSC_MASK) { case I2O_SCSI_DSC_SUCCESS: @@ -2297,11 +2284,13 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) // copy over the request sense data if it was a check // condition status if (dev_status == SAM_STAT_CHECK_CONDITION) { - u32 len = min(SCSI_SENSE_BUFFERSIZE, 40); + u8 sense_buffer[40]; + u32 len = sizeof(sense_buffer); // Copy over the sense data - memcpy_fromio(cmd-sense_buffer, (reply+28) , len); - if(cmd-sense_buffer[0] == 0x70 /* class 7 */ - cmd-sense_buffer[2] == DATA_PROTECT ){ + memcpy_fromio(sense_buffer, (reply+28) , len); + scsi_eh_cpy_sense(cmd, sense_buffer, len); + if (sense_buffer[0] == 0x70 /* class 7 */ + sense_buffer[2] == DATA_PROTECT){ /* This is to handle an array failed */ cmd-result = (DID_TIME_OUT 16); printk(KERN_WARNING%s: SCSI Data Protect-Device (%d,%d,%d) hba_status=0x%x, dev_status=0x%x, cmd=0x%x\n, -- 1.5.3.3 - To unsubscribe from this list: send
RE: [PATCH] [RFC] sd: make error handling more robust
Serendipity, been working an issue for the past week where error reporting from aacraid's HARDWARE_ERROR when an array was marked DEAD in the Adapter was not propagating to MD. The trigger for this investigation was AACRAID driver broken in 2.6.22.x (and beyond?) [WAS: Re: 2.6.22.16 MD raid1 doesn't mark removed disk faulty, MD thread goes UN] as authored my Mike Snitzer. I had attacked this yesterday by setting the deferred bit (0xF1) rather than invalidating the sense data (0x70) in the LLD (Patch to the aacraid would be forthcoming following some testing). The Valid bit in the SCSI layer sometimes (too many kernels, I am talking generically) throws away all the content and keys of the sense data, at least deferred appears to report that the info does not accompany the sense data. The change needs to be SCSI compliant and possibly endure back-porting to other kernels. So where are we going to put this, in each respective LLD (invalidating info, but not the keys), in sd.c (where the bad_lba is calculated) or in scsi_error.c (where the info field is picked up)? Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [SCSI] sd: make error handling more robust (v2)
ACK Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Mike Snitzer tested this also in conjunction with the aacraid driver and it resolved the error propagation problem he experienced with MD on a 2.6.22.16 kernel, recommend that this also be added to any stabilization for these other kernels. By his permission: Signed-off-by: Mike Snitzer [EMAIL PROTECTED] Sincerely -- Mark Salyzyn -Original Message- From: Tony Battersby [mailto:[EMAIL PROTECTED] Sent: Friday, February 01, 2008 12:03 PM To: linux-scsi@vger.kernel.org; James Bottomley Cc: Luben Tuikov; Salyzyn, Mark Subject: [PATCH] [SCSI] sd: make error handling more robust (v2) This patch fixes a problem with some out-of-spec SCSI disks that report hardware or medium errors incorrectly. Without the patch, the kernel may silently ignore a failed write command or return corrupted data on a failed read command. Signed-off-by: Tony Battersby [EMAIL PROTECTED] --- This is a simplified version of the original patch that fixes just the problem at hand, without trying to handle other theoretical out-of-spec cases. Applies to kernels 2.6.18 - 2.6.24-git10+. --- linux-2.6.24-git10/drivers/scsi/sd.c.orig 2008-02-01 11:24:37.0 -0500 +++ linux-2.6.24-git10/drivers/scsi/sd.c2008-02-01 11:26:12.0 -0500 @@ -990,6 +990,8 @@ static int sd_done(struct scsi_cmnd *SCp /* This computation should always be done in terms of * the resolution of the device's medium. */ + if (bad_lba start_lba) + goto out; good_bytes = (bad_lba - start_lba)*SCpnt-device-sector_size; break; case RECOVERED_ERROR: - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: Patch added to scsi-misc-2.6: [SCSI] aacraid: fib context lock for management ioctls
Merde, this patch caused a problem with a system lockup. Please revert it. Sincerely -- Mark Salyzyn -Original Message- From: James Bottomley [mailto:[EMAIL PROTECTED] Sent: Friday, January 25, 2008 12:05 PM To: [EMAIL PROTECTED]; Salyzyn, Mark; James Bottomley; AACRAID Subject: Patch added to scsi-misc-2.6: [SCSI] aacraid: fib context lock for management ioctls Your commit: [SCSI] aacraid: fib context lock for management ioctls Alan noticed the lack of locking surrounding the driver's dealings with the fib context managed by the trio of ioctls that are used by the RAID management applications to retrieve Adapter Initiated FIBs. I merely expanded the fib lock to include the fib context. There have been no field reports of any issues generally because the applications are relatively static and do not come and go often enough to stress this area. I bloated this patch a little with some space junk. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Signed-off-by: James Bottomley [EMAIL PROTECTED] has been added to the upstream SCSI tree You can find it here: http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.g it;a=commit;h=a119ee8ee3045bf559d4cf02d72b112f3de2a15b This patch is scheduled to be pushed when the merge window opens for 2.6.25 James Bottomley P.S. If you find this email unwanted, set up a procmail rule junking on the header: X-Git-Tree: SCSI - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: fib context lock for management ioctls (take 2)
The first patch was a bit too aggressive and nested the locks (!) unit testing was in error. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/commctrl.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salyzyn, Mark Sent: Thursday, January 24, 2008 10:40 AM To: 'linux-scsi@vger.kernel.org' Cc: 'Alan Cox'; 'Alan Cox' Subject: [PATCH 1/1] aacraid: fib context lock for management ioctls Alan noticed the lack of locking surrounding the driver's dealings with the fib context managed by the trio of ioctls that are used by the RAID management applications to retrieve Adapter Initiated FIBs. I merely expanded the fib lock to include the fib context. There have been no field reports of any issues generally because the applications are relatively static and do not come and go often enough to stress this area. I bloated this patch a little with some space junk. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. The following inline patch is 'diff -rub' to pull out the space junk to enable convenient inspection, please use the attached file to patch. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/commctrl.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff -rub a/commctrl.c b/commctrl.c --- a/drivers/scsi/aacraid/commctrl.c2008-01-24 09:44:33.080806785 -0500 +++ b/drivers/scsi/aacraid/commctrl.c2008-01-24 09:50:41.071552674 -0500 @@ -243,6 +243,7 @@ * Search the list of AdapterFibContext addresses on the adapter * to be sure this is a valid address */ + spin_lock_irqsave(dev-fib_lock, flags); entry = dev-fib_list.next; fibctx = NULL; @@ -258,17 +259,18 @@ fibctx = NULL; } if (!fibctx) { + spin_unlock_irqrestore(dev-fib_lock, flags); dprintk ((KERN_INFO Fib Context not found\n)); return -EINVAL; } if((fibctx-type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) || (fibctx-size != sizeof(struct aac_fib_context))) { + spin_unlock_irqrestore(dev-fib_lock, flags); dprintk ((KERN_INFO Fib Context corrupt?\n)); return -EINVAL; } status = 0; - spin_lock_irqsave(dev-fib_lock, flags); /* * If there are no fibs to send back, then either wait or return * -EAGAIN Here is the offending portion of the previous patch (two chunks): @@ -326,7 +328,9 @@ int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context * fibctx) { struct fib *fib; + unsigned long flags; + spin_lock_irqsave(dev-fib_lock, flags); /* * First free any FIBs that have not been consumed. */ @@ -349,6 +353,7 @@ * Remove the Context from the AdapterFibContext List */ list_del(fibctx-next); + spin_unlock_irqrestore(dev-fib_lock, flags); /* * Invalidate context */ Sincerely - Mark Salyzyn aacraid_fibctx_lock2.patch Description: aacraid_fibctx_lock2.patch
[PATCH 1/1] aacraid: fib context lock for management ioctls
Alan noticed the lack of locking surrounding the driver's dealings with the fib context managed by the trio of ioctls that are used by the RAID management applications to retrieve Adapter Initiated FIBs. I merely expanded the fib lock to include the fib context. There have been no field reports of any issues generally because the applications are relatively static and do not come and go often enough to stress this area. I bloated this patch a little with some space junk. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. The following inline patch is 'diff -rub' to pull out the space junk to enable convenient inspection, please use the attached file to patch. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/commctrl.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff -rub a/commctrl.c b/commctrl.c --- a/drivers/scsi/aacraid/commctrl.c2008-01-24 09:44:33.080806785 -0500 +++ b/drivers/scsi/aacraid/commctrl.c2008-01-24 09:50:41.071552674 -0500 @@ -243,6 +243,7 @@ * Search the list of AdapterFibContext addresses on the adapter * to be sure this is a valid address */ + spin_lock_irqsave(dev-fib_lock, flags); entry = dev-fib_list.next; fibctx = NULL; @@ -258,17 +259,18 @@ fibctx = NULL; } if (!fibctx) { + spin_unlock_irqrestore(dev-fib_lock, flags); dprintk ((KERN_INFO Fib Context not found\n)); return -EINVAL; } if((fibctx-type != FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT) || (fibctx-size != sizeof(struct aac_fib_context))) { + spin_unlock_irqrestore(dev-fib_lock, flags); dprintk ((KERN_INFO Fib Context corrupt?\n)); return -EINVAL; } status = 0; - spin_lock_irqsave(dev-fib_lock, flags); /* * If there are no fibs to send back, then either wait or return * -EAGAIN @@ -326,7 +328,9 @@ int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context * fibctx) { struct fib *fib; + unsigned long flags; + spin_lock_irqsave(dev-fib_lock, flags); /* * First free any FIBs that have not been consumed. */ @@ -349,6 +353,7 @@ * Remove the Context from the AdapterFibContext List */ list_del(fibctx-next); + spin_unlock_irqrestore(dev-fib_lock, flags); /* * Invalidate context */ Sincerely - Mark Salyzyn aacraid_fibctx_lock.patch Description: aacraid_fibctx_lock.patch
[PATCH 2/2] aacraid: add Voodoo Lite class of cards.
The cards being added are supported in a limited sense already through family matching, but we needed to add some functionality to the driver to expose selectively the physical drives. These Physical drives are specifically marked to not be part of any array and thus are declared JBODs (Just a Bunch Of Drives) for generic SCSI access. We report that this is the second patch in a set of two, but merely depends on the stand-alone functionality of the first patch which adds in that case the ability to report a driver feature flag via sysfs. We leverage that functionality by reporting that this driver now supports this new JBOD feature for the controller so that the array management applications may react accordingly and guide the user as they manage the controller. This following patch is against current scsi-misc-2.6 after the first of the pair of patches are applied. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Documentation/scsi/aacraid.txt |4 drivers/scsi/aacraid/aachba.c |5 - drivers/scsi/aacraid/aacraid.h |6 +- drivers/scsi/aacraid/commsup.c | 24 drivers/scsi/aacraid/linit.c | 15 +++ 5 files changed, 48 insertions(+), 6 deletions(-) Sincerely -- Mark Salyzyn aacraid_voodoo_lite.patch Description: aacraid_voodoo_lite.patch
RE: [PATCH 1/2] don't zero out sense_buffer in queuecommand
ACK on ips bits. Sincerely -- Mark Salyzyn . . . diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index e54d30c..b1b2295 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -2736,8 +2736,6 @@ ips_next(ips_ha_t * ha, int intr) SC-result = DID_OK; SC-host_scribble = NULL; - memset(SC-sense_buffer, 0, sizeof (SC-sense_buffer)); - scb-target_id = SC-device-id; scb-lun = SC-device-lun; scb-bus = SC-device-channel; @@ -3821,7 +3819,6 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) /* attempted, a Check Condition occurred, and Sense */ /* Data indicating an Invalid CDB OpCode is returned. */ sp = (char *) scb-scsi_cmd-sense_buffer; - memset(sp, 0, sizeof (scb-scsi_cmd-sense_buffer)); sp[0] = 0x70; /* Error Code */ sp[2] = ILLEGAL_REQUEST;/* Sense Key 5 Illegal Req. */ . . . - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 2/2] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE
ACK on ips, aacraid and dpt_i2o bits. Cursory inspection of other bits as well. Thanks Fujita, looks good! Will do a 'min()' cleanup on aacraid once patch propagates into scsi-misc-2.6 Sincerely -- Mark Salyzyn cur*so*ry - adjective going rapidly over something, without noticing details; hasty; superficial. spedd reeding . . . o This is a 'grep and replace' style patch but cleans up dpt_i2o a bit as by permission of Mark (I use min macro). o The previous version overlooked some sizeof sense_buffer lines in aacraid and qla4xxx. . . . diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 62d9516..aadedbd 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -912,8 +912,8 @@ static int aac_bounds_32(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(cmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(cmd-sense_buffer)) - ? sizeof(cmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); cmd-scsi_done(cmd); return 1; @@ -1525,8 +1525,8 @@ static void io_callback(void *context, struct fib * fibptr) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); } aac_fib_complete(fibptr); @@ -1739,8 +1739,8 @@ static void synchronize_callback(void *context, struct fib *fibptr) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(cmd-sense_buffer, dev-fsa_dev[cid].sense_data, - min(sizeof(dev-fsa_dev[cid].sense_data), - sizeof(cmd-sense_buffer))); + min_t(size_t, sizeof(dev-fsa_dev[cid].sense_data), +SCSI_SENSE_BUFFERSIZE)); } aac_fib_complete(fibptr); @@ -1949,8 +1949,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) SENCODE_INVALID_COMMAND, ASENCODE_INVALID_COMMAND, 0, 0, 0, 0); memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); scsicmd-scsi_done(scsicmd); return 0; @@ -2002,8 +2002,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, (sizeof(dev-fsa_dev[cid].sense_data) - sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); } scsicmd-scsi_done(scsicmd); @@ -2259,8 +2259,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ILLEGAL_REQUEST, SENCODE_INVALID_COMMAND, ASENCODE_INVALID_COMMAND, 0, 0, 0, 0); memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); scsicmd-scsi_done(scsicmd); return 0; @@ -2422,8 +2422,8 @@ static void aac_srb_callback(void *context, struct fib * fibptr) int len; printk(KERN_WARNING aac_srb_callback: srb failed, status = %d\n, le32_to_cpu(srbreply-status)); len = (le32_to_cpu(srbreply-sense_data_size) - sizeof(scsicmd-sense_buffer)) ? -
[PATCH 1/1] aacraid: replace '?:' with min_t()
The promised min_t() cleanup. Purely cosmetic. This attached patch is against current scsi-misc-2.6 *after* http://marc.info/?l=linux-scsim=120020681219191w=2 is applied. James, sorry if this patch is being submitted too early in the pipeline ... ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 40 1 file changed, 16 insertions(+), 24 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salyzyn, Mark Sent: Monday, January 14, 2008 8:24 AM To: 'FUJITA Tomonori'; '[EMAIL PROTECTED]' Cc: 'linux-scsi@vger.kernel.org'; '[EMAIL PROTECTED]' Subject: RE: [PATCH 2/2] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE ACK on ips, aacraid and dpt_i2o bits. Cursory inspection of other bits as well. Thanks Fujita, looks good! Will do a 'min()' cleanup on aacraid once patch propagates into scsi-misc-2.6 Sincerely -- Mark Salyzyn cur*so*ry - adjective going rapidly over something, without noticing details; hasty; superficial. spedd reeding . . . o This is a 'grep and replace' style patch but cleans up dpt_i2o a bit as by permission of Mark (I use min macro). o The previous version overlooked some sizeof sense_buffer lines in aacraid and qla4xxx. . . . diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 62d9516..aadedbd 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -912,8 +912,8 @@ static int aac_bounds_32(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(cmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(cmd-sense_buffer)) - ? sizeof(cmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); cmd-scsi_done(cmd); return 1; @@ -1525,8 +1525,8 @@ static void io_callback(void *context, struct fib * fibptr) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); } aac_fib_complete(fibptr); @@ -1739,8 +1739,8 @@ static void synchronize_callback(void *context, struct fib *fibptr) ASENCODE_INTERNAL_TARGET_FAILURE, 0, 0, 0, 0); memcpy(cmd-sense_buffer, dev-fsa_dev[cid].sense_data, - min(sizeof(dev-fsa_dev[cid].sense_data), - sizeof(cmd-sense_buffer))); + min_t(size_t, sizeof(dev-fsa_dev[cid].sense_data), +SCSI_SENSE_BUFFERSIZE)); } aac_fib_complete(fibptr); @@ -1949,8 +1949,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) SENCODE_INVALID_COMMAND, ASENCODE_INVALID_COMMAND, 0, 0, 0, 0); memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, - (sizeof(dev-fsa_dev[cid].sense_data) sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + (sizeof(dev-fsa_dev[cid].sense_data) SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); scsicmd-scsi_done(scsicmd); return 0; @@ -2002,8 +2002,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) memcpy(scsicmd-sense_buffer, dev-fsa_dev[cid].sense_data, (sizeof(dev-fsa_dev[cid].sense_data) - sizeof(scsicmd-sense_buffer)) - ? sizeof(scsicmd-sense_buffer) + SCSI_SENSE_BUFFERSIZE) + ? SCSI_SENSE_BUFFERSIZE : sizeof(dev-fsa_dev[cid].sense_data)); } scsicmd-scsi_done(scsicmd); @@ -2259,8 +2259,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ILLEGAL_REQUEST
RE: Checkpatch.pl failure
Suppress one of the bogus checkpatch.pl error, the side-effect of the error highlighted that this constant should be replaced by an existing manifest. checkpatch.pl needs to be corrected to accept the comment style to deal with the other cases should they ever be touched by future patches. This is a tangled set of coat hangers, tug on one and never know how complicated of a mess might follow! This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments, use the attachment, not the inline patch. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/dpt_i2o.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -ru a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c --- a/drivers/scsi/dpt_i2o.c2008-01-14 13:39:11.086600955 -0500 +++ b/drivers/scsi/dpt_i2o.c2008-01-14 13:41:44.813246497 -0500 @@ -2296,7 +2296,7 @@ // copy over the request sense data if it was a check // condition status - if (dev_status == 0x02 /*CHECK_CONDITION*/) { + if (dev_status == SAM_STAT_CHECK_CONDITION) { u32 len = min(SCSI_SENSE_BUFFERSIZE, 40); // Copy over the sense data memcpy_fromio(cmd-sense_buffer, (reply+28) , len); This geek joke brought to you by -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Bottomley Sent: Monday, January 14, 2008 10:49 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: linux-kernel Subject: Checkpatch.pl failure This error: ERROR: no space before that close parenthesis ')' #501: FILE: drivers/scsi/dpt_i2o.c:2299: + if (dev_status == 0x02 /*CHECK_CONDITION*/) { Is definitely wrong. I think it's stripped the comments so now the if looks to have a space before the bracket, but stylistically the complaint it has errored out for is wrong. James dpt_i2o_CHECK_CONDITION.patch Description: dpt_i2o_CHECK_CONDITION.patch
[RFC] aacraid: driver feature flags?
Feature enhancement. Do we have a developing standard on how a driver may report to user tools via sysfs what features are supported or not by the driver? In the following I am proposing a 'flags' entry that will reside in the host controllers tree, with a newline separated list of arbitrary ascii named features that indicate whether the combination of driver and controller has support for said feature. Breaking from the one-line output typical of sysfs entries, newline was added to tailor for grep, or simple gets line by line string match within an application. I added one for a compiler time check for existence of debug print output, one for an optional manifest defined enhanced status reporting in the logs, and one for runtime reporting whether the controller and driver supports arrays larger than 2TB to my example below. Suggestions? This following patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments, so one can NOT use the following to patch, it is only present to demonstrate the idea. drivers/scsi/aacraid/linit.c | 25 + 1 file changed, 25 insertions(+) diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c 2008-01-11 11:19:11.378159940 -0500 +++ b/drivers/scsi/aacraid/linit.c 2008-01-11 11:23:19.040145945 -0500 @@ -788,6 +788,23 @@ return len; } +static ssize_t aac_show_flags(struct class_device *class_dev, char *buf) +{ + int len = 0; + struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)-hostdata; + + if (nblank(dprintk(x))) + len = snprintf(buf, PAGE_SIZE, dprintk\n); +# ifdef AAC_DETAILED_STATUS_INFO + len += snprintf(buf + len, PAGE_SIZE - len, + AAC_DETAILED_STATUS_INFO\n); +# endif + if (dev-raw_io_interface dev-raw_io_64) + len += snprintf(buf + len, PAGE_SIZE - len, + SAI_READ_CAPACITY_16\n); + return len; +} + static ssize_t aac_show_kernel_version(struct class_device *class_dev, char *buf) { @@ -897,6 +914,13 @@ }, .show = aac_show_vendor, }; +static struct class_device_attribute aac_flags = { + .attr = { + .name = flags, + .mode = S_IRUGO, + }, + .show = aac_show_flags, +}; static struct class_device_attribute aac_kernel_version = { .attr = { .name = hba_kernel_version, @@ -951,6 +975,7 @@ static struct class_device_attribute *aac_attrs[] = { aac_model, aac_vendor, + aac_flags, aac_kernel_version, aac_monitor_version, aac_bios_version, - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: respond to enclosure service events
Feature enhancement. Added support to respond to enclosure service events (controller AIFs) to add, online or offline physical targets reported to sg. Also added online and offlining of arrays. Removed an automatic variable definition in a sub block that hid an earlier definition, determined to be inert as the sub-block use did not interfere. Bumped the driver versioning to stamp the addition of this feature. This attached patch is against current scsi-misc-2.6 *after* series of patches from past week are applied, as there is some overlap on the aacraid.h file. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aacraid.h |5 +- drivers/scsi/aacraid/commsup.c | 99 +++-- 2 files changed, 79 insertions(+), 25 deletions(-) Sincerely -- Mark Salyzyn aacraid_enclosure.patch Description: aacraid_enclosure.patch
[PATCH 1/1] aacraid: respond to enclosure service events (take 2)
The original patch removed a default: break from the switch, which ignited a warning message regarding an unhandled enum value. This enclosed patch leaves the default case in to suppress the warning. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aacraid.h |5 +- drivers/scsi/aacraid/commsup.c | 96 - 2 files changed, 79 insertions(+), 22 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: Salyzyn, Mark Sent: Friday, January 11, 2008 11:15 AM To: 'linux-scsi@vger.kernel.org' Subject: [PATCH 1/1] aacraid: respond to enclosure service events Feature enhancement. Added support to respond to enclosure service events (controller AIFs) to add, online or offline physical targets reported to sg. Also added online and offlining of arrays. Removed an automatic variable definition in a sub block that hid an earlier definition, determined to be inert as the sub-block use did not interfere. Bumped the driver versioning to stamp the addition of this feature. This attached patch is against current scsi-misc-2.6 *after* series of patches from past week are applied, as there is some overlap on the aacraid.h file. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aacraid.h |5 +- drivers/scsi/aacraid/commsup.c | 99 +++-- 2 files changed, 79 insertions(+), 25 deletions(-) Sincerely -- Mark Salyzyn aacraid_enclosure2.patch Description: aacraid_enclosure2.patch
[PATCH 1/1] aacraid: SMC vendor identification
Due to an internal limit associated with the AdapterTypeText field, SMC required a product ID that overloaded the combined vendor and product ID. A decision was made to ship the SMC products without a vendor string dropping the defacto space that used to delineate vendor and product to boot. To correct this, we needed to adjust the code in the driver to parse out the vendor and product strings for the adapter. We match of 'AOC' in the AdapterTypeText, if so we set the vendor to SMC and place the entire AdapterTypeText into the product field. This only affects the cosmetic presentation of the Adapter vendor and product in the logs and in sysfs. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments, use the attachment, not the inline patch. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-01-11 16:28:15.129189613 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-01-11 16:31:22.032344801 -0500 @@ -716,16 +716,21 @@ if (dev-supplement_adapter_info.AdapterTypeText[0]) { char * cp = dev-supplement_adapter_info.AdapterTypeText; - int c = sizeof(str-vid); - while (*cp *cp != ' ' --c) - ++cp; - c = *cp; - *cp = '\0'; - inqstrcpy (dev-supplement_adapter_info.AdapterTypeText, - str-vid); - *cp = c; - while (*cp *cp != ' ') - ++cp; + int c; + if ((cp[0] == 'A') (cp[1] == 'O') (cp[2] == 'C')) + inqstrcpy(SMC, str-vid); + else { + c = sizeof(str-vid); + while (*cp *cp != ' ' --c) + ++cp; + c = *cp; + *cp = '\0'; + inqstrcpy (dev-supplement_adapter_info.AdapterTypeText, + str-vid); + *cp = c; + while (*cp *cp != ' ') + ++cp; + } while (*cp == ' ') ++cp; /* last six chars reserved for vol type */ Sincerely -- Mark Salyzyn aacraid_SMC_vid.patch Description: aacraid_SMC_vid.patch
[PATCH 1/1] aacraid: add call to flush_kernel_dcache_page for architectures that require it (take 2)
The reason for the guard was for Linux Distributions that had limited their list of exported APIs on architectures that did *not* require the flush_kernel_dcache_page ... Sorry for not filtering out Distribution kernel issues into the list! :-) Dropped guard in the enclosed patch. 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). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] aachba.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-01-11 14:38:53.342378372 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-01-11 14:39:39.364534313 -0500 @@ -31,9 +31,9 @@ #include linux/slab.h #include linux/completion.h #include linux/blkdev.h -#include linux/dma-mapping.h #include asm/semaphore.h #include asm/uaccess.h +#include linux/highmem.h /* For flush_kernel_dcache_page */ #include scsi/scsi.h #include scsi/scsi_cmnd.h @@ -366,6 +366,7 @@ if (buf transfer_len 0) memcpy(buf + offset, data, transfer_len); + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); kunmap_atomic(buf - sg-offset, KM_IRQ0); } Sincerely -- Mark Salyzyn -Original Message- From: James Bottomley [mailto:[EMAIL PROTECTED] Sent: Friday, January 11, 2008 11:41 AM To: Salyzyn, Mark Cc: 'linux-scsi@vger.kernel.org' Subject: Re: [PATCH 1/1] aacraid: add call to flush_kernel_dcache_page for architectures that require it. On Tue, 2008-01-08 at 12:09 -0800, Salyzyn, Mark wrote: Some architectures require a call to flush_kernel_dcache_page for processor spoofed DMA operations. 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). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] aachba.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-01-08 15:01:21.503932722 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-01-08 15:02:35.849634368 -0500 @@ -31,9 +31,9 @@ #include linux/slab.h #include linux/completion.h #include linux/blkdev.h -#include linux/dma-mapping.h #include asm/semaphore.h #include asm/uaccess.h +#include linux/highmem.h /* For flush_kernel_dcache_page */ #include scsi/scsi.h #include scsi/scsi_cmnd.h @@ -366,6 +366,9 @@ if (buf transfer_len 0) memcpy(buf + offset, data, transfer_len); +#ifdef ARCH_HAS_FLUSH_ANON_PAGE + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); +#endif This #ifdef/#endif guard is unnecessary ... flush_kernel_dcache_page() is available on all architectures (it's a nop on most). However, ARCH_HAS_FLUSH_ANON_PAGE is the wrong guard anyway ... that's for the flush_anon_page() function ... aacraid_flush_dcache4.patch Description: aacraid_flush_dcache4.patch
[PATCH 1/1] aacraid: add aacraid.cache parameter to driver to control FUA and SYNCHRONIZE_CACHE policy
aacraid.cache parameter, Disable Queue Flush commands: bit 0 - Disable FUA in WRITE SCSI commands bit 1 - Disable SYNCHRONIZE_CACHE SCSI command bit 2 - Disable only if Battery not protecting adapter supplied Cache e.g.: aacraid.cache=7 will disable the FUA and SYNCHRONIZE_CACHE commands if the adapter has reported that it's cache is battery backed up. This parameter permits experimentation with tradeoffs between performance and caching policy. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 36 drivers/scsi/aacraid/aacraid.h |2 ++ drivers/scsi/aacraid/commsup.c |4 3 files changed, 30 insertions(+), 12 deletions(-) Sincerely -- Mark Salyzyn aacraid_cache_parm.patch Description: aacraid_cache_parm.patch
[PATCH 1/1] aacraid: add call to flush_kernel_dcache_page for architectures that require it.
Some architectures require a call to flush_kernel_dcache_page for processor spoofed DMA operations. 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). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] aachba.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2008-01-08 15:01:21.503932722 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-01-08 15:02:35.849634368 -0500 @@ -31,9 +31,9 @@ #include linux/slab.h #include linux/completion.h #include linux/blkdev.h -#include linux/dma-mapping.h #include asm/semaphore.h #include asm/uaccess.h +#include linux/highmem.h /* For flush_kernel_dcache_page */ #include scsi/scsi.h #include scsi/scsi_cmnd.h @@ -366,6 +366,9 @@ if (buf transfer_len 0) memcpy(buf + offset, data, transfer_len); +#ifdef ARCH_HAS_FLUSH_ANON_PAGE + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); +#endif kunmap_atomic(buf - sg-offset, KM_IRQ0); } Sincerely -- Mark Salyzyn aacraid_flush_dcache3.patch Description: aacraid_flush_dcache3.patch
[PATCH 1/1] aacraid: add sysfs report of RAID level
Report the RAID level string for the SCSI device representing the array. Report is in /sys/class/scsi_device/#:#:#:#/device/level. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |7 ++- drivers/scsi/aacraid/aacraid.h |1 + drivers/scsi/aacraid/linit.c | 25 + 3 files changed, 32 insertions(+), 1 deletion(-) Sincerely -- Mark Salyzyn aacraid_sysfs_raid_level.patch Description: aacraid_sysfs_raid_level.patch
[PATCH 1/1] aacraid: big endian issues
Big endian systems issues discovered in the aacraid driver. Somewhat reverses a patch from November 7th of last year that removed swap operations because they formerly were being assigned to an u8 array when they should have been assigned to an le32 array. This patch is largely inert for any little endian processor architecture. It resolves a bug in delivering the BlinkLED AIF event to registered applications when the adapter or associated hardware was reset due to ill health. A rare corner case occurrence, also largely unnoticed by any as it was a new (untested!) feature. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |7 +++ drivers/scsi/aacraid/aacraid.h |6 +++--- drivers/scsi/aacraid/comminit.c |4 ++-- drivers/scsi/aacraid/commsup.c | 17 - drivers/scsi/aacraid/linit.c| 10 +- drivers/scsi/aacraid/rx.c |2 +- 6 files changed, 22 insertions(+), 24 deletions(-) Sincerely -- Mark Salyzyn aacraid_big_endian.patch Description: aacraid_big_endian.patch
[PATCH 1/1] aacraid: variable redefinition hides earlier warning
The parameter 'info' is reused, renamed the second to sinfo to represent supplemental adapter info, to suppress compile warning message. 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). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/scsi/aacraid/aachba.c 2008-01-08 15:24:06.451870018 -0500 +++ b/drivers/scsi/aacraid/aachba.c 2008-01-08 15:25:08.971018896 -0500 @@ -1243,24 +1243,24 @@ memcpy(dev-adapter_info, info, sizeof(*info)); if (dev-adapter_info.options AAC_OPT_SUPPLEMENT_ADAPTER_INFO) { - struct aac_supplement_adapter_info * info; + struct aac_supplement_adapter_info * sinfo; aac_fib_init(fibptr); - info = (struct aac_supplement_adapter_info *) fib_data(fibptr); + sinfo = (struct aac_supplement_adapter_info *) fib_data(fibptr); - memset(info,0,sizeof(*info)); + memset(sinfo,0,sizeof(*sinfo)); rcode = aac_fib_send(RequestSupplementAdapterInfo, fibptr, -sizeof(*info), +sizeof(*sinfo), FsaNormal, 1, 1, NULL, NULL); if (rcode = 0) - memcpy(dev-supplement_adapter_info, info, sizeof(*info)); + memcpy(dev-supplement_adapter_info, sinfo, sizeof(*sinfo)); } Sincerely -- Mark Salyzyn aacraid_info_var_hides_warning.patch Description: aacraid_info_var_hides_warning.patch
[PATCH 1/1] aacraid: multiple definition of automatic variable warning.
The 'entry' automatic variable was defined at the top and within a block that uses it, removed the definition from the block that uses it. Some cosmetic changes were made while in the same file. This patch should be inert. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] This attached patch is against current scsi-misc-2.6. commctrl.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: OS panic after Adapter panic (hardening).
In experiments in the lab we managed to trigger an Adapter firmware panic (BlinkLED) coincidentally while several pass-through ioctl command from the management software were outstanding on a bug only present on a class of RAID Adapters that require a hardware reset rather than a commanded reset. The net result was an attempt to time out the management software command as if it came from the SCSI layer resulting in an OS panic. Adapters that use commanded reset, management commands are returned failed by the Adapter correctly. The adapter firmware panic that resulted in this condition was also resolved, and there were no adapters in the field with this specific firmware bug so we do not expect any field reports. This is a rare or unlikely corner condition, and no reports have ever been forwarded from the field. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aacraid.h |1 + drivers/scsi/aacraid/commsup.c |4 +++- drivers/scsi/aacraid/dpcsup.c |4 +++- drivers/scsi/aacraid/linit.c | 19 ++- 4 files changed, 25 insertions(+), 3 deletions(-) Sincerely -- Mark Salyzyn aacraid_fib_context.patch Description: aacraid_fib_context.patch
RE: [PATCH 1/1] aacraid: multiple definition of automatic variable warning.
Missed the patch attachment 8-} Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salyzyn, Mark Sent: Tuesday, January 08, 2008 3:58 PM To: 'linux-scsi@vger.kernel.org' Subject: [PATCH 1/1] aacraid: multiple definition of automatic variable warning. The 'entry' automatic variable was defined at the top and within a block that uses it, removed the definition from the block that uses it. Some cosmetic changes were made while in the same file. This patch should be inert. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] This attached patch is against current scsi-misc-2.6. commctrl.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) Sincerely -- Mark Salyzyn aacraid_multiple_definition.patch Description: aacraid_multiple_definition.patch
RE: [PATCH 1/1] aacraid: big endian issues
I've always assumed that byte swapping of constants would be optimized where a variable would not :-) I have confirmed in assembler output of the compiler that constant merely become byte reversed constants optimized or no in at least one architectural case. I have *not* confirmed that a variable byte reversal requires processing overhead, as one could possibly expect the compiler to instead optimize by byte reversing the constant when comparing. However, I will guarantee you that if optimization is turned off in the compiler that such an optimization will not take place... I do not think this turns into a readability issue in either case and view this as a simple cosmetic coding precaution much like likely()/unlikely() offers hints to the compiler on code intent... Sincerely -- Mark Salyzyn -Original Message- From: Grant Grundler [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 4:17 PM To: Salyzyn, Mark Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH 1/1] aacraid: big endian issues On Jan 8, 2008 12:48 PM, Salyzyn, Mark [EMAIL PROTECTED] wrote: Big endian systems issues discovered in the aacraid driver. ... --- a/drivers/scsi/aacraid/comminit.c 2008-01-08 15:32:28.329810853 -0500 +++ b/drivers/scsi/aacraid/comminit.c 2008-01-08 15:37:35.633163607 -0500 @@ -301,10 +301,10 @@ if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) (status[0] == 0x0001)) { - if (status[1] AAC_OPT_NEW_COMM_64) + if (status[1] le32_to_cpu(AAC_OPT_NEW_COMM_64)) ... Why apply le32_to_cpu() to the constant instead of the variable? On systems were le32_to_cpu() is doing something, can gcc or preprocessor optimize the constant? I've always assumed it could not but that might be wrong. thanks, grant - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: improve queue balancing
The adapter queue is divided up equally to all the arrays to prevent command starvation to any individual array. On the other hand, physical targets are only granted a queue depth of one each. The code prior to this patch used to deal with the incremental discovery of targets, but the driver knows how many arrays are present prior to the scan so this knowledge is used to generate a better estimate for the queue depth. Remove the capability of 'physical=0' from preventing access to the class of adapters that have the RAID/SCSI mode of operation since none of the physicals on the SCSI channel are candidates ever for an array. As always, the user can override this default queue depth policy by making the appropriate adjustments utilizing sysfs. 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). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) --- a/drivers/scsi/aacraid/linit.c 2008-01-08 16:38:32.783320829 -0500 +++ b/drivers/scsi/aacraid/linit.c 2008-01-08 16:55:07.805050564 -0500 @@ -401,16 +401,14 @@ static int aac_slave_configure(struct scsi_device *sdev) { + struct aac_dev *aac = (struct aac_dev *)sdev-host-hostdata; if ((sdev-type == TYPE_DISK) - (sdev_channel(sdev) != CONTAINER_CHANNEL)) { + (sdev_channel(sdev) != CONTAINER_CHANNEL) + (!aac-raid_scsi_mode || (sdev_channel(sdev) != 2))) { if (expose_physicals == 0) return -ENXIO; - if (expose_physicals 0) { - struct aac_dev *aac = - (struct aac_dev *)sdev-host-hostdata; - if (!aac-raid_scsi_mode || (sdev_channel(sdev) != 2)) - sdev-no_uld_attach = 1; - } + if (expose_physicals 0) + sdev-no_uld_attach = 1; } if (sdev-tagged_supported (sdev-type == TYPE_DISK) (sdev_channel(sdev) == CONTAINER_CHANNEL)) { @@ -419,6 +417,7 @@ unsigned num_lsu = 0; unsigned num_one = 0; unsigned depth; + unsigned cid; /* * Firmware has an individual device recovery time typically @@ -426,11 +425,15 @@ */ if (sdev-timeout (45 * HZ)) sdev-timeout = 45 * HZ; + for (cid = 0; cid aac-maximum_num_containers; ++cid) + if (aac-fsa_dev[cid].valid) + ++num_lsu; __shost_for_each_device(dev, host) { if (dev-tagged_supported (dev-type == TYPE_DISK) - (sdev_channel(dev) == CONTAINER_CHANNEL)) - ++num_lsu; - else + (sdev_channel(dev) == CONTAINER_CHANNEL)) { + if (!aac-fsa_dev[sdev_id(dev)].valid) + ++num_lsu; + } else ++num_one; } if (num_lsu == 0) Sincerely -- Mark Salyzyn aacraid_queue_depth.patch Description: aacraid_queue_depth.patch
RE: [PATCH] drivers/scsi/: Spelling fixes
ACK ips line change. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Perches Sent: Monday, December 17, 2007 2:40 PM To: [EMAIL PROTECTED] Cc: Andrew Morton; AACRAID; Andrew Vasquez; Brian King; IpsLinux; Hannes Reinecke; James E.J. Bottomley; James Smart; Mike Christie; Neela Syam Kolli; linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Subject: [PATCH] drivers/scsi/: Spelling fixes Signed-off-by: Joe Perches [EMAIL PROTECTED] --- . . . drivers/scsi/ips.c|2 +- . . . diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 5c5a9b2..901e14b 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -1313,7 +1313,7 @@ ips_intr_copperhead(ips_ha_t * ha) cstatus.value = (*ha-func.statupd) (ha); if (cstatus.fields.command_id (IPS_MAX_CMDS - 1)) { - /* Spurious Interupt ? */ + /* Spurious Interrupt ? */ continue; } - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: broken dpt_i2o in 2.6.23 (was: ext2_check_page: bad entry indirectory) (fwd)
ACK, patch looks good. Thanks for composing this patch. Glad to hear of successful test results. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Miquel van Smoorenburg . . . I just recompiled 2.6.23.9 with the 64 bit patch for dpt_i2o and now it boots just fine. The patch is here: http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch It's not the final version - it needs a few cleanups before it can be submitted, but perhaps you can test if it also works for you. Mike. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: broken dpt_i2o in 2.6.23 (was: ext2_check_page: bad entry indirectory) (fwd)
Miquel van Smoorenburg sez: I got the 64-bit dpt_i2o driver from Adaptec some time ago, and I have added 64-bit support to the 2.6.23.1 dpt_i2o driver based on that driver. I intended to submit it for 2.6.25 or so ... if I have some time later today or tomorrow I'll try that next to see if that makes a difference. Thanks, Mike, I will be watching your progress and offer my support! I submitted a patch to move to 64 bit (which also drops the virt_to_bus code) several years ago and it was rejected because of the focus on the time to make i2o_block the driver of choice for this line of controllers. I then reacted to the rejection by working with Markus Lidel to move the 64 bit capabilities into the i2o driver. Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [patch 20/23] aacraid driver fails with Dell PowerEdge Expandable RAID Controller 3/Di
From: Miquel van Smoorenburg [mailto:[EMAIL PROTECTED] +static int aac_scsi_32_64(struct fib * fib, struct scsi_cmnd * cmd) +{ +if ((sizeof(dma_addr_t) 4) + (num_physpages (0xULL PAGE_SHIFT)) + (fib-dev-adapter_info.options AAC_OPT_SGMAP_HOST64)) +return FAILED; +return aac_scsi_32(fib, cmd); +} I saw the same thing in the 64-bit dpt_i2o driver, but I Yes, scratch and sniff, caught me :-} wonder, shouldn't this be something like: #include linux/bootmem.h if ((sizeof(dma_addr_t) 4) (max_pfn (0xULL PAGE_SHIFT)) (fib-dev-adapter_info.options AAC_OPT_SGMAP_HOST64)) e.g. use max_pfn instead of num_physpages ? Yes, it would be more correct for the moment, save for the fact that it is marked for deletion: * This doesn't seem to be used by the Linux memory manager any * more, but is used by ll_rw_block. If we can get rid of it, we * also get rid of some of the stuff above as well. . . . max_pfn = . . . and unfortunately architecture issues abound with all memory limit variable :-( in arch/arm/mm/init.c: * Note: max_low_pfn and max_pfn reflect the number of _pages_ in * the system, not the maximum PFN. Reminder: If this automated solution represented in this patch, however flawed with any memory limit variable, is too hacky and not acceptable for inclusion, the workaround for the existing drivers and PERC users in 64 bit populated architectures continues to be to manually set aacraid.dacmode=0 in the failing configurations. What variable tells us the maximum physical memory address, is correct in all architectures and is going to stick around? Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] Unify sysfs filenames for firmware version
Jonathan McDowell sez: On Tue, Nov 20, 2007 at 11:35:26AM -0500, James Smart wrote: The hearburn I have with these patches is that you are changing driver-specific attributes, not common ones as enforced/requested by a subsystem. As such, you are breaking a management interface for existing tools/scripts. Yes, that's true. Though at present we have the heartburn that anyone wanting to write a script to pull out firmware revisions has to know exactly where every driver stores this information. The aacraid cards, which uses hba_monitor_version, hba_kernel_version and hba_bios_version for each piece does not fit into the single 'firmware revision' common ideal and were noticeably missing from this patch set. Fortunately (?), Adaptec has not bought into using sysfs for their management applications to pull these pieces and continues to pick them up directly by issuing ioctl pass-through calls to the card's firmware, so we have some leeway to change them to mold to a developing standard. The fact that sysfs is a developing standard will confirm the management application folks reasoning for shying away from sysfs ;-/ Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] Unify sysfs filenames for firmware version
Jonathan McDowell [mailto:[EMAIL PROTECTED] sez: On Tue, Nov 20, 2007 at 12:49:49PM -0500, Salyzyn, Mark wrote: The aacraid cards, which uses hba_monitor_version, hba_kernel_version and hba_bios_version for each piece does not fit into the single 'firmware revision' common ideal While I've used the aacraid cards in the past I think I agree with you that no 1 of those 3 pieces of information represents the firmware. Perhaps it could export a triplet though? A single can be used in 99% of all cases, OEM or users can muck it up. I would 'vote' for hba_kernel_version == fw_version. Maybe add a companion standard for hba_bios_version == bios_version and hba_monitor_version == exec_version (executive_version) if other cards can supply such info ... Management stuff always seems to be tied to a single card. It's one of the things that puts me off hardware RAID. There are 113 cards this driver works for in concert. Maybe my tail feathers are showing ;- Do the management folks actually have some ideas about what sort of interface they'd like in sysfs? Simple answer: No Detailed answer (I digress): They love ioctls as a commonality across all operating systems and a pass-through to proprietary firmware portals: binary, bidirectional, atomic and freely formatted migrating structures that do not herd the cats into just one specification. These are all eventually presented as documented stable objects exported by a sizeable C++ StorLib(tm) library that provides the consistent interface that the OEMs and Adaptec use to the higher level install, event, GUI and CLI applications. Driver is only involved as a transport. Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: SCSI dynamic power management
Alan Stern sez: Sure. But that won't do any good if the requests get held on the queue (or failed immediately) because the disk is supposedly suspended. Somehow those requests have to be allowed to proceed while all others are forced to wait (or to fail). Not a failure. Not ready is reported back in a check condition on a media based request, a spin-up request is issued, then a subsequent loop sits there probing every second with a Test Unit ready to wait for the drive to spin back up. There is ample time provided in this path for the drive to spin-up. Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
Resounding ACK. I just finished *exactly* the same set of changes, composed the patch and was about to hit send when this one came over the wire from you! There was absolutely no differences between our patches (save for the fact I did not place the AIF ones in as they are already in the queue, one is already on -mm). I am going to return to this at some future date and figure out the problems surrounding the context imbalances that are present, making code that determines which context it is called from (sysfs, error recovery or from the background thread) and plays with the various locks confuses sparse. Rewriting so that the contexts are less programmatic is in order... Sincerely -- Mark Salyzyn -Original Message- From: Christoph Hellwig [mailto:[EMAIL PROTECTED] Sent: Thursday, November 08, 2007 12:28 PM To: Salyzyn, Mark Cc: Christoph Hellwig; Andreas Schwab; Stephen Rothwell; linux-scsi@vger.kernel.org; LKML Subject: Re: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8 On Wed, Nov 07, 2007 at 01:51:44PM -0500, Salyzyn, Mark wrote: Christoph Hellwig [mailto:[EMAIL PROTECTED] sez: Did anyone run the driver through sparse to see if we have more issues like this? There are some warnings from sparse, none like this one. I will deal with the warnings ... Actually there are a lot of endianess warnings, fortunately most of them harmless. The patch below fixes all of them up (including the ones in the patch I replied to), except for aac_init_adapter which is really odd and I don't know what to do. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
Christoph Hellwig [mailto:[EMAIL PROTECTED] sez: Did anyone run the driver through sparse to see if we have more issues like this? There are some warnings from sparse, none like this one. I will deal with the warnings ... Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: don't assign cpu_to_le32(int) to u8
Good point, thanks. The intent of the management applications utilization of this AIF report is to observe the LSB of the value of integer value in BlinkLED. The actions of the cpu_to_le32 actually breaks this and reports the wrong content in swapped architectures. This attached follow-up patch is against current scsi-misc-2.6 *after* the application of the 'don't assign cpu_to_le32(constant) to u8' patch submitted by Stephen Rothwell which has already been taken by the -mm tree. Inspection of other areas of the aacraid driver came up blank for similar style bugs. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, use attachment). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/commsup.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -ru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c --- a/drivers/scsi/aacraid/commsup.c2007-11-07 10:35:16.603727464 -0500 +++ b/drivers/scsi/aacraid/commsup.c2007-11-07 10:37:50.540311107 -0500 @@ -1342,7 +1342,7 @@ aif-data[0] = AifEnExpEvent; aif-data[1] = AifExeFirmwarePanic; aif-data[2] = AifHighPriority; - aif-data[3] = cpu_to_le32(BlinkLED); + aif-data[3] = BlinkLED; /* * Put the FIB onto the Sincerely -- Mark Salyzyn -Original Message- From: Andreas Schwab [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 9:31 AM To: Stephen Rothwell Cc: AACRAID; linux-scsi@vger.kernel.org; LKML Subject: Re: [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8 Stephen Rothwell [EMAIL PROTECTED] writes: diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 240a0bb..3c2dbc0 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac) aif = (struct aac_aifcmd *)hw_fib-data; aif-command = cpu_to_le32(AifCmdEventNotify); aif-seqnum = cpu_to_le32(0x); - aif-data[0] = cpu_to_le32(AifEnExpEvent); - aif-data[1] = cpu_to_le32(AifExeFirmwarePanic); - aif-data[2] = cpu_to_le32(AifHighPriority); + aif-data[0] = AifEnExpEvent; + aif-data[1] = AifExeFirmwarePanic; + aif-data[2] = AifHighPriority; aif-data[3] = cpu_to_le32(BlinkLED); What about the last line? Andreas. aacraid_BlinkLED.patch Description: aacraid_BlinkLED.patch
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 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 02, 2007 6:12 AM To: Salyzyn, Mark; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PATCH 1/1] [Bugme-new] [Bug 9133] New: aacraid driver fails withDell PowerEdge Expandable RAID Controller 3/Di 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. Can't this be implemented? Now, we are imposing a performance hit on consumers investing on more that 4G memory. -Shyam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8
ACK v2 Sincerely -- Mark Salyzyn -Original Message- From: Stephen Rothwell [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 2:32 AM To: AACRAID Cc: linux-scsi@vger.kernel.org; LKML Subject: [PATCHv2] aacraid: don't assign cpu_to_le32(constant) to u8 Noticed on PowerPC allmod config build: drivers/scsi/aacraid/commsup.c:1342: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1343: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1344: warning: large integer implicitly truncated to unsigned type Also fix some whitespace on the changed lines. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] --- drivers/scsi/aacraid/commsup.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) This version just fixes a couple of whitespace anomolies on the lines I changed. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 240a0bb..3c2dbc0 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac) aif = (struct aac_aifcmd *)hw_fib-data; aif-command = cpu_to_le32(AifCmdEventNotify); aif-seqnum = cpu_to_le32(0x); - aif-data[0] = cpu_to_le32(AifEnExpEvent); - aif-data[1] = cpu_to_le32(AifExeFirmwarePanic); - aif-data[2] = cpu_to_le32(AifHighPriority); + aif-data[0] = AifEnExpEvent; + aif-data[1] = AifExeFirmwarePanic; + aif-data[2] = AifHighPriority; aif-data[3] = cpu_to_le32(BlinkLED); /* -- 1.5.3.4 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] aacraid: don't assign cpu_to_le32(constant) to u8
ACK Sincerely -- Mark Salyzyn -Original Message- From: Stephen Rothwell [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 31, 2007 12:02 AM To: AACRAID Cc: linux-scsi@vger.kernel.org; LKML Subject: [PATCH] aacraid: don't assign cpu_to_le32(constant) to u8 Noticed on PowerPC allmod config build: drivers/scsi/aacraid/commsup.c:1342: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1343: warning: large integer implicitly truncated to unsigned type drivers/scsi/aacraid/commsup.c:1344: warning: large integer implicitly truncated to unsigned type Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] --- drivers/scsi/aacraid/commsup.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 240a0bb..b9682a8 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1339,9 +1339,9 @@ int aac_check_health(struct aac_dev * aac) aif = (struct aac_aifcmd *)hw_fib-data; aif-command = cpu_to_le32(AifCmdEventNotify); aif-seqnum = cpu_to_le32(0x); - aif-data[0] = cpu_to_le32(AifEnExpEvent); - aif-data[1] = cpu_to_le32(AifExeFirmwarePanic); - aif-data[2] = cpu_to_le32(AifHighPriority); + aif-data[0] = AifEnExpEvent; + aif-data[1] = AifExeFirmwarePanic; + aif-data[2] = AifHighPriority; aif-data[3] = cpu_to_le32(BlinkLED); /* -- 1.5.3.4 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] drivers/scsi/dpt_i2o: Convert to generic boolean
ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Knutsson Sent: Tuesday, October 30, 2007 6:54 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; Richard Knutsson Subject: [PATCH] drivers/scsi/dpt_i2o: Convert to generic boolean Convert to use the generic boolean. Signed-off-by: Richard Knutsson [EMAIL PROTECTED] --- Diffed against linus-git Checked with script/checkpatch.pl (warned about long lines, but it is not introduced by this patch) dpt_i2o.c | 22 +++--- dpti.h|9 ++--- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 8258506..bd3a82d 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -252,7 +252,7 @@ rebuild_sys_tab: adpt_i2o_delete_hba(pHba); continue; } - pHba-initialized = TRUE; + pHba-initialized = true; pHba-state = ~DPTI_STATE_RESET; scsi_scan_host(pHba-host); } @@ -519,7 +519,7 @@ static int adpt_proc_info(struct Scsi_Host *host, char *buffer, char **start, of int unit; *start = buffer; - if (inout == TRUE) { + if (inout) { /* * The user has done a write and wants us to take the * data in the buffer and do something with it. @@ -893,7 +893,7 @@ static int adpt_install_hba(struct pci_dev* pDev) void __iomem *base_addr_virt = NULL; void __iomem *msg_addr_virt = NULL; - int raptorFlag = FALSE; + bool raptorFlag = false; if(pci_enable_device(pDev)) { return -EINVAL; @@ -926,7 +926,7 @@ static int adpt_install_hba(struct pci_dev* pDev) // Use BAR1 in this configuration base_addr1_phys = pci_resource_start(pDev,1); hba_map1_area_size = pci_resource_len(pDev,1); - raptorFlag = TRUE; + raptorFlag = true; } base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size); @@ -936,7 +936,7 @@ static int adpt_install_hba(struct pci_dev* pDev) return -EINVAL; } -if(raptorFlag == TRUE) { + if (raptorFlag) { msg_addr_virt = ioremap(base_addr1_phys, hba_map1_area_size ); if (!msg_addr_virt) { PERROR(dpti: adpt_config_hba: io remap failed on BAR1\n); @@ -996,7 +996,7 @@ static int adpt_install_hba(struct pci_dev* pDev) spin_lock_init(pHba-state_lock); spin_lock_init(adpt_post_wait_lock); - if(raptorFlag == 0){ + if (!raptorFlag) { printk(KERN_INFOAdaptec I2O RAID controller %d at %p size=%x irq=%d\n, hba_count-1, base_addr_virt, hba_map0_area_size, pDev-irq); } else { @@ -1273,7 +1273,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba) u32 m = EMPTY_QUEUE ; ulong timeout = jiffies + (TMOUT_IOPRESET*HZ); - if(pHba-initialized == FALSE) { // First time reset should be quick + if (!pHba-initialized) { /* First time reset should be quick */ timeout = jiffies + (25*HZ); } else { adpt_i2o_quiesce_hba(pHba); @@ -1576,7 +1576,7 @@ static int adpt_open(struct inode *inode, struct file *file) // return -EBUSY; // } - pHba-in_use = 1; + pHba-in_use = true; mutex_unlock(adpt_configuration_lock); return 0; @@ -1602,7 +1602,7 @@ static int adpt_close(struct inode *inode, struct file *file) return -ENXIO; } - pHba-in_use = 0; + pHba-in_use = false; return 0; } @@ -2433,8 +2433,8 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba) pDev-tid = tid; memcpy(d-lct_data, lct-lct_entry[i], sizeof(i2o_lct_entry)); if (pDev-pScsi_dev) { - pDev-pScsi_dev-changed = TRUE; - pDev-pScsi_dev-removable = TRUE; + pDev-pScsi_dev-changed = true; + pDev-pScsi_dev-removable = true; } } // Found it - mark it scanned diff --git a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h index 0892f6c..5eb7274 100644 --- a/drivers/scsi/dpti.h +++ b/drivers/scsi/dpti.h @@ -155,11 +155,6 @@ static int adpt_device_reset(struct scsi_cmnd* cmd); #define I2O_SCSI_DSC_QUEUE_FROZEN 0x4000 -#ifndef TRUE -#define TRUE
[PATCH 1/1] aacraid: forced reset override
Some 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. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] 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 aacraid_forced_reset.patch Description: aacraid_forced_reset.patch
RE: [PATCH 1/4] [SCSI] ips: remove ips_ha members that duplicate struct pci_dev members
ACK. Inspected; Mechanical, precise and no introduction of bugs. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Garzik Sent: Wednesday, October 24, 2007 7:48 PM To: LKML; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED] Subject: [PATCH 1/4] [SCSI] ips: remove ips_ha members that duplicate struct pci_dev members Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/scsi/ips.c | 178 drivers/scsi/ips.h | 20 +++ 2 files changed, 91 insertions(+), 107 deletions(-) - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 2/4] [SCSI] ips: trim trailing whitespace
ACK. Inspected; trivial, clean and no sign of any code changes. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Garzik Sent: Wednesday, October 24, 2007 7:48 PM To: LKML; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED] Subject: [PATCH 2/4] [SCSI] ips: trim trailing whitespace Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/scsi/ips.c | 44 ++-- drivers/scsi/ips.h | 12 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 3/4] [SCSI] ips: PCI API cleanups
ACK. Inspected only. Looks ok. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Garzik Sent: Wednesday, October 24, 2007 7:49 PM To: LKML; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED] Subject: [PATCH 3/4] [SCSI] ips: PCI API cleanups * pass Scsi_Host to ips_remove_device() via pci_set_drvdata(), allowing us to eliminate the ips_ha[] search loop and call ips_release() directly. * call pci_{request,release}_regions() and eliminate individual request/release_[mem_]region() calls * call pci_disable_device(), paired with pci_enable_device() * s/0/NULL/ in a few places * check ioremap() return value Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/scsi/ips.c | 72 ++- 1 files changed, 31 insertions(+), 41 deletions(-) - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 4/4] [SCSI] ips: handle scsi_add_host() failure, and other err cleanups
ACK. Inspected. cleanup with zero risk. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Garzik Sent: Wednesday, October 24, 2007 7:49 PM To: LKML; linux-scsi@vger.kernel.org Cc: [EMAIL PROTECTED] Subject: [PATCH 4/4] [SCSI] ips: handle scsi_add_host() failure, and other err cleanups Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- drivers/scsi/ips.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH -mm 11/11] aacraid: use pci_set_dma_max_seg_size
Jeff Garzik [mailto:[EMAIL PROTECTED] writes: is this needed, given that the default is already 65536? Apparently so, as we had to add it in the past, mainly because the feature to limit was not part of the SCSI layer when the original limit code was added. At that time it replaced a complicated sg breakup algorithm. Does your statement guarantee that the default will not change to a large value? If not, then we need to enforce it in perpetuity... Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH -mm 11/11] aacraid: use pci_set_dma_max_seg_size
Not requesting you to test (aacraid), just scoping any effort. The cards in question are the (old) Dell PERC variety that would trigger the need. I will notify our Dell liaison to see what they can do. Sincerely -- Mark Salyzyn -Original Message- From: FUJITA Tomonori [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2007 12:22 PM To: Salyzyn, Mark Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; AACRAID; [EMAIL PROTECTED] Subject: RE: [PATCH -mm 11/11] aacraid: use pci_set_dma_max_seg_size On Wed, 24 Oct 2007 09:34:23 -0400 Salyzyn, Mark [EMAIL PROTECTED] wrote: ACK Thanks. Based on the presence of the call. 2.6.22, for instance, does not have this capability... I did not test this change, just accepting on the principals. How much testing of the change did you do Fujita? Unfortunately, I tested only the main component (device and pci changes) with ppc64 IOMMU. I don't have the other IOMMUs. I didn't test the aacraid patch but I guess that I have aacraid in the workplace so I can test the patch (without the IOMMU chages). - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC] [PATCH 1/2] blk request timeout handler patches
ACK for the trivial portion surrounding aacraid and ips! Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, October 04, 2007 2:18 PM To: linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Subject: [RFC] [PATCH 1/2] blk request timeout handler patches Mike Christie's patches refreshed to 2.6.23-rc8-mm1. Signed-off-by: Mike Christie [EMAIL PROTECTED] Signed-off-by: Malahal Naineni [EMAIL PROTECTED] . . . diff -r 3697367c6e4d drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c Thu Sep 27 00:12:13 2007 -0700 +++ b/drivers/scsi/aacraid/aachba.c Thu Sep 27 00:13:07 2007 -0700 @@ -1125,7 +1125,7 @@ static struct aac_srb * aac_scsi_common( srbcmd-id = cpu_to_le32(scmd_id(cmd)); srbcmd-lun = cpu_to_le32(cmd-device-lun); srbcmd-flags= cpu_to_le32(flag); - timeout = cmd-timeout_per_command/HZ; + timeout = cmd-request-timeout/HZ; if (timeout == 0) timeout = 1; srbcmd-timeout = cpu_to_le32(timeout); // timeout in seconds . . . diff -r 3697367c6e4d drivers/scsi/ips.c --- a/drivers/scsi/ips.c Thu Sep 27 00:12:13 2007 -0700 +++ b/drivers/scsi/ips.c Thu Sep 27 00:13:07 2007 -0700 @@ -3862,7 +3862,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb-cmd.dcdb.segment_4G = 0; scb-cmd.dcdb.enhanced_sg = 0; - TimeOut = scb-scsi_cmd-timeout_per_command; + TimeOut = scb-scsi_cmd-request-timeout; if (ha-subsys-param[4] 0x0010) { /* If NEW Tape DCDB is Supported */ if (!scb-sg_len) { . . . - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: kdump detection in SCSI drivers
Pavel Machek sez: Other suggestion which came about was to parse the kernel command line and look for elfcorehdr=. Is this ok? Is kernel command line visible to the SCSI drivers? Kernel command line probably is visible, but I'd recommend against doing that. Probably just as pregnant of a plan, what about looking for the reset_devices being none-zero? It was introduced for kdump to address the problem with devices that maintain state outside of the driver and the intent is to have it always set in the kdump kernel context. Personally, I'd code the driver to acquire memory normally, and have a backup plan to acquire less should the allocation fail in a memory limited environment ;-/ Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: Patch added to scsi-pending-2.6: [SCSI] ips: Update version information
ACK Sincerely -- Mark Salyzyn -Original Message- From: James Bottomley [mailto:[EMAIL PROTECTED] Sent: Sunday, September 23, 2007 10:45 AM To: AACRAID; Bernhard Walle; James Bottomley Subject: Patch added to scsi-pending-2.6: [SCSI] ips: Update version information Your commit: [SCSI] ips: Update version information This patch just makes the version number in ips.c and ips.h consistent. It seems that this has been forgotten in a60768e2d43eb30a1adb8a119aeac35dc0d03ef6. It also removes code duplication, each number is now only once in the code to avoid similar errors in the future. Signed-off-by: Bernhard Walle [EMAIL PROTECTED] Cc: Mark Salyzyn [EMAIL PROTECTED] Signed-off-by: James Bottomley [EMAIL PROTECTED] has been added to the pending SCSI tree You can find it here: http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-pending-2.6.git;a=co mmit;h=7c3f6ca91cd906476274db6b9ecc536eb66fb908 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: Add documentation for new Adaptec, SMC and SUN cards
Add the SMC LP, SUN EM and Adaptec 5405 cards to the aacraid documentation list of supported products. These cards are picked up with family match, so no associated code changes. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Documentation/scsi/aacraid.txt |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) Sincerely -- Mark Salyzyn aacraid_SMC_SUN.patch Description: aacraid_SMC_SUN.patch
RE: [PATCH] add use_sg_chaining option to scsi_host_template
ACK aacraid portion (for what it is worth). Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of FUJITA Tomonori Sent: Thursday, August 16, 2007 12:48 PM To: [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PATCH] add use_sg_chaining option to scsi_host_template . . . diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a7f42a1..038980b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -944,6 +944,7 @@ static struct scsi_host_template aac_driver_template = { .cmd_per_lun= AAC_NUM_IO_FIB, #endif .use_clustering = ENABLE_CLUSTERING, + .use_sg_chaining= ENABLE_SG_CHAINING, .emulated = 1, }; . . . diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 3b8a6a8..cbb5217 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -36,6 +36,9 @@ struct blk_queue_tags; #define DISABLE_CLUSTERING 0 #define ENABLE_CLUSTERING 1 +#define DISABLE_SG_CHAINING 0 +#define ENABLE_SG_CHAINING 1 + enum scsi_eh_timer_return { EH_NOT_HANDLED, EH_HANDLED, @@ -438,6 +441,15 @@ struct scsi_host_template { unsigned ordered_tag:1; /* + * true if the low-level driver can support sg chaining. this + * will be removed eventually when all the drivers are + * converted to support sg chaining. + * + * Status: OBSOLETE + */ + unsigned use_sg_chaining:1; + + /* * Countdown for host blocking with no commands outstanding */ unsigned int max_host_blocked; @@ -580,6 +592,7 @@ struct Scsi_Host { unsigned unchecked_isa_dma:1; unsigned use_clustering:1; unsigned use_blk_tcq:1; + unsigned use_sg_chaining:1; /* * Host has requested that no further requests come through for the - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [19/2many] MAINTAINERS - IPS SCSI RAID DRIVER
ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 2:22 AM To: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; AACRAID Subject: [PATCH] [19/2many] MAINTAINERS - IPS SCSI RAID DRIVER Add file pattern to MAINTAINER entry Signed-off-by: Joe Perches [EMAIL PROTECTED] diff --git a/MAINTAINERS b/MAINTAINERS index 141b08a..71e09b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -224,6 +224,7 @@ M:[EMAIL PROTECTED] L: linux-scsi@vger.kernel.org W: http://www.adaptec.com/ S: Maintained +F: drivers/scsi/ips* DPT_I2O SCSI RAID DRIVER P: Adaptec OEM Raid Solutions - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER
ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 2:22 AM To: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; AACRAID Subject: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER Add file pattern to MAINTAINER entry Signed-off-by: Joe Perches [EMAIL PROTECTED] diff --git a/MAINTAINERS b/MAINTAINERS index 7d58f6b..1162fb7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -241,6 +241,7 @@ M:[EMAIL PROTECTED] L: linux-scsi@vger.kernel.org W: http://www.adaptec.com/ S: Supported +F: drivers/scsi/aacraid/ ACPI P: Len Brown - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [20/2many] MAINTAINERS - DPT_I2O SCSI RAID DRIVER
ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 2:22 AM To: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; AACRAID Subject: [PATCH] [20/2many] MAINTAINERS - DPT_I2O SCSI RAID DRIVER Add file pattern to MAINTAINER entry Signed-off-by: Joe Perches [EMAIL PROTECTED] diff --git a/MAINTAINERS b/MAINTAINERS index 71e09b7..7d58f6b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -232,6 +232,8 @@ M:[EMAIL PROTECTED] L: linux-scsi@vger.kernel.org W: http://www.adaptec.com/ S: Maintained +F: drivers/scsi/dpt* +F: drivers/scsi/dpt/ AACRAID SCSI RAID DRIVER P: Adaptec OEM Raid Solutions - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER
Second thoughts ... Add the documentation file as well. F: drivers/scsi/aacraid/ +F: Documentation/scsi/aacraid.txt Sincerely -- Mark Salyzyn -Original Message- From: Salyzyn, Mark Sent: Monday, August 13, 2007 9:34 AM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; 'linux-scsi@vger.kernel.org'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; AACRAID Subject: RE: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER ACK Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 2:22 AM To: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; AACRAID Subject: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER Add file pattern to MAINTAINER entry Signed-off-by: Joe Perches [EMAIL PROTECTED] diff --git a/MAINTAINERS b/MAINTAINERS index 7d58f6b..1162fb7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -241,6 +241,7 @@ M: [EMAIL PROTECTED] L: linux-scsi@vger.kernel.org W: http://www.adaptec.com/ S: Supported +F: drivers/scsi/aacraid/ ACPI P: Len Brown - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER
Please do not collapse AACRAID with DPT_I2O and IPS yet. IMHO Just because today the maintainer email is the same is not a reason to collapse, I am only 'paid' to look after aacraid and that one is provided continued Adaptec support, the others are legacy and maintenance-only. Sincerely -- Mark Salyzyn -Original Message- From: Joe Perches [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 1:20 PM To: Salyzyn, Mark Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PATCH] [21/2many] MAINTAINERS - AACRAID SCSI RAID DRIVER On Mon, 2007-08-13 at 10:16 -0400, Salyzyn, Mark wrote: Second thoughts ... Add the documentation file as well. +F: Documentation/scsi/aacraid.txt AACRAID SCSI RAID DRIVER P:Adaptec OEM Raid Solutions M:[EMAIL PROTECTED] L:linux-scsi@vger.kernel.org W:http://www.adaptec.com/ S:Supported F:Documentation/scsi/aacraid.txt F:drivers/scsi/aacraid/ Maybe all 3 entries should be collapsed into ADAPTEC SCSI RAID (AACRAID, DPT_I2O, IPS)? P:Adaptec OEM Raid Solutions M:[EMAIL PROTECTED] L:linux-scsi@vger.kernel.org W:http://www.adaptec.com/ S:Supported F:Documentation/scsi/aacraid.txt F:drivers/scsi/aacraid/ - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: default timeout for arrays too short
The default SCSI timeout is 30 seconds for a logical device. The aacraid based controllers currently have a 35 second timeout for the array. We are bumping up the default SCSI timeout for array devices, which typically manage many physical disks, to 45 seconds to provide a small margin to permit the controller to do what it is designed for. We have not observed any bad side-effects either way because no significant actions are taken by the aacraid timeout handler except to take advantage of the quiesced state to allow completion of all outstanding commands in the controller to provide a poor-mans guaranty of delivery. This is merely a preferential decision to reduce the number of timeout reports in the system logs to only the more serious conditions. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c |6 ++ 1 file changed, 6 insertions(+) Sincerely -- Mark Salyzyn aacraid_array_timeout_too_short.patch Description: aacraid_array_timeout_too_short.patch
[PATCH 1/1] aacraid: prevent panic on adapter resource failure
If the driver fails to allocate the contiguous (DMAable) memory for system reasons, we fail to load the instance, but then we try to free the nul allocation in the cleanup code and we get a panic in pci_free_consistent(). This is reported against an older kernel, hope this is relevant for latest/greatest. This attached patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Sincerely -- Mark Salyzyn aacraid_fail_to_load_panic.patch Description: aacraid_fail_to_load_panic.patch
RE: [PATCH] dpt_i2o: convert to SCSI hotplug model
ACK! Sincerely -- Mark Salyzyn -Original Message- From: Matthew Wilcox [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 5:19 PM To: AACRAID; linux-scsi@vger.kernel.org Subject: [PATCH] dpt_i2o: convert to SCSI hotplug model dpt_i2o: Convert to new SCSI driver model - Delete refereces to HOSTS_C - Switch to module_init/module_exit instead of detect/release - Don't pass around the host template and rename it to adpt_template - Switch from scsi_register/scsi_unregister to scsi_host_alloc, scsi_add_host, scsi_scan_host and scsi_host_put. - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 21] drivers/scsi/dpt_i2o.c: kmalloc + memset conversion to kzalloc
ACK Looks good and ultra-light on side effects! Sincerely -- Mark Salyzyn -Original Message- From: Mariusz Kozlowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 1:35 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Andrew Morton; linux-scsi@vger.kernel.org; AACRAID Subject: [PATCH 21] drivers/scsi/dpt_i2o.c: kmalloc + memset conversion to kzalloc Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED] drivers/scsi/dpt_i2o.c | 87632 - 87457 (-175 bytes) drivers/scsi/dpt_i2o.o | 213064 - 212324 (-740 bytes) drivers/scsi/dpt_i2o.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] aacraid: draw line in sand, sundry cleanup and version update
Minor unimportant cuttings from the floor bundled in with a version stamp update. Only controversial change is the dropping of Alan Cox copyright on the nark.c module since that file has no code written by him in it. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |3 +-- drivers/scsi/aacraid/aacraid.h |6 +++--- drivers/scsi/aacraid/linit.c |3 +-- drivers/scsi/aacraid/nark.c|3 +-- drivers/scsi/aacraid/rkt.c |2 +- 5 files changed, 7 insertions(+), 10 deletions(-) Sincerely -- Mark Salyzyn aacraid_cleanup_2449.patch Description: aacraid_cleanup_2449.patch
RE: [PATCH] aacraid: Resend, Fix security hole
ACK. Unit tested with Adaptec RAID management applications with apparently no issue. Will push this into matrix testing in the coming week. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Cox Sent: Monday, July 23, 2007 9:51 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; linux-scsi@vger.kernel.org Subject: [PATCH] aacraid: Resend, Fix security hole On the SCSI layer ioctl path there is no implicit permissions check for ioctls (and indeed other drivers implement unprivileged ioctls). aacraid however allows all sorts of very admin only things to be done so should check. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1/drivers/scsi/aacraid/linit.c linux-2.6.23rc1/drivers/scsi/aacraid/linit.c --- linux.vanilla-2.6.23rc1/drivers/scsi/aacraid/linit.c 2007-07-23 12:56:12.0 +0100 +++ linux-2.6.23rc1/drivers/scsi/aacraid/linit.c 2007-07-23 12:57:45.0 +0100 @@ -636,6 +636,8 @@ static int aac_cfg_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; return aac_do_ioctl(file-private_data, cmd, (void __user *)arg); } @@ -689,6 +691,8 @@ static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg) { + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; return aac_compat_do_ioctl((struct aac_dev *)file-private_data, cmd, arg); } #endif - - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] aacraid: sysfs adapter reset/status format change.
We need to newline terminate responses from nodes within the sysfs tree, the Adapter status value reported by the reset adapter node is adjusted. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/linit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Sincerely -- Mark Salyzyn aacraid_adapter_status_format_change.patch Description: aacraid_adapter_status_format_change.patch
[PATCH] aacraid: correct valid container response in management ioctl
During an Adapter Initiated scan request, the query disk ioctl reports a value of 2 rather than 1 for the valid field. This presents a problem for some legacy management applications. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Sincerely -- Mark Salyzyn aacraid_valid_check.patch Description: aacraid_valid_check.patch
[PATCH] aacraid: incorrect dma mapping mask during blinkled recover or user initiated reset
Incorrect dma mask was used for blinkled (firmware assert) recovery or user initiated reset during initialization portion. Ensure that all callers of aac_fib_map_free null out the fib allocation references to prevent multiple free. Although serious sounding, no reports of these problems have surfaced... This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/commsup.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) Sincerely -- Mark Salyzyn aacraid_mapping_failure.patch Description: aacraid_mapping_failure.patch
[PATCH] aacraid: add vpd to inquiry
Report VPD inquiry page 0x80 with an unique array creation serial number (CUID). When an array is created, the metadata stored on the physical drives gets an unique serial number. This serial number remains constant through array morphing or migration to other controllers. This patch is a forward port and modification to survive morphing and migration operations, of a similar piece of (un-attributed author) code added to the SLES10 SP1 aacraid driver. To test the results of the patch, observe that /dev/disk/by-id/ entries will show up for the arrays resulting from the udev rules. Also, as per the udev rules, 'scsi_id -g -x -a -s /block/sd? -d /dev/sd?' will report the ID_SERIAL as constructed from the inquiry data. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 136 + drivers/scsi/aacraid/aacraid.h | 14 2 files changed, 150 insertions(+) Sincerely -- Mark Salyzyn aacraid_vpd.patch Description: aacraid_vpd.patch
RE: [patch 01/17] aacraid: rename check_reset
ACK (well, I'd prefer aac_check_reset over aacraid_check_reset, but no matter). Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 3:00 PM To: [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]; AACRAID Subject: [patch 01/17] aacraid: rename check_reset From: Andrew Morton [EMAIL PROTECTED] Too generic, clashes with ISDN. Cc: Mark Salyzyn [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/scsi/aacraid/aachba.c |8 drivers/scsi/aacraid/aacraid.h |2 +- drivers/scsi/aacraid/commsup.c |5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff -puN drivers/scsi/aacraid/aachba.c~aacraid-rename-check_reset drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c~aacraid-rename-check_reset +++ a/drivers/scsi/aacraid/aachba.c @@ -177,9 +177,9 @@ int check_interval = 24 * 60 * 60; module_param(check_interval, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(check_interval, Interval in seconds between adapter health checks.); -int check_reset = 1; -module_param(check_reset, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(check_reset, If adapter fails health check, reset the adapter.); +int aacraid_check_reset = 1; +module_param_named(check_reset, aacraid_check_reset, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(aacraid_check_reset, If adapter fails health check, reset the adapter.); int expose_physicals = -1; module_param(expose_physicals, int, S_IRUGO|S_IWUSR); @@ -1211,7 +1211,7 @@ int aac_get_adapter_info(struct aac_dev* (int)sizeof(dev-supplement_adapter_info.VpdInfo.Tsid), dev-supplement_adapter_info.VpdInfo.Tsid); } - if (!check_reset || + if (!aacraid_check_reset || (dev-supplement_adapter_info.SupportedOptions2 le32_to_cpu(AAC_OPTION_IGNORE_RESET))) { printk(KERN_INFO %s%d: Reset Adapter Ignored\n, diff -puN drivers/scsi/aacraid/aacraid.h~aacraid-rename-check_reset drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h~aacraid-rename-check_reset +++ a/drivers/scsi/aacraid/aacraid.h @@ -1857,4 +1857,4 @@ extern int aac_reset_devices; extern int aac_commit; extern int update_interval; extern int check_interval; -extern int check_reset; +extern int aacraid_check_reset; diff -puN drivers/scsi/aacraid/commsup.c~aacraid-rename-check_reset drivers/scsi/aacraid/commsup.c --- a/drivers/scsi/aacraid/commsup.c~aacraid-rename-check_reset +++ a/drivers/scsi/aacraid/commsup.c @@ -1370,8 +1370,9 @@ int aac_check_health(struct aac_dev * aa printk(KERN_ERR %s: Host adapter BLINK LED 0x%x\n, aac-name, BlinkLED); - if (!check_reset || (aac-supplement_adapter_info.SupportedOptions2 - le32_to_cpu(AAC_OPTION_IGNORE_RESET))) + if (!aacraid_check_reset || + (aac-supplement_adapter_info.SupportedOptions2 + le32_to_cpu(AAC_OPTION_IGNORE_RESET))) goto out; host = aac-scsi_host_ptr; if (aac-thread-pid != current-pid) _ - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] aacraid: add cpu cache flush after kmapping and modifying a page
Updated patch to address overlap with patches introduced by FUJITA Tomonori [EMAIL PROTECTED]. Tejun, please inspect. This attached aacraid specific portion of the patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch content. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salyzyn, Mark Sent: Tuesday, May 29, 2007 12:54 PM To: James Bottomley; Tejun Heo Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH 4/5] SCSI: add cpu cache flushes after kmapping and modifying a page What ever became of the following patch? I have enclosed the incremental aacraid version of this patch to permit closure if the following was rejected because of another portion. This attached aacraid specific portion of the patch is against current scsi-misc-2.6. ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch content. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tejun Heo Sent: Saturday, June 03, 2006 11:41 PM To: Jens Axboe; James Bottomley; Dave Miller; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Guennadi Liakhovetski; [EMAIL PROTECTED]; lkml; [EMAIL PROTECTED]; linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Cc: Tejun Heo Subject: [PATCH 4/5] SCSI: add cpu cache flushes after kmapping and modifying a page Add calls to flush_kernel_dcache_page() after CPU has kmapped and modified a page. This fixes PIO cache coherency bugs on architectures with aliased caches. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/scsi/3w-9xxx.c|1 + drivers/scsi/3w-.c|1 + drivers/scsi/aacraid/aachba.c |4 +++- drivers/scsi/ide-scsi.c |1 + drivers/scsi/ips.c|2 ++ drivers/scsi/iscsi_tcp.c |1 + drivers/scsi/megaraid.c |2 ++ drivers/scsi/qlogicpti.c |1 + drivers/scsi/scsi_debug.c |1 + drivers/scsi/scsi_lib.c |1 + 10 files changed, 14 insertions(+), 1 deletions(-) 9b4bdd1409efb726d4a6561a4f7e2aff878ab4f4 diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index caeb6d2..172f16b 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -1948,6 +1948,7 @@ static void twa_scsiop_execute_scsi_comp local_irq_save(flags); buf = kmap_atomic(sg-page, KM_IRQ0) + sg-offset; memcpy(buf, tw_dev-generic_buffer_virt[request_id], sg-length); + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); kunmap_atomic(buf - sg-offset, KM_IRQ0); local_irq_restore(flags); } diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c index e8e41e6..8449551 100644 --- a/drivers/scsi/3w-.c +++ b/drivers/scsi/3w-.c @@ -1527,6 +1527,7 @@ static void tw_transfer_internal(TW_Devi struct scatterlist *sg; sg = (struct scatterlist *)cmd-request_buffer; + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); kunmap_atomic(buf - sg-offset, KM_IRQ0); local_irq_restore(flags); } diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 642a3b4..b7c00b8 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -376,8 +376,10 @@ static void aac_internal_transfer(struct memcpy(buf + offset, data, transfer_len - offset); - if (scsicmd-use_sg) + if (scsicmd-use_sg) { + flush_kernel_dcache_page(kmap_atomic_to_page(buf - sg-offset)); kunmap_atomic(buf - sg-offset, KM_IRQ0); + } } diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 39b760a..9c28b95 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -189,6 +189,7 @@ static void idescsi_input_buffers (ide_d pc-sg-offset; drive-hwif-atapi_input_bytes(drive, buf + pc-b_count, count); + flush_kernel_dcache_page(kmap_atomic_to_page(buf - pc-sg-offset)); kunmap_atomic(buf - pc-sg-offset, KM_IRQ0); local_irq_restore(flags); } else { diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index a4c0b04..29eb3f0 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -3682,6 +3682,8 @@ ips_scmd_buf_write(Scsi_Cmnd * scmd, voi local_irq_save
[PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking (take 2)
There was some overlap with another patch (?) this one has not shown in scsi-pending-2.6. Modernized to apply cleanly and did some extra cleanup. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 63 -- 1 file changed, 55 insertions(+), 8 deletions(-) Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Salyzyn, Mark Sent: Thursday, June 07, 2007 1:21 PM To: linux-scsi@vger.kernel.org Subject: [PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking. Customer running an application that issues SYNCHRONIZE_CACHE calls directly noticed the broad stroke of the current implementation in the aacraid driver resulting in multiple applications feeding I/O to the storage causing the issuing application to stall for long periods of time. By only waiting for the current WRITE commands, rather than all commands, to complete; and those that are in range of the SYNCHRONIZE_CACHE call that would associate more tightly with the issuing application before telling the Firmware to flush it's dirty cache, we managed to reduce the stalling. The Firmware itself still flushes all the dirty cache associated with the array ignoring the range, it just does so in a more timely manner. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Sincerely -- Mark Salyzyn aacraid_synch_range2.patch Description: aacraid_synch_range2.patch
[PATCH] aacraid: change srb status busy return
This patch is more like a spelling correction than a fix. It was discovered that if we had a busy status return from the Adapter for the SCSI srb command to a physical component, that we returned DID_NO_CONNECT rather than what one would expect DID_BUS_BUSY. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) aacraid_srb_status_busy.patch Description: aacraid_srb_status_busy.patch
[PATCH] aacraid: add support for long serial number information
Support displaying long serial number information. Reuse sysfs handler internally as helper. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c |9 + drivers/scsi/aacraid/aacraid.h |4 drivers/scsi/aacraid/linit.c | 12 +--- 3 files changed, 18 insertions(+), 7 deletions(-) aacraid_serial_number.patch Description: aacraid_serial_number.patch
RE: [PATCH] aacraid: change srb status busy return
James Bottomley mailto:[EMAIL PROTECTED] sez: On Tue, 2007-06-19 at 11:41 -0400, Salyzyn, Mark wrote: It was discovered that if we had a busy status return from the Adapter for the SCSI srb command to a physical component, that we returned DID_NO_CONNECT rather than what one would expect DID_BUS_BUSY. Are you sure you want DID_BUS_BUSY? I'm just asking because I'm not sure of the firmware ramifications. DID_BUS_BUSY will turn the command around for an immediate retry. If there's a firmware resource issue, you should return something like DID_REQUEUE which will throttle the queue and reissue this command when another one returns. Thanks for noting this. I believe that this is the behavior we want. This is related to a SCSI pass-through to the physical targets. I see no dummied-up returns of SRB_STATUS_BUSY from the top all the way down to the CHIM. This is a report from the physical bus or end device and thus does not represent an Adapter resource limit. Immediate re-queuing is indicated. I noticed this issue when we were talking internally about mitigating the sequential queuing of commands to SATA ATAPI devices at the CHIM level. A long command (erase CD for example) issued by an application was followed by a test unit ready with a short timeout issued by the Linux device class layer for media checking and we ended up timing out the test unit ready. I had suggested, in violation of the sat specification, to return the test unit ready with SRB_STATUS_BUSY when timed out prior to even making it to the physical transport while sitting in the sequential queue. Thus I noticed the shortcoming in the driver regarding the recent ( 2.6.10) addition of this return value. The CHIM folks balked at a spoofed SRB_STATUS_BUSY response. Even though the workaround was not accepted, this scenario would still be acceptable for immediate re-queuing. Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ips: convert to use the data buffer accessors
ACK Sincerely -- Mark Salyzyn -Original Message- From: FUJITA Tomonori [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 10:27 AM To: [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org; Salyzyn, Mark Subject: [PATCH] ips: convert to use the data buffer accessors - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] i2o: convert to use the data buffer accessors
Since Markus removed himself from the maintenance of this driver ... I will offer my ACK if he is truly absent since this driver is apparently primarily in support of the legacy Babylon class of I2O adapters from DPT and Adaptec. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of FUJITA Tomonori Sent: Wednesday, June 13, 2007 11:41 AM To: [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org Subject: [PATCH] i2o: convert to use the data buffer accessors - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] aacraid: probe related code cleanup
Sundry cleanups: 1) Use kzalloc instead of kmalloc. 2) Make sure probe worked before recalling the SCSI command to finalize processing. 3) _aac_probe_container2 and _aac_probe_container1 return value goes unused, change return to void. 4) Use a lower depth pointer reference to pick up the driver instance variable. 5) Although effectively unused except to fake for scsicmd validity, set the scsi_done in probe code to aac_probe_container_callback1 instead of the less valid dummy reference to _aac_probe_container1. 6) SCp.phase is set in aac_valid_context, drop setting up this value in caller when unnecessary. 7) take container target id at the beginning, rather than referencing scmd_id() to pick it up. There should be no side effects or functionality changes. This attached patch is against current scsi-misc-2.6, scsi-rc-fixes-2.6 scsi-pending-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] drivers/scsi/aacraid/aachba.c | 64 ++- 1 file changed, 31 insertions(+), 33 deletions(-) aacraid_probe_cleanup.patch Description: aacraid_probe_cleanup.patch
[PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking.
Customer running an application that issues SYNCHRONIZE_CACHE calls directly noticed the broad stroke of the current implementation in the aacraid driver resulting in multiple applications feeding I/O to the storage causing the issuing application to stall for long periods of time. By only waiting for the current WRITE commands, rather than all commands, to complete; and those that are in range of the SYNCHRONIZE_CACHE call that would associate more tightly with the issuing application before telling the Firmware to flush it's dirty cache, we managed to reduce the stalling. The Firmware itself still flushes all the dirty cache associated with the array ignoring the range, it just does so in a more timely manner. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Sincerely -- Mark Salyzyn aacraid_synch_range.patch Description: aacraid_synch_range.patch
RE: [PATCH] aacraid: fix shutdown handler to also disable interrupts.
Yes, this patch makes sure that the Adapter is shut down correctly, and thus when the kexec driver loads, it does not automatically reset the adapter during initialization. This regression was a result of adding code to the driver to detect if the adapter needed a reset as a result of an unclean shutdown in order to deal with an issue that came up with kdump. Kdump does not issue a clean shutdown. As you see, it was the process of making the driver smarter to find out if it needed to reset the adaptec fw that triggered the problem. As noted before, please be advised to go through SUN channels. Upgrade your Drive(s), SES, Motherboard and Card Firmware to the latest versions; and make sure you are using compatible drives and drive bays to see if this problem dealing with the superfluous reset on your pre-release system goes away. You will be able to trigger this by trying to perform a kdump on the system, OR by reverting this patch and running your kexec test. The superfluous reset has yet to cause an issue with a released card beyond noticing a superfluous Firmware reset as Vivek has pointed out. Sincerely -- Mark Salyzyn From: Yinghai Lu [mailto:[EMAIL PROTECTED] sez: On 6/1/07, Vivek Goyal [EMAIL PROTECTED] wrote: Thanks Mark. This does fix the issue of unnecessary reset of aacraid adapter over kexec on my machine. i'm little confused about that. this patch is some clear shutdown, so even next start will have tight condition will not try to reset the adapter fw. right Mark? Maybe the driver could be smart to find out if it need to reset adaptec fw. YH - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: kexec and aacraid broken
No, still get adapter kernel panic Which adapter are you using? Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 14/19] aacraid: remove the non-use-sg case
ACK, inspected and compile tested. Sincerely -- Mark Salyzyn -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of FUJITA Tomonori Sent: Saturday, May 12, 2007 6:06 AM To: Salyzyn, Mark Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Subject: [PATCH 14/19] aacraid: remove the non-use-sg case This removes the non-use-sg case. Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED] --- drivers/scsi/aacraid/aachba.c | 64 - 1 files changed, 6 insertions(+), 58 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 1e82c69..5cdfea3 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -343,19 +343,14 @@ static void aac_internal_transfer(struct unsigned int transfer_len; struct scatterlist *sg = scsicmd-request_buffer; - if (scsicmd-use_sg) { - buf = kmap_atomic(sg-page, KM_IRQ0) + sg-offset; - transfer_len = min(sg-length, len + offset); - } else { - buf = scsicmd-request_buffer; - transfer_len = min(scsicmd-request_bufflen, len + offset); - } + buf = kmap_atomic(sg-page, KM_IRQ0) + sg-offset; + transfer_len = min(sg-length, len + offset); + transfer_len -= offset; if (buf transfer_len) memcpy(buf + offset, data, transfer_len); - if (scsicmd-use_sg) - kunmap_atomic(buf - sg-offset, KM_IRQ0); + kunmap_atomic(buf - sg-offset, KM_IRQ0); } @@ -1374,10 +1369,7 @@ static void io_callback(void *context, s (struct scatterlist *)scsicmd-request_buffer, scsicmd-use_sg, scsicmd-sc_data_direction); - else if(scsicmd-request_bufflen) - pci_unmap_single(dev-pdev, scsicmd-SCp.dma_handle, - scsicmd-request_bufflen, - scsicmd-sc_data_direction); + readreply = (struct aac_read_reply *)fib_data(fibptr); if (le32_to_cpu(readreply-status) == ST_OK) scsicmd-result = DID_OK 16 | COMMAND_COMPLETE 8 | SAM_STAT_GOOD; @@ -2152,9 +2144,6 @@ static void aac_srb_callback(void *conte (struct scatterlist *)scsicmd-request_buffer, scsicmd-use_sg, scsicmd-sc_data_direction); - else if(scsicmd-request_bufflen) - pci_unmap_single(dev-pdev, scsicmd-SCp.dma_handle, scsicmd-request_bufflen, - scsicmd-sc_data_direction); /* * First check the fib status @@ -2375,18 +2364,6 @@ static unsigned long aac_build_sg(struct byte_count, scsicmd-underflow); } } - else if(scsicmd-request_bufflen) { - u32 addr; - scsicmd-SCp.dma_handle = pci_map_single(dev-pdev, - scsicmd-request_buffer, - scsicmd-request_bufflen, - scsicmd-sc_data_direction); - addr = scsicmd-SCp.dma_handle; - psg-count = cpu_to_le32(1); - psg-sg[0].addr = cpu_to_le32(addr); - psg-sg[0].count = cpu_to_le32(scsicmd-request_bufflen); - byte_count = scsicmd-request_bufflen; - } return byte_count; } @@ -2435,18 +2412,6 @@ static unsigned long aac_build_sg64(stru byte_count, scsicmd-underflow); } } - else if(scsicmd-request_bufflen) { - scsicmd-SCp.dma_handle = pci_map_single(dev-pdev, - scsicmd-request_buffer, - scsicmd-request_bufflen, - scsicmd-sc_data_direction); - addr = scsicmd-SCp.dma_handle; - psg-count = cpu_to_le32(1); - psg-sg[0].addr[0] = cpu_to_le32(addr 0x); - psg-sg[0].addr[1] = cpu_to_le32(addr 32); - psg-sg[0].count = cpu_to_le32(scsicmd-request_bufflen); - byte_count = scsicmd-request_bufflen; - } return byte_count; } @@ -2464,6 +2429,7 @@ static unsigned long aac_build_sgraw(str psg-sg[0].addr[1] = 0; psg-sg[0].count = 0; psg-sg[0].flags = 0; + if (scsicmd-use_sg) { struct scatterlist *sg; int i; @@ -2499,24 +2465,6 @@ static unsigned long aac_build_sgraw(str byte_count, scsicmd-underflow); } } - else if(scsicmd-request_bufflen) { - int count; - u64 addr; - scsicmd-SCp.dma_handle = pci_map_single(dev-pdev, - scsicmd-request_buffer, - scsicmd-request_bufflen
RE: [PATCH 15/19] aacraid: convert to use the data buffer accessors
ACK Inspected and compile tested Sincerely -- Mark Salyzyn -Original Message- From: FUJITA Tomonori [mailto:[EMAIL PROTECTED] Sent: Saturday, May 12, 2007 6:06 AM To: Salyzyn, Mark Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED] Subject: [PATCH 15/19] aacraid: convert to use the data buffer accessors This converts aacraid to use the data buffer accessors. Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED] --- drivers/scsi/aacraid/aachba.c | 96 +--- 1 files changed, 41 insertions(+), 55 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 5cdfea3..813f89f 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -341,7 +341,7 @@ static void aac_internal_transfer(struct { void *buf; unsigned int transfer_len; - struct scatterlist *sg = scsicmd-request_buffer; + struct scatterlist *sg = scsi_sglist(scsicmd); buf = kmap_atomic(sg-page, KM_IRQ0) + sg-offset; transfer_len = min(sg-length, len + offset); @@ -1033,7 +1033,7 @@ static int aac_scsi_64(struct fib * fib, struct aac_srb * srbcmd = aac_scsi_common(fib, cmd); aac_build_sg64(cmd, (struct sgmap64*) srbcmd-sg); - srbcmd-count = cpu_to_le32(cmd-request_bufflen); + srbcmd-count = cpu_to_le32(scsi_bufflen(cmd)); memset(srbcmd-cdb, 0, sizeof(srbcmd-cdb)); memcpy(srbcmd-cdb, cmd-cmnd, cmd-cmd_len); @@ -1061,7 +1061,7 @@ static int aac_scsi_32(struct fib * fib, struct aac_srb * srbcmd = aac_scsi_common(fib, cmd); aac_build_sg(cmd, (struct sgmap*)srbcmd-sg); - srbcmd-count = cpu_to_le32(cmd-request_bufflen); + srbcmd-count = cpu_to_le32(scsi_bufflen(cmd)); memset(srbcmd-cdb, 0, sizeof(srbcmd-cdb)); memcpy(srbcmd-cdb, cmd-cmnd, cmd-cmd_len); @@ -1363,12 +1363,8 @@ static void io_callback(void *context, s } BUG_ON(fibptr == NULL); - - if(scsicmd-use_sg) - pci_unmap_sg(dev-pdev, - (struct scatterlist *)scsicmd-request_buffer, - scsicmd-use_sg, - scsicmd-sc_data_direction); + + scsi_dma_unmap(dev-pdev-dev, scsicmd); readreply = (struct aac_read_reply *)fib_data(fibptr); if (le32_to_cpu(readreply-status) == ST_OK) @@ -2135,15 +2131,11 @@ static void aac_srb_callback(void *conte /* * Calculate resid for sg */ - - scsicmd-resid = scsicmd-request_bufflen - + + scsi_resid(scsicmd) = scsi_bufflen(scsicmd) - le32_to_cpu(srbreply-data_xfer_length); - if(scsicmd-use_sg) - pci_unmap_sg(dev-pdev, - (struct scatterlist *)scsicmd-request_buffer, - scsicmd-use_sg, - scsicmd-sc_data_direction); + scsi_dma_unmap(dev-pdev-dev, scsicmd); /* * First check the fib status @@ -2329,34 +2321,33 @@ static unsigned long aac_build_sg(struct { struct aac_dev *dev; unsigned long byte_count = 0; + int nseg; dev = (struct aac_dev *)scsicmd-device-host-hostdata; // Get rid of old data psg-count = 0; psg-sg[0].addr = 0; - psg-sg[0].count = 0; - if (scsicmd-use_sg) { + psg-sg[0].count = 0; + + nseg = scsi_dma_map(dev-pdev-dev, scsicmd); + BUG_ON(nseg 0); + if (nseg) { struct scatterlist *sg; int i; - int sg_count; - sg = (struct scatterlist *) scsicmd-request_buffer; - sg_count = pci_map_sg(dev-pdev, sg, scsicmd-use_sg, - scsicmd-sc_data_direction); - psg-count = cpu_to_le32(sg_count); + psg-count = cpu_to_le32(nseg); - for (i = 0; i sg_count; i++) { + scsi_for_each_sg(scsicmd, sg, nseg, i) { psg-sg[i].addr = cpu_to_le32(sg_dma_address(sg)); psg-sg[i].count = cpu_to_le32(sg_dma_len(sg)); byte_count += sg_dma_len(sg); - sg++; } /* hba wants the size to be exact */ - if(byte_count scsicmd-request_bufflen){ - u32 temp = le32_to_cpu(psg-sg[i-1].count) - - (byte_count - scsicmd-request_bufflen); + if (byte_count scsi_bufflen(scsicmd)) { + u32 temp = le32_to_cpu(psg-sg[i-1].count) - + (byte_count - scsi_bufflen(scsicmd)); psg-sg[i-1].count = cpu_to_le32(temp); - byte_count = scsicmd-request_bufflen; + byte_count = scsi_bufflen(scsicmd); } /* Check for command underflow */ if(scsicmd-underflow (byte_count scsicmd-underflow)){ @@ -2373,6
RE: kexec and aacraid broken
A. explains why I am having troubles duping this issue thus far. This is prerelease Firmware on a yet to be released card and thus should not get any driver workarounds if this issue can be resolved in Firmware. If this can be duped on a released card with released Firmware, then the story changes of course; but still does not preclude a Firmware/Hardware/Drive Compatibility bug ;-} . Until then, please work this issue via SUN channels so that we get all the necessary card debug information for our teams to work this. I will ensure Adaptec will remain on top of this issue since it is clearly a problem with the Adapter Hardware interfacing. The adapter is not surviving an IOP_RESET and is going into an Adapter Firmware Kernel Panic or taking an excessively long period (in the testing thus far 540 seconds) of time to complete it's reset. Sincerely -- Mark Salyzyn Yinghai Lu [mailto:[EMAIL PROTECTED] sez: SUN coguar with 11731 On 5/31/07, Salyzyn, Mark [EMAIL PROTECTED] wrote: No, still get adapter kernel panic Which adapter are you using? - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: kexec and aacraid broken
I believe this issue is a result of the aacraid_commit_reset patch (as posted for scsi-misc-2.6, enclosed to permit testing) not yet propagated to the 2.6.22-rc3 tree. This is the adapter taking longer than 3 minutes to start after a reset. I seriously doubt either of these patches suggested below will have an affect. And if they do, they are not root cause, one reduces the chances that the card will be reset during initialization (thus applied would likely mitigate this problem), the other prevents a panic when the Adapter is reset (removed, would result in dogs and cats sleeping with each other). Please use kernel parameter aacraid.startup_timeout=540 (merely larger than the default 180 seconds) when spawning the kexec or see if the aacraid_commit_reset.patch resolves the issue to confirm my hunch. Sincerely -- Mark Salyzyn -Original Message- From: Andrew Morton [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 29, 2007 10:14 PM To: Yinghai Lu Cc: Vivek Goyal; Eric W. Biederman; AACRAID; Linux Kernel Mailing List; linux-scsi@vger.kernel.org; Michal Piotrowski Subject: Re: kexec and aacraid broken On Tue, 29 May 2007 18:59:32 -0700 Yinghai Lu [EMAIL PROTECTED] wrote: latest tree, can not use kexec to load 2.6.22-rc3 at least. got: AAC0: adapter kernel panic'd fffd AAC0: adapter kernel failed to start, init status=0 One of the two diffs below, I guess. Please do a `patch -R -p1' of this email and retest? but can load 2.6.21.3 Michal, can you please add this to the regression list? commit 9e4d4a5d71d673901d9c1df5146ce545c2cc0cc0 Author: Salyzyn, Mark [EMAIL PROTECTED] Date: Tue May 1 11:43:06 2007 -0400 [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers The kexec patch introduced a superfluous (and otherwise inert) reset of some adapters. The register can have a hardware default value that has zeros for the undefined interrupts. This patch refines the test of the interrupt enable register to focus on only the interrupts that affect the driver in order to detect if an incomplete shutdown of the Adapter had occurred (kdump). Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Signed-off-by: James Bottomley [EMAIL PROTECTED] diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index b6ee3c0..291cd14 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -542,7 +542,7 @@ int _aac_rx_init(struct aac_dev *dev) dev-a_ops.adapter_sync_cmd = rx_sync_cmd; dev-a_ops.adapter_enable_int = aac_rx_disable_interrupt; dev-OIMR = status = rx_readb (dev, MUnit.OIMR); - if status 0xff) != 0xff) || reset_devices) + if status 0x0c) != 0x0c) || reset_devices) !aac_rx_restart_adapter(dev, 0)) ++restart; /* commit a5694ec545a880f9d23463fddc894f5096cc68fa Author: Salyzyn, Mark [EMAIL PROTECTED] Date: Mon Apr 30 13:22:24 2007 -0400 [SCSI] aacraid: kexec fix (reset interrupt handler) Another layer on this onion also discovered by Duane, the interrupt enable handler also needed to be set ... The interrupt enable was called from within the synchronous command handler. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Signed-off-by: James Bottomley [EMAIL PROTECTED] diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 0c71315..b6ee3c0 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -539,6 +539,8 @@ int _aac_rx_init(struct aac_dev *dev) } /* Failure to reset here is an option ... */ + dev-a_ops.adapter_sync_cmd = rx_sync_cmd; + dev-a_ops.adapter_enable_int = aac_rx_disable_interrupt; dev-OIMR = status = rx_readb (dev, MUnit.OIMR); if status 0xff) != 0xff) || reset_devices) !aac_rx_restart_adapter(dev, 0)) aacraid_commit_reset.patch Description: aacraid_commit_reset.patch
RE: kexec and aacraid broken
This is clouding the issue, Vivek. There should be no harm, except to time, resetting the adapter. I do want to optimize for boot time, but do not view this as a 'bug' if the Adapter should reset during the initialization procedure. We need instead to harden the driver to deal with Adapters that behave in an untimely manner as a result of the reset since this generically deals with all possible transitions (boot w/o BIOS, w/BIOS, kexec and kdump). I will look into a possibility the driver is not performing the clean shutdown as a result of a kexec, but that is a refinement and should not be considered a fix for *this* reported problem; it merely moves the problem to a kdump. The driver only disables the interrupts when the driver is .remove'd (aac_remove_one) and not for .shutdown (aac_shutdown). The later merely tells the firmware to stop performing builds if in progress, flush the cache, and all subsequent writes are performed in write-through mode; it does not clear out the driver resources and leaves that to the .remove function only. The failure of .remove being called may be a result of this being a boot driver? Also, the code: dev-OIMR = status = rx_readb (dev, MUnit.OIMR); if status 0x0c) != 0x0c) . . . detects if the adapter's interrupts were disabled, as would happen on a clean shutdown. Some of the Adapters can NOT disable their interrupts, and some have a default state with the interrupts enabled. If the Adapter still has active interrupts, then there is no telling what transpired before and it is considered a safety measure to reset the Adapter in these cases. I'd prefer to err on the side of resetting the Adapter superfluously than deal with a condition where the Adapter could be in an unknown state with a possibility of sustaining an outstanding command and associated interrupt (which was the whole reason this code was introduced). In time I am sure, I will refine this code to incorporate Quirks for adapters that have unusual conditions for the above stated interrupt and remove the possible superfluous reset. Yinghai, can you please provide the Adapter designation just in case it could be the first in this refined list. I will NOT consider this refinement a bugfix for the same reasons stated above. Sincerely -- Mark Salyzyn -Original Message- From: Vivek Goyal [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 9:25 AM To: Salyzyn, Mark Cc: Andrew Morton; Yinghai Lu; Eric W. Biederman; Linux Kernel Mailing List; linux-scsi@vger.kernel.org; Michal Piotrowski Subject: Re: kexec and aacraid broken On Wed, May 30, 2007 at 07:44:02AM -0400, Salyzyn, Mark wrote: I believe this issue is a result of the aacraid_commit_reset patch (as posted for scsi-misc-2.6, enclosed to permit testing) not yet propagated to the 2.6.22-rc3 tree. This is the adapter taking longer than 3 minutes to start after a reset. I seriously doubt either of these patches suggested below will have an affect. And if they do, they are not root cause, one reduces the chances that the card will be reset during initialization (thus applied would likely mitigate this problem), the other prevents a panic when the Adapter is reset (removed, would result in dogs and cats sleeping with each other). Please use kernel parameter aacraid.startup_timeout=540 (merely larger than the default 180 seconds) when spawning the kexec or see if the aacraid_commit_reset.patch resolves the issue to confirm my hunch. Hi Mark, During a normal kexec (not kdump) adapter reset should not have taken place at all. device_shutdown() routines should have taken care to bring the device to a known sane state in first kernel so that second kernel can initialize it without doing a reset. With reset patch, now reset triggers on every kexec. Previously that was not the case with kexec and adapter used to come up. I think this needs to be looked into. Thanks Vivek - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] aacraid: Changeable queue depth
Inspired by Brian King's patch to the ibmvscsi driver. Adds support for a changeable queue depth to the aacraid driver. This attached patch is against current scsi-misc-2.6 ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments. Signed-off-by: Mark Salyzyn [EMAIL PROTECTED] Sincerely -- Mark Salyzyn aacraid_change_queue_depth.patch Description: aacraid_change_queue_depth.patch
RE: kexec and aacraid broken
Vivek Goyal [mailto:[EMAIL PROTECTED] writes: So most likely if we start disabling the interrupts in .shutdown routine we might skip resetting adapter on every kexec without any side affects? Not that simple. The .shutdown would need to perform more resource cleanups of the .remove call to prevent side effects. I need to move some of the .remove activity into the .shutdown handler to make sure the adapter is quiesced. I will hold off on submitting any of these changes until they are evaluated and tested; I am waiting for feedback from Yinghai on the other mitigations that I feel are closer to the root cause. Sincerely -- Mark Salyzyn - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html