RE: [PATCH 2/3] [SCSI] mvsas: fix shift in mvs_94xx_free_reg_set()

2012-11-15 Thread Xiangliang Yu
Hi, Xi > > About patch 3, I check the ffz code and found it will check ~0 conditions. > > Can you point me to the ~0 check in ffz code? I also feel like using > __ffs64 makes the code simpler. Yes, it seem to be ok > > Does patch 1 look good to you? Thanks. > Yes Thanks! -- To unsubscribe

RE: [PATCH 0/7] qla4xxx: Updates for scsi "misc" branch

2012-11-15 Thread Lalit Chandivade
Hi James, Some of the interfaces like about firmware we can make generic. And we are still discussing internally, if we can really make the Address Control Block (ACB) interface generic or not. May be we will re-submit the patches without the ACB (which is still under discussion) in next week.

Re: [patch,v3 06/10] ata: use scsi_host_alloc_node

2012-11-15 Thread Jeff Garzik
On 11/09/2012 02:18 PM, Jeff Moyer wrote: Signed-off-by: Jeff Moyer --- drivers/ata/libata-scsi.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Acked-by: Jeff Garzik -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to major

Re: [PATCH] target/iblock: Fix double iblock_complete_cmd callback bug

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 14:36 -0800, Nicholas A. Bellinger wrote: > On Thu, 2012-11-15 at 05:49 -0500, Christoph Hellwig wrote: > > On Thu, Nov 08, 2012 at 07:58:59PM +, Nicholas A. Bellinger wrote: > > > From: Nicholas Bellinger > > > > > > This patch fixes a double completion bug where ibr->p

Re: [PATCH] target/iblock: Fix double iblock_complete_cmd callback bug

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 05:49 -0500, Christoph Hellwig wrote: > On Thu, Nov 08, 2012 at 07:58:59PM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch fixes a double completion bug where ibr->pending = 2 usage > > plus the extra callback to iblock_complete_cmd() invo

[PATCH] scsi: prevent stack buffer overflow in host_reset

2012-11-15 Thread Sasha Levin
store_host_reset() has tried to re-invent the wheel to compare sysfs strings. Unfortunately it did so poorly and never bothered to check the input from userspace before overwriting stack with it, so something simple as: echo "WoopsieWoopsie" > /sys/devices/pseudo_0/adapter0/host0/scsi_host/host0/h

Re: [PATCH-v2 2/3] target: Add/check max_write_same_len device attribute + update block limits VPD

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 20:13 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds a new max_write_same_len device attribute for use with > WRITE_SAME w/ UNMAP=0 backend emulation. This can be useful for > lowering the default backend value (IBLOCK uses 0x). > >

Re: [PATCH-v2 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 20:13 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within > iblock_execute_write_same() backend code. > > The emulation uses a bio_add_page() call for each sector, and by default > enforces

RE: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Nicholas A. Bellinger
Hi Robert, On Thu, 2012-11-15 at 20:01 +, Elliott, Robert (Server Storage) wrote: > WRITE SAME always has a payload, regardless of the UNMAP bit value. > > For WRITE SAME with UNMAP=0, it's extremely important; that's how what > to write is specified. > > For WRITE SAME with UNMAP=1, the dev

[PATCH-v2 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within iblock_execute_write_same() backend code. The emulation uses a bio_add_page() call for each sector, and by default enforces a limit of max_write_same_len=0x (65536) sectors following what scsi_debu

[PATCH-v2 2/3] target: Add/check max_write_same_len device attribute + update block limits VPD

2012-11-15 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a new max_write_same_len device attribute for use with WRITE_SAME w/ UNMAP=0 backend emulation. This can be useful for lowering the default backend value (IBLOCK uses 0x). Also, update block limits VPD emulation code in spc_emulate_evpd_b0() to repor

[PATCH-v2 1/3] target/sbc: Seperate WRITE_SAME based on UNMAP flag in sbc_ops

2012-11-15 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a new sbc_ops->execute_write_same_unmap() caller for use with WRITE_SAME w/ UNMAP=1, and performs the ->execute_cmd() setup based this bit within sbc_setup_write_same() code. Also, makes the changes in sbc_parse_cdb() to handle a sense_reason_t return fro

[PATCH-v2 0/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation

2012-11-15 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This -v2 series for-3.8 adds support for proper WRITE_SAME w/ UNMAP=0 emulation for IBLOCK device backends to follow MKP's WRITE_SAME client patches that have been merged in v3.7-rc1. Currently it uses a bio_add_page() call for each sector in order to allow sc

RE: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Elliott, Robert (Server Storage)
WRITE SAME always has a payload, regardless of the UNMAP bit value. For WRITE SAME with UNMAP=0, it's extremely important; that's how what to write is specified. For WRITE SAME with UNMAP=1, the device server is required to check that the payload matches the data that is returned for unmapped L

Re: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Christoph Hellwig
On Thu, Nov 15, 2012 at 11:29:46AM -0800, Nicholas A. Bellinger wrote: > Well at least for the latter that is because UNMAP=0 does not have a > payload. ;) UNMAP=0 does have a payload, we just ignore it. In fact I was told that targets should check for a completely zeroed sector sized payload fo

Re: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 06:04 -0500, Christoph Hellwig wrote: > > + /* > > +* Enable WRITE_SAME emulation for IBLOCK, use scsi_debug.c default > > +*/ > > Why would we care what scsi_debug.c uses? > Fixing up this comment based upon MKP's earlier response. > > + dev->dev_attrib.max_wr

Re: [PATCH 2/3] target: Add max_write_same_len device attribute

2012-11-15 Thread Nicholas A. Bellinger
On Thu, 2012-11-15 at 05:53 -0500, Christoph Hellwig wrote: > On Thu, Nov 08, 2012 at 08:07:17PM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds a new max_write_same_len device attribute for use with > > WRITE_SAME w/ UNMAP=0 backend emulation. > > > > Al

[scsi:misc 36/36] drivers/scsi/csiostor/csio_attr.c:92:41: sparse: incorrect type in assignment (different base types)

2012-11-15 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: 0779fa137a73170b6c796fdb476f1455ba67b9aa commit: 0779fa137a73170b6c796fdb476f1455ba67b9aa [36/36] [SCSI] csiostor: Chelsio FCoE offload driver sparse warnings: + drivers/scsi/csiostor/csio_attr.c:92:41: sparse: inc

Re: scsi target, likely GPL violation

2012-11-15 Thread Andy Grover
Hi all, First, I do not, and did not, have access to the proprietary OS, which has been referred to. Otherwise, I would have checked it. Second, I appreciate that my questions and tentative inferences may not have been perfect, given that I did not have the complete facts, but I did try to obtain

Re: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Martin K. Petersen
> "Doug" == Douglas Gilbert writes: Doug> On 12-11-15 06:04 AM, Christoph Hellwig wrote: >>> + /* >>> + * Enable WRITE_SAME emulation for IBLOCK, use scsi_debug.c default >>> + */ >> >> Why would we care what scsi_debug.c uses? Doug> Would you prefer no hint of where the magic number came f

Re: [PATCH 1/5] arcmsr: Re-name the HBA Type

2012-11-15 Thread 鄭守謙
OK. I will fix it. Thank you, 2012/11/15 James Bottomley : > On Thu, 2012-11-15 at 22:53 +0800, 鄭守謙 wrote: >> Hi James, >> You got these errors/warnings before or after you apply these 5 patches? > > I got all of this lot from patch 1/5 only. Please fix at least the > errors and the warnings that

Re: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Douglas Gilbert
On 12-11-15 06:04 AM, Christoph Hellwig wrote: + /* +* Enable WRITE_SAME emulation for IBLOCK, use scsi_debug.c default +*/ Why would we care what scsi_debug.c uses? Would you prefer no hint of where the magic number came from? At least somebody who cares when they see t

Re: [PATCH 1/5] arcmsr: Re-name the HBA Type

2012-11-15 Thread James Bottomley
On Thu, 2012-11-15 at 22:53 +0800, 鄭守謙 wrote: > Hi James, > You got these errors/warnings before or after you apply these 5 patches? I got all of this lot from patch 1/5 only. Please fix at least the errors and the warnings that go to whitespace issues. I don't really care about printk(KERN_ERR

Re: [PATCH 1/5] arcmsr: Re-name the HBA Type

2012-11-15 Thread 鄭守謙
Hi James, You got these errors/warnings before or after you apply these 5 patches? Thanks, 2012/11/15 James Bottomley : > On Thu, 2012-11-15 at 15:24 +0800, NickCheng wrote: >> From: Nick Cheng >> >> Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively >> Signed-off-by: Ni

Re: [PATCH] Try #3: Use SCSI read/write(16) with > 32-bit LBA drives

2012-11-15 Thread Jason J. Herne
On Thu, Nov 15, 2012 at 4:20 AM, Christoph Hellwig wrote: > On Wed, Nov 14, 2012 at 05:03:22PM -0500, Jason J. Herne wrote: >> From: "Jason J. Herne" >> >> Force large capacity (> 0x blocks) drives to use READ/WRITE(16) >> instead >> of READ/WRITE(10). Some(most/all?) USB enclosures do n

Re: [PATCH 1/5] arcmsr: Re-name the HBA Type

2012-11-15 Thread James Bottomley
On Thu, 2012-11-15 at 15:24 +0800, NickCheng wrote: > From: Nick Cheng > > Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively > Signed-off-by: Nick Cheng diff -uprN a//drivers/scsi/arcmsr/arcmsr_attr.c > b//drivers/scsi/arcmsr/arcmsr_attr.c > --- a//drivers/scsi/arcmsr

[v6 PATCH 3/8] csiostor: Chelsio FCoE offload driver submission (headers part 2).

2012-11-15 Thread Naresh Kumar Inna
This patch contains the second set of the header files for csiostor driver. Signed-off-by: Naresh Kumar Inna --- drivers/scsi/csiostor/csio_lnode.h | 255 ++ drivers/scsi/csiostor/csio_mb.h| 278 +++ drivers/scsi/csiostor/csio_rnode.h | 141 ++ driv

[v6 PATCH 2/8] csiostor: Chelsio FCoE offload driver submission (headers part 1).

2012-11-15 Thread Naresh Kumar Inna
This patch contains the first set of the header files for csiostor driver. Signed-off-by: Naresh Kumar Inna --- V2: - Removed csio_fcoe_proto.h, using defines from include/scsi/fc instead. - Removed driver-specific return values, using errno values instead. - Retained CSIO_INC_STATS, since it is

[v6 PATCH 1/8] cxgb4/cxgb4vf: Chelsio FCoE offload driver submission (common header updates).

2012-11-15 Thread Naresh Kumar Inna
This patch contains updates to firmware/hardware header files shared between csiostor and cxgb4/cxgb4vf, and the resulting changes to the cxgb4/cxgb4vf source files. Signed-off-by: Naresh Kumar Inna --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 +++--- drivers/net/ethernet/chelsio/c

[v6 PATCH 0/8] csiostor: Chelsio FCoE offload driver submission

2012-11-15 Thread Naresh Kumar Inna
This is the initial submission of the Chelsio FCoE offload driver (csiostor) to the upstream kernel. This driver currently supports FCoE offload functionality over Chelsio T4-based 10Gb Converged Network Adapters. The following patches contain the driver sources for csiostor driver and updates to

Re: [v6 PATCH 1/8] cxgb4/cxgb4vf: Chelsio FCoE offload driver submission (common header updates).

2012-11-15 Thread Naresh Kumar Inna
On 11/14/2012 7:56 AM, James Bottomley wrote: > On Thu, 2012-10-25 at 15:20 +0530, Naresh Kumar Inna wrote: >> This patch contains updates to firmware/hardware header files shared >> between csiostor and cxgb4/cxgb4vf, and the resulting changes to the >> cxgb4/cxgb4vf source files. >> >> Signed-off

Re: [PATCH 3/3] target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support

2012-11-15 Thread Christoph Hellwig
> + /* > + * Enable WRITE_SAME emulation for IBLOCK, use scsi_debug.c default > + */ Why would we care what scsi_debug.c uses? > + dev->dev_attrib.max_write_same_len = 0x; > > if (blk_queue_nonrot(q)) > dev->dev_attrib.is_nonrot = 1; > @@ -375,22 +379,8

Re: [PATCH 2/3] target: Add max_write_same_len device attribute

2012-11-15 Thread Christoph Hellwig
On Thu, Nov 08, 2012 at 08:07:17PM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds a new max_write_same_len device attribute for use with > WRITE_SAME w/ UNMAP=0 backend emulation. > > Also, update block limits VPD emulation code in spc_emulate_evpd_b0() to > s

Re: [PATCH 1/3] target/sbc: Make WRITE_SAME check differentiate between UNMAP=[1,0]

2012-11-15 Thread Christoph Hellwig
> + if (flags[0] & 0x08) > + cmd->se_cmd_flags |= SCF_WRITE_SAME_DISCARD; I don't like this flag at all. We can still simply check the CDB during ->execute_cmd and avoid this redundant flag. Except for that bit the changes look fine, but should not be a patch on their own. Witho

Re: [PATCH] target/iblock: Fix double iblock_complete_cmd callback bug

2012-11-15 Thread Christoph Hellwig
On Thu, Nov 08, 2012 at 07:58:59PM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch fixes a double completion bug where ibr->pending = 2 usage > plus the extra callback to iblock_complete_cmd() invoked after bio > submission in iblock_execute_rw() can interfere with t

Re: [PATCH] Try #3: Use SCSI read/write(16) with > 32-bit LBA drives

2012-11-15 Thread Christoph Hellwig
On Wed, Nov 14, 2012 at 05:03:22PM -0500, Jason J. Herne wrote: > From: "Jason J. Herne" > > Force large capacity (> 0x blocks) drives to use READ/WRITE(16) > instead > of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) > commands > when a large capacity drive is ins