Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Hannes Reinecke
On 07/05/2014 11:41 AM, Christoph Hellwig wrote: On Fri, Jul 04, 2014 at 04:12:22PM +0200, Hannes Reinecke wrote: So what would be set in the upper 48 bits for those drivers? We receive the LUN over the wire to start with. None. All these devices are physically incapable of receiving or

Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Hannes Reinecke
On 07/07/2014 09:54 AM, Hannes Reinecke wrote: On 07/05/2014 11:41 AM, Christoph Hellwig wrote: On Fri, Jul 04, 2014 at 04:12:22PM +0200, Hannes Reinecke wrote: So what would be set in the upper 48 bits for those drivers? We receive the LUN over the wire to start with. None. All these

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: hi all: we met a USB Hard Disk that will go to suspend if host stop sending scsi command over 5mins. To save the IO, kernel will keep the file in page cache as much as he can and under this circumstances, the scsi command may

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-07 Thread Christoph Hellwig
On Mon, Jul 07, 2014 at 12:01:53AM +, Elliott, Robert (Server Storage) wrote: nr_sectors = ilog2(sdp-sector_size) - 9; - rq-timeout = SD_TIMEOUT; - - memset(rq-cmd, 0, rq-cmd_len); Is *cmd guaranteed to be zero at this point? Yes, scsi_setup_fs_cmnd takes care of this

Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Christoph Hellwig
On Mon, Jul 07, 2014 at 09:54:51AM +0200, Hannes Reinecke wrote: 1) Isolate from any fallout due to the 64bit LUN changes. By introducing accessors we are guaranteed that the drivers will only ever see LUN numbers they are expecting. I really don't see the point. The LUNs have to be passed up

Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Hannes Reinecke
On 07/07/2014 11:37 AM, Christoph Hellwig wrote: On Mon, Jul 07, 2014 at 09:54:51AM +0200, Hannes Reinecke wrote: 1) Isolate from any fallout due to the 64bit LUN changes. By introducing accessors we are guaranteed that the drivers will only ever see LUN numbers they are expecting. I really

Re: uas: kernel BUG at block/blk-tag.c:89 is back again :|

2014-07-07 Thread Christoph Hellwig
On Sun, Jul 06, 2014 at 02:24:03PM +0200, Hans de Goede wrote: Hi, On 07/03/2014 08:01 AM, Christoph Hellwig wrote: Hi Hans, please test the path below: Note, I did a similar patch a while back, but then it was decided to try and fix the tear-down ordering instead (which seems to

Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Christoph Hellwig
On Mon, Jul 07, 2014 at 12:05:04PM +0200, Hannes Reinecke wrote: Ok, so I'll be sending a patchset for fixing up the build warnings (and keeping the current accesses to -lun), and prepare a different patchset moving everything onto accessors so that we can use struct scsi_lun directly.

Re: [PATCH 0/2] virtio-scsi queue for 3.17

2014-07-07 Thread Christoph Hellwig
Thanks Paolo, I've applied the patches. -- 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 3/3] scsi: ufs: retry if the link-startup fails

2014-07-07 Thread Christoph Hellwig
This produces a compiler warning for me that looks serious: ../drivers/scsi/ufs/ufshcd.c: In function ???ufshcd_link_startup???: ../drivers/scsi/ufs/ufshcd.c:1938:3: warning: passing argument 1 of ???ufshcd_is_device_present??? makes integer from pointer without a cast [enabled by default]

Re: [PATCH] b2iscsi: Fix memory leak in mgmt_set_ip()

2014-07-07 Thread Tomas Henzl
On 07/01/2014 08:53 PM, Christoph Hellwig wrote: On Sun, Jun 29, 2014 at 08:28:34PM +0200, Tomas Henzl wrote: On 06/27/2014 09:38 PM, Maurizio Lombardi wrote: diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 07934b0..a3e5648 100644 ---

[PATCH] More 64bit LUN fixes

2014-07-07 Thread Hannes Reinecke
Update some missed printk() statements and fixed up some drivers. This fixes the build failures seen by the kbuild test robot. Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/53c700.c | 7 ++-- drivers/scsi/NCR5380.c | 21 +-

RE: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-07 Thread Suresh Thiagarajan
On Thu, Jul 3, 2014 at 2:15 PM, Christoph Hellwig h...@infradead.org wrote: Suresh, do you maintain pm8001 for pmcs now? There have been lots of pm8001 patches on the list, many of them with reviews from various people including Jack. I'd be really greatful if someone could collect them

Re: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-07 Thread Tomas Henzl
On 07/07/2014 03:12 PM, Suresh Thiagarajan wrote: On Thu, Jul 3, 2014 at 2:15 PM, Christoph Hellwig h...@infradead.org wrote: Suresh, do you maintain pm8001 for pmcs now? There have been lots of pm8001 patches on the list, many of them with reviews from various people including Jack. I'd

RE: [PATCH 1/4] pm8001: clean bitmap management functions

2014-07-07 Thread Suresh Thiagarajan
On Mon, Jul 7, 2014 at 7:14 PM, Tomas Henzl the...@redhat.com wrote: On 07/07/2014 03:12 PM, Suresh Thiagarajan wrote: On Thu, Jul 3, 2014 at 2:15 PM, Christoph Hellwig h...@infradead.org wrote: Suresh, do you maintain pm8001 for pmcs now? There have been lots of pm8001 patches on the

Re: [PATCH] beiscsi: the custom_length field has been set to a wrong value.

2014-07-07 Thread Christoph Hellwig
On Thu, Jun 26, 2014 at 11:16:26AM +0200, Maurizio Lombardi wrote: In the beiscsi_conn_get_stats() function, custom_length should be set to 1 to take into account the eh_abort_cnt field at custom[0]. Signed-off-by: Maurizio Lombardi mlomb...@redhat.com Any chance to get a review on this one?

Re: [PATCH 1/2] Use sdev_scsi2lun for SCSI parallel drivers

2014-07-07 Thread Hannes Reinecke
On 07/07/2014 12:11 PM, Christoph Hellwig wrote: On Mon, Jul 07, 2014 at 12:05:04PM +0200, Hannes Reinecke wrote: Ok, so I'll be sending a patchset for fixing up the build warnings (and keeping the current accesses to -lun), and prepare a different patchset moving everything onto accessors so

Re: [PATCH] hpsa: refine the pci enble/disable handling

2014-07-07 Thread Tomas Henzl
Steve, Joe, any chance you could review this patch and verify the sw reset case? Thanks, Tomas On 06/12/2014 05:29 PM, Tomas Henzl wrote: When a second(kdump) kernel starts and the hard reset method is used the driver calls pci_disable_device without previously enabling it, so the kernel shows

Re: [PATCH] scsi/FlashPoint.c: Add void declaration in zero-arg functions.

2014-07-07 Thread Khalid Aziz
On Thu, 2014-07-03 at 15:08 +0200, Chi Pham wrote: Added explicit void declarations to zero-argument function headers. The following coccinelle script was used: @addvoid@ identifier f; @@ f( + void ) { ... } Signed-off-by: Chi Pham femp...@gmail.com --- drivers/scsi/FlashPoint.c |

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Bryn: 2014-07-07 17:20 GMT+08:00 Bryn M. Reeves b...@redhat.com: On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: hi all: we met a USB Hard Disk that will go to suspend if host stop sending scsi command over 5mins. To save the IO, kernel will keep the file in page cache as

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Lars Melin
On 2014-07-07 21:37, loody wrote: hi Bryn: 2014-07-07 17:20 GMT+08:00 Bryn M. Reeves b...@redhat.com: On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: hi all: we met a USB Hard Disk that will go to suspend if host stop sending scsi command over 5mins. To save the IO, kernel

RE: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread David Laight
From: Lars Melin ... sgread is not included in BusyBox but you should have touch. Create a dummy file on the disk and let cron touch it every 4 minutes. You don't need 'touch' a shell redirect eg : file will do open(..., O_CREAT|O_TRUNC). However that still might not force an actual disc

[PATCH 4/4] scsi: pm8001: fix pm8001_store_update_fw

2014-07-07 Thread Tomas Henzl
The current implementation may mix the negative value returned from pm8001_set_nvmd with with count. -(-ENOMEM) could be interpreted as bytes programmed, this patch fixes it. Signed-off-by: Tomas Henzl the...@redhat.com --- drivers/scsi/pm8001/pm8001_ctl.c | 20 ++-- 1 file

[PATCH 1/4] scsi: pm8001: fix a memory leak in nvmd_resp

2014-07-07 Thread Tomas Henzl
Instead of copying information to fw_control_context free it. The task is forgotten thus also the reference to fw_control_context and the completion thread takes the info from virt_ptr again. Signed-off-by: Tomas Henzl the...@redhat.com --- drivers/scsi/pm8001/pm8001_hwi.c | 8 ++-- 1 file

[PATCH 3/4] scsi: pm8001: fix a memory leak in flash_update

2014-07-07 Thread Tomas Henzl
ccb-fw_control_context is copied to local fw_control_context and the local variable is never used later Free ccb-fw_control_context. The task is forgotten thus also the reference to fw_control_context and the completion thread takes the info from virt_ptr again. Signed-off-by: Tomas Henzl

[PATCH 2/4] scsi: pm8001: fix update_flash

2014-07-07 Thread Tomas Henzl
The driver checks the return valu, but after he tries to wait_for_completion which might never happen. Also the ioctlbuffer is freed at the end of the function, so the first removal is not needed. Signed-off-by: Tomas Henzl the...@redhat.com --- drivers/scsi/pm8001/pm8001_ctl.c | 6 +++--- 1

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi David: 2014-07-07 23:06 GMT+08:00 David Laight david.lai...@aculab.com: From: Lars Melin ... sgread is not included in BusyBox but you should have touch. Create a dummy file on the disk and let cron touch it every 4 minutes. You don't need 'touch' a shell redirect eg : file will do

Re: [PATCH] beiscsi: the custom_length field has been set to a wrong value.

2014-07-07 Thread Tomas Henzl
On 06/26/2014 11:16 AM, Maurizio Lombardi wrote: In the beiscsi_conn_get_stats() function, custom_length should be set to 1 to take into account the eh_abort_cnt field at custom[0]. Signed-off-by: Maurizio Lombardi mlomb...@redhat.com --- drivers/scsi/be2iscsi/be_iscsi.c | 2 +- 1 file

RE: [PATCH] hpsa: refine the pci enble/disable handling

2014-07-07 Thread Handzik, Joe
I'll take a look when I get a chance, Steve's out on vacation all week. At first glance it looks good, but like you said...gotta test it. Joe -Original Message- From: Tomas Henzl [mailto:the...@redhat.com] Sent: Monday, July 07, 2014 9:13 AM To: 'linux-scsi@vger.kernel.org' Cc:

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Lars Melin
On 2014-07-07 22:39, loody wrote: hi David: 2014-07-07 23:06 GMT+08:00 David Laight david.lai...@aculab.com: From: Lars Melin ... sgread is not included in BusyBox but you should have touch. Create a dummy file on the disk and let cron touch it every 4 minutes. You don't need 'touch' a shell

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Mon, Jul 07, 2014 at 11:39:05PM +0800, loody wrote: hi David: 2014-07-07 23:06 GMT+08:00 David Laight david.lai...@aculab.com: From: Lars Melin ... sgread is not included in BusyBox but you should have touch. Create a dummy file on the disk and let cron touch it every 4 minutes.

Re: [PATCH] beiscsi: the custom_length field has been set to a wrong value.

2014-07-07 Thread Christoph Hellwig
Oops, I just noticed that bnx2i, be2iscsi: fix custom stats length included this one liner change. Sorry for the stir! -- 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

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Alan: E.g. issue an sg_read for one sector to the device every 4m: */4 * * * * sg_read count=1 if=/dev/disk Since my target platform arm embedded system, does that mean I should include sg_read in my Busybox or cross-compile sg_read from sg3_utils? An alternative is to write a

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Bryn: 2014-07-07 23:52 GMT+08:00 Bryn M. Reeves b...@redhat.com: On Mon, Jul 07, 2014 at 11:39:05PM +0800, loody wrote: hi David: 2014-07-07 23:06 GMT+08:00 David Laight david.lai...@aculab.com: From: Lars Melin ... sgread is not included in BusyBox but you should have touch.

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Bryn M. Reeves
On Tue, Jul 08, 2014 at 12:15:54AM +0800, loody wrote: so sg_read will not hammer on the page cache like dd without iflags=direct thanks for your kind help, The sg_read program (and other programs in sg3_utils) sends a command directly to the device using an SG_IO ioctl. This bypasses all the

Re: [PATCH] qla4xxx: Return -ENOMEM on memory allocation failure

2014-07-07 Thread Mike Christie
On 07/04/2014 03:37 PM, Julia Lawall wrote: On Fri, 4 Jul 2014, Elliott, Robert (Server Storage) wrote: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On Behalf Of Himangi Saraogi Sent: Friday, 04 July, 2014 1:28 PM To:

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread Alan Stern
On Tue, 8 Jul 2014, loody wrote: An alternative is to write a positive value, such as 24, to /sys/block/sdX/events_poll_msecs where X is replaced with the proper drive letter. (24 ms = 240 s = 4 m.) I'm not sure this will work, but it's worth a try. I cannot find

[PATCH v6 0/2] ata: Fix the dma state machine lockup for APM X-Gene SoC

2014-07-07 Thread Suman Tripathi
This patch addresses the dma state machine lockup for APM X-Gene SoC. Signed-off-by: Loc Ho l...@apm.com Signed-off-by: Suman Tripathi stripa...@apm.com --- Suman Tripathi (2): libahci: Export some of the libahci functions. ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO

[PATCH v6 2/2] ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command.

2014-07-07 Thread Suman Tripathi
This patch fixes the dma state machine lockup due to the processing of IDENTIFY DEVICE PIO mode command. The X-Gene AHCI controller has an errata in which it cannot clear the BSY bit after the PIO setup FIS. The dma state machine enters CMFatalErrorUpdate state and locks up. This patch also

[PATCH v6 1/2] libahci: Export some of the libahci functions.

2014-07-07 Thread Suman Tripathi
This patch exports the function ahci_qc_issue and ahci_start_fis_rx. The subsequent patches will make use of them. Signed-off-by: Loc Ho l...@apm.com Signed-off-by: Suman Tripathi stripa...@apm.com --- drivers/ata/ahci.h| 2 ++ drivers/ata/libahci.c | 7 --- 2 files changed, 6

Re: [PATCH] qla4xxx: Return -ENOMEM on memory allocation failure

2014-07-07 Thread Vikas Chaudhary
On 07/07/14 10:01 pm, Mike Christie micha...@cs.wisc.edu wrote: On 07/04/2014 03:37 PM, Julia Lawall wrote: On Fri, 4 Jul 2014, Elliott, Robert (Server Storage) wrote: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On

Re: [PATCH v2 RESEND 00/23] scsi: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-07-07 Thread Alexander Gordeev
On Thu, Apr 24, 2014 at 12:07:12PM -0600, Bjorn Helgaas wrote: These depend on f7fc32c, which appeared in v3.15-rc1. I had intended to merge these scsi updates at the same time, but I failed. Would you like to take them now that f7fc32c is upstream? OK, will add them. I'm planning to

Re: [RFC 0/2] target: userspace pass-through backend

2014-07-07 Thread Andy Grover
Hi, here's some additional beginning bits for the configuration and use of this code: Changes to targetcli-fb and rtslib-fb: https://github.com/agrover/targetcli-fb/tree/userback https://github.com/agrover/rtslib-fb/tree/userback An incredibly-crappy stand-in for the user process that will

Re: [PATCH] ibmvfc: fix little endian issues

2014-07-07 Thread Brian King
On 06/26/2014 07:03 PM, Tyrel Datwyler wrote: Added big endian annotations to relevant data structure fields, and necessary byte swappings to support little endian builds. Acked-by: Brian King brk...@linux.vnet.ibm.com Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center