Re: configurable discard parameters

2015-06-24 Thread Martin K. Petersen
> "Tom" == Tom Yan writes: Tom> First of all it wouldn't really solve problem for all devices which Tom> have different limits. Only by virtue of us generally aligning on large power of two boundaries. The only reason I am entertaining this in the first place is that I have one drive that b

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Sergey Senozhatsky
On (06/24/15 08:10), Greg KH (gre...@linuxfoundation.org) wrote: > On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: > > On (06/24/15 06:10), Seymour, Shane M wrote: > > [..] > > > > > > /* The sysfs driver interface. Read-only at the moment */ > > > -static ssize_t st_try_di

Re: [PATCH] st: convert to using driver attr groups for sysfs

2015-06-24 Thread Kai Mäkisara (Kolumbus)
> On 23.6.2015, at 11.11, Seymour, Shane M wrote: > > This patch changes the st driver to use attribute groups so > driver sysfs files are created automatically. See the > following for reference: > > http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/ > Acked-by: Kai M

Re: [PATCH v2] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Kai Mäkisara (Kolumbus)
> On 24.6.2015, at 9.54, Seymour, Shane M wrote: > > > Convert DRIVER_ATTR macros to DRIVER_ATTR_RO requested by > Greg KH. Also switched to using scnprintf instead of snprintf > per Documentation/filesystems/sysfs.txt. > > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Shane Seymour > --

[PATCH] SCSI-fnic: Delete an unnecessary check before the function call "vfree"

2015-06-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Jun 2015 20:40:35 +0200 The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/scsi/fnic/fnic_debugfs.c |

[PATCH] SCSI: Delete unnecessary checks before the function call "put_device"

2015-06-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Jun 2015 19:24:01 +0200 The put_device() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- driver

[PATCH] SCSI-libfc: Delete an unnecessary check before the function call "fc_fcp_ddp_done"

2015-06-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Jun 2015 17:50:32 +0200 The fc_fcp_ddp_done() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- d

[PATCH] SCSI-wd33c93: Deletion of a check before the function call "wd33c93_setup"

2015-06-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Jun 2015 17:15:17 +0200 The wd33c93_setup() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/scsi/wd33c93.c | 2

Re: [PATCH v2] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Greg KH (gre...@linuxfoundation.org)
On Wed, Jun 24, 2015 at 06:54:35AM +, Seymour, Shane M wrote: > > Convert DRIVER_ATTR macros to DRIVER_ATTR_RO requested by > Greg KH. Also switched to using scnprintf instead of snprintf > per Documentation/filesystems/sysfs.txt. > > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Shane S

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Greg KH (gre...@linuxfoundation.org)
On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: > On (06/24/15 06:10), Seymour, Shane M wrote: > [..] > > > > /* The sysfs driver interface. Read-only at the moment */ > > -static ssize_t st_try_direct_io_show(struct device_driver *ddp, char *buf) > > +static ssize_t try_dire

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Greg KH (gre...@linuxfoundation.org)
On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: > On (06/24/15 06:10), Seymour, Shane M wrote: > [..] > > > > /* The sysfs driver interface. Read-only at the moment */ > > -static ssize_t st_try_direct_io_show(struct device_driver *ddp, char *buf) > > +static ssize_t try_dire

Re: [PATCH] SCSI-OSD: Delete an unnecessary check before the function call "put_disk"

2015-06-24 Thread Johannes Thumshirn
On Wed, Jun 24, 2015 at 04:16:34PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 24 Jun 2015 16:06:21 +0200 > > The put_disk() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detecte

[PATCH] SCSI-OSD: Delete an unnecessary check before the function call "put_disk"

2015-06-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Jun 2015 16:06:21 +0200 The put_disk() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/

Re: configurable discard parameters

2015-06-24 Thread Tom Yan
To be honest I don't think this patch should get in as well. First of all it wouldn't really solve problem for all devices which have different limits. Secondly I doubt it's related to Deterministic Zero AT ALL. (For one the SanDisk drive I have shows Deterministic Zero, still it behaves similarly

Re: [PATCH] sd: Fix maximum I/O size for BLOCK_PC requests

2015-06-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch] hpsa: fix an sprintf() overflow in the reset handler

2015-06-24 Thread Dan Carpenter
On Fri, Jun 19, 2015 at 07:13:47AM +, Seymour, Shane M wrote: > With a size of 48 while it won't overflow since you're using snprintf the > string with a maximum value in %d: > > echo -n "cmd 2147483647 RESET FAILED, new lockup detected" |wc -c > 48 I actually just chose 48 because it was di

[PATCH 2/2] advansys: Make sure ret and share_irq are initialized

2015-06-24 Thread Geert Uytterhoeven
If CONFIG_PCI=n: drivers/scsi/advansys.c: In function ‘advansys_board_found’: drivers/scsi/advansys.c:11037: warning: ‘ret’ is used uninitialized in this function drivers/scsi/advansys.c:10929: warning: ‘share_irq’ may be used uninitialized in this function If CONFIG_PCI=n, ret and

[PATCH 1/2] advansys: Do not byteswap sense_len on big endian

2015-06-24 Thread Geert Uytterhoeven
On big endian (e.g. m68k): drivers/scsi/advansys.c: In function ‘adv_build_req’: drivers/scsi/advansys.c:7806: warning: large integer implicitly truncated to unsigned type Indeed, adv_scsi_req_q.sense_len is uchar, not __le32, and must never be byteswapped. Fixes: 811ddc057aac7228 ("adv

Re: [PATCH][SCSI] hptiop: Support HighPoint RR36xx HBAs and Support SAS tape and SAS media changer

2015-06-24 Thread Hannes Reinecke
On 06/24/2015 05:41 AM, linux wrote: > Support HighPoint RR36xx HBAs which are based on Marvell Frey. > Support SAS tape and SAS media changer. > > Signed-off-by: HighPoint Linux Team > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckezSeries & St

Re: [PATCH v2] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Hannes Reinecke
On 06/24/2015 08:54 AM, Seymour, Shane M wrote: > > Convert DRIVER_ATTR macros to DRIVER_ATTR_RO requested by > Greg KH. Also switched to using scnprintf instead of snprintf > per Documentation/filesystems/sysfs.txt. > > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Shane Seymour > --- > Th