Re: Using sg_ses to change cooling element rpm speed

2013-03-15 Thread Douglas Gilbert
On 13-03-15 04:18 PM, Jeff Johnson wrote: Greetings, I'm beating my head against the desk trying to use sg_ses to change the cooling control element requested speed code for a fan connected to an LSI SAS2X36 SAS expander. I have tried the raw->edit<-raw method and tried the --data/--index/--con

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Douglas Gilbert
On 13-03-15 05:46 AM, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for scanning, too. If

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Mike Christie
On 03/15/2013 02:13 PM, Bart Van Assche wrote: > On 03/15/13 19:51, Mike Christie wrote: >> On 03/15/2013 08:41 AM, Bart Van Assche wrote: >>> How about using the value of scsi_cmnd.jiffies_at_alloc to finish only >>> those SCSI commands in the host reset handler that exceeded a certain >>> process

Using sg_ses to change cooling element rpm speed

2013-03-15 Thread Jeff Johnson
Greetings, I'm beating my head against the desk trying to use sg_ses to change the cooling control element requested speed code for a fan connected to an LSI SAS2X36 SAS expander. I have tried the raw->edit<-raw method and tried the --data/--index/--control method and neither seems to work.

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 19:51, Mike Christie wrote: On 03/15/2013 08:41 AM, Bart Van Assche wrote: How about using the value of scsi_cmnd.jiffies_at_alloc to finish only those SCSI commands in the host reset handler that exceeded a certain processing time ? We basically do this now. When a scsi command ti

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Mike Christie
On 03/15/2013 08:41 AM, Bart Van Assche wrote: > On 03/15/13 14:28, Bryn M. Reeves wrote: >> On 03/15/2013 12:46 PM, Bart Van Assche wrote: >>> The SCSI EH keeps trying until all outstanding request have been >>> finished. Does lpfc_host_reset_handler() invoke scsi_done() for It does not really m

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Steffen Maier
While we're at it: I recently figured that there are targets responding to inquiry with PQ=1 && PDT=31 for LUN0 if LUN0 has no backing device (e.g. no disk mapped for the initiator host). While this is likely to work with in-kernel lun scanning, the kernel does not even allocate an sg dev in th

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 14:28, Bryn M. Reeves wrote: On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via lpfc_hba_down_p

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via lpfc_hba_down_post() after shutting down the mailbox) bu

Re: [PATCH v2] st: Take additional queue ref in st_probe

2013-03-15 Thread Ewan Milne
On Tue, 2013-03-05 at 10:57 -0500, Joe Lawrence wrote: > Changes from v1: > Corrected error paths as noted by Ewan Milne and Jan Vesely. Acked-by: Ewan D. Milne > > These changes were applied to scsi.git, branch "misc". This patch > fixes a reference count bug in the SCSI tape driver which c

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 13:37, Bryn M. Reeves wrote: On 03/15/2013 12:24 PM, Bart Van Assche wrote: On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:24 PM, Bart Van Assche wrote: On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a related but not identical issue with SRP.

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a related but not identical issue with SRP. It would help if you could tell with which LLDD

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 11:55 AM, Hannes Reinecke wrote: Rationale for this patch is a weird test case with brocade switches; there you can actually disable a _target_ port. So the port isn't reachable anymore but no RSCN is send. I think it's more than a pure test-case; using the rscnsupr feature on th

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Hannes Reinecke
On 03/14/2013 07:09 PM, Steffen Maier wrote: Just for my understanding: So this is a bit like writing 0 into the failed attribute of a zfcp_port in sysfs (zfcp_sysfs_port_failed_store()) which forces a port reopen recovery including a sequence of fc_remote_port_delete and fc_remote_port_add? Sor

Re: [PATCH -next] [SCSI] csiostor: remove unused variable in csio_process_fwevtq_entry()

2013-03-15 Thread Naresh Kumar Inna
On 3/15/2013 3:31 PM, Wei Yongjun wrote: > From: Wei Yongjun > > The variable 'data' is initialized but never used > otherwise, so remove the unused variable. > > Signed-off-by: Wei Yongjun > --- > drivers/scsi/csiostor/csio_hw.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/dr

Re: [PATCH -next] [SCSI] csiostor: fix error return code in csio_hw_init()

2013-03-15 Thread Naresh Kumar Inna
On 3/15/2013 2:55 PM, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return a negative error code from the error handling > case instead of 0, as returned elsewhere in this function. > > Signed-off-by: Wei Yongjun > --- > drivers/scsi/csiostor/csio_hw.c | 1 + > 1 file changed, 1 insertion(

[PATCH -next] [SCSI] csiostor: remove unused variable in csio_process_fwevtq_entry()

2013-03-15 Thread Wei Yongjun
From: Wei Yongjun The variable 'data' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun --- drivers/scsi/csiostor/csio_hw.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c

[PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Hannes Reinecke
SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for scanning, too. If the W_LUN is not supported we'll fall back to

[PATCH -next] target: fix possible memory leak in core_tpg_register()

2013-03-15 Thread Wei Yongjun
From: Wei Yongjun 'se_tpg->tpg_lun_list' is malloced in core_tpg_register() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. 'se_tpg' is malloced out of this function, and will be freed if we return error, so remove free for 'se_tpg'. Signe

Re: [PATCH v2] st: Take additional queue ref in st_probe

2013-03-15 Thread Jan Vesely
On 05/03/13 16:57, Joe Lawrence wrote: > Changes from v1: > Corrected error paths as noted by Ewan Milne and Jan Vesely. thanks, Acked-by: Jan Vesely > > These changes were applied to scsi.git, branch "misc". This patch > fixes a reference count bug in the SCSI tape driver which can be >

[PATCH RESEND v11 1/4] block: add a flag to identify PM request

2013-03-15 Thread Aaron Lu
From: Lin Ming Add a flag REQ_PM to identify the request is PM related, such requests will not change the device request queue's runtime status. It is intended to be used in driver's runtime PM callback, so that driver can perform some IO to the device there with the queue's runtime status unaffe

[PATCH RESEND v11 0/4] block layer runtime pm

2013-03-15 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH RESEND v11 3/4] block: implement runtime pm strategy

2013-03-15 Thread Aaron Lu
From: Lin Ming When a request is added: If device is suspended or is suspending and the request is not a PM request, resume the device. When the last request finishes: Call pm_runtime_mark_last_busy(). When pick a request: If device is resuming/suspending, then only PM request i

[PATCH RESEND v11 4/4] sd: change to auto suspend mode

2013-03-15 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi/scsi_

[PATCH RESEND v11 2/4] block: add runtime pm helpers

2013-03-15 Thread Aaron Lu
From: Lin Ming Add runtime pm helper functions: void blk_pm_runtime_init(struct request_queue *q, struct device *dev) - Initialization function for drivers to call. int blk_pre_runtime_suspend(struct request_queue *q) - If any requests are in the queue, mark last busy and return -EBUSY.