Re: [PATCH v3 17/20] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls

2019-08-12 Thread Tony Battersby
t may be a long time before I can update to a kernel version with these patches anyway. Tony Battersby Cybernetics

Re: [PATCH v3 17/20] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls

2019-08-12 Thread Tony Battersby
ements for the write()/read() >>> async version 3 interface. They only accept the version 3 interface. >> I don't think we should do this at all. Anyone who wants to use the >> new async interfaces should use the v4 headers. As Tony Battersby >> already said, the leg

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Tony Battersby
On 12/4/18 3:30 PM, Andy Shevchenko wrote: > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote: >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: >>> Also, Andy had issues with the v2 series so it would be good to hear an >>> update from him? >> Certainly. > Hmm... I certainly f

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Tony Battersby
On 11/13/18 1:36 AM, Matthew Wilcox wrote: > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote: >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy >> driver corrupts DMA pool memory. >> >> Signed-off-by: Tony Battersby > I lik

Re: [PATCH v4 2/9] dmapool: remove checks for dev == NULL

2018-11-12 Thread Tony Battersby
On 11/12/18 11:32 AM, John Garry wrote: > On 12/11/2018 15:42, Tony Battersby wrote: >> dmapool originally tried to support pools without a device because >> dma_alloc_coherent() supports allocations without a device. But nobody >> ended up using dma pools without a device,

[PATCH v4 6/9] dmapool: improve scalability of dma_pool_free

2018-11-12 Thread Tony Battersby
ng 'struct dma_page'. In big O notation, this improves the algorithm from O(n^2) to O(n) while also reducing memory usage. Thanks to Matthew Wilcox for the suggestion to use struct page. Signed-off-by: Tony Battersby --- --- linux/include/linux/mm_types.h.orig 2018-08-01 17:59:46.0

[PATCH v4 5/9] dmapool: rename fields in dma_page

2018-11-12 Thread Tony Battersby
Rename fields in 'struct dma_page' in preparation for moving them into 'struct page'. No functional changes. in_use -> dma_in_use offset -> dma_free_off Signed-off-by: Tony Battersby --- --- linux/mm/dmapool.c.orig 2018-08-03 17:46:13.0 -0400 +++ linux/m

[PATCH v4 4/9] dmapool: improve scalability of dma_pool_alloc

2018-11-12 Thread Tony Battersby
improves the algorithm from O(n^2) to O(n). Signed-off-by: Tony Battersby --- --- linux/mm/dmapool.c.orig 2018-08-03 16:16:49.0 -0400 +++ linux/mm/dmapool.c 2018-08-03 16:45:33.0 -0400 @@ -15,11 +15,16 @@ * Many older drivers still have their own code to do this

[PATCH v4 7/9] dmapool: cleanup integer types

2018-11-12 Thread Tony Battersby
To represent the size of a single allocation, dmapool currently uses 'unsigned int' in some places and 'size_t' in other places. Standardize on 'unsigned int' to reduce overhead, but use 'size_t' when counting all the blocks in the entire pool. Signed-o

[PATCH v4 2/9] dmapool: remove checks for dev == NULL

2018-11-12 Thread Tony Battersby
hem. Signed-off-by: Tony Battersby --- --- linux/mm/dmapool.c.orig 2018-08-03 16:12:23.0 -0400 +++ linux/mm/dmapool.c 2018-08-03 16:13:44.0 -0400 @@ -277,7 +277,7 @@ void dma_pool_destroy(struct dma_pool *p mutex_lock(&pools_reg_lock); mutex_lock(&

[PATCH v4 3/9] dmapool: cleanup dma_pool_destroy

2018-11-12 Thread Tony Battersby
Remove a small amount of code duplication between dma_pool_destroy() and pool_free_page() in preparation for adding more code without having to duplicate it. No functional changes. Signed-off-by: Tony Battersby --- --- linux/mm/dmapool.c.orig 2018-08-02 09:59:15.0 -0400 +++ linux/mm

[PATCH v4 1/9] dmapool: fix boundary comparison

2018-11-12 Thread Tony Battersby
ss ranges marked with "*" would not have been used even though they didn't cross the given boundary. Fixes: e34f44b3517f ("pool: Improve memory usage for devices which can't cross boundaries") Signed-off-by: Tony Battersby --- Even though I described this as a "

[PATCH v4 0/9] mpt3sas and dmapool scalability

2018-11-12 Thread Tony Battersby
I posted v3 on August 7. Nobody acked or merged the patches, and then I got too busy with other stuff to repost until now. The only change since v3: *) Dropped patch #10 (the mpt3sas patch) since the mpt3sas maintainers didn't show any interest. I believe these patches are ready for merging. --

[PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-11-12 Thread Tony Battersby
Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy driver corrupts DMA pool memory. Signed-off-by: Tony Battersby --- --- linux/mm/dmapool.c.orig 2018-08-06 17:52:53.0 -0400 +++ linux/mm/dmapool.c 2018-08-06 17:53:31.0 -0400 @@ -454,17 +454,39 @@ void

[PATCH v4 8/9] dmapool: improve accuracy of debug statistics

2018-11-12 Thread Tony Battersby
es the boundary into account, and use it to replace the inaccurate calculation. Signed-off-by: Tony Battersby --- This depends on patch #1 "dmapool: fix boundary comparison" for the calculated blks_per_alloc value to be correct. The added blks_per_alloc value will also be used in

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Tony Battersby
list_add_tail(&srp->free_entry, &sfp->rq_free_list); > + snprintf(b, sizeof(b), "clear sgat srp=0x%p move to fl tail", > + srp); > + } > > Here again, no lock protecting sfp->sum_fd_dlens. Incidentally, I have been using my own home-grown target-mode SCSI system for the past 16 years, but now I am starting to look into switching to SCST.  I was just reading about their "SGV cache": http://scst.sourceforge.net/scst_pg.html It looks like it serves a similar purpose to what you are trying to accomplish with recycling the indirect I/O buffers between different requests.  Perhaps you can borrow some inspiration from them (or even some code). Tony Battersby Cybernetics

[PATCH] sg: update comment for blk_get_request()

2018-07-12 Thread Tony Battersby
The calling convention of blk_get_request() has changed in lk 4.18; update the comment in sg.c to match. Fixes: ff005a066240 ("block: sanitize blk_get_request calling conventions") Signed-off-by: Tony Battersby --- I wrote the original comment in commit 7772855a996e ("sg: fix EWO

Re: [PATCH] sg: fix minor memory leak in error path

2018-07-12 Thread Tony Battersby
Fix a minor memory leak when there is an error opening a /dev/sg device. Fixes: cc833acbee9d ("sg: O_EXCL and other lock handling") Cc: Reviewed-by: Ewan D. Milne Signed-off-by: Tony Battersby --- Resending to include the requested fixes: / cc: stable tags. diff --git a/drivers/s

[PATCH] sg: fix minor memory leak in error path

2018-07-12 Thread Tony Battersby
Fix a minor memory leak when there is an error opening a /dev/sg device. Signed-off-by: Tony Battersby --- diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index cd2fdac..2962a38 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -2185,6 +2185,7 @@ sg_add_sfp(Sg_device * sdp

SCSI generic (sg) regression in stable kernels

2018-03-28 Thread Tony Battersby
fected because they have not had the problematic commit backported: 3.2.101 3.16.56 Related bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198081 Thanks! Tony Battersby Cybernetics

[PATCH] scsi: fix memory leak with scsi-mq

2015-07-16 Thread Tony Battersby
647 ("scsi: add support for a blk-mq based I/O path.") Cc: # 3.17+ Signed-off-by: Tony Battersby --- For immediate inclusion. diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 106884a..cfadcce 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c

Re: [PATCH] [SCSI] bsg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-13 Thread Tony Battersby
On 02/11/2015 11:31 AM, Tony Battersby wrote: > Note: I did a number of tests with this patch, but I do not have any > programs to test commands with bidirectional data transfer. I would > appreciate if someone could test that. Replying to myself, I was able to test bidirectional data

[PATCH v2 2/2] [SCSI] sg: fix EWOULDBLOCK errors with scsi-mq

2015-02-13 Thread Tony Battersby
applied after the patch titled "sg: fix unkillable I/O wait deadlock with scsi-mq". Cc: Douglas Gilbert Cc: # 3.17+ Signed-off-by: Tony Battersby --- For inclusion in kernel 3.20. The difference in behavior is due to bt_get() in block/blk-mq-tag.c checking for __GFP_WAIT. The bsg driv

[PATCH v2 1/2] [SCSI] sg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-13 Thread Tony Battersby
). Cc: Douglas Gilbert Cc: # 3.17+ Signed-off-by: Tony Battersby --- For inclusion in kernel 3.20. This is the exact same patch as before; I have only updated the patch description to reflect new details uncovered by myself and Douglas Gilbert. There is also now a second related patch to sg that m

Re: [PATCH] [SCSI] sg: fix read() error reporting

2015-02-11 Thread Tony Battersby
On 02/11/2015 12:45 PM, Douglas Gilbert wrote: > On 15-02-11 11:32 AM, Tony Battersby wrote: >> Fix SCSI generic read() incorrectly returning success after detecting an >> error. >> >> Cc: >> Signed-off-by: Tony Battersby >> --- >> >> For inclu

[PATCH] blk-mq: fix double-free in error path

2015-02-11 Thread Tony Battersby
If the allocation of bt->bs fails, then bt->map can be freed twice, once in blk_mq_init_bitmap_tags() -> bt_alloc(), and once in blk_mq_init_bitmap_tags() -> bt_free(). Fix by setting the pointer to NULL after the first free. Cc: Signed-off-by: Tony Battersby --- For inclusion in

[PATCH] [SCSI] bsg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-11 Thread Tony Battersby
k by calling blk_put_request() as soon as the SCSI command completes instead of waiting for userspace to call read(). Cc: # 3.17+ Signed-off-by: Tony Battersby --- For inclusion in kernel 3.20. Note: I did a number of tests with this patch, but I do not have any programs to test commands with b

[PATCH] [SCSI] sg: fix read() error reporting

2015-02-11 Thread Tony Battersby
Fix SCSI generic read() incorrectly returning success after detecting an error. Cc: Signed-off-by: Tony Battersby --- For inclusion in kernel 3.20. --- linux-3.19.0/drivers/scsi/sg.c.orig 2015-02-08 21:54:22.0 -0500 +++ linux-3.19.0/drivers/scsi/sg.c 2015-02-10 09:26:09.0

[PATCH] [SCSI] sg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-11 Thread Tony Battersby
deadlock by calling blk_put_request() as soon as the SCSI command completes instead of waiting for userspace to call read(). Cc: # 3.17+ Signed-off-by: Tony Battersby --- For inclusion in kernel 3.20. I encountered this problem using mptsas (can_queue == 127) and 8 disks connected via an expande

[PATCH] scsi-mq: fix potential deadlock in scsi_internal_device_unblock()

2015-02-05 Thread Tony Battersby
[] cpuidle_enter+0x12/0x20 [] cpu_startup_entry+0x25f/0x300 [] start_secondary+0x13f/0x170 Cc: # 3.17+ Signed-off-by: Tony Battersby --- Note that this patch does *not* fix the deadlock with mptsas that I reported yesterday; that is a completely different issue that still needs to be addressed.

Device removal lockup with mptsas + scsi-mq

2015-02-04 Thread Tony Battersby
Summary: When removing a SCSI device with scsi-mq, blk_mq_update_tag_set_depth() ends up waiting for commands to *other* SCSI devices to complete. If those other SCSI devices are in the SDEV_BLOCK state, then the removal deadlocks. Setup: kernel 3.19-rc7 with the following additional commits:

Delayed FC rport removal causes errors on other device

2014-12-17 Thread Tony Battersby
t OK for them to share the same portid/loop_id values, but instead qla2x00_terminate_rport_io() needs more checks before calling fabric_logout()? I would be happy to test any patches that anyone can provide. Or if someone can provide answers to my questions above or other guidance, then I can try to com

[PATCH] scsi: fix random memory corruption with scsi-mq + T10 PI

2014-12-08 Thread Tony Battersby
ups, etc., any of which may appear to be completely unrelated to the root cause. Cc: # 3.17.x, 3.18.x Signed-off-by: Tony Battersby --- I encountered this problem with a QLogic QLE2672 FC HBA using qla2xxx. On my system, this would trigger BUG_ON(atomic_read(&bio->bi_remaining) <= 0)

[PATCH] scsi: Fix more error handling in SCSI_IOCTL_SEND_COMMAND

2014-11-10 Thread Tony Battersby
Fix an error path in SCSI_IOCTL_SEND_COMMAND that calls blk_put_request(rq) on an invalid IS_ERR(rq) pointer. Fixes: a492f075450f ("block,scsi: fixup blk_get_request dead queue scenarios") Signed-off-by: Tony Battersby --- (resending, since no one picked it up last time) For inclusi

[PATCH] scsi: Fix more error handling in SCSI_IOCTL_SEND_COMMAND

2014-10-23 Thread Tony Battersby
Fix an error path in SCSI_IOCTL_SEND_COMMAND that calls blk_put_request(rq) on an invalid IS_ERR(rq) pointer. Fixes: a492f075450f ("block,scsi: fixup blk_get_request dead queue scenarios") Signed-off-by: Tony Battersby --- For inclusion in 3.18 only. This does not conflict with

[PATCH] lib/scatterlist: fix memory leak with scsi-mq

2014-10-23 Thread Tony Battersby
Fix a memory leak with scsi-mq triggered by commands with large data transfer length. Fixes: c53c6d6a68b1 ("scatterlist: allow chaining to preallocated chunks") Cc: # 3.17.x Signed-off-by: Tony Battersby --- For inclusion in 3.18 and 3.17.x. --- a/lib/scatterlist.c 2014-1

Re: [PATCH][SCSI] scsi-mq: fix requests that use a separate CDB buffer

2014-08-25 Thread Tony Battersby
On 08/23/2014 03:09 PM, Douglas Gilbert wrote: >> For inclusion in 3.17 only. > May want to check if blk-mq work in lk 3.16 and earlier > breaks the bsg driver's capability to send SCSI cdbs > that are longer than 16 bytes. > > I think 3.16 and earlier are OK. The problem was caused by scsi_mq_pr

[PATCH][SCSI] fix regression in SCSI_IOCTL_SEND_COMMAND

2014-08-22 Thread Tony Battersby
blk_rq_set_block_pc() memsets rq->cmd to 0, so it should come immediately after blk_get_request() to avoid overwriting the user-supplied CDB. Also check for failure to allocate rq. Fixes: f27b087b81b7 ("block: add blk_rq_set_block_pc()") Cc: # 3.16.x Signed-off-by: Tony Batters

[PATCH][SCSI] scsi-mq: fix requests that use a separate CDB buffer

2014-08-22 Thread Tony Battersby
rge CDBs only). Without this patch, scsi_mq_prep_fn() will set rq->cmd back to rq->__cmd, causing the wrong CDB to be sent to the device. Signed-off-by: Tony Battersby --- For inclusion in 3.17 only. diff -urpN linux-3.17.0-rc1-a/block/blk-core.c linux-3.17.0-rc1-b/block/blk-core.c --- lin

Re: New 2.6.24.2 SG_IO SCSI problems

2008-02-22 Thread Tony Battersby
> I attached a backport of the patch from Tony (added as cc) that is in > 2.6.25-rc2. Could you try it out against 2.6.24.2 just to make sure it > was this patch, then we can send it to stable. > Yes, I had wanted to send this patch to -stable, but got distracted with other bugs. So please

[PATCH] [SCSI] fix BUG when sum(scatterlist) > bufflen

2008-02-05 Thread Tony Battersby
en rather than to sum(scatterlist lengths), which fixes the problem. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-git14/drivers/scsi/scsi_lib.c.orig 2008-02-05 09:33:05.0 -0500 +++ linux-2.6.24-git14/drivers/scsi/scsi_lib.c 2008-02-05 09:33:10.0

Re: [PATCH] [RFC] sd: make error handling more robust

2008-02-04 Thread Tony Battersby
Luben Tuikov wrote: > You then took hunk #2 (2 lines) of the patch I sent > you and submitted it as your own, and then I acked > "your" patch. > I _really_ _really_ hope that you don't believe that I am trying to take credit for your work. If you take another look, my original patch had the foll

Re: [PATCH] [RFC] sd: make error handling more robust

2008-02-01 Thread Tony Battersby
Luben Tuikov wrote: > --- On Fri, 2/1/08, Tony Battersby <[EMAIL PROTECTED]> wrote: > >> Also, I disagree about treating recovered error like >> hardware/medium >> error. Recovered error is supposed to mean "the last >> command completed >> succe

[PATCH] [SCSI] sd: make error handling more robust (v2)

2008-02-01 Thread Tony Battersby
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]> ---

Re: [PATCH] [RFC] sd: make error handling more robust

2008-02-01 Thread Tony Battersby
Salyzyn, Mark wrote: > 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?) [W

Re: [PATCH] [RFC] sd: make error handling more robust

2008-02-01 Thread Tony Battersby
with some recovery action performed by the device server". The other errors mean that the command didn't complete successfully. If VALID=1, then the sense information bytes indicate "the unsigned logical block address associated with the sense key". So for hardwar

[PATCH] [RFC] sd: make error handling more robust

2008-01-31 Thread Tony Battersby
I have a RAID that returns a medium error on a read command. The "information bytes valid" bit is set in the sense data, but the information bytes are zero: CDB: 28 00 02 B0 62 00 00 00 02 00 Status: 02 (CHECK CONDITION) Sense data: F0 00 03 00 | 00 00 00 0A | 00 00 00 00 | 00 00 00 00 00 00 For

[PATCH] [SCSI] make SPI DV data pattern "d" match T10

2008-01-25 Thread Tony Battersby
| FF FF 04 00 | FF FF 08 00 FF FF 10 00 | FF FF 20 00 | FF FF 40 00 | FF FF 80 00 This data pattern tests simultaneously turning on or off all bits but one. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24/drivers/scsi/scsi_transport_spi.c.orig 2008-01-25 15:16:15

Re: Unexpected IRQ trap when reloading mptspi with MSI

2008-01-24 Thread Tony Battersby
Tony Battersby wrote: > I get "unexpected IRQ trap at vector dd" when reloading mptspi with MSI > enabled. This seems to happen only on dual-channel HBAs; single-channel > HBAs are unaffected. It looks like the second channel is generating a > bogus MSI interrupt while the

Unexpected IRQ trap when reloading mptspi with MSI

2008-01-24 Thread Tony Battersby
I get "unexpected IRQ trap at vector dd" when reloading mptspi with MSI enabled. This seems to happen only on dual-channel HBAs; single-channel HBAs are unaffected. It looks like the second channel is generating a bogus MSI interrupt while the first channel is being brought up. modprobe mpt_base

[PATCH] fix /proc/scsi/sg/devices when no SCSI devices

2008-01-22 Thread Tony Battersby
evices in the system. A similar problem exists with /proc/scsi/sg/device_strs. The following patch restores the behavior of 2.6.23. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc8-git5/drivers/scsi/sg.c.orig2008-01-22 15:08:46.0 -0500 +++ linux-2.

Warning: sym53c8xx calls dma_free_coherent() with irqs disabled

2008-01-22 Thread Tony Battersby
. Tony Battersby Cybernetics - 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] [SCSI] sym53c8xx: fix "irq X: nobody cared" regression in 2.6.24

2007-12-14 Thread Tony Battersby
(INTF) condition. The following patch fixes the problem. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- James, please queue for scsi-rc-fixes-2.6. Thanks! --- linux-2.6.24-rc5-git3/drivers/scsi/sym53c8xx_2/sym_hipd.c.orig 2007-12-14 15:07:09.0 -0500 +++ linux-2.6.24

Re: Recent sym53c8xx patches

2007-12-04 Thread Tony Battersby
Tony Battersby wrote: > Hello, > > I am sending this message to check up on the merge status of my recent > sym53c8xx patches to make sure they aren't forgotten. Matthew Wilcox, > could you give an ack/nak for these merge requests? Also, please let me > know if I need to

Re: Recent sym53c8xx patches

2007-11-27 Thread Tony Battersby
Randy Dunlap wrote: > Is Matthew assisting James on SCSI merges now? > > Matthew is the maintainer of sym53c8xx. I figured my patches weren't getting merged since he hadn't given the ok yet. Tony - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message

Recent sym53c8xx patches

2007-11-27 Thread Tony Battersby
ent due to speculation that it may break some 875 chips. Thanks, Tony Battersby - 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] sym53c8xx: increase sg_tablesize for larger data transfers

2007-11-15 Thread Tony Battersby
James Bottomley wrote: > On Thu, 2007-11-15 at 11:38 -0500, Tony Battersby wrote: > >> James Bottomley wrote: >> >>> On Thu, 2007-11-15 at 10:06 -0500, Tony Battersby wrote: >>> >>> >>>> This patch increases the sg_t

Re: [PATCH] [SCSI] sym53c8xx: increase sg_tablesize for larger data transfers

2007-11-15 Thread Tony Battersby
James Bottomley wrote: > On Thu, 2007-11-15 at 10:06 -0500, Tony Battersby wrote: > >> This patch increases the sg_tablesize for sym53c8xx from 96 to 128, >> which enables commands to transfer larger amounts of data (e.g. 512 KB >> instead of 384 KB, assuming 4 KB non-a

[PATCH] [SCSI] sym53c8xx: increase sg_tablesize for larger data transfers

2007-11-15 Thread Tony Battersby
ot be set much higher than 128 without making more intrusive changes. Tested on a LSI 53c1010-66. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc2-git5/drivers/scsi/sym53c8xx_2/sym53c8xx.h.orig 2007-11-15 09:36:03.0 -0500 +++ linux-2.6.24-rc2-git5/driv

[PATCH] scsi: move single_lun flag from scsi_device to scsi_target

2007-11-12 Thread Tony Battersby
scsi_target instead of scsi_device, which causes every device at a given target ID to inherit the single_lun flag from one LUN. This makes it possible to blacklist just the medium changer and not the tape drive. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- diff -urpN linux-2.6.24-rc2-v

[PATCH] 3w-9xxx: fix abysmal write performance on some motherboards

2007-11-09 Thread Tony Battersby
vement for writing. This issue does not seem to affect the 9550SX controller, but the patch doesn't hurt it either. I haven't tested any of the other 3ware controllers. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc2/drivers/scsi/3w-9xxx.c.orig2007

Re: [PATCH] [SCSI] sym53c8xx: fix setflag user command to control disconnects

2007-11-08 Thread Tony Battersby
James Bottomley wrote: > On Wed, 2007-11-07 at 15:37 -0500, Tony Battersby wrote: > >> This patch fixes the sym53c8xx "setflag" user command to control >> disconnect privilege, which has been broken for a long time. >> > > The first observation is

[PATCH] [SCSI] sym53c8xx: don't flood syslog with negotiation messages

2007-11-07 Thread Tony Battersby
would be the same as the last one printed. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- diff -urpN linux-2.6.24-rc2/drivers/scsi/sym53c8xx_2/sym_hipd.c linux-2.6.24-rc2-sym2/drivers/scsi/sym53c8xx_2/sym_hipd.c --- linux-2.6.24-rc2/drivers/scsi/sym53c8xx_2/sym_hipd.c2007-11-

[PATCH] [SCSI] sym53c8xx: fix setflag user command to control disconnects

2007-11-07 Thread Tony Battersby
This patch fixes the sym53c8xx "setflag" user command to control disconnect privilege, which has been broken for a long time. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- NOTE regarding the following change: can_disconnect = (cp->tag != NO_TAG) || -

[PATCH] [SCSI] iscsi: return data transfer residual for data-out commands

2007-11-07 Thread Tony Battersby
Currently, the iSCSI driver returns the data transfer residual for data-in commands (e.g. read) but not data-out commands (e.g. write). This patch makes it return the data transfer residual for both types of commands. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.

[PATCH] [SCSI] sym53c8xx: fix resid calculation

2007-11-06 Thread Tony Battersby
This patch fixes the calculation of the data transfer residual for the case of a command that is supposed to transfer an odd number of bytes on a wide bus but transfers nothing instead. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc1-git15/drivers/scsi/sym53

[PATCH] [SCSI] sym53c8xx: fix free_irq() regression in 2.6.24

2007-11-06 Thread Tony Battersby
andler capable of returning IRQ_NONE ... The result is that free_irq() doesn't actually take any action. This patch fixes it. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_glue.c.orig 2007-11-06 14:22:43.

[PATCH] iscsi: fix compile error when debug enabled

2007-10-25 Thread Tony Battersby
This patch fixes a compile error in iSCSI when DEBUG_SCSI is defined. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]> --- --- linux-2.6.24-rc1/drivers/scsi/libiscsi.c.orig 2007-10-25 15:56:32.0 -0400 +++ linux-2.6.24-rc1/drivers/scsi/libiscsi.c2007-10-25 15:56:49.000

[PATCH] iscsi_tcp: fix potential lockup with write commands

2007-10-25 Thread Tony Battersby
24-rc1) converts accesses of xmstate to use set_bit, clear_bit, and test_bit instead of |= and &=. I have tested this patch and verified that it fixes the problem. Another possible approach would be to hold a lock during most of the rx/tx setup and post-processing, and drop the lock only fo

Re: [Bug 3680] sym53c8xx_2 SMP deadlock on driver load

2007-10-17 Thread Tony Battersby
This patch fixes two problems with sym53c8xx_2.o in 2.4.x kernels: 1) A system hang when loading sym53c8xx_2.o on a SMP system with two dual-channel LSI HBAs (http://bugzilla.kernel.org/show_bug.cgi?id=3680) 2) A function improperly marked __init. Signed-off-by: Tony Battersby <[EMAIL PROTEC

Re: [Bug 3680] sym53c8xx_2 SMP deadlock on driver load

2007-10-17 Thread Tony Battersby
Willy Tarreau wrote: > On Wed, Oct 17, 2007 at 10:53:06AM -0400, Tony Battersby wrote: > >>> So we should unconditionally drop the lock (and re-enable >>> interrupts) and re-acquire it. >>> >> After looking at it carefully, this is true o

Re: [Bug 3680] sym53c8xx_2 SMP deadlock on driver load

2007-10-17 Thread Tony Battersby
ot in ->release. So, your patch locks up the system on module unload. I have put together and tested a new patch which does it correctly, while still trying to make only minimal changes. If you approve, this can go into the next 2.4.x release. Signed-off-by: Tony Battersby <[EMAIL PROTECTED]&